comparison UnitTestsSources/JpegLossless.cpp @ 847:03ea55da7429 jpeg

fully functional JPEG-LS conversion
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 05 Jun 2014 18:14:16 +0200
parents 48016722c770
children 703e8d5b03fd
comparison
equal deleted inserted replaced
846:715ab7674993 847:03ea55da7429
47 using namespace Orthanc; 47 using namespace Orthanc;
48 48
49 49
50 TEST(JpegLossless, Basic) 50 TEST(JpegLossless, Basic)
51 { 51 {
52 //DJLSDecoderRegistration::registerCodecs( EJLSUC_default, EJLSPC_restore,OFFalse );
53
54 #if 0 52 #if 0
55 // Fallback 53 // Fallback
56 54
57 std::string s; 55 std::string s;
58 Toolbox::ReadFile(s, "IM-0001-1001-0001.dcm"); 56 Toolbox::ReadFile(s, "IM-0001-1001-0001.dcm");
87 DcmDataset& dataset = *fileformat.getDataset(); 85 DcmDataset& dataset = *fileformat.getDataset();
88 86
89 ASSERT_TRUE(DicomImageDecoder::IsJpegLossless(dataset)); 87 ASSERT_TRUE(DicomImageDecoder::IsJpegLossless(dataset));
90 88
91 ImageBuffer image; 89 ImageBuffer image;
92 DicomImageDecoder::DecodeJpegLossless(image, dataset); 90 //DicomImageDecoder::DecodeJpegLossless(image, dataset, 0);
91 DicomImageDecoder::Decode(image, dataset, 0);
93 92
94 ImageAccessor accessor(image.GetAccessor()); 93 ImageAccessor accessor(image.GetAccessor());
95 94
96 for (unsigned int y = 0; y < accessor.GetHeight(); y++) 95 for (unsigned int y = 0; y < accessor.GetHeight(); y++)
97 { 96 {
106 PngWriter w; 105 PngWriter w;
107 w.WriteToFile("tata.png", accessor); 106 w.WriteToFile("tata.png", accessor);
108 } 107 }
109 108
110 #endif 109 #endif
111
112
113 //DJLSDecoderRegistration::cleanup();
114 } 110 }
115 111
116 112
117 #endif 113 #endif