<div dir="ltr">Well then first of welcome! <div><br></div><div>the input to your <span style="font-family:arial,sans-serif;font-size:13px">binaryImageToShapeLabelMapFilt</span><span style="font-family:arial,sans-serif;font-size:13px">erPointer is </span><span style="font-family:arial,sans-serif;font-size:13px">addImageFilterPointer_2-></span><span style="font-family:arial,sans-serif;font-size:13px">GetOutput() which makes me believe </span><font face="arial, sans-serif">that you are not providing a binary image to this filter. Apart from that the code snippet you provide here looks OK. What is the output of </font><span style="font-family:arial,sans-serif;font-size:13px">addImageFilterPointer_2 look like ? </span></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">About your binarization question, you can set the inside and outside values as you wish. Take a look at this example </font><a href="http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/BinaryThresholdImageFilter">http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/BinaryThresholdImageFilter</a><span style="font-family:arial,sans-serif"> </span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 15, 2013 at 8:08 AM, Antonio Calabrese <span dir="ltr"><<a href="mailto:calantoanto@gmail.com" target="_blank">calantoanto@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks a lot Cagatay.<br>
The first thing that i would say is that i'm a newbie itk's users, so i have<br>
a simple question early:<br>
When i define an image class with pixelType as an integer or as an unsigned<br>
char and then i do a simple BinaryThreshold of this, Can i do consider the<br>
thresholder's output as a Binary image or else do i have use an image with<br>
the pixelType define as a bool?<br>
<br>
Here below there is my code:<br>
typedef itk::BinaryImageToShapeLabelMapFilter<ImageType><br>
BinaryImageToShapeLabelMapFilterType;<br>
BinaryImageToShapeLabelMapFilterType::Pointer<br>
binaryImageToShapeLabelMapFilterPointer<br>
=BinaryImageToShapeLabelMapFilterType::New();<br>
binaryImageToShapeLabelMapFilterPointer->FullyConnectedOn ();<br>
<br>
binaryImageToShapeLabelMapFilterPointer->SetInput(addImageFilterPointer_2->GetOutput());<br>
// (IV)______________<br>
typedef itk::ShapeOpeningLabelMapFilter<<br>
BinaryImageToShapeLabelMapFilterType::OutputImageType ><br>
ShapeOpeningLabelMapFilterType;<br>
ShapeOpeningLabelMapFilterType::Pointer shapeOpeningLabelMapFilter =<br>
ShapeOpeningLabelMapFilterType::New();<br>
shapeOpeningLabelMapFilter->SetInput(<br>
binaryImageToShapeLabelMapFilterPointer->GetOutput() );<br>
shapeOpeningLabelMapFilter->SetLambda(6);<br>
shapeOpeningLabelMapFilter->ReverseOrderingOff();<br>
shapeOpeningLabelMapFilter->SetAttribute(<br>
ShapeOpeningLabelMapFilterType::LabelObjectType::NUMBER_OF_PIXELS);<br>
<br>
// (V)______________<br>
typedef<br>
itk::LabelMapToBinaryImageFilter<BinaryImageToShapeLabelMapFilterType::OutputImageType,<br>
ImageType> LabelMapToBinaryImageFilterType;<br>
LabelMapToBinaryImageFilterType::Pointer<br>
labelMapToBinaryImageFilterPointer = LabelMapToBinaryImageFilterType::New();<br>
<br>
labelMapToBinaryImageFilterPointer->SetInput(shapeOpeningLabelMapFilter->GetOutput());<br>
labelMapToBinaryImageFilterPointer->Update();<br>
<br>
typedef itk::BinaryImageToLabelMapFilter<ImageType><br>
BinaryImageToLabelMapFilterType;<br>
BinaryImageToLabelMapFilterType::Pointer binaryImageToLabelMapFilter =<br>
BinaryImageToLabelMapFilterType::New();<br>
binaryImageToLabelMapFilter->FullyConnectedOn ();<br>
<br>
binaryImageToLabelMapFilter->SetInput(labelMapToBinaryImageFilterPointer->GetOutput());<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-users.7.n7.nabble.com/Troubles-with-the-manipulation-of-label-objects-tp31457p31463.html" target="_blank">http://itk-users.7.n7.nabble.com/Troubles-with-the-manipulation-of-label-objects-tp31457p31463.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the ITK - 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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Cemal Cagatay Bilgin</span>, <span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">PhD</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Life Sciences Division</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Lawrence Berkeley National Lab</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">MS977, One Cyclotron Road</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Berkeley, CA 94720, USA</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Email: <a href="mailto:ccbilgin@lbl.gov" target="_blank">ccbilgin@lbl.gov</a></span>
</div>