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

Public Member Functions

virtual signed int AskInterface (const BGUID *piid, struct IRoot **ppr)=0
 
virtual signed int DecRef ()=0
 
virtual signed int GenerateUID (char *uid, char *prefix)=0
 
virtual signed int GetImageData (char **data, IAllocator *pAlloc, signed int numBits)=0
 
virtual signed int GetImageDataEx (char **data, IAllocator *pAlloc, signed int numBits, double windowCenter, double windowWidth)=0
 
virtual signed int GetImageDataEx2 (char **data, IAllocator *pAlloc, signed int numBits, double windowCenter, double windowWidth, int imageWidth, int imageHeight)=0
 
virtual signed int GetPath (char *path)=0
 
virtual signed int GetStringAtIndex (char *dest, const char *source, signed int index)=0
 
virtual signed int GetTag (DICOM_TAG_DATA *dest, DICOM_TAG tag, signed int index)=0
 
virtual signed int GetTagFloat32 (float *dest, DICOM_TAG tag, signed int index)=0
 
virtual signed int GetTagFloat64 (double *dest, DICOM_TAG tag, signed int index)=0
 
virtual signed int GetTags (DICOM_TAG_DATA *destArray, DICOM_TAG *tags, signed int *indices, signed int numTags)=0
 
virtual signed int GetTagSLong (signed int *dest, DICOM_TAG tag, signed int index)=0
 
virtual signed int GetTagSShort (signed short *dest, DICOM_TAG tag, signed int index)=0
 
virtual signed int GetTagString (char **dest, DICOM_TAG tag, signed int index)=0
 
virtual signed int GetTagUByte (unsigned char *dest, DICOM_TAG tag, signed int index)=0
 
virtual signed int GetTagULong (unsigned int *dest, DICOM_TAG tag, signed int index)=0
 
virtual signed int GetTagUShort (unsigned short *dest, DICOM_TAG tag, signed int index)=0
 
virtual signed int GetXferSyntaxissupported (signed int *dest)=0
 
virtual signed int IncRef ()=0
 
virtual signed int Load ()=0
 
virtual signed int LoadMemMap ()=0
 
virtual signed int Save ()=0
 
virtual signed int SetImageData (char *data, signed int numBytes)=0
 
virtual signed int SetMemMapName (char *name)=0
 
virtual signed int SetPath (char *path)=0
 
virtual signed int SetTag (DICOM_TAG_DATA value, DICOM_TAG tag, signed int index)=0
 
virtual signed int SetTagFloat32 (float value, DICOM_TAG tag, signed int index)=0
 
virtual signed int SetTagFloat64 (double value, DICOM_TAG tag, signed int index)=0
 
virtual signed int SetTags (DICOM_TAG_DATA *values, DICOM_TAG *tags, signed int *indices, signed int numTags)=0
 
virtual signed int SetTagSLong (signed int value, DICOM_TAG tag, signed int index)=0
 
virtual signed int SetTagSShort (signed short value, DICOM_TAG tag, signed int index)=0
 
virtual signed int SetTagString (char *value, DICOM_TAG tag, signed int index)=0
 
virtual signed int SetTagUByte (unsigned char value, DICOM_TAG tag, signed int index)=0
 
virtual signed int SetTagULong (unsigned int value, DICOM_TAG tag, signed int index)=0
 
virtual signed int SetTagUShort (unsigned short value, DICOM_TAG tag, signed int index)=0
 
virtual signed int SetWideCharName (const wchar_t *name)=0
 
virtual signed int Unload ()=0
 
- Public Member Functions inherited from IRoot
template<class T >
signed int AskInterface (T **pp)
 

Detailed Description

The ILiteDICOMFile interface represents a DICOM file. You may get ILiteDICOMFile interfaces from the IVolumeUtil interface when loading DICOM information.

Member Function Documentation

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

ask object for another interface

Implements IRoot.

