NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkIntensityFilter.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 #ifndef ITKINTENSITYFILTER_H
15 #define ITKINTENSITYFILTER_H
16 
17 #include <itkImageToImageFilter.h>
18 #include <itkMacro.h>
19 #include <itkRescaleIntensityImageFilter.h>
20 #include <itkNormalizeImageFilter.h>
21 
22 namespace itk {
23 
28 template < class TIntensityImage, class TVesselImage >
29 class ITK_EXPORT IntensityFilter :
30  public ImageToImageFilter< TIntensityImage, TVesselImage >
31 {
32 public:
35  typedef ImageToImageFilter<TIntensityImage, TVesselImage> Superclass;
36  typedef SmartPointer<Self> Pointer;
37  typedef SmartPointer<const Self> ConstPointer;
38  typedef TIntensityImage IntensityImageType;
39  typedef TVesselImage VesselImageType;
41 
42  typedef enum
43  {
44  LINEAR = 0,
45  EXPONENTIAL = 1,
46  MULTIPLY = 2
47  } FilterModeType;
48 
50  itkNewMacro(Self);
51 
53  itkTypeMacro(IntensityFilter, ImageToImageFilter);
54 
55  itkStaticConstMacro(ImageDimension, unsigned int, TIntensityImage::ImageDimension);
56 
57  void SetIntensityImage(const TIntensityImage* image);
58  void SetVesselnessImage(const TVesselImage* image);
59 
60  itkGetConstMacro(FilterMode, FilterModeType);
61  itkGetConstMacro(Degree, double);
62  itkGetConstMacro(Threshold, double);
63  itkSetMacro(FilterMode, FilterModeType);
64  itkSetMacro(Degree, double);
65  itkSetMacro(Threshold, float);
66 
67 protected:
70 
71  typedef double InternalPixelType;
73  typedef itk::RescaleIntensityImageFilter< VesselImageType,
74  InternalImageType > VesselRescalerType;
75  typedef itk::RescaleIntensityImageFilter< IntensityImageType,
76  InternalImageType >InputRescalerType;
77  typedef itk::RescaleIntensityImageFilter< InternalImageType,
78  InternalImageType >InternalRescalerType;
79 // typedef itk::NormalizeImageFilter< InternalImageType,
80 // InternalImageType >NormalizerType;
81  typedef itk::CastImageFilter< InternalImageType, VesselImageType >
83  typedef itk::NormalizeImageFilter< IntensityImageType,
84  InternalImageType >NormalizerIntensityType;
85  typedef itk::NormalizeImageFilter< VesselImageType,
86  InternalImageType >NormalizerVesselType;
87 
88 
89  typename IntensityImageType::ConstPointer GetIntensityImage();
90  typename VesselImageType::ConstPointer GetVesselnessImage();
91 
93  virtual void GenerateData();
94 
95 private:
96  IntensityFilter(const Self &); //purposely not implemented
97  void operator=(const Self &); //purposely not implemented
98  void PrintSelf(std::ostream&os, Indent indent) const;
99 
100  FilterModeType m_FilterMode;
101  double m_Degree;
102  double m_Threshold;
103 };
104 } // namespace itk
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 #include "itkIntensityFilter.txx"
108 #endif
109 
110 #endif // ITKINTENSITYFILTER_H
ImageToImageFilter< TIntensityImage, TVesselImage > Superclass
Definition: itkIntensityFilter.h:35
itk::NormalizeImageFilter< IntensityImageType, InternalImageType > NormalizerIntensityType
Definition: itkIntensityFilter.h:84
itk::RescaleIntensityImageFilter< VesselImageType, InternalImageType > VesselRescalerType
Definition: itkIntensityFilter.h:74
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glew.h:4052
Image< InternalPixelType, ImageDimension > InternalImageType
Definition: itkIntensityFilter.h:72
IntensityFilter Self
Definition: itkIntensityFilter.h:34
Definition: niftkITKAffineResampleImage.cxx:74
itk::CastImageFilter< InternalImageType, VesselImageType > CastOutFilterType
Definition: itkIntensityFilter.h:82
TVesselImage VesselImageType
Definition: itkIntensityFilter.h:39
FilterModeType
Definition: itkIntensityFilter.h:42
itk::RescaleIntensityImageFilter< InternalImageType, InternalImageType > InternalRescalerType
Definition: itkIntensityFilter.h:78
IntensityImageType::PixelType OutputPixelType
Definition: itkIntensityFilter.h:40
~IntensityFilter()
Definition: itkIntensityFilter.h:69
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
TIntensityImage IntensityImageType
Definition: itkIntensityFilter.h:38
itk::RescaleIntensityImageFilter< IntensityImageType, InternalImageType > InputRescalerType
Definition: itkIntensityFilter.h:76
SmartPointer< Self > Pointer
Definition: itkIntensityFilter.h:36
itk::NormalizeImageFilter< VesselImageType, InternalImageType > NormalizerVesselType
Definition: itkIntensityFilter.h:86
double InternalPixelType
Definition: itkIntensityFilter.h:71
Definition: itkImageRegistrationFactory.h:84
Simultaneous itk::Image and itk::Array (and hence vnl_vector) class.
Definition: itkIntensityFilter.h:29
SmartPointer< const Self > ConstPointer
Definition: itkIntensityFilter.h:37