DCMTK
Version 3.6.7
OFFIS DICOM Toolkit
|
Class to handle a set of overlay planes. More...
Public Member Functions | |
DiOverlay (const DiDocument *docu=NULL, const Uint16 alloc=0, const Uint16 stored=0, const Uint16 high=0) | |
constructor More... | |
DiOverlay (const DiOverlay *overlay, const signed long left_pos, const signed long top_pos, const double xfactor, const double yfactor) | |
constructor, clip/scale More... | |
DiOverlay (const DiOverlay *overlay, const int horz, const int vert, const Uint16 columns, const Uint16 rows) | |
constructor, flip More... | |
DiOverlay (const DiOverlay *overlay, const int degree, const Uint16 columns, const Uint16 rows) | |
constructor, rotate More... | |
virtual | ~DiOverlay () |
destructor | |
int | isPlaneVisible (unsigned int plane) |
check whether specified plane is currently visible (not hidden) More... | |
int | showPlane (unsigned int plane) |
make specified plane visible More... | |
int | showPlane (unsigned int plane, const double fore, const double thresh, const EM_Overlay mode) |
make specified plane visible and set parameters More... | |
int | showPlane (unsigned int plane, const Uint16 pvalue) |
make specified plane visible and set p-value. More... | |
int | showAllPlanes () |
make all planes visible More... | |
int | showAllPlanes (const double fore, const double thresh, const EM_Overlay mode) |
make all planes visible More... | |
int | hidePlane (unsigned int plane) |
make specified plane invisible More... | |
int | hideAllPlanes () |
make all planes invisible More... | |
int | placePlane (unsigned int plane, const signed int left_pos, const signed int top_pos) |
move plane to a new place More... | |
unsigned int | getPlaneGroupNumber (unsigned int plane) const |
get group number of specified plane More... | |
const char * | getPlaneLabel (unsigned int plane) const |
get label of specified plane More... | |
const char * | getPlaneDescription (unsigned int plane) const |
get description of specified plane More... | |
EM_Overlay | getPlaneMode (unsigned int plane) const |
get overlay mode of specified plane More... | |
unsigned int | getCount () const |
get number of overlay planes More... | |
signed long | getLeft () const |
get current x-coordinate of overlay origin. More... | |
signed long | getTop () const |
get current y-coordinate of overlay origin. More... | |
int | hasEmbeddedData () const |
check whether there are any overlay planes embedded in the pixel data More... | |
int | addPlane (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 plane to list of additional overlay planes More... | |
int | removePlane (const unsigned int group) |
remove specified plane from list of additional overlay planes More... | |
int | hasPlane (unsigned int plane, const int visible=0) const |
check whether specified plane exists More... | |
void * | getPlaneData (const unsigned long frame, unsigned int plane, unsigned int &left_pos, unsigned int &top_pos, unsigned int &width, unsigned int &height, EM_Overlay &mode, const Uint16 columns, const Uint16 rows, const int bits=8, const Uint16 fore=0xff, const Uint16 back=0x0) |
get overlay plane data as an array of 1/8/16 bit values. More... | |
void * | getFullPlaneData (const unsigned long frame, unsigned int plane, unsigned int &width, unsigned int &height, const int bits=8, const Uint16 fore=0xff, const Uint16 back=0x0) |
get overlay plane data as an array of 1/8/16 bit values. More... | |
unsigned long | create6xxx3000PlaneData (Uint8 *&buffer, unsigned int plane, unsigned int &width, unsigned int &height, unsigned long &frames) |
create overlay plane data in (6xxx,3000) format. More... | |
![]() | |
void | addReference () |
add a reference. More... | |
void | removeReference () |
remove a reference. More... | |
Static Public Attributes | |
static const unsigned int | MaxOverlayCount |
constant defining the maximum number of overlay planes (16) | |
static const unsigned int | FirstOverlayGroup |
constant defining the group number of the first overlay plane (0x6000) | |
Protected Member Functions | |
Uint16 * | Init (const DiOverlay *overlay) |
initialize new overlay managing object More... | |
int | convertToPlaneNumber (unsigned int &plane, const int mode) const |
convert given plane or group number to a valid plane number More... | |
unsigned int | convertToGroupNumber (const unsigned int plane) const |
convert five plane number to corresponding group number More... | |
int | isValidGroupNumber (const unsigned int group) const |
check whether given group number is valid. More... | |
int | checkPlane (const unsigned int plane, const int mode=1) |
check whether the specified plane is valid. More... | |
![]() | |
DiObjectCounter () | |
constructor. More... | |
virtual | ~DiObjectCounter () |
destructor | |
Private Attributes | |
signed long | Left |
left offset to all planes | |
signed long | Top |
top offset to all planes | |
Uint16 | Width |
maximum width of all planes | |
Uint16 | Height |
maximum height of all planes | |
unsigned long | Frames |
maximum number of frames | |
int | AdditionalPlanes |
status, if true planes are added later with addPlane() | |
DiOverlayData * | Data |
points to overlay data (provides shared data) | |
Class to handle a set of overlay planes.
DiOverlay::DiOverlay | ( | const DiDocument * | docu = NULL , |
const Uint16 | alloc = 0 , |
||
const Uint16 | stored = 0 , |
||
const Uint16 | high = 0 |
||
) |
constructor
docu | pointer to dataset (encapsulated) |
alloc | bits allocated for image pixel data |
stored | bits stored for image pixel data |
high | high bit for image pixel data |
DiOverlay::DiOverlay | ( | const DiOverlay * | overlay, |
const signed long | left_pos, | ||
const signed long | top_pos, | ||
const double | xfactor, | ||
const double | yfactor | ||
) |
constructor, clip/scale
overlay | pointer to reference overlay object |
left_pos | x-coordinate of new overlay origin (offset for all planes) |
top_pos | y-coordinate of new overlay origin (offset for all planes) |
xfactor | scaling factor in x-direction |
yfactor | scaling factor in y-direction |
DiOverlay::DiOverlay | ( | const DiOverlay * | overlay, |
const int | horz, | ||
const int | vert, | ||
const Uint16 | columns, | ||
const Uint16 | rows | ||
) |
constructor, flip
overlay | pointer to reference overlay object |
horz | flip horizontally if true |
vert | flip vertically if true |
columns | width of the surrounding image |
rows | height of the surrounding image |
DiOverlay::DiOverlay | ( | const DiOverlay * | overlay, |
const int | degree, | ||
const Uint16 | columns, | ||
const Uint16 | rows | ||
) |
constructor, rotate
overlay | pointer to reference overlay object |
degree | angle by which the overlay planes should be rotated |
columns | width of the surrounding image |
rows | height of the surrounding image |
int DiOverlay::addPlane | ( | 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 plane to list of additional overlay planes
group | group number of plane to be added (0x6000-0x60ff). If group number already exists in the list of additional planes the old one is replaced. If the number exists in the list of planes stored in the image dataset the new plane hides it. |
left_pos | x-coordinate of the plane origin |
top_pos | y-coordinate of the plane origin |
columns | width of the overlay plane (in pixels) |
rows | height of the overlay plane |
data | element where the plane data is stored |
label | element where the plane label is stored |
description | element where the plane description is stored |
mode | overlay plane mode |
|
protected |
check whether the specified plane is valid.
and determine maximum resolution and number of frames which are common for all overlay planes so far.
plane | index of plane (0..15) |
mode | if true the maximum number of frames is determined, otherwise not |
|
inlineprotected |
convert five plane number to corresponding group number
plane | index of plane (0..15) |
|
protected |
convert given plane or group number to a valid plane number
plane | plane or group number to be converted |
mode | true or false, see return value |
unsigned long DiOverlay::create6xxx3000PlaneData | ( | Uint8 *& | buffer, |
unsigned int | plane, | ||
unsigned int & | width, | ||
unsigned int & | height, | ||
unsigned long & | frames | ||
) |
create overlay plane data in (6xxx,3000) format.
(1 bit allocated and stored, foreground color is 1, background color is 0, data is 16 bit padded - even length) Memory isn't handled internally and must therefore be deleted from calling program.
buffer | stores pointer to overlay data (memory is allocated internally) |
plane | number (0..15) or group number (0x60nn) of overlay plane |
width | returns width of overlay plane (in pixels) |
height | returns height of overlay plane (in pixels) |
frames | returns number of frames (multiple overlay frames possible!) |
|
inline |
get number of overlay planes
void* DiOverlay::getFullPlaneData | ( | const unsigned long | frame, |
unsigned int | plane, | ||
unsigned int & | width, | ||
unsigned int & | height, | ||
const int | bits = 8 , |
||
const Uint16 | fore = 0xff , |
||
const Uint16 | back = 0x0 |
||
) |
get overlay plane data as an array of 1/8/16 bit values.
Memory isn't handled internally and must therefore be deleted from calling program.
frame | number of frame |
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
width | get width of the overlay plane (in pixels) |
height | get height of the overlay plane |
bits | number of bits (stored) in the resulting array, default: 8 |
fore | foreground color used for the plane (default: 0xff = white, for 8 bits) |
back | transparent background color (default: 0x00 = black) |
|
inline |
get current x-coordinate of overlay origin.
This value is added to the origin of all overlay planes.
Referenced by DiMonoOutputPixelTemplate< T1, T2, T3 >::overlay().
void* DiOverlay::getPlaneData | ( | const unsigned long | frame, |
unsigned int | plane, | ||
unsigned int & | left_pos, | ||
unsigned int & | top_pos, | ||
unsigned int & | width, | ||
unsigned int & | height, | ||
EM_Overlay & | mode, | ||
const Uint16 | columns, | ||
const Uint16 | rows, | ||
const int | bits = 8 , |
||
const Uint16 | fore = 0xff , |
||
const Uint16 | back = 0x0 |
||
) |
get overlay plane data as an array of 1/8/16 bit values.
Memory isn't handled internally and must therefore be deleted from calling program.
frame | number of frame |
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
left_pos | get x-coordinate of the plane origin |
top_pos | get y-coordinate of the plane origin |
width | get width of the overlay plane (in pixels) |
height | get height of the overlay plane |
mode | get overlay plane mode |
columns | width of the surrounding image |
rows | height of the surrounding image |
bits | number of bits (stored) in the resulting array, default: 8 |
fore | foreground color used for the plane (default: 0xff = white, for 8 bits) |
back | transparent background color (default: 0x00 = black) |
const char* DiOverlay::getPlaneDescription | ( | unsigned int | plane | ) | const |
get description of specified plane
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
unsigned int DiOverlay::getPlaneGroupNumber | ( | unsigned int | plane | ) | const |
get group number of specified plane
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
const char* DiOverlay::getPlaneLabel | ( | unsigned int | plane | ) | const |
get label of specified plane
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
EM_Overlay DiOverlay::getPlaneMode | ( | unsigned int | plane | ) | const |
get overlay mode of specified plane
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
|
inline |
get current y-coordinate of overlay origin.
This value is added to the origin of all overlay planes.
Referenced by DiMonoOutputPixelTemplate< T1, T2, T3 >::overlay().
int DiOverlay::hasEmbeddedData | ( | ) | const |
check whether there are any overlay planes embedded in the pixel data
|
inline |
check whether specified plane exists
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
visible | flag indicating whether plane should be visible or not (default: 0 = ignore) |
int DiOverlay::hideAllPlanes | ( | ) |
make all planes invisible
int DiOverlay::hidePlane | ( | unsigned int | plane | ) |
make specified plane invisible
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
|
protected |
initialize new overlay managing object
overlay | reference object used as a template |
int DiOverlay::isPlaneVisible | ( | unsigned int | plane | ) |
check whether specified plane is currently visible (not hidden)
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
|
protected |
check whether given group number is valid.
Valid means that the number is even and between 0x6000 and 0x60ff.
group | group number to be checked |
int DiOverlay::placePlane | ( | unsigned int | plane, |
const signed int | left_pos, | ||
const signed int | top_pos | ||
) |
move plane to a new place
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
left_pos | new x-coordinate of the overlay plane origin |
top_pos | new y-coordinate of the overlay plane origin |
int DiOverlay::removePlane | ( | const unsigned int | group | ) |
remove specified plane from list of additional overlay planes
group | group number of plane to be removed (0x6000-0x60ff) |
int DiOverlay::showAllPlanes | ( | ) |
make all planes visible
int DiOverlay::showAllPlanes | ( | const double | fore, |
const double | thresh, | ||
const EM_Overlay | mode | ||
) |
make all planes visible
fore | foreground color for overlay planes (in percent: 0.0-1.0) |
thresh | threshold value for overlay planes (in percent: 0.0-1.0) |
mode | new overlay mode (EMO_Default for stored mode) |
int DiOverlay::showPlane | ( | unsigned int | plane | ) |
make specified plane visible
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
int DiOverlay::showPlane | ( | unsigned int | plane, |
const double | fore, | ||
const double | thresh, | ||
const EM_Overlay | mode | ||
) |
make specified plane visible and set parameters
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
fore | foreground color for overlay plane (in percent: 0.0-1.0) |
thresh | threshold value for overlay plane (0.0-1.0) |
mode | new overlay mode (EMO_Default for stored mode) |
int DiOverlay::showPlane | ( | unsigned int | plane, |
const Uint16 | pvalue | ||
) |
make specified plane visible and set p-value.
Only applicable for bitmap shutters.
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
pvalue | p-value to be used for the overlay plane (0..65535) |