ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkImageToVectorImageFilter.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 __itkImageToVectorImageFilter_h
19 #define __itkImageToVectorImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkVectorContainer.h"
23 #include "itkVectorImage.h"
24 
25 namespace itk
26 {
51 template< class TInputImage >
52 class ITK_EXPORT ImageToVectorImageFilter:
53  public ImageToImageFilter< TInputImage,
54  VectorImage< typename TInputImage::InternalPixelType,
55  ::itk::GetImageDimension< TInputImage >::ImageDimension > >
56 {
57 public:
58 
62  itkNewMacro(Self);
64 
65  itkStaticConstMacro(Dimension, unsigned int, TInputImage::ImageDimension);
66 
67  typedef typename TInputImage::InternalPixelType PixelType;
68  typedef VectorImage< PixelType,
69  itkGetStaticConstMacro(Dimension) > OutputImageType;
70  typedef ImageToImageFilter< TInputImage,
72 
73  typedef typename Superclass::InputImageType InputImageType;
74 
75  typedef typename Superclass::InputImageRegionType RegionType;
76 
77  virtual void SetNthInput(unsigned int idx, const InputImageType *inputImage)
78  { this->SetInput(idx, inputImage); }
79 
80 #ifdef ITK_USE_CONCEPT_CHECKING
81 
82  // Check if the pixeltype is a scalar, (native pixel type).
83 
85 #endif
86 protected:
88 
89  virtual void GenerateOutputInformation(void);
90 
91  virtual void BeforeThreadedGenerateData();
92 
93  virtual void ThreadedGenerateData(const RegionType & outputRegionForThread, ThreadIdType);
94 
95  virtual void SetNthInput(unsigned int num, DataObject *input)
96  {
97  Superclass::SetNthInput(num, input);
98  }
99 
100 private:
101  ImageToVectorImageFilter(const Self &); //purposely not implemented
102  void operator=(const Self &); //purposely not implemented
103 };
104 }
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 #include "itkImageToVectorImageFilter.hxx"
108 #endif
109 
110 #endif
111