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

Public Member Functions

virtual signed int AskInterface (const BGUID *piid, IRoot **ppr)=0
 
virtual signed int DecRef ()=0
 
virtual signed int IncRef ()=0
 
virtual signed int IsLibraryLoaded (signed int *loadStatus)=0
 
virtual signed int LoadDICOMFromFileList (ILiteDICOMFile **files, signed int numFiles, const char **PathName)=0
 
virtual signed int LoadSeriesFromDICOMFiles (IVolumeData *vd, ILiteDICOMFile **files, signed int numFiles, const char *seriesUID)=0
 
virtual signed int ReadFromDICOMDirectory (IVolumeData *vd, const char *PathName)=0
 
virtual signed int ReadFromDICOMMemMap (IVolumeData *vd, const char *PathName)=0
 
virtual signed int ReadFromRawFile (IVolumeData *vd, const char *PathName, const signed int Dimensions[3], const signed int DataType, const signed int SliceOffset, const signed int FileOffset)=0
 
virtual signed int ReadFromRawFileEx (IVolumeData *vd, RAW_DATASET_DESCRIPTION *rawDatasetDescription)=0
 
virtual signed int ReadFromSEGYFile (IVolumeData *vd, const char *FileName)=0
 
virtual signed int SaveToRawFile (IVolumeData *vd, const char *PathName, const signed int SliceOffset, const signed int SliceNum)=0
 
virtual signed int ScanDICOMDirectory (ILiteDICOMFile ***files, signed int *numFiles, const char *PathName)=0
 
virtual signed int SetTaskProgress (struct ITaskProgress *piTaskProgress, signed long long taskID)=0
 
- Public Member Functions inherited from IRoot
template<class T >
signed int AskInterface (T **pp)
 

Detailed Description

The IVolumeUtil interface contains utilities for loading data sets from disk.

Member Function Documentation

virtual signed int IVolumeUtil::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 IVolumeUtil::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 IVolumeUtil::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 IVolumeUtil::IsLibraryLoaded ( signed int *  loadStatus)
pure virtual

Returns if DICOM loader is ready to load files. As of now this checks whether the DICOM data dictionary is loaded. The function will be expanded to make sure DICOM loader is correctly initialized. This function should be called before any function to load DICOM dataset is called

Parameters
loadStatusis a bool and provides the status if library was correctly loaded.
virtual signed int IVolumeUtil::LoadDICOMFromFileList ( ILiteDICOMFile **  files,
signed int  numFiles,
const char **  PathName 
)
pure virtual

Given a list of paths to files, this function will load the files into the provided array of ILiteDICOMFile pointers.

Parameters
filesArray to populate with the new ILiteDICOMFile interface pointers.
numFilesNumber of files to load.
PathNameArray of strings describing the paths to the files to load.
virtual signed int IVolumeUtil::LoadSeriesFromDICOMFiles ( IVolumeData vd,
ILiteDICOMFile **  files,
signed int  numFiles,
const char *  seriesUID 
)
pure virtual

Loads the series specified by UID from the files represented by the list files. It is not required that the list be in the correct order and images that aren't in the series may exist in the list.

Parameters
vdIVolumeData that will be initialized with the series specified.
filesList of ILiteDICOMFile pointers that contains the entire series requested.
numFilesNumber of ILiteDICOMFile objects in files list.
seriesUIDUID for the series to load.
virtual signed int IVolumeUtil::ReadFromDICOMDirectory ( IVolumeData vd,
const char *  PathName 
)
pure virtual

Reads a data set from a DICOM directory. Currently only supports directories containing a single DICOM series.

Parameters
vdIVolumeData object to receive the information about the loaded volume.
PathNameString containing the path to the directory containing DICOM files.
virtual signed int IVolumeUtil::ReadFromDICOMMemMap ( IVolumeData vd,
const char *  PathName 
)
pure virtual

Reads a data set from a DICOM memory mapped files. Currently only supports a single DICOM series.

Parameters
vdIVolumeData object to receive the information about the loaded volume.
PathNameUTF8 encoded String containing the path to the folder containing the DICOM dataset, should have a trailing backslash.
virtual signed int IVolumeUtil::ReadFromRawFile ( IVolumeData vd,
const char *  PathName,
const signed int  Dimensions[3],
const signed int  DataType,
const signed int  SliceOffset,
const signed int  FileOffset 
)
pure virtual

Reads volume data from a RAW file into memory. A RAW file is a single file containing the following format:

// PIXEL is two little endian bytes containing a number from 0-4095
for each slice
// there must be exactly 512 Y values
for each Y
// there must be exactly 512 X values
for each X
PIXEL theVal;
Parameters
vdIVolumeData object to receive the information about the loaded volume.
PathNameString containing the path of the raw file.
DimensionsReserved for future support of non 512x512xX data sets.
DataTypeReserved for future support of non 12-bit data.
SliceOffsetUnused. Ignore.
FileOffsetUnused. Ignore.
virtual signed int IVolumeUtil::ReadFromRawFileEx ( IVolumeData vd,
RAW_DATASET_DESCRIPTION rawDatasetDescription 
)
pure virtual

Reads volume data from multiple RAW files into memory. A RAW file is a single file containing the following format:

// PIXEL is two little endian bytes containing a number from 0-4095
for each slice
// there must be exactly 512 Y values
for each Y
// there must be exactly 512 X values
for each X
PIXEL theVal;
Parameters
vdIVolumeData object to receive the information about the loaded volume.
rawDatasetDescriptionRAW_DATASET_DESCRIPTION object that defines the RAW dataset. See RAW_DATASET_DESCRIPTION for more information.
virtual signed int IVolumeUtil::ReadFromSEGYFile ( IVolumeData vd,
const char *  FileName 
)
pure virtual

ReadFromSEGYFile reads SEGY files and returns IVolumeData object;

Parameters
vdIVolumeData object to receive the information about the loaded volume.
FileNameis full path along with the file name to be loaded.
virtual signed int IVolumeUtil::SaveToRawFile ( IVolumeData vd,
const char *  PathName,
const signed int  SliceOffset,
const signed int  SliceNum 
)
pure virtual

Not yet implemented.

virtual signed int IVolumeUtil::ScanDICOMDirectory ( ILiteDICOMFile ***  files,
signed int *  numFiles,
const char *  PathName 
)
pure virtual

Scans a directory for DICOM files then allocates an array of ILiteDICOMFile objects describing all of the valid DICOM files found.

Parameters
filesThe address of the pointer that will recieve the array of ILiteDICOMFile objects.
numFilesThe address of a h_int32 to recieve the number of objects allocated.
PathNameThe path to the directory we're to scan.
virtual signed int IVolumeUtil::SetTaskProgress ( struct ITaskProgress piTaskProgress,
signed long long  taskID 
)
pure virtual

Registers an ITaskProgress to receive information about the progress of a Read/Write operation. This can be used to update your GUI regarding the state of the load.

Parameters
piTaskProgressObject to receive events.
taskIDID which will be associated with this task.