17 #ifndef __itkDerivativeImageFilter_txx
18 #define __itkDerivativeImageFilter_txx
21 #include "itkNumericTraits.h"
30 template <
class TInputImage,
class TOutputImage>
37 Superclass::GenerateInputRequestedRegion();
56 typename TInputImage::RegionType inputRequestedRegion;
57 inputRequestedRegion = inputPtr->GetRequestedRegion();
60 inputRequestedRegion.PadByRadius( oper.
GetRadius() );
63 if ( inputRequestedRegion.Crop(inputPtr->GetLargestPossibleRegion()) )
65 inputPtr->SetRequestedRegion( inputRequestedRegion );
74 inputPtr->SetRequestedRegion( inputRequestedRegion );
77 InvalidRequestedRegionError e(__FILE__, __LINE__);
79 e.
SetDescription(
"Requested region is (at least partially) outside the largest possible region.");
86 template<
class TInputImage,
class TOutputImage >
95 typedef typename NumericTraits<OutputPixelType>::RealType OperatorValueType;
104 if (m_UseImageSpacing ==
true)
106 if ( this->GetInput()->GetSpacing()[m_Direction] == 0.0 )
108 itkExceptionMacro(<<
"Image spacing cannot be zero.");
123 progress->SetMiniPipelineFilter(
this);
127 progress->RegisterInternalFilter(filter,1.0f);
129 filter->OverrideBoundaryCondition(&nbc);
134 filter->SetOperator(oper);
135 filter->SetInput(this->GetInput());
140 filter->GraftOutput(this->GetOutput());
147 this->GraftOutput(filter->GetOutput());
150 template<
class TInputImage,
class TOutputImage >
155 Superclass::PrintSelf(os,indent);
157 os << indent <<
"Order: " << m_Order << std::endl;
158 os << indent <<
"Direction: " << m_Direction << std::endl;
159 os << indent <<
"UseImageSpacing: " << m_UseImageSpacing << std::endl;