[ITK] [ITK-users] error in executing filter

Matt McCormick matt.mccormick at kitware.com
Wed May 21 15:07:11 EDT 2014


Hi Neela,

The WeightedVotingLabelFusionImageFilter does not appear to be in ITK.
 A buildable / runnable set of code / data will help others assist you
in debugging your problem.

Thanks,
Matt

On Sat, May 10, 2014 at 7:28 AM, neela <avcneela at gmail.com> wrote:
> hi
>
> i tried weightedvotingimagefilter in release mode. the system crashes. i got
> the correct output only once but for the same set of input, now the system
> crashes.  I think i am having problem in the following patch
>
>
>   // Compute the offset table for the target image
> size_t nPatch, nSearch;
>   int *offPatchTarget;
>   ComputeOffsetTable(target, m_PatchRadius, &offPatchTarget, nPatch);
>
>
> The function definition is
> template<class TInputImage, class TOutputImage>
> void
> WeightedVotingLabelFusionImageFilter<TInputImage, TOutputImage>
> ::ComputeOffsetTable(
>   const InputImageType *image,
>   const SizeType &radius,
>   int **offset,
>   size_t &nPatch,
>   int **manhattan)
> {
>   // Use iterators to construct offset tables
>   RegionType r = image->GetBufferedRegion();
>   NIter itTempPatch(radius, image, r);
>
>   // Position the iterator in the middle to avoid problems with boundary
> conditions
>   IndexType iCenter;
>   for(size_t i = 0; i < InputImageDimension; i++)
>     iCenter[i] = r.GetIndex(i) + r.GetSize(i)/2;
>   itTempPatch.SetLocation(iCenter);
>
>   // Compute the offsets
>   nPatch = itTempPatch.Size();
>   (*offset) = new int[nPatch];
>   if(manhattan)
>     (*manhattan) = new int[nPatch];
>   for(size_t i = 0; i < nPatch; i++)
>   {
>     (*offset)[i] = itTempPatch[i] - itTempPatch.GetCenterPointer();
>     if(manhattan)
>       {
>       typename NIter::OffsetType off = itTempPatch.GetOffset(i);
>       (*manhattan)[i] = 0;
>       for(int d = 0; d < InputImageDimension; d++)
>         (*manhattan)[i] += abs(off[d]);
>       }
>   }
> }
>
> But always (*offset)[i] stores negative value (it starts from -131585)
>
> My os is windows xp(32bit)
>
> please help me
> - neela
>
>
> _____________________________________
> 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
_____________________________________
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


More information about the Community mailing list