VTK
dox/Filters/General/vtkVoxelContoursToSurfaceFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkVoxelContoursToSurfaceFilter.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 =========================================================================*/
00045 #ifndef __vtkVoxelContoursToSurfaceFilter_h
00046 #define __vtkVoxelContoursToSurfaceFilter_h
00047 
00048 #include "vtkFiltersGeneralModule.h" // For export macro
00049 #include "vtkPolyDataAlgorithm.h"
00050 
00051 class VTKFILTERSGENERAL_EXPORT vtkVoxelContoursToSurfaceFilter : public vtkPolyDataAlgorithm
00052 {
00053 public:
00054   static vtkVoxelContoursToSurfaceFilter *New();
00055   vtkTypeMacro(vtkVoxelContoursToSurfaceFilter,vtkPolyDataAlgorithm);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00059 
00063   vtkSetMacro( MemoryLimitInBytes, int );
00064   vtkGetMacro( MemoryLimitInBytes, int );
00066 
00067   vtkSetVector3Macro( Spacing, double );
00068   vtkGetVectorMacro( Spacing, double, 3 );
00069 
00070 protected:
00071   vtkVoxelContoursToSurfaceFilter();
00072   ~vtkVoxelContoursToSurfaceFilter();
00073 
00074   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00075 
00076   int     MemoryLimitInBytes;
00077 
00078   double   Spacing[3];
00079 
00080   double   *LineList;
00081   int     LineListLength;
00082   int     LineListSize;
00083 
00084   double   *SortedXList;
00085   double   *SortedYList;
00086   int     SortedListSize;
00087 
00088   int     *WorkingList;
00089   int     WorkingListLength;
00090 
00091   double   *IntersectionList;
00092   int     IntersectionListLength;
00093 
00094   void    AddLineToLineList( double x1, double y1, double x2, double y2 );
00095   void    SortLineList();
00096 
00097   void    CastLines( float *slice, double gridOrigin[3],
00098                      int gridSize[3], int type );
00099 
00100   void    PushDistances( float *ptr, int gridSize[3], int chunkSize );
00101 private:
00102   vtkVoxelContoursToSurfaceFilter(const vtkVoxelContoursToSurfaceFilter&);  // Not implemented.
00103   void operator=(const vtkVoxelContoursToSurfaceFilter&);  // Not implemented.
00104 };
00105 
00106 #endif