ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkMetaGaussianConverter.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 __itkMetaGaussianConverter_h
00019 #define __itkMetaGaussianConverter_h
00020 
00021 #include "itkMetaConverterBase.h"
00022 #include "itkGaussianSpatialObject.h"
00023 #include "metaGaussian.h"
00024 
00025 namespace itk
00026 {
00033 template< unsigned int NDimensions = 3 >
00034 class ITK_EXPORT MetaGaussianConverter :
00035     public MetaConverterBase< NDimensions >
00036 {
00037 public:
00039   typedef MetaGaussianConverter            Self;
00040   typedef MetaConverterBase< NDimensions > Superclass;
00041   typedef SmartPointer< Self >             Pointer;
00042   typedef SmartPointer< const Self >       ConstPointer;
00043 
00045   itkNewMacro(Self);
00046 
00048   itkTypeMacro(MetaGaussianConverter, MetaConverterBase);
00049 
00050   typedef typename Superclass::SpatialObjectType SpatialObjectType;
00051   typedef typename SpatialObjectType::Pointer    SpatialObjectPointer;
00052   typedef typename Superclass::MetaObjectType    MetaObjectType;
00053 
00055   typedef GaussianSpatialObject<NDimensions>               GaussianSpatialObjectType;
00056   typedef typename GaussianSpatialObjectType::Pointer      GaussianSpatialObjectPointer;
00057   typedef typename GaussianSpatialObjectType::ConstPointer GaussianSpatialObjectConstPointer;
00058   typedef MetaGaussian                                     GaussianMetaObjectType;
00059 
00061   virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo);
00062 
00064   virtual MetaObjectType *SpatialObjectToMetaObject(const SpatialObjectType *spatialObject);
00065 
00066 protected:
00068   virtual MetaObjectType *CreateMetaObject();
00069 
00070   MetaGaussianConverter();
00071   ~MetaGaussianConverter() {}
00072 
00073 private:
00074   MetaGaussianConverter(const Self &);   //purposely not implemented
00075   void operator=(const Self &);       //purposely not implemented
00076 
00077 };
00078 } // end namespace itk
00079 
00080 #ifndef ITK_MANUAL_INSTANTIATION
00081   #include "itkMetaGaussianConverter.hxx"
00082 #endif
00083 
00084 #endif
00085