[Insight-users] Question on combining several conditional iterators

Fucang Jia jiafucang@hotmail.com
Tue, 15 Apr 2003 23:23:19 +0800


Hi Luis, hi everyone,

I want to use FloodFilledImageFunctionConditionalIterator and a seed point 
to operate on three kinds of images, such like

FunctionType::Pointer function1 = 
FunctionType::New();function1->SetInputImage ( inputImage1 );

FunctionType::Pointer function2 = 
FunctionType::New();function1->SetInputImage ( inputImage2 );

FunctionType::Pointer function3 = 
FunctionType::New();function1->SetInputImage ( inputImage3 );

IteratorType it = IteratorType ( outputImage, function1, m_Seed );

But I need to search all the pixels satify the function1, function2, and 
function3, then I use
IteratorType it1 = IteratorType ( outputImage1, function1, m_Seed );
IteratorType it2 = IteratorType ( outputImage2, function2, m_Seed );
IteratorType it3 = IteratorType ( outputImage3, function3, m_Seed );

and combine the outputImage1, outputImage2, outputImage3 to combine 
outputImage,

while(!it.IsAtEnd())
{
	it.Set(it1.Get()*it2.Get()*it3.Get());
	++it;
	++it1;
	++it2;
	++it3;
}

then go on region growing, but the result seems not right, which grow the 
whole image, all white. I do not know what is wrong.

Cound you give me some advice on how to implement this function.

Thanks!

Fucang

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail