Fovia C++ In-Process API
Public Member Functions | List of all members
IVolumeResampler Struct Referenceabstract
Inheritance diagram for IVolumeResampler:
IRoot

Public Member Functions

virtual signed int AskInterface (const BGUID *piid, IRoot **ppr)=0
 
virtual signed int CalcVoiFromDim (CROP_BOX_PARAMS *cbp, VECTOR3L dim)=0
 
virtual signed int DecRef ()=0
 
virtual signed int IncRef ()=0
 
virtual signed int RepositionToCenter (IVolumeData *vd, signed int Width, signed int Height, signed int Depth, IVolumeData *CenteredVd)=0
 
virtual signed int ResampleToIsotropicSlices (IVolumeData *vd)=0
 
- Public Member Functions inherited from IRoot
template<class T >
signed int AskInterface (T **pp)
 

Detailed Description

Volume data manipulation functions.

Member Function Documentation

virtual signed int IVolumeResampler::AskInterface ( const BGUID piid,
IRoot **  ppr 
)
pure virtual

Queries this object to see if the interface piid is supported and returns the result in ppr.

Parameters
piidThe BGUID of the requested interface.
pprThe address of an IRoot pointer which will receive the new interface.
Returns
S_OK if the interface is supported. E_FAIL if it is not.

Implements IRoot.

virtual signed int IVolumeResampler::CalcVoiFromDim ( CROP_BOX_PARAMS cbp,
VECTOR3L  dim 
)
pure virtual

Calculates the volume of interest for a volume containing dim dimensions. The assumption is that 0,0,0 will be defined as the exact center of the data set.

Parameters
cbpThe structure to output the VOI information.
dimThe dimensions of the volume in question.
virtual signed int IVolumeResampler::DecRef ( )
pure virtual

Decreases the reference count on this object by 1. If the reference count reaches 0, the object is deallocated.

Implements IRoot.

virtual signed int IVolumeResampler::IncRef ( )
pure virtual

Increases the reference count on this object by 1. You do not need to call this after an object is first created. It is 1 by default.

Implements IRoot.

virtual signed int IVolumeResampler::RepositionToCenter ( IVolumeData vd,
signed int  Width,
signed int  Height,
signed int  Depth,
IVolumeData CenteredVd 
)
pure virtual

This function will place the smaller volume vd into a volume of size Width, Height, and Depth pointed to by CenteredVd. The buffers and information for the resultant volume is created by this function, so passing in a newly created IVolumeData is sufficient.

Parameters
vdInput volume.
WidthOutput volume width.
HeightOutput volume height.
DepthOutput volume depth.
CenteredVdOutput volume.
virtual signed int IVolumeResampler::ResampleToIsotropicSlices ( IVolumeData vd)
pure virtual

This function will take a volume that may have missing slices or is unevenly spaced and resample the volume to have regularly. spaced slices.

If VOLUME_DATA_PARAMS::Spacing for z is 0, this function will attempt to choose the proper spacing by taking the median distance between slices in the volume. If VOLUME_DATA_PARAMS::Spacing for z is set, then that value is taken as the preferred slice spacing.

This function will NOT resample slices if they are placed the preferred slice spacing apart. It will only create new slices when necessary.

Note
Memory allocation/deallocation will be done by the default allocator UNLESS a custom allocator is attached to the volume. In that case the custom allocator will be used. This is crucial for memory mapped volume data since we may need to release some mapped files.
Parameters
vdThe volume data. The Spacing, Dimension, and ImagePositionPatient fields must be valid on this volume or the function will fail. If the function succeeds, ImagePositionPatient will be removed and all other parameters will be updated to the new specifications