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

📄 dcddirif.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 5 页
字号:
    /** check whether given tag exists in the DICOM dataset     *  @param dataset DICOM dataset to be checked     *  @param key tag to be searched for     *  @param filename of the file (optional, report any error if specified)     *  @return OFTrue if tag exists, OFFalse otherwise     */    OFBool checkExists(DcmItem *dataset,                       const DcmTagKey &key,                       const char *filename = NULL);    /** check whether given tag exists with a value in the DICOM dataset     *  @param dataset DICOM dataset to be checked     *  @param key tag to be searched for     *  @param filename of the file (optional, report any error if specified)     *  @return OFTrue if tag exists with value, OFFalse otherwise     */    OFBool checkExistsWithValue(DcmItem *dataset,                                const DcmTagKey &key,                                const char *filename = NULL);    /** check whether given tag exists in the DICOM dataset and has the expected string value     *  @param dataset DICOM dataset to be checked     *  @param key tag to be searched for     *  @param value expected string value     *  @param filename of the file (optional, report any error if specified)     *  @return OFTrue if tag exists with given string value, OFFalse otherwise     */    OFBool checkExistsWithStringValue(DcmItem *dataset,                                      const DcmTagKey &key,                                      const OFString &value,                                      const char *filename = NULL);    /** check whether given tag exists in the DICOM dataset and has the expected integer value     *  @param dataset DICOM dataset to be checked     *  @param key tag to be searched for     *  @param value expected integer value     *  @param filename of the file (optional, report any error if specified)     *  @param reject report an "Error" if OFTrue, a "Warning" if OFFalse     *  @return OFTrue if tag exists with given string value, OFFalse otherwise     */    OFBool checkExistsWithIntegerValue(DcmItem *dataset,                                       const DcmTagKey &key,                                       const long value,                                       const char *filename = NULL,                                       const OFBool reject = OFTrue);    /** check whether given tag exists in the DICOM dataset and has an integer value in the expected range     *  @param dataset DICOM dataset to be checked     *  @param key tag to be searched for     *  @param min minimum integer value of the expected range     *  @param max maximum integer value of the expected range     *  @param filename of the file (optional, report any error if specified)     *  @param reject report an "Error" if OFTrue, a "Warning" if OFFalse     *  @return OFTrue if tag exists with given string value, OFFalse otherwise     */    OFBool checkExistsWithMinMaxValue(DcmItem *dataset,                                      const DcmTagKey &key,                                      const long min,                                      const long max,                                      const char *filename = NULL,                                      const OFBool reject = OFTrue);    /** get string value from dataset and report an error (if any)     *  @param dataset dataset from which the string value is to be retrieved     *  @param key tag of the attribute to be retrieved     *  @param result string variable in which the resulting value is stored     *  @param searchIntoSub flag indicating whether to do a deep search or not     *  @return reference to the resulting string value (parameter 'result')     */    OFString &getStringFromDataset(DcmItem *dataset,                                   const DcmTagKey &key,                                   OFString &result,                                   OFBool searchIntoSub = OFFalse);    /** get string value from file and report an error (if any)     *  @param filename name of the file from which the string value is to be retrieved     *  @param key tag of the attribute to be retrieved     *  @param result string variable in which the resulting value is stored     *  @param searchIntoSub flag indicating whether to do a deep search or not     *  @return reference to the resulting string value (parameter 'result')     */    OFString &getStringFromFile(const char *filename,                                const DcmTagKey &key,                                OFString &result,                                OFBool searchIntoSub = OFFalse);    /** copy element from dataset to directory record     *  @param dataset DICOM dataset containing the original data     *  @param key tag of the element to be copied     *  @param record directory record to which the element is to be copied     *  @param optional flag indicating whether the element is optional or required     *  @param copyEmpty flag indicating whether to copy an empty element (no value)     */    void copyElement(DcmItem *dataset,                     const DcmTagKey &key,                     DcmDirectoryRecord *record,                     const OFBool optional = OFFalse,                     const OFBool copyEmpty = OFTrue);    /** copy optional string value from dataset to directory record     *  @param dataset DICOM dataset containing the original data     *  @param key tag of the element value to be copied     *  @param record directory record to which the element value is to be copied     *  @param defaultValue default string value used in case the element is missing     *  @param printWarning print warning message if element does not exist (with a value)     *    and no default value is given     */    void copyStringWithDefault(DcmItem *dataset,                               const DcmTagKey &key,                               DcmDirectoryRecord *record,                               const char *defaultValue = "",                               const OFBool printWarning = OFFalse);    /** compare string attribute from dataset and record and report any deviation     *  @param dataset DICOM dataset where the string value is stored     *  @param key tag of the string value to be compared     *  @param record directory record where the string value is stored     *  @param sourceFilename name of the source DICOM file     *  @return OFTrue if string values are identical, OFFalse otherwise     */    OFBool compareStringAttributes(DcmItem *dataset,                                   DcmTagKey &key,                                   DcmDirectoryRecord *record,                                   const OFString &sourceFilename);    /** compare sequence attribute from dataset and record and report any deviation     *  @param dataset DICOM dataset where the sequence value is stored     *  @param key tag of the sequence to be compared     *  @param record directory record where the sequence value is stored     *  @param sourceFilename name of the source DICOM file     *  @return OFTrue if sequences are identical, OFFalse otherwise     */    OFBool compareSequenceAttributes(DcmItem *dataset,                                     DcmTagKey &key,                                     DcmDirectoryRecord *record,                                     const OFString &sourceFilename);    /** set default value (number or prefix and number) to a given tag     *  @param record directory record where the elements are stored     *  @param key tag of the element to be modifed     *  @param number numeric value to be set as a the element value     *  @param prefix optional prefix to be added to the numeric value     */    void setDefaultValue(DcmDirectoryRecord *record,                         const DcmTagKey &key,                         const unsigned long number,                         const char *prefix = NULL);  private:    /// output stream for error messages, NULL for no messages    OFConsole *LogStream;    /// pointer to the current DICOMDIR object    DcmDicomDir *DicomDir;    /// pointer to the optional image plugin (required for icon image support)    DicomDirImagePlugin *ImagePlugin;    /// currently selected application profile    E_ApplicationProfile ApplicationProfile;    /// print verbose messages    OFBool VerboseMode;    /// create DICOMDIR backup    OFBool BackupMode;    /// abort on first inconsistent record    OFBool AbortMode;    /// automatically map filenames    OFBool MapFilenamesMode;    /// invent missing attributes mode    OFBool InventMode;    /// invent missing patient ID mode    OFBool InventPatientIDMode;    /// check pixel encoding    OFBool EncodingCheck;    /// check image resolution    OFBool ResolutionCheck;    /// check transfer syntax    OFBool TransferSyntaxCheck;    /// check consistency of newly added record    OFBool ConsistencyCheck;    /// create icon images    OFBool IconImageMode;    /// name of the DICOMDIR backup file    OFString BackupFilename;    /// flag indicating whether a backup has been created    OFBool BackupCreated;    /// size of the optional icon image in pixels    unsigned int IconSize;    /// filename prefix for the external icon images    OFString IconPrefix;    /// filename of the default icon (if any)    OFString DefaultIcon;    /// flag indicating whether JPEG compression is supported    OFBool JPEGSupport;    /// flag indicating whether RLE compression is supported    OFBool RLESupport;    /// current patient number used to invent missing attribute values    unsigned long AutoPatientNumber;    /// current study number used to invent missing attribute values    unsigned long AutoStudyNumber;    /// current series number used to invent missing attribute values    unsigned long AutoSeriesNumber;    /// current instance number used to invent missing attribute values    unsigned long AutoInstanceNumber;    /// current overlay number used to invent missing attribute values    unsigned long AutoOverlayNumber;    /// current LUT number used to invent missing attribute values    unsigned long AutoLutNumber;    /// current curve number used to invent missing attribute values    unsigned long AutoCurveNumber;    /// private undefined copy constructor    DicomDirInterface(const DicomDirInterface &obj);    /// private undefined assignment operator    DicomDirInterface &operator=(const DicomDirInterface &obj);};#endif/* * * CVS/RCS Log: * $Log: dcddirif.h,v $ * Revision 1.8  2005/12/15 15:40:48  joergr * Removed unsused parameter. * * Revision 1.7  2005/12/08 16:28:03  meichel * Changed include path schema for all DCMTK header files * * Revision 1.6  2005/10/27 13:31:21  joergr * Added support for Encapsulated Document, Real World Value Mapping and * Hanging Protocol objects to DICOMDIR tools. * * Revision 1.5  2005/06/13 14:36:41  joergr * Added new options to disable check on pixel encoding and transfer syntax. * * Revision 1.4  2005/03/09 17:53:34  joergr * Added support for new Media Storage Application Profiles according to DICOM * PS 3.12-2004. Removed support for non-standard conformant "No profile". * Added support for UTF-8 for the contents of the fileset descriptor file. * * Revision 1.3  2004/02/13 17:36:46  joergr * Added support for new directory records RAW DATA and SPECTROSCOPY introduced * with CP 343. * * Revision 1.2  2004/02/13 14:11:15  joergr * Added support for new directory records REGISTRATION and FIDUCIAL introduced * with supplement 73 (Spatial Registration Storage SOP Classes). * * Revision 1.1  2003/08/12 14:35:00  joergr * Added new interface class for simplified creation of a DICOMDIR. * * */

⌨️ 快捷键说明

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