#include "BrushFilter.h"
-baseFilterManualPaint::baseFilterManualPaint()
-{
- _graylevel = 0.0;
- _2D3D = 1; // 0 2D , 1 true 3D
- _direction = 0; // 1 XZ , 0 YZ , 2 XY
- _minX = 0;
- _minY = 0;
- _minZ = 0;
- _maxX = 0;
- _maxY = 0;
- _maxZ = 0;
-
- _pMinX = 0;
- _pMinY = 0;
- _pMinZ = 0;
- _pMaxX = 0;
- _pMaxY = 0;
- _pMaxZ = 0;
-
-}
-
-//---------------------------------------------------------------------------
-baseFilterManualPaint::~baseFilterManualPaint() // virtual
-{
-}
-
-//---------------------------------------------------------------------------
-void baseFilterManualPaint::Run() // virtual
-{
-}
-
-
-//---------------------------------------------------------------------------
-void baseFilterManualPaint::SetGrayLevel( double graylevel )
-{
- _graylevel = graylevel;
-}
-
-//---------------------------------------------------------------------------
-void baseFilterManualPaint::Set2D3D( int dim2D3D )
-{
- _2D3D = dim2D3D;
-}
-
-//---------------------------------------------------------------------------
-void baseFilterManualPaint::SetDirection(int direction)
-{
- _direction = direction;
-}
-
-//---------------------------------------------------------------------------
-void baseFilterManualPaint::SetPoint(int px,int py, int pz)
-{
- _px=px;
- _py=py;
- _pz=pz;
-}
-
-//---------------------------------------------------------------------------
-void baseFilterManualPaint::SetImage(vtkImageData *image)
-{
- _image=image;
- int ext[6];
- _image->GetWholeExtent(ext);
- _minX=0;
- _minY=0;
- _minZ=0;
- _maxX=ext[1]-ext[0];
- _maxY=ext[3]-ext[2];
- _maxZ=ext[5]-ext[4];
-}
-
-//---------------------------------------------------------------------------
-void baseFilterManualPaint::ResetGeneralMinMax()
-{
- _pMinX=10000;
- _pMinY=10000;
- _pMinZ=10000;
- _pMaxX=-10000;
- _pMaxY=-10000;
- _pMaxZ=-10000;
-}
-
-
-//---------------------------------------------------------------------------
-void baseFilterManualPaint::SetGeneralMinMax(int minX,int maxX,int minY,int maxY,int minZ,int maxZ)
-{
- if (_pMinX>minX)
- {
- _pMinX=minX;
- }
-
- if (_pMinY>minY)
- {
- _pMinY=minY;
- }
-
- if (_pMinZ>minZ)
- {
- _pMinZ=minZ;
- }
-
- if (_pMaxX<maxX)
- {
- _pMaxX=maxX;
- }
-
- if (_pMaxY<maxY)
- {
- _pMaxY=maxY;
- }
-
- if (_pMaxZ<maxZ)
- {
- _pMaxZ=maxZ;
- }
-
-}
-
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
BrushFilter::BrushFilter()