ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkImageToMeshFilter.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 __itkImageToMeshFilter_h
19 #define __itkImageToMeshFilter_h
20 
21 #include "itkMeshSource.h"
22 
23 namespace itk
24 {
35 template< class TInputImage, class TOutputMesh >
36 class ITK_EXPORT ImageToMeshFilter:public MeshSource< TOutputMesh >
37 {
38 public:
44 
46  itkTypeMacro(ImageToMeshFilter, MeshSource);
47 
50  using Superclass::MakeOutput;
52 
54  typedef TInputImage InputImageType;
55  typedef typename InputImageType::Pointer InputImagePointer;
56  typedef typename InputImageType::ConstPointer InputImageConstPointer;
57  typedef typename InputImageType::RegionType InputImageRegionType;
58  typedef typename InputImageType::PixelType InputImagePixelType;
59 
61  typedef TOutputMesh OutputMeshType;
62  typedef typename OutputMeshType::Pointer OutputMeshPointer;
63 
65  using Superclass::SetInput;
66  void SetInput(unsigned int idx, const InputImageType *input);
67  void SetInput(const InputImageType *input)
68  {
69  this->SetInput(0, input);
70  }
72 
74  const InputImageType * GetInput(unsigned int idx);
75  const InputImageType * GetInput()
76  {
77  return this->GetInput(0);
78  }
80 
82  OutputMeshType * GetOutput(void);
83 
85  void GenerateOutputInformation(void);
86 
87 protected:
90 
91 private:
92  ImageToMeshFilter(const ImageToMeshFilter &); //purposely not implemented
93  void operator=(const ImageToMeshFilter &); //purposely not implemented
94 };
95 } // end namespace itk
96 
97 #ifndef ITK_MANUAL_INSTANTIATION
98 #include "itkImageToMeshFilter.hxx"
99 #endif
100 
101 #endif
102