ITK  4.8.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 >
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 
85  typedef typename OutputImageType::SizeType OutputSizeType;
86 
88  typedef typename OutputImageType::IndexType OutputIndexType;
89 
91  typedef typename TOutputImage::PixelType OutputPixelType;
92  typedef typename OutputPixelType::ValueType OutputPixelComponentType;
93 
95  typedef typename TOutputImage::SpacingType SpacingType;
96  typedef typename TOutputImage::PointType OriginPointType;
97  typedef typename TOutputImage::DirectionType DirectionType;
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() {}
151  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
152 
157  void GenerateData() ITK_OVERRIDE;
158 
163 
164 private:
165  LandmarkDisplacementFieldSource(const Self &); //purposely not implemented
166  void operator=(const Self &); //purposely not implemented
167 
168  KernelTransformPointerType m_KernelTransform; // Coordinate transform to
169  // use
170 
171  OutputImageRegionType m_OutputRegion; // Region of the output
172  // image
173  SpacingType m_OutputSpacing; // output image spacing
174  OriginPointType m_OutputOrigin; // output image origin
175  DirectionType m_OutputDirection; // output image direction
176  // cosines
177 
178  LandmarkContainerPointer m_SourceLandmarks; // List of source landmarks
179  LandmarkContainerPointer m_TargetLandmarks; // List of target landmarks
180 };
181 } // end namespace itk
182 
183 #ifndef ITK_MANUAL_INSTANTIATION
184 #include "itkLandmarkDisplacementFieldSource.hxx"
185 #endif
186 
187 #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.
virtual void SetOutputOrigin(OriginPointType _arg)
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
virtual void SetOutputSpacing(SpacingType _arg)
KernelTransformType::PointSetType LandmarkPointSetType
MeshTraits::PointType PointType
Definition: itkPointSet.h:106
OutputImageType::RegionType OutputImageRegionType
ModifiedTimeType GetMTime(void) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void GenerateOutputInformation() override