• No se han encontrado resultados

I VOLUME

8.3 Class Reference

8.3.1 DATAOBJECT

Description: Abstraction of all main data objects in the system. It forms the basis of encapsulation for all objects which contain actual visualisation data and which operate on that data.

Objects of this type are never directly instantiated.

Members:

Methods:

Data Type

RefCount

Flag_ Success

Flag_ locked

Flag_AIIocated

DATAOBJECT OK

Can Read Can Write Ref De Ref Lock Unlock

An enumerated type containing the exact type of data (e.g.

classified octree volume data, or RGB image data). This allows for a degree of runtime type checking.

A reference count for how many times this object is being referenced. This is useful in an event driven GUI where a single object may be used in a number of different windows. When the object is no longer required in one window it should not necessarily be destroyed as it might still be required in another window.

A flag which indicates that the previous operation on the data object was successful.

A flag which indicates that the data object is locked from modification. Once again this is useful in a windowed environment where one data object may be altered through many windows.

A flag which indicates that the data associated with this object (e.g.

the actual volume or image data) is currently allocated in primary memory.

Constructor. Accepts the object type as a parameter.

Returns the value of the Flag_Success member indicating the result of the previous operation.

Returns whether the object may be used in a read capacity.

Returns whether the object may be used in a write capacity.

References the object. (Increases the reference count.) De-references the object. (Decreases the reference count.) Locks the object from write modification.

Unlocks the object from write modification.

8.3.2 IMAGE

Description: Abstraction of all two dimensional image objects in the system. This object provides the common memory functions and access functions for images. Objects of this type are never directly created.

Members:

Methods:

X len Ylen

IMAGE Allocate

Access

SetSize GetXSize GetYSize

The X size of the image in pixels.

TheY size of the image in pixels.

Constructor. Accepts the image type as a parameter.

A virtual method which allocates the necessary memory for the image data based on the X and Y size of the image.

A virtual function which returns a memory pointer to the allocated image data.

Sets the X and Y size of the image.

Returns the X size of the image.

Returns the Y size of the image.

8.3.3 IMAGE_COMPPARALLEL

Description: A 32-bit per pixel image with an alpha channel for opacity. This object is used during the slice compositing process in the parallel Shear-Warp Factorisation algorithm. The imag has a secondary data structure which encodes runs of opaque or semi-transparent pixel for accelerating the compositing process.

Members: Pixel Data

Accellist

Total Pixels

A pointer to a memory block containing the pixel data for the Image.

A pointer to a memory block containing the opaque/transparent run information. This consists of an array per scan line.

The total number of pixels in the image.

Methods:

TotaiCells The maximum number of run encodings in the image.

IMAGE_COMPPARALLEL Constructor.

Clear

NewScanline

AddOpaqueCell

lsOpaque

Run

Clears the image to all black pixels with 0 opacity.

Starts a new scanline for compositing and returns a reference to a position in the list of runs.

Adds a new completely opaque pixel into the list of runs.

Validates whether the specified pixel is completely opaque or not.

Returns the number of pixels to skip or process from the specified position. (If the returned value is <0 then that number of pixels can be skipped, otherwise it is the amount that has to be processed.)

8.3.4 IMAGE_COMPPERSPECT

Description: A 32-bit per pixel image with an alpha channel for opacity. This object is used during the slice compositing process in the perspective Shear-Warp Factorisation algorithm.

The image has a secondary data structure which encodes runs of opaque or semi- transparent pixels for accelerating the compositing process. This object also allows for a re-sizing factor for each of the slices.

Members: Pixel Data

AcceiData

Total Pixels TotaiCells XMapping

A pointer to a memory block containing the pixel data for the image.

A pointer to a memory block containing the opaque/transparent run information. This consists of an array per scanline.

The total number of pixels in the image.

The maximum number of run encodings in the image.

The mapping of X pixels in the compositing slice to X pixels in the

YMapping CurDepth

image based on depth. This takes the form of a two dimensional array with each element containing a position and a count. The first dimension of the array corresponds to the depth of the slice and the second dimension corresponds to the X-position in the slice. This array is calculated using Grey-Codes and provides for the efficient scaling of slices with zero-order interpolation.

Same as XMapping except for Y pixels.

The current slice depth which is being composited.

Methods: IMAGE_COMPPERSPECT Constructor.

Clear GetlmagePtr

Initialize

SetDepth Add Pixel

Run

8.3.5 IMAGE_ RGBA

Clears the image to all black pixels with 0 opacity.

Returns a pointer to the image pixel information at a specified position.

Initialises the mapping tables based on a scaling factor for the slices (based on depth) and a slice- inversion flag.

Sets the current slice depth.

Composites a new pixel into the image. The pixel is automatically resized before compositing based on the current slice depth and the position of the pixel. Also, the run encodings are automatically updated when some of the composited pixels are completely opaque.

Returns the number of pixels to skip or process from the specified position. (If the returned value is <0 then that number of pixels can be skipped, otherwise it is the amount that has to be processed.)

Description: A 32-bit per pixel image with an alpha channel for opacity. This image is used as the output of all the rendering methods.

Members:

Methods:

Data

Total Pixels

IMAGE_RGBA Clear

GetlmagePtr

SaveBMP

SaveTGA

A pointer to a memory block containing the pixel data for the Image.

The total number of pixels in the image.

Constructor.

Clears the image to all black pixels with 0 opacity.

Returns a pointer to the image pixel information at a specified position.

Saves the Image in a file using the Microsoft Windows BMP format.

Saves the Image m a file using the Truevision TARGA Image format.

8.3.6 MATRIX3 and MATRIX4

Description: These objects implement a C++ data-type encapsulation for a 3x3 and a 4x4 matrix.

Members:

Methods:

The objects actually contain arrays of the VECTOR3 and VECTOR4 objects to contain the 1 atrix data. Numerous matrix, matrix-vector, and matrix-matrix operations are supported.

vlist

MATRIX3 MATRIX4 operator*

operator+=

A list of vectors (VECTOR3 or VECTOR4) which comprise the rows of the matrix.

Constuctor. Default and copy constructors are provided.

Performs a matrix-vector (right-handed) dot product and returns a vector.

Adds a matrix to this one.

operator-=

operator*=

operator*=

operator/=

operator[]

operator!=

operator==

Invert Transpose Det Adjoint Clear Identity

Subtracts a matrix from this one.

Multiplies this matrix with another. (right-handed) Multiplies this matrix with a scalar.

Divides this matrix by a scalar.

References a particular row vector.

Tests the inequality of two matrices.

Tests the equality of two matrices.

Inverts the matrix. (Returns TRUE if successful.) Transposes the matrix.

Returns the determinant of the matrix.

Returns the adjoint matrix for this matrix.

Clears the matrix by setting all values to one value.

Sets the matrix to the identity matrix.