NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkRegionGrowSurfacePoints.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: itkConnectedThresholdImageFilter.h
5  Language: C++
6  Date: $Date$
7  Version: $Revision$
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef itkRegionGrowSurfacePoints_h
18 #define itkRegionGrowSurfacePoints_h
19 
20 #include <itkImage.h>
21 #include <itkImageToImageFilter.h>
22 #include <itkSimpleDataObjectDecorator.h>
23 
24 namespace itk {
25 
35 template <class TInputImage, class TOutputImage>
36 class ITK_EXPORT RegionGrowSurfacePoints:
37  public ImageToImageFilter<TInputImage,TOutputImage>
38 {
39 public:
42  typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
43  typedef SmartPointer<Self> Pointer;
44  typedef SmartPointer<const Self> ConstPointer;
45 
47  itkNewMacro(Self);
48 
50  itkTypeMacro(RegionGrowSurfacePoints,
51  ImageToImageFilter);
52 
53  typedef TInputImage InputImageType;
54  typedef typename InputImageType::Pointer InputImagePointer;
55  typedef typename InputImageType::ConstPointer InputImageConstPointer;
60 
61  typedef TOutputImage OutputImageType;
62  typedef typename OutputImageType::Pointer OutputImagePointer;
65 
66  void PrintSelf ( std::ostream& os, Indent indent ) const;
67 
68 
70  void SetSeed ( const IndexType & seed );
71  void AddSeed(const IndexType & seed);
72 
74  void ClearSeeds ();
75 
79  itkSetMacro(ReplaceValue, OutputImagePixelType);
80  itkGetConstMacro(ReplaceValue, OutputImagePixelType);
81 
83  typedef SimpleDataObjectDecorator<InputImagePixelType> InputPixelObjectType;
84 
86  virtual void SetUpper( InputImagePixelType );
87  virtual void SetLower( InputImagePixelType );
88 
90  virtual void SetUpperInput( const InputPixelObjectType *);
91  virtual void SetLowerInput( const InputPixelObjectType *);
92 
94  virtual InputImagePixelType GetUpper() const;
95  virtual InputImagePixelType GetLower() const;
96 
98  virtual InputPixelObjectType * GetUpperInput();
99  virtual InputPixelObjectType * GetLowerInput();
100 
102  itkStaticConstMacro(InputImageDimension, unsigned int,
103  TInputImage::ImageDimension);
104  itkStaticConstMacro(OutputImageDimension, unsigned int,
105  TOutputImage::ImageDimension);
106 
107 #ifdef ITK_USE_CONCEPT_CHECKING
108 
109  itkConceptMacro(OutputEqualityComparableCheck,
110  (Concept::EqualityComparable<OutputImagePixelType>));
111  itkConceptMacro(InputEqualityComparableCheck,
112  (Concept::EqualityComparable<InputImagePixelType>));
113  itkConceptMacro(InputConvertibleToOutputCheck,
114  (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
115  itkConceptMacro(SameDimensionCheck,
116  (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
117  itkConceptMacro(IntConvertibleToInputCheck,
118  (Concept::Convertible<int, InputImagePixelType>));
119  itkConceptMacro(OutputOStreamWritableCheck,
120  (Concept::OStreamWritable<OutputImagePixelType>));
122 #endif
123 
124 protected:
127  std::vector<IndexType> m_SeedList;
128  InputImagePixelType m_Lower;
129  InputImagePixelType m_Upper;
130  OutputImagePixelType m_ReplaceValue;
131 
132  // Override since the filter needs all the data for the algorithm
133  void GenerateInputRequestedRegion();
134 
135  // Override since the filter produces the entire dataset
136  void EnlargeOutputRequestedRegion(DataObject *output);
137 
138  void GenerateData();
139 
140 private:
141  RegionGrowSurfacePoints(const Self&); //purposely not implemented
142  void operator=(const Self&); //purposely not implemented
143 
144 };
145 
146 } // end namespace itk
147 
148 #ifndef ITK_MANUAL_INSTANTIATION
149 #include "itkRegionGrowSurfacePoints.txx"
150 #endif
151 
152 #endif
OutputImagePixelType m_ReplaceValue
Definition: itkRegionGrowSurfacePoints.h:130
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
InputImageType::IndexType IndexType
Definition: itkRegionGrowSurfacePoints.h:58
SmartPointer< const Self > ConstPointer
Definition: itkRegionGrowSurfacePoints.h:44
~RegionGrowSurfacePoints()
Definition: itkRegionGrowSurfacePoints.h:126
SmartPointer< Self > Pointer
Definition: itkRegionGrowSurfacePoints.h:43
Definition: niftkITKAffineResampleImage.cxx:74
TOutputImage OutputImageType
Definition: itkRegionGrowSurfacePoints.h:61
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
RegionGrowSurfacePoints Self
Definition: itkRegionGrowSurfacePoints.h:41
InputImagePixelType m_Upper
Definition: itkRegionGrowSurfacePoints.h:129
OutputImageType::Pointer OutputImagePointer
Definition: itkRegionGrowSurfacePoints.h:62
InputImageType::RegionType InputImageRegionType
Definition: itkRegionGrowSurfacePoints.h:56
OutputImageType::PixelType OutputImagePixelType
Definition: itkRegionGrowSurfacePoints.h:64
Label pixels that are connected to a seed and lie within a range of values.
Definition: itkRegionGrowSurfacePoints.h:36
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
OutputImageType::RegionType OutputImageRegionType
Definition: itkRegionGrowSurfacePoints.h:63
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
InputImageType::SizeType SizeType
Definition: itkRegionGrowSurfacePoints.h:59
InputImagePixelType m_Lower
Definition: itkRegionGrowSurfacePoints.h:128
InputImageType::ConstPointer InputImageConstPointer
Definition: itkRegionGrowSurfacePoints.h:55
SimpleDataObjectDecorator< InputImagePixelType > InputPixelObjectType
Definition: itkRegionGrowSurfacePoints.h:80
InputImageType::Pointer InputImagePointer
Definition: itkRegionGrowSurfacePoints.h:54
TInputImage InputImageType
Definition: itkRegionGrowSurfacePoints.h:51
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: itkRegionGrowSurfacePoints.h:42
InputImageType::PixelType InputImagePixelType
Definition: itkRegionGrowSurfacePoints.h:57