Mercurial > hg > orthanc
comparison OrthancServer/Internals/DicomImageDecoder.h @ 859:610a9a1ed855 jpeg
ImageProcessing::Convert
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Jun 2014 18:12:31 +0200 |
parents | 5944b8b80842 |
children | 3c0d0836f704 |
comparison
equal
deleted
inserted
replaced
858:ebc41566f742 | 859:610a9a1ed855 |
---|---|
38 | 38 |
39 namespace Orthanc | 39 namespace Orthanc |
40 { | 40 { |
41 class DicomImageDecoder | 41 class DicomImageDecoder |
42 { | 42 { |
43 public: // TODO SWITCH TO PRIVATE | 43 public: |
44 //private: | 44 enum Mode |
45 { | |
46 Mode_Truncate, | |
47 Mode_Stretch | |
48 }; | |
49 | |
50 private: | |
45 class ImageSource; | 51 class ImageSource; |
46 | 52 |
47 static void DecodeUncompressedImageInternal(ImageBuffer& target, | 53 static void DecodeUncompressedImageInternal(ImageBuffer& target, |
48 DcmDataset& dataset, | 54 DcmDataset& dataset, |
49 unsigned int frame); | 55 unsigned int frame); |
51 static bool IsPsmctRle1(DcmDataset& dataset); | 57 static bool IsPsmctRle1(DcmDataset& dataset); |
52 | 58 |
53 static void SetupImageBuffer(ImageBuffer& target, | 59 static void SetupImageBuffer(ImageBuffer& target, |
54 DcmDataset& dataset); | 60 DcmDataset& dataset); |
55 | 61 |
62 public: // TODO SWITCH TO PRIVATE | |
56 static bool DecodePsmctRle1(std::string& output, | 63 static bool DecodePsmctRle1(std::string& output, |
57 DcmDataset& dataset); | 64 DcmDataset& dataset); |
58 | 65 |
59 public: | 66 public: |
60 static bool IsUncompressedImage(const DcmDataset& dataset); | 67 static bool IsUncompressedImage(const DcmDataset& dataset); |
63 | 70 |
64 static void DecodeUncompressedImage(ImageBuffer& target, | 71 static void DecodeUncompressedImage(ImageBuffer& target, |
65 DcmDataset& dataset, | 72 DcmDataset& dataset, |
66 unsigned int frame); | 73 unsigned int frame); |
67 | 74 |
75 static void DecodeUncompressedImage(ImageBuffer& target, | |
76 DcmDataset& dataset, | |
77 unsigned int frame, | |
78 PixelFormat format, | |
79 Mode mode); | |
80 | |
68 #if ORTHANC_JPEG_LOSSLESS_ENABLED == 1 | 81 #if ORTHANC_JPEG_LOSSLESS_ENABLED == 1 |
69 static void DecodeJpegLossless(ImageBuffer& target, | 82 static void DecodeJpegLossless(ImageBuffer& target, |
70 DcmDataset& dataset, | 83 DcmDataset& dataset, |
71 unsigned int frame); | 84 unsigned int frame); |
72 #endif | 85 #endif |
73 | 86 |
74 static bool Decode(ImageBuffer& target, | 87 static bool Decode(ImageBuffer& target, |
75 DcmDataset& dataset, | 88 DcmDataset& dataset, |
76 unsigned int frame); | 89 unsigned int frame); |
90 | |
91 static bool Decode(ImageBuffer& target, | |
92 DcmDataset& dataset, | |
93 unsigned int frame, | |
94 PixelFormat format, | |
95 Mode mode); | |
96 | |
77 }; | 97 }; |
78 } | 98 } |