00001 /* 00002 * 00003 * Copyright (C) 1998-2010, OFFIS e.V. 00004 * All rights reserved. See COPYRIGHT file for details. 00005 * 00006 * This software and supporting documentation were developed by 00007 * 00008 * OFFIS e.V. 00009 * R&D Division Health 00010 * Escherweg 2 00011 * D-26121 Oldenburg, Germany 00012 * 00013 * 00014 * Module: dcmpstat 00015 * 00016 * Author: Marco Eichelberg 00017 * 00018 * Purpose: 00019 * classes: DVPSReferencedImage 00020 * 00021 * Last Update: $Author: joergr $ 00022 * Update Date: $Date: 2010-10-14 13:16:36 $ 00023 * CVS/RCS Revision: $Revision: 1.13 $ 00024 * Status: $State: Exp $ 00025 * 00026 * CVS/RCS Log at end of file 00027 * 00028 */ 00029 00030 #ifndef DVPSRI_H 00031 #define DVPSRI_H 00032 00033 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00034 #include "dcmtk/dcmdata/dcvrui.h" 00035 #include "dcmtk/dcmdata/dcvris.h" 00036 00043 class DVPSReferencedImage 00044 { 00045 public: 00047 DVPSReferencedImage(); 00048 00050 DVPSReferencedImage(const DVPSReferencedImage& copy); 00051 00056 DVPSReferencedImage *clone() { return new DVPSReferencedImage(*this); } 00057 00059 virtual ~DVPSReferencedImage(); 00060 00070 OFCondition read(DcmItem &dset); 00071 00078 OFCondition write(DcmItem &dset); 00079 00089 OFBool validateSOPClassUID(OFString& sopclassuid); 00090 00094 void setSOPClassUID(const char *uid); 00095 00099 void setSOPInstanceUID(const char *uid); 00100 00105 void setFrameNumbers(const char *frames); 00106 00112 OFBool isSOPInstanceUID(const char *uid); 00113 00120 OFCondition getImageReference( 00121 OFString& sopclassUID, 00122 OFString& instanceUID, 00123 OFString& frames); 00124 00132 OFBool appliesToFrame(unsigned long frame); 00133 00139 OFBool appliesOnlyToFrame(unsigned long frame); 00140 00145 OFBool appliesToAllFrames(); 00146 00151 void removeFrameReference(unsigned long frame, unsigned long numberOfFrames); 00152 00153 private: 00154 00157 DVPSReferencedImage& operator=(const DVPSReferencedImage& source); 00158 00161 void flushCache(); 00164 void updateCache(); 00165 00167 DcmUniqueIdentifier referencedSOPClassUID; 00169 DcmUniqueIdentifier referencedSOPInstanceUID; 00171 DcmIntegerString referencedFrameNumber; 00173 Sint32 *frameCache; 00175 unsigned long frameCacheEntries; 00176 00177 }; 00178 00179 #endif 00180 00181 /* 00182 * $Log: dvpsri.h,v $ 00183 * Revision 1.13 2010-10-14 13:16:36 joergr 00184 * Updated copyright header. Added reference to COPYRIGHT file. 00185 * 00186 * Revision 1.12 2010-10-07 14:31:36 joergr 00187 * Removed leading underscore characters from preprocessor symbols (reserved). 00188 * 00189 * Revision 1.11 2009-11-24 14:12:57 uli 00190 * Switched to logging mechanism provided by the "new" oflog module. 00191 * 00192 * Revision 1.10 2009-09-30 10:42:38 uli 00193 * Make dcmpstat's include headers self-sufficient by including all 00194 * needed headers directly and stop using dctk.h 00195 * 00196 * Revision 1.9 2005-12-08 16:03:59 meichel 00197 * Changed include path schema for all DCMTK header files 00198 * 00199 * Revision 1.8 2001/09/26 15:36:14 meichel 00200 * Adapted dcmpstat to class OFCondition 00201 * 00202 * Revision 1.7 2001/06/01 15:50:20 meichel 00203 * Updated copyright header 00204 * 00205 * Revision 1.6 2000/06/02 16:00:50 meichel 00206 * Adapted all dcmpstat classes to use OFConsole for log and error output 00207 * 00208 * Revision 1.5 2000/03/08 16:28:55 meichel 00209 * Updated copyright header. 00210 * 00211 * Revision 1.4 1999/07/22 16:39:09 meichel 00212 * Adapted dcmpstat data structures and API to supplement 33 letter ballot text. 00213 * 00214 * Revision 1.3 1999/01/15 17:33:03 meichel 00215 * added methods to DVPresentationState allowing to access the image 00216 * references in the presentation state. Also added methods allowing to 00217 * get the width and height of the attached image. 00218 * 00219 * Revision 1.2 1998/12/14 16:10:32 meichel 00220 * Implemented Presentation State interface for graphic layers, 00221 * text and graphic annotations, presentation LUTs. 00222 * 00223 * Revision 1.1 1998/11/27 14:50:31 meichel 00224 * Initial Release. 00225 * 00226 * 00227 */