⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dcddirif.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 5 页
字号:
     *  Prior to any internal modification both 'filename' and 'charset' are checked     *  using the above checking routines.  Existence of 'filename' is not checked.     *  NB: Requires a DICOMDIR to exist (see createNewDicomDir and appendToDicomDir).     *  @param filename name of the fileset descriptor file to be set     *  @param charset character set of the fileset descriptor file to be set.     *    default: ISO Latin 1 ("ISO_IR 100"), use NULL or empty string to omit value.     *  @return EC_Normal upon success, an error code otherwise     */    OFCondition setFilesetDescriptor(const char *filename,                                     const char *charset = DEFAULT_DESCRIPTOR_CHARSET);    /** set preferred size of the icon images.     *  NB: some application profiles require a particicular icon size.     *      In those cases this manual setting is implicitly ignored.     *  @param size size of the icon images in pixels (1..256, initial: 64)     *  @return EC_Normal upon success, an error code otherwise     */    OFCondition setIconSize(const unsigned int size);    /** set filename prefix for alternative icon images.     *  If non-empty the filename prefix is used to create the icon image from an     *  externally stored PGM (portable gray map, 8 bit binary) file instead of the     *  DICOM image file.  The PGM filename is: 'prefix' + 'dicom_filename'.  The     *  image does not need to have the correct size as it is scaled automatically.     *  @param prefix filename prefix (NULL to disable = default)     *  @return always returns EC_Normal     */    OFCondition setIconPrefix(const char *prefix);    /** set filename of default icon image.     *  For cases that the icon image cannot be created (neither from PGM nor from     *  DICOM file, respectively) a default icon (8 bit binary PGM) can be specified.     *  If this image also fails to load a black icon (filled with zeros) is used.     *  @param filename name of the default PGM file     *  @return always returns EC_Normal     */    OFCondition setDefaultIcon(const char *filename);    /** get current status of the verbose mode     *  @return OFTrue if mode is enabled, OFFalse otherwise     */    OFBool verboseMode() const    {        return VerboseMode;    }    /** get current status of the "abort on first error" mode.     *  See enableAbortMode() for more details.     *  @return OFTrue if mode is enabled, OFFalse otherwise     */    OFBool abortMode() const    {        return AbortMode;    }    /** get current status of the "map filenames" mode.     *  See enableMapFilenamesMode() for more details.     *  @return OFTrue if mode is enabled, OFFalse otherwise     */    OFBool mapFilenamesMode() const    {        return MapFilenamesMode;    }    /** get current status of the "invent missing values" mode.     *  See enableInventMode() for more details.     *  @return OFTrue if mode is enabled, OFFalse otherwise     */    OFBool inventMode() const    {        return InventMode;    }    /** get current status of the "invent missing patient ID" mode.     *  See enableInventPatientIDMode() for more details.     *  @return OFTrue if mode is enabled, OFFalse otherwise     */    OFBool inventPatientIDMode() const    {        return InventPatientIDMode;    }    /** get current status of the "create icon images" mode.     *  See enableIconImageMode() for more details.     *  @return OFTrue if mode is enabled, OFFalse otherwise     */    OFBool iconImageMode() const    {        return IconImageMode;    }    /** get current status of the "create backup" mode.     *  See enableBackupMode() for more details.     *  @return OFTrue if mode is enabled, OFFalse otherwise     */    OFBool backupMode() const    {        return BackupMode;    }    /** get current status of the "pixel encoding check" mode.     *  See disableEncodingCheck() for more details.     *  @return OFTrue if check is enabled, OFFalse otherwise     */    OFBool encodingCheck() const    {        return EncodingCheck;    }    /** get current status of the "spatial resolution check" mode.     *  See disableResolutionCheck() for more details.     *  @return OFTrue if check is enabled, OFFalse otherwise     */    OFBool resolutionCheck() const    {        return ResolutionCheck;    }    /** get current status of the "transfer syntax check" mode.     *  See disableTransferSyntaxCheck() for more details.     *  @return OFTrue if check is enabled, OFFalse otherwise     */    OFBool transferSyntaxCheck() const    {        return TransferSyntaxCheck;    }    /** get current status of the "consistency check" mode.     *  See enableConsistencyCheck() for more details.     *  @return OFTrue if check is enabled, OFFalse otherwise     */    OFBool consistencyCheck() const    {        return ConsistencyCheck;    }    /** enable/disable the verbose mode.     *  If the mode is enabled messages like "creating DICOMDIR file ..." or     *  "adding file ..." are reported to the log stream (see setLogStream).     *  Default: off, no messages     *  @param newMode enable mode if OFTrue, disable if OFFalse     *  @return previously stored value     */    OFBool enableVerboseMode(const OFBool newMode = OFTrue);    /** enable/disable the "abort on first error" mode.     *  If the mode is enabled addDicomFile() reports an error message and     *  returns with an error status code if something went wrong.     *  Default: off, do not abort     *  @param newMode enable mode if OFTrue, disable if OFFalse     *  @return previously stored value     */    OFBool enableAbortMode(const OFBool newMode = OFTrue);    /** enable/disable the "map filenames" mode.     *  If the mode is enabled filenames are automatically mapped to DICOM format     *  (convert lower case to upper case characters and remove trailing period).     *  Default: off, do not map filenames     *  @param newMode enable mode if OFTrue, disable if OFFalse     *  @return previously stored value     */    OFBool enableMapFilenamesMode(const OFBool newMode = OFTrue);    /** enable/disable the "invent missing values" mode.     *  If the mode is enabled required DICOMDIR attributes (type 1) are     *  invented when missing in the DICOM file.     *  Default: off, do not invent attribute values     *  @param newMode enable mode if OFTrue, disable if OFFalse     *  @return previously stored value     */    OFBool enableInventMode(const OFBool newMode = OFTrue);    /** enable/disable the "invent new patient ID" mode.     *  If the mode is enabled a new PatientID is invented in case of     *  inconsistent PatientsName attributes, i.e. when different patients     *  share the same ID.     *  Default: off, do not invent new patient ID     *  @param newMode enable mode if OFTrue, disable if OFFalse     *  @return previously stored value     */    OFBool enableInventPatientIDMode(const OFBool newMode = OFTrue);    /** enable/disable the "create icon images" mode.     *  If the mode is enabled icon images are created for each IMAGE record.     *  Please note that particular application profiles (e.g. Basic Cardiac)     *  require an icon images to be present.  Therefore, this mode does not     *  affect the icon images creation of such profiles.     *  Default: off, do not create (optional) icon images     *  @param newMode enable mode if OFTrue, disable if OFFalse     *  @return previously stored value     */    OFBool enableIconImageMode(const OFBool newMode = OFTrue);    /** disable/enable the "create backup file" mode.     *  If this mode is disabled no backup file of an existing DICOMDIR is created.     *  However, when appending new files to an existing DICOMDIR a _temporary_     *  backup file "<dicomdir>.$$$" is always created.     *  Default: on, create a backup file "<dicomdir>.BAK"     *  @param newMode disable mode if OFFalse, enable if OFTrue     *  @return previously stored value     */    OFBool disableBackupMode(const OFBool newMode = OFFalse);    /** disable/enable the "pixel encoding check".     *  If this mode is disabled the pixel encoding is not check for compliance     *  with the selected application profile.  Please use this switch with care     *  since the resulting DICOMDIR will probably violate the rules for the     *  selected application profile.     *  Default: on, check pixel encoding (bits allocated/stored, high bit)     *  @param newMode disable check if OFFalse, enable if OFTrue     *  @return previously stored value     */    OFBool disableEncodingCheck(const OFBool newMode = OFFalse);    /** disable/enable the "spatial resolution check".     *  If this mode is disabled the spatial resolution is not check for compliance     *  with the selected application profile.  Please use this switch with care     *  since the resulting DICOMDIR will probably violate the rules for the     *  selected application profile.     *  Default: on, check spatial resolution     *  @param newMode disable check if OFFalse, enable if OFTrue     *  @return previously stored value     */    OFBool disableResolutionCheck(const OFBool newMode = OFFalse);    /** disable/enable the "transfer syntax check".     *  If this mode is disabled the transfer syntax is not check for compliance     *  with the selected application profile.  Please use this switch with care     *  since the resulting DICOMDIR will probably violate the rules for the     *  selected application profile.     *  Default: on, check transfer syntax     *  @param newMode disable check if OFFalse, enable if OFTrue     *  @return previously stored value     */    OFBool disableTransferSyntaxCheck(const OFBool newMode = OFFalse);    /** disable/enable the "consistency check".     *  If this mode is disabled the consistency of newly added records with     *  already existing ones is not checked (see 'warnAboutInconsistentAttributes'     *  for details).     *  Default: on, perform consistency check     *  @param newMode disable check if OFFalse, enable if OFTrue     *  @return previously stored value     */    OFBool disableConsistencyCheck(const OFBool newMode = OFFalse);    /** add pluggable image support.     *  NB: This plugin is required to create icon images from DICOM files!     *  @param plugin pointer to an instance of the plugin implementation.     *    See class DicomDirImageImplementation (dcmjpeg/include/ddpiimpl.h).     *  @return OFTrue if successful, OFFalse otherwise     */    OFBool addImageSupport(DicomDirImagePlugin *plugin);    /** set the log stream.     *  The log stream is used to report any warnings, debug and error messages.     ** @param stream pointer to the log stream (initial: NULL = no messages)     */    void setLogStream(OFConsole *stream);    /* -- static function -- */    /** get name/identifier associated with the given application profile     *  @param profile media storage application profile     *  @return name of the application profile (e.g. "STD-GEN-CD/DVD-RAM")     */    static const char *getProfileName(const E_ApplicationProfile profile);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -