00001 //============================================================================= 00002 // This file is part of VTKEdge. See vtkedge.org for more information. 00003 // 00004 // Copyright (c) 2010 Kitware, Inc. 00005 // 00006 // VTKEdge may be used under the terms of the BSD License 00007 // Please see the file Copyright.txt in the root directory of 00008 // VTKEdge for further information. 00009 // 00010 // Alternatively, you may see: 00011 // 00012 // http://www.vtkedge.org/vtkedge/project/license.html 00013 // 00014 // 00015 // For custom extensions, consulting services, or training for 00016 // this or any other Kitware supported open source project, please 00017 // contact Kitware at sales@kitware.com. 00018 // 00019 // 00020 //============================================================================= 00021 00028 #ifndef __vtkKWEPaintbrushDrawingStatistics_h 00029 #define __vtkKWEPaintbrushDrawingStatistics_h 00030 00031 #include "vtkAlgorithm.h" 00032 #include "VTKEdgeConfigure.h" 00033 #include "vtkKWEPaintbrushEnums.h" 00034 #include <vtkstd/vector> 00035 00036 class vtkKWEPaintbrushDrawing; 00037 class vtkKWEPaintbrushSketch; 00038 00039 class VTKEdge_WIDGETS_EXPORT vtkKWEPaintbrushDrawingStatistics 00040 : public vtkAlgorithm 00041 { 00042 public: 00044 00045 static vtkKWEPaintbrushDrawingStatistics *New(); 00046 vtkTypeRevisionMacro(vtkKWEPaintbrushDrawingStatistics, vtkAlgorithm); 00047 void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 virtual void SetInput( vtkKWEPaintbrushDrawing * ); 00052 00054 00055 virtual int ProcessRequest(vtkInformation*, 00056 vtkInformationVector**, 00057 vtkInformationVector*); 00059 00062 double GetVolume(); 00063 00065 double GetVolume( int n ); 00066 00068 double GetVolume( vtkKWEPaintbrushSketch * ); 00069 00071 double GetLabelVolume( vtkKWEPaintbrushEnums::LabelType ); 00072 00074 vtkKWEPaintbrushDrawing * GetDrawing(); 00075 00076 protected: 00077 vtkKWEPaintbrushDrawingStatistics(); 00078 ~vtkKWEPaintbrushDrawingStatistics(); 00079 00081 00082 virtual int FillInputPortInformation(int, vtkInformation*); 00083 virtual int RequestData(vtkInformation* request, 00084 vtkInformationVector** inputVector, 00085 vtkInformationVector* outputVector); 00087 00088 vtkstd::vector< double > Volumes; 00089 double Volume; 00090 unsigned long * VolumesArray; 00091 unsigned long MaximumLabelValue; 00092 00093 private: 00094 vtkKWEPaintbrushDrawingStatistics( const vtkKWEPaintbrushDrawingStatistics& ); 00095 void operator=(const vtkKWEPaintbrushDrawingStatistics&); 00096 }; 00097 00098 #endif 00099
1.7.1