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

📄 dimoimg.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 4 页
字号:
     *  @param  disp     pointer to current display function object     *  @param  samples  number of samples per pixel     *  @param  frame    number of frame to be rendered     *  @param  bits     number of bits for the output pixel data (depth)     *  @param  low      output pixel value to which 0 is mapped (min)     *  @param  high     output pixel value to which 2^bits-1 is mapped (max)     */    void getDataUint16(void *buffer,                       DiDisplayFunction *disp,                       const int samples,                       const unsigned long frame,                       const int bits,                       const Uint32 low,                       const Uint32 high);    /** get pixel data with specified format for Sint16 input (helper function).     *  (memory is handled externally)     *     ** @param  buffer   untyped pointer to the externally allocated memory buffer     *  @param  disp     pointer to current display function object     *  @param  samples  number of samples per pixel     *  @param  frame    number of frame to be rendered     *  @param  bits     number of bits for the output pixel data (depth)     *  @param  low      output pixel value to which 0 is mapped (min)     *  @param  high     output pixel value to which 2^bits-1 is mapped (max)     */    void getDataSint16(void *buffer,                       DiDisplayFunction *disp,                       const int samples,                       const unsigned long frame,                       const int bits,                       const Uint32 low,                       const Uint32 high);    /** get pixel data with specified format for Uint32 input (helper function).     *  (memory is handled externally)     *     ** @param  buffer   untyped pointer to the externally allocated memory buffer     *  @param  disp     pointer to current display function object     *  @param  samples  number of samples per pixel     *  @param  frame    number of frame to be rendered     *  @param  bits     number of bits for the output pixel data (depth)     *  @param  low      output pixel value to which 0 is mapped (min)     *  @param  high     output pixel value to which 2^bits-1 is mapped (max)     */    void getDataUint32(void *buffer,                       DiDisplayFunction *disp,                       const int samples,                       const unsigned long frame,                       const int bits,                       const Uint32 low,                       const Uint32 high);    /** get pixel data with specified format for Sint32 input (helper function).     *  (memory is handled externally)     *     ** @param  buffer   untyped pointer to the externally allocated memory buffer     *  @param  disp     pointer to current display function object     *  @param  samples  number of samples per pixel     *  @param  frame    number of frame to be rendered     *  @param  bits     number of bits for the output pixel data (depth)     *  @param  low      output pixel value to which 0 is mapped (min)     *  @param  high     output pixel value to which 2^bits-1 is mapped (max)     */    void getDataSint32(void *buffer,                       DiDisplayFunction *disp,                       const int samples,                       const unsigned long frame,                       const int bits,                       const Uint32 low,                       const Uint32 high);    /** create a presentation look-up table converting the pixel data which is linear to     *  Optical Density to DDLs of the softcopy device (used to display print images on screen).     *     ** @param  count  number of LUT entries     *  @param  bits   number of bits per entry     *     ** @return true if successful, false otherwise     */    int createLinODPresentationLut(const unsigned long count, const int bits);    /// center of current VOI-window    double WindowCenter;    /// width of current VOI-window    double WindowWidth;    /// number of stored VOI-windows    unsigned long WindowCount;    /// number of stored VOU-LUTs    unsigned long VoiLutCount;    /// true, if current VOI-window is valid    int ValidWindow;    /// free text explanation of current VOI transformation    OFString VoiExplanation;    /// presentation LUT shape (identity or inverse)    ES_PresentationLut PresLutShape;    /// minimum density of a print-out (in hundreds of Optical Density)    unsigned int MinDensity;    /// maximum density of a print-out (ditto)    unsigned int MaxDensity;    /// reflected ambient light (in candela per squaremeter)    unsigned int Reflection;    /// illumination (ditto)    unsigned int Illumination;    /// points to associated overlay-objects ([0] = built-in, [1] = additional)    DiOverlay *Overlays[2];    /// points to associated VOI-LUT-object    DiLookupTable *VoiLutData;    /// points to associated presentation-LUT-object    DiLookupTable *PresLutData;    /// points to intermediate pixel data representation (object)    DiMonoPixel *InterData;    /// points to grayscale standard display function (only referenced!)    DiDisplayFunction *DisplayFunction; private:    /// points to current output data (object)    DiMonoOutputPixel *OutputData;    /// points to current overlay plane data (pixel array)    void *OverlayData; // --- declarations to avoid compiler warnings    DiMonoImage(const DiMonoImage &);    DiMonoImage &operator=(const DiMonoImage &);};#endif/* * * CVS/RCS Log: * $Log: dimoimg.h,v $ * Revision 1.46  2005/12/08 16:47:50  meichel * Changed include path schema for all DCMTK header files * * Revision 1.45  2005/03/09 17:33:16  joergr * Added mode to writeImageToDataset() which allows the value of BitsStored to * be determined either from 'used' or from 'possible' pixel values. * * Revision 1.44  2004/07/20 18:12:16  joergr * Added API method to "officially" access the internal intermediate pixel data * representation (e.g. to get Hounsfield Units for CT images). * * Revision 1.43  2004/02/06 11:07:50  joergr * Distinguish more clearly between const and non-const access to pixel data. * * Revision 1.42  2003/12/23 10:51:52  joergr * Updated documentation to get rid of doxygen warnings. * * Revision 1.41  2003/12/17 16:17:29  joergr * Added new compatibility flag that allows to ignore the third value of LUT * descriptors and to determine the bits per table entry automatically. * * Revision 1.40  2003/12/08 18:30:16  joergr * Adapted type casts to new-style typecast operators defined in ofcast.h. * Removed leading underscore characters from preprocessor symbols (reserved * symbols). Updated CVS header. * * Revision 1.39  2003/06/12 15:08:34  joergr * Fixed inconsistent API documentation reported by Doxygen. * * Revision 1.38  2003/05/20 09:20:21  joergr * Added method returning the number of bytes required to store a single * rendered frame: getOutputDataSize(). * * Revision 1.37  2002/12/09 13:32:52  joergr * Renamed parameter/local variable to avoid name clashes with global * declaration left and/or right (used for as iostream manipulators). * * Revision 1.36  2002/08/02 15:03:53  joergr * Added function to write the current image (not only a selected frame) to a * DICOM dataset. * * Revision 1.35  2002/06/26 17:20:04  joergr * Removed superfluous "inline" method specifyer (MSVC6 linker reported an * error). * * Revision 1.34  2002/06/26 16:04:44  joergr * Added support for polarity flag to color images. * Added new methods to get the explanation string of stored VOI windows and * LUTs (not only of the currently selected VOI transformation). * * Revision 1.33  2002/01/29 17:05:50  joergr * Added optional flag to the "Windows DIB" methods allowing to switch off the * scanline padding. * * Revision 1.32  2001/11/19 12:55:54  joergr * Added parameter 'frame' to setRoiWindow(). * * Revision 1.31  2001/11/09 16:27:34  joergr * Added support for Window BMP file format. * Enhanced and renamed createTrueColorDIB() method. * * Revision 1.30  2001/09/28 13:06:10  joergr * Added routines to get the currently active Polarity and PresentationLUTShape. * Added method setRoiWindow() which automatically calculates a min-max VOI * window for a specified rectangular region of the image. * Added method to extract embedded overlay planes from pixel data and store * them in group (6xxx,3000) format. * * Revision 1.29  2001/06/01 15:49:44  meichel * Updated copyright header * * Revision 1.28  2001/05/14 09:49:17  joergr * Added support for "1 bit output" of overlay planes; useful to extract * overlay planes from the pixel data and store them separately in the dataset. * * Revision 1.27  2000/07/07 13:42:30  joergr * Added support for LIN OD presentation LUT shape. * * Revision 1.26  2000/06/07 14:30:27  joergr * Added method to set the image polarity (normal, reverse). * * Revision 1.25  2000/03/08 16:24:18  meichel * Updated copyright header. * * Revision 1.24  1999/12/09 17:26:24  joergr * Split source file dimoimg.cc into 4 parts to avoid compiler problems * with gcc and additional optimization options. * * Revision 1.23  1999/10/20 10:33:15  joergr * Enhanced method getOverlayData to support 12 bit data for print. * * Revision 1.22  1999/10/06 13:38:46  joergr * Corrected creation of PrintBitmap pixel data: VOI windows should be applied * before clipping to avoid that the region outside the image (border) is also * windowed (this requires a new method in dcmimgle to create a DicomImage * with the grayscale transformations already applied). * * Revision 1.21  1999/09/17 12:24:47  joergr * Added/changed/completed DOC++ style comments in the header files. * * Revision 1.20  1999/09/10 08:45:18  joergr * Added support for CIELAB display function. * * Revision 1.19  1999/08/25 16:41:52  joergr * Added new feature: Allow clipping region to be outside the image * (overlapping). * * Revision 1.18  1999/07/23 14:03:05  joergr * Added dummy method (no implementation yet) to create inverse LUTs. * Added method to create 12 bit packed bitmap data (used for grayscale print * storage). * Added method to return pointer to currently used display function. * * Revision 1.17  1999/04/28 17:03:47  joergr * Added type casts to NULL pointers returned as 'const char *' to avoid * compiler warnings reported by gcc 2.7.2.1 (Linux). * * Revision 1.16  1999/04/28 14:49:54  joergr * Added experimental support to create grayscale images with more than 256 * shades of gray to be displayed on a consumer monitor (use pastel colors). * * Revision 1.15  1999/03/24 17:20:09  joergr * Added/Modified comments and formatting. * * Revision 1.14  1999/03/22 08:51:39  joergr * Added parameter to specify (transparent) background color for method * getOverlayData(). * * Revision 1.13  1999/02/11 16:34:36  joergr * Added routine to check whether particular grayscale values are unused in * the output data. * * Revision 1.12  1999/02/08 12:39:05  joergr * Changed implementation of removeAllOverlays(). * * Revision 1.11  1999/02/05 16:43:13  joergr * Added optional parameter to method convertPValueToDDL to specify width * of output data (number of bits). * * Revision 1.10  1999/02/03 17:27:58  joergr * Added support for calibration according to Barten transformation (incl. * a DISPLAY file describing the monitor characteristic). * * Revision 1.9  1999/01/20 15:03:40  joergr * Added new output method to fill external memory buffer with rendered pixel * data. * * Revision 1.8  1999/01/11 09:35:10  joergr * Added parameter to method 'getMinMaxValues()' to return absolute minimum * and maximum values ('possible') in addition to actually 'used' pixel * values. * * Revision 1.7  1998/12/23 13:21:28  joergr * Changed parameter type (long to int) to avoid warning reported by MSVC5. * * Revision 1.6  1998/12/23 12:38:16  joergr * Corrected some typos and formatting. * * Revision 1.4  1998/12/22 14:26:19  joergr * Added new parameters to method addOverlay(). * * Revision 1.3  1998/12/16 16:34:06  joergr * Added explanation string to LUT class (retrieved from dataset). * Added explanation string for VOI transformations. * Renamed 'setNoVoiLutTransformation' method ('Voi' instead of 'VOI'). * Removed several methods used for monochrome images only in base class * 'DiImage'. Introduced mechanism to use the methods directly. * * Revision 1.2  1998/12/14 17:20:03  joergr * Added methods to add and remove additional overlay planes (still untested). * * Revision 1.1  1998/11/27 15:20:57  joergr * Added copyright message. * Added methods and constructors for flipping and rotating, changed for * scaling and clipping. * Added method to directly create java AWT bitmaps. * Added constructors to use external modality transformations. * Added methods to support presentation LUTs and shapes. * * Revision 1.6  1998/07/01 08:39:22  joergr * Minor changes to avoid compiler warnings (gcc 2.8.1 with additional * options), e.g. add copy constructors. * * Revision 1.5  1998/05/11 14:53:20  joergr * Added CVS/RCS header to each file. * * */

⌨️ 快捷键说明

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