Open Leylaastro opened 1 year ago
Hi @Leylaastro I might be able to answer some of your questions.
# Load the AAL atlas
atlas_img = nib.load(aal_file_path)
# Get the atlas data
atlas_data = atlas_img.get_fdata()
# Loop through the region labels and create binary masks
for region in range(1, 117):
# Create a binary mask for the current region
mask = np.zeros_like(atlas_data)
mask[atlas_data == region] = 1
# Save the mask to a file
nib.save(nib.Nifti1Image(mask, atlas_img.affine), f'{region}.nii.gz')
Regarding the other questions, such as how to determine which ROI is the one we're interested in, you might want to try opening up the semgentation file 3D Slicer, which has a SlicerRadiomics extension. In 3D Slicer, you should be able to visually see the labels of each ROI and conduct radiomics feature extraction on one of the segmentations. (If not then you might have to split the segmentation file into multiple files like aforementioned so that each file only has 1 label or ROI).
I'm not sure if this is directly related but I hope this helps!
Hi, For each study I have one 3D CT file and one segmentation file with multiple ROIs. I have two questions: 1- How can I know how many ROIs are in the segmenation file. 2- How can I extract radiomics for the ROIs one by one? I know that to select the desired ROI in which I am interested to extract the radiomics I should identify 'label', and each time I can only extract the radiomics for one ROI, right? But how can I know about the value of the labels? Imagine that I have 5 ROIs in one segmentation file and I only need to extract the features for the 2nd ROI or for the one which is labelled as 'Tumor' in the SEG dicom file. How can I specify it with 'label' in the execute function of pyradiomics?