Greetings,
I'm trying to automate the generation of masks that match the dimensions of my MRI images. I know how to do this using fslcreatehd, but there seems to be a bug with FSLview or fslcreatehd. The bug is this;
When I create an image/mask using fslcreatehd and then open in FSLview, the pencil tool does not honour the colour setting and instead draws transparently. If I save this image in FSLview after drawing on it (blindly) and then quit and restart, the image then becomes properly editable (and the previously saved blind scribbles are visible on loading).
The code I am using is something like this;
# generate empty mask that matches source dimensions:
fslhd -x $source_image > new_mask.xml
fslcreatehd new_mask.xml new_mask.nii.gz
#Load FSLview with the new mask:
fslview -m single,ortho $source_image new_mask.nii.gz -l "Blue" -t 0.4
Should be straightforward, but it doesn't allow editing first time. I've tried adding intent_code = '1002' to the xml to denote that the new file is a mask, but this doesn't fix it. Has anyone else tried creating masks using fslcreatehd and found this transparency issue? I believe the FSLview version is 3.1.8
(and yes, I am clicking the unlock icon on the mask in FSLview first).
You can reproduce this manually with this code snip:
fslcreatehd 208 256 176 1 1 1 1 1 1 1 4 temp_mask
fslview temp_mask
Many thanks
Matt
|