[Insight-users] ImageRegionIterator Question

Jian XIE jxie at cs.mu.OZ.AU
Wed Aug 18 23:59:04 EDT 2004


Dear all, I've got a question regarding the ImageRegionIterator. as far
as I understand, there's only one method provided to Set the pixels value,
this pixel is currently the focus of the iterator (Center of neighbor)

However, is it possible to set the other pixel? Because I'm trying to
write a code to do non-maximumsuppression. I have to set the rest of the
pixel in the neighbor to 0 and leave the center pixel value untouch if it
is a local maximum.

// here is my code fragment
// it = neighbor Iterator
// out = imageRegionIterator
for (it.GoToBegin(), out.GoToBegin(); !it.IsAtEnd(); ++it, ++out){

    	// Compare all pixel value with the center, if all smaller then
	// the center pixel, then I set the rest to zero and leave the
	// center pixel unchange
	if(it.GetPixel(offset1)<it.GetPixel(Origin)) && ....
	{
		// but ImageRegionIterator only has a Set method
		// which set the center pixel
		???
		??out.Set()??;
	}


}

How can I get around this problem??

Thanks a lot
Jian


More information about the Insight-users mailing list