[Insight-developers] points in regions

Joshua Cates cates@cs.utah.edu
Wed, 3 Apr 2002 11:31:35 -0700 (MST)


Brian,

Right now the neighborhood iterators are inefficient when only some of the
indicies are used because all of index pointers are updated (i.e.
incremented or decremented).  I plan to rewrite the iterators so that a
user can optionally specify which indicies to update and which to ignore.  
This would better support the use of arbitrarily shaped neighborhoods and
make iteration more efficient in those cases.

I don't have any big plans for changes to the API.  My current thinking is
that the neighborhoods could be accessed in three ways, the first being
the current mode of access, where a user would just be expected to know
which indicies are valid (which is reasonable, as presumably they are the
one who has constructed the object).  Secondly, I could add a list-based
access, where each valid index could be accessed sequentially, without
knowledge of its spatial position in the neighborhood.  This involves a
second dereference, so its use would come with a penalty.  A third mode of
access could be a simple dereference with validity checking.  This would
be similar to the first mode, but return a valid/invalid value.

Any other ideas?

Josh.


______________________________
 Josh Cates			
 School of Computer Science	
 University of Utah
 Email: cates@cs.utah.edu
 Phone: (801) 587-7697
 URL:   www.cs.utk.edu/~cates


On Wed, 3 Apr 2002, Brian B Avants wrote:

> Josh,
> 
> That's ok.  For now I'm just using the neighborhood indices
> as mentioned below (erroneously referring to regions when
> i meant neighborhoods.)
> 
> i'm not sure if there is another way than just to list
> the indices that i want within the nhood.
> What fuctionality exactly were you going to add?
> 
> thanks
> 
> Brian
> 
> On Wed, 3 Apr 2002, Joshua Cates wrote:
> 
> > Hi,
> >
> > This functionality is not ready yet, but if there is specific need for it
> > now I can find some time to work on it.
> >
> > Josh.
> >
> > ______________________________
> >  Josh Cates
> >  School of Computer Science
> >  University of Utah
> >  Email: cates@cs.utah.edu
> >  Phone: (801) 587-7697
> >  URL:   www.cs.utk.edu/~cates
> >
> >
> > On Wed, 3 Apr 2002, Miller, James V (CRD) wrote:
> >
> > > In general the Neighborhoods and NeighborhoodIterators are the way to
> > > go.  I think Josh adding an ability to skip indices within the neighborhood.
> > > Don't know if this is ready yet.
> > >
> > > Using the SmartNeighborhoodIterators you can manage the boundary conditions
> > > properly.  You can look at the itkMeanImageFilter or filters that use
> > > the NeighborhoodOperatorFilter for examples.
> > >
> > >
> > > -----Original Message-----
> > > From: Brian B Avants [mailto:avants@grasp.cis.upenn.edu]
> > > Sent: Wednesday, April 03, 2002 1:02 AM
> > > To: insight-developers@public.kitware.com
> > > Subject: [Insight-developers] points in regions
> > >
> > >
> > >
> > > Hello,
> > >
> > > I have a question wrt subsets of regions.
> > >
> > > What is the right (itk) way to define some irregular (i.e. not expressible
> > > by some simple function) subset of a region?
> > >
> > > Currently, I simply define the exact indices I want, e.g. for a 3x3
> > > region, i may want only indices 0, 5 and 8.  Then those indices are kept
> > > in a vector which is used to access the specific points in the region.
> > >
> > > This is fine everywhere, except near borders where the indices do not
> > > correspond to the same points in the region.  I always define a buffer
> > > around the image to eliminate this issue.
> > >
> > >
> > > Is there a better way?
> > >
> > > Thanks
> > >
> > > Brian
> > >
> > >
> > >
> > > _______________________________________________
> > > Insight-developers mailing list
> > > Insight-developers@public.kitware.com
> > > http://public.kitware.com/mailman/listinfo/insight-developers
> > > _______________________________________________
> > > Insight-developers mailing list
> > > Insight-developers@public.kitware.com
> > > http://public.kitware.com/mailman/listinfo/insight-developers
> > >
> >
>