ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkImportImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright RTK Consortium
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
19#ifndef rtkImportImageFilter_h
20#define rtkImportImageFilter_h
21
22#include "itkImageSource.h"
23#include "rtkMacro.h"
24
25namespace rtk
26{
42
43template <typename TImage>
44class ITK_TEMPLATE_EXPORT ImportImageFilter : public itk::ImageSource<TImage>
45{
46public:
47 ITK_DISALLOW_COPY_AND_MOVE(ImportImageFilter);
48
50 using OutputImagePointer = typename TImage::Pointer;
51 using SpacingType = typename TImage::SpacingType;
52 using OriginType = typename TImage::PointType;
53
59
61 itkNewMacro(Self);
62
64 itkOverrideGetNameOfClassMacro(ImportImageFilter);
65
68
72
76
78 using PixelType = typename TImage::PixelType;
79
81 PixelType *
83
91 void
92 SetImportPointer(PixelType * ptr, SizeValueType num, bool LetFilterManageMemory);
93
98 void
99 SetRegion(const RegionType & region)
100 {
101 if (m_Region != region)
102 {
103 m_Region = region;
104 this->Modified();
105 }
106 }
107
112 const RegionType &
113 GetRegion() const
114 {
115 return m_Region;
116 }
117
121 itkGetConstReferenceMacro(Spacing, SpacingType);
122 itkSetVectorMacro(Spacing, const float, TImage::ImageDimension);
123
127 itkGetConstReferenceMacro(Origin, OriginType);
128 itkSetVectorMacro(Origin, const float, TImage::ImageDimension);
129
131
134 virtual void
135 SetDirection(const DirectionType & direction);
136
139 itkGetConstReferenceMacro(Direction, DirectionType);
140
141protected:
144 void
145 PrintSelf(std::ostream & os, itk::Indent indent) const override;
146
149 void
150 GenerateData() override;
151
155 void
157
165 void
167
168private:
173
177};
178} // namespace rtk
179
180#ifndef ITK_MANUAL_INSTANTIATION
181# include "rtkImportImageFilter.hxx"
182#endif
183
184#endif
Base class for all data objects in ITK.
An image region represents a structured region of data.
Base class for all process objects that output image data.
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.
itk::SmartPointer< const Self > ConstPointer
void GenerateData() override
itk::ImageRegion< TImage::ImageDimension > RegionType
typename TImage::PointType OriginType
itk::Index< TImage::ImageDimension > IndexType
void SetRegion(const RegionType &region)
itk::Matrix< double, TImage::ImageDimension, TImage::ImageDimension > DirectionType
virtual void SetDirection(const DirectionType &direction)
void EnlargeOutputRequestedRegion(itk::DataObject *output) override
void GenerateOutputInformation() override
itk::SmartPointer< Self > Pointer
typename TImage::PixelType PixelType
void SetImportPointer(PixelType *ptr, SizeValueType num, bool LetFilterManageMemory)
PixelType * GetImportPointer()
itk::ImageSource< TImage > Superclass
itk::Size< TImage::ImageDimension > SizeType
typename SizeType::SizeValueType SizeValueType
const RegionType & GetRegion() const
void PrintSelf(std::ostream &os, itk::Indent indent) const override
~ImportImageFilter() override
typename TImage::Pointer OutputImagePointer
typename TImage::SpacingType SpacingType
#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
itk::SizeValueType SizeValueType
Definition itkSize.h:80