1 /*
2 *
3 * Copyright (C) 2001-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 #include "dcmtk/config/osconfig.h"
23 #include "dcmtk/dcmjpeg/djdecext.h"
24 #include "dcmtk/dcmjpeg/djcparam.h"
25 #include "dcmtk/dcmjpeg/djrploss.h"
26 #include "dcmtk/dcmjpeg/djdijg8.h"
27 #include "dcmtk/dcmjpeg/djdijg12.h"
28
29
DJDecoderExtended()30 DJDecoderExtended::DJDecoderExtended()
31 : DJCodecDecoder()
32 {
33 }
34
35
~DJDecoderExtended()36 DJDecoderExtended::~DJDecoderExtended()
37 {
38 }
39
40
supportedTransferSyntax() const41 E_TransferSyntax DJDecoderExtended::supportedTransferSyntax() const
42 {
43 return EXS_JPEGProcess2_4;
44 }
45
isLosslessProcess() const46 OFBool DJDecoderExtended::isLosslessProcess() const
47 {
48 return OFFalse;
49 }
50
createDecoderInstance(const DcmRepresentationParameter *,const DJCodecParameter * cp,Uint8 bitsPerSample,OFBool isYBR) const51 DJDecoder *DJDecoderExtended::createDecoderInstance(
52 const DcmRepresentationParameter * /* toRepParam */,
53 const DJCodecParameter *cp,
54 Uint8 bitsPerSample,
55 OFBool isYBR) const
56 {
57 if (bitsPerSample > 8) return new DJDecompressIJG12Bit(*cp, isYBR);
58 else return new DJDecompressIJG8Bit(*cp, isYBR);
59 }
60