NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkMIDASDownSamplingFilter.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkMIDASDownSamplingFilter_h
16 #define itkMIDASDownSamplingFilter_h
17 
18 #include <itkImageToImageFilter.h>
19 
20 namespace itk
21 {
22 
32  template <class TInputImage, class TOutputImage>
33  class ITK_EXPORT MIDASDownSamplingFilter : public ImageToImageFilter<TInputImage, TOutputImage>
34  {
35  public:
38  typedef ImageToImageFilter<TInputImage, TOutputImage> SuperClass;
39  typedef SmartPointer<Self> Pointer;
40  typedef SmartPointer<const Self> ConstPointer;
41 
43  itkNewMacro(Self);
44 
46  typedef typename TInputImage::PixelType PixelType;
47 
50 
52  typedef typename TInputImage::SizeType SizeType;
53 
55  itkTypeMacro(MIDASDownSamplingFilter, ImageToImageFilter);
56 
58  typedef TInputImage InputImageType;
59  typedef typename InputImageType::ConstPointer InputImageConstPointer;
60  typedef typename InputImageType::Pointer InputImagePointer;
64 
65  typedef TOutputImage OutputImageType;
66  typedef typename OutputImageType::Pointer OutputImagePointer;
70 
72  itkSetMacro(DownSamplingFactor, unsigned int);
73  itkGetConstMacro(DownSamplingFactor, unsigned int);
74 
76  itkSetMacro(InValue, PixelType);
77  itkGetConstMacro(InValue, PixelType);
78 
80  itkSetMacro(OutValue, PixelType);
81  itkGetConstMacro(OutValue, PixelType);
82 
84  virtual void GenerateInputRequestedRegion();
85  virtual void GenerateOutputInformation();
86 
87  protected:
90  void PrintSelf(std::ostream& os, Indent indent) const;
91 
93  virtual void GenerateData();
94 
95  private:
96  MIDASDownSamplingFilter(const Self&); //purposely not implemented
97  void operator=(const Self&); //purposely not implemented
98 
100  unsigned int m_DownSamplingFactor;
101 
102  PixelType m_InValue;
103  PixelType m_OutValue;
104  };
105 
106 }
107 
108 #ifndef ITK_MANUAL_INSTANTIATION
109 #include "itkMIDASDownSamplingFilter.txx"
110 #endif
111 
112 #endif
virtual ~MIDASDownSamplingFilter()
Definition: itkMIDASDownSamplingFilter.h:89
MIDASDownSamplingFilter Self
Definition: itkMIDASDownSamplingFilter.h:37
SmartPointer< Self > Pointer
Definition: itkMIDASDownSamplingFilter.h:39
ImageToImageFilter< TInputImage, TOutputImage > SuperClass
Definition: itkMIDASDownSamplingFilter.h:38
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
OutputImageType::SizeType OutputImageSizeType
Definition: itkMIDASDownSamplingFilter.h:67
Definition: niftkITKAffineResampleImage.cxx:74
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
OutputImageType::IndexType OutputImageIndexType
Definition: itkMIDASDownSamplingFilter.h:68
TInputImage::SizeType SizeType
Definition: itkMIDASDownSamplingFilter.h:52
InputImageType::ConstPointer InputImageConstPointer
Definition: itkMIDASDownSamplingFilter.h:59
TInputImage::IndexType IndexType
Definition: itkMIDASDownSamplingFilter.h:49
InputImageType::RegionType InputImageRegionType
Definition: itkMIDASDownSamplingFilter.h:63
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
Performs the down sampling described in step 5 of "Interactive Algorithms for the segmentation and qu...
Definition: itkMIDASDownSamplingFilter.h:33
TInputImage::PixelType PixelType
Definition: itkMIDASDownSamplingFilter.h:43
TInputImage InputImageType
Definition: itkMIDASDownSamplingFilter.h:55
InputImageType::IndexType InputImageIndexType
Definition: itkMIDASDownSamplingFilter.h:62
InputImageType::SizeType InputImageSizeType
Definition: itkMIDASDownSamplingFilter.h:61
OutputImageType::RegionType OutputImageRegionType
Definition: itkMIDASDownSamplingFilter.h:69
TOutputImage OutputImageType
Definition: itkMIDASDownSamplingFilter.h:65
InputImageType::Pointer InputImagePointer
Definition: itkMIDASDownSamplingFilter.h:60
OutputImageType::Pointer OutputImagePointer
Definition: itkMIDASDownSamplingFilter.h:66
SmartPointer< const Self > ConstPointer
Definition: itkMIDASDownSamplingFilter.h:40