[Insight-users] Bug Report: itkZeroFluxNeumannBoundaryCondition.h

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Feb 17 08:40:05 EST 2012


Hello Mengqiu,

ITK has all of it's index, point, offsets, vectors etc.. organized as {x,y,z}. These filters follow the same standard convention.

The order of indices, and be a rather confusing and complicated subject. The standard expectation for matrices and image are different.  And then there is how the data is stored in row-major or column major.


I recently read a section of the numpy documentation that was very neutral and informative of the subject. Hopefully it'll shed some light on the subject:

http://docs.scipy.org/doc/numpy/reference/internals.html#multidimensional-array-indexing-order-issues

Brad

On Feb 17, 2012, at 6:47 AM, Mengqiu Tian wrote:

> Hi Cory and David,
> 
> Thanks for reply.
> Actually, I tried both MirrorPadImageFilter and ZeroFluxNeumannPadImageFilter. Unfortunately, in MirrorPadImageFilter, the 0 indices  width but in ZeroFluxNeumannPadImageFilter it behaves opposite way.
> Regarding the general view of image, I think 0 indices height would be more reasonable, similar as behavior in Matlab.
> It is ok if it would not be corrected, I just swap my codes :)
> 
> Regards,
> Mengqiu
> 
> 
> On Fri, Feb 17, 2012 at 3:43 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> Thanks for the report. I think the figures for the other
> PadImageFilter filters are wrong. The indices 0 and 1 should be
> swapped in the figures.
> 
> David, I think you made these figures originally. Do you concur that
> the indices should be swapped in the figures?
> 
> Thanks,
> Cory
> 
> On Thu, Feb 16, 2012 at 12:03 PM, Mengqiu Tian <tianmengqiu at gmail.com> wrote:
> > Hi all,
> >
> > I am using itkZeroFluxNeumannPadImageFilter.h to pad my image, here I found
> > a bug.
> >
> > According to other PadImageFilter, take MirrorPadImageFilter for example:
> >
> > http://www.itk.org/Doxygen/html/classitk_1_1MirrorPadImageFilter.html
> >
> > lowerBound[0] and upperBound[0] should correspond to vertical direction.
> >
> > But ZeroFluxNeumannPadImageFilter does not consist with this behavior.
> > lowerBound[0] and upperBound[0] corrspond to horizontal direction in this
> > case.
> > Although it is not a big deal, it might cause misunderstanding. I think it
> > is better to correct it.
> >
> > Hope it helps. :)
> >
> > Regards,
> > Mengqiu Tian
> >
> > _____________________________________
> > 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.html
> >
> > 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
> >
> 
> 
> 
> --
> Cory Quammen
> Research Associate
> Department of Computer Science
> The University of North Carolina at Chapel Hill
> 
> _____________________________________
> 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.html
> 
> 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

========================================================
Bradley Lowekamp  
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120217/55b330ee/attachment.htm>


More information about the Insight-users mailing list