comparison OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp @ 4311:cb9aef006229

turning IImageWriter into a pure interface
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 09 Nov 2020 15:07:55 +0100
parents 785a2713323e
children 6d49e3b6ff77
comparison
equal deleted inserted replaced
4310:2ae905070221 4311:cb9aef006229
987 bool invert) 987 bool invert)
988 { 988 {
989 ApplyExtractionMode(image, mode, invert); 989 ApplyExtractionMode(image, mode, invert);
990 990
991 PamWriter writer; 991 PamWriter writer;
992 writer.WriteToMemory(result, *image); 992 IImageWriter::WriteToMemory(writer, result, *image);
993 } 993 }
994 994
995 #if ORTHANC_ENABLE_PNG == 1 995 #if ORTHANC_ENABLE_PNG == 1
996 void DicomImageDecoder::ExtractPngImage(std::string& result, 996 void DicomImageDecoder::ExtractPngImage(std::string& result,
997 std::unique_ptr<ImageAccessor>& image, 997 std::unique_ptr<ImageAccessor>& image,
999 bool invert) 999 bool invert)
1000 { 1000 {
1001 ApplyExtractionMode(image, mode, invert); 1001 ApplyExtractionMode(image, mode, invert);
1002 1002
1003 PngWriter writer; 1003 PngWriter writer;
1004 writer.WriteToMemory(result, *image); 1004 IImageWriter::WriteToMemory(writer, result, *image);
1005 } 1005 }
1006 #endif 1006 #endif
1007 1007
1008 1008
1009 #if ORTHANC_ENABLE_JPEG == 1 1009 #if ORTHANC_ENABLE_JPEG == 1
1021 1021
1022 ApplyExtractionMode(image, mode, invert); 1022 ApplyExtractionMode(image, mode, invert);
1023 1023
1024 JpegWriter writer; 1024 JpegWriter writer;
1025 writer.SetQuality(quality); 1025 writer.SetQuality(quality);
1026 writer.WriteToMemory(result, *image); 1026 IImageWriter::WriteToMemory(writer, result, *image);
1027 } 1027 }
1028 #endif 1028 #endif
1029 1029
1030 1030
1031 #if ORTHANC_BUILDING_FRAMEWORK_LIBRARY == 1 1031 #if ORTHANC_BUILDING_FRAMEWORK_LIBRARY == 1