+testWrite canadaAloka.dcm x;
+echo "expected pixelType=8U SamplesPerPixel=1"
+echo " PlanarConfiguration=0 PhotometricInterpretation=MONOCHROME2"
+echo " nb Frames (DIMZ) : 1"
+xmedcon canadaAloka.dcm.XDCM
+testWrite jpeglossy1.dcm x;
+
+testWrite FMAG0001.dcm x;
+echo "expected pixelType=8U SamplesPerPixel=3"
+echo " PlanarConfiguration=1 PhotometricInterpretation=YBR_FULL"
+echo " nb Frames (DIMZ) : 1"
+xmedcon FMAG0001.dcm.XDCM
+
+testWrite QMAG0001.dcm x;
+echo "expected pixelType=8U SamplesPerPixel=3"
+echo " PlanarConfiguration=1 PhotometricInterpretation=YBR_FULL"
+affim filein=QMAG0001.dcm.XDCM DIMX=384 DIMY=288 nbit=24;
+
+testWrite US-PAL-8-10x-echo.dcm x;
+echo "expected pixelType=8U SamplesPerPixel=1 PlanarConfiguration=0"
+echo " PhotometricInterpretation=PALETTE COLOR"
+echo " nb Frames (DIMZ): 10"
+echo "expected : Parsing 10 'single fragment' Segments"
+echo " Reading 10 'single fragment' Segments (ouf!)"
+affim filein=US-PAL-8-10x-echo.dcm.XDCM DIMX=600 DIMY=430 nbit=24
+affim filein=US-PAL-8-10x-echo.dcm.XDCM DIMX=600 DIMY=430 nbit=24 offset=774000
+affim filein=US-PAL-8-10x-echo.dcm.XDCM DIMX=600 DIMY=430 nbit=24 offset=1548000
+affim filein=US-PAL-8-10x-echo.dcm.XDCM DIMX=600 DIMY=430 nbit=24 offset=6966000
+
+testWrite 8BitsRunLengthGrayScale.dcm x;
+echo "expected : correct Gray image"
+affim filein=8BitsRunLengthGrayScale.dcm.XDCM DIMX=800 DIMY=535
+
+testWrite 8BitsRunLengthColor.dcm x;
+echo "expected pixelType=8U SamplesPerPixel=1 PlanarConfiguration=2"
+echo " PhotometricInterpretation=PALETTE COLOR"
+echo "expected correct color image"
+affim filein=8BitsRunLengthColor.dcm.XDCM DIMX=800 DIMY=535 nbit=24
+
+#RLE 16 bits --> Try to find some more images
+
+testWrite 16BitsRunLengthGrayScale.dcm x;
+echo "expected pixelType=16U SamplesPerPixel=1 PlanarConfiguration=0"
+echo " PhotometricInterpretation=MONOCHROME2"
+affim filein=16BitsRunLengthGrayScale.dcm.XDCM DIMX=800 DIMY=535 nbit=16
+
+#Were supposed to be bugged
+#--------------------------
+#(break xmedcon)
+
+testWrite 00191113.dcm x;
+#OK
+xmedcon 00191113.dcm.XDCM
+
+
+testWrite DermaColorLossLess.dcm x;
+#breaks xmedcon
+ xmedcon DermaColorLossLess.dcm.XDCM
+#Feb 02 19:33:16 log[2619]: warning: Tag with uneven length
+#Feb 02 19:33:16 log[2619]: warning: No transfer syntax found
+#Feb 02 19:33:16 log[2619]: error: No images found
+# v : OK
+v DermaColorLossLess.dcm.XDCM
+
+#Original breaks xmedcon
+xmedcon RadBWLossLess.dcm;
+testWrite RadBWLossLess.dcm x;
+#No pixel found
+v RadBWLossLess.dcm.XDCM;
+xmedcon RadBWLossLess.dcm.XDCM;
+
+#Known as BUGGED !
+#----------------
+
+#Rectangular old 24 Bits image
+testWrite gdcm-RGB-LibIDORect.acr x;
+v gdcm-RGB-LibIDORect.acr.XDCM
+
+#MR GE GENESIS_SIGNA Palo Alto
+testWrite DicomSampleNastyGEImage.dcm x;
+echo " expected : warning uneven length (13) for 0008|103e"
+xdedcon DicomSampleNastyGEImage.dcm.XDCM
+
+#MR Philips NTSCAN Hop. Neuro Lyon
+testWrite philipsMR-lossy.ima x;
+echo "WAS expected : 'Bogus Huffman table definition' on philipsMR-lossy.ima"
+echo "IS expected : 'JERR_BAD_HUFF_TABLE sym 16 (>15') but the show goes on"
+echo "breaks xmedcon"
+affim filein=philipsMR-lossy.ima.XDCM dim=512 nbit=16
+
+#CT Siemens Hop. Salengro Lille
+testWrite gdcm-JPEG-LossLess3a.dcm x;
+echo "expected : wrong sequence delimiter (b00c,0eb6) at end of pixels";
+echo "xmedcon says 'error: Unexpected end of file'"
+affim filein=gdcm-JPEG-LossLess3a.dcm.XDCM dim=512 nbit=16
+vtkgdcmViewer gdcm-JPEG-LossLess3a.dcm
+
+#CR Philips Thoravision Hop Cardio Lyon
+testWrite gdcm-JPEG-LossLessThoravision.dcm x;
+echo "expected : 147 fragments,length : 29860 + 145*32760 + 14416"
+echo "breaks xmedcom, breaks e-film"
+echo "WAS expected : hashed image -with jLBJpeg-"
+echo "IS expected : Seg Fault"
+affim filein=gdcm-JPEG-LossLessThoravision.dcm.XDCM DIMX=1876 DIMY=2076 nbit=16
+
+#MR Picker ST. ANTHONY HOSPITAL
+testWrite MR.6799.1.dcm x;
+echo "OK; DICOM Image with NO Preamble"
+affim filein=MR.6799.1.dcm.XDCM dim=512 nbit=16
+
+#Segmented Palette Color LUT Data
+testWrite gdcm-US-ALOKA-16.dcm x;
+echo "expected pixelType=16U SamplesPerPixel=1 PlanarConfiguration=0"
+echo " PhotometricInterpretation=PALETTE COLOR"
+echo "expected : Gray image since 'Segmented xxx Palette Color LUT Data' not yet taken into account"
+echo "neither e-film nor DicomWorks deals with the color"
+echo "breaks xmedcom"
+echo "breaks vtkgdcmViewer (bad result : 24 bits expected; 16 found in Pixels area)"
+vtkgdcmViewer gdcm-US-ALOKA-16.dcm
+affim dimx=640 dimy=480 filein=gdcm-US-ALOKA-16.dcm.XDCM nbit=16
+
+# bugged Siemens 'Leonardo' image
+testWrite 8078283Leonardo.dcm x;
+affim filein=8078283Leonardo.dcm.XDCM dim=512 nbit=16
+
+#CT McTwin Elscint C.H.R.U LILLE C.HURIEZ
+testWrite MxTwinLossLess.dcm x;
+affim filein=MxTwinLossLess.dcm.XDCM DIMX=512 DIMY=512 nbit=16
+
+# MRI image from VPRO burned CD
+testWrite mriThruVPRO.dcm x;
+affim filein=mriThruVPRO.dcm.XDCM DIMX=256 DIMY=256 nbit=16
+echo "expected : tasteless SHIT !"
+echo "breaks Siemens Leonardo viewer . JPEG encoding is bugged?"
+
+# gdcm made Theralys image
+# due to H table, a SeQuence is tagged with 0 length
+# when using gdcmFile::WriteDcmXXX
+testWrite fromTheralys.dcm x;
+affim filein=fromTheralys.dcm.XDCM dim=256 nbit=16