6 # - gdcmreads the images of gdcmData
7 # - fwrite the pixels (an nothing more), into a '.RAW' file
8 # - affim them (you may replace affim by any 'Raw File' viewer)
10 # just to verify the ability of gdcm to 'extract' the pixels
15 gdcmTests testWrite mr176621.dcm r;
16 affim filein=mr176621.dcm.RAW DIMX=512 DIMY=512 nbit=16
21 gdcmTests testWrite cr172241.dcm r;
22 affim filein=cr172241.dcm.RAW DIMX=1792 DIMY=2392 nbit=16 zoom=-4
23 #0008,0200 (image location) wrongly stored
24 #0028,3006 (LUT Data) has a CTX VR
26 gdcmTests testWrite cr_45031.dcm r;
27 affim filein=cr_45031.dcm.RAW DIMX=1670 DIMY=2010 nbit=16 zoom=-4
29 gdcmTests testWrite CR-MONO1-10-chest.dcm r;
30 affim filein=CR-MONO1-10-chest.dcm.RAW DIMX=440 DIMY=440 nbit=16
32 gdcmTests testWrite CT-MONO2-12-lomb-an2.acr2 r;
33 affim filein=CT-MONO2-12-lomb-an2.acr2.RAW DIM=512 nbit=16
35 gdcmTests testWrite gdcm-MR-SIEMENS-16.acr1 r;
36 affim filein=gdcm-MR-SIEMENS-16.acr1.RAW DIMX=256 DIMY=256 nbit=16
38 gdcmTests testWrite gdcm-MR-SIEMENS-16.acr2 r;
39 affim filein=gdcm-MR-SIEMENS-16.acr2.RAW DIMX=512 DIMY=512 nbit=16
41 gdcmTests testWrite MR-MONO2-12-an2.acr2 r;
42 affim filein=MR-MONO2-12-an2.acr2.RAW DIMX=256 DIMY=256 nbit=16
44 gdcmTests testWrite newACR1000.nema r; # == gdcmMR-SIEMENS-16.acr2
45 affim filein=newACR1000.nema.RAW DIMX=512 DIMY=512 nbit=16
47 gdcmTests testWrite oldACR00001.ima r; # == gdcm-MR-SIEMENS.16.acr1
48 affim filein=oldACR00001.ima.RAW DIMX=256 DIMY=256 nbit=16
50 gdcmTests testWrite OT-MONO2-8-a7.dcm r;
51 affim filein=OT-MONO2-8-a7.dcm.RAW DIMX=512 DIMY=512
55 gdcmTests testWrite gdcm-CR-DCMTK-16-NonSamplePerPix.dcm r;
56 affim filein=gdcm-CR-DCMTK-16-NonSamplePerPix.dcm.RAW dim=750 nbit=8
58 #Unnormalized Rectangular LibIDO format image
59 #--------------------------------------------
60 gdcmTests testWrite gdcm-ACR-LibIDO.acr r;
61 affim filein=gdcm-ACR-LibIDO.acr.RAW dimx=512 dimy=301
63 #Bits Allocated =12, Bits Stored=12
64 #----------------------------------
65 #MR Philips (once upon a time in Lyon-Sud)
66 gdcmTests testWrite MR-MONO2-12-angio-an1.acr1 r;
67 affim filein=MR-MONO2-12-angio-an1.acr1.RAW dim=256 nbit=16
71 gdcmTests testWrite US.3405.1.dcm r;
72 echo "expected pixelType=8U SamplesPerPixel=1 PlanarConfiguration=0"
73 echo " PhotometricInterpretation=RGB"
74 affim filein=US.3405.1.dcm.RAW DIMX=768 DIMY=576 nbit=24
76 gdcmTests testWrite OT-PAL-8-face.dcm r;
77 echo "expected pixelType=8U SamplesPerPixel=3 PlanarConfiguration=1"
78 echo " PhotometricInterpretation=PALETTE COLOR"
79 affim filein=OT-PAL-8-face.dcm.RAW dimx=640 dimy=480 nbit=24
81 gdcmTests testWrite 8BitsUncompressedColor.dcm r;
82 affim filein=8BitsUncompressedColor.dcm.RAW dimx=800 dimy=535 nbit=24
84 # Implicit VR - Little Endian
85 #-----------------------------
87 gdcmTests testWrite CT-MONO2-16-ankle.dcm r;
88 affim filein=CT-MONO2-16-ankle.dcm.RAW DIMX=512 DIMY=512 nbit=16 signe=o
90 gdcmTests testWrite CT-MONO2-16-ort.dcm r;
91 affim filein=CT-MONO2-16-ort.dcm.RAW DIMX=512 DIMY=512 nbit=16 signe=o
93 gdcmTests testWrite CT-MONO2-8-abdo.dcm r;
94 affim filein=CT-MONO2-8-abdo.dcm.RAW DIMX=512 DIMY=512
96 gdcmTests testWrite gdcm-MR-PHILIPS-16.dcm r;
97 affim filein=gdcm-MR-PHILIPS-16.dcm.RAW DIMX=256 DIMY=256 nbit=16
99 gdcmTests testWrite MR-MONO2-16-head.dcm r;
100 affim filein=MR-MONO2-16-head.dcm.RAW dim=256 nbit=16 signe=o
102 gdcmTests testWrite multiframe1Integris.dcm r;
103 affim filein=multiframe1Integris.dcm.RAW dim=1024 nbit=16 zoom=-2
104 affim filein=multiframe1Integris.dcm.RAW dim=1024 nbit=16 offset=31457280 zoom=-2
106 gdcmTests testWrite multiframe2GE.dcm r;
107 affim filein=multiframe2GE.dcm.RAW dim=512
108 affim filein=multiframe2GE.dcm.RAW dim=512 offset=14417920
110 gdcmTests testWrite irmPhlipsNew1.dcm r; # == gdcm-MR-PHILIPS-16.dcm
111 affim DIMX=256 DIMY=256 filein=irmPhlipsNew1.dcm.RAW nbit=16
113 #avec imagette (icone)
115 gdcmTests testWrite icone.dcm r;
116 affim filein=icone.dcm bypassacr=1 dim=512 nbit=16 offset=18240
117 affim filein=icone.dcm dim=64 offset=13984 bypassacr=1
118 affim filein=icone.dcm.RAW dim=512 nbit=16
126 #Explicit VR - Little Endian
127 #----------------------------
128 gdcmTests testWrite CT-MONO2-16-brain.dcm r;
129 affim filein=CT-MONO2-16-brain.dcm.RAW DIMX=512 DIMY=512 nbit=16 signe=o
131 # 7 'first level' SeQuences , 140 'second level' SeQuences ?!?
132 gdcmTests testWrite gdcm-MR-PHILIPS-16-Multi-Seq.dcm r;
133 affim filein=gdcm-MR-PHILIPS-16-Multi-Seq.dcm.RAW DIMX=128 DIMY=128 nbit=16
134 PrintHeader gdcm-MR-PHILIPS-16-Multi-Seq.dcm 2
136 gdcmTests testWrite gdcm-MR-PHILIPS-16-NonRectPix.dcm r;
137 affim filein=gdcm-MR-PHILIPS-16-NonRectPix.dcm.RAW DIMX=160 DIMY=64 nbit=16
139 gdcmTests testWrite MR-MONO2-8-16x-heart.dcm r;
140 affim filein=MR-MONO2-8-16x-heart.dcm.RAW DIMX=256 DIMY=256
142 gdcmTests testWrite NM-MONO2-16-13x-heart.dcm r;
143 affim filein=NM-MONO2-16-13x-heart.dcm.RAW DIMX=64 DIMY=64 nbit=16
144 affim filein=NM-MONO2-16-13x-heart.dcm.RAW DIMX=64 DIMY=64 nbit=16 offset=98304
146 gdcmTests testWrite sonataMonaco.dcm r;
147 affim filein=sonataMonaco.dcm.RAW DIMX=256 DIMY=208 nbit=16
150 gdcmTests testWrite US-MONO2-8-8x-execho.dcm r;
151 affim filein=US-MONO2-8-8x-execho.dcm.RAW DIMX=128 DIMY=120
152 affim filein=US-MONO2-8-8x-execho.dcm.RAW DIMX=128 DIMY=120 offset=92160
156 gdcmTests testWrite US-RGB-8-epicard.dcm r;
157 echo "expected pixelType=8U SamplesPerPixel=3 PlanarConfiguration=1"
158 echo " PhotometricInterpretation=RGB"
159 affim filein=US-RGB-8-epicard.dcm.RAW dimx=640 dimy=480 nbit=24
161 gdcmTests testWrite US-RGB-8-esopecho.dcm r;
162 echo "expected pixelType=8U SamplesPerPixel=3 PlanarConfiguration=0"
163 echo " PhotometricInterpretation=RGB"
164 affim filein=US-RGB-8-esopecho.dcm.RAW dimx=256 dimy=120 nbit=24
166 # Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])
167 #--------------------------------------------------------------------------
170 gdcmTests testWrite CT-MONO2-16-chest.dcm r;
171 affim filein=CT-MONO2-16-chest.dcm.RAW dimx=512 dimy=400 nbit=16 signe=o
173 gdcmTests testWrite 012345.002.050.dcm r;
174 affim filein=012345.002.050.dcm.RAW dim=256 nbit=16
176 gdcmTests testWrite gdcm-JPEG-LossLess3a.dcm r;
177 affim filein=gdcm-JPEG-LossLess3a.dcm.RAW dim=512 nbit=16
179 gdcmTests testWrite XA-MONO2-8-12x-catheter.dcm r;
180 affim filein=XA-MONO2-8-12x-catheter.dcm.RAW dim=512;
181 affim filein=XA-MONO2-8-12x-catheter.dcm.RAW dim=512 offset=262144
182 affim filein=XA-MONO2-8-12x-catheter.dcm.RAW dim=512 offset=2883584
184 gdcmTests testWrite xa_integris.dcm r;
185 echo "a lot of fragments expected here"
186 affim filein=xa_integris.dcm.RAW dim=512
187 affim filein=xa_integris.dcm.RAW dim=512 offset=13107200
188 affim filein=xa_integris.dcm.RAW dim=512 offset=19660800
190 gdcmTests testWrite 16BitsJpegLosslessGrayScale.dcm r;
191 affim filein=16BitsJpegLosslessGrayScale.dcm.RAW DIMX=800 DIMY=535 nbit=16
193 #comming from GE dlx via VTServer
194 gdcmTests testWrite I9000001.dcm r;
195 affim filein=I9000001.dcm.RAW dim=512
196 affim filein=I9000001.dcm.RAW dim=512 offset=7864320
198 #JPEG Extended (Process 2 & 4) // 16 bits
199 #-----------------------------
200 gdcmTests testWrite gdcm-JPEG-Extended.dcm r;
201 affim filein=gdcm-JPEG-Extended.dcm.RAW dim=512 nbit=16
203 gdcmTests testWrite jpeglossy1.dcm r;
204 affim filein=jpeglossy1.dcm.RAW dim=512 nbit=16
206 #JPEG Baseline (Process 14)
207 #--------------------------
208 gdcmTests testWrite MR-MONO2-12-shoulder.dcm r;
209 affim filein=MR-MONO2-12-shoulder.dcm.RAW DIMX=1024 DIMY=1024 nbit=16
212 #fichier format ecat.
213 #gdcmTests testWrite imageEcat.ecat r
217 #JPEG Baseline (Process 1)
218 #-------------------------
220 gdcmTests testWrite US.1.2.dcm r;
221 echo "expected : A lot of Fragments (40), nb Frames = 40 ;-)"
222 echo "expected pixelType=8U SamplesPerPixel=3 PlanarConfiguration=0"
223 echo " PhotometricInterpretation=YBR_FULL_422"
224 affim filein=US.1.2.dcm.RAW DIMX=768 DIMY=576 nbit=24
225 affim filein=US.1.2.dcm.RAW DIMX=768 DIMY=576 nbit=24 offset=13271040
226 affim filein=US.1.2.dcm.RAW DIMX=768 DIMY=576 nbit=24 offset=39813120
229 gdcmTests testWrite CLIP0001-Sequoia-U11.dcm r;
230 echo "Troubles with 0018|6022[SL][Reference Pixel Y(0)] [4294967177] x(7fffffff)"
232 affim filein=CLIP0001-Sequoia-U11.dcm.RAW DIMX=768 DIMY=576 nbit=24
233 affim filein=CLIP0001-Sequoia-U11.dcm.RAW DIMX=768 DIMY=576 nbit=24 offset=1327104
234 affim filein=CLIP0001-Sequoia-U11.dcm.RAW DIMX=768 DIMY=576 nbit=24 offset=13271040
235 affim filein=CLIP0001-Sequoia-U11.dcm.RAW DIMX=768 DIMY=576 nbit=24 offset=26542080
239 gdcmTests testWrite canadaAloka.dcm r;
240 echo "expected pixelType=8U SamplesPerPixel=1"
241 echo " PlanarConfiguration=0 PhotometricInterpretation=MONOCHROME2"
242 echo " nb Frames (DIMZ) : 1"
243 affim filein=canadaAloka.dcm.RAW DIMX=608 DIMY=420
245 gdcmTests testWrite FMAG0001.dcm r;
246 echo "expected pixelType=8U SamplesPerPixel=3"
247 echo " PlanarConfiguration=1 PhotometricInterpretation=YBR_FULL"
248 echo " nb Frames (DIMZ) : 1"
249 affim filein=FMAG0001.dcm.RAW DIMX=768 DIMY=576 nbit=24
251 gdcmTests testWrite QMAG0001.dcm r;
252 echo "expected pixelType=8U SamplesPerPixel=3"
253 echo " PlanarConfiguration=1 PhotometricInterpretation=YBR_FULL"
254 affim filein=QMAG0001.dcm.RAW DIMX=384 DIMY=288 nbit=24;
256 gdcmTests testWrite US-PAL-8-10x-echo.dcm r;
257 echo "expected pixelType=8U SamplesPerPixel=1 PlanarConfiguration=0"
258 echo " PhotometricInterpretation=PALETTE COLOR"
259 echo " nb Frames (DIMZ): 10"
260 echo "expected : Parsing 10 'single fragment' Segments"
261 echo " Reading 10 'single fragment' Segments (ouf!)"
262 affim filein=US-PAL-8-10x-echo.dcm.RAW DIMX=600 DIMY=430 nbit=24
263 affim filein=US-PAL-8-10x-echo.dcm.RAW DIMX=600 DIMY=430 nbit=24 offset=774000
264 affim filein=US-PAL-8-10x-echo.dcm.RAW DIMX=600 DIMY=430 nbit=24 offset=1548000
265 affim filein=US-PAL-8-10x-echo.dcm.RAW DIMX=600 DIMY=430 nbit=24 offset=6966000
267 gdcmTests testWrite 8BitsRunLengthGrayScale.dcm r;
268 echo "expected : correct Gray image"
269 affim filein=8BitsRunLengthGrayScale.dcm.RAW DIMX=800 DIMY=535
271 gdcmTests testWrite 8BitsRunLengthColor.dcm r;
272 echo "expected pixelType=8U SamplesPerPixel=1 PlanarConfiguration=2"
273 echo " PhotometricInterpretation=PALETTE COLOR"
274 echo "expected correct color image"
275 affim filein=8BitsRunLengthColor.dcm.RAW DIMX=800 DIMY=535 nbit=24
277 #RLE 16 bits --> Try to find some more images
279 gdcmTests testWrite 16BitsRunLengthGrayScale.dcm r;
280 echo "expected pixelType=16U SamplesPerPixel=1 PlanarConfiguration=0"
281 echo " PhotometricInterpretation=MONOCHROME2"
282 affim filein=16BitsRunLengthGrayScale.dcm.RAW DIMX=800 DIMY=535 nbit=16
284 #Were supposed to be bugged
285 #--------------------------
288 gdcmTests testWrite 00191113.dcm r;
289 affim filein=00191113.dcm.RAW DIMX=512 DIMY=512
290 affim filein=00191113.dcm.RAW DIMX=512 DIMY=512 offset=786432
292 gdcmTests testWrite DermaColorLossLess.dcm r;
293 affim filein=DermaColorLossLess.dcm.RAW DIMX=117 DIMY=181 nbit=24
295 gdcmTests testWrite RadBWLossLess.dcm r;
296 affim filein=RadBWLossLess.dcm.RAW DIMX=136 DIMY=92 nbit=16
298 gdcmTests testWrite Wrist.pap r
299 affim filein=Wrist.pap.RAW nbit=16 dimx=720 dimy=360
304 #Rectangular old 24 Bits image
305 gdcmTests testWrite gdcm-RGB-LibIDORect.acr r;
306 affim filein=gdcm-RGB-LibIDORect.acr.RAW DIMX=400 DIMY=100 nbit=24
308 #MR GE GENESIS_SIGNA Palo Alto
309 gdcmTests testWrite DicomSampleNastyGEImage.dcm r;
310 echo "WAS expected : wrong lenth (13) for 0008|103e"
311 affim filein=DicomSampleNastyGEImage.dcm.RAW DIMX=256 DIMY=256 nbit=16
313 #MR Philips NTSCAN Hop. Neuro Lyon
314 gdcmTests testWrite philipsMR-lossy.ima r;
315 echo "WAS expected : 'Bogus Huffman table definition' on philipsMR-lossy.ima"
316 echo "IS expected : 'JERR_BAD_HUFF_TABLE sym 16 (>15') but the show goes on"
317 echo "breaks xmedcon"
318 affim filein=philipsMR-lossy.ima.RAW dim=512 nbit=16
320 #CT Siemens Hop. Salengro Lille
321 gdcmTests testWrite gdcm-JPEG-LossLess3a.dcm r;
322 echo "expected : wrong sequence delimiter (b00c,0eb6) at end of pixels";
323 echo "xmedcon says 'error: Unexpected end of file'"
324 affim filein=gdcm-JPEG-LossLess3a.dcm.RAW dim=512 nbit=16
325 vtkgdcmViewer gdcm-JPEG-LossLess3a.dcm
327 #CR Philips Thoravision Hop Cardio Lyon
328 gdcmTests testWrite gdcm-JPEG-LossLessThoravision.dcm r;
329 echo "expected : 147 fragments,length : 29860 + 145*32760 + 14416"
330 echo "breaks xmedcom, breaks e-film"
331 echo "WAS expected : hashed image -with jLBJpeg-"
332 echo "IS expected : Seg Fault"
333 affim filein=gdcm-JPEG-LossLessThoravision.dcm.RAW DIMX=1876 DIMY=2076 nbit=16
335 #MR Picker ST. ANTHONY HOSPITAL
336 gdcmTests testWrite MR.6799.1.dcm r;
337 echo "OK; DICOM Image with NO Preamble"
338 affim filein=MR.6799.1.dcm.RAW dim=512 nbit=16
340 #Segmented Palette Color LUT Data
341 gdcmTests testWrite gdcm-US-ALOKA-16.dcm r;
342 echo "expected pixelType=16U SamplesPerPixel=1 PlanarConfiguration=0"
343 echo " PhotometricInterpretation=PALETTE COLOR"
344 echo "expected : Gray image since 'Segmented xxx Palette Color LUT Data' not yet taken into account"
345 echo "neither e-film nor DicomWorks deals with the color"
346 echo "breaks xmedcom"
347 echo "breaks vtkgdcmViewer (bad result : 24 bits expected; 16 found in Pixels area)"
348 vtkgdcmViewer gdcm-US-ALOKA-16.dcm
349 affim dimx=640 dimy=480 filein=gdcm-US-ALOKA-16.dcm.RAW nbit=16
351 # bugged Siemens 'Leonardo' image
352 gdcmTests testWrite 8078283Leonardo.dcm r;
353 affim filein=8078283Leonardo.dcm.RAW dim=512 nbit=16
355 #CT McTwin Elscint C.H.R.U LILLE C.HURIEZ
356 gdcmTests testWrite MxTwinLossLess.dcm r;
357 affim filein=MxTwinLossLess.dcm.RAW DIMX=512 DIMY=512 nbit=16
359 # MRI image from VPRO burned CD
360 gdcmTests testWrite mriThruVPRO.dcm r;
361 affim filein=mriThruVPRO.dcm.RAW DIMX=256 DIMY=256 nbit=16
362 echo "expected : tasteless SHIT !"
363 echo "breaks Siemens Leonardo viewer . JPEG encoding is bugged?"
365 # gdcm made Theralys image
366 # due to H table, a SeQuence is tagged with 0 length
367 # when using gdcmFile::WriteDcmXXX
368 gdcmTests testWrite fromTheralys.dcm r;
369 affim filein=fromTheralys.dcm.RAW dim=256 nbit=16