[Insight-users] [ITK Community] ScalarChanAndVeseDenseLevelSetImageFilter

Luis Ibanez luis.ibanez at kitware.com
Sun Dec 29 10:39:08 EST 2013


Hi Inspirationv,


The line

    levelSetFilter->SetUseImageSpacing(0.28125 )


Should have an argument (0 or 1) or (true or false),

since it is expecting a boolean:


    levelSetFilter->SetUseImageSpacing( boolean )



   Hope this helps,


     Luis




On Thu, Dec 26, 2013 at 5:29 PM, Inspiracionv <inspiracionv at gmail.com>wrote:

> 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.h
> Line: 208
> Description: 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: ScalarChanAndVeseDenseLevelSetImageFilter<http://itk-users.7.n7.nabble.com/ScalarChanAndVeseDenseLevelSetImageFilter-tp33083.html>
> Sent from the ITK - Users mailing list archive<http://itk-users.7.n7.nabble.com/>at Nabble.com.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20131229/9a8d7647/attachment.htm>


More information about the Insight-users mailing list