comparison UnitTestsSources/FromDcmtkTests.cpp @ 2107:88831c3edd8f

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Oct 2016 17:22:09 +0200
parents 8e67325eaa3f
children a657f7772e69
comparison
equal deleted inserted replaced
2106:09cb73980740 2107:88831c3edd8f
816 816
817 TEST(TestImages, PatternGrayscale8) 817 TEST(TestImages, PatternGrayscale8)
818 { 818 {
819 static const char* PATH = "UnitTestsResults/PatternGrayscale8.dcm"; 819 static const char* PATH = "UnitTestsResults/PatternGrayscale8.dcm";
820 820
821 Orthanc::Image image(Orthanc::PixelFormat_Grayscale8, 256, 256); 821 Orthanc::Image image(Orthanc::PixelFormat_Grayscale8, 256, 256, false);
822 822
823 for (int y = 0; y < 256; y++) 823 for (int y = 0; y < 256; y++)
824 { 824 {
825 uint8_t *p = reinterpret_cast<uint8_t*>(image.GetRow(y)); 825 uint8_t *p = reinterpret_cast<uint8_t*>(image.GetRow(y));
826 for (int x = 0; x < 256; x++, p++) 826 for (int x = 0; x < 256; x++, p++)
869 869
870 TEST(TestImages, PatternRGB) 870 TEST(TestImages, PatternRGB)
871 { 871 {
872 static const char* PATH = "UnitTestsResults/PatternRGB24.dcm"; 872 static const char* PATH = "UnitTestsResults/PatternRGB24.dcm";
873 873
874 Orthanc::Image image(Orthanc::PixelFormat_RGB24, 384, 256); 874 Orthanc::Image image(Orthanc::PixelFormat_RGB24, 384, 256, false);
875 875
876 for (int y = 0; y < 256; y++) 876 for (int y = 0; y < 256; y++)
877 { 877 {
878 uint8_t *p = reinterpret_cast<uint8_t*>(image.GetRow(y)); 878 uint8_t *p = reinterpret_cast<uint8_t*>(image.GetRow(y));
879 for (int x = 0; x < 128; x++, p += 3) 879 for (int x = 0; x < 128; x++, p += 3)
931 931
932 TEST(TestImages, PatternUint16) 932 TEST(TestImages, PatternUint16)
933 { 933 {
934 static const char* PATH = "UnitTestsResults/PatternGrayscale16.dcm"; 934 static const char* PATH = "UnitTestsResults/PatternGrayscale16.dcm";
935 935
936 Orthanc::Image image(Orthanc::PixelFormat_Grayscale16, 256, 256); 936 Orthanc::Image image(Orthanc::PixelFormat_Grayscale16, 256, 256, false);
937 937
938 uint16_t v = 0; 938 uint16_t v = 0;
939 for (int y = 0; y < 256; y++) 939 for (int y = 0; y < 256; y++)
940 { 940 {
941 uint16_t *p = reinterpret_cast<uint16_t*>(image.GetRow(y)); 941 uint16_t *p = reinterpret_cast<uint16_t*>(image.GetRow(y));
985 985
986 TEST(TestImages, PatternInt16) 986 TEST(TestImages, PatternInt16)
987 { 987 {
988 static const char* PATH = "UnitTestsResults/PatternSignedGrayscale16.dcm"; 988 static const char* PATH = "UnitTestsResults/PatternSignedGrayscale16.dcm";
989 989
990 Orthanc::Image image(Orthanc::PixelFormat_SignedGrayscale16, 256, 256); 990 Orthanc::Image image(Orthanc::PixelFormat_SignedGrayscale16, 256, 256, false);
991 991
992 int16_t v = -32768; 992 int16_t v = -32768;
993 for (int y = 0; y < 256; y++) 993 for (int y = 0; y < 256; y++)
994 { 994 {
995 int16_t *p = reinterpret_cast<int16_t*>(image.GetRow(y)); 995 int16_t *p = reinterpret_cast<int16_t*>(image.GetRow(y));