go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkParabolicErodeDilateImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkParabolicErodeDilateImageFilter_h
19 #define __itkParabolicErodeDilateImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkNumericTraits.h"
23 #include "itkProgressReporter.h"
24 
25 namespace itk
26 {
61 template< typename TInputImage,
62 bool doDilate,
63 typename TOutputImage = TInputImage >
65  public ImageToImageFilter< TInputImage, TOutputImage >
66 {
67 
68 public:
69 
72  typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
74  typedef SmartPointer< const Self > ConstPointer;
75 
77  itkNewMacro( Self );
78 
80  itkTypeMacro( ParabolicErodeDilateImageFilter, ImageToImageFilter );
81 
83  typedef TInputImage InputImageType;
84  typedef TOutputImage OutputImageType;
85  typedef typename TInputImage::PixelType PixelType;
86  typedef typename NumericTraits< PixelType >::RealType RealType;
87  typedef typename NumericTraits< PixelType >::ScalarRealType ScalarRealType;
88  typedef typename TOutputImage::PixelType OutputPixelType;
89 
91  typedef typename TInputImage::Pointer InputImagePointer;
92  typedef typename TInputImage::ConstPointer InputImageConstPointer;
93  typedef typename TInputImage::SizeType InputSizeType;
94  typedef typename TOutputImage::SizeType OutputSizeType;
95 
97  typedef typename itk::FixedArray< ScalarRealType, TInputImage::ImageDimension > RadiusType;
98 
100  itkStaticConstMacro( ImageDimension, unsigned int,
101  TInputImage::ImageDimension );
102  itkStaticConstMacro( OutputImageDimension, unsigned int,
103  TOutputImage::ImageDimension );
104  itkStaticConstMacro( InputImageDimension, unsigned int,
105  TInputImage::ImageDimension );
106 
107  typedef typename OutputImageType::RegionType OutputImageRegionType;
112  typedef typename NumericTraits< PixelType >::FloatType InternalRealType;
113  //typedef typename Image<InternalRealType, itkGetStaticConstMacro(ImageDimension) > RealImageType;
114 
115  // set all of the scales the same
116  void SetScale( ScalarRealType scale );
117 
118  itkSetMacro( Scale, RadiusType );
119  itkGetConstReferenceMacro( Scale, RadiusType );
120 
125  itkSetMacro( UseImageSpacing, bool );
126  itkGetConstReferenceMacro( UseImageSpacing, bool );
127  itkBooleanMacro( UseImageSpacing );
130 #ifdef ITK_USE_CONCEPT_CHECKING
131 
132  itkConceptMacro( SameDimension,
133  ( Concept::SameDimension< itkGetStaticConstMacro( InputImageDimension ), itkGetStaticConstMacro( OutputImageDimension ) > ) );
134 
135  itkConceptMacro( Comparable,
136  ( Concept::Comparable< PixelType > ) );
137 
139 #endif
140 
141 protected:
142 
145  void PrintSelf( std::ostream & os, Indent indent ) const;
146 
148  void GenerateData( void );
149 
150  int SplitRequestedRegion( int i, int num, OutputImageRegionType & splitRegion );
151 
152  void ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId );
153 
154 // virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
155 // Override since the filter produces the entire dataset.
156  void EnlargeOutputRequestedRegion( DataObject * output );
157 
159 
160 private:
161 
162  ParabolicErodeDilateImageFilter( const Self & ); // purposely not implemented
163  void operator=( const Self & ); // purposely not implemented
164 
165  RadiusType m_Scale;
166  typename TInputImage::PixelType m_Extreme;
167 
170 };
171 
172 } // end namespace itk
173 
174 #ifndef ITK_MANUAL_INSTANTIATION
175 #include "itkParabolicErodeDilateImageFilter.hxx"
176 #endif
177 
178 #endif
NumericTraits< PixelType >::ScalarRealType ScalarRealType
void PrintSelf(std::ostream &os, Indent indent) const
Parent class for morphological operations with parabolic structuring elements.
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
void SetScale(ScalarRealType scale)
int SplitRequestedRegion(int i, int num, OutputImageRegionType &splitRegion)
itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension)
NumericTraits< PixelType >::FloatType InternalRealType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
void EnlargeOutputRequestedRegion(DataObject *output)
NumericTraits< PixelType >::RealType RealType
itk::FixedArray< ScalarRealType, TInputImage::ImageDimension > RadiusType


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo