29 #ifndef __vtkImageCanvasSource2D_h
30 #define __vtkImageCanvasSource2D_h
32 #include "vtkImagingSourcesModule.h"
33 #include "vtkImageAlgorithm.h"
42 void PrintSelf(ostream& os, vtkIndent indent);
47 vtkSetVector4Macro(DrawColor,
double);
48 vtkGetVector4Macro(DrawColor,
double);
60 this->SetDrawColor(a, b, c, 0.0);}
66 void FillBox(
int min0,
int max0,
int min1,
int max1);
67 void FillTube(
int x0,
int y0,
int x1,
int y1,
double radius);
68 void FillTriangle(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
69 void DrawCircle(
int c0,
int c1,
double radius);
70 void DrawPoint(
int p0,
int p1);
71 void DrawSegment(
int x0,
int y0,
int x1,
int y1);
72 void DrawSegment3D(
double *p0,
double *p1);
74 double x2,
double y2,
double z2)
75 {
double p1[3], p2[3];
76 p1[0] = x1; p1[1] = y1; p1[2] = z1; p2[0] = x2; p2[1] = y2; p2[2] = z2;
77 this->DrawSegment3D(p1, p2);}
84 { this->DrawImage(x0, y0, i, -1, -1, -1, -1); }
85 void DrawImage(
int x0,
int y0, vtkImageData*,
int sx,
int sy,
86 int width,
int height);
92 void FillPixel(
int x,
int y);
98 void SetExtent(
int *extent);
99 void SetExtent(
int x1,
int x2,
int y1,
int y2,
int z1,
int z2);
106 vtkSetMacro(DefaultZ,
int);
107 vtkGetMacro(DefaultZ,
int);
114 vtkSetVector3Macro(Ratio,
double);
115 vtkGetVector3Macro(Ratio,
double);
120 virtual void SetNumberOfScalarComponents(
int i);
121 virtual int GetNumberOfScalarComponents()
const;
134 {this->SetScalarType(VTK_UNSIGNED_INT);};
137 {this->SetScalarType(VTK_UNSIGNED_LONG);};
140 {this->SetScalarType(VTK_UNSIGNED_SHORT);};
142 {this->SetScalarType(VTK_UNSIGNED_CHAR);};
144 {this->SetScalarType(VTK_CHAR);};
145 void SetScalarType(
int);
146 int GetScalarType()
const;
162 int ClipSegment(
int &a0,
int &a1,
int &b0,
int &b1);
164 virtual int RequestInformation (vtkInformation *,
165 vtkInformationVector**,
166 vtkInformationVector *);
167 virtual int RequestData (vtkInformation *,
168 vtkInformationVector**,
169 vtkInformationVector *);
void SetScalarTypeToInt()
void SetScalarTypeToUnsignedInt()
void SetScalarTypeToDouble()
void DrawImage(int x0, int y0, vtkImageData *i)
void SetScalarTypeToUnsignedShort()
void SetScalarTypeToShort()
void SetScalarTypeToUnsignedChar()
void SetDrawColor(double a, double b, double c)
void SetScalarTypeToLong()
void SetDrawColor(double a)
void SetScalarTypeToUnsignedLong()
void DrawSegment3D(double x1, double y1, double z1, double x2, double y2, double z2)
void SetDrawColor(double a, double b)
void SetScalarTypeToFloat()
void SetScalarTypeToChar()