comparison OrthancServer/FromDcmtkBridge.cpp @ 861:a546b05a43da jpeg

fix PngWriter
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 07 Jun 2014 10:49:00 +0200
parents 80c7e53a69b5
children 3c0d0836f704
comparison
equal deleted inserted replaced
860:80c7e53a69b5 861:a546b05a43da
527 ImageExtractionMode mode) 527 ImageExtractionMode mode)
528 { 528 {
529 // TODO CONTINUE THIS 529 // TODO CONTINUE THIS
530 if (mode == ImageExtractionMode_UInt8) 530 if (mode == ImageExtractionMode_UInt8)
531 { 531 {
532 printf(">>>>>>>>\n");
532 ImageBuffer tmp; 533 ImageBuffer tmp;
533 if (DicomImageDecoder::Decode(tmp, dataset, frame, PixelFormat_Grayscale8, DicomImageDecoder::Mode_Truncate)) 534 if (DicomImageDecoder::Decode(tmp, dataset, frame, PixelFormat_Grayscale8, DicomImageDecoder::Mode_Truncate))
534 { 535 {
535 ImageAccessor accessor(tmp.GetAccessor()); 536 ImageAccessor accessor(tmp.GetAccessor());
536 PngWriter writer; 537 PngWriter writer;
537 writer.WriteToMemory(result, accessor); 538 writer.WriteToMemory(result, accessor);
539 printf("<<<<<<<< OK\n");
538 return; 540 return;
539 } 541 }
542 printf("<<<<<<<< FAILURE\n");
540 } 543 }
541 544
542 // See also: http://support.dcmtk.org/wiki/dcmtk/howto/accessing-compressed-data 545 // See also: http://support.dcmtk.org/wiki/dcmtk/howto/accessing-compressed-data
543 546
544 std::auto_ptr<DicomIntegerPixelAccessor> accessor; 547 std::auto_ptr<DicomIntegerPixelAccessor> accessor;