Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkStatisticsLabelMapFilter_h
00018 #define __itkStatisticsLabelMapFilter_h
00019
00020 #include "itkShapeLabelMapFilter.h"
00021
00022 namespace itk {
00037 template<class TImage, class TFeatureImage>
00038 class ITK_EXPORT StatisticsLabelMapFilter :
00039 public ShapeLabelMapFilter<TImage, Image< typename TImage::PixelType, ::itk::GetImageDimension<TImage>::ImageDimension> >
00040 {
00041 public:
00043 typedef StatisticsLabelMapFilter Self;
00044 typedef ShapeLabelMapFilter<TImage> Superclass;
00045 typedef SmartPointer<Self> Pointer;
00046 typedef SmartPointer<const Self> ConstPointer;
00047
00049 typedef TImage ImageType;
00050 typedef typename ImageType::Pointer ImagePointer;
00051 typedef typename ImageType::ConstPointer ImageConstPointer;
00052 typedef typename ImageType::PixelType PixelType;
00053 typedef typename ImageType::IndexType IndexType;
00054 typedef typename ImageType::PointType PointType;
00055 typedef typename ImageType::LabelObjectType LabelObjectType;
00056 typedef typename LabelObjectType::MatrixType MatrixType;
00057 typedef typename LabelObjectType::VectorType VectorType;
00058
00059 typedef TFeatureImage FeatureImageType;
00060 typedef typename FeatureImageType::Pointer FeatureImagePointer;
00061 typedef typename FeatureImageType::ConstPointer FeatureImageConstPointer;
00062 typedef typename FeatureImageType::PixelType FeatureImagePixelType;
00063
00065 itkStaticConstMacro(ImageDimension, unsigned int,
00066 TImage::ImageDimension);
00067
00069 itkNewMacro(Self);
00070
00072 itkTypeMacro(StatisticsLabelMapFilter,
00073 ShapeLabelMapFilter);
00074
00075 #ifdef ITK_USE_CONCEPT_CHECKING
00076
00077
00078
00079
00080
00081
00082
00083
00085 #endif
00086
00088 void SetFeatureImage(const TFeatureImage *input)
00089 {
00090
00091 this->SetNthInput( 1, const_cast<TFeatureImage *>(input) );
00092 }
00093
00095 FeatureImageType * GetFeatureImage()
00096 {
00097 return static_cast<FeatureImageType*>(const_cast<DataObject *>(this->ProcessObject::GetInput(1)));
00098 }
00099
00101 void SetInput1(TImage *input)
00102 {
00103 this->SetInput( input );
00104 }
00105
00107 void SetInput2(const TFeatureImage *input)
00108 {
00109 this->SetFeatureImage( input );
00110 }
00111
00118 itkSetMacro(ComputeHistogram, bool);
00119 itkGetConstReferenceMacro(ComputeHistogram, bool);
00120 itkBooleanMacro(ComputeHistogram);
00122
00128 itkSetMacro(NumberOfBins, unsigned int);
00129 itkGetConstReferenceMacro(NumberOfBins, unsigned int);
00131
00132
00133 protected:
00134 StatisticsLabelMapFilter();
00135 ~StatisticsLabelMapFilter() {};
00136
00137 virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject );
00138
00139 virtual void BeforeThreadedGenerateData();
00140
00141 void PrintSelf(std::ostream& os, Indent indent) const;
00142
00143 private:
00144 StatisticsLabelMapFilter(const Self&);
00145 void operator=(const Self&);
00146
00147 FeatureImagePixelType m_Minimum;
00148 FeatureImagePixelType m_Maximum;
00149 unsigned int m_NumberOfBins;
00150 bool m_ComputeHistogram;
00151
00152 };
00153
00154 }
00155
00156 #ifndef ITK_MANUAL_INSTANTIATION
00157 #include "itkStatisticsLabelMapFilter.txx"
00158 #endif
00159
00160 #endif
00161