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