[Insight-users] how to change propagation speed insegmentationlevelsetfuncti

ning qian ningqian37 at hotmail.com
Thu Aug 17 10:16:39 EDT 2006


And what does $m_Interpolator$ do in segmentation levelset?

Thanks again...
>
>
>Hi, all, I just started hacking in itk. I am trying to change the 
>propagation speed in segmentation levelset. I derived my class from 
>segmentationlevelsetfunction and defined my PropagationSpeed() function as 
>follows:
>
>PropagationSpeed(const NeighborhoodType &neighborhood,
>                   const FloatOffsetType &offset, GlobalDataStruct *) const
>{
>  IndexType idx = neighborhood.GetIndex();
>  ContinuousIndexType cdx;
>  for (unsigned i = 0; i < ImageDimension; ++i)
>    {
>    cdx[i] = static_cast<double>(idx[i]) - offset[i];
>    }
>  if ( m_Interpolator->IsInsideBuffer(cdx) )
>    {
>    return (static_cast<ScalarValueType>(
>              m_Interpolator->EvaluateAtContinuousIndex(cdx)));
>    }
>  else return ( static_cast<ScalarValueType>(m_PropImage->GetPixel(idx)) );
>}
>
>
>where m_PropImage is a new member I defined for the propagation speed. But 
>when I ran the simulation using examples, it seems that the results did not 
>change at all as using originally defined m_SpeedImage. Besides this 
>change, do I need to make any other modifications?
>
>Thanks a lot for your help.
>
>Best, Ning
>
>
>_______________________________________________
>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