MIC-DKFZ / radtract

RadTract: enhanced tractometry with radiomics-based imaging biomarkers for improved predictive modelling.
9 stars 0 forks source link

Error on radtract_parcellateradtract_parcellate #1

Closed snaillyd closed 4 months ago

snaillyd commented 4 months ago

Dear all,

I am trying to run radtract_parcellateradtract_parcellate(Ubuntu 20.04),my code is !radtract_parcellateradtract_parcellate --streamlines /home/a/data/sub_0001/tractseg_output/TOM_trackings/CC.trk --reference /home/a/data/sub_0001/FA.nii.gz --output /home/a/data/sub_0001//tractseg_output/TOM_trackings/CC_parcellation.nii.gz

but this is what happens: Traceback (most recent call last): File "/home/a/python_VirtualEnvs/RadTract/bin/radtract_parcellate", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/a/python_VirtualEnvs/RadTract/lib/python3.11/site-packages/radtract/parcellation.py", line 751, in main parcellate_tract(streamlines=args.streamlines, File "/home/a/python_VirtualEnvs/RadTract/lib/python3.11/site-packages/radtract/parcellation.py", line 332, in parcellate_tract raise Exception('Binary envelope must be Nifti1Image!') Exception: Binary envelope must be Nifti1Image! Initializing features dataframe ... Initializing features dataframe ... Pyradiomics settings: {'minimumROIDimensions': 2, 'minimumROISize': None, 'normalize': False, 'normalizeScale': 0.5, 'removeOutliers': None, 'resampledPixelSpacing': None, 'interpolator': 'sitkBSpline', 'preCrop': False, 'padDistance': 5, 'distances': [1], 'force2D': False, 'force2Ddimension': 0, 'resegmentRange': None, 'label': 1, 'additionalInfo': True, 'correctMask': True, 'binWidth': 0.02} Enabled image types: {'Original': {}, 'LoG': {'sigma': [1.0, 3.0, 5.0]}, 'Wavelet': {}} Enables features: {'shape': None, 'firstorder': None, 'glcm': ['Autocorrelation', 'JointAverage', 'ClusterProminence', 'ClusterShade', 'ClusterTendency', 'Contrast', 'Correlation', 'DifferenceAverage', 'DifferenceEntropy', 'DifferenceVariance', 'JointEnergy', 'JointEntropy', 'Imc1', 'Imc2', 'Idm', 'Idmn', 'Id', 'Idn', 'InverseVariance', 'MaximumProbability', 'SumEntropy', 'SumSquares'], 'glrlm': None, 'glszm': None, 'gldm': None, 'ngtdm': None} Traceback (most recent call last): File "/home/a/python_VirtualEnvs/RadTract/bin/radtract_features", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/a/python_VirtualEnvs/RadTract/lib/python3.11/site-packages/radtract/features.py", line 447, in main features = extractor.calc_features(parcellation_file_name=args.parcellation, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/a/python_VirtualEnvs/RadTract/lib/python3.11/site-packages/radtract/features.py", line 195, in calc_features map_sitk, parc_sitk = self.extractor.loadImage(parameter_map_file_name, parcellation_file_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/a/python_VirtualEnvs/RadTract/lib/python3.11/site-packages/radiomics/featureextractor.py", line 382, in loadImage raise ValueError('Error reading mask Filepath or SimpleITK object') ValueError: Error reading mask Filepath or SimpleITK object

Any clue?

Thank you in advance, Yadi

peterneher commented 4 months ago

Hi, thank you for your message! Could you send me the full output of the command, not only the error? Then I can identify the issue more easily. Also, which radtract version are you using?

snaillyd commented 4 months ago

Hi, what I pasted here is the full output of the command. image I use radtract 0.2.1 and Tractseg docker image. Thanks!

snaillyd commented 4 months ago

Problem solved. Thank you!

peterneher commented 4 months ago

Great to hear! Could you let me know what caused your issue?