comparison UnitTestsSources/FromDcmtkTests.cpp @ 1562:2084b7c20478

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 21 Aug 2015 13:47:22 +0200
parents 9f66a12eb8fc
children 96582230ddcb
comparison
equal deleted inserted replaced
1560:307b9ea6c39b 1562:2084b7c20478
159 ASSERT_EQ(5u, reader.GetHeight()); 159 ASSERT_EQ(5u, reader.GetHeight());
160 ASSERT_EQ(5u, reader.GetWidth()); 160 ASSERT_EQ(5u, reader.GetWidth());
161 ASSERT_EQ(PixelFormat_RGBA32, reader.GetFormat()); 161 ASSERT_EQ(PixelFormat_RGBA32, reader.GetFormat());
162 162
163 ParsedDicomFile o; 163 ParsedDicomFile o;
164 o.EmbedImage(s); 164 o.EmbedContent(s);
165 o.SaveToFile("UnitTestsResults/png1.dcm"); 165 o.SaveToFile("UnitTestsResults/png1.dcm");
166 166
167 // Red dot, without alpha channel 167 // Red dot, without alpha channel
168 s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gUGDTcIn2+8BgAAACJJREFUCNdj/P//PwMjIwME/P/P+J8BBTAxEOL/R9Lx/z8AynoKAXOeiV8AAAAASUVORK5CYII="; 168 s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gUGDTcIn2+8BgAAACJJREFUCNdj/P//PwMjIwME/P/P+J8BBTAxEOL/R9Lx/z8AynoKAXOeiV8AAAAASUVORK5CYII=";
169 o.EmbedImage(s); 169 o.EmbedContent(s);
170 o.SaveToFile("UnitTestsResults/png2.dcm"); 170 o.SaveToFile("UnitTestsResults/png2.dcm");
171 171
172 // Check box in Graylevel8 172 // Check box in Graylevel8
173 s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gUGDDcB53FulQAAAElJREFUGNNtj0sSAEEEQ1+U+185s1CtmRkblQ9CZldsKHJDk6DLGLJa6chjh0ooQmpjXMM86zPwydGEj6Ed/UGykkEM8X+p3u8/8LcOJIWLGeMAAAAASUVORK5CYII="; 173 s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gUGDDcB53FulQAAAElJREFUGNNtj0sSAEEEQ1+U+185s1CtmRkblQ9CZldsKHJDk6DLGLJa6chjh0ooQmpjXMM86zPwydGEj6Ed/UGykkEM8X+p3u8/8LcOJIWLGeMAAAAASUVORK5CYII=";
174 o.EmbedImage(s); 174 o.EmbedContent(s);
175 //o.Replace(DICOM_TAG_SOP_CLASS_UID, UID_DigitalXRayImageStorageForProcessing); 175 //o.Replace(DICOM_TAG_SOP_CLASS_UID, UID_DigitalXRayImageStorageForProcessing);
176 o.SaveToFile("UnitTestsResults/png3.dcm"); 176 o.SaveToFile("UnitTestsResults/png3.dcm");
177 177
178 178
179 { 179 {