dvpspl.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: DVPSPresentationLUT
00024  *
00025  *  Last Update:      $Author: meichel $
00026  *  Update Date:      $Date: 2005/12/08 16:03:55 $
00027  *  CVS/RCS Revision: $Revision: 1.12 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef __DVPSPL_H__
00035 #define __DVPSPL_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/dvpstyp.h"     /* for enum types */
00041 
00042 struct T_DIMSE_Message;
00043 
00044 class DicomImage;
00045 class DiLookupTable;
00046 
00050 class DVPSPresentationLUT
00051 {
00052 public:
00054   DVPSPresentationLUT();
00055   
00057   DVPSPresentationLUT(const DVPSPresentationLUT& copy);
00058 
00063   DVPSPresentationLUT *clone() { return new DVPSPresentationLUT(*this); }
00064 
00066   virtual ~DVPSPresentationLUT();
00067 
00072   void clear();
00073 
00084   OFCondition read(DcmItem &dset, OFBool withSOPInstance);
00085   
00093   OFCondition write(DcmItem &dset, OFBool withSOPInstance);
00094 
00098   OFBool isInverse();
00099 
00103   DVPSPresentationLUTType getType() { return presentationLUT; }
00104 
00111   DVPSPrintPresentationLUTAlignment getAlignment();
00112   
00118   OFBool haveTable();
00119 
00127   const char *getCurrentExplanation();
00128 
00133   const char *getLUTExplanation();
00134 
00139   const char *getSOPInstanceUID();
00140 
00150   OFCondition setLUT(
00151     DcmUnsignedShort& lutDescriptor,
00152     DcmUnsignedShort& lutData,
00153     DcmLongString& lutExplanation);
00154 
00161   OFCondition setType(DVPSPresentationLUTType newType);
00162 
00166   OFCondition invert();
00167 
00176   OFBool activate(DicomImage *image, OFBool printLUT = OFFalse);
00177 
00183   OFBool activateInverseLUT(DicomImage *image);
00184 
00190   void setLog(OFConsole *stream, OFBool verbMode, OFBool dbgMode);
00191   
00196   DiLookupTable *createDiLookupTable();
00197   
00203   OFBool compareDiLookupTable(DiLookupTable *lut);
00204 
00209   OFCondition setSOPInstanceUID(const char *value);
00210   
00215   OFBool isLegalPrintPresentationLUT();
00216   
00222   OFBool matchesImageDepth(OFBool is12bit);
00223 
00238   OFBool printSCPCreate(
00239     DcmDataset *rqDataset, 
00240     T_DIMSE_Message& rsp, 
00241     DcmDataset *& rspDataset, 
00242     OFBool matchRequired,
00243     OFBool supports12Bit);
00244 
00245 private:
00247   DVPSPresentationLUT& operator=(const DVPSPresentationLUT&);
00248     
00250   DVPSPresentationLUTType  presentationLUT;
00252   DcmUnsignedShort         presentationLUTDescriptor;
00254   DcmLongString            presentationLUTExplanation;
00256   DcmUnsignedShort         presentationLUTData;
00257 
00259   DcmUniqueIdentifier      sOPInstanceUID;
00260 
00263   OFConsole *logstream;
00264 
00267   OFBool verboseMode;
00268    
00271   OFBool debugMode;
00272 
00273 };
00274 
00275 #endif
00276 
00277 /*
00278  *  $Log: dvpspl.h,v $
00279  *  Revision 1.12  2005/12/08 16:03:55  meichel
00280  *  Changed include path schema for all DCMTK header files
00281  *
00282  *  Revision 1.11  2003/08/27 14:59:09  meichel
00283  *  Moved all methods of class DVPSPresentationLUT that depend on module dcmimgle
00284  *    into a separate implementation file
00285  *
00286  *  Revision 1.10  2001/09/26 15:36:14  meichel
00287  *  Adapted dcmpstat to class OFCondition
00288  *
00289  *  Revision 1.9  2001/06/01 15:50:19  meichel
00290  *  Updated copyright header
00291  *
00292  *  Revision 1.8  2000/06/09 10:14:11  joergr
00293  *  Added support for rendering inverse presentation LUT into print bitmaps.
00294  *
00295  *  Revision 1.7  2000/06/07 14:20:18  joergr
00296  *  Added support for rendering "hardcopy" and "softcopy" presentation LUTs.
00297  *
00298  *  Revision 1.6  2000/06/02 16:00:49  meichel
00299  *  Adapted all dcmpstat classes to use OFConsole for log and error output
00300  *
00301  *  Revision 1.5  2000/05/31 12:56:39  meichel
00302  *  Added initial Print SCP support
00303  *
00304  *  Revision 1.4  2000/03/08 16:28:54  meichel
00305  *  Updated copyright header.
00306  *
00307  *  Revision 1.3  1999/10/07 17:21:49  meichel
00308  *  Reworked management of Presentation LUTs in order to create tighter
00309  *    coupling between Softcopy and Print.
00310  *
00311  *  Revision 1.2  1999/09/24 15:23:46  meichel
00312  *  Print spooler (dcmprtsv) now logs diagnostic messages in log files
00313  *    when operating in spool mode.
00314  *
00315  *  Revision 1.1  1999/07/30 13:34:49  meichel
00316  *  Added new classes managing Stored Print objects
00317  *
00318  *
00319  */
00320 


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