Public Member Functions | |
DcmFileFormat () | |
default constructor | |
DcmFileFormat (DcmDataset *dataset) | |
DcmFileFormat (const DcmFileFormat &old) | |
copy constructor | |
virtual | ~DcmFileFormat () |
destructor | |
DcmFileFormat & | operator= (const DcmFileFormat &obj) |
assignment operator | |
virtual DcmObject * | clone () const |
clone method | |
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) |
DcmMetaInfo * | getMetaInfo () |
DcmDataset * | getDataset () |
DcmDataset * | getAndRemoveDataset () |
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, const E_FileReadMode readMode=ERM_autoDetect) |
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, const 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. | |
E_FileReadMode | getReadMode () const |
get current file read mode. | |
void | setReadMode (const E_FileReadMode readMode) |
set current file read mode. | |
virtual OFCondition | insertItem (DcmItem *item, const unsigned long where=DCM_EndOfListIndex) |
virtual DcmItem * | remove (const unsigned long num) |
virtual DcmItem * | remove (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) |
Private Attributes | |
E_FileReadMode | FileReadMode |
file read mode, specifies whether to read the meta header or not |
Definition at line 55 of file dcfilefo.h.
DcmFileFormat::DcmFileFormat | ( | const DcmFileFormat & | old | ) |
copy constructor
old | element to be copied |
DcmFileFormat& DcmFileFormat::operator= | ( | const DcmFileFormat & | obj | ) |
assignment operator
obj | fileformat to be assigned/copied |
virtual DcmObject* DcmFileFormat::clone | ( | ) | const [inline, virtual] |
clone method
Definition at line 85 of file dcfilefo.h.
References DcmFileFormat().
virtual DcmEVR DcmFileFormat::ident | ( | ) | const [virtual] |
get type identifier
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
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 |
virtual OFCondition DcmFileFormat::write | ( | DcmOutputStream & | outStream, | |
const E_TransferSyntax | oxfer, | |||
const E_EncodingType | enctype = EET_UndefinedLength | |||
) | [virtual] |
write fileformat to a stream
outStream | DICOM output stream | |
oxfer | output transfer syntax | |
enctype | encoding types (undefined or explicit length) |
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.
out | output stream to which the XML document is written | |
flags | optional flag used to customize the output (see DCMTypes::XF_xxx) |
virtual OFCondition DcmFileFormat::loadFile | ( | const char * | fileName, | |
const E_TransferSyntax | readXfer = EXS_Unknown , |
|||
const E_GrpLenEncoding | groupLength = EGL_noChange , |
|||
const Uint32 | maxReadLength = DCM_MaxReadLength , |
|||
const E_FileReadMode | readMode = ERM_autoDetect | |||
) | [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). By default, the presence of a meta header is detected automatically.
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. | |
readMode | read file with or without meta header, i.e. as a fileformat or a dataset. Use ERM_fileOnly in order to force the presence of a meta header. |
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 , |
|||
const OFBool | isDataset = OFFalse | |||
) | [virtual] |
save object to a DICOM file.
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 |
void DcmFileFormat::removeAllButCurrentRepresentations | ( | ) | [inline] |
removes all but the current representation in all pixel data elements.
Makes the current representation original.
Definition at line 224 of file dcfilefo.h.
References DcmDataset::removeAllButCurrentRepresentations().
E_FileReadMode DcmFileFormat::getReadMode | ( | ) | const [inline] |
get current file read mode.
This mode specifies whether a file is read as a fileformat or dataset (without meta header). In addition, the reading can be restricted to DICOM files only.
Definition at line 234 of file dcfilefo.h.
References FileReadMode.
void DcmFileFormat::setReadMode | ( | const E_FileReadMode | readMode | ) | [inline] |
set current file read mode.
This mode specifies whether a file is read as a fileformat or dataset (without meta header). In addition, the reading can be restricted to DICOM files only.
readMode | file read mode to be set |
Definition at line 244 of file dcfilefo.h.
References FileReadMode.