ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkMetaVesselTubeConverter.h
Go to the documentation of this file.
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 __itkMetaVesselTubeConverter_h
00019 #define __itkMetaVesselTubeConverter_h
00020 
00021 #include "metaVesselTube.h"
00022 #include "itkMetaConverterBase.h"
00023 #include "itkVesselTubeSpatialObject.h"
00024 
00030 namespace itk
00031 {
00037 template< unsigned int NDimensions = 3 >
00038 class ITK_EXPORT MetaVesselTubeConverter :
00039     public MetaConverterBase< NDimensions >
00040 {
00041 public:
00043   typedef MetaVesselTubeConverter          Self;
00044   typedef MetaConverterBase< NDimensions > Superclass;
00045   typedef SmartPointer< Self >             Pointer;
00046   typedef SmartPointer< const Self >       ConstPointer;
00047 
00049   itkNewMacro(Self);
00050 
00052   itkTypeMacro(MetaVesselTubeConverter, MetaConverterBase);
00053 
00054   typedef typename Superclass::SpatialObjectType SpatialObjectType;
00055   typedef typename SpatialObjectType::Pointer    SpatialObjectPointer;
00056   typedef typename Superclass::MetaObjectType    MetaObjectType;
00057 
00059   typedef VesselTubeSpatialObject<NDimensions>               VesselTubeSpatialObjectType;
00060   typedef typename VesselTubeSpatialObjectType::Pointer      VesselTubeSpatialObjectPointer;
00061   typedef typename VesselTubeSpatialObjectType::ConstPointer VesselTubeSpatialObjectConstPointer;
00062   typedef MetaVesselTube                                     VesselTubeMetaObjectType;
00063 
00065   virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo);
00066 
00068   virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject);
00069 
00070 protected:
00072   virtual MetaObjectType *CreateMetaObject();
00073 
00074   MetaVesselTubeConverter();
00075   ~MetaVesselTubeConverter() {}
00076 
00077 private:
00078   MetaVesselTubeConverter(const Self &);   //purposely not implemented
00079   void operator=(const Self &);       //purposely not implemented
00080 
00081 };
00082 
00083 } // end namespace itk
00084 
00085 #ifndef ITK_MANUAL_INSTANTIATION
00086   #include "itkMetaVesselTubeConverter.hxx"
00087 #endif
00088 
00089 #endif
00090