Fovia's C++ Client/Server API
Public Member Functions | Public Attributes | List of all members
VOLUME_DATA_PARAMS Struct Reference

Public Member Functions

VOLUME_DATA_PARAMSoperator= (const VOLUME_DATA_PARAMS &r)
 
 VOLUME_DATA_PARAMS (const VOLUME_DATA_PARAMS &r)
 

Public Attributes

signed int BitsPerPixel
 
signed int cbSize
 
DATABYTEData
 
signed int DataOffset
 
ENUM_DATA_TYPE DataType
 
VECTOR3L Dimension
 
signed int HighBit
 
VECTOR3DImageOrientationX
 
VECTOR3DImageOrientationY
 
VECTOR3DImagePositionPatient
 
signed int ImagePositionPatientSortIndex
 
signed int Nonregular2Regular
 
ENUM_DATA_ORGANIZATION Organization
 
MATRIX44D Orientation
 
MATRIX44D OrientationUser
 
signed int RelevantBits
 
signed int Reserved
 
VECTOR3D Spacing
 
signed int Tag
 
CROP_BOX_PARAMS Voi
 

Detailed Description

Volume data params structure describes a dataset for the rendering engine.

Member Data Documentation

signed int VOLUME_DATA_PARAMS::BitsPerPixel

Number of actual stored bits per pixel. This must be 16. For example, if this is a dataset with 16 bits reserved for each pixel, but only contains values from 0-4095, this value should be 16 because that's how many bits are stored for a pixel.

signed int VOLUME_DATA_PARAMS::cbSize

Structure size.

DATABYTE* VOLUME_DATA_PARAMS::Data

This is a DATABYTE* for legacy reasons, but should be treated as an unsigned short**. That is, Data is an array of pointers to arrays of unsigned shorts. For example, if you wanted to iterate through every voxel in the dataset, this is the loop you could use:

unsigned short **pData = (unsigned short**)vdp.Data;
for(int z = 0; z < vdp.Dimension.z; z++) {
for(int y = 0; y < vdp.Dimension.y; y++) {
for(int x = 0; x < vdp.Dimension.x; x++) {
// Obviously, this is very inefficient. This code is here for illustrative purposes.
unsigned short curValue = pData[z][(y*Dimension.x) + x];
}
}
}

If you are using the C++ in-process API (or the Server API), you can either allocate this data using the default library allocator, or you can define your own custom allocator and attach it to the IVolumeData interface so that it is properly deallocated when its reference count reaches 0.

signed int VOLUME_DATA_PARAMS::DataOffset

Reserved for future use.

ENUM_DATA_TYPE VOLUME_DATA_PARAMS::DataType

Flags describing the pixel presentation of the data. Currently, only DT_SIGNED is supported.

VECTOR3L VOLUME_DATA_PARAMS::Dimension

Volume data dimensions. X is the width of each slice. Y is the height of each slice. Z is the number of slices.

signed int VOLUME_DATA_PARAMS::HighBit

Bit which corrosponds to the highest relevant bit. This must be RelevantBits-1.

VECTOR3D* VOLUME_DATA_PARAMS::ImageOrientationX

Used by IVolumeResampler in the C++ in-process API. This is ignored by the rendering engine. Use the Orientation field to describe the volume orientation.

VECTOR3D* VOLUME_DATA_PARAMS::ImageOrientationY

Used by IVolumeResampler in the C++ in-process API. This is ignored by the rendering engine. Use the Orientation field to describe the volume orientation.

VECTOR3D* VOLUME_DATA_PARAMS::ImagePositionPatient

Used by IVolumeResampler in the C++ in-process API. This is ignored by the rendering engine. Use the Orientation field to describe the volume location.

signed int VOLUME_DATA_PARAMS::ImagePositionPatientSortIndex

Used internally by the Fovia DICOM loader. This is ignored by the rendering engine.

signed int VOLUME_DATA_PARAMS::Nonregular2Regular

Used internally by the Fovia DICOM loader. This is ignored by the rendering engine.

ENUM_DATA_ORGANIZATION VOLUME_DATA_PARAMS::Organization

Volume data organization. This must be DO_SLICE.

MATRIX44D VOLUME_DATA_PARAMS::Orientation

This structure establishes the volume's location in volume coordinates. As defined in RENDER_PARAMS::Transform, the X vector describes the direction from left to right for every slice. The Y vector describes the direction from top to bottom for every slice. The Z vector is the direction from the first slice to the last slice (and if you use the Fovia dataset loaders, the length of that vector is the distance from the first slice to the last slice). The offset vector is currently ignored. Instead, the exact center of the volume is used at the origin.

MATRIX44D VOLUME_DATA_PARAMS::OrientationUser

User defined orientation. If you set this when defining a dataset, you can call GetVolumeDataParams() and get this value back. Otherwise, the SDK will ignore this.

signed int VOLUME_DATA_PARAMS::RelevantBits

Number of relevant bits per pixel. For RT_THIN_* rendering types, this number can be from 2-16. For all other rendering types, 10-15 are the supported values. For example, if this is a dataset with 16 bits reserved for each pixel, but only contains values from 0-4095, this value should be 12 because 0-4095 fits in 12 bits.

signed int VOLUME_DATA_PARAMS::Reserved

Reserved for future use.

VECTOR3D VOLUME_DATA_PARAMS::Spacing

Spacing between voxels for each axis. Note that currently, the X and Y spacing are expected to be identical and are treated as such internally.

signed int VOLUME_DATA_PARAMS::Tag

User defined value. If you set this when defining a dataset, you can call GetVolumeDataParams() and get this value back. Otherwise, the SDK will ignore this.

CROP_BOX_PARAMS VOLUME_DATA_PARAMS::Voi
Deprecated:
If you wish to crop the volume, use RENDER_PARAMS::CutPlanes.