]> Creatis software - gdcmData.git/blob - checkReadColor.sh
b0c2fb3e1747c0c1abc5405cb41689cbd79a7521
[gdcmData.git] / checkReadColor.sh
1 # Check READ
2 #-----------
3 #
4 # We just write RAW Files and AFFIM them
5 # to be sure the reading was OK
6 #
7
8 #RGB
9  ---
10
11 testWrite 8BitsUncompressedColor.dcm r
12 affim filein=8BitsUncompressedColor.dcm.raw dimx=800 dimy=535 nbit=24
13
14 testWrite US-RGB-8-epicard.dcm r
15 echo "expected pixelType=8U SamplesPerPixel=3 PlanarConfiguration=1"
16 echo "         PhotometricInterpretation=RGB"
17 affim filein=US-RGB-8-epicard.dcm.raw  dimx=640 dimy=480 nbit=24
18
19 testWrite US-RGB-8-esopecho.dcm r
20 echo "expected pixelType=8U SamplesPerPixel=3 PlanarConfiguration=0"
21 echo "         PhotometricInterpretation=RGB"
22 affim filein=US-RGB-8-esopecho.dcm.raw dimx=256 dimy=120 nbit=24
23
24 testWrite gdcm-RGB-LibIDORect.acr r
25 affim filein=gdcm-RGB-LibIDORect.acr.raw  DIMX=400 DIMY=100 nbit=24
26
27 #YBR_FULL_422
28 #------------
29
30 testWrite US.3405.1.dcm r  # YBR_FULL_422
31 echo "expected  pixelType=8U SamplesPerPixel=1 PlanarConfiguration=0"
32 echo "          PhotometricInterpretation=RGB"
33 affim filein=US.3405.1.dcm.raw DIMX=768 DIMY=576 nbit=24
34
35 testWrite US.1.2.dcm r
36 echo "expected : A lot of Fragments (40), nb Frames = 40 ;-)"
37 echo "expected  pixelType=8U SamplesPerPixel=3 PlanarConfiguration=0"
38 echo "          PhotometricInterpretation=YBR_FULL_422"
39 affim filein=US.1.2.dcm.raw  DIMX=768 DIMY=576  nbit=24
40 affim filein=US.1.2.dcm.raw  DIMX=768 DIMY=576  nbit=24 offset=13271040
41 affim filein=US.1.2.dcm.raw  DIMX=768 DIMY=576  nbit=24 offset=39813120
42
43
44 #PALETTE COLOR
45 #-------------
46
47 testWrite gdcm-US-ALOKA-16.dcm r
48 echo "expected  pixelType=16U SamplesPerPixel=1 PlanarConfiguration=0"
49 echo "          PhotometricInterpretation=PALETTE COLOR"
50 echo "expected : Gray image since 'Segmented xxx Palette Color LUT Data' not yet taken into account"
51 echo "neither e-film no DicomWorks deals with the color"
52 echo "breaks xmedcon"
53 ls -l gdcm-US-ALOKA-16.dcm*
54 echo "expected 1843200 (large enough to hold 3 16-bits planes)"
55 affim dimx=640 dimy=480 filein=gdcm-US-ALOKA-16.dcm.raw nbit=16
56
57 testWrite US-PAL-8-10x-echo.dcm r
58 echo "expected pixelType=8U SamplesPerPixel=1 PlanarConfiguration=0"
59 echo "         PhotometricInterpretation=PALETTE COLOR"
60 echo "         nb Frames (DIMZ): 10"
61 echo "expected : Parsing 10 'single fragment' Segments"
62 echo "           Reading 10 'single fragment' Segments (ouf!)"
63 affim filein=US-PAL-8-10x-echo.dcm.raw DIMX=600 DIMY=430 nbit=24
64 affim filein=US-PAL-8-10x-echo.dcm.raw DIMX=600 DIMY=430 nbit=24 offset=774000
65
66 testWrite 8BitsRunLengthColor.dcm r
67 echo "expected pixelType=8U SamplesPerPixel=1 PlanarConfiguration=2"
68 echo "         PhotometricInterpretation=PALETTE COLOR"
69 echo "expected correct color image"
70 affim filein=8BitsRunLengthColor.dcm.raw DIMX=800 DIMY=535 nbit=24
71
72 testWrite OT-PAL-8-face.dcm r
73 echo "expected  pixelType=8U SamplesPerPixel=3 PlanarConfiguration=1"
74 echo "          PhotometricInterpretation=PALETTE COLOR"
75 affim filein=OT-PAL-8-face.dcm.raw dimx=640 dimy=480 nbit=24
76
77 #YBR_FULL
78 #--------
79 testWrite FMAG0001.dcm r 
80 echo "expected pixelType=8U SamplesPerPixel=3"
81 echo "         PlanarConfiguration=1 PhotometricInterpretation=YBR_FULL"
82 echo "         nb Frames (DIMZ) : 1"
83 ls -l FMAG0001.dcm.raw
84 affim filein=FMAG0001.dcm.raw DIMX=768 DIMY=576 nbit=24
85
86
87 testWrite QMAG0001.dcm r 
88 echo "expected pixelType=8U SamplesPerPixel=3"
89 echo "         PlanarConfiguration=1 PhotometricInterpretation=YBR_FULL"
90 ls -l QMAG0001.dcm.raw
91 affim filein=QMAG0001.dcm.raw DIMX=384 DIMY=288 nbit=24;
92
93 # images from :
94 # http://www.leadtools.com/SDK/Medical/DICOM/ltdc19.htm
95 #------------------------------------------------------
96
97 testWrite 8BitsJpegLossyGrayScale.dcm r
98 affim filein=8BitsJpegLossyGrayScale.dcm.raw DIMX=800 DIMY=535 
99
100 testWrite 8BitsRunLengthColor.dcm r
101 affim filein=8BitsRunLengthColor.dcm.raw DIMX=800 DIMY=535  nbit=24
102
103 testWrite 8BitsRunLengthGrayScale.dcm r
104 affim filein=8BitsRunLengthGrayScale.dcm.raw DIMX=800 DIMY=535 
105
106 testWrite 8BitsUncompressedColor.dcm r
107 affim filein=8BitsUncompressedColor.dcm.raw DIMX=800 DIMY=535  nbit=24
108
109 testWrite 8BitsUncompressedGrayScale.dcm r
110 affim filein=8BitsUncompressedGrayScale.dcm.raw DIMX=800 DIMY=535 
111
112 testWrite 16BitsJpegLosslessGrayScale.dcm r
113 affim filein=16BitsJpegLosslessGrayScale.dcm.raw DIMX=800 DIMY=535 nbit=16
114
115 testWrite 16BitsRunLengthGrayScale.dcm r
116 echo "expected pixelType=16U SamplesPerPixel=1 PlanarConfiguration=2"
117 echo "         PhotometricInterpretation=MONOCHROME2"
118 affim filein=16BitsRunLengthGrayScale.dcm.raw  DIMX=800 DIMY=535 nbit=16
119
120 testWrite 16BitsUncompressedGrayScale.dcm r
121 affim filein=16BitsUncompressedGrayScale.dcm.raw DIMX=800 DIMY=535  nbit=16
122
123 testWrite 24BitsJpegLosslessColor.dcm r
124 echo "expected  DIMX=800 DIMY=535 DIMZ=1 "
125 echo "          pixelType=8U SamplesPerPixel=3 PlanarConfiguration=0"
126 echo "          PhotometricInterpretation=RGB "
127 affim filein=24BitsJpegLosslessColor.dcm.raw DIMX=800 DIMY=535  nbit=24
128
129 testWrite 24BitsJpegLossyColor.dcm r
130 affim filein=24BitsJpegLossyColor.dcm.raw DIMX=800 DIMY=535  nbit=24
131
132 testWrite 24BitsUncompressedColor.dcm r
133 affim filein=24BitsUncompressedColor.dcm.raw DIMX=800 DIMY=535 nbit=24
134
135
136
137