Scénario de test & Cas d'usage
Simulation of a pixel stream for 3 patients. Each image is a small 3x3 matrix (9 pixels) with random intensity values representing tissue density.
| 1 | DATA mri_raw_stream; |
| 2 | DO patient_id = 101 to 103; |
| 3 | /* Simulating a 3x3 image (9 pixels) */ |
| 4 | DO p_idx = 1 to 9; |
| 5 | intensity = floor(rand('UNIFORM') * 255); |
| 6 | OUTPUT; |
| 7 | END; |
| 8 | END; |
| 9 | RUN; |
| 10 | |
| 11 | PROC CASUTIL; |
| 12 | load DATA=mri_raw_stream outcaslib='casuser' casout='mri_pixels' replace; |
| 13 | RUN; |
| 1 | /* Done in data_prep */ |
| 1 | PROC CAS; |
| 2 | image.condenseImages / |
| 3 | TABLE={caslib='casuser', name='mri_pixels'}, |
| 4 | width=3, |
| 5 | height=3, |
| 6 | numberOfChannels=1, |
| 7 | inputs={{name='intensity'}}, |
| 8 | copyVars={'patient_id'}, |
| 9 | casOut={caslib='casuser', name='mri_images', replace=true}; |
| 10 | RUN; |
The action should produce a table 'mri_images' containing 3 rows (one per patient). Each row will include the 'patient_id' and a binary '_image_' column representing the reconstructed 3x3 grayscale scan.