Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkVoxelContoursToSurfaceFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkVoxelContoursToSurfaceFilter.h,v $
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 =========================================================================*/
00056 #ifndef __vtkVoxelContoursToSurfaceFilter_h
00057 #define __vtkVoxelContoursToSurfaceFilter_h
00058 
00059 #include "vtkPolyDataToPolyDataFilter.h"
00060 
00061 class VTK_GRAPHICS_EXPORT vtkVoxelContoursToSurfaceFilter : public vtkPolyDataToPolyDataFilter
00062 {
00063 public:
00064   static vtkVoxelContoursToSurfaceFilter *New();
00065   vtkTypeRevisionMacro(vtkVoxelContoursToSurfaceFilter,vtkPolyDataToPolyDataFilter);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067 
00069 
00073   vtkSetMacro( MemoryLimitInBytes, int );
00074   vtkGetMacro( MemoryLimitInBytes, int );
00076 
00077   vtkSetVector3Macro( Spacing, double );
00078   vtkGetVectorMacro( Spacing, double, 3 );
00079 
00080 protected:
00081   vtkVoxelContoursToSurfaceFilter();
00082   ~vtkVoxelContoursToSurfaceFilter();
00083 
00084   void    Execute();
00085 
00086   int     MemoryLimitInBytes;
00087 
00088   double   Spacing[3];
00089 
00090   double   *LineList;
00091   int     LineListLength;
00092   int     LineListSize;
00093 
00094   double   *SortedXList;
00095   double   *SortedYList;
00096   int     SortedListSize;
00097 
00098   int     *WorkingList;
00099   int     WorkingListLength;
00100 
00101   double   *IntersectionList;
00102   int     IntersectionListLength;
00103 
00104   void    AddLineToLineList( double x1, double y1, double x2, double y2 );
00105   void    SortLineList();
00106   
00107   void    CastLines( float *slice, double gridOrigin[3], 
00108                      int gridSize[3], int type );
00109 
00110   void    PushDistances( float *ptr, int gridSize[3], int chunkSize );
00111 private:
00112   vtkVoxelContoursToSurfaceFilter(const vtkVoxelContoursToSurfaceFilter&);  // Not implemented.
00113   void operator=(const vtkVoxelContoursToSurfaceFilter&);  // Not implemented.
00114 };
00115 
00116 #endif
00117 
00118