VTK
dox/VolumeRendering/vtkVolumePicker.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkVolumePicker.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 =========================================================================*/
00038 #ifndef __vtkVolumePicker_h
00039 #define __vtkVolumePicker_h
00040 
00041 #include "vtkCellPicker.h"
00042 
00043 class VTK_VOLUMERENDERING_EXPORT vtkVolumePicker : public vtkCellPicker
00044 {
00045 public:
00046   static vtkVolumePicker *New();
00047   vtkTypeMacro(vtkVolumePicker, vtkCellPicker);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051 
00056   vtkSetMacro(PickCroppingPlanes, int);
00057   vtkBooleanMacro(PickCroppingPlanes, int);
00058   vtkGetMacro(PickCroppingPlanes, int);
00060 
00062 
00067   vtkGetMacro(CroppingPlaneId, int);
00069 
00070 protected:
00071   vtkVolumePicker();
00072   ~vtkVolumePicker();
00073 
00074   virtual void ResetPickInfo();
00075 
00076   virtual double IntersectVolumeWithLine(const double p1[3],
00077                                          const double p2[3],
00078                                          double t1, double t2,
00079                                          vtkProp3D *prop, 
00080                                          vtkAbstractVolumeMapper *mapper);
00081 
00082   static int ClipLineWithCroppingRegion(const double bounds[6],
00083                                         const int extent[6], int flags,
00084                                         const double x1[3], const double x2[3],
00085                                         double t1, double t2,
00086                                         int &extentPlaneId, int &numSegments,
00087                                         double *t1List, double *t2List,
00088                                         double *s1List, int *planeIdList);
00089 
00090   int PickCroppingPlanes;
00091   int CroppingPlaneId;
00092 
00093 private:
00094   vtkVolumePicker(const vtkVolumePicker&);  // Not implemented.
00095   void operator=(const vtkVolumePicker&);  // Not implemented.
00096 };
00097 
00098 #endif
00099 
00100