VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkResliceCursorLineRepresentation.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00037 #ifndef __vtkResliceCursorLineRepresentation_h 00038 #define __vtkResliceCursorLineRepresentation_h 00039 00040 #include "vtkResliceCursorRepresentation.h" 00041 00042 class vtkPolyData; 00043 class vtkResliceCursorActor; 00044 class vtkResliceCursorPolyDataAlgorithm; 00045 class vtkResliceCursorPicker; 00046 class vtkResliceCursor; 00047 00048 00049 class VTK_WIDGETS_EXPORT vtkResliceCursorLineRepresentation : public vtkResliceCursorRepresentation 00050 { 00051 public: 00053 static vtkResliceCursorLineRepresentation *New(); 00054 00056 00057 vtkTypeMacro(vtkResliceCursorLineRepresentation,vtkResliceCursorRepresentation); 00058 void PrintSelf(ostream& os, vtkIndent indent); 00060 00062 00063 virtual void BuildRepresentation(); 00064 virtual int ComputeInteractionState(int X, int Y, int modify=0); 00065 virtual void StartWidgetInteraction(double startEventPos[2]); 00066 virtual void WidgetInteraction(double e[2]); 00067 virtual void Highlight(int highlightOn); 00069 00071 00072 virtual void ReleaseGraphicsResources(vtkWindow *w); 00073 virtual int RenderOverlay(vtkViewport *viewport); 00074 virtual int RenderOpaqueGeometry(vtkViewport *viewport); 00075 virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport); 00076 virtual int HasTranslucentPolygonalGeometry(); 00078 00081 virtual double * GetBounds(); 00082 00084 00086 vtkGetObjectMacro( ResliceCursorActor, vtkResliceCursorActor ); 00088 00090 virtual vtkResliceCursor * GetResliceCursor(); 00091 00093 virtual void SetUserMatrix( vtkMatrix4x4 *matrix); 00094 00095 protected: 00096 vtkResliceCursorLineRepresentation(); 00097 ~vtkResliceCursorLineRepresentation(); 00098 00099 virtual vtkResliceCursorPolyDataAlgorithm * GetCursorAlgorithm(); 00100 00101 double RotateAxis( double evenPos[2], int axis ); 00102 00103 void RotateAxis( int axis, double angle ); 00104 00105 void RotateVectorAboutVector( double vectorToBeRotated[3], 00106 double axis[3], // vector about which we rotate 00107 double angle, // angle in radians 00108 double o[3] ); 00109 int DisplayToReslicePlaneIntersection( 00110 double displayPos[2], double intersectionPos[3] ); 00111 00112 vtkResliceCursorActor * ResliceCursorActor; 00113 vtkResliceCursorPicker * Picker; 00114 00115 double StartPickPosition[3]; 00116 double StartCenterPosition[3]; 00117 00118 // Transformation matrices. These have no offset. Offset is recomputed 00119 // based on the cursor, so that the center of the cursor has the same 00120 // location in transformed space as it does in physical space. 00121 vtkMatrix4x4 * MatrixReslice; 00122 vtkMatrix4x4 * MatrixView; 00123 vtkMatrix4x4 * MatrixReslicedView; 00124 00125 private: 00126 vtkResliceCursorLineRepresentation(const vtkResliceCursorLineRepresentation&); //Not implemented 00127 void operator=(const vtkResliceCursorLineRepresentation&); //Not implemented 00128 }; 00129 00130 #endif