dcmimage/include/dicoimg.h
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 DICOIMG_H
00035
#define DICOIMG_H
00036
00037
#include "osconfig.h"
00038
#include "dctypes.h"
00039
00040
#include "diimage.h"
00041
#include "diutils.h"
00042
00043
00044
00045
00046
00047
00048
class DiColorPixel;
00049
class DiColorOutputPixel;
00050
00051
00052
00053
00054
00055
00058 class DiColorImage
00059 :
public DiImage
00060 {
00061
00062
public:
00063
00071
DiColorImage(
const DiDocument *docu,
00072
const EI_Status status,
00073
const int spp,
00074
const OFBool rgb = OFTrue);
00075
00078
virtual ~DiColorImage();
00079
00083 virtual EP_Interpretation
getInternalColorModel()
const
00084
{
00085
return (
RGBColorModel) ? EPI_RGB : EPI_YBR_Full;
00086 }
00087
00094
virtual unsigned long getOutputDataSize(
const int bits = 0)
const;
00095
00108
const void *
getOutputData(
const unsigned long frame,
00109
const int bits,
00110
const int planar = 0);
00111
00126
int getOutputData(
void *buffer,
00127
const unsigned long size,
00128
const unsigned long frame,
00129
const int bits,
00130
const int planar = 0);
00131
00139
const void *
getOutputPlane(
const int plane)
const;
00140
00144
void deleteOutputData();
00145
00153
DiImage *
createImage(
const unsigned long fstart,
00154
const unsigned long fcount)
const;
00155
00174
DiImage *
createScale(
const signed long left_pos,
00175
const signed long top_pos,
00176
const unsigned long src_cols,
00177
const unsigned long src_rows,
00178
const unsigned long dest_cols,
00179
const unsigned long dest_rows,
00180
const int interpolate,
00181
const int aspect,
00182
const Uint16 pvalue)
const;
00183
00193
int flip(
const int horz,
00194
const int vert);
00195
00203
DiImage *
createFlip(
const int horz,
00204
const int vert)
const;
00205
00214
int rotate(
const int degree);
00215
00222
DiImage *
createRotate(
const int degree)
const;
00223
00232
DiImage *
createMono(
const double red,
00233
const double green,
00234
const double blue)
const;
00235
00240 const DiColorPixel *
getInterData()
const
00241
{
00242
return InterData;
00243 }
00244
00257
unsigned long createDIB(
void *&data,
00258
const unsigned long size,
00259
const unsigned long frame,
00260
const int bits,
00261
const int upsideDown,
00262
const int padding = 1);
00263
00273
unsigned long createAWTBitmap(
void *&data,
00274
const unsigned long frame,
00275
const int bits);
00276
00283
int writeImageToDataset(
DcmItem &dataset);
00284
00294
int writePPM(ostream &stream,
00295
const unsigned long frame,
00296
const int bits);
00297
00307
int writePPM(FILE *stream,
00308
const unsigned long frame,
00309
const int bits);
00310
00319
int writeRawPPM(FILE *stream,
00320
const unsigned long frame,
00321
const int bits);
00322
00331
int writeBMP(FILE *stream,
00332
const unsigned long frame,
00333
const int bits);
00334
00335
00336
protected:
00337
00344
DiColorImage(
const DiColorImage *image,
00345
const unsigned long fstart,
00346
const unsigned long fcount);
00347
00364
DiColorImage(
const DiColorImage *image,
00365
const signed long left_pos,
00366
const signed long top_pos,
00367
const Uint16 src_cols,
00368
const Uint16 src_rows,
00369
const Uint16 dest_cols,
00370
const Uint16 dest_rows,
00371
const int interpolate = 0,
00372
const int aspect = 0);
00373
00380
DiColorImage(
const DiColorImage *image,
00381
const int horz,
00382
const int vert);
00383
00389
DiColorImage(
const DiColorImage *image,
00390
const int degree);
00391
00396
int checkInterData(
const int mode = 1);
00397
00409
const void *
getData(
void *buffer,
00410
const unsigned long size,
00411
const unsigned long frame,
00412
const int bits,
00413
const int planar);
00414
00420
virtual void updateImagePixelModuleAttributes(
DcmItem &dataset);
00421
00423 const OFBool
RGBColorModel;
00424
00426 DiColorPixel *
InterData;
00427
00428
00429
private:
00430
00432 DiColorOutputPixel *
OutputData;
00433
00434
00435
00436
DiColorImage(
const DiColorImage &);
00437
DiColorImage &operator=(
const DiColorImage &);
00438 };
00439
00440
00441
#endif
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
Generated on 4 Nov 2004 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.3.8