FileStreamer.
More...
#include <gdcmFileStreamer.h>
FileStreamer.
This class let a user create a massive DICOM DataSet from a template DICOM file, by appending chunks of data.
This class support two mode of operation:
- Creating a single DataElement by appending chunk after chunk of data.
- Creating a set of DataElement within the same group, using a private creator for start. New DataElement are added any time the user defined maximum size for data element is reached.
- Warning
- any existing DataElement is removed, pick carefully which DataElement to add.
◆ FileStreamer()
gdcm::FileStreamer::FileStreamer |
( |
| ) |
|
◆ ~FileStreamer()
gdcm::FileStreamer::~FileStreamer |
( |
| ) |
|
|
override |
◆ AppendToDataElement()
bool gdcm::FileStreamer::AppendToDataElement |
( |
const Tag & |
t, |
|
|
const char * |
array, |
|
|
size_t |
len |
|
) |
| |
Append to previously started Tag t.
◆ AppendToGroupDataElement()
bool gdcm::FileStreamer::AppendToGroupDataElement |
( |
const PrivateTag & |
pt, |
|
|
const char * |
array, |
|
|
size_t |
len |
|
) |
| |
Append to previously started private creator.
◆ CheckDataElement()
bool gdcm::FileStreamer::CheckDataElement |
( |
const Tag & |
t | ) |
|
Decide to check the Data Element to be written (default: off) The implementation has default strategy for checking validity of DataElement. Currently it only support checking for the following tags:
◆ CheckTemplateFileName()
void gdcm::FileStreamer::CheckTemplateFileName |
( |
bool |
check | ) |
|
Instead of simply blindly copying the input DICOM Template file, GDCM will be used to check the input file, and correct any issues recognized within the file. Only use if you do not have control over the input template file.
◆ New()
for wrapped language: instantiate a reference counted object
◆ ReserveDataElement()
bool gdcm::FileStreamer::ReserveDataElement |
( |
size_t |
len | ) |
|
Add a hint on the final size of the dataelement. When optimally chosen, this reduce the number of file in-place copying. Should be called before StartDataElement
◆ ReserveGroupDataElement()
bool gdcm::FileStreamer::ReserveGroupDataElement |
( |
unsigned short |
ndataelement | ) |
|
Optimisation: pre-allocate the number of dataelement within the private group (ndataelement <= 256). Should be called before StartGroupDataElement
◆ SetOutputFileName()
void gdcm::FileStreamer::SetOutputFileName |
( |
const char * |
filename_native | ) |
|
Set output filename (target file)
◆ SetTemplateFileName()
void gdcm::FileStreamer::SetTemplateFileName |
( |
const char * |
filename_native | ) |
|
◆ StartDataElement()
bool gdcm::FileStreamer::StartDataElement |
( |
const Tag & |
t | ) |
|
Start Single Data Element Operation This will delete any existing Tag t. Need to call it only once.
◆ StartGroupDataElement()
bool gdcm::FileStreamer::StartGroupDataElement |
( |
const PrivateTag & |
pt, |
|
|
size_t |
maxsizede = 0 , |
|
|
uint8_t |
startoffset = 0 |
|
) |
| |
Start Private Group (multiple DataElement) Operation. Each newly added DataElement will have a length lower than
- Parameters
-
maxsizede | . When not specified, maxsizede is set to maximum size allowed by DICOM (= 2^32). startoffset can be used to specify the very first element you want to start with (instead of the first possible). Value should be in [0x0, 0xff] This will find the first available private creator. |
- Bug:
- maxsizede should be a value lower than the actual total size of the buffer to be copied
◆ StopDataElement()
bool gdcm::FileStreamer::StopDataElement |
( |
const Tag & |
t | ) |
|
Stop appending to tag t. This will compute the proper attribute length.
◆ StopGroupDataElement()
bool gdcm::FileStreamer::StopGroupDataElement |
( |
const PrivateTag & |
pt | ) |
|
Stop appending to private creator.
The documentation for this class was generated from the following file: