NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkLaplacianSolverImageFilter.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 itkLaplacianSolverImageFilter_h
16 #define itkLaplacianSolverImageFilter_h
17 
18 #include <itkImage.h>
19 #include "itkBaseCTEFilter.h"
20 
21 
22 namespace itk
23 {
48 template <class TInputImage, typename TScalarType=double>
49 class ITK_EXPORT LaplacianSolverImageFilter :
50  public BaseCTEFilter< TInputImage >
51 {
52 public:
56  typedef SmartPointer<Self> Pointer;
57  typedef SmartPointer<const Self> ConstPointer;
58 
61 
63  itkNewMacro(Self);
64 
67  typedef typename TInputImage::PixelType InputPixelType;
68  typedef InputPixelType OutputPixelType;
69 
71  typedef TInputImage InputImageType;
72  typedef typename InputImageType::Pointer InputImagePointer;
75  typedef typename OutputImageType::Pointer OutputImagePointer;
76  typedef typename OutputImageType::SpacingType OutputImageSpacing;
77 
79  void SetSegmentedImage(const InputImageType *image) {this->SetNthInput(0, const_cast<InputImageType *>(image)); }
80 
82  itkGetMacro(CurrentIteration, unsigned long int);
83  itkSetMacro(CurrentIteration, unsigned long int);
84 
86  itkSetMacro(LowVoltage, OutputPixelType);
87  itkGetMacro(LowVoltage, OutputPixelType);
88 
90  itkSetMacro(HighVoltage, OutputPixelType);
91  itkGetMacro(HighVoltage, OutputPixelType);
92 
94  itkSetMacro(EpsilonConvergenceThreshold, OutputPixelType);
95  itkGetMacro(EpsilonConvergenceThreshold, OutputPixelType);
96 
98  itkSetMacro(MaximumNumberOfIterations, unsigned long int );
99  itkGetMacro(MaximumNumberOfIterations, unsigned long int );
100 
102  itkSetMacro(UseGaussSeidel, bool);
103  itkGetMacro(UseGaussSeidel, bool);
104 
105 protected:
108 
110  virtual void PrintSelf(std::ostream&, Indent) const;
111 
112  // The main filter method. Note, single threaded.
113  virtual void GenerateData();
114 
115 private:
116  LaplacianSolverImageFilter(const Self&); //purposely not implemented
117  void operator=(const Self&); //purposely not implemented
118 
120  OutputPixelType m_LowVoltage;
121 
123  OutputPixelType m_HighVoltage;
124 
126  OutputPixelType m_EpsilonConvergenceThreshold;
127 
129  unsigned long int m_MaximumNumberOfIterations;
130 
132  unsigned long int m_CurrentIteration;
133 
135  bool m_UseGaussSeidel;
136 
137 };
138 
139 } // end namespace itk
140 
141 #ifndef ITK_MANUAL_INSTANTIATION
142 #include "itkLaplacianSolverImageFilter.txx"
143 #endif
144 
145 #endif
SmartPointer< const Self > ConstPointer
Definition: itkLaplacianSolverImageFilter.h:57
InputImageType::IndexType InputImageIndexType
Definition: itkLaplacianSolverImageFilter.h:73
virtual ~LaplacianSolverImageFilter()
Definition: itkLaplacianSolverImageFilter.h:107
TInputImage::PixelType InputPixelType
Definition: itkLaplacianSolverImageFilter.h:63
SmartPointer< Self > Pointer
Definition: itkLaplacianSolverImageFilter.h:56
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glew.h:4052
Definition: niftkITKAffineResampleImage.cxx:74
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
OutputImageType::Pointer OutputImagePointer
Definition: itkLaplacianSolverImageFilter.h:75
BaseCTEFilter< TInputImage > Superclass
Definition: itkLaplacianSolverImageFilter.h:55
TInputImage InputImageType
Definition: itkLaplacianSolverImageFilter.h:71
Base class for methods many CTE filters will need.
Definition: itkBaseCTEFilter.h:36
InputPixelType OutputPixelType
Definition: itkLaplacianSolverImageFilter.h:68
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
void SetSegmentedImage(const InputImageType *image)
Definition: itkLaplacianSolverImageFilter.h:79
LaplacianSolverImageFilter Self
Definition: itkLaplacianSolverImageFilter.h:54
InputImageType::Pointer InputImagePointer
Definition: itkLaplacianSolverImageFilter.h:72
Simultaneous itk::Image and itk::Array (and hence vnl_vector) class.
Image< OutputPixelType, TInputImage::ImageDimension > OutputImageType
Definition: itkLaplacianSolverImageFilter.h:74
OutputImageType::SpacingType OutputImageSpacing
Definition: itkLaplacianSolverImageFilter.h:76
Solves Laplace equation over the cortical volume.
Definition: itkLaplacianSolverImageFilter.h:49