vtkModelMirrorLogic.h

Go to the documentation of this file.
00001 #ifndef __vtkModelMirrorLogic_h
00002 #define __vtkModelMirrorLogic_h
00003 
00004 // Slicer includes
00005 #include "vtkSlicerModuleLogic.h"
00006 
00007 // MRML includes
00008 #include "vtkMRMLScene.h"
00009 
00010 // VTKSYS includes
00011 #include <vtksys/SystemTools.hxx>
00012 
00013 // VTK includes
00014 #include "vtkObject.h"
00015 #include "vtkMatrix4x4.h"
00016 #include "vtkPolyData.h"
00017 #include "vtkMRMLModelNode.h"
00018 #include "vtkMRMLLinearTransformNode.h"
00019 #include "vtkMRMLModelMirrorNode.h"
00020 
00021 // STL includes
00022 #include <string>
00023 #include <vector>
00024 #include <map>
00025 #include <iterator>
00026 
00027 #include "vtkSlicerModelMirrorModuleLogicExport.h"
00028 
00029 // TODO Node registration needs to be done in the Logic. See RegisterNodes
00030 
00031 class vtkIntArray;
00032 
00033 class VTK_SLICER_MODELMIRROR_MODULE_LOGIC_EXPORT vtkModelMirrorLogic : public vtkSlicerModuleLogic
00034 {
00035   public:
00036   static vtkModelMirrorLogic *New();
00037   vtkTypeMacro(vtkModelMirrorLogic,vtkSlicerModuleLogic);
00038   void PrintSelf(ostream& os, vtkIndent indent);
00039 
00040   // Description:
00041   // These methods are used to turn observers on/off when module is entered/exited.
00042   virtual void Enter ( );
00043   virtual void Exit ( ) ;
00044   
00045   virtual void ProcessMRMLEvents ( vtkObject *caller, unsigned long event,
00046                                    void *callData );
00047 
00048   // Description:
00049   // Get/Set MRML node storing parameter values
00050   vtkGetObjectMacro (ModelMirrorNode, vtkMRMLModelMirrorNode);
00051   virtual void SetModelMirrorNode( vtkMRMLModelMirrorNode *node )
00052       {
00053         vtkSetMRMLNodeMacro ( this->ModelMirrorNode, node );
00054       }
00055   
00056   // Description:
00057   // Get/Set MRML node storing parameter values
00058   void SetAndObserveModelMirrorNode(vtkMRMLModelMirrorNode *n) 
00059       {
00060       vtkSetAndObserveMRMLNodeMacro( this->ModelMirrorNode, n);
00061       }
00062 
00063   virtual vtkIntArray* NewObservableEvents();
00064 
00065   vtkGetObjectMacro ( MirrorMatrix, vtkMatrix4x4);
00066 
00067   vtkGetObjectMacro ( MirrorTransformNode, vtkMRMLLinearTransformNode );
00068   vtkSetObjectMacro ( MirrorTransformNode, vtkMRMLLinearTransformNode );
00069 
00070   
00071   virtual void CreateMirrorModel ();
00072   virtual void CreateMirrorTransform ( );
00073   virtual void DeleteMirrorTransform ( );
00074   virtual void CreateMirrorMatrix( );
00075   virtual int HardenTransform();
00076   virtual int  FlipNormals();
00077   virtual int PositionInHierarchy();
00078 
00079  protected:
00080   vtkModelMirrorLogic();
00081   ~vtkModelMirrorLogic();
00082   vtkModelMirrorLogic(const vtkModelMirrorLogic&);
00083   void operator=(const vtkModelMirrorLogic&);
00084 
00085   bool Visited;
00086   bool Raised;
00087   vtkMRMLModelMirrorNode *ModelMirrorNode;
00088   vtkMRMLLinearTransformNode *MirrorTransformNode;
00089   vtkMatrix4x4 *MirrorMatrix;
00090   
00091 };
00092 
00093 
00094 #endif
00095 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1