1 /*
2  *
3  *  Copyright (C) 1997-2017, OFFIS e.V.
4  *  All rights reserved.  See COPYRIGHT file for details.
5  *
6  *  This software and supporting documentation were developed by
7  *
8  *    OFFIS e.V.
9  *    R&D Division Health
10  *    Escherweg 2
11  *    D-26121 Oldenburg, Germany
12  *
13  *
14  *  Module:  dcmjpeg
15  *
16  *  Author:  Marco Eichelberg, Norbert Olges
17  *
18  *  Purpose: Codec class for decoding JPEG Extended Sequential (lossy, 8/12-bit)
19  *
20  */
21 
22 #ifndef DJDECEXT_H
23 #define DJDECEXT_H
24 
25 #include "dcmtk/config/osconfig.h"
26 #include "dcmtk/dcmjpeg/djcodecd.h" /* for class DJCodecDecoder */
27 
28 
29 /** Decoder class for JPEG Extended Sequential (lossy, 8/12-bit)
30  */
31 class DCMTK_DCMJPEG_EXPORT DJDecoderExtended : public DJCodecDecoder
32 {
33 public:
34 
35   /// default constructor
36   DJDecoderExtended();
37 
38   /// destructor
39   virtual ~DJDecoderExtended();
40 
41   /** returns the transfer syntax that this particular codec
42    *  is able to encode and decode.
43    *  @return supported transfer syntax
44    */
45   virtual E_TransferSyntax supportedTransferSyntax() const;
46 
47   /** returns true if the transfer syntax supported by this
48    *  codec is lossless.
49    *  @return lossless flag
50    */
51   virtual OFBool isLosslessProcess() const;
52 
53 private:
54 
55   /** creates an instance of the compression library to be used for decoding.
56    *  @param toRepParam representation parameter passed to decode()
57    *  @param cp codec parameter passed to decode()
58    *  @param bitsPerSample bits per sample for the image data
59    *  @param isYBR flag indicating whether DICOM photometric interpretation is YCbCr
60    *  @return pointer to newly allocated decoder object
61    */
62   virtual DJDecoder *createDecoderInstance(
63     const DcmRepresentationParameter * toRepParam,
64     const DJCodecParameter *cp,
65     Uint8 bitsPerSample,
66     OFBool isYBR) const;
67 
68 };
69 
70 #endif
71