cortex-lab / allenCCF

Tools to work with Allen Inst CCF data in matlab
124 stars 78 forks source link

Sagittal Slices #28

Open alex-attinger opened 5 years ago

alex-attinger commented 5 years ago

First of all, thanks a lot for making this tool available! I was wondering if there is a way to make it work with sagittal slices?

philshams commented 5 years ago

I've just added this functionality (and transverse slices too).

In _Navigate_Atals_and_RegisterSlices.m, simply add your desired plane

% plane to view ('coronal', 'sagittal', 'transverse')
plane = 'coronal';

This will apply the relevant permutation to the 3D brain array. You'll also now need to put down this same parameter in the _Display_ProbeTrack.m script, in the additional parameters section.

kouichi-c-nakamura commented 5 years ago

For clarity, does this commit mentioned above allow registering sagittal sections? Not just browsing?

philshams commented 5 years ago

Yes, the procedure for transformation/registering slices should work the same as with coronal sections. The only difference is that the clicked points' x, y, and z axes will be flipped around. So you'll need to include the plane parameter in the Display_Probe_Track.m script (or change the axes accordingly anywhere else you use those points).

alex-attinger commented 5 years ago

Thank you! Atlas Viewer now displays sagittal slices. However, there seems to be something off with the transform (see below). Any ideas how it could be fixed? image

I think its has to do with the aspect ratio/size of the Atlas Viewer image vs the Slice Viewer image. For 'coronal', the two are identical. But for 'sagittal', they are not (no longer visible after images are overlaid). For me, things look a lot better after changing

https://github.com/cortex-lab/allenCCF/blob/427d64c3c0772f7be4a138ed55d2ae18db626586/SHARP-Track/Navigate_Atlas_and_Register_Slices.m#L52

to reference_size = size(tv_plot)

philshams commented 5 years ago

Thank you -- I've just pushed that change

juliencarponcy commented 5 years ago

Hello,

Just a comment to say that browsing through sagittal sections there is a minor bug that I've spotted so far. In the atlas viewer, you have to switch to mode "scroll along A/P axis" to actually go over different slices along the Medio-Lateral axis to browse between different para-sagittal plans. An the scroll along slice images does not do anything besides changing the name of Slice 2. 3 . 4.... in the top left corner of the Atlas viewer. I still have to use it more to see whether that could affects results or if it is just a display issue.

Thanks for your work,

Julien

kouichi-c-nakamura commented 2 years ago

Made a Pull Request https://github.com/cortex-lab/allenCCF/pull/58

kouichi-c-nakamura commented 2 years ago

Here is proof that the tool really works for parasagittal sections (BTW, I think it's officially called "parasagittal", rather than "sagittal," meaning that it is parallel to the sagittal plane which lies at the midline)

MicrosoftTeams-image