Inheritance diagram for DiOverlay:
Public Member Functions | |
DiOverlay (const DiDocument *docu=NULL, const Uint16 alloc=0, const Uint16 stored=0, const Uint16 high=0) | |
constructor | |
DiOverlay (const DiOverlay *overlay, const signed long left_pos, const signed long top_pos, const double xfactor, const double yfactor) | |
constructor, clip/scale | |
DiOverlay (const DiOverlay *overlay, const int horz, const int vert, const Uint16 columns, const Uint16 rows) | |
constructor, flip | |
DiOverlay (const DiOverlay *overlay, const int degree, const Uint16 columns, const Uint16 rows) | |
constructor, rotate | |
virtual | ~DiOverlay () |
destructor | |
int | isPlaneVisible (unsigned int plane) |
check whether specified plane is currently visible (not hidden) | |
int | showPlane (unsigned int plane) |
make specified plane visible | |
int | showPlane (unsigned int plane, const double fore, const double thresh, const EM_Overlay mode) |
make specified plane visible and set parameters | |
int | showPlane (unsigned int plane, const Uint16 pvalue) |
make specified plane visible and set p-value. | |
int | showAllPlanes () |
make all planes visible | |
int | showAllPlanes (const double fore, const double thresh, const EM_Overlay mode) |
make all planes visible | |
int | hidePlane (unsigned int plane) |
make specified plane invisible | |
int | hideAllPlanes () |
make all planes invisible | |
int | placePlane (unsigned int plane, const signed int left_pos, const signed int top_pos) |
move plane to a new place | |
unsigned int | getPlaneGroupNumber (unsigned int plane) const |
get group number of specified plane | |
const char * | getPlaneLabel (unsigned int plane) const |
get label of specified plane | |
const char * | getPlaneDescription (unsigned int plane) const |
get description of specified plane | |
EM_Overlay | getPlaneMode (unsigned int plane) const |
get overlay mode of specified plane | |
unsigned int | getCount () const |
get number of overlay planes | |
signed long | getLeft () const |
get current x-coordinate of overlay origin. | |
signed long | getTop () const |
get current y-coordinate of overlay origin. | |
int | hasEmbeddedData () const |
check whether there are any overlay planes embedded in the pixel data | |
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 | |
int | removePlane (const unsigned int group) |
remove specified plane from list of additional overlay planes | |
DiOverlayPlane * | getPlane (const unsigned int plane) const |
int | hasPlane (unsigned int plane, const int visible=0) const |
check whether specified plane exists | |
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. | |
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. | |
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. | |
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 | |
int | convertToPlaneNumber (unsigned int &plane, const int mode) const |
convert given plane or group number to a valid plane number | |
unsigned int | convertToGroupNumber (const unsigned int plane) const |
convert five plane number to corresponding group number | |
int | isValidGroupNumber (const unsigned int group) const |
check whether given group number is valid. | |
int | checkPlane (const unsigned int plane, const int mode=1) |
check whether the specified plane is valid. | |
Private Member Functions | |
DiOverlay (const DiOverlay &) | |
DiOverlay & | operator= (const DiOverlay &) |
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) |
Definition at line 58 of file diovlay.h.
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 overlayplanes should be rotated | |
columns | width of the surrounding image | |
rows | height of the surrounding image |
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) |
Referenced by DicomImage::isOverlayVisible().
int DiOverlay::showPlane | ( | unsigned int | plane | ) |
make specified plane visible
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
Referenced by DicomImage::showOverlay().
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) |
int DiOverlay::showAllPlanes | ( | ) |
make all planes visible
Referenced by DicomImage::showAllOverlays().
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::hidePlane | ( | unsigned int | plane | ) |
make specified plane invisible
plane | index of plane (starting from 0) or group number (0x6000-0x60ff) |
Referenced by DicomImage::hideOverlay().
int DiOverlay::hideAllPlanes | ( | ) |
make all planes invisible
Referenced by DicomImage::hideAllOverlays().
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 |
Referenced by DicomImage::placeOverlay().
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) |
Referenced by DicomImage::getOverlayGroupNumber().
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) |
Referenced by DicomImage::getOverlayLabel().
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) |
Referenced by DicomImage::getOverlayDescription().
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) |
Referenced by DicomImage::getOverlayMode().
unsigned int DiOverlay::getCount | ( | ) | const [inline] |
get number of overlay planes
Definition at line 241 of file diovlay.h.
References DiOverlayData::Count, and Data.
Referenced by DicomImage::getOverlayCount(), and DiMonoOutputPixelTemplate< T1, T2, T3 >::overlay().
signed long DiOverlay::getLeft | ( | ) | const [inline] |
get current x-coordinate of overlay origin.
This value is added to the origin of all overlay planes.
Definition at line 251 of file diovlay.h.
References Left.
Referenced by DiMonoOutputPixelTemplate< T1, T2, T3 >::overlay().
signed long DiOverlay::getTop | ( | ) | const [inline] |
get current y-coordinate of overlay origin.
This value is added to the origin of all overlay planes.
Definition at line 261 of file diovlay.h.
References Top.
Referenced by DiMonoOutputPixelTemplate< T1, T2, T3 >::overlay().
int DiOverlay::hasEmbeddedData | ( | ) | const |
check whether there are any overlay planes embedded in the pixel data
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 |
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) |
Referenced by DicomImage::removeOverlay().
int DiOverlay::hasPlane | ( | unsigned int | plane, | |
const int | visible = 0 | |||
) | const [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) |
Definition at line 320 of file diovlay.h.
References AdditionalPlanes, convertToPlaneNumber(), Data, DiOverlayPlane::isVisible(), and DiOverlayData::Planes.
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) |
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) |
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!) |
Uint16* DiOverlay::Init | ( | const DiOverlay * | overlay | ) | [protected] |
initialize new overlay managing object
overlay | reference object used as a template |
int DiOverlay::convertToPlaneNumber | ( | unsigned int & | plane, | |
const int | mode | |||
) | const [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 |
Referenced by hasPlane().
unsigned int DiOverlay::convertToGroupNumber | ( | const unsigned int | plane | ) | const [inline, protected] |
convert five plane number to corresponding group number
plane | index of plane (0..15) |
Definition at line 432 of file diovlay.h.
References FirstOverlayGroup.
int DiOverlay::isValidGroupNumber | ( | const unsigned int | group | ) | const [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::checkPlane | ( | const unsigned int | plane, | |
const int | mode = 1 | |||
) | [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 |