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

Volume slicing: Remove subsetting and put more emphasis on anisotropy #613

Closed
tischi opened this issue Jan 28, 2024 · 23 comments
Closed

Volume slicing: Remove subsetting and put more emphasis on anisotropy #613

tischi opened this issue Jan 28, 2024 · 23 comments
Labels
enhancement New feature or request

Comments

@tischi
Copy link
Collaborator

tischi commented Jan 28, 2024

Hi @AnniekStok @manerotoni @maulakhan @tibuch @grinic et al.,

Would it be OK for you if, for the volume slicing module, I would

  1. Remove the "subsetting" part of the Figure? I don't think it fits here, because I think that subsetting (aka cropping) is nothing that is specific to volumetric data.
  2. Put much more emphasis on anisotropy! I think this is the biggest conceptual challenge in volume slicing and right now is only mentioned inside the activity implementations.
  3. For simplicity, just use single colour images in the activities? I think having multi-colour here will distract the students attention having to deal with channel sliders and LUTs.

I think this DNA metaphase plate would be a quite nice example image:

image

from: https://pubmed.ncbi.nlm.nih.gov/34787651/

What do you think?

@tischi tischi added the enhancement New feature or request label Jan 28, 2024
@AnniekStok
Copy link
Collaborator

Yes sounds good! I can also help if needed as I think I worked on part of this one before.

@tischi
Copy link
Collaborator Author

tischi commented Jan 28, 2024

Thanks @AnniekStok! I think the fastest is if I just do something and then ask you to review it.

@tischi
Copy link
Collaborator Author

tischi commented Jan 30, 2024

@AnniekStok I tried to modify the figure but the powerpoint drawings are not editable.

image

Do you have an editable version of this?

E.g.,

  1. I discussed with @maulakhan that it would be good to also add some random numbers in the currently empty voxels of the extracted slices.
  2. Maybe, for simplicity, we should remove the right part, where the extracted slice is rotated? In fact, I am anyway not sure that the position where the voxel with the value 1 ends up is where it typically would end up.
  3. We should come up with something do illustrate anisotropic voxels, do you have a suggestion?

@AnniekStok
Copy link
Collaborator

AnniekStok commented Jan 30, 2024

I believe @stemarcotti created this figure, and put the pptx file here: https://github.com/NEUBIAS/training-resources/files/7896791/20220118_slicing.pptx

Adding random numbers would make it clear that those pixels are not really empty, but that we just focus on the colored ones.

I think the rotation was there to make it clear that you have to rotate the image to see it on the 2D screen. Maybe we can visualize that somehow?

For anisotropic voxels, maybe we can just use elongated rectangles instead? E.g. (raw sketch):
image

But we would have to make clear somehow that the rectangles are always visualized as squares, so that what you see on your screen appears 'squished'.

@tischi
Copy link
Collaborator Author

tischi commented Jan 30, 2024

Thanks! The PPT you found is editable! I will copy this into the volume_slicing.pptx.

I simplified the figure now:

image

In BDV they are not squished, but rendered exactly as you depicted it.

image

So maybe, we could just have the above figure that @stemarcotti created but with anisotropic voxels? Then we would need only one drawing to show everything?

@tischi
Copy link
Collaborator Author

tischi commented Jan 30, 2024

In your sketch, I would rather elongate along the axis that runs from top to bottom...as I would find it more intuitive that that is the z-axis...

@AnniekStok
Copy link
Collaborator

Ok, sounds good! I can quickly remake it to have one like the updated one from @stemarcotti you just showed but with elongated voxels vertically?

@tischi
Copy link
Collaborator Author

tischi commented Jan 30, 2024

Thanks, that would be great! Are you using PPT? This would be important for compatibility.

@AnniekStok
Copy link
Collaborator

Illustrator, but the shapes are pastable in powerpoint so I can convert it for compatibility.

@AnniekStok
Copy link
Collaborator

This one should be editable (maybe we want to remove the 3d shapes in between and only show the flat one):
volume_slicing.pptx

@tischi
Copy link
Collaborator Author

tischi commented Jan 30, 2024

Thanks! Yeah, let's remove the shapes in-between. And could you make all the voxel size number letters the same size? I think it would look more beautiful.

@AnniekStok
Copy link
Collaborator

volume_slicing.pptx like this?

@tischi
Copy link
Collaborator Author

tischi commented Jan 30, 2024

In powerpoint it renders a bit weird:

image
  • Font size a bit too big
  • Strange thicker line between the 3rd and 4th column in the lower grid

Is that something you can fix? Otherwise I can do it.

@AnniekStok
Copy link
Collaborator

AnniekStok commented Jan 30, 2024

yes I can fix it
volume_slicing.pptx

@tischi
Copy link
Collaborator Author

tischi commented Jan 30, 2024

@AnniekStok sorry, the image dimensions (2,4) and (2,3) are missing in the slices; it turns out adding them in PPT is very painful, because, e.g., the arrows are not one object, but several. Could you maybe do the image dimensions in PPT? In general, I think the more of this is done in PPT the easier will it be for future contributors to to further work on this.

@AnniekStok
Copy link
Collaborator

volume_slicing.pptx
yes sorry, here it is

@tischi
Copy link
Collaborator Author

tischi commented Jan 30, 2024

Thanks! I think now it is good!

@tischi
Copy link
Collaborator Author

tischi commented Jan 30, 2024

@AnniekStok

Could you please review this module: https://neubias.github.io/training-resources/volume_slicing/index.html
And, once we agree on the content, could you please adapt the IJ-Macro implementation to match the GUI implementation ?
I am not sure we need to keep the Groovy or Jython part, I don't see myself teaching this, I think we will mostly teach python once it comes to more serious scripting...what do you think?

@AnniekStok
Copy link
Collaborator

AnniekStok commented Jan 30, 2024

Yes I can, you made the changes directly in the master branch, right? I made a new branch with pull request here:
https://github.com/NEUBIAS/training-resources/compare/volume_slicing_anniek?expand=1
it replaces the macro activity with the new image. I only implemented reslicing in the different directions to compare with/without interpolation, but not the 'line' reslicing or BDV since I thought that's more something you would do in the GUI. But if you think it's better I can put some preprogrammed line on it and reslice that.

I think a python activity slicing in numpy arrays could be nice? Instead of / in addition to the jython one?

@tischi
Copy link
Collaborator Author

tischi commented Jan 31, 2024

I think a python activity slicing in numpy arrays could be nice?

Of course, do you feel like adding it? You could take some of the other python code in other modules as templates.

@AnniekStok
Copy link
Collaborator

Yes I can, though not right away since this week is a bit busy. How about a python-napari-gui and a python-napari version (similar to imagej-gui and imagej-macro)?

@tischi
Copy link
Collaborator Author

tischi commented Feb 12, 2024

I am closing this issue now, because it has been refactored, but of course feel invited to still add some python implementations :-)

@AnniekStok
Copy link
Collaborator

A bit late but I have added a proposal for a python-napari implementation in the pull request here: #630

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

No branches or pull requests

2 participants