dcmpstat/include/dcmtk/dcmpstat/dvpsib.h

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: DVPSImageBoxContent
00020  *
00021  *  Last Update:      $Author: joergr $
00022  *  Update Date:      $Date: 2010-10-14 13:16:36 $
00023  *  CVS/RCS Revision: $Revision: 1.24 $
00024  *  Status:           $State: Exp $
00025  *
00026  *  CVS/RCS Log at end of file
00027  *
00028  */
00029 
00030 #ifndef DVPSIB_H
00031 #define DVPSIB_H
00032 
00033 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00034 #include "dcmtk/ofstd/ofstring.h"
00035 #include "dcmtk/dcmdata/dctk.h"
00036 #include "dcmtk/dcmpstat/dvpstyp.h"     /* for enum types */
00037 #include "dcmtk/dcmnet/dimse.h"
00038 
00039 class DVPSPresentationLUT_PList;
00040 class DVConfiguration;
00041 
00045 class DVPSImageBoxContent
00046 {
00047 public:
00049   DVPSImageBoxContent();
00050 
00052   DVPSImageBoxContent(const DVPSImageBoxContent& copy);
00053 
00058   DVPSImageBoxContent *clone() { return new DVPSImageBoxContent(*this); }
00059 
00061   virtual ~DVPSImageBoxContent();
00062 
00067   void clear();
00068 
00079   OFCondition read(DcmItem &dset, DVPSPresentationLUT_PList& presentationLUTList);
00080 
00091   OFCondition write(DcmItem &dset, OFBool writeRequestedImageSize, OFBool writeReferencedPLUTSQ = OFTrue);
00092 
00100   OFCondition createDefaultValues(OFBool renumber, unsigned long number, OFBool ignoreEmptyImages);
00101 
00105   const char *getSOPClassUID();
00106 
00119   OFCondition setContent(
00120     const char *instanceuid,
00121     const char *retrieveaetitle,
00122     const char *refstudyuid,
00123     const char *refseriesuid,
00124     const char *refsopclassuid,
00125     const char *refsopinstanceuid,
00126     const char *requestedimagesize,
00127     const char *patientid,
00128     const char *presentationlutreference);
00129 
00136   OFCondition setRequestedDecimateCropBehaviour(DVPSDecimateCropBehaviour value);
00137 
00142   DVPSDecimateCropBehaviour getRequestedDecimateCropBehaviour();
00143 
00148   OFBool hasAdditionalSettings();
00149 
00153   const char *getReferencedPresentationLUTInstanceUID();
00154 
00158   const char *getPolarity();
00159 
00163   const char *getRequestedImageSize();
00164 
00168   const char *getMagnificationType();
00169 
00173   const char *getSmoothingType();
00174 
00178   const char *getConfigurationInformation();
00179 
00183   const char *getSOPInstanceUID();
00184 
00188   Uint16 getImageBoxPosition();
00189 
00194   OFCondition setPolarity(const char *value);
00195 
00200   OFCondition setRequestedImageSize(const char *value);
00201 
00208   OFCondition setMagnificationType(const char *value);
00209 
00216   OFCondition setSmoothingType(const char *value);
00217 
00224   OFCondition setConfigurationInformation(const char *value);
00225 
00230   OFCondition setSOPInstanceUID(const char *value);
00231 
00235   OFCondition setDefault();
00236 
00243   OFCondition getImageReference(const char *&studyUID, const char *&seriesUID, const char *&instanceUID);
00244 
00252   OFCondition prepareBasicImageBox(DcmItem &dset);
00253 
00260   OFBool matchesPresentationLUT(DVPSPrintPresentationLUTAlignment align) const;
00261 
00282   OFBool printSCPSet(
00283     DVConfiguration& cfg,
00284     const char *cfgname,
00285     DcmDataset *rqDataset,
00286     T_DIMSE_Message& rsp,
00287     DcmDataset *& rspDataset,
00288     DcmDataset &imageDataset,
00289     DVPSPrintPresentationLUTAlignment align,
00290     OFBool presentationLUTnegotiated);
00291 
00299   OFCondition setUIDsAndAETitle(
00300     DcmUniqueIdentifier& studyUID,
00301     DcmUniqueIdentifier& seriesUID,
00302     const char *aetitle);
00303 
00304 private:
00306   DVPSImageBoxContent& operator=(const DVPSImageBoxContent&);
00307 
00313   OFCondition addReferencedPLUTSQ(DcmItem &dset);
00314 
00334   OFBool printSCPEvaluateBasicGrayscaleImageSequence(
00335    DVConfiguration& cfg,
00336    const char *cfgname,
00337    DcmItem *rqDataset,
00338    T_DIMSE_Message& rsp,
00339    DcmDataset &imageDataset,
00340    DVPSPrintPresentationLUTAlignment align,
00341    OFBool presentationLUTnegotiated);
00342 
00344   DcmUniqueIdentifier      sOPInstanceUID;
00346   DcmUnsignedShort         imageBoxPosition;
00348   DcmCodeString            polarity;
00350   DcmCodeString            magnificationType;
00352   DcmShortText             configurationInformation;
00354   DcmCodeString            smoothingType;
00356   DcmDecimalString         requestedImageSize;
00358   DcmCodeString            requestedDecimateCropBehavior;
00359 
00360   /* the following attributes belong to the ReferencedImageSequence
00361    * which must have exactly one item here.
00362    */
00364   DcmApplicationEntity     retrieveAETitle;
00366   DcmUniqueIdentifier      referencedSOPClassUID;
00368   DcmUniqueIdentifier      referencedSOPInstanceUID;
00370   DcmUniqueIdentifier      studyInstanceUID;
00372   DcmUniqueIdentifier      seriesInstanceUID;
00374   DcmIntegerString         referencedFrameNumber;
00376   DcmLongString            patientID;
00377 
00378   // we do not support the ReferencedImageOverlayBoxSequence which is retired in Supplement 35 anyway.
00379 
00380   // the ReferencedPresentationLUTSequence is only created/read on the fly
00381   DcmUniqueIdentifier      referencedPresentationLUTInstanceUID;
00382 
00384   DVPSImageDepth           imageDepth;
00385 
00386 };
00387 
00388 #endif
00389 
00390 /*
00391  *  $Log: dvpsib.h,v $
00392  *  Revision 1.24  2010-10-14 13:16:36  joergr
00393  *  Updated copyright header. Added reference to COPYRIGHT file.
00394  *
00395  *  Revision 1.23  2010-10-07 14:31:35  joergr
00396  *  Removed leading underscore characters from preprocessor symbols (reserved).
00397  *
00398  *  Revision 1.22  2009-11-24 14:12:57  uli
00399  *  Switched to logging mechanism provided by the "new" oflog module.
00400  *
00401  *  Revision 1.21  2005-12-08 16:03:50  meichel
00402  *  Changed include path schema for all DCMTK header files
00403  *
00404  *  Revision 1.20  2001/09/26 15:36:12  meichel
00405  *  Adapted dcmpstat to class OFCondition
00406  *
00407  *  Revision 1.19  2001/06/01 15:50:17  meichel
00408  *  Updated copyright header
00409  *
00410  *  Revision 1.18  2000/07/04 15:58:01  joergr
00411  *  Added support for overriding the presentation LUT settings made for the
00412  *  image boxes.
00413  *
00414  *  Revision 1.17  2000/06/14 11:28:13  joergr
00415  *  Added methods to access the attributes Polarity and Requested Image Size.
00416  *
00417  *  Revision 1.16  2000/06/08 10:44:29  meichel
00418  *  Implemented Referenced Presentation LUT Sequence on Basic Film Session level.
00419  *    Empty film boxes (pages) are not written to file anymore.
00420  *
00421  *  Revision 1.15  2000/06/07 14:17:41  joergr
00422  *  Added methods to access the image polarity attribute.
00423  *
00424  *  Revision 1.14  2000/06/02 16:00:47  meichel
00425  *  Adapted all dcmpstat classes to use OFConsole for log and error output
00426  *
00427  *  Revision 1.13  2000/05/31 12:56:38  meichel
00428  *  Added initial Print SCP support
00429  *
00430  *  Revision 1.12  2000/03/08 16:28:53  meichel
00431  *  Updated copyright header.
00432  *
00433  *  Revision 1.11  1999/10/07 17:21:47  meichel
00434  *  Reworked management of Presentation LUTs in order to create tighter
00435  *    coupling between Softcopy and Print.
00436  *
00437  *  Revision 1.10  1999/09/24 15:23:44  meichel
00438  *  Print spooler (dcmprtsv) now logs diagnostic messages in log files
00439  *    when operating in spool mode.
00440  *
00441  *  Revision 1.9  1999/09/17 14:33:56  meichel
00442  *  Completed print spool functionality including Supplement 22 support
00443  *
00444  *  Revision 1.8  1999/09/15 17:43:27  meichel
00445  *  Implemented print job dispatcher code for dcmpstat, adapted dcmprtsv
00446  *    and dcmpsprt applications.
00447  *
00448  *  Revision 1.7  1999/09/10 12:46:46  meichel
00449  *  Added implementations for a number of print API methods.
00450  *
00451  *  Revision 1.6  1999/09/09 14:57:32  thiel
00452  *  Added methods for print spooler
00453  *
00454  *  Revision 1.5  1999/09/01 16:14:40  meichel
00455  *  Added support for requested image size to print routines
00456  *
00457  *  Revision 1.4  1999/08/31 14:09:10  meichel
00458  *  Added get/set methods for stored print attributes
00459  *
00460  *  Revision 1.3  1999/08/27 15:57:55  meichel
00461  *  Added methods for saving hardcopy images and stored print objects
00462  *    either in file or in the local database.
00463  *
00464  *  Revision 1.2  1999/08/26 09:30:59  thiel
00465  *  Add extensions for the usage of the StoredPrint
00466  *
00467  *  Revision 1.1  1999/07/30 13:34:47  meichel
00468  *  Added new classes managing Stored Print objects
00469  *
00470  *
00471  */


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1