virtual signed int ILiteDICOMFile::DecRef ( )
pure virtual

decrements the reference count for the object

Implements IRoot.

virtual signed int ILiteDICOMFile::GenerateUID ( char *  uid,
char *  prefix 
)
pure virtual

Generates a unique identifier for use with DICOM UID tags.

Parameters
uidBuffer to recieve the generated UID.
prefixPrefix to use. Pass in NULL for the default prefix.
virtual signed int ILiteDICOMFile::GetImageData ( char **  data,
IAllocator pAlloc,
signed int  numBits 
)
pure virtual

Loads the image data from the DICOM file, allocates it with pAlloc, and sets data to the address of the newly allocated data. Calling this function will also perform the equivalent of calling Unload().

Parameters
dataAddress of pointer to recieve the location of the loaded image.
pAllocAllocator to use when creating the image data.
numBitsNumber of bits of precision to convert the data to (Should be the high bit + 1 in the DICOM header).
virtual signed int ILiteDICOMFile::GetPath ( char *  path)
pure virtual

Copies the current path into the pre-allocated array path.

Parameters
pathArray to recieve path string.
virtual signed int ILiteDICOMFile::GetStringAtIndex ( char *  dest,
const char *  source,
signed int  index 
)
pure virtual

Extracts a string tag from a specific index in a composite string tag into the user allocated character array in dest.

