AIM-Harvard / pyradiomics

Open-source python package for the extraction of Radiomics features from 2D and 3D images and binary masks. Support: https://discourse.slicer.org/c/community/radiomics
http://pyradiomics.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.14k stars 492 forks source link

[BUG] Parallel batch processing example: label information from CSV #757

Closed ysuter closed 2 years ago

ysuter commented 2 years ago

Description When using the example parallel batch processing (examples)/batchprocessing_parallel.py), the label information fetched from the input CSV file does not get passed to the feature extractor. This leads to a feature extraction not considering the provided label information. This is correctly done in the non-parallel versions. The example works fine if the label is provided in the setting file.

To Reproduce Use the example setting with batch_processing_parallel.py together with an input CSV file to extract features based on a multi-label segmentation. The CVS-file contains the same image/mask pair on multiple lines, with the only difference being the label column with different values. With the current batch_processing_parallel.py, the label information from the CSV file is not considered by the feature extraction (extracted on the same label). In this case, the label information is provided in the CSV, not the settings file.

Expected behavior Feature extraction on the multi-label image based on the label information provided in the input CSV file.

Version:

Related PR: #756 If the feature vector should also contain the label information, adding the label to both the feature extractor and the updated feature vector would be an alternative.

JoostJM commented 2 years ago

Thanks for the fix! The PR is merged.