]> Creatis software - gdcmData.git/commitdiff
re-add some shell scripts to check read/write functions
authorjpr <jpr>
Mon, 3 Nov 2003 11:22:47 +0000 (11:22 +0000)
committerjpr <jpr>
Mon, 3 Nov 2003 11:22:47 +0000 (11:22 +0000)
checkRead.sh [new file with mode: 0644]
checkReadColor.sh [new file with mode: 0644]
checkWrite.sh [new file with mode: 0644]
checkvtkgdcmViewer.sh [new file with mode: 0644]

diff --git a/checkRead.sh b/checkRead.sh
new file mode 100644 (file)
index 0000000..fe4edfb
--- /dev/null
@@ -0,0 +1,350 @@
+# Check READ
+#-----------
+#
+# We just write RAW Files and AFFIM them
+# to be sure the reading was OK
+#
+
+#No Swap Info
+#------------
+testWrite mr176621.dcm r;
+affim filein=mr176621.dcm.raw DIMX=512 DIMY=512 nbit=16
+
+# No Transfert Syntax
+#--------------------
+testWrite cr172241.dcm r;
+affim filein=cr172241.dcm.raw DIMX=1792 DIMY=2392 nbit=16 zoom=-4
+
+testWrite cr_45031.dcm r                                   
+affim filein=cr_45031.dcm.raw  DIMX=1670 DIMY=2010 nbit=16 zoom=-4
+
+testWrite CR-MONO1-10-chest.dcm r
+affim filein=CR-MONO1-10-chest.dcm.raw  DIMX=440 DIMY=440 nbit=16
+
+testWrite CT-MONO2-12-lomb-an2.acr2 r
+affim filein=CT-MONO2-12-lomb-an2.acr2.raw DIM=512 nbit=16
+
+testWrite gdcm-MR-SIEMENS-16.acr1 r
+affim filein=gdcm-MR-SIEMENS-16.acr1.raw DIMX=256 DIMY=256 nbit=16
+
+testWrite gdcm-MR-SIEMENS-16.acr2 r
+affim filein=gdcm-MR-SIEMENS-16.acr2.raw  DIMX=512 DIMY=512 nbit=16
+
+testWrite MR-MONO2-12-an2.acr2 r
+affim filein=MR-MONO2-12-an2.acr2.raw DIMX=256 DIMY=256 nbit=16
+
+testWrite newACR1000.nema r          # == gdcmMR-SIEMENS-16.acr2
+affim filein=newACR1000.nema.raw DIMX=512 DIMY=512 nbit=16
+
+testWrite oldACR00001.ima r          # == gdcm-MR-SIEMENS.16.acr1
+affim filein=oldACR00001.ima.raw DIMX=256 DIMY=256 nbit=16
+
+testWrite OT-MONO2-8-a7.dcm r
+affim filein=OT-MONO2-8-a7.dcm.raw  DIMX=512 DIMY=512
+
+#No Samples Per Pixel
+#--------------------
+testWrite gdcm-CR-DCMTK-16-NonSamplePrPix.dcm r
+affim filein=gdcm-CR-DCMTK-16-NonSamplePrPix.dcm dim=750 nbit=8
+
+#Unnormalized Rectangular LibIDO format image
+#--------------------------------------------
+testWrite gdcm-ACR-LibIDO.acr r
+affim filein=gdcm-ACR-LibIDO.acr.raw dimx=512 dimy=301
+
+#Bits Allocated =12, Bits Stored=12
+#----------------------------------
+#MR Philips (once upon a time in Lyon-Sud)
+testWrite MR-MONO2-12-angio-an1.acr1 r
+affim filein=MR-MONO2-12-angio-an1.acr1.raw dim=256 nbit=16
+
+#RGB
+#---
+testWrite US.3405.1.dcm r                    
+echo "expected  pixelType=8U SamplesPerPixel=1 PlanarConfiguration=0"
+echo "          PhotometricInterpretation=RGB"
+affim filein=US.3405.1.dcm.raw DIMX=768 DIMY=576 nbit=24
+
+testWrite OT-PAL-8-face.dcm r
+echo "expected  pixelType=8U SamplesPerPixel=3 PlanarConfiguration=1"
+echo "          PhotometricInterpretation=PALETTE COLOR"
+affim filein=OT-PAL-8-face.dcm.raw dimx=640 dimy=480 nbit=24
+
+testWrite 8BitsUncompressedColor.dcm r
+affim filein=8BitsUncompressedColor.dcm.raw dimx=800 dimy=535 nbit=24
+
+# Implicit VR - Little Endian
+#-----------------------------
+
+testWrite CT-MONO2-16-ankle.dcm r
+ affim filein=CT-MONO2-16-ankle.dcm.raw DIMX=512 DIMY=512 nbit=16 signe=o
+
+testWrite CT-MONO2-16-ort.dcm r
+affim filein=CT-MONO2-16-ort.dcm.raw DIMX=512 DIMY=512 nbit=16 signe=o
+
+testWrite CT-MONO2-8-abdo.dcm r
+affim filein=CT-MONO2-8-abdo.dcm.raw DIMX=512 DIMY=512
+
+testWrite gdcm-MR-PHILIPS-16.dcm r
+affim filein=gdcm-MR-PHILIPS-16.dcm.raw  DIMX=256 DIMY=256 nbit=16
+
+testWrite MR-MONO2-16-head.dcm r
+affim filein=MR-MONO2-16-head.dcm.raw dim=256 nbit=16 signe=o
+
+testWrite multiframe1Integris.dcm r
+affim filein=multiframe1Integris.dcm.raw dim=1024 nbit=16 zoom=-2
+affim filein=multiframe1Integris.dcm.raw dim=1024 nbit=16 offset=31457280 zoom=-2
+
+testWrite multiframe2GE.dcm r
+affim filein=multiframe2GE.dcm.raw dim=512
+affim filein=multiframe2GE.dcm.raw dim=512 offset=14417920
+
+testWrite irmPhlipsNew1.dcm r # == gdcm-MR-PHILIPS-16.dcm
+affim DIMX=256 DIMY=256 filein=irmPhlipsNew1.dcm.raw nbit=16
+
+#avec imagette (icone)
+
+testWrite icone.dcm r
+echo "Hopeless till we stop considering the Tag as an identifier inside the Header"
+echo "The Tag is an identifier inside the *Dicom Dictionnary* only"
+affim filein=icone.dcm bypassacr=1 dim=512 nbit=16 offset=18240
+affim filein=icone.dcm dim=64 offset=13984 bypassacr=1
+affim filein=icone.dcm.raw dim=512 nbit=16
+
+#Palette
+
+# ???
+# 8 Bits  ?
+# 16 Bits ?
+
+#Explicit VR - Little Endian
+#----------------------------
+testWrite CT-MONO2-16-brain.dcm r
+affim filein=CT-MONO2-16-brain.dcm.raw  DIMX=512 DIMY=512 nbit=16 signe=o
+
+testWrite gdcm-MR-PHILIPS-16-Multi-Seq.dcm r
+affim filein=gdcm-MR-PHILIPS-16-Multi-Seq.dcm.raw  DIMX=128 DIMY=128 nbit=16
+
+testWrite gdcm-MR-PHILIPS-16-NonRectPix.dcm r
+affim filein=gdcm-MR-PHILIPS-16-NonRectPix.dcm.raw DIMX=160 DIMY=64 nbit=16
+
+testWrite MR-MONO2-8-16x-heart.dcm r
+affim filein=MR-MONO2-8-16x-heart.dcm.raw DIMX=256 DIMY=256
+
+testWrite NM-MONO2-16-13x-heart.dcm r
+affim filein=NM-MONO2-16-13x-heart.dcm.raw  DIMX=64 DIMY=64 nbit=16
+affim filein=NM-MONO2-16-13x-heart.dcm.raw  DIMX=64 DIMY=64 nbit=16 offset=98304
+
+testWrite sonataMonaco.dcm r
+affim filein=sonataMonaco.dcm.raw DIMX=256 DIMY=208 nbit=16
+
+#MultiFrame
+testWrite US-MONO2-8-8x-execho.dcm r
+affim filein=US-MONO2-8-8x-execho.dcm.raw  DIMX=128 DIMY=120 
+affim filein=US-MONO2-8-8x-execho.dcm.raw  DIMX=128 DIMY=120 offset=92160
+
+#RGB
+
+testWrite US-RGB-8-epicard.dcm r
+echo "expected pixelType=8U SamplesPerPixel=3 PlanarConfiguration=1"
+echo "         PhotometricInterpretation=RGB"
+affim filein=US-RGB-8-epicard.dcm.raw  dimx=640 dimy=480 nbit=24
+
+testWrite US-RGB-8-esopecho.dcm r
+echo "expected pixelType=8U SamplesPerPixel=3 PlanarConfiguration=0"
+echo "         PhotometricInterpretation=RGB"
+affim filein=US-RGB-8-esopecho.dcm.raw dimx=256 dimy=120 nbit=24
+
+# Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])
+#--------------------------------------------------------------------------
+# (JPEG Lossless)
+
+testWrite CT-MONO2-16-chest.dcm r;
+affim filein=CT-MONO2-16-chest.dcm.raw dimx=512 dimy=400 nbit=16 signe=o
+
+testWrite 012345.002.050.dcm r
+affim filein=012345.002.050.dcm.raw dim=256 nbit=16
+
+testWrite gdcm-JPEG-LossLess3a.dcm r;
+affim filein=gdcm-JPEG-LossLess3a.dcm.raw dim=512 nbit=16
+
+testWrite XA-MONO2-8-12x-catheter.dcm r;
+affim filein=XA-MONO2-8-12x-catheter.dcm.raw dim=512;
+affim filein=XA-MONO2-8-12x-catheter.dcm.raw dim=512 offset=262144
+affim filein=XA-MONO2-8-12x-catheter.dcm.raw dim=512 offset=2883584
+
+testWrite xa_integris.dcm r;
+echo "a lot of fragments expected here"
+affim filein=xa_integris.dcm.raw dim=512
+affim filein=xa_integris.dcm.raw dim=512 offset=13107200
+affim filein=xa_integris.dcm.raw dim=512 offset=19660800
+
+testWrite 16BitsJpegLosslessGrayScale.dcm r
+affim filein=16BitsJpegLosslessGrayScale.dcm.raw DIMX=800 DIMY=535 nbit=16
+
+#comming from GE dlx via VTServer
+testWrite I9000001.dcm r
+affim filein=I9000001.dcm.raw dim=512 
+affim filein=I9000001.dcm.raw dim=512 offset=7864320
+
+#JPEG Extended (Process 2 & 4) // 16 bits
+#-----------------------------
+testWrite gdcm-JPEG-Extended.dcm r;
+affim filein=gdcm-JPEG-Extended.dcm.raw  dim=512 nbit=16
+
+testWrite jpeglossy1.dcm r;
+affim filein=jpeglossy1.dcm.raw dim=512 nbit=16
+
+#JPEG Baseline (Process 14)
+#--------------------------
+testWrite MR-MONO2-12-shoulder.dcm r  
+affim filein=MR-MONO2-12-shoulder.dcm.raw DIMX=1024 DIMY=1024 nbit=16
+
+
+#fichier format ecat.
+#testWrite imageEcat.ecat r
+
+#JPEG Lossy 8 bits 
+#=================
+#JPEG Baseline (Process 1)
+#-------------------------
+# Bracco Files
+testWrite US.1.2.dcm r
+echo "expected : A lot of Fragments (40), nb Frames = 40 ;-)"
+echo "expected  pixelType=8U SamplesPerPixel=3 PlanarConfiguration=0"
+echo "          PhotometricInterpretation=YBR_FULL_422"
+affim filein=US.1.2.dcm.raw  DIMX=768 DIMY=576  nbit=24
+affim filein=US.1.2.dcm.raw  DIMX=768 DIMY=576  nbit=24 offset=13271040
+affim filein=US.1.2.dcm.raw  DIMX=768 DIMY=576  nbit=24 offset=39813120
+
+#Sequoia Acusson U11
+testWrite CLIP0001-Sequoia-U11.dcm r
+affim filein=CLIP0001-Sequoia-U11.dcm.raw  DIMX=768 DIMY=576  nbit=24
+affim filein=CLIP0001-Sequoia-U11.dcm.raw  DIMX=768 DIMY=576  nbit=24 offset=1327104
+affim filein=CLIP0001-Sequoia-U11.dcm.raw  DIMX=768 DIMY=576  nbit=24 offset=13271040
+affim filein=CLIP0001-Sequoia-U11.dcm.raw  DIMX=768 DIMY=576  nbit=24 offset=26542080
+
+#RLE Lossless
+#-------------
+testWrite canadaAloka.dcm r
+echo "expected pixelType=8U SamplesPerPixel=1"
+echo "         PlanarConfiguration=0 PhotometricInterpretation=MONOCHROME2"
+echo "         nb Frames (DIMZ) : 1"
+affim filein=canadaAloka.dcm.raw DIMX=608 DIMY=420
+
+testWrite FMAG0001.dcm r 
+echo "expected pixelType=8U SamplesPerPixel=3"
+echo "         PlanarConfiguration=1 PhotometricInterpretation=YBR_FULL"
+echo "         nb Frames (DIMZ) : 1"
+affim filein=FMAG0001.dcm.raw DIMX=768 DIMY=576 nbit=24
+
+testWrite QMAG0001.dcm r 
+echo "expected pixelType=8U SamplesPerPixel=3"
+echo "         PlanarConfiguration=1 PhotometricInterpretation=YBR_FULL"
+affim filein=QMAG0001.dcm.raw DIMX=384 DIMY=288 nbit=24;
+
+testWrite US-PAL-8-10x-echo.dcm r
+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.raw DIMX=600 DIMY=430 nbit=24
+affim filein=US-PAL-8-10x-echo.dcm.raw DIMX=600 DIMY=430 nbit=24 offset=774000
+affim filein=US-PAL-8-10x-echo.dcm.raw DIMX=600 DIMY=430 nbit=24 offset=1548000
+affim filein=US-PAL-8-10x-echo.dcm.raw DIMX=600 DIMY=430 nbit=24 offset=6966000
+
+testWrite 8BitsRunLengthGrayScale.dcm r
+echo "expected : correct Gray image"
+affim filein=8BitsRunLengthGrayScale.dcm.raw DIMX=800 DIMY=535
+
+testWrite 8BitsRunLengthColor.dcm r
+echo "expected pixelType=8U SamplesPerPixel=1 PlanarConfiguration=2"
+echo "         PhotometricInterpretation=PALETTE COLOR"
+echo "expected correct color image"
+affim filein=8BitsRunLengthColor.dcm.raw DIMX=800 DIMY=535 nbit=24
+
+#RLE 16 bits --> Try to find some more images
+
+testWrite 16BitsRunLengthGrayScale.dcm r
+echo "expected pixelType=16U SamplesPerPixel=1 PlanarConfiguration=0"
+echo "         PhotometricInterpretation=MONOCHROME2"
+affim filein=16BitsRunLengthGrayScale.dcm.raw  DIMX=800 DIMY=535 nbit=16
+
+#Were supposed to be bugged
+#--------------------------
+#(break xmedcon)
+
+testWrite 00191113.dcm r
+affim filein=00191113.dcm.raw DIMX=512 DIMY=512 
+affim filein=00191113.dcm.raw DIMX=512 DIMY=512 offset=786432
+
+testWrite DermaColorLossLess.dcm r
+affim filein=DermaColorLossLess.dcm.raw DIMX=117 DIMY=181 nbit=24
+
+testWrite RadBWLossLess.dcm r
+affim filein=RadBWLossLess.dcm.raw  DIMX=136 DIMY=92 nbit=16
+
+#Known as BUGGED !
+#----------------
+
+#Rectangular old 24 Bits image
+testWrite gdcm-RGB-LibIDORect.acr r
+affim filein=gdcm-RGB-LibIDORect.acr.raw  DIMX=400 DIMY=100 nbit=24
+
+#MR GE GENESIS_SIGNA Palo Alto
+testWrite DicomSampleNastyGEImage.dcm r
+echo "WAS expected : wrong lenth (13) for 0008|103e"
+affim filein=DicomSampleNastyGEImage.dcm.raw DIMX=256 DIMY=256 nbit=16 
+
+#MR Philips NTSCAN Hop. Neuro Lyon
+testWrite philipsMR-lossy.ima r;
+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.raw dim=512 nbit=16
+
+#CT Siemens Hop. Salengro Lille
+testWrite gdcm-JPEG-LossLess3a.dcm r;
+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.raw dim=512 nbit=16
+vtkgdcmViewer gdcm-JPEG-LossLess3a.dcm    
+
+#CR Philips Thoravision Hop Cardio Lyon
+testWrite gdcm-JPEG-LossLessThoravision.dcm r
+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.raw DIMX=1876 DIMY=2076 nbit=16
+
+#MR Picker ST. ANTHONY HOSPITAL
+testWrite MR.6799.1.dcm r
+echo "OK; DICOM Image with NO Preamble"
+affim filein=MR.6799.1.dcm.raw dim=512 nbit=16
+
+#Segmented Palette Color LUT Data
+testWrite gdcm-US-ALOKA-16.dcm r                             
+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.raw nbit=16
+
+# bugged Siemens 'Leonardo' image
+testWrite 8078283Leonardo.dcm r
+affim filein=8078283Leonardo.dcm.raw dim=512 nbit=16
+
+#CT McTwin Elscint C.H.R.U  LILLE  C.HURIEZ
+testWrite MxTwinLossLess.dcm r
+affim filein=MxTwinLossLess.dcm.raw DIMX=512 DIMY=512 nbit=16
+
+# MRI image from VPRO burned CD
+testWrite mriThruVPRO.dcm r
+affim filein=mriThruVPRO.dcm.raw  DIMX=256 DIMY=256 nbit=16
+echo "expected : tasteless SHIT !"
+echo "breaks Siemens Leonardo viewer . JPEG encoding is bugged?"
diff --git a/checkReadColor.sh b/checkReadColor.sh
new file mode 100644 (file)
index 0000000..b0c2fb3
--- /dev/null
@@ -0,0 +1,137 @@
+# Check READ
+#-----------
+#
+# We just write RAW Files and AFFIM them
+# to be sure the reading was OK
+#
+
+#RGB
+ ---
+
+testWrite 8BitsUncompressedColor.dcm r
+affim filein=8BitsUncompressedColor.dcm.raw dimx=800 dimy=535 nbit=24
+
+testWrite US-RGB-8-epicard.dcm r
+echo "expected pixelType=8U SamplesPerPixel=3 PlanarConfiguration=1"
+echo "         PhotometricInterpretation=RGB"
+affim filein=US-RGB-8-epicard.dcm.raw  dimx=640 dimy=480 nbit=24
+
+testWrite US-RGB-8-esopecho.dcm r
+echo "expected pixelType=8U SamplesPerPixel=3 PlanarConfiguration=0"
+echo "         PhotometricInterpretation=RGB"
+affim filein=US-RGB-8-esopecho.dcm.raw dimx=256 dimy=120 nbit=24
+
+testWrite gdcm-RGB-LibIDORect.acr r
+affim filein=gdcm-RGB-LibIDORect.acr.raw  DIMX=400 DIMY=100 nbit=24
+
+#YBR_FULL_422
+#------------
+
+testWrite US.3405.1.dcm r  # YBR_FULL_422
+echo "expected  pixelType=8U SamplesPerPixel=1 PlanarConfiguration=0"
+echo "          PhotometricInterpretation=RGB"
+affim filein=US.3405.1.dcm.raw DIMX=768 DIMY=576 nbit=24
+
+testWrite US.1.2.dcm r
+echo "expected : A lot of Fragments (40), nb Frames = 40 ;-)"
+echo "expected  pixelType=8U SamplesPerPixel=3 PlanarConfiguration=0"
+echo "          PhotometricInterpretation=YBR_FULL_422"
+affim filein=US.1.2.dcm.raw  DIMX=768 DIMY=576  nbit=24
+affim filein=US.1.2.dcm.raw  DIMX=768 DIMY=576  nbit=24 offset=13271040
+affim filein=US.1.2.dcm.raw  DIMX=768 DIMY=576  nbit=24 offset=39813120
+
+
+#PALETTE COLOR
+#-------------
+
+testWrite gdcm-US-ALOKA-16.dcm r
+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 no DicomWorks deals with the color"
+echo "breaks xmedcon"
+ls -l gdcm-US-ALOKA-16.dcm*
+echo "expected 1843200 (large enough to hold 3 16-bits planes)"
+affim dimx=640 dimy=480 filein=gdcm-US-ALOKA-16.dcm.raw nbit=16
+
+testWrite US-PAL-8-10x-echo.dcm r
+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.raw DIMX=600 DIMY=430 nbit=24
+affim filein=US-PAL-8-10x-echo.dcm.raw DIMX=600 DIMY=430 nbit=24 offset=774000
+
+testWrite 8BitsRunLengthColor.dcm r
+echo "expected pixelType=8U SamplesPerPixel=1 PlanarConfiguration=2"
+echo "         PhotometricInterpretation=PALETTE COLOR"
+echo "expected correct color image"
+affim filein=8BitsRunLengthColor.dcm.raw DIMX=800 DIMY=535 nbit=24
+
+testWrite OT-PAL-8-face.dcm r
+echo "expected  pixelType=8U SamplesPerPixel=3 PlanarConfiguration=1"
+echo "          PhotometricInterpretation=PALETTE COLOR"
+affim filein=OT-PAL-8-face.dcm.raw dimx=640 dimy=480 nbit=24
+
+#YBR_FULL
+#--------
+testWrite FMAG0001.dcm r 
+echo "expected pixelType=8U SamplesPerPixel=3"
+echo "         PlanarConfiguration=1 PhotometricInterpretation=YBR_FULL"
+echo "         nb Frames (DIMZ) : 1"
+ls -l FMAG0001.dcm.raw
+affim filein=FMAG0001.dcm.raw DIMX=768 DIMY=576 nbit=24
+
+
+testWrite QMAG0001.dcm r 
+echo "expected pixelType=8U SamplesPerPixel=3"
+echo "         PlanarConfiguration=1 PhotometricInterpretation=YBR_FULL"
+ls -l QMAG0001.dcm.raw
+affim filein=QMAG0001.dcm.raw DIMX=384 DIMY=288 nbit=24;
+
+# images from :
+# http://www.leadtools.com/SDK/Medical/DICOM/ltdc19.htm
+#------------------------------------------------------
+
+testWrite 8BitsJpegLossyGrayScale.dcm r
+affim filein=8BitsJpegLossyGrayScale.dcm.raw DIMX=800 DIMY=535 
+
+testWrite 8BitsRunLengthColor.dcm r
+affim filein=8BitsRunLengthColor.dcm.raw DIMX=800 DIMY=535  nbit=24
+
+testWrite 8BitsRunLengthGrayScale.dcm r
+affim filein=8BitsRunLengthGrayScale.dcm.raw DIMX=800 DIMY=535 
+
+testWrite 8BitsUncompressedColor.dcm r
+affim filein=8BitsUncompressedColor.dcm.raw DIMX=800 DIMY=535  nbit=24
+
+testWrite 8BitsUncompressedGrayScale.dcm r
+affim filein=8BitsUncompressedGrayScale.dcm.raw DIMX=800 DIMY=535 
+
+testWrite 16BitsJpegLosslessGrayScale.dcm r
+affim filein=16BitsJpegLosslessGrayScale.dcm.raw DIMX=800 DIMY=535 nbit=16
+
+testWrite 16BitsRunLengthGrayScale.dcm r
+echo "expected pixelType=16U SamplesPerPixel=1 PlanarConfiguration=2"
+echo "         PhotometricInterpretation=MONOCHROME2"
+affim filein=16BitsRunLengthGrayScale.dcm.raw  DIMX=800 DIMY=535 nbit=16
+
+testWrite 16BitsUncompressedGrayScale.dcm r
+affim filein=16BitsUncompressedGrayScale.dcm.raw DIMX=800 DIMY=535  nbit=16
+
+testWrite 24BitsJpegLosslessColor.dcm r
+echo "expected  DIMX=800 DIMY=535 DIMZ=1 "
+echo "          pixelType=8U SamplesPerPixel=3 PlanarConfiguration=0"
+echo "          PhotometricInterpretation=RGB "
+affim filein=24BitsJpegLosslessColor.dcm.raw DIMX=800 DIMY=535  nbit=24
+
+testWrite 24BitsJpegLossyColor.dcm r
+affim filein=24BitsJpegLossyColor.dcm.raw DIMX=800 DIMY=535  nbit=24
+
+testWrite 24BitsUncompressedColor.dcm r
+affim filein=24BitsUncompressedColor.dcm.raw DIMX=800 DIMY=535 nbit=24
+
+
+
+
diff --git a/checkWrite.sh b/checkWrite.sh
new file mode 100644 (file)
index 0000000..f081257
--- /dev/null
@@ -0,0 +1,225 @@
+# Check WRITE
+#-----------
+#
+# We rewrite DICOM Files
+# and AFFIMDCM them to be sure the writting was OK
+#
+
+# WARNING : DO NOT use right now; some image names changed :-(
+
+
+#No Swap Info
+#------------
+testWrite mr176621.dcm d
+affimdcm filein=mr176621.dcm.DCM  # xmedcon OK
+
+# No Transfert Syntax
+#--------------------
+testWrite cr172241.dcm d;
+affimdcm filein=cr172241.dcm.DCM zoom=-4; #xmedcon OK
+                                          #Incorrect sequence length
+
+testWrite cr_45031.dcm d ;
+affimdcm filein=cr_45031.dcm.DCM zoom=-4 #OK
+
+testWrite CR-MONO1-10-chest.dcm d;
+affimdcm filein=CR-MONO1-10-chest.dcm.DCM  #OK
+
+testWrite CT-MONO2-12-lomb-an2.acr2 d;
+affimdcm filein=CT-MONO2-12-lomb-an2.acr2.DCM  #OK
+
+testWrite gdcm-MR-SIEMENS-16.acr1 d;
+affimdcm filein=gdcm-MR-SIEMENS-16.acr1.DCM  #OK
+
+testWrite gdcm-MR-SIEMENS-16.acr2 d;
+affimdcm filein=gdcm-MR-SIEMENS-16.acr2.DCM  #OK
+
+testWrite MR-MONO2-12-an2.acr2 d;
+affimdcm filein=MR-MONO2-12-an2.acr2.DCM;  #OK
+
+testWrite MR-MONO2-12-angio-an1.acr1 d;
+affimdcm filein=MR-MONO2-12-angio-an1.acr1.DCM 
+echo " --- >12 bits stored, try AFFIM"
+affimdcm filein=MR-MONO2-12-angio-an1.acr1.DCM bypassacr=1 dim=256 nbit=16 offset=820
+
+testWrite newACR1000.nema d;
+affimdcm filein=newACR1000.nema.DCM #OK
+
+testWrite oldACR00001.ima d;
+affimdcm filein=oldACR00001.ima.DCM #OK
+
+testWrite OT-MONO2-8-a7.dcm d;
+affimdcm filein=OT-MONO2-8-a7.dcm.DCM #OK, xmedcon OK
+
+#RGB
+testWrite US.3405.1.dcm d
+affimdcm filein=US.3405.1.dcm.DCM # Nothing displayed
+affimdcm filein=US.3405.1.dcm.DCM bypassacr=1 offset=1592 nbit=24 dimx=768 dimy=576                                         # seg fault                  
+echo "expected : wrong color"
+         # breaks xmedcon 
+         # Incorrect PixelData length
+        # Incorrect sequence length
+        # seg fault 
+                                 
+testWrite OT-PAL-8-face.dcm d
+affimdcm filein=OT-PAL-8-face.dcm.DCM # nothing displayed
+affimdcm filein=OT-PAL-8-face.dcm.DCM dimx=640 dimy=480 nbit=24 offset=1814 bypassacr=1
+  # breaks xmedcom 
+  # Incorrect PixelData Length
+  # Unexpected end of file
+  # wrong image                                       
+                                      
+testWrite 8BitsUncompressedColor.dcm d;
+affimdcm filein=8BitsUncompressedColor.dcm.DCM 
+#xmedcom : OK
+# Incorrect OW value representation (fixed)
+# awfull stuff after pixels
+
+# Implicit VR - Little Endian
+#-----------------------------
+testWrite gdcm-US-ALOKA-16.dcm  d;
+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"
+affimdcm filein=gdcm-US-ALOKA-16.dcm.DCM 
+#breaks xmedcon
+# warning: Incorrect sequence length
+# error: Missing CLUT
+# error: No images found
+
+testWrite CT-MONO2-16-ankle.dcm d;
+affimdcm filein=CT-MONO2-16-ankle.dcm.DCM  #OK
+
+testWrite CT-MONO2-16-ort.dcm d;
+affimdcm filein=CT-MONO2-16-ort.dcm.DCM  #OK
+
+testWrite CT-MONO2-8-abdo.dcm d; 
+affimdcm filein=CT-MONO2-8-abdo.dcm.DCM  #OK
+
+testWrite gdcm-MR-PHILIPS-16.dcm d;
+affimdcm filein=gdcm-MR-PHILIPS-16.dcm.DCM  #OK
+
+testWrite irmPhlipsNew1.dcm d;
+affimdcm filein=irmPhlipsNew1.dcm.DCM   #OK
+
+testWrite MR.6799.1.dcm d;
+affimdcm filein=MR.6799.1.dcm.DCM   #OK
+
+testWrite MR-MONO2-16-head.dcm d;
+affimdcm filein=MR-MONO2-16-head.dcm   #OK
+
+testWrite multiframe1Integris.dcm d;
+affimdcm filein=multiframe1Integris.dcm.DCM 
+affim filein=multiframe1.dcm.DCM dim=1024 nbit=16 offset=31457280 bypassacr=1 
+testWrite multiframe2.dcm d;
+affimdcm filein=multiframe2.dcm.DCM
+testWrite test.acr d; #OK
+
+affimdcm filein=test.acr.DCM
+#avec imagette
+testWrite icone.dcm d
+echo "Hopeless till we stop considering the Tag as an identifier"
+affimdcm filein=icone.dcm.DCM
+
+#Explicit VR - Little Endian
+#----------------------------
+testWrite CT-MONO2-16-brain.dcm d;
+affimdcm filein=CT-MONO2-16-brain.dcm.DCM  #OK
+
+testWrite gdcm-CR-DCMTK-16-NonSamplePerPix.dcm d
+testWrite gdcm-MR-PHILIPS-16-Multi-Seq.dcm d
+testWrite gdcm-MR-PHILIPS-16-NonRectPix.dcm d
+testWrite MR-MONO2-8-16x-heart.dcm d
+testWrite NM-MONO2-16-13x-heart.dcm d
+testWrite sonataMonaco.dcm d
+
+#MultiFrame
+testWrite US-MONO2-8-8x-execho.dcm d
+affimdcm filein=US-MONO2-8-8x-execho.dcm.DCM  
+
+#RGB
+testWrite US-RGB-8-epicard.dcm d;
+affimdcm filein=US-RGB-8-epicard.dcm.DCM  #OK xmedcon OK
+
+testWrite US-RGB-8-esopecho.dcm d;
+affimdcm filein=US-RGB-8-esopecho.dcm.DCM  #OK xmedcon OK
+
+# Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])
+#--------------------------------------------------------------------------
+testWrite CT-MONO2-16-chest.dcm d;
+affimdcm filein=CT-MONO2-16-chest.dcm.DCM #OK
+# breaks xmedcom : black image
+#warning: Incorrect PixelData length
+#warning: Tag with uneven length
+#error: Unexpected end of file
+
+testWrite gdcm-JPEG-LossLess3a.dcm d;
+affimdcm filein=gdcm-JPEG-LossLess3a.dcm.DCM
+
+testWrite XA-MONO2-8-12x-catheter.dcm d
+ls -l XA-MONO2-8-12x-catheter.dcm*   #wrong images with xmedcon
+affimdcm filein=XA-MONO2-8-12x-catheter.dcm.DCM
+affimdcm filein=XA-MONO2-8-12x-catheter.dcm.DCM dim=512 num=6  bypassacr=1
+affimdcm filein=XA-MONO2-8-12x-catheter.dcm.DCM dim=512 num=11 bypassacr=1
+#JPEG Extended (Process 2 & 4) // 16 bits
+#-----------------------------
+testWrite gdcm-JPEG-Extended.dcm d
+affimdcm filein=gdcm-JPEG-Extended.dcm.DCM #OK
+#breaks xmedcon warning: Incorrect sequence length
+#               warning: Incorrect PixelData length
+#               error: Unexpected end of file
+
+
+testWrite jpeglossy1.dcm d
+affimdcm filein=jpeglossy1.dcm.DCM #OK
+#breaks xmedcon warning: Incorrect sequence length
+#               warning: Incorrect PixelData length
+#               seg fault
+
+testWrite philipsMR-lossy.ima d
+affimdcm filein=philipsMR-lossy.ima.DCM #OK
+# breaks xmedcom :
+# Incorrect sequence length
+# Incorrect PixelData length
+
+#JPEG Baseline (Process 14)
+#--------------------------
+testWrite MR-MONO2-12-shoulder.dcm d
+echo "expected : 'Unsupported JPEG process: SOF type 0xc3' on MR-MONO2-12-shoulder.dcm"
+affimdcm filein=MR-MONO2-12-shoulder.dcm.DCM #OK
+#breaks xmedcon warning: Incorrect PixelData length
+#               warning: ITag with uneven length
+#               error: Unexpected end of file
+
+
+#fichier format ecat.
+#testWrite imageEcat.ecat d
+
+#JPEG Lossy 8 bits (to be checked with the right lib : modify jmorecfg.h, gdcmFile.cxx)
+#=================
+#JPEG Baseline (Process 1)
+#--------------------------
+# Bracco Files
+testWrite US.1.2.dcm d;
+affimdcm filein=US.1.2.dcm.DCM
+affimdcm filein=US.1.2.dcm.DCM  DIMX=768 DIMY=576 nbit=24 bypassacr=1 num=3 offset=1592
+   # breaks xmedcon : Incorrect sequence length, 
+   #                  Unknown PhotometricInterpretation, 
+   #                  Incorrect PixelData length
+testWrite US.1.3.dcm d
+affimdcm filein=US.1.2.dcm.DCM  
+#
+testWrite CLIP0001.dcm d
+affimdcm filein=CLIP0001.dcm.DCM
+affimdcm filein=CLIP0001.dcm.DCM  DIMX=768 DIMY=576 nbit=24 bypassacr=1 num=2
+affimdcm filein=CLIP0001.dcm.DCM  DIMX=768 DIMY=576 nbit=24 bypassacr=1 num=15
+affimdcm filein=CLIP0001.dcm.DCM  DIMX=768 DIMY=576 nbit=24 bypassacr=1 num=31
+affimdcm filein=CLIP0001.dcm.DCM  DIMX=768 DIMY=576 nbit=24 bypassacr=1 num=32
+
+
+#RLE Lossless
+#-------------
+testWrite US-PAL-8-10x-echo.dcm d
+testWrite canada.dcm d
+testWrite FMAG0002.dcm d
+testWrite QMAG0001.dcm d
diff --git a/checkvtkgdcmViewer.sh b/checkvtkgdcmViewer.sh
new file mode 100644 (file)
index 0000000..a37f0ef
--- /dev/null
@@ -0,0 +1,77 @@
+# Images, in lexicographic order
+# ------------------------------
+# Brutal checking of vtkgdcmViewer compliance
+
+vtkgdcmViewer 012345.002.050.dcm
+vtkgdcmViewer 16BitsJpegLosslessGrayScale.dcm     
+vtkgdcmViewer 16BitsRunLengthGrayScale.dcm
+vtkgdcmViewer 16BitsUncompressedGrayScale.dcm
+vtkgdcmViewer 24BitsJpegLosslessColor.dcm
+vtkgdcmViewer 24BitsJpegLossyColor.dcm
+vtkgdcmViewer 24BitsUncompressedColor.dcm
+vtkgdcmViewer 8BitsJpegLossyGrayScale.dcm
+vtkgdcmViewer 8BitsRunLengthColor.dcm
+vtkgdcmViewer 8BitsRunLengthGrayScale.dcm
+vtkgdcmViewer 8BitsUncompressedColor.dcm
+vtkgdcmViewer 8BitsUncompressedGrayScale.dcm
+vtkgdcmViewer canadaAloka.dcm
+vtkgdcmViewer CLIP0001-Sequoia-U11.dcm
+vtkgdcmViewer cr172241.dcm 
+vtkgdcmViewer cr_45031.dcm                     
+vtkgdcmViewer CR-MONO1-10-chest.dcm            
+vtkgdcmViewer CT-MONO2-12-lomb-an2.acr2       
+vtkgdcmViewer CT-MONO2-16-ankle.dcm           
+vtkgdcmViewer CT-MONO2-16-brain.dcm           
+vtkgdcmViewer CT-MONO2-16-chest.dcm           
+vtkgdcmViewer CT-MONO2-16-ort.dcm             
+vtkgdcmViewer CT-MONO2-8-abdo.dcm
+vtkgdcmViewer DicomSampleNastyGEImage.dcm  
+vtkgdcmViewer FMAG0001.dcm
+vtkgdcmViewer gdcm-ACR-LibIDO.acr
+vtkgdcmViewer gdcm-CR-DCMTK-16-NonSamplePerPix.dcm
+vtkgdcmViewer gdcm-JPEG-Extended.dcm
+vtkgdcmViewer gdcm-JPEG-LossLess3a.dcm   
+vtkgdcmViewer gdcm-JPEG-LossLessThoravision.dcm          #expected : seg fault
+vtkgdcmViewer gdcm-MR-PHILIPS-16.dcm    
+vtkgdcmViewer gdcm-MR-PHILIPS-16-Multi-Seq.dcm
+vtkgdcmViewer gdcm-MR-PHILIPS-16-NonRectPix.dcm
+vtkgdcmViewer gdcm-MR-SIEMENS-16.acr1
+vtkgdcmViewer gdcm-MR-SIEMENS-16.acr2
+vtkgdcmViewer gdcm-US-ALOKA-16.dcm                       # pretty strange !!!
+vtkgdcmViewer irmPhlipsNew1.dcm
+vtkgdcmViewer jpeg16Bits.dcm
+vtkgdcmViewer jpeglossles1.dcm
+vtkgdcmViewer jpeglossy1.dcm
+vtkgdcmViewer jpeglossy2.dcm
+vtkgdcmViewer mr176621.dcm
+vtkgdcmViewer MR.6799.1.dcm
+vtkgdcmViewer MR-MONO2-12-an2.acr2
+vtkgdcmViewer MR-MONO2-12-angio-an1.acr1
+vtkgdcmViewer MR-MONO2-12-shoulder.dcm
+vtkgdcmViewer MR-MONO2-16-head.dcm
+vtkgdcmViewer MR-MONO2-8-16x-heart.dcm
+vtkgdcmViewer multiframe1Integris.dcm
+vtkgdcmViewer multiframe2GE.dcm
+vtkgdcmViewer newACR1000.nema
+vtkgdcmViewer NM-MONO2-16-13x-heart.dcm
+vtkgdcmViewer oldACR00001.ima
+vtkgdcmViewer OT-MONO2-8-a7.dcm
+vtkgdcmViewer OT-PAL-8-face.dcm
+vtkgdcmViewer philipsMR-lossy.ima
+vtkgdcmViewer QMAG0001.dcm
+vtkgdcmViewer sonataMonaco.dcm
+vtkgdcmViewer US.1.2.dcm
+vtkgdcmViewer US.3405.1.dcm
+vtkgdcmViewer US-MONO2-8-8x-execho.dcm
+vtkgdcmViewer US-PAL-8-10x-echo.dcm
+vtkgdcmViewer US-RGB-8-epicard.dcm
+vtkgdcmViewer US-RGB-8-esopecho.dcm
+vtkgdcmViewer xa_integris.dcm
+vtkgdcmViewer XA-MONO2-8-12x-catheter.dcm
+
+#xmedcom breakers
+#----------------
+vtkgdcmViewer 00191113.dcm
+vtkgdcmViewer DermaColorLossLess.dcm
+vtkgdcmViewer MxTwinLossLess.dcm
+vtkgdcmViewer RadBWLossLess.dcm