dvpssv.h

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: DVPSSoftcopyVOI
00024  *
00025  *  Last Update:      $Author: meichel $
00026  *  Update Date:      $Date: 2005/12/08 16:04:05 $
00027  *  CVS/RCS Revision: $Revision: 1.6 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef __DVPSSV_H__
00035 #define __DVPSSV_H__
00036 
00037 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00038 #include "dcmtk/ofstd/ofstring.h"
00039 #include "dcmtk/dcmdata/dctk.h"
00040 #include "dcmtk/dcmpstat/dvpsril.h"     /* for DVPSReferencedImage_PList */
00041 #include "dcmtk/dcmpstat/dvpstyp.h"     /* for enum types */
00042 
00043 class DVPSReferencedSeries_PList;
00044 
00048 class DVPSSoftcopyVOI
00049 {
00050 public:
00052   DVPSSoftcopyVOI();
00053   
00055   DVPSSoftcopyVOI(const DVPSSoftcopyVOI& copy);
00056 
00061   DVPSSoftcopyVOI *clone() { return new DVPSSoftcopyVOI(*this); }
00062 
00064   virtual ~DVPSSoftcopyVOI();
00065 
00075   OFCondition read(DcmItem &dset);
00076   
00083   OFCondition write(DcmItem &dset);
00084 
00090   OFBool isApplicable(const char *instanceUID, unsigned long frame);
00091 
00098   OFBool matchesApplicability(const char *instanceUID, unsigned long frame, DVPSObjectApplicability applicability);
00099 
00110   OFCondition addImageReference(
00111     const char *sopclassUID,
00112     const char *instanceUID, 
00113     unsigned long frame,
00114     DVPSObjectApplicability applicability);
00115 
00130   void removeImageReference(
00131     DVPSReferencedSeries_PList& allReferences,
00132     const char *instanceUID,
00133     unsigned long frame, 
00134     unsigned long numberOfFrames, 
00135     DVPSObjectApplicability applicability);
00136 
00139   void clearImageReferences() { referencedImageList.clear(); }
00140   
00144   OFBool imageReferencesEmpty() { if (referencedImageList.size()==0) return OFTrue; else return OFFalse; }
00145 
00149   OFBool haveLUT() { return useLUT; }
00150 
00155   const char *getCurrentVOIDescription();
00156 
00162   OFCondition getCurrentWindowWidth(double &w);
00163   
00169   OFCondition getCurrentWindowCenter(double &c);
00170 
00175   DcmUnsignedShort& getLUTDescriptor() { return voiLUTDescriptor; }
00176 
00181   DcmUnsignedShort& getLUTData() { return voiLUTData; }
00182 
00189   OFCondition setVOIWindow(double wCenter, double wWidth, const char *description=NULL);
00190 
00198   OFCondition setVOILUT( 
00199     DcmUnsignedShort& lutDescriptor,
00200     DcmUnsignedShort& lutData,
00201     DcmLongString& lutExplanation);
00202 
00208   void setLog(OFConsole *stream, OFBool verbMode, OFBool dbgMode);
00209       
00210 private:
00212   DVPSSoftcopyVOI& operator=(const DVPSSoftcopyVOI&);
00213 
00214   /* since the VOI LUT sequence in the Softcopy VOI LUT module must
00215    * not contain more than one item, we do not need to manage a list of
00216    * VOI LUT SQ items.
00217    */
00218 
00220   DVPSReferencedImage_PList referencedImageList;
00222   OFBool                   useLUT;   
00224   DcmUnsignedShort         voiLUTDescriptor;
00226   DcmLongString            voiLUTExplanation;
00228   DcmUnsignedShort         voiLUTData;
00230   DcmDecimalString         windowCenter;
00232   DcmDecimalString         windowWidth;
00234   DcmLongString            windowCenterWidthExplanation;
00235 
00238   OFConsole *logstream;
00239 
00242   OFBool verboseMode;
00243    
00246   OFBool debugMode;
00247 
00248   
00249 };
00250 
00251 #endif
00252 
00253 /*
00254  *  $Log: dvpssv.h,v $
00255  *  Revision 1.6  2005/12/08 16:04:05  meichel
00256  *  Changed include path schema for all DCMTK header files
00257  *
00258  *  Revision 1.5  2001/09/26 15:36:16  meichel
00259  *  Adapted dcmpstat to class OFCondition
00260  *
00261  *  Revision 1.4  2001/06/01 15:50:22  meichel
00262  *  Updated copyright header
00263  *
00264  *  Revision 1.3  2000/06/02 16:00:52  meichel
00265  *  Adapted all dcmpstat classes to use OFConsole for log and error output
00266  *
00267  *  Revision 1.2  2000/03/08 16:28:57  meichel
00268  *  Updated copyright header.
00269  *
00270  *  Revision 1.1  1999/07/22 16:39:12  meichel
00271  *  Adapted dcmpstat data structures and API to supplement 33 letter ballot text.
00272  *
00273  *
00274  */
00275 


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5