00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00045 #ifndef __vtkVoxelContoursToSurfaceFilter_h
00046 #define __vtkVoxelContoursToSurfaceFilter_h
00047 
00048 #include "vtkPolyDataAlgorithm.h"
00049 
00050 class VTK_GRAPHICS_EXPORT vtkVoxelContoursToSurfaceFilter : public vtkPolyDataAlgorithm
00051 {
00052 public:
00053   static vtkVoxelContoursToSurfaceFilter *New();
00054   vtkTypeMacro(vtkVoxelContoursToSurfaceFilter,vtkPolyDataAlgorithm);
00055   void PrintSelf(ostream& os, vtkIndent indent);
00056 
00058 
00062   vtkSetMacro( MemoryLimitInBytes, int );
00063   vtkGetMacro( MemoryLimitInBytes, int );
00065 
00066   vtkSetVector3Macro( Spacing, double );
00067   vtkGetVectorMacro( Spacing, double, 3 );
00068 
00069 protected:
00070   vtkVoxelContoursToSurfaceFilter();
00071   ~vtkVoxelContoursToSurfaceFilter();
00072 
00073   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00074 
00075   int     MemoryLimitInBytes;
00076 
00077   double   Spacing[3];
00078 
00079   double   *LineList;
00080   int     LineListLength;
00081   int     LineListSize;
00082 
00083   double   *SortedXList;
00084   double   *SortedYList;
00085   int     SortedListSize;
00086 
00087   int     *WorkingList;
00088   int     WorkingListLength;
00089 
00090   double   *IntersectionList;
00091   int     IntersectionListLength;
00092 
00093   void    AddLineToLineList( double x1, double y1, double x2, double y2 );
00094   void    SortLineList();
00095   
00096   void    CastLines( float *slice, double gridOrigin[3], 
00097                      int gridSize[3], int type );
00098 
00099   void    PushDistances( float *ptr, int gridSize[3], int chunkSize );
00100 private:
00101   vtkVoxelContoursToSurfaceFilter(const vtkVoxelContoursToSurfaceFilter&);  
00102   void operator=(const vtkVoxelContoursToSurfaceFilter&);  
00103 };
00104 
00105 #endif