13 #ifndef itkLocalIntensityFilter_h 14 #define itkLocalIntensityFilter_h 16 #include "itkImageToImageFilter.h" 17 #include "itkNumericTraits.h" 19 #include "itkSimpleDataObjectDecorator.h" 24 template<
typename TInputImage >
26 public ImageToImageFilter< TInputImage, TInputImage >
31 typedef ImageToImageFilter< TInputImage, TInputImage >
Superclass;
45 typedef typename TInputImage::SizeType
SizeType;
49 typedef Image<unsigned short, TInputImage::ImageDimension>
MaskImageType;
52 itkStaticConstMacro(ImageDimension,
unsigned int,
53 TInputImage::ImageDimension);
56 typedef typename NumericTraits< PixelType >::RealType
RealType;
68 return this->GetLocalPeakOutput()->Get();
70 RealObjectType * GetLocalPeakOutput();
72 const RealObjectType * GetLocalPeakOutput()
const;
77 return this->GetGlobalPeakOutput()->Get();
79 RealObjectType * GetGlobalPeakOutput();
81 const RealObjectType * GetGlobalPeakOutput()
const;
86 return this->GetLocalMaximumOutput()->Get();
88 RealObjectType * GetLocalMaximumOutput();
90 const RealObjectType * GetLocalMaximumOutput()
const;
97 itkSetMacro(Range,
double);
98 itkGetMacro(Range,
double);
99 itkGetConstMacro(Range,
double);
104 using Superclass::MakeOutput;
105 DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
107 #ifdef ITK_USE_CONCEPT_CHECKING 109 itkConceptMacro(InputHasNumericTraitsCheck,
110 (Concept::HasNumericTraits< PixelType >));
117 void PrintSelf(std::ostream & os, Indent indent)
const ITK_OVERRIDE;
122 void AllocateOutputs() ITK_OVERRIDE;
125 void BeforeThreadedGenerateData() ITK_OVERRIDE;
129 void AfterThreadedGenerateData() ITK_OVERRIDE;
132 void ThreadedGenerateData(
const RegionType &
133 outputRegionForThread,
134 ThreadIdType threadId) ITK_OVERRIDE;
137 void GenerateInputRequestedRegion() ITK_OVERRIDE;
140 void EnlargeOutputRequestedRegion(DataObject *data) ITK_OVERRIDE;
145 Array< RealType > m_ThreadLocalMaximum;
146 Array< RealType > m_ThreadLocalPeakValue;
147 Array< RealType > m_ThreadGlobalPeakValue;
148 typename MaskImageType::Pointer m_Mask;
153 #ifndef ITK_MANUAL_INSTANTIATION 154 #include "itkLocalIntensityFilter.hxx" TInputImage::PixelType PixelType
NumericTraits< PixelType >::RealType RealType
DataObject::Pointer DataObjectPointer
RealType GetGlobalPeak() const
TInputImage::SizeType SizeType
void SetMask(typename MaskImageType::Pointer mask)
TInputImage::IndexType IndexType
~LocalIntensityFilter() ITK_OVERRIDE
RealType GetLocalMaximum() const
LocalIntensityFilter Self
RealType GetLocalPeak() const
TInputImage::Pointer InputImagePointer
SimpleDataObjectDecorator< PixelType > PixelObjectType
TInputImage::RegionType RegionType
SimpleDataObjectDecorator< RealType > RealObjectType
mitk::Image::Pointer mask
SmartPointer< const Self > ConstPointer
Image< unsigned short, TInputImage::ImageDimension > MaskImageType
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
SmartPointer< Self > Pointer
ImageToImageFilter< TInputImage, TInputImage > Superclass