[Insight-developers] PointSet always assumes 3-D points??

Parag Chandra chandra@cs.unc.edu
Thu, 12 Apr 2001 15:36:36 -0400


Hi Lydia,

Thanks for your help; Luis had suggested the same thing to me yesterday, and
now my programs are compiling. James, I think it's safe to close out this
'bug'.

Thanks,
-Parag

----- Original Message -----
From: "Lydia Ng" <lng@insightful.com>
To: "'Miller, James V (CRD)'" <millerjv@crd.ge.com>; "'Parag Chandra'"
<chandra@cs.unc.edu>; "'insight-Developers'"
<insight-developers@public.kitware.com>
Sent: Thursday, April 12, 2001 3:03 PM
Subject: RE: [Insight-developers] PointSet always assumes 3-D points??


> Hi Parag,
>
> I have previously had a go at using PointSet.
> PointSet can take points of any dimension.
> The actual template parameters are PointSet<PixelType,MeshTraits>.
> It is through the MeshTraits you set the point dimension.
>
> For example, if you wanted 4D points then you need to do
> something like this:
>
>   enum{ SpaceDimension = 4 };
>   typedef int PixelType;
>   typedef itk::DefaultStaticMeshTraits< PixelType, SpaceDimension >
> MeshTraits;
>   typedef itk::PointSet< PixelType, MeshTraits > PointSet;
>
> I have attached a sample program.
>
> Hope this helps,
> Lydia
>
>
> > -----Original Message-----
> > From: insight-developers-admin@public.kitware.com
> > [mailto:insight-developers-admin@public.kitware.com]On Behalf
> > Of Miller,
> > James V (CRD)
> > Sent: Thursday, April 12, 2001 6:01 AM
> > To: 'Parag Chandra'; insight-Developers
> > Subject: RE: [Insight-developers] PointSet always assumes 3-D points??
> >
> >
> > Parag,
> >
> > I entered this into GNATS and assigned it to Will. Thanks for
> > reporting this to the list but things
> > like this should also be submitted into GNATS.
> >
> > http://public.kitware.com/cgi-bin/gnatsweb.pl?database=insight
> > <http://public.kitware.com/cgi-bin/gnatsweb.pl?database=insight>
> >
> > Jim
> >
> > -----Original Message-----
> > From: Parag Chandra [mailto:chandra@cs.unc.edu]
> > Sent: Wednesday, April 11, 2001 5:06 PM
> > To: insight-Developers
> > Subject: [Insight-developers] PointSet always assumes 3-D points??
> >
> >
> > Hi,
> > I'm trying to use the PointSet class in my programs, and it
> > seems that SetPoint() always adds 3-D
> > points to the set. If I declare a PointSet of 2-D points, like this:
> >
> > typedef Point<double, 2> PointType;
> > PointSet<PointType> mySet;
> >
> > and then try to fill it with 2-D points, when I later print
> > out the PointSet, I get output of this
> > sort:
> >
> > 140.515  131.943  -4.22017e+037 <-- the last column is garbage
> >
> > Similary, if I do the same with a PointSet of 4-D points, I
> > get output like this:
> >
> > 140.515  131.943  12 <-- the 4th column is truncated
> >
> > I don't think the problem is in the output method either,
> > because when I try something like this:
> >
> > typedef EBSTransform2DType::PointType PointType2D;
> > PointType2D sourcePoint2D;
> > ebs2D->Getp()->SetPoint(pointNumber, sourcePoint2D);
> >
> > VC++ complains that it "cannot convert parameter 2 from
> > itk::Point<double,2> to itk::Point<float,
> > 3>".
> >
> > Any ideas?
> >
> > Thanks,
> > -Parag
> >
> >
> >
> >
> > _______________________________________________
> > Insight-developers mailing list
> > Insight-developers@public.kitware.com
> > http://public.kitware.com/mailman/listinfo/insight-developers
> >
>