Mercurial > hg > orthanc
comparison OrthancServer/Internals/DicomImageDecoder.h @ 1905:8b1baa2315b8
Huge speedup if decoding the family of JPEG transfer syntaxes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 05 Jan 2016 17:25:01 +0100 |
parents | 554ec8422ec5 |
children | 6c73df12ca51 |
comparison
equal
deleted
inserted
replaced
1904:4be8accf8768 | 1905:8b1baa2315b8 |
---|---|
35 #include "../ParsedDicomFile.h" | 35 #include "../ParsedDicomFile.h" |
36 | 36 |
37 #include <memory> | 37 #include <memory> |
38 | 38 |
39 class DcmDataset; | 39 class DcmDataset; |
40 class DcmCodec; | |
41 class DcmCodecParameter; | |
40 | 42 |
41 namespace Orthanc | 43 namespace Orthanc |
42 { | 44 { |
43 class DicomImageDecoder : public boost::noncopyable | 45 class DicomImageDecoder : public boost::noncopyable |
44 { | 46 { |
47 | 49 |
48 DicomImageDecoder() // This is a fully abstract class, no constructor | 50 DicomImageDecoder() // This is a fully abstract class, no constructor |
49 { | 51 { |
50 } | 52 } |
51 | 53 |
54 static ImageAccessor* CreateImage(DcmDataset& dataset, | |
55 bool ignorePhotometricInterpretation); | |
56 | |
52 static ImageAccessor* DecodeUncompressedImage(DcmDataset& dataset, | 57 static ImageAccessor* DecodeUncompressedImage(DcmDataset& dataset, |
53 unsigned int frame); | 58 unsigned int frame); |
54 | 59 |
55 static bool IsPsmctRle1(DcmDataset& dataset); | 60 static bool IsPsmctRle1(DcmDataset& dataset); |
61 | |
62 static ImageAccessor* ApplyCodec(const DcmCodec& codec, | |
63 const DcmCodecParameter& parameters, | |
64 DcmDataset& dataset, | |
65 unsigned int frame); | |
56 | 66 |
57 static bool TruncateDecodedImage(std::auto_ptr<ImageAccessor>& image, | 67 static bool TruncateDecodedImage(std::auto_ptr<ImageAccessor>& image, |
58 PixelFormat format, | 68 PixelFormat format, |
59 bool allowColorConversion); | 69 bool allowColorConversion); |
60 | 70 |
62 | 72 |
63 static void ApplyExtractionMode(std::auto_ptr<ImageAccessor>& image, | 73 static void ApplyExtractionMode(std::auto_ptr<ImageAccessor>& image, |
64 ImageExtractionMode mode); | 74 ImageExtractionMode mode); |
65 | 75 |
66 public: | 76 public: |
67 static ImageAccessor* CreateImage(DcmDataset& dataset); | |
68 | |
69 static ImageAccessor *Decode(ParsedDicomFile& dicom, | 77 static ImageAccessor *Decode(ParsedDicomFile& dicom, |
70 unsigned int frame); | 78 unsigned int frame); |
71 | 79 |
72 static void ExtractPngImage(std::string& result, | 80 static void ExtractPngImage(std::string& result, |
73 std::auto_ptr<ImageAccessor>& image, | 81 std::auto_ptr<ImageAccessor>& image, |