33 #include "dcmtk/config/osconfig.h" 35 #include "dcmtk/dcmdata/dcdicdir.h" 43 #define DEFAULT_FILESETID "DCMTK_MEDIA_DEMO" 45 #define DEFAULT_DESCRIPTOR_CHARSET "ISO_IR 100" 75 virtual OFBool
scaleData(
const Uint8 *srcData,
76 const unsigned int srcWidth,
77 const unsigned int srcHeight,
79 const unsigned int dstWidth,
80 const unsigned int dstHeight)
const = 0;
95 const unsigned long count,
96 const unsigned long frame,
97 const unsigned int width,
98 const unsigned int height,
99 const OFBool decompressAll = OFFalse)
const = 0;
123 AP_Default = AP_GeneralPurpose,
157 AP_HemodynamicWaveform
180 OFBool isDicomDirValid()
const;
194 const char *filename = DEFAULT_DICOMDIR_NAME,
195 const char *filesetID = DEFAULT_FILESETID);
209 const char *filename);
223 const char *filename);
231 OFCondition writeDicomDir(
const E_EncodingType encodingType = EET_UndefinedLength,
232 const E_GrpLenEncoding groupLength = EGL_withoutGL);
243 OFBool isFilenameValid(
const char *filename,
244 const OFBool allowEmpty = OFFalse);
253 OFBool isCharsetValid(
const char *charset);
266 const char *directory = NULL);
278 const char *directory = NULL);
289 OFCondition setFilesetDescriptor(
const char *filename,
290 const char *charset = DEFAULT_DESCRIPTOR_CHARSET);
334 return MapFilenamesMode;
352 return InventPatientIDMode;
361 return RetiredSOPClassSupport;
370 return IconImageMode;
388 return EncodingCheck;
397 return ResolutionCheck;
406 return TransferSyntaxCheck;
415 return ConsistencyCheck;
425 OFBool enableAbortMode(
const OFBool newMode = OFTrue);
434 OFBool enableMapFilenamesMode(
const OFBool newMode = OFTrue);
443 OFBool enableInventMode(
const OFBool newMode = OFTrue);
453 OFBool enableInventPatientIDMode(
const OFBool newMode = OFTrue);
462 OFBool enableRetiredSOPClassSupport(
const OFBool newMode = OFTrue);
473 OFBool enableIconImageMode(
const OFBool newMode = OFTrue);
483 OFBool disableBackupMode(
const OFBool newMode = OFFalse);
494 OFBool disableEncodingCheck(
const OFBool newMode = OFFalse);
505 OFBool disableResolutionCheck(
const OFBool newMode = OFFalse);
516 OFBool disableTransferSyntaxCheck(
const OFBool newMode = OFFalse);
526 OFBool disableConsistencyCheck(
const OFBool newMode = OFFalse);
559 OFCondition loadAndCheckDicomFile(
const char *filename,
560 const char *directory,
571 const char *filename);
579 const char *filename);
589 const char *filename);
597 const char *filename);
607 const char *filename);
617 const char *filename);
627 const char *filename);
648 const E_DirRecType recordType,
1027 OFBool getIconFromFile(
const OFString &filename,
1029 const unsigned long count,
1030 const unsigned int width,
1031 const unsigned int height);
1042 OFBool getIconFromDataset(
DcmItem *dataset,
1044 const unsigned long count,
1045 const unsigned int width,
1046 const unsigned int height);
1060 const unsigned int size,
1073 const E_DirRecType recordType,
1095 const OFBool recurse = OFTrue);
1115 void createDicomDirBackup(
const char *filename);
1119 void deleteDicomDirBackup();
1128 void printUnexpectedValueMessage(
const DcmTagKey &key,
1129 const char *filename = NULL,
1130 const OFBool errorMsg = OFTrue);
1139 void printRequiredAttributeMessage(
const DcmTagKey &key,
1140 const char *filename = NULL,
1141 const OFBool emptyMsg = OFFalse);
1150 void printAttributeErrorMessage(
const DcmTagKey &key,
1152 const char *operation);
1161 void printRecordErrorMessage(
const OFCondition &error,
1162 const E_DirRecType recordType,
1163 const char *operation);
1170 OFBool copyFile(
const char *fromFilename,
1171 const char *toFilename);
1183 const OFBool abortCheck = OFFalse);
1189 OFBool checkFilesetID(
const OFString &filesetID);
1197 OFBool checkExists(
DcmItem *dataset,
1199 const char *filename = NULL);
1207 OFBool checkExistsWithValue(
DcmItem *dataset,
1209 const char *filename = NULL);
1218 OFBool checkExistsWithStringValue(
DcmItem *dataset,
1221 const char *filename = NULL);
1231 OFBool checkExistsWithIntegerValue(
DcmItem *dataset,
1234 const char *filename = NULL,
1235 const OFBool reject = OFTrue);
1246 OFBool checkExistsWithMinMaxValue(
DcmItem *dataset,
1250 const char *filename = NULL,
1251 const OFBool reject = OFTrue);
1263 OFBool searchIntoSub = OFFalse);
1276 const unsigned long pos,
1277 OFBool searchIntoSub = OFFalse);
1286 OFString &getStringFromFile(
const char *filename,
1289 OFBool searchIntoSub = OFFalse);
1299 void copyElement(
DcmItem *dataset,
1303 const OFBool optional = OFFalse,
1304 const OFBool copyEmpty = OFTrue);
1317 copyElement(dataset, key, record, sourceFilename, OFFalse , OFFalse );
1331 copyElement(dataset, key, record, sourceFilename, OFTrue , OFFalse );
1345 copyElement(dataset, key, record, sourceFilename, OFFalse , OFTrue );
1359 copyElement(dataset, key, record, sourceFilename, OFTrue , OFTrue );
1371 void copyStringWithDefault(
DcmItem *dataset,
1375 const char *defaultValue =
"",
1376 const OFBool printWarning = OFFalse);
1387 OFBool compareStringAttributes(
DcmItem *dataset,
1392 const OFBool errorMsg = OFFalse);
1401 OFBool compareSequenceAttributes(
DcmItem *dataset,
1414 const unsigned long number,
1415 const char *prefix = NULL);
OFBool inventMode() const
get current status of the "invent missing values" mode.
An interface class for simplified creation of a DICOMDIR.
void copyElementType1C(DcmItem *dataset, const DcmTagKey &key, DcmDirectoryRecord *record, const OFString &sourceFilename)
copy type 1C element from dataset to directory record
OFString DefaultIcon
filename of the default icon (if any)
a class representing a list of DICOM elements in which each element has a different tag and elements ...
DicomDirImagePlugin * ImagePlugin
pointer to the optional image plugin (required for icon image support)
Ultrasound Single Frame with Spatial Calibration (STD-US-SC-SF-xxxx)
class maintaining a attribute tag (group and element number)
a class representing a directory record dataset in a DICOMDIR.
OFBool RLESupport
flag indicating whether RLE decompression is supported
OFBool ConsistencyCheck
check consistency of newly added record
OFBool InventMode
invent missing attributes mode
OFBool BackupMode
create DICOMDIR backup
Abstract interface to plugable image support for the DICOMDIR class.
OFBool EncodingCheck
check pixel encoding
Ultrasound Single & Multi-Frame with Combined Calibration (STD-UD-CC-MF-xxxx)
General Purpose DVD with Compression Interchange (STD-GEN-DVD)
OFString BackupFilename
name of the DICOMDIR backup file
OFBool FilesetUpdateMode
update existing fileset
unsigned long AutoCurveNumber
current curve number used to invent missing attribute values
Basic Cardiac X-Ray Angiographic Studies on CD-R Media (STD-XABC-CD)
OFBool iconImageMode() const
get current status of the "create icon images" mode.
Dental Radiograph Interchange (STD-DEN-CD)
OFBool BackupCreated
flag indicating whether a backup has been created
unsigned long AutoLutNumber
current LUT number used to invent missing attribute values
unsigned long AutoInstanceNumber
current instance number used to invent missing attribute values
Ultrasound Single & Multi-Frame for Image Display (STD-US-ID-MF-xxxx)
OFBool retiredSOPClassSupport() const
get current status of the "retired SOP class support" mode.
OFBool AbortMode
abort on first inconsistent record
1024 X-Ray Angiographic Studies on CD-R Media (STD-XA1K-CD)
void copyElementType1(DcmItem *dataset, const DcmTagKey &key, DcmDirectoryRecord *record, const OFString &sourceFilename)
copy type 1 element from dataset to directory record
this class implements support for DICOMDIR files, which are special DICOM files containing a list of ...
virtual ~DicomDirImagePlugin()
destructor (virtual)
General Purpose Interchange on CD-R or DVD-RAM Media (STD-GEN-CD/DVD-RAM)
E_ApplicationProfile ApplicationProfile
currently selected application profile
OFString IconPrefix
filename prefix for the external icon images
DVD Interchange with MPEG2 MP@ML (STD-DVD-MPEG2-MPML)
OFBool ResolutionCheck
check image resolution
OFBool backupMode() const
get current status of the "create backup" mode.
void copyElementType2(DcmItem *dataset, const DcmTagKey &key, DcmDirectoryRecord *record, const OFString &sourceFilename)
copy type 2 element from dataset to directory record
12-lead ECG Interchange on Diskette (STD-WVFM-ECG-FD)
DicomDirImagePlugin()
constructor (protected)
OFBool JP2KSupport
flag indicating whether JPEG 2000 decompression is supported
Ultrasound Single Frame for Image Display (STD-US-ID-SF-xxxx)
unsigned long AutoSeriesNumber
current series number used to invent missing attribute values
OFBool resolutionCheck() const
get current status of the "spatial resolution check" mode.
void copyElementType3(DcmItem *dataset, const DcmTagKey &key, DcmDirectoryRecord *record, const OFString &sourceFilename)
copy type 3 element from dataset to directory record
OFBool InventPatientIDMode
invent missing patient ID mode
unsigned int IconSize
size of the optional icon image in pixels
OFBool IconImageMode
create icon images
OFBool encodingCheck() const
get current status of the "pixel encoding check" mode.
CT/MR Studies (STD-CTMR-xxxx)
OFBool consistencyCheck() const
get current status of the "consistency check" mode.
unsigned long AutoPatientNumber
current patient number used to invent missing attribute values
virtual OFBool scaleData(const Uint8 *srcData, const unsigned int srcWidth, const unsigned int srcHeight, Uint8 *dstData, const unsigned int dstWidth, const unsigned int dstHeight) const =0
scale image (pixel data) to specified size
OFBool RetiredSOPClassSupport
support retired SOP classes
unsigned long AutoOverlayNumber
current overlay number used to invent missing attribute values
virtual OFBool scaleImage(DcmItem *dataset, Uint8 *pixel, const unsigned long count, const unsigned long frame, const unsigned int width, const unsigned int height, const OFBool decompressAll=OFFalse) const =0
scale image (from DICOM dataset) to specified size
General Purpose MIME Interchange Profile (STD-GEN-MIME)
OFBool abortMode() const
get current status of the "abort on first error" mode.
OFBool inventPatientIDMode() const
get current status of the "invent missing patient ID" mode.
General Purpose USB and Flash Memory with Compression Interchange (STD-GEN-USB/MMC/CF/SD-JPEG/J2K) ...
E_ApplicationProfile
list of supported media storage application profiles
OFBool JPEGSupport
flag indicating whether JPEG decompression is supported
OFBool mapFilenamesMode() const
get current status of the "map filenames" mode.
a simple string class that implements a subset of std::string.
Ultrasound Single & Multi-Frame with Spatial Calibration (STD-UD-SC-MF-xxxx)
OFBool MapFilenamesMode
automatically map filenames
OFBool transferSyntaxCheck() const
get current status of the "transfer syntax check" mode.
DcmDicomDir * DicomDir
pointer to the current DICOMDIR object
unsigned long AutoStudyNumber
current study number used to invent missing attribute values
Ultrasound Single Frame with Combined Calibration (STD-US-CC-SF-xxxx)
1024 X-Ray Angiographic Studies on DVD Media (STD-XA1K-DVD)
General purpose class for condition codes.
OFBool TransferSyntaxCheck
check transfer syntax