ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSliceImageFilter.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 itkSliceImageFilter_h
19#define itkSliceImageFilter_h
20
22
23namespace itk
24{
55template <class TInputImage, class TOutputImage>
56class ITK_TEMPLATE_EXPORT SliceImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
57{
58public:
59 ITK_DISALLOW_COPY_AND_MOVE(SliceImageFilter);
60
66
68 itkNewMacro(Self);
69
71 itkOverrideGetNameOfClassMacro(SliceImageFilter);
72
74 using OutputImageType = TOutputImage;
75 using InputImageType = TInputImage;
76 using OutputImagePointer = typename OutputImageType::Pointer;
77 using InputImagePointer = typename InputImageType::Pointer;
78 using InputImageConstPointer = typename InputImageType::ConstPointer;
79
80 using OutputIndexType = typename TOutputImage::IndexType;
81 using InputIndexType = typename TInputImage::IndexType;
82 using OutputOffsetType = typename TOutputImage::OffsetType;
83
85 using OutputImageRegionType = typename TOutputImage::RegionType;
86
88 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
89 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
90
91
92 using IndexType = typename InputImageType::IndexType;
93 using IndexValueType = typename InputIndexType::IndexValueType;
95
97 itkSetMacro(Start, IndexType);
98 itkGetConstReferenceMacro(Start, IndexType);
99 void
102
104 itkSetMacro(Stop, IndexType);
105 itkGetConstReferenceMacro(Stop, IndexType);
106 void
109
114 itkSetMacro(Step, ArrayType);
115 itkGetConstReferenceMacro(Step, ArrayType);
116 void
117 SetStep(int step);
119
120
121 itkConceptMacro(InputConvertibleToOutputCheck,
124
125protected:
127 ~SliceImageFilter() override = default;
128 void
129 PrintSelf(std::ostream & os, Indent indent) const override;
130
135 void
137
138 void
140
151 void
152 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
153
154
155 void
156 VerifyInputInformation() const override;
157
158private:
162};
163} // end namespace itk
164
165#ifndef ITK_MANUAL_INSTANTIATION
166# include "itkSliceImageFilter.hxx"
167#endif
168
169#endif
Simulate a standard C array with copy semantics.
Control indentation during Print() invocation.
Definition itkIndent.h:50
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
void PrintSelf(std::ostream &os, Indent indent) const override
~SliceImageFilter() override=default
SmartPointer< Self > Pointer
ImageToImageFilter< TInputImage, TOutputImage > Superclass
void SetStart(IndexValueType start)
typename TOutputImage::RegionType OutputImageRegionType
typename OutputImageType::Pointer OutputImagePointer
void VerifyInputInformation() const override
Verifies that the input images occupy the same physical space and the each index is at the same physi...
void SetStop(IndexValueType stop)
typename TInputImage::IndexType InputIndexType
typename TOutputImage::OffsetType OutputOffsetType
typename TOutputImage::IndexType OutputIndexType
void SetStep(int step)
void GenerateInputRequestedRegion() override
static constexpr unsigned int OutputImageDimension
typename InputIndexType::IndexValueType IndexValueType
SmartPointer< const Self > ConstPointer
void GenerateOutputInformation() override
typename InputImageType::IndexType IndexType
FixedArray< int, ImageDimension > ArrayType
typename InputImageType::Pointer InputImagePointer
static constexpr unsigned int ImageDimension
typename InputImageType::ConstPointer InputImageConstPointer
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....