<div dir="ltr">Hi Inspirationv,<div><br></div><div><br></div><div>The line</div><div><br></div><div><pre style="white-space:pre-wrap">    levelSetFilter->SetUseImageSpacing(0.28125 )</pre><pre style="white-space:pre-wrap">
<br></pre><pre style="white-space:pre-wrap">Should have an argument (0 or 1) or (true or false),</pre><pre style="white-space:pre-wrap">since it is expecting a boolean:</pre><pre style="white-space:pre-wrap"><br></pre><pre style="white-space:pre-wrap">
    levelSetFilter->SetUseImageSpacing( boolean )</pre><pre style="white-space:pre-wrap"><br></pre><pre style="white-space:pre-wrap"><br></pre><pre style="white-space:pre-wrap">   Hope this helps,</pre><pre style="white-space:pre-wrap">
<br></pre><pre style="white-space:pre-wrap">     Luis</pre><pre style="white-space:pre-wrap"><br></pre></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 5:29 PM, Inspiracionv <span dir="ltr"><<a href="mailto:inspiracionv@gmail.com" target="_blank">inspiracionv@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, 
<p>I would like to use ScalarChanAndVeseDenseLevelSetImageFilter</p>

<p>I preprocessed my featureimage and created level set image (like <a href="http://www.itk.org/Wiki/ITK/Examples/WishList/Segmentation/SinglephaseChanAndVeseDenseFieldLevelSetSegmentation" rel="nofollow" link="external" target="_blank">example</a>)</p>



<pre>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();

</pre>

<p>And i obtain this exception : </p>

<pre style="color:#ff2222">Exception caught Level Set !

itk::ExceptionObject (0x1565dc20)
Location: "void itk::ImageConstIterator<u></u>::SetRegion(const RegionType&) [with TImage = itk::Image<float, 2u>; itk::ImageConstIterator<u></u>::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]

</pre>

<p>i tried to change the index, but never worked.</p>



        
        
        
<br><hr align="left" width="300">
View this message in context: <a href="http://itk-users.7.n7.nabble.com/ScalarChanAndVeseDenseLevelSetImageFilter-tp33083.html" target="_blank">ScalarChanAndVeseDenseLevelSetImageFilter</a><br>
Sent from the <a href="http://itk-users.7.n7.nabble.com/" target="_blank">ITK - Users mailing list archive</a> at Nabble.com.<br><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
<br></blockquote></div><br></div>