go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkGenericMultiResolutionPyramidImageFilter.h
Go to the documentation of this file.
1 /*======================================================================
2 
3 This file is part of the elastix software.
4 
5 Copyright (c) University Medical Center Utrecht. All rights reserved.
6 See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7 details.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 #ifndef __itkGenericMultiResolutionPyramidImageFilter_h
15 #define __itkGenericMultiResolutionPyramidImageFilter_h
16 
17 #include "itkMultiResolutionPyramidImageFilter.h"
18 
19 namespace itk
20 {
104 template <class TInputImage, class TOutputImage>
106  public MultiResolutionPyramidImageFilter< TInputImage, TOutputImage >
107 {
108 public:
111  typedef MultiResolutionPyramidImageFilter<
112  TInputImage,TOutputImage> Superclass;
113  typedef typename Superclass::Superclass SuperSuperclass;
114  typedef SmartPointer<Self> Pointer;
115  typedef SmartPointer<const Self> ConstPointer;
116 
118  itkNewMacro( Self );
119 
122  MultiResolutionPyramidImageFilter );
123 
125  itkStaticConstMacro( ImageDimension, unsigned int,
126  TInputImage::ImageDimension );
127  itkStaticConstMacro( OutputImageDimension, unsigned int,
128  TOutputImage::ImageDimension );
129 
131  typedef typename Superclass::ScheduleType ScheduleType;
132  typedef typename Superclass::InputImageType InputImageType;
133  typedef typename Superclass::OutputImageType OutputImageType;
134  typedef typename Superclass::InputImagePointer InputImagePointer;
135  typedef typename Superclass::OutputImagePointer OutputImagePointer;
136  typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
137  typedef typename Superclass::InputImageType::SpacingType SpacingType;
138  typedef typename InputImageType::PixelType PixelType;
139  typedef typename NumericTraits<PixelType>::ScalarRealType ScalarRealType;
140 
144 
146  typedef FixedArray< ScalarRealType,
147  itkGetStaticConstMacro(ImageDimension) > SigmaArrayType;
149 
157  virtual void SetSchedule( const ScheduleType & schedule );
158 
166  virtual void SetRescaleSchedule( const RescaleScheduleType & schedule );
167 
170  {
171  return this->m_Schedule;
172  };
173 
178  virtual void SetSmoothingSchedule( const SmoothingScheduleType & schedule );
179 
181  itkGetConstReferenceMacro( SmoothingSchedule, SmoothingScheduleType );
182 
186  virtual void SetNumberOfLevels( unsigned int num );
187 
191  virtual void SetCurrentLevel( unsigned int level );
192 
194  itkGetConstReferenceMacro( CurrentLevel, unsigned int );
195 
197  virtual void SetComputeOnlyForCurrentLevel( const bool _arg );
198  itkGetConstMacro( ComputeOnlyForCurrentLevel, bool );
199  itkBooleanMacro( ComputeOnlyForCurrentLevel );
200 
206  itkSetMacro( UseMultiResolutionRescaleSchedule, bool );
207  itkGetConstMacro( UseMultiResolutionRescaleSchedule, bool );
208  itkBooleanMacro( UseMultiResolutionRescaleSchedule );
209 
214  itkSetMacro( UseMultiResolutionSmoothingSchedule, bool );
215  itkGetConstMacro( UseMultiResolutionSmoothingSchedule, bool );
216  itkBooleanMacro( UseMultiResolutionSmoothingSchedule );
217 
218 #ifdef ITK_USE_CONCEPT_CHECKING
219 
220  itkConceptMacro(SameDimensionCheck,
221  (Concept::SameDimension<ImageDimension, OutputImageDimension>));
222  itkConceptMacro(OutputHasNumericTraitsCheck,
223  (Concept::HasNumericTraits<typename TOutputImage::PixelType>));
225 #endif
226 
227 protected:
230  void PrintSelf( std::ostream & os, Indent indent ) const;
231 
239  virtual void GenerateOutputInformation( void );
240 
246  virtual void GenerateOutputRequestedRegion( DataObject * output );
247 
249  virtual void GenerateInputRequestedRegion( void );
250 
252  virtual void GenerateData( void );
253 
255  void ReleaseOutputs( void );
256 
258  unsigned int m_CurrentLevel;
259 
264 
265 private:
267  void SetSmoothingScheduleToDefault( void );
268 
272  bool ComputeForCurrentLevel( const unsigned int level ) const;
273 
275  double GetDefaultSigma( const unsigned int dim,
276  const unsigned int * factors,
277  const SpacingType & spacing ) const;
278 
280  SigmaArrayType GetSigma( const unsigned int level,
281  SigmaArrayType & sigmaArray ) const;
282 
284  bool AreSigmasAllZeros( const SigmaArrayType & sigmaArray ) const;
285 
287  bool AreRescaleFactorsAllOnes( const RescaleFactorArrayType & rescaleFactorArray ) const;
288 
294  bool IsCasterNeeded( void ) const;
295 
296 private:
297  GenericMultiResolutionPyramidImageFilter(const Self&); //purposely not implemented
298  void operator=(const Self&); //purposely not implemented
299 };
300 
301 } // namespace itk
302 
303 #ifndef ITK_MANUAL_INSTANTIATION
304 #include "itkGenericMultiResolutionPyramidImageFilter.hxx"
305 #endif
306 
307 #endif
FixedArray< ScalarRealType, itkGetStaticConstMacro(ImageDimension) > SigmaArrayType
Framework for creating images in a multi-resolution pyramid.
MultiResolutionPyramidImageFilter< TInputImage, TOutputImage > Superclass


Generated on 05-01-2014 for elastix by doxygen 1.8.5 elastix logo