]> Creatis software - gdcmData.git/blob - checkWrite.sh
re-add some shell scripts to check read/write functions
[gdcmData.git] / checkWrite.sh
1 # Check WRITE
2 #-----------
3 #
4 # We rewrite DICOM Files
5 # and AFFIMDCM them to be sure the writting was OK
6 #
7
8 # WARNING : DO NOT use right now; some image names changed :-(
9
10
11 #No Swap Info
12 #------------
13 testWrite mr176621.dcm d
14 affimdcm filein=mr176621.dcm.DCM  # xmedcon OK
15
16 # No Transfert Syntax
17 #--------------------
18 testWrite cr172241.dcm d;
19 affimdcm filein=cr172241.dcm.DCM zoom=-4; #xmedcon OK
20                                           #Incorrect sequence length
21
22 testWrite cr_45031.dcm d ;
23 affimdcm filein=cr_45031.dcm.DCM zoom=-4 #OK
24
25 testWrite CR-MONO1-10-chest.dcm d;
26 affimdcm filein=CR-MONO1-10-chest.dcm.DCM  #OK
27
28 testWrite CT-MONO2-12-lomb-an2.acr2 d;
29 affimdcm filein=CT-MONO2-12-lomb-an2.acr2.DCM  #OK
30
31 testWrite gdcm-MR-SIEMENS-16.acr1 d;
32 affimdcm filein=gdcm-MR-SIEMENS-16.acr1.DCM  #OK
33
34 testWrite gdcm-MR-SIEMENS-16.acr2 d;
35 affimdcm filein=gdcm-MR-SIEMENS-16.acr2.DCM  #OK
36
37 testWrite MR-MONO2-12-an2.acr2 d;
38 affimdcm filein=MR-MONO2-12-an2.acr2.DCM;  #OK
39
40 testWrite MR-MONO2-12-angio-an1.acr1 d;
41 affimdcm filein=MR-MONO2-12-angio-an1.acr1.DCM 
42 echo " --- >12 bits stored, try AFFIM"
43 affimdcm filein=MR-MONO2-12-angio-an1.acr1.DCM bypassacr=1 dim=256 nbit=16 offset=820
44
45 testWrite newACR1000.nema d;
46 affimdcm filein=newACR1000.nema.DCM #OK
47
48 testWrite oldACR00001.ima d;
49 affimdcm filein=oldACR00001.ima.DCM #OK
50
51 testWrite OT-MONO2-8-a7.dcm d;
52 affimdcm filein=OT-MONO2-8-a7.dcm.DCM #OK, xmedcon OK
53
54 #RGB
55 testWrite US.3405.1.dcm d
56 affimdcm filein=US.3405.1.dcm.DCM # Nothing displayed
57 affimdcm filein=US.3405.1.dcm.DCM bypassacr=1 offset=1592 nbit=24 dimx=768 dimy=576                                          # seg fault                  
58 echo "expected : wrong color"
59          # breaks xmedcon 
60          # Incorrect PixelData length
61          # Incorrect sequence length
62          # seg fault 
63                                   
64 testWrite OT-PAL-8-face.dcm d
65 affimdcm filein=OT-PAL-8-face.dcm.DCM # nothing displayed
66 affimdcm filein=OT-PAL-8-face.dcm.DCM dimx=640 dimy=480 nbit=24 offset=1814 bypassacr=1
67   # breaks xmedcom 
68   # Incorrect PixelData Length
69   # Unexpected end of file
70   # wrong image                                
71                                       
72 testWrite 8BitsUncompressedColor.dcm d;
73 affimdcm filein=8BitsUncompressedColor.dcm.DCM 
74 #xmedcom : OK
75 # Incorrect OW value representation (fixed)
76 # awfull stuff after pixels
77
78 # Implicit VR - Little Endian
79 #-----------------------------
80 testWrite gdcm-US-ALOKA-16.dcm  d;
81 echo "expected : Gray image since 'Segmented xxx Palette Color LUT Data' not yet taken into account"
82 echo "neither e-film nor DicomWorks deals with the color"
83 affimdcm filein=gdcm-US-ALOKA-16.dcm.DCM 
84 #breaks xmedcon
85 # warning: Incorrect sequence length
86 # error: Missing CLUT
87 # error: No images found
88
89 testWrite CT-MONO2-16-ankle.dcm d;
90 affimdcm filein=CT-MONO2-16-ankle.dcm.DCM  #OK
91
92 testWrite CT-MONO2-16-ort.dcm d;
93 affimdcm filein=CT-MONO2-16-ort.dcm.DCM  #OK
94
95 testWrite CT-MONO2-8-abdo.dcm d; 
96 affimdcm filein=CT-MONO2-8-abdo.dcm.DCM  #OK
97
98 testWrite gdcm-MR-PHILIPS-16.dcm d;
99 affimdcm filein=gdcm-MR-PHILIPS-16.dcm.DCM  #OK
100
101 testWrite irmPhlipsNew1.dcm d;
102 affimdcm filein=irmPhlipsNew1.dcm.DCM   #OK
103
104 testWrite MR.6799.1.dcm d;
105 affimdcm filein=MR.6799.1.dcm.DCM   #OK
106
107 testWrite MR-MONO2-16-head.dcm d;
108 affimdcm filein=MR-MONO2-16-head.dcm   #OK
109
110 testWrite multiframe1Integris.dcm d;
111 affimdcm filein=multiframe1Integris.dcm.DCM 
112 affim filein=multiframe1.dcm.DCM dim=1024 nbit=16 offset=31457280 bypassacr=1 
113 testWrite multiframe2.dcm d;
114 affimdcm filein=multiframe2.dcm.DCM
115 testWrite test.acr d; #OK
116
117 affimdcm filein=test.acr.DCM
118 #avec imagette
119 testWrite icone.dcm d
120 echo "Hopeless till we stop considering the Tag as an identifier"
121 affimdcm filein=icone.dcm.DCM
122
123 #Explicit VR - Little Endian
124 #----------------------------
125 testWrite CT-MONO2-16-brain.dcm d;
126 affimdcm filein=CT-MONO2-16-brain.dcm.DCM  #OK
127
128 testWrite gdcm-CR-DCMTK-16-NonSamplePerPix.dcm d
129 testWrite gdcm-MR-PHILIPS-16-Multi-Seq.dcm d
130 testWrite gdcm-MR-PHILIPS-16-NonRectPix.dcm d
131 testWrite MR-MONO2-8-16x-heart.dcm d
132 testWrite NM-MONO2-16-13x-heart.dcm d
133 testWrite sonataMonaco.dcm d
134
135 #MultiFrame
136 testWrite US-MONO2-8-8x-execho.dcm d
137 affimdcm filein=US-MONO2-8-8x-execho.dcm.DCM  
138
139 #RGB
140 testWrite US-RGB-8-epicard.dcm d;
141 affimdcm filein=US-RGB-8-epicard.dcm.DCM  #OK xmedcon OK
142
143 testWrite US-RGB-8-esopecho.dcm d;
144 affimdcm filein=US-RGB-8-esopecho.dcm.DCM  #OK xmedcon OK
145
146 # Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])
147 #--------------------------------------------------------------------------
148 testWrite CT-MONO2-16-chest.dcm d;
149 affimdcm filein=CT-MONO2-16-chest.dcm.DCM #OK
150 # breaks xmedcom : black image
151 #warning: Incorrect PixelData length
152 #warning: Tag with uneven length
153 #error: Unexpected end of file
154
155 testWrite gdcm-JPEG-LossLess3a.dcm d;
156 affimdcm filein=gdcm-JPEG-LossLess3a.dcm.DCM
157
158 testWrite XA-MONO2-8-12x-catheter.dcm d
159 ls -l XA-MONO2-8-12x-catheter.dcm*   #wrong images with xmedcon
160 affimdcm filein=XA-MONO2-8-12x-catheter.dcm.DCM
161 affimdcm filein=XA-MONO2-8-12x-catheter.dcm.DCM dim=512 num=6  bypassacr=1
162 affimdcm filein=XA-MONO2-8-12x-catheter.dcm.DCM dim=512 num=11 bypassacr=1
163  
164 #JPEG Extended (Process 2 & 4) // 16 bits
165 #-----------------------------
166 testWrite gdcm-JPEG-Extended.dcm d
167 affimdcm filein=gdcm-JPEG-Extended.dcm.DCM #OK
168 #breaks xmedcon warning: Incorrect sequence length
169 #               warning: Incorrect PixelData length
170 #               error: Unexpected end of file
171
172
173 testWrite jpeglossy1.dcm d
174 affimdcm filein=jpeglossy1.dcm.DCM #OK
175 #breaks xmedcon warning: Incorrect sequence length
176 #               warning: Incorrect PixelData length
177 #               seg fault
178
179 testWrite philipsMR-lossy.ima d
180 affimdcm filein=philipsMR-lossy.ima.DCM #OK
181 # breaks xmedcom :
182 # Incorrect sequence length
183 # Incorrect PixelData length
184
185 #JPEG Baseline (Process 14)
186 #--------------------------
187 testWrite MR-MONO2-12-shoulder.dcm d
188 echo "expected : 'Unsupported JPEG process: SOF type 0xc3' on MR-MONO2-12-shoulder.dcm"
189 affimdcm filein=MR-MONO2-12-shoulder.dcm.DCM #OK
190 #breaks xmedcon warning: Incorrect PixelData length
191 #               warning: ITag with uneven length
192 #               error: Unexpected end of file
193
194
195 #fichier format ecat.
196 #testWrite imageEcat.ecat d
197
198 #JPEG Lossy 8 bits (to be checked with the right lib : modify jmorecfg.h, gdcmFile.cxx)
199 #=================
200 #JPEG Baseline (Process 1)
201 #--------------------------
202 # Bracco Files
203 testWrite US.1.2.dcm d;
204 affimdcm filein=US.1.2.dcm.DCM
205 affimdcm filein=US.1.2.dcm.DCM  DIMX=768 DIMY=576 nbit=24 bypassacr=1 num=3 offset=1592
206    # breaks xmedcon : Incorrect sequence length, 
207    #                  Unknown PhotometricInterpretation, 
208    #                  Incorrect PixelData length
209 testWrite US.1.3.dcm d
210 affimdcm filein=US.1.2.dcm.DCM  
211 #
212 testWrite CLIP0001.dcm d
213 affimdcm filein=CLIP0001.dcm.DCM
214 affimdcm filein=CLIP0001.dcm.DCM  DIMX=768 DIMY=576 nbit=24 bypassacr=1 num=2
215 affimdcm filein=CLIP0001.dcm.DCM  DIMX=768 DIMY=576 nbit=24 bypassacr=1 num=15
216 affimdcm filein=CLIP0001.dcm.DCM  DIMX=768 DIMY=576 nbit=24 bypassacr=1 num=31
217 affimdcm filein=CLIP0001.dcm.DCM  DIMX=768 DIMY=576 nbit=24 bypassacr=1 num=32
218
219
220 #RLE Lossless
221 #-------------
222 testWrite US-PAL-8-10x-echo.dcm d
223 testWrite canada.dcm d
224 testWrite FMAG0002.dcm d
225 testWrite QMAG0001.dcm d