Feature #544 » dcfilefo.patch
| dcmdata/include/dcmtk/dcmdata/dcfilefo.h | ||
|---|---|---|
|
DcmFileFormat();
|
||
|
/** constructor
|
||
|
* @param dataset to be copied (!) into the new DcmFileFormat object
|
||
|
*/
|
||
|
DcmFileFormat(DcmDataset *dataset);
|
||
|
* @param dataset dataset to be copied into or referenced by the new DcmFileFormat
|
||
|
* object. By default, a copy is created because this is the typical use case.
|
||
|
* @param createCopy create a copy of the dataset if true, use a reference otherwise.
|
||
|
* @warn Please note that using a reference to the given dataset will delete this
|
||
|
* dataset during destruction of this DcmFileFormat object. In other words,
|
||
|
* the full responsibility for this dataset is assigned to this object.
|
||
|
*/
|
||
|
DcmFileFormat(DcmDataset *dataset,
|
||
|
const OFBool createCopy = OFTrue);
|
||
|
/** copy constructor
|
||
|
* @param old element to be copied
|
||
| dcmdata/libsrc/dcfilefo.cc | ||
|---|---|---|
|
}
|
||
|
DcmFileFormat::DcmFileFormat(DcmDataset *dataset)
|
||
|
DcmFileFormat::DcmFileFormat(DcmDataset *dataset,
|
||
|
const OFBool createCopy)
|
||
|
: DcmSequenceOfItems(InternalUseTag),
|
||
|
FileReadMode(ERM_autoDetect)
|
||
|
{
|
||
| ... | ... | |
|
MetaInfo->setParent(this);
|
||
|
DcmDataset *newDataset;
|
||
|
if (dataset == NULL)
|
||
|
if (dataset != NULL)
|
||
|
{
|
||
|
if (createCopy)
|
||
|
newDataset = new DcmDataset(*dataset);
|
||
|
else
|
||
|
newDataset = dataset;
|
||
|
} else
|
||
|
newDataset = new DcmDataset();
|
||
|
else
|
||
|
newDataset = new DcmDataset(*dataset);
|
||
|
DcmSequenceOfItems::itemList->insert(newDataset);
|
||
|
newDataset->setParent(this);
|
||
|
}
|
||