FreeMat: vtkImageCanvasSource2D

FreeMat

- Main Page
- Related Pages

vtkImageCanvasSource2D

Section: Visualization Toolkit Imaging Classes

# Usage

vtkImageCanvasSource2D is a source that starts as a blank image. you may add to the image with two-dimensional drawing routines. It can paint multi-spectral images.

To create an instance of class vtkImageCanvasSource2D, simply invoke its constructor as follows

      obj = vtkImageCanvasSource2D

# Methods

The class vtkImageCanvasSource2D has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkImageCanvasSource2D class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkImageCanvasSource2D = obj.NewInstance ()`
- `vtkImageCanvasSource2D = obj.SafeDownCast (vtkObject o)`
- `obj.SetDrawColor (double , double , double , double )` - Set/Get DrawColor. This is the value that is used when filling data or drawing lines. Default is (0,0,0,0)
- `obj.SetDrawColor (double a[4])` - Set/Get DrawColor. This is the value that is used when filling data or drawing lines. Default is (0,0,0,0)
- `double = obj. GetDrawColor ()` - Set/Get DrawColor. This is the value that is used when filling data or drawing lines. Default is (0,0,0,0)
- `obj.SetDrawColor (double a)` - Set DrawColor to (a, b, 0, 0)
- `obj.SetDrawColor (double a, double b)` - Set DrawColor to (a, b, c, 0)
- `obj.SetDrawColor (double a, double b, double c)` - Set the pixels inside the box (min0, max0, min1, max1) to the current DrawColor
- `obj.FillBox (int min0, int max0, int min1, int max1)` - Set the pixels inside the box (min0, max0, min1, max1) to the current DrawColor
- `obj.FillTube (int x0, int y0, int x1, int y1, double radius)` - Set the pixels inside the box (min0, max0, min1, max1) to the current DrawColor
- `obj.FillTriangle (int x0, int y0, int x1, int y1, int x2, int y2)` - Set the pixels inside the box (min0, max0, min1, max1) to the current DrawColor
- `obj.DrawCircle (int c0, int c1, double radius)` - Set the pixels inside the box (min0, max0, min1, max1) to the current DrawColor
- `obj.DrawPoint (int p0, int p1)` - Set the pixels inside the box (min0, max0, min1, max1) to the current DrawColor
- `obj.DrawSegment (int x0, int y0, int x1, int y1)` - Set the pixels inside the box (min0, max0, min1, max1) to the current DrawColor
- `obj.DrawSegment3D (double p0, double p1)` - Set the pixels inside the box (min0, max0, min1, max1) to the current DrawColor
- `obj.DrawSegment3D (double x1, double y1, double z1, double x2, double y2, double z2)` - Draw subimage of the input image in the canvas at position x0 and y0. The subimage is defined with sx, sy, width, and height.
- `obj.DrawImage (int x0, int y0, vtkImageData i)` - Draw subimage of the input image in the canvas at position x0 and y0. The subimage is defined with sx, sy, width, and height.
- `obj.DrawImage (int x0, int y0, vtkImageData , int sx, int sy, int width, int height)` - Draw subimage of the input image in the canvas at position x0 and y0. The subimage is defined with sx, sy, width, and height.
- `obj.FillPixel (int x, int y)` - Fill a colored area with another color. (like connectivity) All pixels connected (and with the same value) to pixel (x, y) get replaced by the current "DrawColor".
- `obj.SetExtent (int extent)` - These methods set the WholeExtent of the output It sets the size of the canvas. Extent is a min max 3D box. Minimums and maximums are inclusive.
- `obj.SetExtent (int x1, int x2, int y1, int y2, int z1, int z2)` - These methods set the WholeExtent of the output It sets the size of the canvas. Extent is a min max 3D box. Minimums and maximums are inclusive.
- `obj.SetDefaultZ (int )` - The drawing operations can only draw into one 2D XY plane at a time. If the canvas is a 3D volume, then this z value is used as the default for 2D operations. The default is 0.
- `int = obj.GetDefaultZ ()` - The drawing operations can only draw into one 2D XY plane at a time. If the canvas is a 3D volume, then this z value is used as the default for 2D operations. The default is 0.
- `obj.SetRatio (double , double , double )` - Set/Get Ratio. This is the value that is used to pre-multiply each (x, y, z) drawing coordinates (including DefaultZ). The default is (1, 1, 1)
- `obj.SetRatio (double a[3])` - Set/Get Ratio. This is the value that is used to pre-multiply each (x, y, z) drawing coordinates (including DefaultZ). The default is (1, 1, 1)
- `double = obj. GetRatio ()` - Set/Get Ratio. This is the value that is used to pre-multiply each (x, y, z) drawing coordinates (including DefaultZ). The default is (1, 1, 1)
- `obj.SetNumberOfScalarComponents (int i)` - Set the number of scalar components
- `int = obj.GetNumberOfScalarComponents () const` - Set the number of scalar components
- `obj.SetScalarTypeToFloat ()` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `obj.SetScalarTypeToDouble ()` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `obj.SetScalarTypeToInt ()` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `obj.SetScalarTypeToUnsignedInt ()` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `obj.SetScalarTypeToLong ()` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `obj.SetScalarTypeToUnsignedLong ()` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `obj.SetScalarTypeToShort ()` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `obj.SetScalarTypeToUnsignedShort ()` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `obj.SetScalarTypeToUnsignedChar ()` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `obj.SetScalarTypeToChar ()` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `obj.SetScalarType (int )` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility
- `int = obj.GetScalarType () const` - Set/Get the data scalar type (i.e VTK_DOUBLE). Note that these methods are setting and getting the pipeline scalar type. i.e. they are setting the type that the image data will be once it has executed. Until the REQUEST_DATA pass the actual scalars may be of some other type. This is for backwards compatibility