Apply manual segmentation to speed image

215 views
Skip to first unread message

Matthew Tranter

unread,
Oct 20, 2014, 6:28:10 AM10/20/14
to itksna...@googlegroups.com
Hello

I am trying to use ITK-Snap to segment from a T1 MRI image the skull, which I am managing to do rather well by using pre-segmentation clustering and then bubbles/snake etc. 

However, this sometimes causes the snakes to leak out of the head up to the border of the ROI. Is it possible to draw a non-cuboidal ROI, or is it possible to manually apply segmentation to alter the clustering to only include parts inside the head? 

Alternatively, is it possible to stop the segmentation at the clustering stage and then use manual segmentation on the image (i.e. draw with the paintbrush using the white parts of the clustered image (i.e. not the speed image) as the background? 

Many thanks for your help,
Matthew

Paul Yushkevich

unread,
Oct 20, 2014, 9:42:55 AM10/20/14
to itksna...@googlegroups.com
Hi Matthew,

You can save the speed image (and the corresponding ROI of the gray scale image) by going to the Layer Inspector (Tools menu), selecting the speed image, and choosing 'Save' in the context menu. Then you can load it as an overlay during manual segmentation.

Another trick is to paint some boundaries using some label (e.g., green label) and then set the background label to be the clear label (as opposed to the default of all labels). Then enter the automatic segmentation mode. Whatever segmentation you get with clustering and bubbles will only be applied to voxels that previously had the clear label, not the green voxels. 

Paul

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.
To post to this group, send email to itksna...@googlegroups.com.
Visit this group at http://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.



--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

Matthew Tranter

unread,
Oct 22, 2014, 10:32:30 AM10/22/14
to itksna...@googlegroups.com, pau...@mail.med.upenn.edu
Hi Paul

The latter works perfectly, thank you very much for your help. 

Best wishes,
Matthew

Matthew Tranter

unread,
Jan 28, 2015, 5:47:01 AM1/28/15
to itksna...@googlegroups.com, pau...@mail.med.upenn.edu
Hi Paul

I've started to experiment the first method you proposed and I would like to be able to export the speed image as a GIPL or other format, and then load this as a binary overlay so I can set the background label to be clear label and paint in the part of the MRI that isn't overlaid by the blue speed image. Is this possible?

Many thanks,
Matthew

Paul Yushkevich

unread,
Jan 28, 2015, 11:35:58 AM1/28/15
to Matthew Tranter, itksna...@googlegroups.com
Hi Matthew,

To save the speed image you can goto the layer inspector, right click on the image in the list of layers, and select the 'save' option. Then you can save in any number of formats.

Best
Paul
Paul A. Yushkevich, Ph.D.
Assistant Professor

Matthew Tranter

unread,
Feb 3, 2015, 5:02:32 PM2/3/15
to itksna...@googlegroups.com, matthew.t...@gmail.com
Hi Paul

Thank you for your reply. I've tried a number of formats (Nifti, Gipl etc.) and when I load them either as a segmentation or an overlay I can't make that overlaid/segmented image to be a label, as I would like to be able to paint in the parts that were not the speed image by setting 'clear label' as the background. Is this going to be possible or it Convert3d going to be the only option? 

Thanks again for your support with this.

Matthew

Paul Yushkevich

unread,
Feb 4, 2015, 11:07:34 AM2/4/15
to itksna...@googlegroups.com, Matthew Tranter
Matthew,

Let me understand: you would like to change parts of the speed image to zero using painting? I think the best solution is to use ITK-SNAP to draw a mask over the speed region, and then use convert3d to multiply the speed image by the mask.

Hope this is helpful!
Paul

don.un...@gmail.com

unread,
Jan 3, 2017, 8:40:21 AM1/3/17
to itksnap-users, pau...@mail.med.upenn.edu
Hi Paul,

thanks alot for that hint. I'm working on a MRT scan of a pidgeon brain, trying to extract the whole brain. But the borders of the scan are so poorly, that I didn't manage the usual algorithms to let the snake stay inside of it without making other parts of it unaccessible.

So I was trying your procedure to manually add borders for the snake where the scan has "holes":
- I've used the paintbrush to add green voxels in layer 2.
- I've selected "clear label" as "paint over" layer (I guess it was formerly known as background layer).
- "Active Label" is "layer 1" (red)
But When I start a threshholding segmentation snake, the green voxels disappear and the snake still runs out of the brain. What am I doing wrong?

More detailed: After pressing the snake button, the green voxels are still present. They disappear after pressing the "Segment 3D" button.

I'm currently using
Thanks in advance for ans answere.
Best regards

don.un...@gmail.com

unread,
Jan 3, 2017, 8:41:45 AM1/3/17
to itksnap-users, pau...@mail.med.upenn.edu
I'm currently using ITKsnap 3.6
sorry, that part of my post disappeared... 
Reply all
Reply to author
Forward
0 new messages