/src/dcmtk/dcmjpeg/libsrc/djdecpro.cc
Line | Count | Source |
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 Progressive (lossy, 8/12-bit) |
19 | | * |
20 | | */ |
21 | | |
22 | | #include "dcmtk/config/osconfig.h" |
23 | | #include "dcmtk/dcmjpeg/djdecpro.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 | | |
30 | | DJDecoderProgressive::DJDecoderProgressive() |
31 | 1 | : DJCodecDecoder() |
32 | 1 | { |
33 | 1 | } |
34 | | |
35 | | |
36 | | DJDecoderProgressive::~DJDecoderProgressive() |
37 | 1 | { |
38 | 1 | } |
39 | | |
40 | | |
41 | | E_TransferSyntax DJDecoderProgressive::supportedTransferSyntax() const |
42 | 0 | { |
43 | 0 | return EXS_JPEGProcess10_12; |
44 | 0 | } |
45 | | |
46 | | OFBool DJDecoderProgressive::isLosslessProcess() const |
47 | 0 | { |
48 | 0 | return OFFalse; |
49 | 0 | } |
50 | | |
51 | | DJDecoder *DJDecoderProgressive::createDecoderInstance( |
52 | | const DcmRepresentationParameter * /* toRepParam */, |
53 | | const DJCodecParameter *cp, |
54 | | Uint8 bitsPerSample, |
55 | | OFBool isYBR) const |
56 | 0 | { |
57 | 0 | if (bitsPerSample > 8) return new DJDecompressIJG12Bit(*cp, isYBR); |
58 | 0 | else return new DJDecompressIJG8Bit(*cp, isYBR); |
59 | 0 | } |