[Insight-users] Floodfill segmentation or is there an other possibillity in itk
Oliver Trebbe
otrebbe at uni-muenster.de
Wed Mar 26 09:02:00 EDT 2008
Hi Luis,
that sounds good, but how may i first floodfill my volume till i find
one pixel(which discribes a region starting point) which is what i want
to find, go to the max intensity( this is already prototyped ) in that
region, and from there do a floodfill which checks intensities within a
neighborhood and 'disables' this 'region' for another floodfill...
go further with the max intensity check till the terminating condition
is hit... after that, disable the region where the max intensity checks
were driven and go on finding the next region....
what about this function?
how to write my own?
cant i just use the floodfilling without specifiing a function...
(maybe i just need to learn more about this templated generic
programming ;))
is there anything in itk which does such things, or, do i need to try to
write an own filter...
are there other mathematical operations or so to do that?
maybe i´m too new to pattern recognition or how to call this discipline ;)
Thanks
Oliver
Luis Ibanez schrieb:
>
> Hi Oliver,
>
>
> You probably should use the FloodFilledImageFunctionConditionalIterator.
>
>
> Please read the code of the itkConnectedThresholdImageFilter.txx file
> in the directory Insight/Code/BasicFilters.
>
>
> You should pay particular attention to lines 255-275:
>
>
> typedef BinaryThresholdImageFunction<
> InputImageType, double> FunctionType;
>
> typedef FloodFilledImageFunctionConditionalIterator<
> OutputImageType, FunctionType> IteratorType;
>
> typename FunctionType::Pointer function = FunctionType::New();
> function->SetInputImage ( inputImage );
> function->ThresholdBetween ( m_Lower, m_Upper );
>
> ProgressReporter progress(this, 0, region.GetNumberOfPixels());
>
> IteratorType it ( outputImage, function, m_SeedList );
> it.GoToBegin();
>
> while( !it.IsAtEnd())
> {
> it.Set(m_ReplaceValue);
> ++it;
> progress.CompletedPixel(); // potential exception thrown here
> }
>
>
>
>
> You can implement your variation of flood-filling by defining a new
> ImageFunction to replace the BinaryThresholdImageFunction. Your new
> image function will define the criteria that allows to accept a new
> pixel into the region.
>
>
>
> Regards,
>
>
>
> Luis
>
>
>
> ---------------------------
> Oliver Trebbe wrote:
>> Hello Guys,
>>
>> i have a problem, i want to segment 3d images in a special way, using
>> floodfilling with integrated neighborhood checking, but i don´t get
>> an idea using the iterator´s for this problem, maybe someone can help
>> me getting my mind ready or can give me some tips or ideas using the
>> iterators right...
>> the problem is i want to use the x y z dimensions but cant read them
>> anywhere...
>> and just iterating through the voxels isnt the right way...
>> can i use pointers to the previous iterator? or next (or so)
>> how to define or use them?
>> would be thankfull if someone can help me
>>
>> Thanks
>>
>> Oliver
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list