33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/ofstd/ofstring.h"
35 #include "dcmtk/ofstd/ofcast.h"
37 #include "dcmtk/dcmimgle/diutils.h"
39 #define INCLUDE_CSTDDEF
40 #include "dcmtk/ofstd/ofstdinc.h"
73 const unsigned int group,
91 const Sint16 left_pos,
98 const EM_Overlay mode);
112 const unsigned int bit,
117 const Uint16 columns,
130 inline Sint16
getLeft(
const Sint32 left_pos = 0)
const
132 return OFstatic_cast(Sint16, OFstatic_cast(Sint32,
Left) - left_pos);
141 inline Sint16
getTop(
const Sint32 top_pos = 0)
const
143 return OFstatic_cast(Sint16, OFstatic_cast(Sint32,
Top) - top_pos);
170 inline Uint16
getRight(
const Sint32 left_pos = 0)
const
172 return (OFstatic_cast(Sint32,
Left) + OFstatic_cast(Sint32,
Width) - left_pos > 0) ?
173 OFstatic_cast(Uint16, OFstatic_cast(Sint32,
Left) + OFstatic_cast(Sint32,
Width) - left_pos) : 0;
184 return (OFstatic_cast(Sint32,
Top) + OFstatic_cast(Sint32,
Height) - top_pos > 0) ?
185 OFstatic_cast(Uint16, OFstatic_cast(Sint32,
Top) + OFstatic_cast(Sint32,
Height) - top_pos) : 0;
225 void place(
const signed int left_pos,
226 const signed int top_pos);
234 const double yfactor);
245 const signed long columns,
246 const signed long rows);
257 const signed long left_pos,
258 const signed long top_pos,
259 const Uint16 columns,
268 void show(
const double fore,
270 const EM_Overlay mode);
279 int show(
const Uint16 pvalue);
378 void *
getData(
const unsigned long frame,
401 unsigned int &height,
402 unsigned long &frames);
410 inline int reset(
const unsigned long frame);
423 inline void setStart(
const Uint16 x,
514 const unsigned long bits = (OFstatic_cast(
unsigned long,
StartLeft) + OFstatic_cast(
unsigned long,
StartTop) *
515 OFstatic_cast(
unsigned long,
Columns) + frame * OFstatic_cast(
unsigned long,
Rows) *
537 result = OFstatic_cast(
int, *
Ptr & (1 << (
BitPos & 0xf)));
549 OFstatic_cast(
unsigned long, x -
Left);
552 OFstatic_cast(
unsigned long, x -
Left)) * OFstatic_cast(
unsigned long,
BitsAllocated);
int isValid() const
check whether overlay plane is valid
const char * getLabel() const
get label of overlay plane
unsigned long getNumberOfFrames() const
get number of frames
a class used to represent overlay data (60xx,3000)
Uint16 Height
visible height
void setFlipping(const int horz, const int vert, const signed long columns, const signed long rows)
set flipping
unsigned long BitPos
current bit position
EM_Overlay Mode
current overlay mode
unsigned int StartLeft
x-coordinate of first pixel in surrounding memory buffer
OFBool empty() const
return true if the string is empty, false otherwise.
void place(const signed int left_pos, const signed int top_pos)
move overlay plane to a new place
void * getData(const unsigned long frame, const Uint16 xmin, const Uint16 ymin, const Uint16 xmax, const Uint16 ymax, const int bits, const Uint16 fore, const Uint16 back)
get overlay plane data as an array of 1/8/16 bit values.
Uint16 PValue
P-value used for bitmap shutters.
OFString Label
label of overlay plane
EM_Overlay getMode() const
get overlay plane mode
Uint16 getPValue() const
get p-value of the plane.
Uint16 GroupNumber
group number of overlay plane
void setScaling(const double xfactor, const double yfactor)
set scaling factor in x- and y-direction
EM_Overlay DefaultMode
default (stored) overlay mode
Interface class to DICOM data management (dcmdata).
Uint16 getGroupNumber() const
get group number of overlay plane
double getThreshold() const
get threshold value of the plane
double Threshold
threshold value used for "threshold replace"
void setStart(const Uint16 x, const Uint16 y)
set internal 'cursor' to a specific position
int isVisible() const
check whether overlay plane is visible
Uint16 Columns
number of (stored) columns
const Uint16 * Data
pointer to overlay data (standalone) or pixel data (embedded)
Sint16 getTop(const Sint32 top_pos=0) const
get y-coordinate of overlay plane origin
OFString Description
textual description of overlay plane
const Uint16 * StartPtr
pointer to starting element of current frame
Uint16 getHeight() const
get height of overlay plane
Uint16 getRight(const Sint32 left_pos=0) const
get right border of overlay plane origin
a class representing the DICOM value representation 'Long String' (LO)
~DiOverlayPlane()
destructor
void setRotation(const int degree, const signed long left_pos, const signed long top_pos, const Uint16 columns, const Uint16 rows)
set rotation
Uint16 getWidth() const
get width of overlay plane
int EmbeddedData
true, if overlay data in embedded in pixel data
Uint16 BitsAllocated
number of allocated bits per pixel
Sint16 Top
y-coordinate of overlay plane's origin
Uint16 Width
visible width
void show()
make overlay plane visible
int reset(const unsigned long frame)
reset internal 'cursor' to the beginning of the specified frame
int getNextBit()
get value of the current overlay plane bit and move 'cursor' to the next position ...
Uint16 ImageFrameOrigin
number of starting frame
Class to handle a single overlay plane.
int isEmbedded() const
check whether overlay plane is embedded in the pixel data
Uint16 Rows
number of (stored) rows
void hide()
make overlay plane invisible
Sint16 getLeft(const Sint32 left_pos=0) const
get x-coordinate of overlay plane origin
Sint16 Left
x-coordinate of overlay plane's origin
unsigned long create6xxx3000Data(Uint8 *&buffer, unsigned int &width, unsigned int &height, unsigned long &frames)
create overlay plane data in (6xxx,3000) format.
a simple string class that implements a subset of std::string.
double getForeground() const
get foreground color of the plane
Uint32 NumberOfFrames
number of frames
int Visible
visibility status
unsigned int StartTop
y-coordinate of first pixel in surrounding memory buffer
unsigned long StartBitPos
starting bit position of current frame
Uint16 getBottom(const Sint32 top_pos=0) const
get bottom border of overlay plane origin
const char * c_str() const
returns a pointer to the initial element of an array of length size()+1 whose first size() elements e...
const char * getDescription() const
get description of overlay plane
double Foreground
"color" of overlay plane (in percent: '0.0' = dark, '1.0' = bright)
DiOverlayPlane(const DiDocument *docu, const unsigned int group, Uint16 alloc, const Uint16 stored, const Uint16 high)
constructor
const Uint16 * Ptr
pointer to current element of 'Data'
Uint16 BitPosition
position of overlay plane bit