ITK  6.0.0
Insight Toolkit
itkRegionOfInterestImageFilter.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 itkRegionOfInterestImageFilter_h
19#define itkRegionOfInterestImageFilter_h
20
22#include "itkSmartPointer.h"
23
24namespace itk
25{
53template <typename TInputImage, typename TOutputImage>
54class ITK_TEMPLATE_EXPORT RegionOfInterestImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
55{
56public:
57 ITK_DISALLOW_COPY_AND_MOVE(RegionOfInterestImageFilter);
58
64 using typename Superclass::InputImageRegionType;
65
67 itkNewMacro(Self);
68
70 itkOverrideGetNameOfClassMacro(RegionOfInterestImageFilter);
71
76
78 using OutputImagePixelType = typename TOutputImage::PixelType;
79 using InputImagePixelType = typename TInputImage::PixelType;
80
82 itkSetMacro(RegionOfInterest, RegionType);
83 itkGetConstMacro(RegionOfInterest, RegionType);
87 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
88 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
89
90#ifdef ITK_USE_CONCEPT_CHECKING
91 // Begin concept checking
94 // End concept checking
95#endif
96
97protected:
99 ~RegionOfInterestImageFilter() override = default;
100 void
101 PrintSelf(std::ostream & os, Indent indent) const override;
102
103 void
105
106 void
108
116 void
118
128 void
129 DynamicThreadedGenerateData(const RegionType & outputRegionForThread) override;
130
131private:
132 RegionType m_RegionOfInterest{};
133};
134} // end namespace itk
135
136#ifndef ITK_MANUAL_INSTANTIATION
137# include "itkRegionOfInterestImageFilter.hxx"
138#endif
139
140#endif
Base class for all data objects in ITK.
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
Base class for filters that take an image as input and produce an image as output.
typename InputImageType::PixelType InputImagePixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Extract a region of interest from the input image.
typename TInputImage::RegionType RegionType
~RegionOfInterestImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
void GenerateInputRequestedRegion() override
void GenerateOutputInformation() override
void DynamicThreadedGenerateData(const RegionType &outputRegionForThread) override
void EnlargeOutputRequestedRegion(DataObject *output) override
typename TInputImage::IndexType IndexType
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....