Hello all!<div><br></div><div>I have a LabelMap Image and I want to remove all labels except the ones that have a seed.</div><div><br></div><div>Sadly, </div><div><br></div><div><font face="courier new, monospace"><div>std::vector<size_t> selectedLabels;<span class="Apple-tab-span" style="white-space:pre">                </span></div>
<div>BOOST_FOREACH(const ITKImgInType::IndexType& seed, d_seeds) {</div><div> ITKImgInType::PixelType value = labelMap->GetPixel(seed);</div><div> if (value != 0) {</div><div> selectedLabels.push_back(value);<span class="Apple-tab-span" style="white-space:pre">                                                        </span></div>
<div> d_os << "Label " << value << " has been selected as a valid label.\n";</div><div> } else {</div><div> d_os << "0 found on " << seed << " :( \n";</div>
<div> }</div><div>}</div></font></div><div><br></div><div>always return a zero value, even if there should be a correct label in that seed position (I've checked that on the binary image that generated the LabelMap). The label map has over 1000 LabelObjects</div>
<div><br></div><div>Theoretically LabelImages support the GetPixel() Method (even if it's slower).</div><div><br></div><div>Any ideas on why this may be happening? I'm using itk 3.20.0 on windows.</div><div><br></div>
<div>Thanks in advance<br clear="all"><div><br></div>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a><br>
</div>