DcmFileFormat Class Reference

a class handling the DICOM file format (with meta header) More...

List of all members.

Public Member Functions

 DcmFileFormat ()
 default constructor
 DcmFileFormat (DcmDataset *dataset)
 DcmFileFormat (const DcmFileFormat &old)
 copy constructor
virtual ~DcmFileFormat ()
 destructor
DcmFileFormatoperator= (const DcmFileFormat &obj)
 assignment operator
virtual DcmEVR ident () const
 get type identifier
virtual void print (ostream &out, const size_t flags=0, const int level=0, const char *pixelFileName=NULL, size_t *pixelCounter=NULL)
 print meta header and dataset to a stream
virtual OFCondition validateMetaInfo (E_TransferSyntax oxfer)
DcmMetaInfogetMetaInfo ()
DcmDatasetgetDataset ()
DcmDatasetgetAndRemoveDataset ()
virtual Uint32 calcElementLength (const E_TransferSyntax xfer, const E_EncodingType enctype)
virtual OFBool canWriteXfer (const E_TransferSyntax newXfer, const E_TransferSyntax oldXfer=EXS_Unknown)
virtual OFCondition read (DcmInputStream &inStream, const E_TransferSyntax xfer=EXS_Unknown, const E_GrpLenEncoding glenc=EGL_noChange, const Uint32 maxReadLength=DCM_MaxReadLength)
virtual OFCondition write (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype=EET_UndefinedLength)
 write fileformat to a stream
virtual OFCondition write (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, const E_GrpLenEncoding glenc, const E_PaddingEncoding padenc=EPD_noChange, const Uint32 padlen=0, const Uint32 subPadlen=0, Uint32 instanceLength=0)
virtual OFCondition writeXML (ostream &out, const size_t flags=0)
 write object in XML format.
virtual OFCondition loadFile (const char *fileName, const E_TransferSyntax readXfer=EXS_Unknown, const E_GrpLenEncoding groupLength=EGL_noChange, const Uint32 maxReadLength=DCM_MaxReadLength, OFBool isDataset=OFFalse)
 load object from a DICOM file.
virtual OFCondition saveFile (const char *fileName, const E_TransferSyntax writeXfer=EXS_Unknown, const E_EncodingType encodingType=EET_UndefinedLength, const E_GrpLenEncoding groupLength=EGL_recalcGL, const E_PaddingEncoding padEncoding=EPD_noChange, const Uint32 padLength=0, const Uint32 subPadLength=0, OFBool isDataset=OFFalse)
 save object to a DICOM file.
OFCondition chooseRepresentation (const E_TransferSyntax repType, const DcmRepresentationParameter *repParam)
OFBool hasRepresentation (const E_TransferSyntax repType, const DcmRepresentationParameter *repParam)
void removeAllButOriginalRepresentations ()
 removes all but the original representation in all pixel data elements
void removeAllButCurrentRepresentations ()
 removes all but the current representation in all pixel data elements.
virtual OFCondition insertItem (DcmItem *item, const unsigned long where=DCM_EndOfListIndex)
virtual DcmItemremove (const unsigned long num)
virtual DcmItemremove (DcmItem *item)
virtual OFCondition clear ()

Private Member Functions

OFCondition checkValue (DcmMetaInfo *metainfo, DcmDataset *dataset, const DcmTagKey &atagkey, DcmObject *obj, const E_TransferSyntax oxfer)
E_TransferSyntax lookForXfer (DcmMetaInfo *metainfo)


Detailed Description

a class handling the DICOM file format (with meta header)

Definition at line 56 of file dcfilefo.h.


Constructor & Destructor Documentation

DcmFileFormat::DcmFileFormat const DcmFileFormat old  ) 
 

copy constructor

Parameters:
old element to be copied


Member Function Documentation

virtual DcmEVR DcmFileFormat::ident  )  const [virtual]
 

get type identifier

