vtkMRMLInteractionNode.h

Go to the documentation of this file.
00001 #ifndef __vtkMRMLInteractionNode_h
00002 #define __vtkMRMLInteractionNode_h
00003 
00004 #include "vtkMRML.h"
00005 #include "vtkMRMLNode.h"
00006 
00007 class VTK_MRML_EXPORT vtkMRMLInteractionNode : public vtkMRMLNode
00008 {
00009 public:
00010   static vtkMRMLInteractionNode *New();
00011   vtkTypeMacro(vtkMRMLInteractionNode,vtkMRMLNode);
00012   void PrintSelf(ostream& os, vtkIndent indent);
00013   
00014   //--------------------------------------------------------------------------
00016   //--------------------------------------------------------------------------
00017   virtual vtkMRMLNode* CreateNodeInstance();
00018 
00021   virtual void ReadXMLAttributes( const char** atts);
00022 
00025   virtual void WriteXML(ostream& of, int indent);
00026 
00029   virtual void Copy(vtkMRMLNode *node);
00030 
00033   virtual const char* GetNodeTagName() {return "Interaction";};
00034   
00037   vtkGetMacro (CurrentInteractionMode, int );
00038   void SetCurrentInteractionMode ( int mode );
00039   vtkGetMacro (LastInteractionMode, int );
00040   void SetLastInteractionMode (int mode );
00041   
00042   vtkGetMacro (PickModePersistence, int );
00043   vtkGetMacro (PlaceModePersistence, int);
00044   vtkGetMacro (TransformModePersistence, int );
00045 
00046   //--- workaround for mouse modes.
00047   //--- put on when fiducials are placed.
00048   //--- turned off by callback to window/level.
00049   vtkGetMacro (WindowLevelLock, int );
00050   vtkSetMacro (WindowLevelLock, int );
00051   
00052   //--- workaround for mouse modes.
00053   //--- put on when an object is mid-place
00054   //--- (between mouse-press and mouse-release)
00055   //--- to prevent PickAndManipulate operations
00056   //--- from being processed while placing.
00057   vtkGetMacro (PlaceOperationLock, int );
00058   vtkSetMacro (PlaceOperationLock, int );
00059 
00060   // Description:
00061   // Convenience methods for setting modes
00062   // without triggering events on the node.
00063   // These methods assist in distinguishing between
00064   // persistent and transient mouse modes.
00065   // TransformMode is persistent by default,
00066   // and Pick or Place are transient by default.
00067   virtual void SetPickModePersistence ( int val );
00068   virtual void SetPlaceModePersistence (int val );
00069   virtual void SetTransformModePersistence ( int val );
00070   virtual void NormalizeAllMouseModes();
00071   
00072   //BTX
00074   enum
00075     {
00076       PickManipulate = 0,
00077       SelectRegion,
00078       LassoRegion,
00079       Place,
00080       ViewPan,
00081       ViewZoom,
00082       ViewRotate,
00083       ViewTransform,
00084     };
00086   enum
00087     {
00088       InteractionModeChangedEvent = 19001,
00089       TransientTimeoutEvent,
00090     };
00091   //ETX 
00092 
00093   //BTX
00094   int PickModePersistence;
00095   int PlaceModePersistence;
00096   int TransformModePersistence;
00097   //ETX
00098 
00101   const char *GetInteractionModeAsString(int mode);
00104   int GetInteractionModeByString ( const char * modeString );
00105 
00106   int WindowLevelLock;
00107   int PlaceOperationLock;
00108   
00109 protected:
00110   vtkMRMLInteractionNode();
00111   ~vtkMRMLInteractionNode();
00112   vtkMRMLInteractionNode(const vtkMRMLInteractionNode&);
00113   void operator=(const vtkMRMLInteractionNode&);
00114 
00116   int LastInteractionMode;
00118   int CurrentInteractionMode;
00119 };
00120 
00121 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1