Technical Manual

Global State GUI Window2D Polygon Drawing Window3D MeshObject (UPDATED FOR 2000) MeshOptions (NEW FOR 2000) VoxData

Module Cohesion and Coupling

Testing and Planning

Design Analysis

VoxelData Member Functions

(created by Sanjay)

 

ReadRawGreyData

DESCRIPTION
read in a 3D raw data file consisting of greylevel values.

PARAMETERS
filename = input, name of raw grey data file
extents = input, dimensions of data file
eLen = input, length in bytes of 1 element (use sizeof)
eMin = input, min value of an element
eMax = input, max value of an element

PRE : none

POST : data read into grey_data, dimensions of data in data_*len

RETURNS
1 if successful, -1 if not.

 

ReadDicomGreyData
DESCRIPTION
read in a 3D dicom data file consisting of greylevel values.

PARAMETERS
filename = input, name of dicom data file

PRE : none

POST : data read into grey_data, dimensions of data in data_*len

RETURNS
1 if successful, -1 if not.


ReadRawSegData
DESCRIPTION
read in a raw data file consisting of segmentation values.

PARAMETERS
filename = input, name of raw data file

PRE :
grey_data read in
dimensions of data file same as grey_data
data file consists of byte long elements

POST :
data read into seg_data and into seg_data_unlabelled

RETURNS
1 if successful, -1 if not.

 

WriteRawSegData
DESCRIPTION
write segmenation data into raw file <filename.raw, and info about the data
(dimensions, element length) in <filename.info

PARAMETERS
filename = input, name of raw data file

PRE : seg_data is not empty

POST : raw data written to <filename.raw and info to <filename.info

RETURNS
1 if successful, -1 if not.

 

ReadDicomSegData
DESCRIPTION
read in a dicom data file consisting of segmentation values.

PARAMETERS
filename = input, name of dicom data file

PRE
grey_data read in
dimensions of data file same as grey_data
data file consists of byte long elements

POST
data read into seg_data and into seg_data_unlabelled

RETURNS
1 if successful, -1 if not.

 

WriteDicomSegData(char* filename)
DESCRIPTION
write segmenation data into dicom file <filename

PARAMETERS
filename = input, name of dicom data file

PRE
seg_data is not empty

POST
data written to dicom file <filename

RETURNS
1 if successful, -1 if not.

 

ReadAsciiColorLabels
DESCRIPTION
read in ascii data file consisting of color-label info

PARAMETERS
filename = input, name of ascii data file

PRE
none

POST
data read into color_label

RETURNS
1 if successful, -1 if not.

 

WriteAsciiColorLabels
DESCRIPTION
write color-labels into ascii file <filename

PARAMETERS
filename = input, name of ascii data file

PRE
none

POST
color-labels written to <filename

RETURNS
1 if successful, -1 if not.

 

GetColorLabelProperties
DESCRIPTION
give back color label info for given color label index

PARAMETERS
index = input, index of desired color label
rgb = output, color values of color label
label = output, string associated with color label

PRE
none

POST
color label info read into rgb and label

RETURNS
1 if successful, -1 if not.

 

SetColorLabelProperties
DESCRIPTION
set color label info for given color label index

PARAMETERS
index = input, index of desired color label
rgb = input, color values of color label
label = input, string associated with color label

PRE
none

POST
rgb and label set in color label

RETURNS
1 if successful, -1 if not.

 

GetGreyImageSlice
DESCRIPTION
get a desired grey image slice in a desired direction (X,Y,Z)

PARAMETERS
dir = input, desired direction (X, Y, Z)
slicenum = input, desired slice (0 - length of data in direction)
buff = output, desired image slice

PRE
none

POST
desired image slice read into buff
returned slice coords :-

^
|
|
|
|
|
(0,0).-----------

RETURNS
1 if successful, -1 if not.

 

GetSegImageSlice
DESCRIPTION
get a desired segmentation slice in a desired direction (X,Y,Z)

PARAMETERS
dir = input, desired direction (X, Y, Z)
slicenum = input, desired slice (0 - length of data in direction)
buff = output, desired segmentation slice

PRE
none

POST
desired segmentation slice read into buff
returned slice coords :-

^
|
|
|
|
|
(0,0).-----------

RETURNS
1 if successful, -1 if not.

 

SetVoxelSegmentation
DESCRIPTION
set a voxel in seg_data to be a desired color_label index, and the same
voxel to 255 in seg_data_unlabelled

PARAMETERS
xyz = input, desired voxel coordinates
val = input, index of color_label that voxel should be labelled

PRE
none

POST
voxel xyz in seg_data is set to val, and in seg_data_unlabelled to 255

RETURNS
1 if successful, -1 if not.


 

GetNearestSegVoxel
DESCRIPTION
get the nearest labelled voxel to coordinates xyz in seg_data

PARAMETERS
xyz = input, voxel coordinates

PRE
none

POST
none

RETURNS
coordinates of nearest labelled voxel to coordinates xyz in seg_data

 

GetAllSegData

DESCRIPTION
get all segmented voxels

PARAMETERS
none

PRE
none

POST
none

RETURNS
seg_data_unlabelled

 

GetVolumeExtents
DESCRIPTION
get dimensions of voxel data set

PARAMETERS
none

PRE
none

POST
none

RETURNS
dimensions of voxel data set

 

Xlen
DESCRIPTION
get length in X direction of voxel data set

 

Ylen
DESCRIPTION
get length in Y direction of voxel data set

 

Zlen
DESCRIPTION
get length in Z direction of voxel data set

 

GetVoxelScaleFactor
DESCRIPTION
get relative dimensions of each voxel

PARAMETERS
sf = output, relative dimensions of voxel

PRE
none

POST
relative dimensions read into sf

RETURNS
1 if successful, -1 if not

 

SetVoxelScaleFactor
DESCRIPTION
set relative dimensions of each voxel

PARAMETERS
sf = input, relative dimensions of voxel

PRE
none

POST
relative dimenions sf stored in voxel_scale_factor

RETURNS
1 if successful, -1 if not

 
 

DATA MEMBERS :-

  private:
dimensions of data
int data_Xlen, data_Ylen, data_Zlen;

grey level vox data
my2byte*** grey_data;

segmentation data
mybyte*** seg_data;

segmentation data, but without label info.
if voxel is within segmented area, val = 255 else val = 0.
this is for iso-surface generation.
vtkStructuredPoints* seg_data_unlabelled;
ColorLabelStruct color_labels[MAX_COLOR_LABELS]; color labels

  public:
relative dimensions of a voxel, each between 0.0 and 1.0
float vox_scale_factor[3];
 
 
 
 
 

 

Main

Users Manual
Technical Manual
Source Code
Download
Contact