ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkSphereMeshSource.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 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 
28 namespace itk
29 {
40 template< typename TOutputMesh >
41 class SphereMeshSource:public MeshSource< TOutputMesh >
42 {
43 public:
49 
51  itkNewMacro(Self);
52 
54  itkTypeMacro(SphereMeshSource, MeshSource);
55 
57  typedef TOutputMesh OutputMeshType;
58  typedef typename OutputMeshType::MeshTraits OMeshTraits;
59  typedef typename OutputMeshType::PointType OPointType;
60  typedef typename OMeshTraits::PixelType OPixelType;
61 
63  typedef typename OutputMeshType::Pointer OutputMeshPointer;
64  typedef typename OutputMeshType::CellTraits CellTraits;
65  typedef typename OutputMeshType::PointsContainerPointer PointsContainerPointer;
66  typedef typename OutputMeshType::PointsContainer PointsContainer;
67 
72  typedef typename TriCellType::SelfAutoPointer TriCellAutoPointer;
73  typedef typename TriCellType::CellAutoPointer CellAutoPointer;
74 
77  itkSetMacro(ResolutionX, unsigned int);
78  itkSetMacro(ResolutionY, unsigned int);
80 
81  itkSetMacro(Center, OPointType);
82  itkSetMacro(Scale, OPointType);
83 
84  itkSetMacro(Squareness1, double);
85  itkSetMacro(Squareness2, double);
86 
87 protected:
90  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
91 
92  void GenerateData() ITK_OVERRIDE;
93 
96 
98  unsigned int m_ResolutionX;
99  unsigned int m_ResolutionY;
100 
103 
107 
108 private:
109  SphereMeshSource(const Self &); //purposely not implemented
110  void operator=(const Self &); //purposely not implemented
111 };
112 } // end namespace itk
113 #ifndef ITK_MANUAL_INSTANTIATION
114 #include "itkSphereMeshSource.hxx"
115 #endif
116 #endif
Light weight base class for most itk classes.
SmartPointer< Self > Pointer
OutputMeshType::CellTraits CellTraits
OutputMeshType::MeshTraits OMeshTraits
An abstract interface for cells.
Base class for all process objects that output mesh data.
Definition: itkMeshSource.h:49
OutputMeshType::PointsContainerPointer PointsContainerPointer
TriCellType::CellAutoPointer CellAutoPointer
MeshSource< TOutputMesh > Superclass
Input the center and resolutions in 2 directions(verizon and horizon) to create a sphere-like deforma...
SmartPointer< const Self > ConstPointer
TriCellType::SelfAutoPointer TriCellAutoPointer
OMeshTraits::PixelType OPixelType
void PrintSelf(std::ostream &os, Indent indent) const override
void GenerateData() override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
CellInterface< OPixelType, CellTraits > CellInterfaceType
OutputMeshType::Pointer OutputMeshPointer
TriangleCell< CellInterfaceType > TriCellType
OutputMeshType::PointsContainer PointsContainer
OutputMeshType::PointType OPointType