ITK  4.8.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 ImageToMeshFilter:public MeshSource< TOutputMesh >
37 {
38 public:
44 
46  itkTypeMacro(ImageToMeshFilter, MeshSource);
47 
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 
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 
83 
85  void GenerateOutputInformation() ITK_OVERRIDE;
86 
87 protected:
89  ~ImageToMeshFilter();
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
OutputMeshType * GetOutput()
InputImageType::PixelType InputImagePixelType
void SetInput(const InputImageType *input)
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
MeshSource< TOutputMesh > Superclass
void GenerateOutputInformation() override
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
DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) override
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
OutputMeshType::Pointer OutputMeshPointer
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
InputImageType::Pointer InputImagePointer
SmartPointer< const Self > ConstPointer
InputImageType::RegionType InputImageRegionType
void SetInput(unsigned int idx, const InputImageType *input)