1 /* 2 * 3 * Copyright (C) 1998-2019, OFFIS e.V. 4 * All rights reserved. See COPYRIGHT file for details. 5 * 6 * This software and supporting documentation were developed by 7 * 8 * OFFIS e.V. 9 * R&D Division Health 10 * Escherweg 2 11 * D-26121 Oldenburg, Germany 12 * 13 * 14 * Module: dcmpstat 15 * 16 * Author: Marco Eichelberg 17 * 18 * Purpose: 19 * classes: DVPSOverlayCurveActivationLayer 20 * 21 */ 22 23 #ifndef DVPSAL_H 24 #define DVPSAL_H 25 26 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 27 #include "dcmtk/dcmdata/dcitem.h" 28 #include "dcmtk/dcmdata/dcvrcs.h" 29 #include "dcmtk/dcmpstat/dpdefine.h" 30 31 /** a curve or overlay activation layer in a presentation state (internal use only). 32 * This class manages the data structures comprising a single curve 33 * activation layer or overlay activation layer 34 * (one instance of the Curve Activation Layer Module or 35 * Overlay Activation Layer Module repeating elements) 36 * contained in a Presentation State object. 37 */ 38 39 class DCMTK_DCMPSTAT_EXPORT DVPSOverlayCurveActivationLayer 40 { 41 public: 42 /// default constructor 43 DVPSOverlayCurveActivationLayer(); 44 45 /// copy constructor 46 DVPSOverlayCurveActivationLayer(const DVPSOverlayCurveActivationLayer& copy); 47 48 /** clone method. 49 * @return a pointer to a new DVPSOverlayCurveActivationLayer object containing 50 * a copy of this object. 51 */ clone()52 DVPSOverlayCurveActivationLayer *clone() { return new DVPSOverlayCurveActivationLayer(*this); } 53 54 /// destructor 55 virtual ~DVPSOverlayCurveActivationLayer(); 56 57 /** reads the activation layer for the specified repeating group from a DICOM dataset. 58 * The DICOM elements of the Overlay/Curve Activation Layer module are copied 59 * from the dataset to this object. 60 * The completeness of the module is checked. 61 * If this method returns an error code, the object is in undefined state afterwards. 62 * @param dset the DICOM dataset from which the activation layer is to be read 63 * @param ovGroup the the repeating group to be read 64 * @return EC_Normal if successful, an error code otherwise. 65 */ 66 OFCondition read(DcmItem &dset, Uint16 ovGroup); 67 68 /** writes the activation layer managed by this object to a DICOM dataset. 69 * Copies of the DICOM elements managed by this object are inserted into 70 * the DICOM dataset. 71 * @param dset the DICOM dataset to which the activation layer is written 72 * @return EC_Normal if successful, an error code otherwise. 73 */ 74 OFCondition write(DcmItem &dset); 75 76 /** set activation layer name of this activation. 77 * @param aLayer a pointer to the activation layer name, which is copied into this object. 78 */ 79 void setActivationLayer(const char *aLayer); 80 81 /** set repeating group of this activation. 82 * @param rGroup the repeating group 83 */ 84 void setRepeatingGroup(Uint16 rGroup); 85 86 /** get activation layer name. 87 * @return a pointer to the activation layer name (might be NULL) 88 */ 89 const char *getActivationLayer(); 90 91 /** get repeating group. 92 * @return the repeating group of this activation. 93 */ 94 Uint16 getRepeatingGroup(); 95 96 /** compare repeating group. 97 * @param rGroup the repeating group to compare 98 * @return OFTrue if the activation matches the passed repeating group, OFFalse otherwise. 99 */ 100 OFBool isRepeatingGroup(Uint16 rGroup); 101 102 private: 103 104 /// private undefined assignment operator 105 DVPSOverlayCurveActivationLayer& operator=(const DVPSOverlayCurveActivationLayer&); 106 107 /// the repeating group managed by this object 108 Uint16 repeatingGroup; 109 /// VR=CS, VM=1, Type 2c 110 DcmCodeString activationLayer; 111 112 }; 113 114 #endif 115