d3b-center / fw-intensity-rescale-winsorize

Flywheel gear to rescale and winsorize signal intensities of an input image
0 stars 0 forks source link

Output files not integer format #1

Open afamiliar opened 1 year ago

afamiliar commented 1 year ago

It seems like the saved images do not have integer values, affecting the output results. The non-integer values from saved images may come from “normalized_image = nib.Nifti1Image(img_data, img.affine, img.header)“. Not sure, but maybe the affine option should be set to None? or maybe we should add img_data = img_data.astype(np.uint8)

Example case on Flywheel: TIRU / LGG_proc / C1003557 / 2299

afamiliar commented 1 year ago

addressed in commit 9a9d9c221219a4c120a29725533e967182cf36f6

anahitafk commented 1 year ago

The normalization is currently being done within the tumor region, but this normalization needs to be done for the whole image. Also, the output still doesn't seem to be integer.

afamiliar commented 1 year ago

@anahitafk The newest version of the gear was not uploaded to Flywheel properly, I uploaded it & tested on subject C1026189 file C1026189_1894_T2.nii.gz in the tiru/LGG-feature-extraction project and it looks good now.