I have a single sitk label that applies to 4 different image volumes. I know that simple statistics on the label could be done through sitk. However, I need to calculate entropy and kurtosis within the label at each image volume.
Is there a way to extract the label data from each different image into a Numpy Array and then I can do this analysis?
Entropy and kurtosis for labels over an intensity image are already available in SimpleITK in the LabelIntensityStatisticsImageFilter
You would need to convert that label image and the intensity images into numpy arrays, then do masking in numpy to get the label's intensity. You should be able to use GetArrayViewFromImage
to avoid data duplication.