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 
31 #ifndef __itkTransformToDeterminantOfSpatialJacobianSource_h
32 #define __itkTransformToDeterminantOfSpatialJacobianSource_h
33 
34 #include "itkAdvancedTransform.h"
35 #include "itkImageSource.h"
36 
37 namespace itk
38 {
39 
70 template <class TOutputImage,
71 class TTransformPrecisionType=double>
73  public ImageSource<TOutputImage>
74 {
75 public:
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:
183 
184  void PrintSelf( std::ostream& os, Indent indent ) const;
185 
189  void ThreadedGenerateData(
190  const OutputImageRegionType & outputRegionForThread,
191  int threadId );
192 
196  void NonlinearThreadedGenerateData(
197  const OutputImageRegionType& outputRegionForThread,
198  int threadId );
199 
202  void LinearGenerateData( void );
203 
204 private:
205 
206  TransformToDeterminantOfSpatialJacobianSource( const Self& ); //purposely not implemented
207  void operator=( const Self& ); //purposely not implemented
208 
210  RegionType m_OutputRegion; // region of the output image
211  TransformPointerType m_Transform; // Coordinate transform to use
212  SpacingType m_OutputSpacing; // output image spacing
213  OriginType m_OutputOrigin; // output image origin
214  DirectionType m_OutputDirection; // output image direction cosines
215 
216 }; // end class TransformToDeterminantOfSpatialJacobianSource
217 
218 } // end namespace itk
219 
220 #ifndef ITK_MANUAL_INSTANTIATION
221 #include "itkTransformToDeterminantOfSpatialJacobianSource.txx"
222 #endif
223 
224 #endif // end #ifndef __itkTransformToDeterminantOfSpatialJacobianSource_h


Generated on 27-06-2013 for elastix by doxygen 1.8.3.1 elastix logo