I am trying to export a segmentation as a lablemap and have not been successful since updating to 4.11.0. I keep getting the error “Failed to export segments from segmentation XYZ to lablemap node XYZ-label! Most probably the segment cannot be converted into binary labelmap representation.”
The reason I’m trying to export the lablemap is because I need the binary slices for another analysis out side of slicer. I’m using code in imageJ and Matlab to calculate the second moment of area and fractal dimension of the slices and I use the binary (0 = not thing, 1 = thing) slices to do this.
I’m following the same protocol I’ve used in past versions of slicer, but I’ve never seen this error before. Is there another option I should be using that I missed in the update? Is anyone else getting this error in slicer 4.11.0?
First off, you may not need to export your segmentations to do those calculations. Have you checked Segment Statistics Module which provides some of those Segment statistics — 3D Slicer documentation
And perhaps other metrics you need can be added (or already available) in elsewhere. My first suggestion would be to explore those before you try to use yet another program. Also I think @jmhuie might have already one this as a module. See this post. Calculating Second Moment of Area from Segment - #4 by jmhuie
As for your error, it is not clear to me what’s going on without seeing your data. We routinely export labelmaps from segmentations, and haven’t encountered this error with any of the 4.11 or 4.13 versions of Slicer. if you can upload the segmentation and the volume that give you the error we can try to troubleshoot.
Yes, in addition to Segment statistics module, you can use Radiomics extension to compute fractal dimenision and dozens of other metrics. So, there should be no need to struggle with Matlab or ImageJ.
Yes, this should work without problems. See examples in the script repository.
I’ve tried now to export several different labelmaps with the same error, and unfortunately there is no way to upload segmentations in this chat forum. Is there another place I could upload the data?
Again, I’ve done this many many times before, and am only now encountering an error with this new update.
Thank you for the tip regarding the Radiomics extension. Unfortunately, it doesn’t appear when I open “extension manager.” Is this extension not updated yet for 4.11.0?
You can upload the data set anywhere (Dropbox, OneDrive,…) and post the link here.
It should be available. What Slicer version and operating system do you use? Do you see any errors in the application log?
Hey Cassandra, Murat is correct. For my module you will be able to measure second moment of area for the segment without need to exporting to a labelmap.