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  * 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 /*=========================================================================
19 
20  Program: Insight Segmentation & Registration Toolkit
21  Module: $RCSfile: itkTransformToDeterminantOfSpatialJacobianSource.h,v $
22  Language: C++
23  Date: $Date: 2008-08-01 13:42:00 $
24  Version: $Revision: 1.3 $
25 
26  Copyright (c) Insight Software Consortium. All rights reserved.
27  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
28 
29  This software is distributed WITHOUT ANY WARRANTY; without even
30  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
31  PURPOSE. See the above copyright notices for more information.
32 
33 =========================================================================*/
34 #ifndef __itkTransformToDeterminantOfSpatialJacobianSource_h
35 #define __itkTransformToDeterminantOfSpatialJacobianSource_h
36 
37 #include "itkAdvancedTransform.h"
38 #include "itkImageSource.h"
39 
40 namespace itk
41 {
42 
73 template< class TOutputImage,
74 class TTransformPrecisionType = double >
76  public ImageSource< TOutputImage >
77 {
78 public:
79 
82  typedef ImageSource< TOutputImage > Superclass;
84  typedef SmartPointer< const Self > ConstPointer;
85 
86  typedef TOutputImage OutputImageType;
87  typedef typename OutputImageType::Pointer OutputImagePointer;
88  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
89  typedef typename OutputImageType::RegionType OutputImageRegionType;
90 
92  itkNewMacro( Self );
93 
95  itkTypeMacro( TransformToDeterminantOfSpatialJacobianSource, ImageSource );
96 
98  itkStaticConstMacro( ImageDimension, unsigned int,
99  TOutputImage::ImageDimension );
100 
102  typedef AdvancedTransform< TTransformPrecisionType,
103  itkGetStaticConstMacro( ImageDimension ),
104  itkGetStaticConstMacro( ImageDimension ) > TransformType;
107 
109  typedef typename OutputImageType::PixelType PixelType;
110  //typedef typename PixelType::ValueType PixelValueType;
111  typedef typename OutputImageType::RegionType RegionType;
112  typedef typename RegionType::SizeType SizeType;
113  typedef typename OutputImageType::IndexType IndexType;
114  typedef typename OutputImageType::PointType PointType;
115  typedef typename OutputImageType::SpacingType SpacingType;
116  typedef typename OutputImageType::PointType OriginType;
117  typedef typename OutputImageType::DirectionType DirectionType;
118 
120  typedef ImageBase< itkGetStaticConstMacro( ImageDimension ) > ImageBaseType;
121 
129  itkSetConstObjectMacro( Transform, TransformType );
130 
132  itkGetConstObjectMacro( Transform, TransformType );
133 
135  virtual void SetOutputSize( const SizeType & size );
136 
138  virtual const SizeType & GetOutputSize();
139 
142  virtual void SetOutputIndex( const IndexType & index );
143 
145  virtual const IndexType & GetOutputIndex();
146 
148  itkSetMacro( OutputRegion, OutputImageRegionType );
149 
151  itkGetConstReferenceMacro( OutputRegion, OutputImageRegionType );
152 
154  itkSetMacro( OutputSpacing, SpacingType );
155  virtual void SetOutputSpacing( const double * values );
156 
158  itkGetConstReferenceMacro( OutputSpacing, SpacingType );
159 
161  itkSetMacro( OutputOrigin, OriginType );
162  virtual void SetOutputOrigin( const double * values );
163 
165  itkGetConstReferenceMacro( OutputOrigin, OriginType );
166 
168  itkSetMacro( OutputDirection, DirectionType );
169  itkGetConstReferenceMacro( OutputDirection, DirectionType );
170 
173 
175  virtual void GenerateOutputInformation( void );
176 
179  virtual void BeforeThreadedGenerateData( void );
180 
182  unsigned long GetMTime( void ) const;
183 
184 protected:
185 
188 
189  void PrintSelf( std::ostream & os, Indent indent ) const;
190 
195  const OutputImageRegionType & outputRegionForThread,
196  ThreadIdType threadId );
197 
202  const OutputImageRegionType & outputRegionForThread,
203  ThreadIdType threadId );
204 
207  void LinearGenerateData( void );
208 
209 private:
210 
211  TransformToDeterminantOfSpatialJacobianSource( const Self & ); // purposely not implemented
212  void operator=( const Self & ); // purposely not implemented
213 
215  RegionType m_OutputRegion; // region of the output image
216  TransformPointerType m_Transform; // Coordinate transform to use
217  SpacingType m_OutputSpacing; // output image spacing
218  OriginType m_OutputOrigin; // output image origin
219  DirectionType m_OutputDirection; // output image direction cosines
220 
221 };
222 
223 } // end namespace itk
224 
225 #ifndef ITK_MANUAL_INSTANTIATION
226 #include "itkTransformToDeterminantOfSpatialJacobianSource.hxx"
227 #endif
228 
229 #endif // end #ifndef __itkTransformToDeterminantOfSpatialJacobianSource_h
itk::AdvancedTransform::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Definition: itkAdvancedTransform.h:143
itk::TransformToDeterminantOfSpatialJacobianSource::~TransformToDeterminantOfSpatialJacobianSource
~TransformToDeterminantOfSpatialJacobianSource()
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:187
itkAdvancedTransform.h
itk::TransformToDeterminantOfSpatialJacobianSource::m_Transform
TransformPointerType m_Transform
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:216
SmartPointer< Self >
itk::TransformToDeterminantOfSpatialJacobianSource::itkStaticConstMacro
itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension)
itk::TransformToDeterminantOfSpatialJacobianSource::SetOutputParametersFromImage
void SetOutputParametersFromImage(const ImageBaseType *image)
itk::TransformToDeterminantOfSpatialJacobianSource::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:84
itk::TransformToDeterminantOfSpatialJacobianSource::SetOutputOrigin
virtual void SetOutputOrigin(const double *values)
itk::TransformToDeterminantOfSpatialJacobianSource::GetOutputIndex
virtual const IndexType & GetOutputIndex()
itk::TransformToDeterminantOfSpatialJacobianSource::DirectionType
OutputImageType::DirectionType DirectionType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:117
itk::TransformToDeterminantOfSpatialJacobianSource::m_OutputDirection
DirectionType m_OutputDirection
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:219
itk::TransformToDeterminantOfSpatialJacobianSource::PointType
OutputImageType::PointType PointType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:114
itk::TransformToDeterminantOfSpatialJacobianSource::PixelType
OutputImageType::PixelType PixelType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:109
itk::TransformToDeterminantOfSpatialJacobianSource::SpacingType
OutputImageType::SpacingType SpacingType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:115
itk::TransformToDeterminantOfSpatialJacobianSource::SetOutputSpacing
virtual void SetOutputSpacing(const double *values)
itk::TransformToDeterminantOfSpatialJacobianSource::m_OutputRegion
RegionType m_OutputRegion
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:215
itk::TransformToDeterminantOfSpatialJacobianSource::SizeType
RegionType::SizeType SizeType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:112
itk::TransformToDeterminantOfSpatialJacobianSource
Generate the spatial Jacobian from a coordinate transform.
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:77
itk::TransformToDeterminantOfSpatialJacobianSource::IndexType
OutputImageType::IndexType IndexType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:113
itk::TransformToDeterminantOfSpatialJacobianSource::SpatialJacobianType
TransformType::SpatialJacobianType SpatialJacobianType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:106
itk::AdvancedTransform
Transform maps points, vectors and covariant vectors from an input space to an output space.
Definition: itkAdvancedTransform.h:87
itk::TransformToDeterminantOfSpatialJacobianSource::TransformType
AdvancedTransform< TTransformPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > TransformType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:104
itk::TransformToDeterminantOfSpatialJacobianSource::TransformToDeterminantOfSpatialJacobianSource
TransformToDeterminantOfSpatialJacobianSource()
itk::TransformToDeterminantOfSpatialJacobianSource::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const
ThreadIdType
itk::TransformToDeterminantOfSpatialJacobianSource::ImageBaseType
ImageBase< itkGetStaticConstMacro(ImageDimension) > ImageBaseType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:120
itk::TransformToDeterminantOfSpatialJacobianSource::OutputImagePointer
OutputImageType::Pointer OutputImagePointer
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:87
itk::TransformToDeterminantOfSpatialJacobianSource::GenerateOutputInformation
virtual void GenerateOutputInformation(void)
itk::TransformToDeterminantOfSpatialJacobianSource::OutputImageConstPointer
OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:88
itk::TransformToDeterminantOfSpatialJacobianSource::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:89
itk::TransformToDeterminantOfSpatialJacobianSource::TransformPointerType
TransformType::ConstPointer TransformPointerType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:105
itk::TransformToDeterminantOfSpatialJacobianSource::BeforeThreadedGenerateData
virtual void BeforeThreadedGenerateData(void)
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::TransformToDeterminantOfSpatialJacobianSource::SetOutputIndex
virtual void SetOutputIndex(const IndexType &index)
itk::TransformToDeterminantOfSpatialJacobianSource::TransformToDeterminantOfSpatialJacobianSource
TransformToDeterminantOfSpatialJacobianSource(const Self &)
itk::TransformToDeterminantOfSpatialJacobianSource::m_OutputSpacing
SpacingType m_OutputSpacing
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:217
itk::TransformToDeterminantOfSpatialJacobianSource::NonlinearThreadedGenerateData
void NonlinearThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
itk::TransformToDeterminantOfSpatialJacobianSource::RegionType
OutputImageType::RegionType RegionType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:111
itk::TransformToDeterminantOfSpatialJacobianSource::Superclass
ImageSource< TOutputImage > Superclass
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:82
itk::TransformToDeterminantOfSpatialJacobianSource::GetOutputSize
virtual const SizeType & GetOutputSize()
itk::TransformToDeterminantOfSpatialJacobianSource::Pointer
SmartPointer< Self > Pointer
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:83
itk::TransformToDeterminantOfSpatialJacobianSource::SetOutputSize
virtual void SetOutputSize(const SizeType &size)
itk::AdvancedTransform::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAdvancedTransform.h:96
itk::TransformToDeterminantOfSpatialJacobianSource::OriginType
OutputImageType::PointType OriginType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:116
itk::TransformToDeterminantOfSpatialJacobianSource::operator=
void operator=(const Self &)
itk::TransformToDeterminantOfSpatialJacobianSource::LinearGenerateData
void LinearGenerateData(void)
itk::TransformToDeterminantOfSpatialJacobianSource::m_OutputOrigin
OriginType m_OutputOrigin
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:218
itk::TransformToDeterminantOfSpatialJacobianSource::OutputImageType
TOutputImage OutputImageType
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:86
itk::TransformToDeterminantOfSpatialJacobianSource::Self
TransformToDeterminantOfSpatialJacobianSource Self
Definition: itkTransformToDeterminantOfSpatialJacobianSource.h:81
itk::TransformToDeterminantOfSpatialJacobianSource::ThreadedGenerateData
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
itk::TransformToDeterminantOfSpatialJacobianSource::GetMTime
unsigned long GetMTime(void) const


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo