NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkVectorVPlusLambdaUImageFilter.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 itkVectorVPlusLambdaUImageFilter_h
16 #define itkVectorVPlusLambdaUImageFilter_h
17 
18 #include <itkVector.h>
19 #include <itkImage.h>
20 #include <itkImageToImageFilter.h>
21 
22 namespace itk {
34 template < typename TScalarType, unsigned int NDimensions = 3>
35 class ITK_EXPORT VectorVPlusLambdaUImageFilter :
36 public ImageToImageFilter<
37  Image< Vector<TScalarType, NDimensions>, NDimensions>, // Input images
38  Image< Vector<TScalarType, NDimensions>, NDimensions> // Output image
39  >
40 {
41  public:
42 
45  typedef ImageToImageFilter<Image< Vector<TScalarType, NDimensions>, NDimensions>,
48  typedef SmartPointer<Self> Pointer;
49  typedef SmartPointer<const Self> ConstPointer;
50 
52  typedef Vector< TScalarType, NDimensions > InputPixelType;
56  typedef InputPixelType OutputPixelType;
57  typedef InputImageType OutputImageType;
58 
60  itkNewMacro(Self);
61 
63  itkTypeMacro(VectorVPlusLambdaUImageFilter, ImageToImageFilter);
64 
66  itkStaticConstMacro(Dimension, unsigned int, NDimensions);
67 
69  itkSetMacro(Lambda, double);
70  itkGetMacro(Lambda, double);
71 
73  itkSetMacro(IgnoreInputV, bool);
74  itkGetMacro(IgnoreInputV, bool);
75 
77  itkSetMacro(SubtractSteps, bool);
78  itkGetMacro(SubtractSteps, bool);
79 
80  protected:
83  void PrintSelf(std::ostream& os, Indent indent) const;
84 
85  // Check before we start.
86  virtual void BeforeThreadedGenerateData();
87 
88  // The main method to implement in derived classes, note, its threaded.
89  virtual void ThreadedGenerateData( const InputImageRegionType &outputRegionForThread, ThreadIdType threadId);
90 
91  private:
92 
96  VectorVPlusLambdaUImageFilter(const Self&);
97  void operator=(const Self&);
98 
100  bool m_IgnoreInputV;
101 
103  bool m_SubtractSteps;
104 
106  double m_Lambda;
107 
108 }; // end class
109 
110 } // end namespace
111 
112 #ifndef ITK_MANUAL_INSTANTIATION
113 #include "itkVectorVPlusLambdaUImageFilter.txx"
114 #endif
115 
116 #endif
SmartPointer< Self > Pointer
Definition: itkVectorVPlusLambdaUImageFilter.h:48
Image< InputPixelType, NDimensions > InputImageType
Definition: itkVectorVPlusLambdaUImageFilter.h:53
Vector< TScalarType, NDimensions > InputPixelType
Definition: itkVectorVPlusLambdaUImageFilter.h:52
~VectorVPlusLambdaUImageFilter()
Definition: itkVectorVPlusLambdaUImageFilter.h:82
Definition: niftkITKAffineResampleImage.cxx:74
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
SmartPointer< const Self > ConstPointer
Definition: itkVectorVPlusLambdaUImageFilter.h:49
VectorVPlusLambdaUImageFilter Self
Definition: itkVectorVPlusLambdaUImageFilter.h:44
InputPixelType OutputPixelType
Definition: itkVectorVPlusLambdaUImageFilter.h:56
ImageToImageFilter< Image< Vector< TScalarType, NDimensions >, NDimensions >, Image< Vector< TScalarType, NDimensions >, NDimensions > > Superclass
Definition: itkVectorVPlusLambdaUImageFilter.h:47
InputImageType OutputImageType
Definition: itkVectorVPlusLambdaUImageFilter.h:57
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
InputImageType::RegionType InputImageRegionType
Definition: itkVectorVPlusLambdaUImageFilter.h:55
InputImageType::IndexType InputImageIndexType
Definition: itkVectorVPlusLambdaUImageFilter.h:54
Simultaneous itk::Image and itk::Array (and hence vnl_vector) class.
const unsigned int Dimension
Definition: niftkBreastDCEandADC.cxx:89
This class takes two vector images as input (V and U), and calculates V + (lambda * U)...
Definition: itkVectorVPlusLambdaUImageFilter.h:35