<div dir="ltr">The steps I've given should also work in 3D if the slice thickness is low enough to provide the connectivity between slices. Personally, I haven't had much luck with the vesselness family. My rule of thumb is that if they happen to work, then a simple morphological approach will probably work too, more reliably and with fewer parameters to fiddle :-).</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 23, 2013 at 5:36 PM, Dan Mueller <span dir="ltr"><<a href="mailto:dan.muel@gmail.com" target="_blank">dan.muel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Gib,<br>
<br>
Some more food for thought:<br>
<br>
(1) If you have a 3D image (as opposed to 2D slices) you may consider<br>
using Hessian-based vesselness enhancement:<br>
<a href="http://www.itk.org/Doxygen/html/classitk_1_1Hessian3DToVesselnessMeasureImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1Hessian3DToVesselnessMeasureImageFilter.html</a><br>
<a href="http://www.itk.org/Doxygen/html/classitk_1_1MultiScaleHessianBasedMeasureImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1MultiScaleHessianBasedMeasureImageFilter.html</a><br>
<a href="http://www.insight-journal.org/browse/publication/314" target="_blank">http://www.insight-journal.org/browse/publication/314</a><br>
<a href="http://www.insight-journal.org/browse/publication/175" target="_blank">http://www.insight-journal.org/browse/publication/175</a><br>
<a href="http://www.insight-journal.org/browse/publication/163" target="_blank">http://www.insight-journal.org/browse/publication/163</a><br>
<br>
This class of filters can enhance tube-like structures (e.g. vessels),<br>
while suppressing sheet like structures i.e. the outer border of your<br>
object.<br>
<br>
(2) You could consider using an active contour method to segment the<br>
outer structure (replacing step 1 in Richard's proposal above). You<br>
could achieve this by initializing the contour as the edge of your<br>
image, then shrink the contour until it attaches to the boundary of<br>
the tissue. Then continue to follow Richard's second step and remove<br>
the outer structure by erosion + masking.<br>
<br>
Good luck.<br>
<br>
Cheers, Dan<br>
<div class="HOEnZb"><div class="h5"><br>
On 23 May 2013 11:16, Gib Bogle <<a href="mailto:g.bogle@auckland.ac.nz">g.bogle@auckland.ac.nz</a>> wrote:<br>
> Hi Richard,<br>
><br>
> I don't have other staining.<br>
><br>
> Thanks for your suggestion of a procedure. I will have to study it and<br>
> understand it, before I can comment on it.<br>
><br>
> Gib<br>
><br>
><br>
> On 23/05/2013 12:25 p.m., Richard Beare wrote:<br>
><br>
> Hi,<br>
> I'm not sure I understand completely, but here's my suggestion of an<br>
> approach. It may turn out to be easier if you have other staining too.<br>
><br>
> 1) Segment the entire tissue - i.e generate one large object that contains<br>
> all your small vessels and a boundary on your layer that you need to peel.<br>
> More on how this might be achieved later.<br>
><br>
> 2) Erode this object and use the eroded version to mask out the accidental<br>
> staining - i.e. do the peeling. Then apply your normal segmentation to what<br>
> is left.<br>
><br>
> If you have another channel where all the tissue has contrast then<br>
> segmenting the tissue will be relatively easy. Otherwise it will be a bit<br>
> more of a challenge. My first guess if the latter is the case is to use 2<br>
> markers in a watershed. One marker will be the image border (definitely<br>
> outside the tissue). Create the marker image as follows.<br>
> a) Apply a large closing, say about 15% of the tissue size. This will<br>
> connect your interior objects together. Threshold the result, choose the<br>
> largest connected component, then erode that component a little to make sure<br>
> it stays inside the tissue and use the result as your foreground marker. Use<br>
> rectangular structuring elements for the closing so you can take advantage<br>
> of fast operations.<br>
> b) put the two markers together in an image such that they have different<br>
> voxel values - i.e. image border has value 2, inside marker from step a has<br>
> value 1.<br>
><br>
> Use the combined image as the marker image for the morphological markers<br>
> filter, use the original as the control. You may need to smooth the original<br>
> to close boundary gaps in faint areas. You shouldn't need to take a gradient<br>
> because the staining forms a line which the watershed should find.<br>
><br>
> Select the foreground label from the watershed result. Erode it a bit<br>
> (you'll need to look to confirm how much).<br>
><br>
> If there is a gap then the watershed will leak through, but this won't<br>
> matter as you are going to erode the mask and areas with gaps don't need to<br>
> be corrected anyway.<br>
><br>
><br>
> On Thu, May 23, 2013 at 7:47 AM, Gib Bogle <<a href="mailto:g.bogle@auckland.ac.nz">g.bogle@auckland.ac.nz</a>> wrote:<br>
>><br>
>> I didn't think there would be a stock filter, but maybe somebody else has<br>
>> addressed this.<br>
>><br>
>> I have attached a typical frame. I can't show the wanted result, but I<br>
>> think it's obvious when you know that the interior of this piece of tissue<br>
>> has the blood vessels stained, while the faint rim is clearly not blood<br>
>> vessel. The problem is that there will in general be many vessels stained<br>
>> to a similar intensity as this rim.<br>
>><br>
>> Gib<br>
>><br>
>><br>
>> On 23/05/2013 8:53 a.m., Dženan Zukić wrote:<br>
>><br>
>> I don't think there is any stock filter which does what you want. And I<br>
>> still don't understand your situation. Can you show us an example slice and<br>
>> wanted result?<br>
>><br>
>><br>
>> On Wed, May 22, 2013 at 10:50 PM, Gib Bogle <<a href="mailto:g.bogle@auckland.ac.nz">g.bogle@auckland.ac.nz</a>><br>
>> wrote:<br>
>>><br>
>>> The reason why I don't think erode will work is that the part of the<br>
>>> image that contains the information of interest is made up of many<br>
>>> disconnected pieces, not very different from the boundary layer that I want<br>
>>> to remove. The only thing that I can use to distinguish the pixels that<br>
>>> need to be removed is that they are near the outside of the region. If I<br>
>>> apply erosion I will remove many small but important features (this is<br>
>>> labelled vasculature, and I do not want to lose fine capillaries).<br>
>>><br>
>>> Gib<br>
>>><br>
>>><br>
>>> On 22/05/2013 11:12 p.m., Dženan Zukić wrote:<br>
>>><br>
>>><br>
>>> <a href="http://www.itk.org/Doxygen/html/group__MathematicalMorphologyImageFilters.html" target="_blank">http://www.itk.org/Doxygen/html/group__MathematicalMorphologyImageFilters.html</a><br>
>>><br>
>>> What you probably want to do is BinaryErode and BinaryDilate.<br>
>>><br>
>>><br>
>>> On Wed, May 22, 2013 at 7:04 AM, gib <<a href="mailto:g.bogle@auckland.ac.nz">g.bogle@auckland.ac.nz</a>> wrote:<br>
>>>><br>
>>>> It's hard to know what to call the processing I want to apply. I have a<br>
>>>> set<br>
>>>> of biological images (actually a 3D image, but for now I'm happy to<br>
>>>> process<br>
>>>> the frames one-by-one) in which the region of interest has an irregular<br>
>>>> and<br>
>>>> incomplete labelled layer around the boundary. The staining of the<br>
>>>> layer<br>
>>>> was unintended, and its presence interferes with the segmentation that I<br>
>>>> am<br>
>>>> doing. The part of the image that I want to extract is made up of many<br>
>>>> disconnected objects, and there is not much difference in the intensity<br>
>>>> ranges of the objects of interest and the unwanted edge. I am willing<br>
>>>> to<br>
>>>> trim a few pixels off the boundary all the way around - this will not<br>
>>>> cause<br>
>>>> much loss of information. What I need is way to determine a sequence of<br>
>>>> pixels that in some sense defines the extent of the labelled region in<br>
>>>> the<br>
>>>> image, rather like a 2D shrink wrapping. I could then use this to shave<br>
>>>> or<br>
>>>> peel off the outer layer of pixels.<br>
>>>><br>
>>>> Does this process have a name? Are there any existing filters or code<br>
>>>> to do<br>
>>>> this? Any clever suggestions (I have some ideas)?<br>
>>>><br>
>>>> Thanks<br>
>>>> Gib<br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> View this message in context:<br>
>>>> <a href="http://itk-insight-users.2283740.n2.nabble.com/Peel-an-image-tp7583137.html" target="_blank">http://itk-insight-users.2283740.n2.nabble.com/Peel-an-image-tp7583137.html</a><br>
>>>> Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
>>>> _____________________________________<br>
>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>><br>
>>>> Visit other Kitware open-source projects at<br>
>>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>><br>
>>>> Kitware offers ITK Training Courses, for more information visit:<br>
>>>> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
>>>><br>
>>>> Please keep messages on-topic and check the ITK FAQ at:<br>
>>>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>>>><br>
>>>> Follow this link to subscribe/unsubscribe:<br>
>>>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Dr. Gib Bogle<br>
>>> Senior Research Fellow<br>
>>> Auckland Bioengineering Institute<br>
>>> University of Auckland<br>
>>> New Zealand<br>
>>><br>
>>> <a href="http://www.bioeng.auckland.ac.nz" target="_blank">http://www.bioeng.auckland.ac.nz</a><br>
>>><br>
>>> <a href="mailto:g.bogle@auckland.ac.nz">g.bogle@auckland.ac.nz</a><br>
>>> (64-9) 373-7599 Ext. 87030<br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Dr. Gib Bogle<br>
>> Senior Research Fellow<br>
>> Auckland Bioengineering Institute<br>
>> University of Auckland<br>
>> New Zealand<br>
>><br>
>> <a href="http://www.bioeng.auckland.ac.nz" target="_blank">http://www.bioeng.auckland.ac.nz</a><br>
>><br>
>> <a href="mailto:g.bogle@auckland.ac.nz">g.bogle@auckland.ac.nz</a><br>
>> (64-9) 373-7599 Ext. 87030<br>
>><br>
>><br>
>> _____________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Kitware offers ITK Training Courses, for more information visit:<br>
>> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
>><br>
>> Please keep messages on-topic and check the ITK FAQ at:<br>
>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Dr. Gib Bogle<br>
> Senior Research Fellow<br>
> Auckland Bioengineering Institute<br>
> University of Auckland<br>
> New Zealand<br>
><br>
> <a href="http://www.bioeng.auckland.ac.nz" target="_blank">http://www.bioeng.auckland.ac.nz</a><br>
><br>
> <a href="mailto:g.bogle@auckland.ac.nz">g.bogle@auckland.ac.nz</a><br>
> (64-9) 373-7599 Ext. 87030<br>
><br>
><br>
> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
</div></div></blockquote></div><br></div>