Closed LiJiaqi96 closed 4 years ago
I am not sure intermediate image/mask can be accessed, but it's easy to just do the resampling on your own, see https://github.com/Radiomics/pyradiomics/blob/master/radiomics/featureextractor.py#L397-L401.
A simple workaround is to perform a voxel based extraction for mean, min or max GL using firstorder features and a mask encompassing the entire image (or a ROI, as needed).
https://github.com/Radiomics/pyradiomics/blob/master/radiomics/featureextractor.py#L397-L401
Thanks man, it really helps.
Thanks for @KathrynSch in Issue #544 about the operation of image resampling.
It seems that Pyradiomics package performs the image resampling like this: setting the resampling spacing [x,y,z] --> establishing the extractor with this setting --> resampling the image and performing feature extraction --> obtaining extracted image features on the resampled image
settings = { 'resampledPixelSpacing': [1.0, 1.0, 1.0] }
original_pixel_spacing = [0.97, 0.97, 3.0]
img_ex.SetSpacing(original_pixel_spacing)
mask_ex.SetSpacing(original_pixel_spacing)
extractor = featureextractor.RadiomicsFeatureExtractor(**settings)
radiomic_features = extractor.execute(img_ex, mask_ex)
But I'm confused about whether and how can I get the intermediate resampled image (and masks)? Thanks a lot!