ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkImportVectorImageFilter.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 itkImportVectorImageFilter_h
19#define itkImportVectorImageFilter_h
20
21#include "itkImageSource.h"
22
23namespace itk
24{
44template <typename TOutputImage>
45class ITK_TEMPLATE_EXPORT ImportVectorImageFilter : public ImageSource<TOutputImage>
46{
47public:
48 ITK_DISALLOW_COPY_AND_MOVE(ImportVectorImageFilter);
49
51 using OutputImageType = TOutputImage;
52 using OutputImagePointer = typename OutputImageType::Pointer;
53 using SpacingType = typename OutputImageType::SpacingType;
54 using OriginType = typename OutputImageType::PointType;
56
62
64 itkNewMacro(Self);
65
67 itkOverrideGetNameOfClassMacro(ImportVectorImageFilter);
68
71
74
78
80 using OutputImagePixelType = typename OutputImageType::PixelType;
81 using OutputImageInternalPixelType = typename OutputImageType::InternalPixelType;
82
86
95 void
97 SizeValueType num,
98 bool letImageContainerManageMemory,
99 unsigned int vectorImageComponents = 1);
100
105 void
107 {
108 if (m_BufferedRegion != region)
109 {
110 m_BufferedRegion = region;
111 this->Modified();
112 }
113 }
114
119 const RegionType &
121 {
122 return m_BufferedRegion;
123 }
124
127 void
129 {
130 if (m_LargestPossibleRegion != region)
131 {
133 this->Modified();
134 }
135 }
136
139 const RegionType &
141 {
143 }
144
148 itkGetConstReferenceMacro(Spacing, SpacingType);
149 itkSetVectorMacro(Spacing, const float, OutputImageType::ImageDimension);
150
154 itkGetConstReferenceMacro(Origin, OriginType);
155 itkSetVectorMacro(Origin, const float, OutputImageType::ImageDimension);
156
158
161 virtual void
162 SetDirection(const DirectionType & direction);
163
166 itkGetConstReferenceMacro(Direction, DirectionType);
167
168protected:
171 void
172 PrintSelf(std::ostream & os, Indent indent) const override;
173
176 void
177 GenerateData() override;
178
182 void
184
192 void
194
195private:
201
205};
206
207} // end namespace itk
208
209#ifndef ITK_MANUAL_INSTANTIATION
210# include "itkImportVectorImageFilter.hxx"
211#endif
212
213#endif
Base class for all data objects in ITK.
An image region represents a structured region of data.
Defines an itk::Image front-end to a standard C-array.
typename OutputImageType::PixelType OutputImagePixelType
const RegionType & GetBufferedRegion() const
void SetImportPointer(OutputImageInternalPixelType *ptr, SizeValueType num, bool letImageContainerManageMemory, unsigned int vectorImageComponents=1)
Size< OutputImageType::ImageDimension > SizeType
Matrix< SpacePrecisionType, OutputImageType::ImageDimension, OutputImageType::ImageDimension > DirectionType
void GenerateData() override
typename OutputImageType::Pointer OutputImagePointer
virtual void SetDirection(const DirectionType &direction)
typename OutputImageType::InternalPixelType OutputImageInternalPixelType
SmartPointer< const Self > ConstPointer
void GenerateOutputInformation() override
ImageRegion< OutputImageType::ImageDimension > RegionType
Index< OutputImageType::ImageDimension > IndexType
OutputImageInternalPixelType * GetImportPointer()
typename OutputImageType::SpacingType SpacingType
void EnlargeOutputRequestedRegion(DataObject *output) override
void SetBufferedRegion(const RegionType &region)
void SetLargestPossibleRegion(const RegionType &region)
void PrintSelf(std::ostream &os, Indent indent) const override
const RegionType & GetLargestPossibleRegion() const
typename OutputImageType::PointType OriginType
ImportImageContainer< SizeValueType, typename OutputImageType::InternalPixelType > ImportImageContainerType
ImportImageContainerType::Pointer m_ImportImageContainer
ImageSource< OutputImageType > Superclass
Control indentation during Print() invocation.
Definition itkIndent.h:53
A templated class holding a M x N size Matrix.
Definition itkMatrix.h:71
virtual void Modified() const
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition itkIntTypes.h:82
#define itkSetMacro(name, type)
Represent a n-dimensional index in a n-dimensional image.
Definition itkIndex.h:69
Represent a n-dimensional size (bounds) of a n-dimensional image.
Definition itkSize.h:70