ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkDICOMOrientImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkDICOMOrientImageFilter_h
19#define itkDICOMOrientImageFilter_h
20
21#include "SimpleITKFiltersExport.h"
22#include "itkDICOMOrientation.h"
24#include "itkFlipImageFilter.h"
25#include <map>
26#include <string>
27
28namespace itk
29{
30
64template <typename TInputImage>
65class ITK_TEMPLATE_EXPORT DICOMOrientImageFilter : public ImageToImageFilter<TInputImage, TInputImage>
66{
67public:
68 ITK_DISALLOW_COPY_AND_MOVE(DICOMOrientImageFilter);
69
75
77 using ImageType = TInputImage;
78 using ImagePointer = typename ImageType::Pointer;
79 using ImageConstPointer = typename ImageType::ConstPointer;
80 using ImageRegionType = typename ImageType::RegionType;
81 using ImagePixelType = typename ImageType::PixelType;
82 using DirectionType = typename ImageType::DirectionType;
83
87
91
93 static constexpr unsigned int ImageDimension = ImageType::ImageDimension;
94
96 itkNewMacro(Self);
97
99 itkOverrideGetNameOfClassMacro(DICOMOrientImageFilter);
100
102
106 itkGetEnumMacro(InputCoordinateOrientation, OrientationEnum);
107
109 itkGetEnumMacro(DesiredCoordinateOrientation, OrientationEnum);
110 void
112 void
113 SetDesiredCoordinateOrientation(const std::string & desired);
114
116 inline void
117 SetDesiredCoordinateDirection(const typename ImageType::DirectionType & DesiredDirection)
118 {
120 }
121
122
127 itkGetConstReferenceMacro(PermuteOrder, PermuteOrderArrayType);
128
133 itkGetConstReferenceMacro(FlipAxes, FlipAxesArrayType);
134
135
139 void
141
142 static_assert(ImageDimension == 3, "Only 3 dimensional images are support!");
143
144protected:
146 ~DICOMOrientImageFilter() override = default;
147 void
148 PrintSelf(std::ostream & os, Indent indent) const override;
149
151 void
153
154 /*** Member functions used by GenerateData: */
155 void
157
159 bool
161
163 bool
165
166
167 void
169
170 void
171 VerifyPreconditions() const override;
172
175 void
176 GenerateData() override;
177
178private:
181
184
185}; // end of class
186
187} // end namespace itk
188
189#ifndef ITK_MANUAL_INSTANTIATION
190# include "itkDICOMOrientImageFilter.hxx"
191#endif
192
193#endif
void GenerateData() override
void SetDesiredCoordinateOrientation(OrientationEnum newCode)
PermuteAxesImageFilter< TInputImage > PermuterType
~DICOMOrientImageFilter() override=default
DICOMOrientation::OrientationEnum OrientationEnum
SmartPointer< const Self > ConstPointer
ImageToImageFilter< TInputImage, TInputImage > Superclass
void VerifyPreconditions() const override
Verifies that the process object has been configured correctly, that all required inputs are set,...
void GenerateInputRequestedRegion() override
void SetInputCoordinateOrientation(OrientationEnum newCode)
typename PermuterType::PermuteOrderArrayType PermuteOrderArrayType
typename ImageType::Pointer ImagePointer
static constexpr unsigned int ImageDimension
typename ImageType::PixelType ImagePixelType
void GenerateOutputInformation() override
typename ImageType::ConstPointer ImageConstPointer
FlipImageFilter< TInputImage > FlipperType
typename FlipperType::FlipAxesArrayType FlipAxesArrayType
void SetDesiredCoordinateOrientation(const std::string &desired)
void SetDesiredCoordinateDirection(const typename ImageType::DirectionType &DesiredDirection)
void DeterminePermutationsAndFlips(DICOMOrientation desired, DICOMOrientation given)
typename ImageType::RegionType ImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
typename ImageType::DirectionType DirectionType
A supporting class for DICOMOrientImageFilter.
static OrientationEnum DirectionCosinesToOrientation(const DirectionType &dir)
Return the closest orientation for a direction cosine matrix.
Flips an image across user specified axes.
FixedArray< bool, Self::ImageDimension > FlipAxesArrayType
Control indentation during Print() invocation.
Definition itkIndent.h:53
Permutes the image axes according to a user specified order.
FixedArray< unsigned int, Self::ImageDimension > PermuteOrderArrayType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....