I think that this is exactly the function I need; however, when I go to IMTOOL -> ExtractVOI I get the following error:
Undefined function or variable 'img'.
Error while evaluating uimenu Callback
I'm wondering if there is an additional step I need to perform before ExtractVOI. Any insights would be much appreciated!
I would be happy to help. Can you please either describe your data in more detail or send me an example that triggers this error?
Note that if you set erode_layers too large, you will encounter an error, since only as many layers as exist may be stripped off of the brain image.
I downloaded your code, but when I run brain_plot3d_alt, it prints a 2D image instead of a 3D image. I'm using the standard MNI brain...
Also, every time I try to put in an input for erode_layers the code throws an error. What's going wrong?