ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkMeshToPolyDataFilter.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 * https://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 itkMeshToPolyDataFilter_h
19#define itkMeshToPolyDataFilter_h
20
21#include "itkProcessObject.h"
22#include "itkPolyData.h"
23
24#include <type_traits>
25
26namespace itk
27{
28
29template <typename TInputType, typename = void>
30struct HasCellTraits : std::false_type
31{};
32
33template <typename TInputType>
34struct HasCellTraits<TInputType, std::void_t<typename TInputType::CellTraits>> : std::true_type
35{};
36
55template <typename TInputMesh>
57{
58public:
59 ITK_DISALLOW_COPY_AND_MOVE(MeshToPolyDataFilter);
60
61 static constexpr unsigned int PointDimension = TInputMesh::PointDimension;
62
63 using InputMeshType = TInputMesh;
64
70
72
74 itkOverrideGetNameOfClassMacro(MeshToPolyDataFilter);
75
77 itkNewMacro(Self);
78
81 void
82 SetInput(const InputMeshType * input);
83
85 const InputMeshType *
86 GetInput() const;
87
88 const InputMeshType *
89 GetInput(unsigned int idx) const;
90
93 const PolyDataType *
94 GetOutput() const;
95
97 GetOutput(unsigned int idx);
98
99protected:
101 ~MeshToPolyDataFilter() override = default;
102
103 void
104 PrintSelf(std::ostream & os, Indent indent) const override;
105
106 void
107 GenerateData() override;
108
109 template <typename TInputMeshDispatch,
110 typename std::enable_if<!HasCellTraits<TInputMeshDispatch>::value, int>::type = 0>
111 void
113
114 template <typename TInputMeshDispatch,
115 typename std::enable_if<HasCellTraits<TInputMeshDispatch>::value, int>::type = 0>
116 void
118
123
124private:
125 class VisitCellsClass;
126};
127} // namespace itk
128
129#ifndef ITK_MANUAL_INSTANTIATION
130# include "itkMeshToPolyDataFilter.hxx"
131#endif
132
133#endif // itkMeshToPolyDataFilter
Control indentation during Print() invocation.
Definition itkIndent.h:53
PolyDataType * GetOutput()
const PolyDataType * GetOutput() const
ProcessObject::DataObjectPointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) override
Make a DataObject of the correct type to used as the specified output.
PolyDataType * GetOutput(unsigned int idx)
PolyData< typename InputMeshType::PixelType > PolyDataType
void SetInput(const InputMeshType *input)
~MeshToPolyDataFilter() override=default
const InputMeshType * GetInput() const
void PrintSelf(std::ostream &os, Indent indent) const override
void GenerateData() override
MeshToPolyDataFilter< InputMeshType > Self
ProcessObject::DataObjectPointer MakeOutput(const ProcessObject::DataObjectIdentifierType &) override
Make a DataObject of the correct type to used as the specified output.
const InputMeshType * GetInput(unsigned int idx) const
Geometry class compatible with vtk.js PolyData.
Definition itkPolyData.h:36
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
DataObject::Pointer DataObjectPointer
DataObject::DataObjectIdentifierType DataObjectIdentifierType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
STL namespace.