[Insight-developers] Adding ValueType to itk::Image

Jisung Kim bahrahm@yahoo.com
Fri, 22 Feb 2002 09:58:43 -0800 (PST)


Hello.

Your point is absolutely valid. 

Here is my suggestion for temporary solution. 

For performance and simplicity,  

1) makes PointSetToListAdaptor use only Point or
PointData part (design time decision, not compile
time. I am prefer Point, though) for statistical
operations.

2) In future, creates an Adaptor (maybe it can be
VectorContainerToListAdaptor) that works with
VectorContainer of itk::Array or itk::Vector (which
will be a result of an adaptor that select variables
from Point and/or PointData) so that user can work
with various combinations of variables from PointSet.

The second thing looks like feature selection thing
that we can find
in pattern classification literatures.

This was my quick thought.

Thank you,

Jisung.

--- "Miller, James V (CRD)" <millerjv@crd.ge.com>
wrote:
> Here's another curve:
> 
> In some applications, the x and y coordinates of a
> point may be prescribed
> but the z coordinate and value at that point may be
> measurements.
> 
> So you might want to treat (x,y) as independent
> variables and (z, v) as
> dependent variables.
> 
> We might be able to do this with some sort of
> adaptor or functor.
> 
> 
> -----Original Message-----
> From: Jisung Kim [mailto:bahrahm@yahoo.com]
> Sent: Thursday, February 21, 2002 5:04 PM
> To: Miller, James V (CRD); Luis Ibanez
> Cc: insight-dev-list
> Subject: RE: [Insight-developers] Adding ValueType
> to itk::Image
> 
> 
> Hi Jim.
> 
> I think you are right. The original idea was using
> only the Point (position in feature space, not in
> normal space(?)). I believe Luis used PointSet to
> represent parameters in parametric space in his
> Curves2DExtractor example, and the original idea was
> extension of his idea. However, as you pointed out,
> since PointSet has distinction between Point and
> PointData, and has two containers for them, simply
> ignoring PointData would not be a good call.
> 
> I have to think about a way to allow users to choose
> Point, PointData, or union of both as measurement
> vector type.
> 
> And the question of ValueType is really ambiguous
> here.
> 
> Without any objection, I will add ValueType to Image
> tomorrow, but not PointSet. If anyone has an good
> idea, please let me know.
> 
> Thank you,
> 
> Jisung.
> 
> 
> 
> 
> 
>   
> --- "Miller, James V (CRD)" <millerjv@crd.ge.com>
> wrote:
> > I would say the ValueType for a PointSet is the
> > PixelType NOT the PointType.
> > 
> > But I think it really comes down to what you want
> to
> > consider your 
> > independent variables and what are your
> dependendent
> > variables.
> > 
> > If the positions are which data is collected is
> > prescribed, then the 
> > position is an independent variable and the pixel
> > value is a dependent 
> > variable.
> > 
> > If the positions are themselves random events,
> then
> > both the position
> > and pixel values are dependent random variables.
> > 
> > So the short answer :) is that sometimes just the
> > PixelType is the ValueType
> > and other times the union of the PixelType and
> > PointType are the ValueType.
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: Jisung Kim [mailto:bahrahm@yahoo.com]
> > Sent: Thursday, February 21, 2002 3:36 PM
> > To: Luis Ibanez; Miller, James V (CRD)
> > Cc: 'Jisung Kim'; insight-dev-list
> > Subject: Re: [Insight-developers] Adding ValueType
> > to itk::Image
> > 
> > 
> > Hi.
> > 
> > It seems like adding ValueType to image is okay
> with
> > folks. 
> > 
> > However,I think there are two data element types
> in 
> > PoinSet, PointType and PixelType (PointData)
> > referred
> > by common identifier (PointIdentifier). The former
> > is
> > stored in the PointContainer and the latter in
> > PointDataContainer.
> > 
> > Up to now, in term of statistics, I ignored the
> > PointData and considered the points in a PointSet
> > exist in feature space. In this case, the
> ValueType
> > should be PointType. I don't know the answer about
> > which data is primary in PointSet.
> > 
> > Thanks,
> > 
> > Jisung.
> > 
> > --- Luis Ibanez <luis.ibanez@kitware.com> wrote:
> > > 
> > > I could be convenient to add this type to 
> > > itk::PointSet  too,
> > > again as    ValueType = PixelType.
> > > 
> > > So it can be used when PointSet are connected
> via
> > > the
> > > adaptors the the Statistical classes.
> > > 
> > > 
> > >   Luis
> > > 
> > > --------------------------------------------
> > > 
> > > Miller, James V (CRD) wrote:
> > > 
> > > >Adding ValueType to be same as PixelType is
> fine
> > in
> > > Image.
> > > >
> > > >
> > > >-----Original Message-----
> > > >From: Jisung Kim [mailto:bahrahm@yahoo.com]
> > > >Sent: Thursday, February 21, 2002 2:40 PM
> > > >To: insight-dev-list
> > > >Subject: [Insight-developers] Adding ValueType
> to
> > > itk::Image
> > > >
> > > >
> > > >Hi.
> > > >
> > > >While I was working with Sayan to create common
> > > base
> > > >class for SampleClassifier and ImageClassifier.
> > We
> > > >encountered a problem with a typedef.
> Currently,
> > > any
> > > >Sample classes has MeasurementVectorType for
> its
> > > >element type and Image class has PixelType for
> > the
> > > >same purpose. The ClassifierBase class needs a
> > > typedef
> > > >for MembershipFunction and MembershipFunction
> is
> > > >templated over MeasurementVector. By adding
> > > ValueType
> > > >(alias of MeasurementVectorTyp in Sample, and
> > > >PixelType in Image), we can remove all template
> > > >arguments except the data container class type
> > > (Sample
> > > >or Image). 
> > > >
> > > >I think ValueType might not mean anything in
> the
> > > >context of an image. However, if we think
> > > itk::Image
> > > >as a special case (accessible through
> > n-dimensional
> > > >index) of generic container, I think having
> > > ValueType
> > > >in Image class makes perfect sense. 
> > > >
> > > >Having ValueType in Image makes life of me and
> > > Sayan
> > > >easier. What is you opinion on this?
> > > >
> > > >Thank you,
> > > >
> > > >Jisung.
> > > > 
> > > >
> > > >=====
> > > >Jisung Kim
> 
=== message truncated ===


=====
Jisung Kim
bahrahm@yahoo.com
106 Mason Farm Rd.
129 Radiology Research Lab., CB# 7515
Univ. of North Carolina at Chapel Hill
Chapel Hill, NC 27599-7515

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com