Mercurial > hg > orthanc
comparison Core/DicomParsing/Internals/DicomImageDecoder.cpp @ 2699:52217dc47a4e
new image/pam MIME TYPE supported in /instances/../frames/../image-uint8... routes
author | am@osimis.io |
---|---|
date | Thu, 05 Jul 2018 12:25:00 +0200 |
parents | 345725b9350c |
children | d924f9bb61cc |
comparison
equal
deleted
inserted
replaced
2687:2c684841da15 | 2699:52217dc47a4e |
---|---|
91 #endif | 91 #endif |
92 | 92 |
93 #if ORTHANC_ENABLE_JPEG == 1 | 93 #if ORTHANC_ENABLE_JPEG == 1 |
94 # include "../../Images/JpegWriter.h" | 94 # include "../../Images/JpegWriter.h" |
95 #endif | 95 #endif |
96 #include "../../Images/PamWriter.h" | |
96 | 97 |
97 #include <boost/lexical_cast.hpp> | 98 #include <boost/lexical_cast.hpp> |
98 | 99 |
99 #include <dcmtk/dcmdata/dcdeftag.h> | 100 #include <dcmtk/dcmdata/dcdeftag.h> |
100 #include <dcmtk/dcmdata/dcfilefo.h> | 101 #include <dcmtk/dcmdata/dcfilefo.h> |
950 throw OrthancException(ErrorCode_NotImplemented); | 951 throw OrthancException(ErrorCode_NotImplemented); |
951 } | 952 } |
952 } | 953 } |
953 | 954 |
954 | 955 |
956 void DicomImageDecoder::ExtractPamImage(std::string& result, | |
957 std::auto_ptr<ImageAccessor>& image, | |
958 ImageExtractionMode mode, | |
959 bool invert) | |
960 { | |
961 ApplyExtractionMode(image, mode, invert); | |
962 | |
963 PamWriter writer; | |
964 writer.WriteToMemory(result, *image); | |
965 } | |
966 | |
955 #if ORTHANC_ENABLE_PNG == 1 | 967 #if ORTHANC_ENABLE_PNG == 1 |
956 void DicomImageDecoder::ExtractPngImage(std::string& result, | 968 void DicomImageDecoder::ExtractPngImage(std::string& result, |
957 std::auto_ptr<ImageAccessor>& image, | 969 std::auto_ptr<ImageAccessor>& image, |
958 ImageExtractionMode mode, | 970 ImageExtractionMode mode, |
959 bool invert) | 971 bool invert) |