IGSTK
|
00001 /*========================================================================= 00002 00003 Program: Image Guided Surgery Software Toolkit 00004 Module: $RCSfile: igstkBoxObjectRepresentation.h,v $ 00005 Language: C++ 00006 Date: $Date: 2008-02-11 01:41:50 $ 00007 Version: $Revision: 1.6 $ 00008 00009 Copyright (c) ISC Insight Software Consortium. All rights reserved. 00010 See IGSTKCopyright.txt or http://www.igstk.org/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 00018 #ifndef __igstkBoxObjectRepresentation_h 00019 #define __igstkBoxObjectRepresentation_h 00020 00021 #include "igstkMacros.h" 00022 #include "igstkObjectRepresentation.h" 00023 #include "igstkBoxObject.h" 00024 #include "vtkCubeSource.h" 00025 #include "igstkStateMachine.h" 00026 00027 namespace igstk 00028 { 00029 00046 class BoxObjectRepresentation 00047 : public ObjectRepresentation 00048 { 00049 00050 public: 00051 00053 igstkStandardClassTraitsMacro( BoxObjectRepresentation, ObjectRepresentation ) 00054 00055 public: 00056 00058 typedef BoxObject BoxSpatialObjectType; 00059 00061 Pointer Copy() const; 00062 00064 void RequestSetBoxObject( const BoxSpatialObjectType * boxObject ); 00065 00066 protected: 00067 00068 BoxObjectRepresentation( void ); 00069 virtual ~BoxObjectRepresentation( void ); 00070 00071 BoxObjectRepresentation(const Self&); //purposely not implemented 00072 void operator=(const Self&); //purposely not implemented 00073 00075 virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const; 00076 00078 void CreateActors(); 00079 00080 private: 00081 00083 BoxSpatialObjectType::ConstPointer m_BoxSpatialObject; 00084 00086 vtkCubeSource * m_BoxSource; 00087 00089 virtual void UpdateRepresentationProcessing(); 00090 00093 void SetBoxObjectProcessing(); 00094 00097 void NoProcessing(); 00098 00099 private: 00100 00102 igstkDeclareInputMacro( ValidBoxObject ); 00103 igstkDeclareInputMacro( NullBoxObject ); 00104 00106 igstkDeclareStateMacro( NullBoxObject ); 00107 igstkDeclareStateMacro( ValidBoxObject ); 00108 00109 BoxSpatialObjectType::ConstPointer m_BoxObjectToAdd; 00110 00111 }; 00112 00113 00114 } // end namespace igstk 00115 00116 #endif // __igstkBoxObjectRepresentation_h