jordandekraker / HippUnfolding

Code for unfolding of hippocampal grey matter using Laplacian equation. Requires manual labelling of the hippocampal 'dark band' and grey matter, as well as some surrounding structures (see associated publication for instructions)
6 stars 4 forks source link

Example segmentation #2

Closed agt24 closed 6 years ago

agt24 commented 7 years ago

Hi @jordandekraker,

@Shotgunosine and I are working with @akeshavan on her project to build a brain segmentation program that works in the browser and on mobile devices (https://github.com/medulina, demo). We were wondering if we could use your example hippocampal segmentation as a training dataset?

We had some trouble getting the two nifti files in your example directory to overlay on top of each other nicely. They seem to be different sizes:

adamt@dsmlgpu:~/HippUnfolding/example$ c3d  EPI_V073.segmentation.rHPC.nii.gz -info
Image #1: dim = [520, 734, 534];  bb = {[-82.2932 -107.559 82.046], [73.7068 112.641 242.246]};  vox = [0.3, 0.3, 0.3];  range = [0, 23];  orient = SAR

adamt@dsmlgpu:~/HippUnfolding/example$ c3d EPI_V073.T1overT2.cropped.nii.gz -info
Image #1: dim = [54, 169, 94];  bb = {[-0.3 -0.3 0.3], [15.9 50.4 28.5]};  vox = [0.3, 0.3, 0.3];  range = [4.24845e-09, 1.8964e-06];  orient = LPI

adamt@dsmlgpu:~/HippUnfolding/example$ 

I've not had any luck getting the segmentation to display overlaid on the hippocampal image with any of the viewers I've tried (ITK-Snap, AFNI, FreeView, FSLeyes, etc.)

Any suggestions?

Thanks! -Adam

jordandekraker commented 7 years ago

Hi,

Thanks for your interest in our data, we are happy to have you use it in your browser based / mobile segmentation program. We just ask that you please include reference to our relevant paper, which you can find here:

DeKraker, J., Ferko, K. M., Lau, J. C., Köhler, S., & Khan, A. R. (2017). Unfolding the hippocampus: An intrinsic coordinate system for subfield segmentations and quantitative mapping. bioRxiv, 146878.

As for the image size issue, you are correct, the segmentation image was not cropped correctly. I have uploaded a new cropped version, as well as a cropped T2 image which the segmentation was performed directly on and which, in my opinion, looks nicer. We are also happy to share the full sized, whole brain coverage images if you like, just let me know.

Thanks, Jordan DeKraker

On Tue, Aug 15, 2017 at 1:02 PM, Adam Thomas notifications@github.com wrote:

Hi @jordandekraker https://github.com/jordandekraker,

@Shotgunosine https://github.com/shotgunosine and I are working with @akeshavan https://github.com/akeshavan on her project to build a brain segmentation program that works in the browser and on mobile devices ( https://github.com/medulina, demo <http:/medulina.com>). We were wondering if we could use your example hippocampal segmentation as a training dataset?

We had some trouble getting the two nifti files in your example https://github.com/jordandekraker/HippUnfolding/tree/master/example directory to overlay on top of each other nicely. They seem to be different sizes:

adamt@dsmlgpu:~/HippUnfolding/example$ c3d EPI_V073.segmentation.rHPC.nii.gz -info Image #1: dim = [520, 734, 534]; bb = {[-82.2932 -107.559 82.046], [73.7068 112.641 242.246]}; vox = [0.3, 0.3, 0.3]; range = [0, 23]; orient = SAR

adamt@dsmlgpu:~/HippUnfolding/example$ c3d EPI_V073.T1overT2.cropped.nii.gz -info Image #1: dim = [54, 169, 94]; bb = {[-0.3 -0.3 0.3], [15.9 50.4 28.5]}; vox = [0.3, 0.3, 0.3]; range = [4.24845e-09, 1.8964e-06]; orient = LPI

adamt@dsmlgpu:~/HippUnfolding/example$

I've not had any luck getting the segmentation to display overlaid on the hippocampal image with any of the viewers I've tried (ITK-Snap, AFNI, FreeView, FSLeyes, etc.)

Any suggestions?

Thanks! -Adam

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/AX8XfLFU9LUuWQy757pqHu4SQkuy--_Qks5sYc8ugaJpZM4O32Ca .

agt24 commented 7 years ago

Thanks for the quick reply, @jordandekraker ! Will definitely cite you on any and all pubs and presentations.

I re-downloaded the files, but I'm still not getting the segmentation to overlay (screenshot attached).

Are you also using ITK-Snap? If you can tell me more about the image processing/viewing suite you're using, I can try to duplicate it locally.

screenshot 2017-08-15 14 03 36

jordandekraker commented 7 years ago

Ah I think I know the issue. I am also using ITKSNAP (itksnap-3.6.0-20170401-Linux-x86_64), and the way i am viewing the segmentation is via Segmentation > Open segmentation..., rather than by adding it as an image overlay. I suspect differences in the header information is why it won't work when added as an overlay. I will try to correct that to avoid confusion. In the meantime you should be able to view them using Open Segmentation.

Thanks for pointing this out, Jordan

On Tue, Aug 15, 2017 at 2:07 PM, Adam Thomas notifications@github.com wrote:

Thanks for the quick reply, @jordandekraker https://github.com/jordandekraker ! Will definitely cite you on any and all pubs and presentations.

I re-downloaded the files, but I'm still not getting the segmentation to overlay (screenshot attached).

Are you also using ITK-Snap? If you can tell me more about the image processing/viewing suite you're using, I can try to duplicate it locally.

[image: screenshot 2017-08-15 14 03 36] https://user-images.githubusercontent.com/7869017/29329124-cccf4712-81c2-11e7-8ee1-b12250e50560.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2#issuecomment-322543506, or mute the thread https://github.com/notifications/unsubscribe-auth/AX8XfADaQsrR0Hd_RNyHkWwhybzfrIblks5sYd5ZgaJpZM4O32Ca .

jordandekraker commented 7 years ago

Should be fixed now. Thanks again for bringing this to my attention to avoid confusion in the future!

Looking forward to seeing the segmentation program that you produce, Jordan

On Tue, Aug 15, 2017 at 2:22 PM, Jordan DeKraker jdekrake@uwo.ca wrote:

Ah I think I know the issue. I am also using ITKSNAP (itksnap-3.6.0-20170401-Linux-x86_64), and the way i am viewing the segmentation is via Segmentation > Open segmentation..., rather than by adding it as an image overlay. I suspect differences in the header information is why it won't work when added as an overlay. I will try to correct that to avoid confusion. In the meantime you should be able to view them using Open Segmentation.

Thanks for pointing this out, Jordan

On Tue, Aug 15, 2017 at 2:07 PM, Adam Thomas notifications@github.com wrote:

Thanks for the quick reply, @jordandekraker https://github.com/jordandekraker ! Will definitely cite you on any and all pubs and presentations.

I re-downloaded the files, but I'm still not getting the segmentation to overlay (screenshot attached).

Are you also using ITK-Snap? If you can tell me more about the image processing/viewing suite you're using, I can try to duplicate it locally.

[image: screenshot 2017-08-15 14 03 36] https://user-images.githubusercontent.com/7869017/29329124-cccf4712-81c2-11e7-8ee1-b12250e50560.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2#issuecomment-322543506, or mute the thread https://github.com/notifications/unsubscribe-auth/AX8XfADaQsrR0Hd_RNyHkWwhybzfrIblks5sYd5ZgaJpZM4O32Ca .

agt24 commented 7 years ago

Huzzah, it works! We now have your data live at http://medulina.com. Labelling the dark band in single coronal slices is pretty tricky though. You can see the user performance statistics at http://medulina.com/dashboard

We might try sagittal instead.

Would you be able to share additional segmentations? I'm working on adding some of our hippocampal scans, but I haven't labelled them according to your instructions yet. Ours are T2* weighted, but the band is still visible.

jordandekraker commented 7 years ago

Very nice, looks great. Happy to share the rest of our atlas (12 subjects), we'll just have to de-identify everything in them first, which I can do tomorrow. Is there any advantage to having the whole brain image? Because otherwise I'll just crop around the hippocampus for all of them. Also, do you prefer them in coronal or coronal-oblique-to-the-hippocampus orientation?

Jordan

On Aug 15, 2017 6:12 PM, "Adam Thomas" notifications@github.com wrote:

Huzzah, it works! We now have your data live at http://medulina.com. Labelling the dark band in single coronal slices is pretty tricky though. You can see the user performance statistics at http://medulina.com/dashboard

We might try sagittal instead.

Would you be able to share additional segmentations? I'm working on adding some of our hippocampal scans, but I haven't labelled them according to your instructions yet. Ours are T2* weighted, but the band is still visible.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2#issuecomment-322604091, or mute the thread https://github.com/notifications/unsubscribe-auth/AX8XfOvvjqyIJTOq5aQET0rBmD7lz87_ks5sYhekgaJpZM4O32Ca .

agt24 commented 7 years ago

Excellent! Hippocampal-cropped data is fine. The example you have in the example directory is the latter "coronal-oblique-to-the-hippocampus" orientation, correct? If so, let's stick with that. I think it's easier to do the labelling in that orientation.

Thank you! Will keep you posted on the progress.

jordandekraker commented 7 years ago

OK you should be able to access the entire atlas here: https://www.nitrc.org/frs/?group_id=1126

I haven't given much online documentation yet and will do that over the next couple days. In the mean time if you have any questions feel free to email me.

Cheers, Jordan

On Tue, Aug 15, 2017 at 7:07 PM, Adam Thomas notifications@github.com wrote:

Excellent! Hippocampal-cropped data is fine. The example you have in the example directory is the latter "coronal-oblique-to-the-hippocampus" orientation, correct? If so, let's stick with that. I think it's easier to do the labelling in that orientation.

Thank you! Will keep you posted on the progress.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2#issuecomment-322613498, or mute the thread https://github.com/notifications/unsubscribe-auth/AX8XfJcyIT6D-HGGf8s_NATojXyEz1ZFks5sYiS1gaJpZM4O32Ca .

agt24 commented 7 years ago

Awesome! Thanks @jordandekraker!

Shotgunosine commented 7 years ago

@jordandekraker We've got one of you're labeled dentate gyruses up at dg.medulina.com. The feedback we've gotten from users is that the dentate gyrus mask often doesn't seem to line up with any discernible features on the MRI. I'd love if you had a chance to take a look and see what you thought.

I'd be curious to see if the raw manual traces, pre-erosion and dilation still line up better with the features in the MRI. Do you have those files around by any chance?

Thanks,

Dylan

jordandekraker commented 7 years ago

Hi,

Thanks for getting in touch, I'm happy to comment on this issue.

After a quick look at the link you sent, it looks like the labels may have gotten swapped. The label that was actually traced there is the 'dark band' or SRLM cell layers alongside the vestigial hippocmapal sulcus. Overlap scores tended to be low in this structure because it is very thin, but in our associated paper we suggest that this label should not be used as an independent ROI because it contains white matter and nonpenetrating blood vessels in the hippocampal sulcus. Instead, we use it to distinguish the separate folds along hippocampal archicortex (https://www.biorxiv.org/ content/early/2017/06/07/146878). Also because this structure is so thin, it might make sense to use a different type of error metric, such as average surface distance. One other comment is that the dark band is indeed hard to see in some slices, in which case we made use of 3d information from the other planes of view, a concurrently updated 3d model, and surrounding slices to estimate the trajectory of the 'dark band'. I know this may not be easy to implement in your current platform, but I still think it's worth to collect tracing data from individual slices. Even though we don't necessarily care about the inclusion of specific voxels in the dark band, tracing it allows us to understand the overall folded topology of the hippocampus.

If you are also interested in tracing the dentate gyrus as well, then let me know and I can get back to you on that.

Thanks, Jordan DeKraker

On Oct 2, 2017 5:08 PM, "Dylan Nielson" notifications@github.com wrote:

@jordandekraker https://github.com/jordandekraker We've got one of you're labeled dentate gyruses up at dg.medulina.com. The feedback we've gotten from users is that the dentate gyrus mask often doesn't seem to line up with any discernible features on the MRI. I'd love if you had a chance to take a look and see what you thought.

I'd be curious to see if the raw manual traces, pre-erosion and dilation still line up better with the features in the MRI. Do you have those files around by any chance?

Thanks,

Dylan

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2#issuecomment-333665732, or mute the thread https://github.com/notifications/unsubscribe-auth/AX8XfOuXGj4XTvydJe2qQQcDqKyYCbC7ks5soVDWgaJpZM4O32Ca .

Shotgunosine commented 7 years ago

My mistake, I meant dark band, not dentate gyrus. Do you think that averaging the attempts of several people to segment the dark band on each slice will allow us to generate a good enough dark band mask to execute the unfolding? Or do we need to give them the supplementary information from surrounding slices and other orientations? The reason we've limited it to a single slice at a time is that for tasks on mechanical turk, there is a premium on having small quick tasks. I'm worried that if we give them all of that additional information, the task will be overwhelming and fewer turkers will complete our task.

Thanks,

Dylan

On Tue, Oct 3, 2017 at 10:24 AM, jordandekraker notifications@github.com wrote:

Hi,

Thanks for getting in touch, I'm happy to comment on this issue.

After a quick look at the link you sent, it looks like the labels may have gotten swapped. The label that was actually traced there is the 'dark band' or SRLM cell layers alongside the vestigial hippocmapal sulcus. Overlap scores tended to be low in this structure because it is very thin, but in our associated paper we suggest that this label should not be used as an independent ROI because it contains white matter and nonpenetrating blood vessels in the hippocampal sulcus. Instead, we use it to distinguish the separate folds along hippocampal archicortex (https://www.biorxiv.org/ content/early/2017/06/07/146878). Also because this structure is so thin, it might make sense to use a different type of error metric, such as average surface distance. One other comment is that the dark band is indeed hard to see in some slices, in which case we made use of 3d information from the other planes of view, a concurrently updated 3d model, and surrounding slices to estimate the trajectory of the 'dark band'. I know this may not be easy to implement in your current platform, but I still think it's worth to collect tracing data from individual slices. Even though we don't necessarily care about the inclusion of specific voxels in the dark band, tracing it allows us to understand the overall folded topology of the hippocampus.

If you are also interested in tracing the dentate gyrus as well, then let me know and I can get back to you on that.

Thanks, Jordan DeKraker

On Oct 2, 2017 5:08 PM, "Dylan Nielson" notifications@github.com wrote:

@jordandekraker https://github.com/jordandekraker We've got one of you're labeled dentate gyruses up at dg.medulina.com. The feedback we've gotten from users is that the dentate gyrus mask often doesn't seem to line up with any discernible features on the MRI. I'd love if you had a chance to take a look and see what you thought.

I'd be curious to see if the raw manual traces, pre-erosion and dilation still line up better with the features in the MRI. Do you have those files around by any chance?

Thanks,

Dylan

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2#issuecomment- 333665732, or mute the thread https://github.com/notifications/unsubscribe-auth/ AX8XfOuXGj4XTvydJe2qQQcDqKyYCbC7ks5soVDWgaJpZM4O32Ca .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2#issuecomment-333858386, or mute the thread https://github.com/notifications/unsubscribe-auth/AFC1mKisv_3w5tOM5lvLagHVNsSr4jx0ks5sokOGgaJpZM4O32Ca .

jordandekraker commented 7 years ago

Yes, I definitely think it makes sense to average several attempts together and hopefully over several traces a somewhat sharp consensus is achieved. Might not be a bad idea to constrain users to a given brush size (e.g. 2 voxels is what we used), or else apply some blurring to the labels before averaging to ensure traces that are very close but not quite overlapping affect the average more than traces that are not close to each other.

I can look to see if we have some traces that look sharper than these, but I don't know if that will help with the overall goal the dilated and eroded images have much improved alignment between slices. Another few ideas might be to have users trace a few sagittal slices too, give some written descriptions, or use gaussian blurred ground truth reference, or sometimes I find it helps to be able to zoom out even further (I could provide data with a wider crop). But I agree its a challenging structure to see without having strong priors in mind about the overall shape and folding of the hippocampus.

I hope this is some help, Jordan

On Tue, Oct 3, 2017 at 10:45 AM, Dylan Nielson notifications@github.com wrote:

My mistake, I meant dark band, not dentate gyrus. Do you think that averaging the attempts of several people to segment the dark band on each slice will allow us to generate a good enough dark band mask to execute the unfolding? Or do we need to give them the supplementary information from surrounding slices and other orientations? The reason we've limited it to a single slice at a time is that for tasks on mechanical turk, there is a premium on having small quick tasks. I'm worried that if we give them all of that additional information, the task will be overwhelming and fewer turkers will complete our task.

Thanks,

Dylan

On Tue, Oct 3, 2017 at 10:24 AM, jordandekraker notifications@github.com wrote:

Hi,

Thanks for getting in touch, I'm happy to comment on this issue.

After a quick look at the link you sent, it looks like the labels may have gotten swapped. The label that was actually traced there is the 'dark band' or SRLM cell layers alongside the vestigial hippocmapal sulcus. Overlap scores tended to be low in this structure because it is very thin, but in our associated paper we suggest that this label should not be used as an independent ROI because it contains white matter and nonpenetrating blood vessels in the hippocampal sulcus. Instead, we use it to distinguish the separate folds along hippocampal archicortex (https://www.biorxiv.org/ content/early/2017/06/07/146878). Also because this structure is so thin, it might make sense to use a different type of error metric, such as average surface distance. One other comment is that the dark band is indeed hard to see in some slices, in which case we made use of 3d information from the other planes of view, a concurrently updated 3d model, and surrounding slices to estimate the trajectory of the 'dark band'. I know this may not be easy to implement in your current platform, but I still think it's worth to collect tracing data from individual slices. Even though we don't necessarily care about the inclusion of specific voxels in the dark band, tracing it allows us to understand the overall folded topology of the hippocampus.

If you are also interested in tracing the dentate gyrus as well, then let me know and I can get back to you on that.

Thanks, Jordan DeKraker

On Oct 2, 2017 5:08 PM, "Dylan Nielson" notifications@github.com wrote:

@jordandekraker https://github.com/jordandekraker We've got one of you're labeled dentate gyruses up at dg.medulina.com. The feedback we've gotten from users is that the dentate gyrus mask often doesn't seem to line up with any discernible features on the MRI. I'd love if you had a chance to take a look and see what you thought.

I'd be curious to see if the raw manual traces, pre-erosion and dilation still line up better with the features in the MRI. Do you have those files around by any chance?

Thanks,

Dylan

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2#issuecomment- 333665732, or mute the thread https://github.com/notifications/unsubscribe-auth/ AX8XfOuXGj4XTvydJe2qQQcDqKyYCbC7ks5soVDWgaJpZM4O32Ca .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2#issuecomment- 333858386, or mute the thread https://github.com/notifications/unsubscribe-auth/AFC1mKisv_ 3w5tOM5lvLagHVNsSr4jx0ks5sokOGgaJpZM4O32Ca .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jordandekraker/HippUnfolding/issues/2#issuecomment-333865189, or mute the thread https://github.com/notifications/unsubscribe-auth/AX8XfERyFgum3CYOJp6TdqtKx1ducnmSks5sokiSgaJpZM4O32Ca .