[Insight-users] [ITK] [BilateralImageFilter]
Karthik Krishnan
Karthik.Krishnan at kitware.com
Mon Jul 24 16:49:10 EDT 2006
Thanks for the report.
A fix has been committed in CVS.
"BUG: std::vector::reserve() only allocates memory for those elements
without actually creating them. Here we should use resize instead.
Pointed out by Vincent Viroleau on the users list."
/cvsroot/Insight/Insight/Code/BasicFilters/itkBilateralImageFilter.txx,v
<-- itkBilateralImageFilter.txx
new revision: 1.28; previous revision: 1.27
-karthik
Vincent Viroleau wrote:
> Hi,
>
> I'm using ITK 2.6 with Visual Studio 2005, and when using the
> BilateralImageFilter I get an error of vector iterator not
> dereferenceable.
>
> After reviewing my code i found where does the error came from :
>
> in itkBilateralImageFilter.txx Revision: 1.26
>
> line 243 :
>
> m_RangeGaussianTable.reserve( m_NumberOfRangeGaussianSamples );
> for (i = 0, v = 0.0; i < m_NumberOfRangeGaussianSamples;
> ++i, v += tableDelta)
> {
> m_RangeGaussianTable[i] =
> exp(-0.5*v*v/rangeVariance)/rangeGaussianDenom;
> }
>
> I've changed m_RangeGaussianTable.reserve in
> m_RangeGaussianTable.resize, and now everything works fine.
>
> Does this error mean that i haven't initialize a parameter in the good
> way ?
>
More information about the Insight-users
mailing list