Returns:
type identifier of this class (EVR_fileFormat)

virtual OFCondition DcmFileFormat::loadFile const char *  fileName,
const E_TransferSyntax  readXfer = EXS_Unknown,
const E_GrpLenEncoding  groupLength = EGL_noChange,
const Uint32  maxReadLength = DCM_MaxReadLength,
OFBool  isDataset = OFFalse
[virtual]
 

load object from a DICOM file.

This method supports DICOM objects stored as a file (with meta header) or as a dataset (without meta header). Presence of a meta header is detected automatically.

Parameters:
fileName name of the file to load
readXfer transfer syntax used to read the data (auto detection if EXS_Unknown)
groupLength flag, specifying how to handle the group length tags
maxReadLength maximum number of bytes to be read for an element value. Element values with a larger size are not loaded until their value is retrieved (with getXXX()) or loadAllDataElements() is called.
isDataset if true, meta header detection is disabled and loading of a dataset without meta header is forced.
Returns:
status, EC_Normal if successful, an error code otherwise

DcmFileFormat& DcmFileFormat::operator= const DcmFileFormat obj  ) 
 

assignment operator

Parameters:
obj fileformat to be assigned/copied
Returns:
reference to this object

virtual void DcmFileFormat::print ostream &  out,
const size_t  flags = 0,
const int  level = 0,
const char *  pixelFileName = NULL,
size_t *  pixelCounter = NULL
[virtual]
 

print meta header and dataset to a stream

Parameters:
out output stream
flags optional flag used to customize the output (see DCMTypes::PF_xxx)
level current level of nested items. Used for indentation.
pixelFileName not used
pixelCounter not used

void DcmFileFormat::removeAllButCurrentRepresentations  )  [inline]
 

removes all but the current representation in all pixel data elements.

Makes the current representation original. Definition at line 216 of file dcfilefo.h.

References DcmDataset::removeAllButCurrentRepresentations().

virtual OFCondition DcmFileFormat::saveFile const char *  fileName,
const E_TransferSyntax  writeXfer = EXS_Unknown,
const E_EncodingType  encodingType = EET_UndefinedLength,
const E_GrpLenEncoding  groupLength = EGL_recalcGL,
const E_PaddingEncoding  padEncoding = EPD_noChange,
const Uint32  padLength = 0,
const Uint32  subPadLength = 0,
OFBool  isDataset = OFFalse
[virtual]
 

save object to a DICOM file.

Parameters:
fileName name of the file to save
writeXfer transfer syntax used to write the data (EXS_Unknown means use current)
encodingType flag, specifying the encoding with undefined or explicit length
groupLength flag, specifying how to handle the group length tags
padEncoding flag, specifying how to handle the padding tags
padLength number of bytes used for the dataset padding (has to be an even number)
subPadLength number of bytes used for the item padding (has to be an even number)
isDataset if true, file is stored without meta header, i.e. as pure dataset
Returns:
status, EC_Normal if successful, an error code otherwise

virtual OFCondition DcmFileFormat::write DcmOutputStream outStream,
const E_TransferSyntax  oxfer,
const E_EncodingType  enctype = EET_UndefinedLength
[virtual]
 

write fileformat to a stream

Parameters:
outStream DICOM output stream
oxfer output transfer syntax
enctype encoding types (undefined or explicit length)
Returns:
status, EC_Normal if successful, an error code otherwise

virtual OFCondition DcmFileFormat::writeXML ostream &  out,
const size_t  flags = 0
[virtual]
 

write object in XML format.

The XML declaration (e.g. <?xml version="1.0"?>) is not written by this function.

Parameters:
out output stream to which the XML document is written
flags optional flag used to customize the output (see DCMTypes::XF_xxx)
Returns:
status, EC_Normal if successful, an error code otherwise


The documentation for this class was generated from the following file:


Generated on 4 Nov 2004 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.3.8