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 #ifndef __itkMetaFEMObjectConverter_h 00019 #define __itkMetaFEMObjectConverter_h 00020 00021 00022 #include "metaFEMObject.h" 00023 #include "itkFEMObjectSpatialObject.h" 00024 #include "itkMetaConverterBase.h" 00025 00026 namespace itk 00027 { 00028 00043 template< unsigned int NDimensions = 3 > 00044 class ITK_EXPORT MetaFEMObjectConverter : 00045 public MetaConverterBase< NDimensions > 00046 { 00047 public: 00049 typedef MetaFEMObjectConverter Self; 00050 typedef MetaConverterBase< NDimensions > Superclass; 00051 typedef SmartPointer< Self > Pointer; 00052 typedef SmartPointer< const Self > ConstPointer; 00053 00055 itkNewMacro(Self); 00056 00058 itkTypeMacro(MetaFEMObjectConverter, MetaConverterBase); 00059 00060 typedef typename Superclass::SpatialObjectType SpatialObjectType; 00061 typedef typename SpatialObjectType::Pointer SpatialObjectPointer; 00062 typedef typename Superclass::MetaObjectType MetaObjectType; 00063 00065 typedef FEMObjectSpatialObject<NDimensions> FEMObjectSpatialObjectType; 00066 typedef typename FEMObjectSpatialObjectType::Pointer FEMObjectSpatialObjectPointer; 00067 typedef typename FEMObjectSpatialObjectType::ConstPointer FEMObjectSpatialObjectConstPointer; 00068 typedef MetaFEMObject FEMObjectMetaObjectType; 00069 00071 virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo); 00072 00074 virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject); 00075 00076 protected: 00078 virtual MetaObjectType *CreateMetaObject(); 00079 00080 MetaFEMObjectConverter(); 00081 ~MetaFEMObjectConverter() {} 00082 00083 private: 00084 MetaFEMObjectConverter(const Self &); //purposely not implemented 00085 void operator=(const Self &); //purposely not implemented 00086 00087 }; 00088 } // end namespace itk 00089 00090 #ifndef ITK_MANUAL_INSTANTIATION 00091 #include "itkMetaFEMObjectConverter.hxx" 00092 #endif 00093 00094 00095 #endif 00096