[Insight-users] Question about StatisticsOpeningLabelMapFilter

Cagatay Bilgin bilgincc at gmail.com
Fri Aug 24 13:58:16 EDT 2012


You can directly feed your input image to the
BinaryStatisticsOpeningImageFilter. Just set
your BackgroundValue respectively and you
are done.

I have created an example on the wiki on how to use
this filter.
http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/StatisticsOpeningLabelMapFilter

Cagatay

-- 
Cemal Cagatay Bilgin
Life Sciences Division
Lawrence Berkeley National Lab
MS977, One Cyclotron Road
Berkeley, CA 94720, USA
Email: ccbilgin at lbl.gov <hchang at lbl.gov>

On Tue, Aug 21, 2012 at 6:29 PM, kumis <kkumis at gmail.com> wrote:

> Thanks for Your replies.
>
> I have finally managed to put data into the StatisticsOpeningLabelMapFilter
> using following filters:
>
> typedef
>
> itk::LabelImageToStatisticsLabelMapFilter<LabelMapToLabelImageFilterType::OutputImageType,
> SSImageType> LabelImageToStatisticsLabelMapFilterType;
> LabelImageToStatisticsLabelMapFilterType::Pointer li2sli =
> LabelImageToStatisticsLabelMapFilterType::New();
> li2sli->SetInput(labelMapToLabelImageFilter->GetOutput());
> li2sli->SetFeatureImage(inputImage);
> li2sli->Update();
>
> typedef
>
> itk::StatisticsOpeningLabelMapFilter<LabelImageToStatisticsLabelMapFilterType::OutputImageType>
> StatisticsOpeningLabelMapFilterType;
> StatisticsOpeningLabelMapFilterType::Pointer statisticsOpening =
> StatisticsOpeningLabelMapFilterType::New();
>
> statisticsOpening->SetAttribute(StatisticsOpeningLabelMapFilterType::LabelObjectType::MEAN);
> statisticsOpening->SetInput(li2sli->GetOutput());
> statisticsOpening->SetLambda(-500);
> statisticsOpening->Update();
>
> and it compiles without any errors. As I understand
> LabelImageToStatisticsLabelMapFilter has 2 inputs:
> -feature image (setfeatureimage())- my signed short 2-d image
> (SSImageType),
> I store my initial dicom image here
> -input (setinput()) is a label image I got from previous operations (in my
> case: binarisation of initial dicom, a bit of morphological filtering,
> labeling objects on binary image and finally converting labelMap to
> labelImage )
>
> StatisticsOpeningLabelMapFilter has typical arguments for "opening" (not
> morphological operation but removing labeled objects based on values of
> chosen attributes) and the input in my case (I am not sure if I do this
> correct) is a statistics label map.
>
> I must admit that this statistics opening filters are a mystery to me -
> though I have ussed simillar (?) shape opening filters with success before.
> Am I setting all inputs correctly? What is the output of
> StatisticsOpeningLabelMapFilter ? Is it statistics label map that needs
> convertion to label image? I found myself without idea how this filter
> works.
>
>
>
>
> --
> View this message in context:
> http://itk-insight-users.2283740.n2.nabble.com/Question-about-StatisticsOpeningLabelMapFilter-tp7580805p7580814.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120824/1284566d/attachment.htm>


More information about the Insight-users mailing list