Parameters
destAddress of user allocated character array that will receive the extracted string.
sourceThe source string from which we will extract the embedded string.
indexThe 0-based index of the string to extract.
virtual signed int ILiteDICOMFile::GetTag ( DICOM_TAG_DATA dest,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Gets a single tag from a DICOM file.

Parameters
destPointer to a DICOM_TAG_DATA that will recieve the tag data.
tagThe tag to retrieve
indexThe index of the data if there are multiple values for this tag. DCTD_STRING ignores this parameter.
virtual signed int ILiteDICOMFile::GetTagFloat32 ( float *  dest,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Gets a float from the header.

See also
GetTag()
virtual signed int ILiteDICOMFile::GetTagFloat64 ( double *  dest,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Gets a double from the header.

See also
GetTag()
virtual signed int ILiteDICOMFile::GetTags ( DICOM_TAG_DATA destArray,
DICOM_TAG tags,
signed int *  indices,
signed int  numTags 
)
pure virtual

Gets multiple tags from the DICOM file object.

Parameters
destArrayPreallocated array to receive the values of the tags requested. DICOM_TAG_DATA::type should contain the type of data you wish to receive.
tagsArray of tags describing which tags to fetch.
indicesIndices of the tag items to fetch if there are multiple values for this tag. Note that DCTD_STRING requests will ignore this parameter and give the full unnormalized value regardless.
numTagsNumber of tags to fetch. All of the arrays passed in must be of this size.
virtual signed int ILiteDICOMFile::GetTagSLong ( signed int *  dest,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Gets a h_int32 from the header.

See also
GetTag()
virtual signed int ILiteDICOMFile::GetTagSShort ( signed short *  dest,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Gets a signed short from the header.

See also
GetTag()
virtual signed int ILiteDICOMFile::GetTagString ( char **  dest,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Gets a string from the header. Do NOT delete the char* returned by this function in the dest parameter. Also note that index is ignored here and is only included because this function is a wrapper for GetTag(). If you want to extract a string at a certain index, use the GetStringAtIndex() function or just know that they are separated by backslashes.

See also
GetTag()
virtual signed int ILiteDICOMFile::GetTagUByte ( unsigned char *  dest,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Gets an unsigned byte from the header.

See also
GetTag()
virtual signed int ILiteDICOMFile::GetTagULong ( unsigned int *  dest,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Gets an h_uint32 from the header.

See also
GetTag()
virtual signed int ILiteDICOMFile::GetTagUShort ( unsigned short *  dest,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Gets an unsigned short from the header.

See also
GetTag()
virtual signed int ILiteDICOMFile::GetXferSyntaxissupported ( signed int *  dest)
pure virtual

Extracts the transfer syntax for a DICOM dataset, into the user allocated character array in dest. Gettag does not get a transfer syntax.

Parameters
destAddress of user allocated character array that will receive the extracted string.
virtual signed int ILiteDICOMFile::IncRef ( )
pure virtual

increments the reference count for the object

Implements IRoot.

virtual signed int ILiteDICOMFile::Load ( )
pure virtual

Loads the file from disk with the path specified in SetPath().

virtual signed int ILiteDICOMFile::LoadMemMap ( )
pure virtual

Loads the file from memory map with the path specified in SetPath().

virtual signed int ILiteDICOMFile::Save ( )
pure virtual

Writes the loaded DICOM file to disk at the location specified in SetPath().

virtual signed int ILiteDICOMFile::SetImageData ( char *  data,
signed int  numBytes 
)
pure virtual

Puts the data buffer into the DCM_PixelData tag. Note that it is the user's responsibility to make sure the other tags in the image file describe this buffer properly.

Parameters
dataBuffer containing the raw pixel data.
numBytesNumber of bytes in the buffer.
virtual signed int ILiteDICOMFile::SetMemMapName ( char *  name)
pure virtual

Sets the name to apply to the memory mapped file if our allocator is memory mapped

Parameters
nameThe name to set.
virtual signed int ILiteDICOMFile::SetPath ( char *  path)
pure virtual

Sets the path for this object to path.

Parameters
pathPath to set.
virtual signed int ILiteDICOMFile::SetTag ( DICOM_TAG_DATA  value,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Sets a single tag in a DICOM file.

Parameters
valueDICOM_TAG_DATA to set.
tagThe tag to set.
indexThe index of the data if there are multiple values for this tag. DCTD_STRING ignores this parameter.
virtual signed int ILiteDICOMFile::SetTagFloat32 ( float  value,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Sets a float in the header.

See also
SetTag()
virtual signed int ILiteDICOMFile::SetTagFloat64 ( double  value,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Sets a double in the header.

See also
SetTag()
virtual signed int ILiteDICOMFile::SetTags ( DICOM_TAG_DATA values,
DICOM_TAG tags,
signed int *  indices,
signed int  numTags 
)
pure virtual

Sets multiple tags from the DICOM file object.

Parameters
valuesPreallocated array of values of the tags to set.
tagsArray of tags describing which tags to set.
indicesIndices of the tag items to set if there are multiple values for this tag. Note that DCTD_STRING requests will ignore this parameter and set the full unnormalized value regardless.
numTagsNumber of tags to set. All of the arrays passed in must be of this size.
virtual signed int ILiteDICOMFile::SetTagSLong ( signed int  value,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Sets a h_int32 in the header.

See also
SetTag()
virtual signed int ILiteDICOMFile::SetTagSShort ( signed short  value,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Sets a signed short in the header.

See also
SetTag()
virtual signed int ILiteDICOMFile::SetTagString ( char *  value,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Sets a string in the header. Also note that index is ignored here and is only included because this function is a wrapper for SetTag(). If you want to insert multiple strings at different indices, separate them by backslash characters as per the DICOM standard.

See also
SetTag()
virtual signed int ILiteDICOMFile::SetTagUByte ( unsigned char  value,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Sets an unsigned byte in the header.

See also
SetTag()
virtual signed int ILiteDICOMFile::SetTagULong ( unsigned int  value,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Sets an h_uint32 in the header.

See also
SetTag()
virtual signed int ILiteDICOMFile::SetTagUShort ( unsigned short  value,
DICOM_TAG  tag,
signed int  index 
)
pure virtual

Sets an unsigned short in the header.

See also
SetTag()
virtual signed int ILiteDICOMFile::Unload ( )
pure virtual

Frees up any DICOM file loaded by the Load function.