ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 /*========================================================================= 00019 * 00020 * Portions of this file are subject to the VTK Toolkit Version 3 copyright. 00021 * 00022 * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00023 * 00024 * For complete copyright, license and disclaimer of warranty information 00025 * please refer to the NOTICE file at the top of the ITK source tree. 00026 * 00027 *=========================================================================*/ 00028 #ifndef __itkMeshRegion_h 00029 #define __itkMeshRegion_h 00030 00031 #include "itkRegion.h" 00032 #include "itkObjectFactory.h" 00033 #include "itkNumericTraits.h" 00034 #include "itkIntTypes.h" 00035 00036 namespace itk 00037 { 00051 class ITK_EXPORT MeshRegion:public Region 00052 { 00053 public: 00055 typedef MeshRegion Self; 00056 typedef Region Superclass; 00057 00059 itkTypeMacro(MeshRegion, Region); 00060 00063 MeshRegion(); 00064 00067 virtual ~MeshRegion(); 00068 00070 virtual RegionType GetRegionType() const 00071 { return Superclass::ITK_UNSTRUCTURED_REGION; } 00072 00074 SizeValueType GetNumberOfRegions() const 00075 { return m_NumberOfRegions; } 00076 00078 void SetNumberOfRegions(SizeValueType num) 00079 { 00080 if ( ( num >= 1 ) && ( num <= NumericTraits< SizeValueType >::max() ) ) 00081 { m_NumberOfRegions = num; } } 00082 00084 SizeValueType GetRegion() const 00085 { return m_Region; } 00086 00088 void SetRegion(SizeValueType region) 00089 { 00090 if ( ( region >= 1 ) && ( region <= NumericTraits< SizeValueType >::max() ) ) 00091 { m_Region = region; } } 00092 00093 private: 00094 // The maximum number of regions possible. 00095 SizeValueType m_NumberOfRegions; 00096 00097 // The specified region. 00098 SizeValueType m_Region; 00099 }; 00100 } // end namespace itk 00101 00102 #endif 00103