go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkTransformToSpatialJacobianSource.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright UMC Utrecht and contributors
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 __itkTransformToSpatialJacobianSource_h
19 #define __itkTransformToSpatialJacobianSource_h
20 
21 #include "itkAdvancedTransform.h"
22 #include "itkImageSource.h"
23 
24 namespace itk
25 {
26 
65 template< class TOutputImage,
66 class TTransformPrecisionType = double >
68  public ImageSource< TOutputImage >
69 {
70 public:
71 
76  typedef SmartPointer< const Self > ConstPointer;
77 
78  typedef TOutputImage OutputImageType;
79  typedef typename OutputImageType::Pointer OutputImagePointer;
80  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
81  typedef typename OutputImageType::RegionType OutputImageRegionType;
82 
84  itkNewMacro( Self );
85 
88 
90  itkStaticConstMacro( ImageDimension, unsigned int,
91  TOutputImage::ImageDimension );
92 
94  typedef AdvancedTransform< TTransformPrecisionType,
95  itkGetStaticConstMacro( ImageDimension ),
96  itkGetStaticConstMacro( ImageDimension ) > TransformType;
99 
101  typedef typename OutputImageType::PixelType PixelType;
102  //typedef typename PixelType::ValueType PixelValueType;
103  typedef typename OutputImageType::RegionType RegionType;
104  typedef typename RegionType::SizeType SizeType;
105  typedef typename OutputImageType::IndexType IndexType;
106  typedef typename OutputImageType::PointType PointType;
107  typedef typename OutputImageType::SpacingType SpacingType;
108  typedef typename OutputImageType::PointType OriginType;
109  typedef typename OutputImageType::DirectionType DirectionType;
110 
112  typedef ImageBase< itkGetStaticConstMacro( ImageDimension ) > ImageBaseType;
113 
121  itkSetConstObjectMacro( Transform, TransformType );
122 
124  itkGetConstObjectMacro( Transform, TransformType );
125 
127  virtual void SetOutputSize( const SizeType & size );
128 
130  virtual const SizeType & GetOutputSize();
131 
134  virtual void SetOutputIndex( const IndexType & index );
135 
137  virtual const IndexType & GetOutputIndex();
138 
140  itkSetMacro( OutputRegion, OutputImageRegionType );
141 
143  itkGetConstReferenceMacro( OutputRegion, OutputImageRegionType );
144 
146  itkSetMacro( OutputSpacing, SpacingType );
147  virtual void SetOutputSpacing( const double * values );
148 
150  itkGetConstReferenceMacro( OutputSpacing, SpacingType );
151 
153  itkSetMacro( OutputOrigin, OriginType );
154  virtual void SetOutputOrigin( const double * values );
155 
157  itkGetConstReferenceMacro( OutputOrigin, OriginType );
158 
160  itkSetMacro( OutputDirection, DirectionType );
161  itkGetConstReferenceMacro( OutputDirection, DirectionType );
162 
164  void SetOutputParametersFromImage( const ImageBaseType * image );
165 
167  virtual void GenerateOutputInformation( void );
168 
171  virtual void BeforeThreadedGenerateData( void );
172 
174  unsigned long GetMTime( void ) const;
175 
176 protected:
177 
180 
181  void PrintSelf( std::ostream & os, Indent indent ) const;
182 
187  const OutputImageRegionType & outputRegionForThread,
188  ThreadIdType threadId );
189 
194  const OutputImageRegionType & outputRegionForThread,
195  ThreadIdType threadId );
196 
200  void LinearGenerateData( void );
201 
202 private:
203 
204  TransformToSpatialJacobianSource( const Self & ); // purposely not implemented
205  void operator=( const Self & ); // purposely not implemented
206 
208  RegionType m_OutputRegion; // region of the output image
209  TransformPointerType m_Transform; // Coordinate transform to use
210  SpacingType m_OutputSpacing; // output image spacing
211  OriginType m_OutputOrigin; // output image origin
212  DirectionType m_OutputDirection; // output image direction cosines
213 
214 };
215 
216 } // end namespace itk
217 
218 #ifndef ITK_MANUAL_INSTANTIATION
219 #include "itkTransformToSpatialJacobianSource.hxx"
220 #endif
221 
222 #endif // end #ifndef __itkTransformToSpatialJacobianSource_h
TransformType::SpatialJacobianType SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension)
Generate the spatial Jacobian matrix from a coordinate transform.
void SetOutputParametersFromImage(const ImageBaseType *image)
SmartPointer< const Self > ConstPointer
unsigned long GetMTime(void) const
void PrintSelf(std::ostream &os, Indent indent) const
virtual void SetOutputSize(const SizeType &size)
virtual const IndexType & GetOutputIndex()
virtual void SetOutputOrigin(OriginType _arg)
Transform maps points, vectors and covariant vectors from an input space to an output space...
virtual void BeforeThreadedGenerateData(void)
AdvancedTransform< TTransformPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > TransformType
ImageBase< itkGetStaticConstMacro(ImageDimension) > ImageBaseType
void NonlinearThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
virtual const SizeType & GetOutputSize()
virtual void SetOutputIndex(const IndexType &index)
virtual void SetOutputSpacing(SpacingType _arg)
virtual void GenerateOutputInformation(void)


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo