ITK  6.0.0
Insight Toolkit
itkSphereMeshSource.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 itkSphereMeshSource_h
19#define itkSphereMeshSource_h
20
21#include "vnl/vnl_matrix_fixed.h"
22#include "itkMesh.h"
23#include "itkMeshSource.h"
24#include "itkVector.h"
25#include "itkTriangleCell.h"
27
28namespace itk
29{
40template <typename TOutputMesh>
41class ITK_TEMPLATE_EXPORT SphereMeshSource : public MeshSource<TOutputMesh>
42{
43public:
44 ITK_DISALLOW_COPY_AND_MOVE(SphereMeshSource);
45
47 using Self = SphereMeshSource;
48 using Superclass = MeshSource<TOutputMesh>;
49 using Pointer = SmartPointer<Self>;
50 using ConstPointer = SmartPointer<const Self>;
51
53 itkNewMacro(Self);
54
56 itkOverrideGetNameOfClassMacro(SphereMeshSource);
57
59 using OutputMeshType = TOutputMesh;
60 using OMeshTraits = typename OutputMeshType::MeshTraits;
61 using OPointType = typename OutputMeshType::PointType;
62 using OPixelType = typename OMeshTraits::PixelType;
63
65 using OutputMeshPointer = typename OutputMeshType::Pointer;
66 using CellTraits = typename OutputMeshType::CellTraits;
67 using PointsContainerPointer = typename OutputMeshType::PointsContainerPointer;
68 using PointsContainer = typename OutputMeshType::PointsContainer;
69
72 using CellInterfaceType = CellInterface<OPixelType, CellTraits>;
73 using TriCellType = TriangleCell<CellInterfaceType>;
74 using TriCellAutoPointer = typename TriCellType::SelfAutoPointer;
75 using CellAutoPointer = typename TriCellType::CellAutoPointer;
76
79 itkSetMacro(ResolutionX, unsigned int);
80 itkSetMacro(ResolutionY, unsigned int);
83 itkSetMacro(Center, OPointType);
84 itkSetMacro(Scale, OPointType);
85
86 itkSetMacro(Squareness1, double);
87 itkSetMacro(Squareness2, double);
88
89protected:
90 SphereMeshSource();
91 ~SphereMeshSource() override = default;
92 void
93 PrintSelf(std::ostream & os, Indent indent) const override;
94
95 void
96 GenerateData() override;
97
99 OPointType m_Center{};
100
102 unsigned int m_ResolutionX{};
103 unsigned int m_ResolutionY{};
104
106 OPointType m_Scale{};
107
Pixel-wise addition of two images.
SmartPointer< const Self > ConstPointer
BinaryGeneratorImageFilter< TInputImage1, TInputImage2, TOutputImage > Superclass
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....