ITK  4.13.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:
58 
59  typedef TOutputImage OutputImageType;
60  typedef typename OutputImageType::Pointer OutputImagePointer;
61  typedef typename OutputImageType::RegionType OutputImageRegionType;
62 
64  itkNewMacro(Self);
65 
68 
70  itkStaticConstMacro(ImageDimension, unsigned int,
71  TOutputImage::ImageDimension);
72 
82  typedef typename LandmarkContainer::ConstPointer LandmarkContainerPointer;
83 
86 
89 
91  typedef typename TOutputImage::PixelType OutputPixelType;
92  typedef typename OutputPixelType::ValueType OutputPixelComponentType;
93 
95  typedef typename TOutputImage::SpacingType SpacingType;
98 
102  itkSetObjectMacro(KernelTransform, KernelTransformType);
103  itkGetModifiableObjectMacro(KernelTransform, KernelTransformType);
105 
107  itkSetMacro(OutputRegion, OutputImageRegionType);
108 
110  itkGetConstReferenceMacro(OutputRegion, OutputImageRegionType);
111 
113  itkSetMacro(OutputSpacing, SpacingType);
114  virtual void SetOutputSpacing(const double *values);
116 
118  itkGetConstReferenceMacro(OutputSpacing, SpacingType);
119 
121  itkSetMacro(OutputOrigin, OriginPointType);
122  virtual void SetOutputOrigin(const double *values);
124 
126  itkSetMacro(OutputDirection, DirectionType);
127  itkGetConstReferenceMacro(OutputDirection, DirectionType);
129 
131  itkGetConstReferenceMacro(OutputOrigin, OriginPointType);
132 
134  itkSetConstObjectMacro(SourceLandmarks, LandmarkContainer);
135  itkSetConstObjectMacro(TargetLandmarks, LandmarkContainer);
137 
143  virtual void GenerateOutputInformation() ITK_OVERRIDE;
144 
146  ModifiedTimeType GetMTime(void) const ITK_OVERRIDE;
147 
148 protected:
150  ~LandmarkDisplacementFieldSource() ITK_OVERRIDE {}
151  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
152 
157  void GenerateData() ITK_OVERRIDE;
158 
162  void PrepareKernelBaseSpline();
163 
164 private:
165  ITK_DISALLOW_COPY_AND_ASSIGN(LandmarkDisplacementFieldSource);
166 
167  KernelTransformPointerType m_KernelTransform; // Coordinate transform to
168  // use
169 
170  OutputImageRegionType m_OutputRegion; // Region of the output
171  // image
172  SpacingType m_OutputSpacing; // output image spacing
173  OriginPointType m_OutputOrigin; // output image origin
174  DirectionType m_OutputDirection; // output image direction
175  // cosines
176 
177  LandmarkContainerPointer m_SourceLandmarks; // List of source landmarks
178  LandmarkContainerPointer m_TargetLandmarks; // List of target landmarks
179 };
180 } // end namespace itk
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
183 #include "itkLandmarkDisplacementFieldSource.hxx"
184 #endif
185 
186 #endif
KernelTransformType::PointsContainer LandmarkContainer
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
KernelTransform< double, itkGetStaticConstMacro(ImageDimension) > KernelTransformType
PointSetType::PointsContainer PointsContainer
Base class for all process objects that output image data.
LandmarkContainer::ConstPointer LandmarkContainerPointer
Computes a displacement field from two sets of landmarks.
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:84
KernelTransformType::PointSetType LandmarkPointSetType
MeshTraits::PointType PointType
Definition: itkPointSet.h:106
OutputImageType::RegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49