Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _VTKPOINTSETSLICER_H_
00019 #define _VTKPOINTSETSLICER_H_
00020
00021 #include <iostream>
00022 #include "MitkExtExports.h"
00023
00024 #include "vtkVersion.h"
00025
00026 class vtkCutter;
00027 class vtkPlane;
00028 class vtkPointLocator;
00029 class vtkCell;
00030 class vtkDataArray;
00031 class vtkCellArray;
00032 class vtkPointData;
00033 class vtkCellData;
00034
00035 #include "mitkCommon.h"
00036 #include "MitkExtExports.h"
00037
00038 #include "vtkPolyDataAlgorithm.h"
00039
00040 class MitkExt_EXPORT vtkPointSetSlicer : public vtkPolyDataAlgorithm
00041 {
00042 public:
00043 vtkTypeMacro(vtkPointSetSlicer,vtkPolyDataAlgorithm);
00044
00045 void PrintSelf(std::ostream& os, vtkIndent indent);
00046
00047
00048
00049
00050 static vtkPointSetSlicer *New();
00051
00052
00053
00054
00055 unsigned long GetMTime();
00056
00057
00058
00059 virtual void SetSlicePlane(vtkPlane*);
00060 vtkGetObjectMacro(SlicePlane,vtkPlane);
00061
00062
00063
00064
00065
00066 vtkSetMacro(GenerateCutScalars,int);
00067 vtkGetMacro(GenerateCutScalars,int);
00068 vtkBooleanMacro(GenerateCutScalars,int);
00069
00070
00071
00072
00073 void SetLocator(vtkPointLocator *locator);
00074 vtkGetObjectMacro(Locator,vtkPointLocator);
00075
00076
00077
00078
00079 void CreateDefaultLocator();
00080
00081
00082
00083
00084
00085 static void GetCellTypeDimensions(unsigned char* cellTypeDimensions);
00086
00087 protected:
00088 vtkPointSetSlicer(vtkPlane* cf = 0);
00089 ~vtkPointSetSlicer();
00090
00091 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00092 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00093 virtual int FillInputPortInformation(int port, vtkInformation *info);
00094
00095 void UnstructuredGridCutter(vtkDataSet *input, vtkPolyData *output);
00096
00097 void ContourUnstructuredGridCell(vtkCell* cell,
00098 vtkDataArray* cellScalars, vtkPointLocator* locator,
00099 vtkCellArray* verts, vtkCellArray* lines,
00100 vtkCellArray* polys, vtkPointData* inPd,
00101 vtkPointData* outPd, vtkCellData* inCd,
00102 vtkIdType cellId, vtkCellData* outCd);
00103
00104 vtkPlane *SlicePlane;
00105 vtkCutter *Cutter;
00106
00107 vtkPointLocator *Locator;
00108 int GenerateCutScalars;
00109
00110 private:
00111 vtkPointSetSlicer(const vtkPointSetSlicer&);
00112 void operator=(const vtkPointSetSlicer&);
00113
00114 static int edges[12][2];
00115
00116 typedef int EDGE_LIST;
00117 typedef struct {
00118 EDGE_LIST edges[8];
00119 } POLY_CASES;
00120
00121 static POLY_CASES polyCases[256];
00122 };
00123
00124
00125 #endif