[Insight-users] ScalarChanAndVeseDenseLevelSetImageFilter

Inspiracionv inspiracionv at gmail.com
Thu Dec 26 17:29:00 EST 2013


Hi, 
I would like to use ScalarChanAndVeseDenseLevelSetImageFilter
I preprocessed my featureimage and created level set image (like  example
<http://www.itk.org/Wiki/ITK/Examples/WishList/Segmentation/SinglephaseChanAndVeseDenseFieldLevelSetSegmentation> 
)
typedef itk::ScalarChanAndVeseDenseLevelSetImageFilter<ImageType, ImageType,
ImageType, LevelSetFunctionType, SharedDataHelperType >
MultiLevelSetType;MultiLevelSetType::Pointer levelSetFilter =
MultiLevelSetType::New();levelSetFilter->SetFunctionCount( 1
);levelSetFilter->SetFeatureImage(result);levelSetFilter->SetLevelSet(0,
contour);levelSetFilter->SetNumberOfIterations( nb_iteration
);levelSetFilter->SetMaximumRMSError( rms
);levelSetFilter->SetUseImageSpacing(0.28125 );levelSetFilter->SetInPlace(
false );levelSetFilter->GetDifferenceFunction(0)->SetDomainFunction(
domainFunction
);levelSetFilter->GetDifferenceFunction(0)->SetCurvatureWeight(
curvature_weight );levelSetFilter->GetDifferenceFunction(0)->SetAreaWeight(
area_weight
);levelSetFilter->GetDifferenceFunction(0)->SetReinitializationSmoothingWeight(
reinitialization_weight
);levelSetFilter->GetDifferenceFunction(0)->SetVolumeMatchingWeight(
volume_weight );levelSetFilter->GetDifferenceFunction(0)->SetVolume( volume
);levelSetFilter->GetDifferenceFunction(0)->SetLambda1( l1
);levelSetFilter->GetDifferenceFunction(0)->SetLambda2( l2
);levelSetFilter->Update();
And i obtain this exception : 
Exception caught Level Set !itk::ExceptionObject (0x1565dc20)Location: "void
itk::ImageConstIterator::SetRegion(const RegionType&) [with TImage =
itk::Image<float, 2u>; itk::ImageConstIterator::RegionType =
itk::ImageRegion<2u>]" File: ../../../../../../../Program Files
(x86)/ITK/include/ITK-4.4/itkImageConstIterator.hLine: 208Description:
itk::ERROR: Region ImageRegion (0x28ce30)  Dimension: 2  Index: [303, 319] 
Size: [200, 200] is outside of buffered region ImageRegion (0x4fb0074) 
Dimension: 2  Index: [220, 220]  Size: [200, 200]
i tried to change the index, but never worked.




--
View this message in context: http://itk-users.7.n7.nabble.com/ScalarChanAndVeseDenseLevelSetImageFilter-tp33083.html
Sent from the ITK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20131226/fedccae0/attachment.htm>


More information about the Insight-users mailing list