ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkLandmarkDisplacementFieldSource.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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:
50  public ImageSource< TOutputImage >
51 {
52 public:
53  ITK_DISALLOW_COPY_AND_ASSIGN(LandmarkDisplacementFieldSource);
54 
60 
61  using OutputImageType = TOutputImage;
62  using OutputImagePointer = typename OutputImageType::Pointer;
64 
66  itkNewMacro(Self);
67 
70 
72  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
73 
83  using LandmarkContainerPointer = typename LandmarkContainer::ConstPointer;
84 
87 
90 
92  using OutputPixelType = typename TOutputImage::PixelType;
93  using OutputPixelComponentType = typename OutputPixelType::ValueType;
94 
96  using SpacingType = typename TOutputImage::SpacingType;
99 
103  itkSetObjectMacro(KernelTransform, KernelTransformType);
104  itkGetModifiableObjectMacro(KernelTransform, KernelTransformType);
106 
108  itkSetMacro(OutputRegion, OutputImageRegionType);
109 
111  itkGetConstReferenceMacro(OutputRegion, OutputImageRegionType);
112 
114  itkSetMacro(OutputSpacing, SpacingType);
115  virtual void SetOutputSpacing(const double *values);
117 
119  itkGetConstReferenceMacro(OutputSpacing, SpacingType);
120 
122  itkSetMacro(OutputOrigin, OriginPointType);
123  virtual void SetOutputOrigin(const double *values);
125 
127  itkSetMacro(OutputDirection, DirectionType);
128  itkGetConstReferenceMacro(OutputDirection, DirectionType);
130 
132  itkGetConstReferenceMacro(OutputOrigin, OriginPointType);
133 
135  itkSetConstObjectMacro(SourceLandmarks, LandmarkContainer);
136  itkSetConstObjectMacro(TargetLandmarks, LandmarkContainer);
138 
144  void GenerateOutputInformation() override;
145 
147  ModifiedTimeType GetMTime() const override;
148 
149 protected:
151  ~LandmarkDisplacementFieldSource() override = default;
152  void PrintSelf(std::ostream & os, Indent indent) const override;
153 
158  void GenerateData() override;
159 
163  void PrepareKernelBaseSpline();
164 
165 private:
166  KernelTransformPointerType m_KernelTransform; // Coordinate transform to
167  // use
168 
169  OutputImageRegionType m_OutputRegion; // Region of the output
170  // image
171  SpacingType m_OutputSpacing; // output image spacing
172  OriginPointType m_OutputOrigin; // output image origin
173  DirectionType m_OutputDirection; // output image direction
174  // cosines
175 
176  LandmarkContainerPointer m_SourceLandmarks; // List of source landmarks
177  LandmarkContainerPointer m_TargetLandmarks; // List of target landmarks
178 };
179 } // end namespace itk
180 
181 #ifndef ITK_MANUAL_INSTANTIATION
182 #include "itkLandmarkDisplacementFieldSource.hxx"
183 #endif
184 
185 #endif
typename TOutputImage::DirectionType DirectionType
typename OutputPixelType::ValueType OutputPixelComponentType
typename KernelTransformType::PointSetType LandmarkPointSetType
typename OutputImageType::Pointer OutputImagePointer
typename OutputImageType::SizeType OutputSizeType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename KernelTransformType::Pointer KernelTransformPointerType
Base class for all process objects that output image data.
typename PointSetType::PointsContainer PointsContainer
Computes a displacement field from two sets of landmarks.
typename LandmarkPointSetType::PointType LandmarkPointType
typename OutputImageType::RegionType OutputImageRegionType
typename OutputImageType::IndexType OutputIndexType
TOutputImage OutputImageType
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:84
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:104
typename LandmarkContainer::ConstPointer LandmarkContainerPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename KernelTransformType::PointsContainer LandmarkContainer