ITK  4.8.0
Insight Segmentation and Registration Toolkit
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 >
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 private:
98  SplitComponentsImageFilter( const Self& ); // purposely not implemented
99  void operator=( const Self& ); // purposely not implemented
100 
102 };
103 
104 } // end namespace itk
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 #include "itkSplitComponentsImageFilter.hxx"
108 #endif
109 
110 #endif
Extract components of an Image with multi-component pixels.
ImageToImageFilter< InputImageType, OutputImageType > Superclass
OutputImageType::RegionType OutputRegionType
Base class for all process objects that output image data.
FixedArray< bool, TComponents > ComponentsMaskType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Base class for filters that take an image as input and produce an image as output.
void operator=(const Self &)
virtual void ThreadedGenerateData(const OutputRegionType &outputRegion, ThreadIdType threadId)