Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
Src
elx
5.1.0
Common
Transforms
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 "
itkAdvancedIdentityTransform.h
"
23
#include "itkImageSource.h"
24
25
namespace
itk
26
{
27
66
template
<
class
TOutputImage,
class
TTransformPrecisionType =
double
>
67
class
ITK_TEMPLATE_EXPORT
TransformToSpatialJacobianSource
:
public
ImageSource<TOutputImage>
68
{
69
public
:
70
ITK_DISALLOW_COPY_AND_MOVE
(
TransformToSpatialJacobianSource
);
71
73
using
Self
=
TransformToSpatialJacobianSource
;
74
using
Superclass
= ImageSource<TOutputImage>;
75
using
Pointer
= SmartPointer<Self>;
76
using
ConstPointer
= SmartPointer<const Self>;
77
78
using
OutputImageType
= TOutputImage;
79
using
OutputImagePointer
=
typename
OutputImageType::Pointer;
80
using
OutputImageConstPointer
=
typename
OutputImageType::ConstPointer;
81
using
OutputImageRegionType
=
typename
OutputImageType::RegionType;
82
84
itkNewMacro(
Self
);
85
87
itkTypeMacro(
TransformToSpatialJacobianSource
, ImageSource);
88
90
itkStaticConstMacro
(ImageDimension,
unsigned
int
, TOutputImage::ImageDimension);
91
93
using
TransformType
=
AdvancedTransform<TTransformPrecisionType, Self::ImageDimension, Self::ImageDimension>
;
94
using
TransformPointerType
=
typename
TransformType::ConstPointer
;
95
using
SpatialJacobianType
=
typename
TransformType::SpatialJacobianType
;
96
98
using
PixelType =
typename
OutputImageType::PixelType;
99
// typedef typename PixelType::ValueType PixelValueType;
100
using
RegionType
=
typename
OutputImageType::RegionType;
101
using
SizeType
=
typename
RegionType::SizeType;
102
using
IndexType
=
typename
OutputImageType::IndexType;
103
using
PointType
=
typename
OutputImageType::PointType;
104
using
SpacingType
=
typename
OutputImageType::SpacingType;
105
using
OriginType
=
typename
OutputImageType::PointType;
106
using
DirectionType
=
typename
OutputImageType::DirectionType;
107
109
using
ImageBaseType
= ImageBase<Self::ImageDimension>;
110
118
itkSetConstObjectMacro(Transform,
TransformType
);
119
121
itkGetConstObjectMacro(Transform,
TransformType
);
122
124
virtual
void
125
SetOutputSize
(
const
SizeType
& size);
126
128
virtual
const
SizeType
&
129
GetOutputSize
();
130
133
virtual
void
134
SetOutputIndex
(
const
IndexType
& index);
135
137
virtual
const
IndexType
&
138
GetOutputIndex
();
139
141
itkSetMacro(OutputRegion,
OutputImageRegionType
);
142
144
itkGetConstReferenceMacro(OutputRegion,
OutputImageRegionType
);
145
147
itkSetMacro(OutputSpacing,
SpacingType
);
148
virtual
void
149
SetOutputSpacing
(
const
double
* values);
150
152
itkGetConstReferenceMacro(OutputSpacing,
SpacingType
);
153
155
itkSetMacro(OutputOrigin,
OriginType
);
156
virtual
void
157
SetOutputOrigin
(
const
double
* values);
158
160
itkGetConstReferenceMacro(OutputOrigin,
OriginType
);
161
163
itkSetMacro(OutputDirection,
DirectionType
);
164
itkGetConstReferenceMacro(OutputDirection,
DirectionType
);
165
167
void
168
SetOutputParametersFromImage
(
const
ImageBaseType
* image);
169
171
void
172
GenerateOutputInformation
()
override
;
173
176
void
177
BeforeThreadedGenerateData
()
override
;
178
180
ModifiedTimeType
181
GetMTime
()
const override
;
182
183
protected
:
184
TransformToSpatialJacobianSource
();
185
~TransformToSpatialJacobianSource
()
override
=
default
;
186
187
void
188
PrintSelf
(std::ostream & os, Indent indent)
const override
;
189
193
void
194
ThreadedGenerateData
(
const
OutputImageRegionType
& outputRegionForThread, ThreadIdType threadId)
override
;
195
199
void
200
NonlinearThreadedGenerateData
(
const
OutputImageRegionType
& outputRegionForThread, ThreadIdType threadId);
201
205
void
206
LinearGenerateData
();
207
208
private
:
210
RegionType
m_OutputRegion{};
// region of the output image
211
TransformPointerType
m_Transform{
212
AdvancedIdentityTransform<TTransformPrecisionType, ImageDimension>::New
()
213
};
// Coordinate transform to use
214
SpacingType
m_OutputSpacing{ 1.0 };
// output image spacing
215
OriginType
m_OutputOrigin{};
// output image origin
216
DirectionType
m_OutputDirection{ DirectionType::GetIdentity() };
// output image direction cosines
217
};
218
219
}
// end namespace itk
220
221
#ifndef ITK_MANUAL_INSTANTIATION
222
# include "itkTransformToSpatialJacobianSource.hxx"
223
#endif
224
225
#endif
// end #ifndef itkTransformToSpatialJacobianSource_h
SmartPointer< Self >
itk::AdvancedIdentityTransform
Implementation of an Identity Transform.
Definition:
itkAdvancedIdentityTransform.h:73
itk::AdvancedTransform
Transform maps points, vectors and covariant vectors from an input space to an output space.
Definition:
itkAdvancedTransform.h:83
itk::AdvancedTransform::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Definition:
itkAdvancedTransform.h:133
itk::AdvancedTransform::ConstPointer
SmartPointer< const Self > ConstPointer
Definition:
itkAdvancedTransform.h:91
itk::TransformToSpatialJacobianSource
Generate the spatial Jacobian matrix from a coordinate transform.
Definition:
itkTransformToSpatialJacobianSource.h:68
itk::TransformToSpatialJacobianSource::SetOutputOrigin
virtual void SetOutputOrigin(const double *values)
itk::TransformToSpatialJacobianSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition:
itkTransformToSpatialJacobianSource.h:81
itk::TransformToSpatialJacobianSource::OriginType
typename OutputImageType::PointType OriginType
Definition:
itkTransformToSpatialJacobianSource.h:105
itk::TransformToSpatialJacobianSource::ThreadedGenerateData
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
itk::TransformToSpatialJacobianSource::SetOutputSize
virtual void SetOutputSize(const SizeType &size)
itk::TransformToSpatialJacobianSource::DirectionType
typename OutputImageType::DirectionType DirectionType
Definition:
itkTransformToSpatialJacobianSource.h:106
itk::TransformToSpatialJacobianSource::SetOutputSpacing
virtual void SetOutputSpacing(const double *values)
itk::TransformToSpatialJacobianSource::IndexType
typename OutputImageType::IndexType IndexType
Definition:
itkTransformToSpatialJacobianSource.h:102
itk::TransformToSpatialJacobianSource::SpacingType
typename OutputImageType::SpacingType SpacingType
Definition:
itkTransformToSpatialJacobianSource.h:104
itk::TransformToSpatialJacobianSource::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition:
itkTransformToSpatialJacobianSource.h:80
itk::TransformToSpatialJacobianSource::ConstPointer
SmartPointer< const Self > ConstPointer
Definition:
itkTransformToSpatialJacobianSource.h:76
itk::TransformToSpatialJacobianSource::PointType
typename OutputImageType::PointType PointType
Definition:
itkTransformToSpatialJacobianSource.h:103
itk::TransformToSpatialJacobianSource::SetOutputIndex
virtual void SetOutputIndex(const IndexType &index)
itk::TransformToSpatialJacobianSource::OutputImageType
TOutputImage OutputImageType
Definition:
itkTransformToSpatialJacobianSource.h:78
itk::TransformToSpatialJacobianSource::ImageBaseType
ImageBase< Self::ImageDimension > ImageBaseType
Definition:
itkTransformToSpatialJacobianSource.h:109
itk::TransformToSpatialJacobianSource::BeforeThreadedGenerateData
void BeforeThreadedGenerateData() override
itk::TransformToSpatialJacobianSource::LinearGenerateData
void LinearGenerateData()
itk::TransformToSpatialJacobianSource::GetOutputIndex
virtual const IndexType & GetOutputIndex()
itk::TransformToSpatialJacobianSource::GenerateOutputInformation
void GenerateOutputInformation() override
itk::TransformToSpatialJacobianSource::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(TransformToSpatialJacobianSource)
itk::TransformToSpatialJacobianSource::itkStaticConstMacro
itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension)
itk::TransformToSpatialJacobianSource::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::TransformToSpatialJacobianSource::~TransformToSpatialJacobianSource
~TransformToSpatialJacobianSource() override=default
itk::TransformToSpatialJacobianSource::SizeType
typename RegionType::SizeType SizeType
Definition:
itkTransformToSpatialJacobianSource.h:101
itk::TransformToSpatialJacobianSource::GetMTime
ModifiedTimeType GetMTime() const override
itk::TransformToSpatialJacobianSource::NonlinearThreadedGenerateData
void NonlinearThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
itk::TransformToSpatialJacobianSource::SpatialJacobianType
typename TransformType::SpatialJacobianType SpatialJacobianType
Definition:
itkTransformToSpatialJacobianSource.h:95
itk::TransformToSpatialJacobianSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition:
itkTransformToSpatialJacobianSource.h:79
itk::TransformToSpatialJacobianSource::Superclass
ImageSource< TOutputImage > Superclass
Definition:
itkTransformToSpatialJacobianSource.h:74
itk::TransformToSpatialJacobianSource::TransformPointerType
typename TransformType::ConstPointer TransformPointerType
Definition:
itkTransformToSpatialJacobianSource.h:94
itk::TransformToSpatialJacobianSource::TransformToSpatialJacobianSource
TransformToSpatialJacobianSource()
itk::TransformToSpatialJacobianSource::SetOutputParametersFromImage
void SetOutputParametersFromImage(const ImageBaseType *image)
itk::TransformToSpatialJacobianSource::GetOutputSize
virtual const SizeType & GetOutputSize()
itk::TransformToSpatialJacobianSource::RegionType
typename OutputImageType::RegionType RegionType
Definition:
itkTransformToSpatialJacobianSource.h:100
itkAdvancedIdentityTransform.h
itkAdvancedTransform.h
itk
Definition:
itkAdvancedImageToImageMetric.h:44
Generated on 2023-01-13 for elastix by
1.9.6