VTK
dox/Interaction/Widgets/vtkResliceCursor.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkResliceCursor.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 =========================================================================*/
00034 #ifndef __vtkResliceCursor_h
00035 #define __vtkResliceCursor_h
00036 
00037 #include "vtkInteractionWidgetsModule.h" // For export macro
00038 #include "vtkObject.h"
00039 
00040 class vtkImageData;
00041 class vtkPolyData;
00042 class vtkPlane;
00043 class vtkPlaneCollection;
00044 
00045 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursor : public vtkObject
00046 {
00047 public:
00048   vtkTypeMacro(vtkResliceCursor,vtkObject);
00049 
00050   static vtkResliceCursor *New();
00051 
00053 
00054   virtual void SetImage(vtkImageData * );
00055   vtkGetObjectMacro( Image, vtkImageData );
00057 
00059 
00060   virtual void SetCenter( double, double, double );
00061   virtual void SetCenter( double center[3] );
00062   vtkGetVector3Macro( Center, double );
00064 
00066 
00067   vtkSetVector3Macro( Thickness, double );
00068   vtkGetVector3Macro( Thickness, double );
00070 
00072 
00073   vtkSetMacro( ThickMode, int );
00074   vtkGetMacro( ThickMode, int );
00075   vtkBooleanMacro( ThickMode, int );
00077 
00079   virtual vtkPolyData * GetPolyData();
00080 
00082   virtual vtkPolyData * GetCenterlineAxisPolyData( int axis );
00083 
00085   virtual void PrintSelf(ostream& os, vtkIndent indent);
00086 
00090   virtual vtkPlane * GetPlane( int n );
00091 
00093   virtual void Update();
00094 
00096 
00097   vtkGetVector3Macro( XAxis, double );
00098   vtkGetVector3Macro( YAxis, double );
00099   vtkGetVector3Macro( ZAxis, double );
00100   vtkSetVector3Macro( XAxis, double );
00101   vtkSetVector3Macro( YAxis, double );
00102   vtkSetVector3Macro( ZAxis, double );
00103   virtual double * GetAxis( int i );
00105 
00107 
00109   vtkSetMacro( Hole, int );
00110   vtkGetMacro( Hole, int );
00112 
00114 
00115   vtkSetMacro( HoleWidth, double );
00116   vtkGetMacro( HoleWidth, double );
00118 
00120 
00122   vtkSetMacro( HoleWidthInPixels, double );
00123   vtkGetMacro( HoleWidthInPixels, double );
00125 
00127   virtual unsigned long int GetMTime();
00128 
00132   virtual void Reset();
00133 
00134 protected:
00135   vtkResliceCursor();
00136   ~vtkResliceCursor();
00137 
00138   virtual void BuildCursorGeometry();
00139   virtual void BuildPolyData();
00140   virtual void BuildCursorTopology();
00141   virtual void BuildCursorTopologyWithHole();
00142   virtual void BuildCursorTopologyWithoutHole();
00143   virtual void BuildCursorGeometryWithoutHole();
00144   virtual void BuildCursorGeometryWithHole();
00145   virtual void ComputeAxes();
00146 
00147   int           ThickMode;
00148   int           Hole;
00149   double        HoleWidth;
00150   double        HoleWidthInPixels;
00151   double        Thickness[3];
00152   double        Center[3];
00153   double        XAxis[3];
00154   double        YAxis[3];
00155   double        ZAxis[3];
00156   vtkImageData *Image;
00157   vtkPolyData  *PolyData;
00158 
00159   vtkPolyData  *CenterlineAxis[3];
00160 
00161   vtkPlaneCollection * ReslicePlanes;
00162   vtkTimeStamp  PolyDataBuildTime;
00163 
00164 private:
00165   vtkResliceCursor(const vtkResliceCursor&);  // Not implemented.
00166   void operator=(const vtkResliceCursor&);  // Not implemented.
00167 };
00168 
00169 #endif