ITK  5.2.0
Insight Toolkit
itkImageToMeshFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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:
39  ITK_DISALLOW_COPY_AND_MOVE(ImageToMeshFilter);
40 
46 
48  itkTypeMacro(ImageToMeshFilter, MeshSource);
49 
52  using Superclass::MakeOutput;
54  MakeOutput(DataObjectPointerArraySizeType idx) override;
55 
57  using InputImageType = TInputImage;
58  using InputImagePointer = typename InputImageType::Pointer;
59  using InputImageConstPointer = typename InputImageType::ConstPointer;
61  using InputImagePixelType = typename InputImageType::PixelType;
62 
64  using OutputMeshType = TOutputMesh;
65  using OutputMeshPointer = typename OutputMeshType::Pointer;
66 
68  using Superclass::SetInput;
69  void
70  SetInput(unsigned int idx, const InputImageType * input);
71  void
72  SetInput(const InputImageType * input)
73  {
74  this->SetInput(0, input);
75  }
77 
79  const InputImageType *
80  GetInput(unsigned int idx);
81  const InputImageType *
83  {
84  return this->GetInput(0);
85  }
87 
89  OutputMeshType *
90  GetOutput();
91 
93  void
94  GenerateOutputInformation() override;
95 
96 protected:
98  ~ImageToMeshFilter() override = default;
99 };
100 } // end namespace itk
101 
102 #ifndef ITK_MANUAL_INSTANTIATION
103 # include "itkImageToMeshFilter.hxx"
104 #endif
105 
106 #endif
itk::ImageToMeshFilter< TImage, TFeatures >::InputImageType
TImage InputImageType
Definition: itkImageToMeshFilter.h:57
itk::SmartPointer< Self >
itk::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:193
itk::ImageToMeshFilter::GetInput
const InputImageType * GetInput()
Definition: itkImageToMeshFilter.h:82
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::MeshSource
Base class for all process objects that output mesh data.
Definition: itkMeshSource.h:49
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itkMeshSource.h
itk::ImageToMeshFilter
ImageToMeshFilter is the base class for all process objects that output Mesh data and require image d...
Definition: itkImageToMeshFilter.h:36
itk::ImageToMeshFilter::SetInput
void SetInput(const InputImageType *input)
Definition: itkImageToMeshFilter.h:72
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ImageToMeshFilter< TImage, TFeatures >::OutputMeshPointer
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkImageToMeshFilter.h:65
itk::ImageToMeshFilter< TImage, TFeatures >::OutputMeshType
TFeatures OutputMeshType
Definition: itkImageToMeshFilter.h:64
itk::ImageToMeshFilter< TImage, TFeatures >::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkImageToMeshFilter.h:59
itk::ImageToMeshFilter< TImage, TFeatures >::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToMeshFilter.h:58
itk::ImageToMeshFilter< TImage, TFeatures >::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToMeshFilter.h:60
itk::ImageToMeshFilter< TImage, TFeatures >::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkImageToMeshFilter.h:61