Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkSpatialObjectDuplicator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSpatialObjectDuplicator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007-01-28 19:24:57 $
00007   Version:   $Revision: 1.2 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkSpatialObjectDuplicator_h
00018 #define __itkSpatialObjectDuplicator_h
00019 
00020 #include "itkObject.h"
00021 #include "itkSpatialObject.h"
00022 
00023 namespace itk
00024 {
00025 
00029 template <class TInputSpatialObject>
00030 class ITK_EXPORT SpatialObjectDuplicator : public Object 
00031 {
00032 public:
00034   typedef SpatialObjectDuplicator   Self;
00035   typedef Object                    Superclass;
00036   typedef SmartPointer<Self>        Pointer;
00037   typedef SmartPointer<const Self>  ConstPointer;
00038 
00040   itkNewMacro(Self);
00041 
00043   itkTypeMacro(SpatialObjectDuplicator, Object);
00044 
00046   typedef TInputSpatialObject                        SpatialObjectType;
00047   typedef typename TInputSpatialObject::Pointer      SpatialObjectPointer;
00048   typedef typename TInputSpatialObject::ConstPointer SpatialObjectConstPointer;
00049 
00050   itkStaticConstMacro(ObjectDimension, unsigned int,
00051                       SpatialObjectType::ObjectDimension);
00052 
00053   typedef SpatialObject<itkGetStaticConstMacro(ObjectDimension)> 
00054                                                      InternalSpatialObjectType;
00055 
00057   itkSetConstObjectMacro(Input,SpatialObjectType);
00058 
00060   itkGetObjectMacro(Output,SpatialObjectType);
00061 
00063   void Update(void);
00064 
00065 protected:
00066   SpatialObjectDuplicator();
00067   virtual ~SpatialObjectDuplicator() {};
00068   void PrintSelf(std::ostream& os, Indent indent) const;
00069 
00070   void CopyObject(const InternalSpatialObjectType* source,
00071                   InternalSpatialObjectType* destination);
00072 
00073 private:
00074   SpatialObjectDuplicator(const Self&); //purposely not implemented
00075   void operator=(const Self&); //purposely not implemented
00076   
00077   SpatialObjectConstPointer   m_Input;
00078   SpatialObjectPointer        m_Output;
00079   unsigned long               m_InternalSpatialObjectTime;
00080   
00081 };
00082 
00083 } // end namespace itk
00084 
00085 
00086 #ifndef ITK_MANUAL_INSTANTIATION
00087 #include "itkSpatialObjectDuplicator.txx"
00088 #endif
00089 
00090 #endif /* __itkSpatialObjectDuplicator_h */
00091 

Generated at Mon Jul 12 2010 19:56:22 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000