00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMinimumMaximumImageCalculator_h
00018 #define __itkMinimumMaximumImageCalculator_h
00019
00020 #include "itkObject.h"
00021 #include "itkObjectFactory.h"
00022
00023 namespace itk
00024 {
00025
00033 template <class TInputImage>
00034 class ITK_EXPORT MinimumMaximumImageCalculator : public Object
00035 {
00036 public:
00038 typedef MinimumMaximumImageCalculator Self;
00039 typedef Object Superclass;
00040 typedef SmartPointer<Self> Pointer;
00041 typedef SmartPointer<const Self> ConstPointer;
00042
00044 itkNewMacro(Self);
00045
00047 itkTypeMacro(MinimumMaximumImageCalculator, Object);
00048
00050 typedef TInputImage ImageType;
00051
00053 typedef typename TInputImage::Pointer ImagePointer;
00054
00056 typedef typename TInputImage::ConstPointer ImageConstPointer;
00057
00059 typedef typename TInputImage::PixelType PixelType;
00060
00062 typedef typename TInputImage::IndexType IndexType;
00063
00065 typedef typename TInputImage::RegionType RegionType;
00066
00068 itkSetConstObjectMacro(Image,ImageType);
00069
00071 void ComputeMinimum(void);
00072
00074 void ComputeMaximum(void);
00075
00077 void Compute(void);
00078
00080 itkGetMacro(Minimum,PixelType);
00081
00083 itkGetMacro(Maximum,PixelType);
00084
00086 itkGetConstReferenceMacro(IndexOfMinimum,IndexType);
00087
00089 itkGetConstReferenceMacro(IndexOfMaximum,IndexType);
00090
00092 void SetRegion( const RegionType & region );
00093
00094 protected:
00095 MinimumMaximumImageCalculator();
00096 virtual ~MinimumMaximumImageCalculator() {};
00097 void PrintSelf(std::ostream& os, Indent indent) const;
00098
00099 private:
00100 MinimumMaximumImageCalculator(const Self&);
00101 void operator=(const Self&);
00102
00103 PixelType m_Minimum;
00104 PixelType m_Maximum;
00105 ImageConstPointer m_Image;
00106
00107 IndexType m_IndexOfMinimum;
00108 IndexType m_IndexOfMaximum;
00109
00110 RegionType m_Region;
00111 bool m_RegionSetByUser;
00112 };
00113
00114 }
00115
00116
00117 #ifndef ITK_MANUAL_INSTANTIATION
00118 #include "itkMinimumMaximumImageCalculator.txx"
00119 #endif
00120
00121 #endif