32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/dcmdata/libi2d/i2doutpl.h"
34 #include "dcmtk/dcmdata/libi2d/i2dplvlp.h"
35 #include "dcmtk/dcmdata/libi2d/i2dplsc.h"
36 #include "dcmtk/dcmdata/libi2d/i2djpgs.h"
37 #include "dcmtk/dcmdata/dcpixel.h"
62 E_TransferSyntax& proposedTS);
127 OFBool insertMissingType2 = OFTrue,
128 OFBool inventMissingType1 = OFTrue);
173 E_TransferSyntax& outputTS);
205 const OFString& defaultValue =
"")
const;
229 const E_TransferSyntax& outputTS)
const;
void setISOLatin1(OFBool insertLatin1)
Enables/disables autotmatic insertion of the value "ISO_IR100" as a value for the Specific Character ...
void setStudyFrom(const OFString &file)
Set file from which patient/study/series data should be imported from.
class maintaining a attribute tag (group and element number)
OFCondition applyStudyOrSeriesFromFile(DcmDataset *targetDset)
Parses patient/study/series level attributes from file as defined on command line and fills internal ...
OFBool m_inventMissingType1Attribs
If true, missing type 1 elements are inserted automatically with a predefined value, if possible.
OFBool m_disableAttribChecks
If true, some simple attribute checks (missing type 2 attributes or missing type 1 values) are omitte...
~Image2Dcm()
Destructor, frees plugin memory.
OFList< OFString > m_overrideKeys
These attributes are applied to the dataset after conversion (and are not checked by the isValid() fu...
OFString m_studySeriesFile
File to read study and series from.
Image2Dcm()
Constructor, initializes command line options.
OFBool m_readSeriesLevel
If true, patient, study and series data is read from file.
void setSeriesFrom(const OFString &file)
Set file from which patient/study/series data should be imported from.
void setOverrideKeys(const OFList< OFString > &ovkeys)
Specifies some attributes that should be inserted after conversion.
OFCondition convert(I2DImgSource *inputPlug, I2DOutputPlug *outPlug, DcmDataset *&resultDset, E_TransferSyntax &proposedTS)
Start the conversion.
void setTemplateFile(const OFString &file)
Sets a DICOM file that should serve as a template for the resulting DICOM object. ...
OFString checkAndInventType1Attrib(const DcmTagKey &key, DcmDataset *targetDset, const OFString &defaultValue="") const
Check whether given type 1 attribute is present and has a length > 0.
OFBool m_readStudyLevel
If true, patient and study data is read from file.
OFCondition generateUIDs(DcmDataset *dset)
Generates and inserts missing UIDs, ie UIDs not taken over from –dataset-from –study from and –series...
OFBool m_incInstNoFromFile
If true, Instance Number ist read from file and incremented by 1.
OFCondition readAndInsertPixelData(I2DImgSource *imageSource, DcmDataset *dset, E_TransferSyntax &outputTS)
Reads pixel data and corresponding attributes like rows etc.
void cleanupTemplate(DcmDataset *targetDset)
Cleans up template for future insertion of pixel data information, ie generally removes attributes fr...
OFCondition applyOverrideKeys(DcmDataset *outputDset)
Copy override keys over existing keys in given dataset.
void setIncrementInstanceNumber(OFBool incInstNo)
Enables/Disables incrementing instance number taken over from DICOM file.
a class handling the DICOM dataset format (files without meta header)
OFCondition insertEncapsulatedPixelData(DcmDataset *dset, char *pixData, Uint32 length, const E_TransferSyntax &outputTS) const
Correctly inserts encapsulated pixel data.
OFCondition insertLatin1(DcmDataset *outputDset)
Inserts "ISO_IR100" in the attribute "Specific Character Set".
OFString isValid(DcmDataset &dataset) const
Do some completeness / validity checks.
a simple string class that implements a subset of std::string.
void setValidityChecking(OFBool doChecks, OFBool insertMissingType2=OFTrue, OFBool inventMissingType1=OFTrue)
Enable/Disable basic validity checks for output dataset.
OFBool m_insertLatin1
If enabled, ISO_IR100 (ISO Latin 1) is inserted as a standard value for attribute "Specific Character...
OFString checkAndInventType2Attrib(const DcmTagKey &key, DcmDataset *targetDset) const
Inserts an empty element with the given tag into a dataset.
OFCondition incrementInstanceNumber(DcmDataset *targetDset)
Increments instance number in given dataset.
OFBool m_inventMissingType2Attribs
If true, missing type 2 elements are inserted automatically (empty value).
General purpose class for condition codes.
OFString m_templateFile
If not empty, the DICOM file specified in this variable is used as a base for the DICOM image file to...