Scénario de test & Cas d'usage
Setup 'ORIGINAL_SCANS' and 'COMPRESSED_SCANS' tables. The filenames match exactly to facilitate pairing.
| 1 | DATA casuser.original_scans; |
| 2 | LENGTH _path_ $255 patient_id $20; |
| 3 | INPUT _path_ $ patient_id $; |
| 4 | _image_ = 'FFFF'b; |
| 5 | DATALINES; |
| 6 | scan_001.dcm P_101 |
| 7 | scan_002.dcm P_102 |
| 8 | scan_003.dcm P_103 |
| 9 | ; |
| 10 | RUN; |
| 11 | |
| 12 | DATA casuser.compressed_scans; |
| 13 | LENGTH _path_ $255 patient_id $20; |
| 14 | INPUT _path_ $ patient_id $; |
| 15 | _image_ = 'FFFF'b; |
| 16 | DATALINES; |
| 17 | scan_001.dcm P_101 |
| 18 | scan_002.dcm P_102 |
| 19 | scan_003.dcm P_103 |
| 20 | ; |
| 21 | RUN; |
| 1 | PROC CAS; |
| 2 | image.compareImages / |
| 3 | sourceImages={TABLE={name='compressed_scans', caslib='casuser'}} |
| 4 | referenceImages={TABLE={name='original_scans', caslib='casuser'}} |
| 5 | casOut={name='validation_log', caslib='casuser', replace=true} |
| 6 | method='PSNR' |
| 7 | minimum=30 |
| 8 | maximum=100 |
| 9 | separateChannels=false |
| 10 | copyVars={'patient_id'}; |
| 11 | RUN; |
| 1 | PROC CAS; |
| 2 | SIMPLE.summary / |
| 3 | TABLE={name='validation_log', caslib='casuser'}; |
| 4 | RUN; |
The 'validation_log' table will only contain records for scans that meet the strict PSNR criteria (30-100). Any scan falling below 30 (severe data loss) is automatically excluded from the success log, alerting the admins.