33 #include "dcmtk/config/osconfig.h" 35 #include "dcmtk/ofstd/ofcast.h" 37 #include "dcmtk/dcmimgle/diimage.h" 38 #include "dcmtk/dcmimgle/dimopx.h" 39 #include "dcmtk/dcmimgle/dimoopx.h" 40 #include "dcmtk/dcmimgle/didispfn.h" 68 const EI_Status status);
78 const EI_Status status,
80 const double intercept);
91 const EI_Status status,
121 const int mode)
const;
221 const unsigned long top_pos,
222 const unsigned long width,
223 const unsigned long height,
224 const unsigned long frame);
242 int setWindow(
const unsigned long pos = 0);
257 const char *explanation = NULL);
309 const EL_BitsPerTableEntry descripMode = ELM_UseValue);
320 const EL_BitsPerTableEntry descripMode = ELM_UseValue);
381 const unsigned int max,
382 const unsigned int reflect,
383 const unsigned int illumin);
419 const EL_BitsPerTableEntry descripMode = ELM_UseValue);
433 const EL_BitsPerTableEntry descripMode = ELM_UseValue);
461 const signed int left_pos,
462 const signed int top_pos,
463 const unsigned int columns,
464 const unsigned int rows,
468 const EM_Overlay mode);
505 int flip(
const int horz,
516 int rotate(
const int degree);
530 return (((bits < 1) || (bits > MAX_BITS)) && (bits != MI_PastelColor)) ?
BitsPerSample : bits;
552 const int planar = 0) = 0;
566 const unsigned long size,
567 const unsigned long frame,
569 const int planar = 0) = 0;
603 const unsigned int plane,
604 unsigned int &left_pos,
605 unsigned int &top_pos,
607 unsigned int &height,
609 const unsigned int idx,
611 const Uint16 fore = 0xff,
612 const Uint16 back = 0x0);
629 const unsigned int plane,
631 unsigned int &height,
632 const unsigned int idx,
634 const Uint16 fore = 0xff,
635 const Uint16 back = 0x0);
659 const unsigned int plane,
661 unsigned int &height,
662 unsigned long &frames,
663 const unsigned int idx = 0);
696 const unsigned long size,
697 const unsigned long frame,
699 const int upsideDown,
700 const int padding = 1);
712 const unsigned long frame,
727 const unsigned long size,
728 const unsigned long count,
765 int writePPM(STD_NAMESPACE ostream& stream,
766 const unsigned long frame,
779 const unsigned long frame,
791 const unsigned long frame,
803 const unsigned long frame,
816 const EI_Status status,
826 const unsigned long fstart,
827 const unsigned long fcount);
863 const signed long left_pos,
864 const signed long top_pos,
865 const Uint16 src_cols,
866 const Uint16 src_rows,
867 const Uint16 dest_cols,
868 const Uint16 dest_rows,
869 const int interpolate,
871 const Uint16 pvalue);
901 const unsigned long frame,
911 const OFBool reuse = OFFalse);
976 const void *
getData(
void *buffer,
977 const unsigned long size,
978 const unsigned long frame,
997 const unsigned long frame,
1016 const unsigned long frame,
1035 const unsigned long frame,
1054 const unsigned long frame,
1073 const unsigned long frame,
1092 const unsigned long frame,
double WindowCenter
center of current VOI-window
DiOverlay * getOverlayPtr(const unsigned int idx)
get pointer to specified overlay managing object
a class representing a list of DICOM elements in which each element has a different tag and elements ...
unsigned long getWindowCount() const
get number of VOI windows (stored in image file)
a class used to represent overlay data (60xx,3000)
ES_PresentationLut getPresentationLutShape() const
get shape for presentation transformation.
int removeAllOverlays()
remove all additional overlay planes
const void * getOutputPlane(const int dummy) const
get pixel data of specified plane.
DiMonoImage(const DiDocument *docu, const EI_Status status)
constructor
int checkInterData(const int mode=1)
check intermediate pixel representation for consistency
Abstract base class to handle monochrome pixel data.
void getDataUint8(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 Uint8 input (helper function).
void Init(DiMonoModality *modality, const OFBool reuse=OFFalse)
initialize internal data structures and member variables
int deleteLookupTable(const int bits)
delete specified LUT
int BitsPerSample
actual number of bits per sample (depth)
int setVoiLutFunction(const EF_VoiLutFunction function)
set VOI LUT function
int writeRawPPM(FILE *stream, const unsigned long frame, const int bits)
write pixel data to raw PPM file
const char * getVoiTransformationExplanation() const
get description of active VOI transformation
const void * getData(void *buffer, const unsigned long size, const unsigned long frame, int bits, const int planar, const int negative)
get pixel data with specified format.
Abstract base class to create monochrome output data.
unsigned long createAWTBitmap(void *&data, const unsigned long frame, const int bits)
create true color (32 bit) or palette (8 bit) bitmap for Java (AWT default format).
virtual int processNextFrames(const unsigned long fcount)
process next couple of frames
DiOverlay * Overlays[2]
points to associated overlay-objects ([0] = built-in, [1] = additional)
const char * getPresentationLutExplanation() const
get description of active presentation LUT
const char * getVoiWindowExplanation(const unsigned long pos, OFString &explanation) const
get description of specified VOI window (stored in the image file)
int setPresentationLut(const DcmUnsignedShort &data, const DcmUnsignedShort &descriptor, const DcmLongString *explanation=NULL, const EL_BitsPerTableEntry descripMode=ELM_UseValue)
set LUT for presentation transformation.
unsigned long create6xxx3000OverlayData(Uint8 *&buffer, const unsigned int plane, unsigned int &width, unsigned int &height, unsigned long &frames, const unsigned int idx=0)
create bitmap for specified overlay plane and store it in (6xxx,3000) format.
Interface class to DICOM data management (dcmdata).
int setMinMaxWindow(const int idx=1)
set automatically calculated minimum/maximum window.
unsigned int MinDensity
minimum density of a print-out (in hundreds of Optical Density)
int ValidWindow
true, if current VOI-window is valid
virtual unsigned long getOutputDataSize(const int bits=0) const
get number of bytes required for the rendered output of a single frame
DiLookupTable * PresLutData
points to associated presentation-LUT-object
virtual ~DiMonoImage()
destructor
unsigned int Reflection
reflected ambient light (in candela per squaremeter)
int setNoDisplayFunction()
set no display function.
void deleteOverlayData()
delete buffer for overlay plane data.
int getWindow(double ¢er, double &width)
get current window center and width values
int createLinODPresentationLut(const unsigned long count, const int bits)
create a presentation look-up table converting the pixel data which is linear to Optical Density to D...
unsigned long getVoiLutCount() const
get number of VOI LUTs (stored in image file)
int addOverlay(const unsigned int group, const signed int left_pos, const signed int top_pos, const unsigned int columns, const unsigned int rows, const DcmOverlayData &data, const DcmLongString &label, const DcmLongString &description, const EM_Overlay mode)
add specified plane to group of additional overlay planes.
EF_VoiLutFunction VoiLutFunction
VOI LUT function (linear or sigmoid)
void * OverlayData
points to current overlay plane data (pixel array)
void getDataSint8(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 Sint8 input (helper function).
int flip(const int horz, const int vert)
flip current image (horizontally and/or vertically)
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 Uint32 input (helper function).
int writePPM(STD_NAMESPACE ostream &stream, const unsigned long frame, const int bits)
write pixel data to PPM file.
const char * getModalityLutExplanation() const
get modality LUT explanation string
void deleteOutputData()
delete internally handled output memory buffer Save memory if data is no longer needed.
void InitSint16(DiMonoModality *modality)
initialize internal data structures (for Sint16)
EF_VoiLutFunction getVoiLutFunction() const
get VOI LUT function.
unsigned int MaxDensity
maximum density of a print-out (ditto)
int setNoVoiTransformation()
unset all VOI transformations (windows and LUTs).
const char * getModalityLutExplanation() const
get description of performed modality LUT transformation
DiLookupTable * VoiLutData
points to associated VOI-LUT-object
int deleteDisplayLUT(const int bits)
delete specified display LUT(s)
int rotate(const int degree)
rotate current image (by steps of 90 degrees)
const DiMonoPixel * getMonoInterData() const
get pointer to intermediate pixel data representation
const char * getVoiLutExplanation(const unsigned long pos, OFString &explanation) const
get description of specified VOI LUT (stored in the image file)
const DiPixel * getInterData() const
get pointer to intermediate pixel data representation
Base class for monochrome images.
Base class for color images.
a class representing the DICOM value representation 'Long String' (LO)
Class to handle modality specific transformations (incl.
double WindowWidth
width of current VOI-window
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 Uint16 input (helper function).
DiDisplayFunction * getDisplayFunction() const
get display function
void InitUint16(DiMonoModality *modality)
initialize internal data structures (for Uint16)
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 Sint16 input (helper function).
Class to handle color palette look-up tables.
int convertPValueToDDL(const Uint16 pvalue, Uint16 &ddl, const int bits)
convert P-value to DDL.
int writeBMP(FILE *stream, const unsigned long frame, const int bits)
write pixel data to BMP file
unsigned long createDIB(void *&data, const unsigned long size, const unsigned long frame, const int bits, const int upsideDown, const int padding=1)
create true color (24/32 bit) or palette (8 bit) bitmap for MS Windows.
void getDataSint32(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).
int setRoiWindow(const unsigned long left_pos, const unsigned long top_pos, const unsigned long width, const unsigned long height, const unsigned long frame)
set automatically calculated VOI window for the specified Region of Interest (ROI).
Class to handle hardcopy and softcopy device characteristics file and manage display LUTs (for calibr...
a class representing the DICOM value representation 'Unsigned Short' (US)
OFString VoiExplanation
free text explanation of current VOI transformation
unsigned long VoiLutCount
number of stored VOU-LUTs
virtual const void * getOutputData(const unsigned long frame, const int bits, const int planar=0)=0
get pixel data with specified format.
void InitSint8(DiMonoModality *modality)
initialize internal data structures (for Sint8)
virtual int getBits(const int bits=0) const
get number of bits per sample.
void InitSint32(DiMonoModality *modality)
initialize internal data structures (for Sint32)
int setPresentationLutShape(const ES_PresentationLut shape)
set shape for presentation transformation.
Class to handle a set of overlay planes.
DiMonoImage * getMonoImagePtr()
get pointer to current monochrome image (this)
int isValueUnused(const unsigned long value)
check whether given output value is unused
a simple string class that implements a subset of std::string.
const char * getExplanation() const
get LUT explanation string
static void * createPackedBitmap(const void *buffer, const unsigned long size, const unsigned long count, const int alloc, const int stored)
create packed bitmap (e.g.
Abstract base class to handle pixel data.
int setInversePresentationLut(const DcmUnsignedShort &data, const DcmUnsignedShort &descriptor, const EL_BitsPerTableEntry descripMode=ELM_UseValue)
set inverse LUT for presentation transformation.
virtual void updateImagePixelModuleAttributes(DcmItem &dataset)
update Image Pixel Module attributes in the given dataset.
const void * getOverlayData(const unsigned long frame, const unsigned int plane, unsigned int &left_pos, unsigned int &top_pos, unsigned int &width, unsigned int &height, EM_Overlay &mode, const unsigned int idx, const int bits=8, const Uint16 fore=0xff, const Uint16 back=0x0)
create bitmap for specified overlay plane.
int isUnused(const unsigned long value)
check whether specified pixel value is used in the image.
void InitUint8(DiMonoModality *modality)
initialize internal data structures (for Uint8)
const char * c_str() const
returns a pointer to the initial element of an array of length size()+1 whose first size() elements e...
int writeImageToDataset(DcmItem &dataset, const int mode, const int planar)
write current image and related attributes to DICOM dataset.
int setHistogramWindow(const double thresh)
set automatically calculated histogram window.
DiDisplayFunction * DisplayFunction
points to grayscale standard display function (only referenced!)
int getMinMaxValues(double &min, double &max, const int mode) const
get minimum and maximum pixel values.
const void * getFullOverlayData(const unsigned long frame, const unsigned int plane, unsigned int &width, unsigned int &height, const unsigned int idx, const int bits=8, const Uint16 fore=0xff, const Uint16 back=0x0)
create bitmap for specified overlay plane.
DiImage * createOutputImage(const unsigned long frame, const int bits)
create new single frame DiImage with applied grayscale transformations.
int setVoiLut(const DcmUnsignedShort &data, const DcmUnsignedShort &descriptor, const DcmLongString *explanation, const EL_BitsPerTableEntry descripMode=ELM_UseValue)
set VOI LUT (given by dcmdata elements).
void InitUint32(DiMonoModality *modality)
initialize internal data structures (for Uint32)
unsigned long WindowCount
number of stored VOI-windows
int setWindow(const unsigned long pos=0)
set specified window (given by index to window width/center sequence stored in image file)...
int setDisplayFunction(DiDisplayFunction *display)
set display function
DiMonoOutputPixel * OutputData
points to current output data (object)
unsigned int Illumination
illumination (ditto)
ES_PresentationLut PresLutShape
presentation LUT shape (identity, inverse or lin od)
int setHardcopyParameters(const unsigned int min, const unsigned int max, const unsigned int reflect, const unsigned int illumin)
set hardcopy parameters.
DiMonoPixel * InterData
points to intermediate pixel data representation (object)