Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save Current Cluster export issue #10

Open
bmelo opened this issue Jul 28, 2016 · 8 comments
Open

Save Current Cluster export issue #10

bmelo opened this issue Jul 28, 2016 · 8 comments

Comments

@bmelo
Copy link

bmelo commented Jul 28, 2016

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.

@spunt
Copy link
Owner

spunt commented Jul 28, 2016

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

@bmelo
Copy link
Author

bmelo commented Aug 3, 2016

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

@spunt
Copy link
Owner

spunt commented Aug 3, 2016

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 spunt closed this as completed Aug 3, 2016
@marsomarso
Copy link

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
Copy link

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?

@spunt spunt reopened this May 29, 2018
@spunt
Copy link
Owner

spunt commented May 29, 2018

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.

@marsomarso
Copy link

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.

@spunt
Copy link
Owner

spunt commented Jun 1, 2018

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants