ITK  5.4.0
Insight Toolkit
itkLandmarkDisplacementFieldSource.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkLandmarkDisplacementFieldSource_h
19 #define itkLandmarkDisplacementFieldSource_h
20 
21 #include "itkImageSource.h"
22 #include "itkKernelTransform.h"
24 
25 namespace itk
26 {
48 template <typename TOutputImage>
49 class ITK_TEMPLATE_EXPORT LandmarkDisplacementFieldSource : public ImageSource<TOutputImage>
50 {
51 public:
52  ITK_DISALLOW_COPY_AND_MOVE(LandmarkDisplacementFieldSource);
53 
59 
60  using OutputImageType = TOutputImage;
63 
65  itkNewMacro(Self);
66 
68  itkOverrideGetNameOfClassMacro(LandmarkDisplacementFieldSource);
69 
71  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
72 
83 
86 
89 
91  using OutputPixelType = typename TOutputImage::PixelType;
92  using OutputPixelComponentType = typename OutputPixelType::ValueType;
93 
95  using SpacingType = typename TOutputImage::SpacingType;
98 
102  itkSetObjectMacro(KernelTransform, KernelTransformType);
103  itkGetModifiableObjectMacro(KernelTransform, KernelTransformType);
107  itkSetMacro(OutputRegion, OutputImageRegionType);
108  itkGetConstReferenceMacro(OutputRegion, OutputImageRegionType);
112  itkSetMacro(OutputSpacing, SpacingType);
113  virtual void
114  SetOutputSpacing(const double * spacing);
118  itkGetConstReferenceMacro(OutputSpacing, SpacingType);
119 
121  itkSetMacro(OutputOrigin, OriginPointType);
122  virtual void
123  SetOutputOrigin(const double * origin);
127  itkSetMacro(OutputDirection, DirectionType);
128  itkGetConstReferenceMacro(OutputDirection, DirectionType);
132  itkGetConstReferenceMacro(OutputOrigin, OriginPointType);
133 
135  itkSetConstObjectMacro(SourceLandmarks, LandmarkContainer);
136 
138  itkSetConstObjectMacro(TargetLandmarks, LandmarkContainer);
139 
145  void
146  GenerateOutputInformation() override;
147 
150  GetMTime() const override;
151 
152 protected:
154  ~LandmarkDisplacementFieldSource() override = default;
155  void
156  PrintSelf(std::ostream & os, Indent indent) const override;
157 
160  void
161  GenerateData() override;
162 
165  void
166  PrepareKernelBaseSpline();
167 
168 private:
170  KernelTransformPointerType m_KernelTransform{};
171 
173  OutputImageRegionType m_OutputRegion{};
174 
175  SpacingType m_OutputSpacing{};
176  OriginPointType m_OutputOrigin{};
177  DirectionType m_OutputDirection{};
178 
179  LandmarkContainerPointer m_SourceLandmarks{};
180  LandmarkContainerPointer m_TargetLandmarks{};
181 };
182 
183 } // end namespace itk
184 
185 #ifndef ITK_MANUAL_INSTANTIATION
186 # include "itkLandmarkDisplacementFieldSource.hxx"
187 #endif
188 
189 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::LandmarkDisplacementFieldSource::KernelTransformPointerType
typename KernelTransformType::Pointer KernelTransformPointerType
Definition: itkLandmarkDisplacementFieldSource.h:80
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::LandmarkDisplacementFieldSource::OutputSizeType
typename OutputImageType::SizeType OutputSizeType
Definition: itkLandmarkDisplacementFieldSource.h:85
itk::GTest::TypedefsAndConstructors::Dimension2::DirectionType
ImageBaseType::DirectionType DirectionType
Definition: itkGTestTypedefsAndConstructors.h:52
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::PointSet
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:82
itkImageSource.h
itk::ModifiedTimeType
SizeValueType ModifiedTimeType
Definition: itkIntTypes.h:102
itk::LandmarkDisplacementFieldSource::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkLandmarkDisplacementFieldSource.h:91
itk::LandmarkDisplacementFieldSource::DirectionType
typename TOutputImage::DirectionType DirectionType
Definition: itkLandmarkDisplacementFieldSource.h:97
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::LandmarkDisplacementFieldSource::LandmarkContainerPointer
typename LandmarkContainer::ConstPointer LandmarkContainerPointer
Definition: itkLandmarkDisplacementFieldSource.h:82
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkImageRegionIteratorWithIndex.h
itkKernelTransform.h
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::LandmarkDisplacementFieldSource::LandmarkPointSetType
typename KernelTransformType::PointSetType LandmarkPointSetType
Definition: itkLandmarkDisplacementFieldSource.h:78
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::LandmarkDisplacementFieldSource::SpacingType
typename TOutputImage::SpacingType SpacingType
Definition: itkLandmarkDisplacementFieldSource.h:95
itk::LandmarkDisplacementFieldSource::OutputPixelComponentType
typename OutputPixelType::ValueType OutputPixelComponentType
Definition: itkLandmarkDisplacementFieldSource.h:92
itk::LandmarkDisplacementFieldSource::OriginPointType
typename TOutputImage::PointType OriginPointType
Definition: itkLandmarkDisplacementFieldSource.h:96
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::LandmarkDisplacementFieldSource::LandmarkPointType
typename LandmarkPointSetType::PointType LandmarkPointType
Definition: itkLandmarkDisplacementFieldSource.h:79
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::LandmarkDisplacementFieldSource::OutputIndexType
typename OutputImageType::IndexType OutputIndexType
Definition: itkLandmarkDisplacementFieldSource.h:88
itk::LandmarkDisplacementFieldSource::LandmarkContainer
typename KernelTransformType::PointsContainer LandmarkContainer
Definition: itkLandmarkDisplacementFieldSource.h:81
itk::KernelTransform
Definition: itkKernelTransform.h:61
itk::KernelTransform::PointsContainer
typename PointSetType::PointsContainer PointsContainer
Definition: itkKernelTransform.h:122
itk::LandmarkDisplacementFieldSource
Computes a displacement field from two sets of landmarks.
Definition: itkLandmarkDisplacementFieldSource.h:49
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90