ITK  4.13.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< typename TInputImage, typename TOutputMesh >
36 class ITK_TEMPLATE_EXPORT ImageToMeshFilter:public MeshSource< TOutputMesh >
37 {
38 public:
44 
46  itkTypeMacro(ImageToMeshFilter, MeshSource);
47 
50  using Superclass::MakeOutput;
51  DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
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);
76  {
77  return this->GetInput(0);
78  }
80 
82  OutputMeshType * GetOutput();
83 
85  void GenerateOutputInformation() ITK_OVERRIDE;
86 
87 protected:
89  ~ImageToMeshFilter() ITK_OVERRIDE;
90 
91 private:
92  ITK_DISALLOW_COPY_AND_ASSIGN(ImageToMeshFilter);
93 };
94 } // end namespace itk
95 
96 #ifndef ITK_MANUAL_INSTANTIATION
97 #include "itkImageToMeshFilter.hxx"
98 #endif
99 
100 #endif
InputImageType::PixelType InputImagePixelType
void SetInput(const InputImageType *input)
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
MeshSource< TOutputMesh > Superclass
const InputImageType * GetInput()
Base class for all process objects that output mesh data.
Definition: itkMeshSource.h:49
ImageToMeshFilter is the base class for all process objects that output Mesh data and require image d...
SmartPointer< Self > Pointer
InputImageType::ConstPointer InputImageConstPointer
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
OutputMeshType::Pointer OutputMeshPointer
InputImageType::Pointer InputImagePointer
SmartPointer< const Self > ConstPointer
InputImageType::RegionType InputImageRegionType