ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkVectorExpandImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software 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  * http://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 itkVectorExpandImageFilter_h
19 #define itkVectorExpandImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
71 template< typename TInputImage, typename TOutputImage >
72 class ITK_TEMPLATE_EXPORT VectorExpandImageFilter:
73  public ImageToImageFilter< TInputImage, TOutputImage >
74 {
75 public:
76  ITK_DISALLOW_COPY_AND_ASSIGN(VectorExpandImageFilter);
77 
83 
85  itkNewMacro(Self);
86 
88  using InputImagePointer = typename TInputImage::Pointer;
89  using OutputImagePointer = typename TOutputImage::Pointer;
91 
94 
96  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
97 
99  using InputImageType = typename Superclass::InputImageType;
100  using OutputImageType = typename Superclass::OutputImageType;
101 
103  using OutputPixelType = typename OutputImageType::PixelType;
104  using OutputValueType = typename OutputPixelType::ValueType;
105  using InputPixelType = typename InputImageType::PixelType;
106  using InputValueType = typename InputPixelType::ValueType;
107 
109  enum { VectorDimension = InputPixelType::Dimension };
110 
112  using ExpandFactorsType = float;
114 
116  using CoordRepType = double;
120 
122  itkSetObjectMacro(Interpolator, InterpolatorType);
123  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
125 
128  itkSetMacro(ExpandFactors, ExpandFactorsArrayType);
129  virtual void SetExpandFactors(const float factor);
130  itkSetVectorMacro(ExpandFactors, const unsigned int, ImageDimension);
132 
134  itkGetConstReferenceMacro(ExpandFactors, ExpandFactorsArrayType);
135 
142  void GenerateOutputInformation() override;
143 
149  void GenerateInputRequestedRegion() override;
150 
151 #ifdef ITK_USE_CONCEPT_CHECKING
152  // Begin concept checking
153  itkConceptMacro( InputHasNumericTraitsCheck,
155  itkConceptMacro( OutputHasNumericTraitsCheck,
157  // End concept checking
158 #endif
159 
160 protected:
161 
163  ~VectorExpandImageFilter() override = default;
164  void PrintSelf(std::ostream & os, Indent indent) const override;
165 
174  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
175 
176 
178  void BeforeThreadedGenerateData() override;
179 
180 private:
183 };
184 } // end namespace itk
185 
186 #ifndef ITK_MANUAL_INSTANTIATION
187 #include "itkVectorExpandImageFilter.hxx"
188 #endif
189 
190 #endif
typename OutputImageType::Pointer OutputImagePointer
typename OutputPixelType::ValueType OutputValueType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename InterpolatorType::Pointer InterpolatorPointer
Base class for all process objects that output image data.
Expand the size of a vector image by an integer factor in each dimension.
typename InputImageType::Pointer InputImagePointer
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename OutputImageType::PixelType OutputPixelType
typename InputImageType::PixelType InputPixelType
Base class for filters that take an image as input and produce an image as output.
typename InputPixelType::ValueType InputValueType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for all vector image interpolaters.
#define itkConceptMacro(name, concept)
Linearly interpolate a vector image at specified positions.