00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __DVPSPL_H__
00035 #define __DVPSPL_H__
00036
00037 #include "dcmtk/config/osconfig.h"
00038 #include "dcmtk/ofstd/ofstring.h"
00039 #include "dcmtk/dcmdata/dctk.h"
00040 #include "dcmtk/dcmpstat/dvpstyp.h"
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
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320