~ubuntu-branches/ubuntu/wily/ginkgocadx/wily-proposed

« back to all changes in this revision

Viewing changes to src/cadxcore/main/controllers/dcmtk/libi2d/i2dles.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Tille
  • Date: 2011-05-02 08:09:26 UTC
  • Revision ID: james.westby@ubuntu.com-20110502080926-bql5wep49c7hg91t
Tags: upstream-2.4.1.1
ImportĀ upstreamĀ versionĀ 2.4.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  
 
3
 *  $Id$
 
4
 *  Ginkgo CADx Project
 
5
 *
 
6
 *  Code addapted from DCMTK
 
7
 *
 
8
 */
 
9
#pragma once
 
10
 
 
11
#ifdef verify
 
12
#define MACRO_QUE_ESTORBA verify
 
13
#undef verify
 
14
#endif
 
15
 
 
16
#include <dcmtk/config/osconfig.h>
 
17
#include <dcmtk/dcmdata/dctk.h>
 
18
#include "i2dimgs.h"
 
19
 
 
20
#ifdef MACRO_QUE_ESTORBA
 
21
#define verify MACRO_QUE_ESTORBA
 
22
#endif
 
23
 
 
24
class I2DLittleEndianSource : public I2DImgSource
 
25
{
 
26
 
 
27
public:
 
28
 
 
29
  /** Constructor
 
30
   */
 
31
  I2DLittleEndianSource() {}
 
32
  
 
33
  /** Virtual Destructor
 
34
  */
 
35
  virtual ~I2DLittleEndianSource() {}
 
36
 
 
37
  /** Indica si hay que recomprimir el frame de salida
 
38
  */
 
39
  virtual bool Recomprimir() const
 
40
  {
 
41
          return true;
 
42
  }
 
43
 
 
44
  /** Returns identifier for the image input format the plugin imports.
 
45
   *  @return A short identifier (e. g. "JPEG")
 
46
   */
 
47
  virtual OFString inputFormat() const;
 
48
 
 
49
  /** Extracts the raw JPEG pixel data stream from a JPEG file and returns some
 
50
   *  image information about this pixel data.
 
51
   *  Raw means here that all APP markers (e.g. JFIF information) are removed from the JPEG stream.
 
52
   *  The pixel data returned is a JPEG stream in JPEG interchange format.
 
53
   *  This function allocates memory for the pixel data returned to the user. The caller of this
 
54
   *  function is responsible for deleting the memory buffer
 
55
   *  @param rows - [out] Rows of image
 
56
   *  @param cols - [out] Columns of image
 
57
   *  @param samplesPerPixel - [out] Number of components per pixel
 
58
   *  @param photoMetrInt - [out] The DICOM color model used for the compressed data
 
59
   *  @param bitsAlloc - [out] Bits Allocated for one sample
 
60
   *  @param bitsStored - [out] Bits Stored, number of bits stored within Bits Allocated
 
61
   *  @param highBit - [out] High Bit, hightest bit position set within Bits Allocated
 
62
   *  @param pixelRepr - [out] Pixel Representation (0=unsigned, 1=signed)
 
63
   *  @param planConf - [out] Planar Configuration
 
64
   *  @param pixAspectH - [out] Horizontal value of pixel aspect ratio
 
65
   *  @param pixAspectV - [out] Vertical value of pixel aspect ratio
 
66
   *  @param pixData - [out] Pointer to the pixel data in JPEG Interchange Format (but without APPx markers).
 
67
   *  @param length - [out] Length of pixel data
 
68
   *  @param ts - [out] The transfer syntax imposed by the imported pixel pixel data.
 
69
                        This is necessary for the JPEG importer that needs to report
 
70
                        which TS must be used for the imported JPEG data (ie. baseline, progressive, ...).
 
71
                        If pixel data is uncompressed, EXS_Unknown is returned
 
72
   *  @return EC_Normal, if successful, error otherwise
 
73
   */
 
74
  virtual OFCondition readPixelData( Uint16& rows,
 
75
                                     Uint16& cols,
 
76
                                     Uint16& samplesPerPixel,
 
77
                                     OFString& photoMetrInt,
 
78
                                     Uint16& bitsAlloc,
 
79
                                     Uint16& bitsStored,
 
80
                                     Uint16& highBit,
 
81
                                     Uint16& pixelRepr,
 
82
                                     Uint16& planConf,
 
83
                                     Uint16& pixAspectH,
 
84
                                     Uint16& pixAspectV,
 
85
                                     char*&  pixData,
 
86
                                     Uint32& length,
 
87
                                     E_TransferSyntax& ts);
 
88
};