ITK  4.9.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 #ifndef ITKV3_COMPATIBILITY
26 #error "This file is only valid when ITKV3_COMPATIBILITY is turned on. Users are encouraged to convert to itkDisplacementFieldJacobianDeterminantFilter.h in ITKv4"
27 #endif
28 
29 namespace itk
30 {
57 template< typename TInputImage >
59  public ImageToImageFilter< TInputImage,
60  VectorImage< typename TInputImage::InternalPixelType,
61  TInputImage::ImageDimension > >
62 {
63 public:
64 
68  itkNewMacro(Self);
70 
71  itkStaticConstMacro(Dimension, unsigned int, TInputImage::ImageDimension);
72 
73  typedef typename TInputImage::InternalPixelType PixelType;
74  typedef VectorImage< PixelType,
75  itkGetStaticConstMacro(Dimension) > OutputImageType;
76  typedef ImageToImageFilter< TInputImage,
78 
80 
82 
83  virtual void SetNthInput(unsigned int idx, const InputImageType *inputImage)
84  { this->SetInput(idx, inputImage); }
85 
86 #ifdef ITK_USE_CONCEPT_CHECKING
87  // Begin concept checking
88  // Check if the pixeltype is a scalar, (native pixel type).
89  // End concept checking
90 #endif
91 
92 protected:
94 
95  virtual void GenerateOutputInformation();
96 
97  virtual void BeforeThreadedGenerateData();
98 
99  virtual void ThreadedGenerateData(const RegionType & outputRegionForThread, ThreadIdType);
100 
101  virtual void SetNthInput(unsigned int num, DataObject *input)
102  {
103  Superclass::SetNthInput(num, input);
104  }
105 
106 private:
107  ImageToVectorImageFilter(const Self &) ITK_DELETE_FUNCTION;
108  void operator=(const Self &) ITK_DELETE_FUNCTION;
109 };
110 }
111 
112 #ifndef ITK_MANUAL_INSTANTIATION
113 #include "itkImageToVectorImageFilter.hxx"
114 #endif
115 
116 #endif
Light weight base class for most itk classes.
virtual void SetNthInput(unsigned int num, DataObject *input)
virtual void ThreadedGenerateData(const RegionType &outputRegionForThread, ThreadIdType)
VectorImage< PixelType, itkGetStaticConstMacro(Dimension) > OutputImageType
Templated n-dimensional vector image class.
virtual void BeforeThreadedGenerateData()
virtual void GenerateOutputInformation()
ImageToImageFilter< TInputImage, OutputImageType > Superclass
Superclass::InputImageType InputImageType
This class is deprecated. You should use itkComposeImageFilter instead.
InputImageType::RegionType InputImageRegionType
TInputImage::InternalPixelType PixelType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Superclass::InputImageRegionType RegionType
virtual void SetNthInput(unsigned int idx, const InputImageType *inputImage)
Base class for filters that take an image as input and produce an image as output.
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
Base class for all data objects in ITK.
SmartPointer< const Self > ConstPointer