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

Contactsheets for 3D-slices behave as 3D-surfaces #706

Merged
merged 7 commits into from
May 14, 2024

Conversation

rcassani
Copy link
Member

@rcassani rcassani commented May 13, 2024

This PR has as goal to have the same functionality in ContactSheets for 3D figures: MRI slices and surfaces. The difference was reported in this Forum thread:

https://neuroimage.usc.edu/forums/t/45757/10

With these changes, contact sheets from 3D MRI slices will now have:

  • Time stamp
  • Colorbar

These two elements will be hidden (as the current behaviour) if and only if there is not data (sources and TF) plotted on the MRI slices, AND volume contact sheets are requested.

For MRI slices: contactsheet Time with Data (source values)

Before With this PR
img_1_1 img_1_2

For MRI slices: contactsheet Volume without Data

Before With this PR
img_2_1 img_2_2

EDIT: Images have been updated to current state of PR

@rcassani
Copy link
Member Author

@tmedani, @chinmaychinara91 could you provide some feedback on this PR.
It does look good to me.

@chinmaychinara91
Copy link
Collaborator

Open Default Anatomy MRI > Right click > Snapshot > Choose any of the View contact sheet and choose the defaults from Contact sheet GUI. Getting the error below:

When specified as a graphics object, first argument must be one or more axes objects.

Error in view_contactsheet (line 221)
    [az,el] = view(hAxes);

Error in figure_mri>@(h,ev)view_contactsheet(hFig,'volume','y',DefaultOutputDir) (line 1103)
        gui_component('MenuItem', jMenuSave, [], 'Volume contact sheet: Coronal',  IconLoader.ICON_CONTACTSHEET, [], @(h,ev)view_contactsheet(hFig, 'volume', 'y', DefaultOutputDir));

@rcassani
Copy link
Member Author

@chinmaychinara91 Good catch, I forgot the calls from the MRI viewer

@tmedani
Copy link
Collaborator

tmedani commented May 13, 2024

all looks good to me,
thanks Ray

@tmedani
Copy link
Collaborator

tmedani commented May 13, 2024

One comment: is it better to have just one color bar?

@rcassani
Copy link
Member Author

@tmedani, it is possible that the maximum of the colormap is set to local then it will be different across contactsheets.

@chinmaychinara91, commit 94f5313 handles the case you found. How about now?

@tmedani
Copy link
Collaborator

tmedani commented May 13, 2024

@tmedani, it is possible that the maximum of the colormap is set to local then it will be different across contactsheets.

I see, so it is then easier to tune each figure locally.

The thing that bothers me is the size of the figure, which is much smaller.

@chinmaychinara91
Copy link
Collaborator

@rcassani looks good now.

@rcassani
Copy link
Member Author

rcassani commented May 14, 2024

The thing that bothers me is the size of the figure, which is much smaller.

This bothered as well. It has now been addressed!
EDIT: No yet

@rcassani rcassani marked this pull request as draft May 14, 2024 17:59
@tmedani
Copy link
Collaborator

tmedani commented May 14, 2024

Awesome :)

@rcassani rcassani marked this pull request as ready for review May 14, 2024 20:36
@rcassani
Copy link
Member Author

Ok, this is now ready.

One of the changes, is that all contactsheets are obtained from 3D figures, even when initiated from the MRI viewer. This is to handle the time legend and colorbar.

Also the removal of the useless black background is now done across all the contact images, so the final composite image can be cut into equal size pieces, and all the pieces have the same spatial scale. This was not possible before as the removal was different for each (contact) image.

@rcassani rcassani merged commit 9e1098a into brainstorm-tools:master May 14, 2024
@rcassani rcassani deleted the contactsheet_3Dslices branch May 14, 2024 21:02
@rcassani rcassani restored the contactsheet_3Dslices branch May 14, 2024 21:02
@rcassani rcassani deleted the contactsheet_3Dslices branch May 15, 2024 14:19
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

Successfully merging this pull request may close these issues.

None yet

3 participants