bspmview icon indicating copy to clipboard operation
bspmview copied to clipboard

Save Current Cluster export issue

Open bmelo opened this issue 8 years ago • 8 comments

Hi,

When I try to export a specific cluster ,clicking in Save Current Cluster (Binary Mask) and also Save Current Cluster (Intensity), the NIfTI file generated has another cluster that is not related with the cluster of interest.

For example, in one case I was trying to generate a ROI with a cluster in Superior Frontal Gyrus (peak at 3,50,29) I got a NIfTI file with this cluster and another cluster not related and not near with peak at -21, -40, 35.

clusters export issue

If necessary, I can provide the data that I'm having this trouble.

This issue is not occurring always!

Even so, congrats for the software. It's helping me a lot even with this export issue. Thanks.

bmelo avatar Jul 28 '16 18:07 bmelo

Hi - Thanks for reporting this issue. Glad the software has been useful to you. Can you provide one of the image overlays you're seeing this issue with? I can't reproduce the issue in my own data so I'd like to confirm that I also see it with your data, and then assuming I do see it should be easy to nail down what's causing this.

Cheers, Bob

spunt avatar Jul 28 '16 19:07 spunt

Thanks Spunt. I'm sending a zip file with the image that I used to export and the cluster exported with this issue.

Example.zip

bmelo avatar Aug 03 '16 13:08 bmelo

Hi again - Thanks for sharing this. It allowed me to find and correct the issue, which was in subfunction getcurrentblob. In that function, I was accidentally using the cluster extent (instead of cluster index) to find it in the array containing the data for the entire volume. Since that other cluster had the same extent as the medial PFC cluster you were grabbing, it was erroneously being included, too. I just pushed an update to the repository that corrects this issue. Give it a shot and let me know if you are still having problems.

Cheers, Bob

spunt avatar Aug 03 '16 18:08 spunt

Hi there,

Thanks so much for your tool!

I'm having a similar issue using save currentl cluster as binary mask (my version is from April 2017 so it will have included this fix). However, the extent of the two blobs is not the same, I'm getting random small clusters which are also saved in my binary mask. I attach a zip with the t-stat and the mask image for reference.

Thanks, Marso bspmview.zip

marsomarso avatar May 25 '18 15:05 marsomarso

Also, in some instances I am getting a mask of the whole brain when I select to save current cluster. Has this come up before?

marsomarso avatar May 25 '18 15:05 marsomarso

Hi there - Sorry for the delayed response. So, after some fiddling I was able to reproduce this issue and produce the same output binary image as the one you sent over. The problem only occurs when both positive and negative values are being displayed (+/- option in the upper left Direction toggle). That is, when I display only voxels showing positive contrast (+ in Direction toggle), the Save Current Cluster (Binary Mask) option works as expected.

Can you confirm that this is true for you? If it is, then you should be able to safely save individual clusters to binary image files by making sure you are not viewing both positive and negative contrast when saving.

In any case, I will look into this bug with positive/negative views and saving clusters as soon as I can find the time.

spunt avatar May 29 '18 01:05 spunt

Thanks for the heads up. That worked for those images but when I tried using just the + values for another image I am still getting other clusters being saved in the mask. My quickfix is to open the binary image and then resave the cluster from this using the save current cluster.

marsomarso avatar May 30 '18 23:05 marsomarso

Darn, well thanks for looking into it and tolerating the quickfix for now. I should have time to look into this next week and will update this issue (and the repo) with any changes. I will do my best to not make things even worse :)

spunt avatar Jun 01 '18 15:06 spunt