2 #include "ManualPaintModel.h"
5 ManualPaintModel::ManualPaintModel()
7 _tool = 0; // 0 pencil , 1 fill
8 _brushfilter = new BrushFilter();
9 _fillfilter = new FillFilter();
12 //---------------------------------------------------------------------------
13 ManualPaintModel::~ManualPaintModel()
19 //---------------------------------------------------------------------------
20 void ManualPaintModel::PaintImage(int px,int py, int pz)
24 _brushfilter->SetPoint(px,py,pz);
29 _fillfilter->SetPoint(px,py,pz);
34 //---------------------------------------------------------------------------
35 void ManualPaintModel::SetTool( int tool )
40 //---------------------------------------------------------------------------
41 void ManualPaintModel::Set2D3D( int dim2D3D )
43 _brushfilter->Set2D3D(dim2D3D);
44 _fillfilter->Set2D3D(dim2D3D);
48 //---------------------------------------------------------------------------
49 void ManualPaintModel::SetImage(vtkImageData *image)
51 _brushfilter->SetImage(image);
52 _fillfilter->SetImage(image);
55 //---------------------------------------------------------------------------
56 void ManualPaintModel::SetGrayLevel( double graylevel )
58 _brushfilter->SetGrayLevel(graylevel);
59 _fillfilter->SetGrayLevel(graylevel);
62 //---------------------------------------------------------------------------
63 void ManualPaintModel::SetRangeMin( unsigned int min )
65 _brushfilter->SetRangeMin(min);
66 _fillfilter->SetRangeMin(min);
69 //---------------------------------------------------------------------------
70 void ManualPaintModel::SetRangeMax( unsigned int max )
72 _brushfilter->SetRangeMax(max);
73 _fillfilter->SetRangeMax(max);
76 //---------------------------------------------------------------------------
77 void ManualPaintModel::SetDirection(int direction)
79 _brushfilter->SetDirection(direction);
80 _fillfilter->SetDirection(direction);
84 //---------------------------------------------------------------------------
85 void ManualPaintModel::SetBrushSize( int brushsize )
87 _brushfilter->SetBrushSize(brushsize);
91 //---------------------------------------------------------------------------
92 void ManualPaintModel::SetBrushForm( int brushform )
94 _brushfilter->SetBrushForm(brushform);
97 //---------------------------------------------------------------------------
98 void ManualPaintModel::SetToleranceFill(double tolerancefill)
100 _fillfilter->SetToleranceFill(tolerancefill);
103 //---------------------------------------------------------------------------
104 void ManualPaintModel::SetDistanceFill(int distancefill)
106 _fillfilter->SetDistanceFill(distancefill);