go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkTransformToDeterminantOfSpatialJacobianSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkTransformToDeterminantOfSpatialJacobianSource.h,v $
5  Language: C++
6  Date: $Date: 2008-08-01 13:42:00 $
7  Version: $Revision: 1.3 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 /*======================================================================
18 
19 This file is part of the elastix software.
20 
21 Copyright (c) University Medical Center Utrecht. All rights reserved.
22 See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
23 details.
24 
25 This software is distributed WITHOUT ANY WARRANTY; without even
26 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
27 PURPOSE. See the above copyright notices for more information.
28 
29 ======================================================================*/
30 #ifndef __itkTransformToDeterminantOfSpatialJacobianSource_h
31 #define __itkTransformToDeterminantOfSpatialJacobianSource_h
32 
33 #include "itkAdvancedTransform.h"
34 #include "itkImageSource.h"
35 
36 namespace itk
37 {
38 
69 template< class TOutputImage,
70 class TTransformPrecisionType = double >
72  public ImageSource< TOutputImage >
73 {
74 public:
75 
79  typedef SmartPointer< Self > Pointer;
80  typedef SmartPointer< const Self > ConstPointer;
81 
82  typedef TOutputImage OutputImageType;
83  typedef typename OutputImageType::Pointer OutputImagePointer;
84  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
85  typedef typename OutputImageType::RegionType OutputImageRegionType;
86 
88  itkNewMacro( Self );
89 
92 
94  itkStaticConstMacro( ImageDimension, unsigned int,
95  TOutputImage::ImageDimension );
96 
98  typedef AdvancedTransform< TTransformPrecisionType,
99  itkGetStaticConstMacro( ImageDimension ),
100  itkGetStaticConstMacro( ImageDimension ) > TransformType;
103 
105  typedef typename OutputImageType::PixelType PixelType;
106  //typedef typename PixelType::ValueType PixelValueType;
107  typedef typename OutputImageType::RegionType RegionType;
108  typedef typename RegionType::SizeType SizeType;
109  typedef typename OutputImageType::IndexType IndexType;
110  typedef typename OutputImageType::PointType PointType;
111  typedef typename OutputImageType::SpacingType SpacingType;
112  typedef typename OutputImageType::PointType OriginType;
113  typedef typename OutputImageType::DirectionType DirectionType;
114 
116  typedef ImageBase< itkGetStaticConstMacro( ImageDimension ) > ImageBaseType;
117 
125  itkSetConstObjectMacro( Transform, TransformType );
126 
128  itkGetConstObjectMacro( Transform, TransformType );
129 
131  virtual void SetOutputSize( const SizeType & size );
132 
134  virtual const SizeType & GetOutputSize();
135 
138  virtual void SetOutputIndex( const IndexType & index );
139 
141  virtual const IndexType & GetOutputIndex();
142 
144  itkSetMacro( OutputRegion, OutputImageRegionType );
145 
147  itkGetConstReferenceMacro( OutputRegion, OutputImageRegionType );
148 
150  itkSetMacro( OutputSpacing, SpacingType );
151  virtual void SetOutputSpacing( const double * values );
152 
154  itkGetConstReferenceMacro( OutputSpacing, SpacingType );
155 
157  itkSetMacro( OutputOrigin, OriginType );
158  virtual void SetOutputOrigin( const double * values );
159 
161  itkGetConstReferenceMacro( OutputOrigin, OriginType );
162 
164  itkSetMacro( OutputDirection, DirectionType );
165  itkGetConstReferenceMacro( OutputDirection, DirectionType );
166 
168  void SetOutputParametersFromImage( const ImageBaseType * image );
169 
171  virtual void GenerateOutputInformation( void );
172 
175  virtual void BeforeThreadedGenerateData( void );
176 
178  unsigned long GetMTime( void ) const;
179 
180 protected:
181 
184 
185  void PrintSelf( std::ostream & os, Indent indent ) const;
186 
191  const OutputImageRegionType & outputRegionForThread,
192  ThreadIdType threadId );
193 
198  const OutputImageRegionType & outputRegionForThread,
199  ThreadIdType threadId );
200 
203  void LinearGenerateData( void );
204 
205 private:
206 
207  TransformToDeterminantOfSpatialJacobianSource( const Self & ); // purposely not implemented
208  void operator=( const Self & ); // purposely not implemented
209 
211  RegionType m_OutputRegion; // region of the output image
212  TransformPointerType m_Transform; // Coordinate transform to use
213  SpacingType m_OutputSpacing; // output image spacing
214  OriginType m_OutputOrigin; // output image origin
215  DirectionType m_OutputDirection; // output image direction cosines
216 
217 };
218 
219 } // end namespace itk
220 
221 #ifndef ITK_MANUAL_INSTANTIATION
222 #include "itkTransformToDeterminantOfSpatialJacobianSource.hxx"
223 #endif
224 
225 #endif // end #ifndef __itkTransformToDeterminantOfSpatialJacobianSource_h
virtual void SetOutputSpacing(SpacingType _arg)
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
void NonlinearThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
virtual void SetOutputSize(const SizeType &size)
void PrintSelf(std::ostream &os, Indent indent) const
itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension)
virtual void SetOutputOrigin(OriginType _arg)
AdvancedTransform< TTransformPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > TransformType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
SmartPointer< const Self > ConstPointer
Transform maps points, vectors and covariant vectors from an input space to an output space...
Generate the spatial Jacobian from a coordinate transform.
void SetOutputParametersFromImage(const ImageBaseType *image)
virtual void SetOutputIndex(const IndexType &index)


Generated on 11-03-2014 for elastix by doxygen 1.8.6 elastix logo