ITK  6.0.0
Insight Toolkit
itkImageToImageFilter.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/*=========================================================================
19 *
20 * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21 *
22 * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23 *
24 * For complete copyright, license and disclaimer of warranty information
25 * please refer to the NOTICE file at the top of the ITK source tree.
26 *
27 *=========================================================================*/
28#ifndef itkImageToImageFilter_h
29#define itkImageToImageFilter_h
30
31#include "itkImageSource.h"
32#include "itkConceptChecking.h"
35
36namespace itk
37{
38
107template <typename TInputImage, typename TOutputImage>
108class ITK_TEMPLATE_EXPORT ImageToImageFilter
109 : public ImageSource<TOutputImage>
111{
112public:
113 ITK_DISALLOW_COPY_AND_MOVE(ImageToImageFilter);
114
120
122 itkOverrideGetNameOfClassMacro(ImageToImageFilter);
123
125 using typename Superclass::OutputImageRegionType;
126 using typename Superclass::OutputImagePixelType;
127
129 using InputImageType = TInputImage;
133 using InputImagePixelType = typename InputImageType::PixelType;
134
136 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
137 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
138
140 using Superclass::SetInput;
141 virtual void
142 SetInput(const InputImageType * input);
143
144 virtual void
145 SetInput(unsigned int, const TInputImage * image);
146
147 const InputImageType *
148 GetInput() const;
149
150 const InputImageType *
151 GetInput(unsigned int idx) const;
152
172 virtual void
174
175 void
176 PopBackInput() override;
177
178 virtual void
180
181 void
182 PopFrontInput() override;
183
189 itkSetMacro(CoordinateTolerance, double);
190 itkGetConstMacro(CoordinateTolerance, double);
198 itkSetMacro(DirectionTolerance, double);
199 itkGetConstMacro(DirectionTolerance, double);
210
211
220
221
222protected:
224 ~ImageToImageFilter() override = default;
225
226 void
227 PrintSelf(std::ostream & os, Indent indent) const override;
228
248 void
249 VerifyInputInformation() const override;
250
275 void
277
282
287
323 virtual void
325
356 virtual void
358
367 using Superclass::PushBackInput;
368 using Superclass::PushFrontInput;
371private:
376 double m_CoordinateTolerance{};
377 double m_DirectionTolerance{};
378};
379} // end namespace itk
380
381#ifndef ITK_MANUAL_INSTANTIATION
382# include "itkImageToImageFilter.hxx"
383#endif
384
385#endif
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
Secondary base class of ImageToImageFilter common between templates.
static double GetGlobalDefaultCoordinateTolerance()
static double GetGlobalDefaultDirectionTolerance()
static void SetGlobalDefaultDirectionTolerance(double)
static void SetGlobalDefaultCoordinateTolerance(double)
A Function object used to dispatching to a routine to copy a region (start index and size).
Base class for filters that take an image as input and produce an image as output.
virtual void PushBackInput(const InputImageType *input)
virtual void CallCopyOutputRegionToInputRegion(InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion)
void PopBackInput() override
const InputImageType * GetInput(unsigned int idx) const
void VerifyInputInformation() const override
Verifies that the input images occupy the same physical space and the each index is at the same physi...
typename InputImageType::ConstPointer InputImageConstPointer
virtual void SetInput(unsigned int, const TInputImage *image)
void GenerateInputRequestedRegion() override
~ImageToImageFilter() override=default
typename InputImageType::Pointer InputImagePointer
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetInput(const InputImageType *input)
const InputImageType * GetInput() const
virtual void PushFrontInput(const InputImageType *input)
void PopFrontInput() override
typename InputImageType::PixelType InputImagePixelType
virtual void CallCopyInputRegionToOutputRegion(OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion)
typename InputImageType::RegionType InputImageRegionType
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...
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....