00001 /* 00002 * 00003 * Copyright (C) 1998-2005, OFFIS 00004 * 00005 * This software and supporting documentation were developed by 00006 * 00007 * Kuratorium OFFIS e.V. 00008 * Healthcare Information and Communication Systems 00009 * Escherweg 2 00010 * D-26121 Oldenburg, Germany 00011 * 00012 * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY 00013 * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 00014 * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR 00015 * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND 00016 * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. 00017 * 00018 * Module: dcmpstat 00019 * 00020 * Author: Marco Eichelberg 00021 * 00022 * Purpose: 00023 * classes: DVPSTextObject 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:04:08 $ 00027 * CVS/RCS Revision: $Revision: 1.8 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef __DVPSTX_H__ 00035 #define __DVPSTX_H__ 00036 00037 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00038 #include "dcmtk/dcmdata/dctk.h" 00039 #include "dcmtk/dcmpstat/dvpstyp.h" 00040 00047 class DVPSTextObject 00048 { 00049 public: 00051 DVPSTextObject(); 00052 00054 DVPSTextObject(const DVPSTextObject& copy); 00055 00060 DVPSTextObject *clone() { return new DVPSTextObject(*this); } 00061 00063 virtual ~DVPSTextObject(); 00064 00074 OFCondition read(DcmItem &dset); 00075 00082 OFCondition write(DcmItem &dset); 00083 00087 OFBool haveAnchorPoint(); 00088 00092 OFBool haveBoundingBox(); 00093 00101 OFCondition setAnchorPoint(double x, double y, DVPSannotationUnit unit, OFBool isVisible); 00102 00112 OFCondition setBoundingBox(double TLHC_x, double TLHC_y, double BRHC_x, 00113 double BRHC_y, DVPSannotationUnit unit, DVPSTextJustification justification); 00114 00119 OFCondition setText(const char *text); 00120 00125 void removeAnchorPoint(); 00126 00131 void removeBoundingBox(); 00132 00136 const char *getText(); 00137 00142 double getBoundingBoxTLHC_x(); 00143 00148 double getBoundingBoxTLHC_y(); 00149 00154 double getBoundingBoxBRHC_x(); 00155 00160 double getBoundingBoxBRHC_y(); 00161 00166 DVPSannotationUnit getBoundingBoxAnnotationUnits(); 00167 00172 DVPSTextJustification getBoundingBoxHorizontalJustification(); 00173 00178 double getAnchorPoint_x(); 00179 00184 double getAnchorPoint_y(); 00185 00190 OFBool anchorPointIsVisible(); 00191 00196 DVPSannotationUnit getAnchorPointAnnotationUnits(); 00197 00203 void setLog(OFConsole *stream, OFBool verbMode, OFBool dbgMode); 00204 00205 private: 00208 DVPSTextObject& operator=(const DVPSTextObject&); 00209 00211 DcmCodeString boundingBoxAnnotationUnits; 00213 DcmCodeString anchorPointAnnotationUnits; 00215 DcmShortText unformattedTextValue; 00217 DcmFloatingPointSingle boundingBoxTLHC; 00219 DcmFloatingPointSingle boundingBoxBRHC; 00221 DcmCodeString boundingBoxTextHorizontalJustification; 00223 DcmFloatingPointSingle anchorPoint; 00225 DcmCodeString anchorPointVisibility; 00226 00229 OFConsole *logstream; 00230 00233 OFBool verboseMode; 00234 00237 OFBool debugMode; 00238 00239 }; 00240 00241 #endif 00242 00243 /* 00244 * $Log: dvpstx.h,v $ 00245 * Revision 1.8 2005/12/08 16:04:08 meichel 00246 * Changed include path schema for all DCMTK header files 00247 * 00248 * Revision 1.7 2001/09/26 15:36:18 meichel 00249 * Adapted dcmpstat to class OFCondition 00250 * 00251 * Revision 1.6 2001/06/01 15:50:24 meichel 00252 * Updated copyright header 00253 * 00254 * Revision 1.5 2000/06/02 16:00:54 meichel 00255 * Adapted all dcmpstat classes to use OFConsole for log and error output 00256 * 00257 * Revision 1.4 2000/03/08 16:28:58 meichel 00258 * Updated copyright header. 00259 * 00260 * Revision 1.3 1999/07/22 16:39:14 meichel 00261 * Adapted dcmpstat data structures and API to supplement 33 letter ballot text. 00262 * 00263 * Revision 1.2 1998/12/14 16:10:36 meichel 00264 * Implemented Presentation State interface for graphic layers, 00265 * text and graphic annotations, presentation LUTs. 00266 * 00267 * Revision 1.1 1998/11/27 14:50:34 meichel 00268 * Initial Release. 00269 * 00270 * 00271 */ 00272