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 #ifndef DIMOMOD_H
00031 #define DIMOMOD_H
00032
00033 #include "dcmtk/config/osconfig.h"
00034 #include "dcmtk/ofstd/ofcast.h"
00035
00036 #include "dcmtk/dcmimgle/diluptab.h"
00037 #include "dcmtk/dcmimgle/diobjcou.h"
00038
00039
00040
00041
00042
00043
00044 class DiDocument;
00045 class DiInputPixel;
00046
00047
00048
00049
00050
00051
00054 class DiMonoModality
00055 : public DiObjectCounter
00056 {
00057
00058 public:
00059
00065 DiMonoModality(const DiDocument *docu,
00066 DiInputPixel *pixel);
00067
00075 DiMonoModality(const DiDocument *docu,
00076 DiInputPixel *pixel,
00077 const double slope,
00078 const double intercept);
00079
00088 DiMonoModality(const DiDocument *docu,
00089 DiInputPixel *pixel,
00090 const DcmUnsignedShort &data,
00091 const DcmUnsignedShort &descriptor,
00092 const DcmLongString *explanation);
00093
00098 DiMonoModality(const int bits);
00099
00102 virtual ~DiMonoModality();
00103
00108 inline EP_Representation getRepresentation() const
00109 {
00110 return Representation;
00111 }
00112
00117 inline double getMinValue() const
00118 {
00119 return MinValue;
00120 }
00121
00126 inline double getMaxValue() const
00127 {
00128 return MaxValue;
00129 }
00130
00135 inline unsigned int getBits() const
00136 {
00137 return Bits;
00138 }
00139
00145 inline unsigned int getUsedBits() const
00146 {
00147 return UsedBits;
00148 }
00149
00154 inline double getAbsMinimum() const
00155 {
00156 return AbsMinimum;
00157 }
00158
00163 inline double getAbsMaximum() const
00164 {
00165 return AbsMaximum;
00166 }
00167
00172 inline double getRescaleIntercept() const
00173 {
00174 return RescaleIntercept;
00175 }
00176
00181 inline double getRescaleSlope() const
00182 {
00183 return RescaleSlope;
00184 }
00185
00190 inline const DiLookupTable *getTableData() const
00191 {
00192 return TableData;
00193 }
00194
00199 inline const char *getExplanation() const
00200 {
00201 return (TableData != NULL) ? TableData->getExplanation() : OFstatic_cast(const char *, NULL);
00202 }
00203
00208 inline int hasLookupTable() const
00209 {
00210 return LookupTable;
00211 }
00212
00217 inline int hasRescaling() const
00218 {
00219 return Rescaling;
00220 }
00221
00222
00223 protected:
00224
00230 int Init(const DiDocument *docu,
00231 DiInputPixel *pixel);
00232
00235 void checkTable();
00236
00241 void checkRescaling(const DiInputPixel *pixel);
00242
00247 void determineRepresentation(const DiDocument *docu);
00248
00249
00250 private:
00251
00253 EP_Representation Representation;
00254
00256 double MinValue;
00258 double MaxValue;
00259
00261 unsigned int Bits;
00263 unsigned int UsedBits;
00264
00266 double AbsMinimum;
00268 double AbsMaximum;
00269
00271 double RescaleIntercept;
00273 double RescaleSlope;
00274
00276 int LookupTable;
00278 int Rescaling;
00279
00281 DiLookupTable *TableData;
00282
00283
00284
00285 DiMonoModality(const DiMonoModality &);
00286 DiMonoModality &operator=(const DiMonoModality &);
00287 };
00288
00289
00290 #endif
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
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364