NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkHighResRelaxStreamlinesFilter.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 itkHighResRelaxStreamlinesFilter_h
16 #define itkHighResRelaxStreamlinesFilter_h
17 
20 #include <itkVectorInterpolateImageFunction.h>
21 
22 namespace itk {
30 template < class TImageType, typename TScalarType, unsigned int NDimensions>
32  public LagrangianInitializedRelaxStreamlinesFilter< TImageType, TScalarType, NDimensions>
33 {
34 public:
35 
39  typedef SmartPointer<Self> Pointer;
40  typedef SmartPointer<const Self> ConstPointer;
41 
43  itkNewMacro(Self);
44 
47 
49  typedef typename Superclass::InputVectorImagePixelType InputVectorImagePixelType;
50  typedef typename Superclass::InputVectorImageType InputVectorImageType;
51  typedef typename Superclass::InputVectorImagePointer InputVectorImagePointer;
52  typedef typename Superclass::InputVectorImageConstPointer InputVectorImageConstPointer;
53  typedef typename Superclass::InputVectorImageIndexType InputVectorImageIndexType;
54  typedef typename Superclass::InputScalarImagePixelType InputScalarImagePixelType;
55  typedef typename Superclass::InputScalarImageType InputScalarImageType;
56  typedef typename Superclass::InputScalarImagePointType InputScalarImagePointType;
57  typedef typename Superclass::InputScalarImagePointer InputScalarImagePointer;
58  typedef typename Superclass::InputScalarImageIndexType InputScalarImageIndexType;
59  typedef typename Superclass::InputScalarImageConstPointer InputScalarImageConstPointer;
60  typedef typename Superclass::InputScalarImageRegionType InputScalarImageRegionType;
61  typedef typename Superclass::InputScalarImageSpacingType InputScalarImageSpacingType;
63  typedef typename InputScalarImageType::PointType InputScalarImageOriginType;
64  typedef typename Superclass::OutputImageType OutputImageType;
65  typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
66  typedef typename Superclass::OutputImagePointer OutputImagePointer;
67  typedef typename Superclass::OutputImageConstPointer OutputImageConstPointer;
68  typedef typename Superclass::OutputImageIndexType OutputImageIndexType;
69  typedef typename Superclass::OutputImageSpacingType OutputImageSpacingType;
72  typedef typename OutputImageType::DirectionType OutputImageDirectionType;
73  typedef typename OutputImageType::PointType OutputImageOriginType;
74  typedef typename Superclass::VectorInterpolatorType VectorInterpolatorType;
76  typedef typename Superclass::VectorInterpolatorPointType VectorInterpolatorPointType;
77  typedef typename Superclass::ScalarInterpolatorType ScalarInterpolatorType;
78  typedef typename Superclass::ScalarInterpolatorPointer ScalarInterpolatorPointer;
79  typedef typename Superclass::ScalarInterpolatorPointType ScalarInterpolatorPointType;
84  typedef ContinuousIndex<TScalarType, TImageType::ImageDimension> ContinuousIndexType;
85  typedef Point<TScalarType, TImageType::ImageDimension> PointType;
86 
88  void SetHighResLaplacianMap(MapType *map) { m_LaplacianMap = map; }
89 
91  itkSetMacro(VoxelMultiplicationFactor, int);
92  itkGetMacro(VoxelMultiplicationFactor, int);
93 
94 protected:
97  void PrintSelf(std::ostream& os, Indent indent) const;
98 
100  virtual void IntializeBoundaries(
101  InputScalarImageType* gmpvImage,
102  InputVectorImageType* vectorImage
103  );
104 
106  virtual void SolvePDE(
107  int boundaryNumber,
108  InputScalarImageSpacingType& virtualSpacing,
109  InputScalarImageType* scalarImage,
110  InputScalarImageType* gmpvImage,
111  InputVectorImageType* vectorImage
112  );
113 
114 private:
115 
119  HighResRelaxStreamlinesFilter(const Self&);
120  void operator=(const Self&);
121 
122  // The main filter method. Note, single threaded.
123  virtual void GenerateData();
124 
126  MapType *m_LaplacianMap;
127 
129  MapType* m_L0L1;
130 
132  int m_VoxelMultiplicationFactor;
133 
135  VectorInterpolatorPointer m_VectorInterpolator;
136 };
137 
138 } // end namespace
139 
140 #ifndef ITK_MANUAL_INSTANTIATION
141 #include "itkHighResRelaxStreamlinesFilter.txx"
142 #endif
143 
144 #endif
SmartPointer< Self > Pointer
Definition: itkHighResRelaxStreamlinesFilter.h:39
Superclass::ScalarInterpolatorPointer ScalarInterpolatorPointer
Definition: itkHighResRelaxStreamlinesFilter.h:78
Simple data type to hold a voxel value, and indexes that can be used to refer to other voxels...
Definition: itkFiniteDifferenceVoxel.h:32
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
ContinuousIndex< TScalarType, TImageType::ImageDimension > ContinuousIndexType
Definition: itkHighResRelaxStreamlinesFilter.h:84
HighResRelaxStreamlinesFilter Self
Definition: itkHighResRelaxStreamlinesFilter.h:37
Superclass::VectorInterpolatorPointer VectorInterpolatorPointer
Definition: itkHighResRelaxStreamlinesFilter.h:75
Superclass::InputScalarImageConstPointer InputScalarImageConstPointer
Definition: itkHighResRelaxStreamlinesFilter.h:59
std::map< unsigned long int, FiniteDifferenceVoxelType * > MapType
Definition: itkHighResLaplacianSolverImageFilter.h:82
InputScalarImageType::PointType InputScalarImageOriginType
Definition: itkHighResRelaxStreamlinesFilter.h:63
HighResLaplacianSolverImageFilter< TImageType, TScalarType >::IteratorType MapIteratorType
Definition: itkHighResRelaxStreamlinesFilter.h:81
HighResLaplacianSolverImageFilter< TImageType, TScalarType >::FiniteDifferenceVoxelType FiniteDifferenceVoxelType
Definition: itkHighResRelaxStreamlinesFilter.h:83
Superclass::InputVectorImageConstPointer InputVectorImageConstPointer
Definition: itkHighResRelaxStreamlinesFilter.h:52
Superclass::ScalarInterpolatorPointType ScalarInterpolatorPointType
Definition: itkHighResRelaxStreamlinesFilter.h:79
Definition: niftkITKAffineResampleImage.cxx:74
Superclass::VectorInterpolatorType VectorInterpolatorType
Definition: itkHighResRelaxStreamlinesFilter.h:74
Prototype high res version of RelaxStreamlines Filter.
Definition: itkHighResRelaxStreamlinesFilter.h:31
SmartPointer< const Self > ConstPointer
Definition: itkHighResRelaxStreamlinesFilter.h:40
HighResLaplacianSolverImageFilter< TImageType, TScalarType >::MapType MapType
Definition: itkHighResRelaxStreamlinesFilter.h:80
Superclass::OutputImageIndexType OutputImageIndexType
Definition: itkHighResRelaxStreamlinesFilter.h:68
Superclass::InputVectorImageIndexType InputVectorImageIndexType
Definition: itkHighResRelaxStreamlinesFilter.h:53
Superclass::InputScalarImagePointType InputScalarImagePointType
Definition: itkHighResRelaxStreamlinesFilter.h:56
HighResLaplacianSolverImageFilter< TImageType, TScalarType >::PairType MapPairType
Definition: itkHighResRelaxStreamlinesFilter.h:82
~HighResRelaxStreamlinesFilter()
Definition: itkHighResRelaxStreamlinesFilter.h:96
Superclass::OutputImagePixelType OutputImagePixelType
Definition: itkHighResRelaxStreamlinesFilter.h:65
LagrangianInitializedRelaxStreamlinesFilter< TImageType, TScalarType, NDimensions > Superclass
Definition: itkHighResRelaxStreamlinesFilter.h:38
Superclass::InputScalarImageIndexType InputScalarImageIndexType
Definition: itkHighResRelaxStreamlinesFilter.h:58
std::pair< unsigned long int, FiniteDifferenceVoxelType * > PairType
Definition: itkHighResLaplacianSolverImageFilter.h:83
Implements section 2.3.2 in Bourgeat et. al. ISBI 2008.
Definition: itkLagrangianInitializedRelaxStreamlinesFilter.h:45
Superclass::VectorInterpolatorPointType VectorInterpolatorPointType
Definition: itkHighResRelaxStreamlinesFilter.h:76
Calculates length between two boundaries, solving PDE by iterative relaxation.
Definition: itkRelaxStreamlinesFilter.h:46
InputScalarImageType::SizeType InputScalarImageSizeType
Definition: itkHighResRelaxStreamlinesFilter.h:62
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
Superclass::InputVectorImagePointer InputVectorImagePointer
Definition: itkHighResRelaxStreamlinesFilter.h:51
Point< TScalarType, TImageType::ImageDimension > PointType
Definition: itkHighResRelaxStreamlinesFilter.h:85
Superclass::InputScalarImagePixelType InputScalarImagePixelType
Definition: itkHighResRelaxStreamlinesFilter.h:54
Superclass::OutputImageType OutputImageType
Definition: itkHighResRelaxStreamlinesFilter.h:64
Superclass::InputVectorImageType InputVectorImageType
Definition: itkHighResRelaxStreamlinesFilter.h:50
Superclass::InputScalarImageType InputScalarImageType
Definition: itkHighResRelaxStreamlinesFilter.h:55
OutputImageType::DirectionType OutputImageDirectionType
Definition: itkHighResRelaxStreamlinesFilter.h:72
OutputImageType::PointType OutputImageOriginType
Definition: itkHighResRelaxStreamlinesFilter.h:73
Superclass::OutputImagePointer OutputImagePointer
Definition: itkHighResRelaxStreamlinesFilter.h:66
OutputImageType::RegionType OutputImageRegionType
Definition: itkHighResRelaxStreamlinesFilter.h:70
void SetHighResLaplacianMap(MapType *map)
Definition: itkHighResRelaxStreamlinesFilter.h:88
Superclass::InputScalarImagePointer InputScalarImagePointer
Definition: itkHighResRelaxStreamlinesFilter.h:57
MapType::const_iterator IteratorType
Definition: itkHighResLaplacianSolverImageFilter.h:84
Superclass::InputScalarImageSpacingType InputScalarImageSpacingType
Definition: itkHighResRelaxStreamlinesFilter.h:61
Superclass::InputScalarImageRegionType InputScalarImageRegionType
Definition: itkHighResRelaxStreamlinesFilter.h:60
Superclass::OutputImageConstPointer OutputImageConstPointer
Definition: itkHighResRelaxStreamlinesFilter.h:67
Superclass::VectorInterpolatorPointer VectorInterpolatorPointer
Definition: itkLagrangianInitializedRelaxStreamlinesFilter.h:85
Superclass::OutputImageSpacingType OutputImageSpacingType
Definition: itkHighResRelaxStreamlinesFilter.h:69
OutputImageType::SizeType OutputImageSizeType
Definition: itkHighResRelaxStreamlinesFilter.h:71
Superclass::InputVectorImagePixelType InputVectorImagePixelType
Definition: itkHighResRelaxStreamlinesFilter.h:46
Superclass::ScalarInterpolatorType ScalarInterpolatorType
Definition: itkHighResRelaxStreamlinesFilter.h:77