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 DIMOMOD_H
00035 #define DIMOMOD_H
00036
00037 #include "dcmtk/config/osconfig.h"
00038 #include "dcmtk/dcmdata/dctypes.h"
00039 #include "dcmtk/ofstd/ofcast.h"
00040
00041 #include "dcmtk/dcmimgle/diluptab.h"
00042 #include "dcmtk/dcmimgle/diobjcou.h"
00043 #include "dcmtk/dcmimgle/diutils.h"
00044
00045
00046
00047
00048
00049
00050 class DiDocument;
00051 class DiInputPixel;
00052
00053
00054
00055
00056
00057
00060 class DiMonoModality
00061 : public DiObjectCounter
00062 {
00063
00064 public:
00065
00071 DiMonoModality(const DiDocument *docu,
00072 DiInputPixel *pixel);
00073
00081 DiMonoModality(const DiDocument *docu,
00082 DiInputPixel *pixel,
00083 const double slope,
00084 const double intercept);
00085
00094 DiMonoModality(const DiDocument *docu,
00095 DiInputPixel *pixel,
00096 const DcmUnsignedShort &data,
00097 const DcmUnsignedShort &descriptor,
00098 const DcmLongString *explanation);
00099
00104 DiMonoModality(const int bits);
00105
00108 virtual ~DiMonoModality();
00109
00114 inline EP_Representation getRepresentation() const
00115 {
00116 return Representation;
00117 }
00118
00123 inline double getMinValue() const
00124 {
00125 return MinValue;
00126 }
00127
00132 inline double getMaxValue() const
00133 {
00134 return MaxValue;
00135 }
00136
00141 inline unsigned int getBits() const
00142 {
00143 return Bits;
00144 }
00145
00150 inline double getAbsMinimum() const
00151 {
00152 return AbsMinimum;
00153 }
00154
00159 inline double getAbsMaximum() const
00160 {
00161 return AbsMaximum;
00162 }
00163
00168 inline double getRescaleIntercept() const
00169 {
00170 return RescaleIntercept;
00171 }
00172
00177 inline double getRescaleSlope() const
00178 {
00179 return RescaleSlope;
00180 }
00181
00186 inline const DiLookupTable *getTableData() const
00187 {
00188 return TableData;
00189 }
00190
00195 inline const char *getExplanation() const
00196 {
00197 return (TableData != NULL) ? TableData->getExplanation() : OFstatic_cast(const char *, NULL);
00198 }
00199
00204 inline int hasLookupTable() const
00205 {
00206 return LookupTable;
00207 }
00208
00213 inline int hasRescaling() const
00214 {
00215 return Rescaling;
00216 }
00217
00218
00219 protected:
00220
00226 int Init(const DiDocument *docu,
00227 DiInputPixel *pixel);
00228
00231 void checkTable();
00232
00237 void checkRescaling(const DiInputPixel *pixel);
00238
00239
00240 private:
00241
00243 EP_Representation Representation;
00244
00246 double MinValue;
00248 double MaxValue;
00249
00251 unsigned int Bits;
00253 double AbsMinimum;
00255 double AbsMaximum;
00256
00258 double RescaleIntercept;
00260 double RescaleSlope;
00261
00263 int LookupTable;
00265 int Rescaling;
00266
00268 DiLookupTable *TableData;
00269
00270
00271
00272 DiMonoModality(const DiMonoModality &);
00273 DiMonoModality &operator=(const DiMonoModality &);
00274 };
00275
00276
00277 #endif
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
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341