18 #ifndef itkSphereMeshSource_h
19 #define itkSphereMeshSource_h
21 #include "vnl/vnl_matrix_fixed.h"
40 template <
typename TOutputMesh>
41 class ITK_TEMPLATE_EXPORT SphereMeshSource :
public MeshSource<TOutputMesh>
44 ITK_DISALLOW_COPY_AND_MOVE(SphereMeshSource);
47 using Self = SphereMeshSource;
48 using Superclass = MeshSource<TOutputMesh>;
49 using Pointer = SmartPointer<Self>;
50 using ConstPointer = SmartPointer<const Self>;
56 itkTypeMacro(SphereMeshSource, MeshSource);
59 using OutputMeshType = TOutputMesh;
60 using OMeshTraits =
typename OutputMeshType::MeshTraits;
62 using OPixelType =
typename OMeshTraits::PixelType;
65 using OutputMeshPointer =
typename OutputMeshType::Pointer;
66 using CellTraits =
typename OutputMeshType::CellTraits;
67 using PointsContainerPointer =
typename OutputMeshType::PointsContainerPointer;
68 using PointsContainer =
typename OutputMeshType::PointsContainer;
72 using CellInterfaceType = CellInterface<OPixelType, CellTraits>;
73 using TriCellType = TriangleCell<CellInterfaceType>;
74 using TriCellAutoPointer =
typename TriCellType::SelfAutoPointer;
75 using CellAutoPointer =
typename TriCellType::CellAutoPointer;
79 itkSetMacro(ResolutionX,
unsigned int);
80 itkSetMacro(ResolutionY,
unsigned int);
83 itkSetMacro(Center, OPointType);
84 itkSetMacro(Scale, OPointType);
86 itkSetMacro(Squareness1,
double);
87 itkSetMacro(Squareness2,
double);
91 ~SphereMeshSource()
override =
default;
93 PrintSelf(std::ostream & os, Indent indent)
const override;
96 GenerateData()
override;
102 unsigned int m_ResolutionX;
103 unsigned int m_ResolutionY;