[ITK] ITK Example ShapeOpeningLabelMapFilter

Dženan Zukić dzenanz at gmail.com
Sat Aug 20 17:41:34 EDT 2016


Hi Jeanna,

you can do a few things. The easiest would be to record chromaticity for
each pixel when converting to grayscale, and then filter out the yellowish
pixels with high intensity after objectness filter.

You can also do a non-standard conversion from RGB to grayscale, which
emphasizes the red blood vessels already there. The easiest kind would be
to just extract the red channel instead of the standard RGB->gray
conversion. Another approach, which reduces de-empahasizes pixels which are
far from red is possible.

Probably the hardest, but complimentary to the above two approaches is
detecting the yellow spot, and starting from there trace the blood vessels
(something similar to Canny filter which is also implemented in ITK). You
can use the criterion that the vessels will only get thinner. Somewhat
similar is to try the objectness filter with settings for detecting blobs -
and subtract those from your vessel-enhancing filter output.

Regards,
Dženan

On Sat, Aug 20, 2016 at 5:06 PM, Jeanna S. <jeannasheen at gmail.com> wrote:

> Hi Dženan,
>
> Thanks for the suggestion. The multiscale filter gives much better
> results, I have attached the output to this email. I was wondering if there
> were any other settings I could change besides the sigma maximum and
> minimum which would be able to remove the last of the blobs. Right now my
> sigma maximum is 2.
>
> Thanks,
> Jeanna
>
> On Thu, Aug 11, 2016 at 4:51 AM, Dženan Zukić <dzenanz at gmail.com> wrote:
>
>> Hi Jeanna,
>>
>> since this is a 2D image, you may pay some extra computation to get
>> better results. Try using multi-scale
>> <https://itk.org/Doxygen/html/SphinxExamples_2src_2Nonunit_2Review_2SegmentBloodVesselsWithMultiScaleHessianBasedMeasure_2Code_8cxx-example.html#_a3>
>> approach, and then filter out smaller vessels.
>>
>> Regards
>>
>> On Wed, Aug 10, 2016 at 9:30 PM, Jeanna S. <jeannasheen at gmail.com> wrote:
>>
>>> Hi Dženan,
>>>
>>> I actually found that I had to put objectnessFilter->SetScaleObje
>>> ctnessMeasure(false);. I already had objectnessFilter->SetBrightObject(false);
>>> and  objectnessFilter->SetObjectDimension(1);. Now the output, which
>>> I've attached, is much better, though it still shows some of the blobs.
>>> Thanks for all your help.
>>>
>>> Jeanna
>>>
>>> On Wed, Aug 10, 2016 at 4:59 AM, Dženan Zukić <dzenanz at gmail.com> wrote:
>>>
>>>> Hi Jeanna,
>>>>
>>>> by taking a look at the output, you need objectnessFilter->SetBrightObj
>>>> ect(false); and a larger size of objectnessFilter->SetObjectDim
>>>> ension();
>>>>
>>>> HTH,
>>>> Dženan
>>>>
>>>> On Wed, Aug 10, 2016 at 12:01 AM, Jeanna S. <jeannasheen at gmail.com>
>>>> wrote:
>>>>
>>>>> Thanks for letting me know. I've changed the output image type to
>>>>> float and now it no longer shows up as just black. I've attached my output
>>>>> image (the image on the left is the input image; the image on the right is
>>>>> the output image). However, the filter seems not to detect blood vessels
>>>>> like I hoped, even after testing various values of Alpha, Beta, and Gamma.
>>>>> I was wondering if anybody has suggestions on how to improve the vessel
>>>>> detection?
>>>>>
>>>>> Thanks,
>>>>> Jeanna
>>>>>
>>>>> On Tue, Aug 9, 2016 at 6:29 AM, Dženan Zukić <dzenanz at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Jeanna,
>>>>>>
>>>>>> output of this filter is in [0,1] range, and if your output image
>>>>>> type is not float then you will get an all-black image. Here is an example
>>>>>> invocation:
>>>>>>
>>>>>>     typedef itk::HessianToObjectnessMeasureImageFilter<
>>>>>> HessianImageType, FloatImageType > ObjectnessFilterType;
>>>>>>     ObjectnessFilterType::Pointer objectnessFilter =
>>>>>> ObjectnessFilterType::New();
>>>>>>     objectnessFilter->SetBrightObject(true);
>>>>>>     objectnessFilter->SetScaleObjectnessMeasure(false);
>>>>>>     objectnessFilter->SetObjectDimension(2.5);
>>>>>>     objectnessFilter->SetAlpha(0.5);
>>>>>>     objectnessFilter->SetBeta(1.0);
>>>>>>     objectnessFilter->SetGamma(5.0);
>>>>>>     objectnessFilter->SetInput(hc->GetOutput());
>>>>>>     objectnessFilter->Update();
>>>>>>     FloatImageType::Pointer objectness =
>>>>>> objectnessFilter->GetOutput();
>>>>>>
>>>>>> On Mon, Aug 8, 2016 at 9:38 PM, Jeanna S. <jeannasheen at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Actually, I found a way to display the images to the screen.
>>>>>>> However, I am still not quite sure how to detect the blood vessels
>>>>>>> in my image. When I apply the itkHessianToObjectnessMeasureImageFilter
>>>>>>> on my image, it just turns out black. I was wondering if this is because
>>>>>>> there is not enough contrast between the vessels and the background. If so,
>>>>>>> is there any setting or threshold on the filter I can change so that it can
>>>>>>> detect the blood vessels?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Jeanna
>>>>>>>
>>>>>>> On Mon, Aug 8, 2016 at 4:37 PM, Jeanna S. <jeannasheen at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Timothee,
>>>>>>>>
>>>>>>>> I'm using the itk:HessianToObjectnessMeasureImageFilter that you
>>>>>>>> suggested. I was wondering if there is any way for me to view the image on
>>>>>>>> the screen after it has been run through the filter, and if you have any
>>>>>>>> examples of the filter working on an image.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Jeanna
>>>>>>>>
>>>>>>>> On Sun, Aug 7, 2016 at 4:13 PM, Jeanna S. <jeannasheen at gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Timothee,
>>>>>>>>>
>>>>>>>>> Thank you for replying. I will look into these methods.
>>>>>>>>>
>>>>>>>>> Jeanna
>>>>>>>>>
>>>>>>>>> On Wed, Aug 3, 2016 at 1:59 AM, Timothee Evain <
>>>>>>>>> tevain at telecom-paristech.fr> wrote:
>>>>>>>>>
>>>>>>>>>> Hello Jeanna,
>>>>>>>>>>
>>>>>>>>>> I think this will be difficult just with the LabelMap framework.
>>>>>>>>>> Usually to filter vessels you rely on some measures based on
>>>>>>>>>> their shape, but in the ShapeLabelObject, the elongation measure is "the
>>>>>>>>>> ratio of the longest physical size of the region [i.e. the bounding box] on
>>>>>>>>>> one dimension and its smallest physical size". This is a quite coarse
>>>>>>>>>> measure, sensitive to rotation, and I doubt it will be useful in your case.
>>>>>>>>>> Aside from the attribute problem, you also have to detect the
>>>>>>>>>> vessels prior to filtering them (i.e. getting a binary or a label image of
>>>>>>>>>> vessels), and the LabelMap framework doesn't do that.
>>>>>>>>>>
>>>>>>>>>> I would suggest taking a look at these other methods:
>>>>>>>>>> -Frangi's vesselness (implemented in itk through these filter :
>>>>>>>>>> itkHessianToObjectnessMeasureImageFilter or
>>>>>>>>>> itkHessian3DToVesselnessMeasureImageFilter)
>>>>>>>>>> -Ranking Orientation Responses of Path Openings, aka RORPO (
>>>>>>>>>> http://path-openings.github.io/RORPO/)
>>>>>>>>>> -Fast Marching (itkFastMarchingImageFilter)
>>>>>>>>>>
>>>>>>>>>> HTH,
>>>>>>>>>>
>>>>>>>>>> Tim
>>>>>>>>>>
>>>>>>>>>> ----- Mail original -----
>>>>>>>>>> De: "Jeanna S." <jeannasheen at gmail.com>
>>>>>>>>>> À: community at itk.org
>>>>>>>>>> Envoyé: Mercredi 3 Août 2016 03:08:42
>>>>>>>>>> Objet: [ITK] ITK Example ShapeOpeningLabelMapFilter
>>>>>>>>>>
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> I am trying to process the attached image using the
>>>>>>>>>> ShapeOpeningLabelMapFilter for the Insight Toolkit . The image is of a
>>>>>>>>>> retina, and I want to use the image filter to remove the blood vessels from
>>>>>>>>>> the picture (the blood vessels are the long, skinny, branching lines). I
>>>>>>>>>> was wondering if the example code for the ShapeOpeningLabelMapFilter ( here
>>>>>>>>>> ) would be able to do this with a little modification, and if so, which
>>>>>>>>>> attribute would be the most useful to identify and remove the blood vessels.
>>>>>>>>>>
>>>>>>>>>> Thanks in advance.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Community mailing list
>>>>>>>>>> Community at itk.org
>>>>>>>>>> http://public.kitware.com/mailman/listinfo/community
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> when the rich wage war, it's the poor who die
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> when the rich wage war, it's the poor who die
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> when the rich wage war, it's the poor who die
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Community mailing list
>>>>>>> Community at itk.org
>>>>>>> http://public.kitware.com/mailman/listinfo/community
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> when the rich wage war, it's the poor who die
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> when the rich wage war, it's the poor who die
>>>
>>
>>
>
>
> --
> when the rich wage war, it's the poor who die
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160820/5e0387aa/attachment.html>


More information about the Community mailing list