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

Graphics/vtkVoxelContoursToSurfaceFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkVoxelContoursToSurfaceFilter.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00060 #ifndef __vtkVoxelContoursToSurfaceFilter_h
00061 #define __vtkVoxelContoursToSurfaceFilter_h
00062 
00063 #include "vtkPolyDataToPolyDataFilter.h"
00064 
00065 class VTK_GRAPHICS_EXPORT vtkVoxelContoursToSurfaceFilter : public vtkPolyDataToPolyDataFilter
00066 {
00067 public:
00068   static vtkVoxelContoursToSurfaceFilter *New();
00069   vtkTypeRevisionMacro(vtkVoxelContoursToSurfaceFilter,vtkPolyDataToPolyDataFilter);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071 
00073 
00077   vtkSetMacro( MemoryLimitInBytes, int );
00078   vtkGetMacro( MemoryLimitInBytes, int );
00080 
00081   vtkSetVector3Macro( Spacing, float );
00082   vtkGetVectorMacro( Spacing, float, 3 );
00083 
00084 protected:
00085   vtkVoxelContoursToSurfaceFilter();
00086   ~vtkVoxelContoursToSurfaceFilter();
00087 
00088   void    Execute();
00089 
00090   int     MemoryLimitInBytes;
00091 
00092   float   Spacing[3];
00093 
00094   float   *LineList;
00095   int     LineListLength;
00096   int     LineListSize;
00097 
00098   float   *SortedXList;
00099   float   *SortedYList;
00100   int     SortedListSize;
00101 
00102   int     *WorkingList;
00103   int     WorkingListLength;
00104 
00105   float   *IntersectionList;
00106   int     IntersectionListLength;
00107 
00108   void    AddLineToLineList( float x1, float y1, float x2, float y2 );
00109   void    SortLineList();
00110   
00111   void    CastLines( float *slice, float gridOrigin[3], 
00112                      int gridSize[3], int type );
00113 
00114   void    PushDistances( float *ptr, int gridSize[3], int chunkSize );
00115 private:
00116   vtkVoxelContoursToSurfaceFilter(const vtkVoxelContoursToSurfaceFilter&);  // Not implemented.
00117   void operator=(const vtkVoxelContoursToSurfaceFilter&);  // Not implemented.
00118 };
00119 
00120 #endif
00121 
00122