ITK  4.13.0
Insight Segmentation and Registration Toolkit
Strain/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< class TInputImage, class TOutputImage, unsigned int TComponents = TInputImage::ImageDimension >
48 class SplitComponentsImageFilter:
49  public ImageToImageFilter< TInputImage, TOutputImage >
50 {
51 public:
53  itkStaticConstMacro(ImageDimension, unsigned int,
54  TInputImage::ImageDimension);
55 
57  itkStaticConstMacro(Components, unsigned int,
58  TComponents);
59 
61  typedef TInputImage InputImageType;
62  typedef TOutputImage OutputImageType;
63  typedef typename InputImageType::PixelType InputPixelType;
64  typedef typename OutputImageType::PixelType OutputPixelType;
65  typedef typename OutputImageType::RegionType OutputRegionType;
66 
72 
74 
77 
79  itkNewMacro( Self );
80 
84  itkSetMacro( ComponentsMask, ComponentsMaskType );
85  itkGetConstReferenceMacro( ComponentsMask, ComponentsMaskType );
87 
88 protected:
91 
93  virtual void AllocateOutputs();
94 
95  virtual void ThreadedGenerateData( const OutputRegionType& outputRegion, ThreadIdType threadId );
96 
97  virtual void PrintSelf ( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
98 
99 private:
100  ITK_DISALLOW_COPY_AND_ASSIGN(SplitComponentsImageFilter);
101 
103 };
104 
105 } // end namespace itk
106 
107 #ifndef ITK_MANUAL_INSTANTIATION
108 #include "itkSplitComponentsImageFilter.hxx"
109 #endif
110 
111 #endif
Extract components of an Image with multi-component pixels.
ImageToImageFilter< InputImageType, OutputImageType > Superclass
Base class for all process objects that output image data.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void ThreadedGenerateData(const OutputRegionType &outputRegion, ThreadIdType threadId)