ITK  5.0.0
Insight Segmentation and Registration Toolkit
SplitComponents/include/itkSplitComponentsImageFilter.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 itkSplitComponentsImageFilter_h
19 #define itkSplitComponentsImageFilter_h
20 
21 #include "itkFixedArray.h"
22 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
26 
47 template< typename TInputImage, typename TOutputImage, unsigned int TComponents = TInputImage::ImageDimension >
48 class ITK_TEMPLATE_EXPORT SplitComponentsImageFilter:
49  public ImageToImageFilter< TInputImage, TOutputImage >
50 {
51 public:
52  ITK_DISALLOW_COPY_AND_ASSIGN(SplitComponentsImageFilter);
53 
55  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
56 
58  static constexpr unsigned int Components = TComponents;
59 
61  using InputImageType = TInputImage;
62  using OutputImageType = TOutputImage;
63  using InputPixelType = typename InputImageType::PixelType;
64  using OutputPixelType = typename OutputImageType::PixelType;
66 
72 
74 
77 
79  itkNewMacro( Self );
80 
84  itkSetMacro( ComponentsMask, ComponentsMaskType );
85  itkGetConstReferenceMacro( ComponentsMask, ComponentsMaskType );
87 
88 protected:
91 
93  void AllocateOutputs() override;
94 
95  void DynamicThreadedGenerateData( const OutputRegionType& outputRegion ) override;
96 
97 private:
99 };
100 
101 } // end namespace itk
102 
103 #ifndef ITK_MANUAL_INSTANTIATION
104 #include "itkSplitComponentsImageFilter.hxx"
105 #endif
106 
107 #endif
Extract components of an Image with multi-component pixels.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
TOutputImage OutputImageType
Base class for filters that take an image as input and produce an image as output.