[Insight-users] WatershedImageFilter Crashed.
=?GB2312?B?/Yj9iA==?=
anjingdelonglong at gmail.com
Wed Dec 5 09:58:16 EST 2012
Dear All.
I'm using Watershed filter on my work about segmentation. But it often
crashed and i can not find the reason. Please Help~
Error message is : "list iterator not dereferencable"
Try my best to explain the problem.
This is the part of my program
.....
//A SigmoidImageFilter executed.
typedef itk::WatershedImageFilter< InternalImageType >
WatershedFilterType; // InternalImageType--> image<float, 2>;
WatershedFilterType::Pointer watershedFilter = WatershedFilterType::New();
watershedFilter->SetInput( sigmoidFilter->GetOutput() );
watershedFilter->SetThreshold( _threshold );
watershedFilter->SetLevel( _level ); //both threshold and level is
between 0~1
watershedFilter->Update();
When going to this
step: SegmentTreeGenerator<TScalarType>::CompileMergeList(SegmentTableTypePointer
segments,
SegmentTreeTypePointer mergeList)
{
//.....
for (segment_ptr = segments->Begin(); segment_ptr != segments->End();
++segment_ptr)
{
labelFROM = (*segment_ptr).first;
labelTO
=
m_MergedSegmentsTable->RecursiveLookup((*segment_ptr).second.edge_list.front().label);
//.....
}
then I found that the segment_ptr -> hash_table only have one element. Thus
the list crashed.
the variable segment is copy of the input which is defined " typename
SegmentTableType::Pointer input = this->GetInputSegmentTable(); " in
the SegmentTreeGenerator::GenerateData() part.
I'm not clear about the internal implement of this function. Therefore i
can't find the reason why it crashed.
Please HELP!
THANKS.
--
Nothing but a MADAO!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121205/9d2197c8/attachment.htm>
More information about the Insight-users
mailing list