[Insight-users] SetSpacing() in itk::SpatialObject

Luis Ibanez luis.ibanez at kitware.com
Sat, 24 Jan 2004 10:05:16 -0500


Hi Corinne,

Thanks for pointing this out.

This was logged as Bug # 536
http://www.itk.org/Bug/bug.php?op=show&bugid=536&pos=0

and it has been fixed in CVS.

Please let us know if you encounter
further problems.

Thanks


    Luis


-------------------------
Corinne Mattmann wrote:
> Hi,
> 
> I've just noticed a discontinuity in itk:
> If I have image->GetSpacing() I will get an output of the type
> "SpacingType" (i.e. itk::Vector<double, 3>). Therefore I wanted to set
> the spacing of a spatial object in the following way:
> 
>   ImageType::SpacingType spacing;
>     spacing[0] = 0.1;
>     spacing[1] = 0.1;
>     spacing[2] = 0.1;
>   typedef itk::EllipseSpatialObject<3> EllipseType;
>     EllipseType::Pointer sphere = EllipseType::New();
>     sphere->SetSpacing(spacing);
>     sphere->SetRadius(3.0);
> 
> But I got the following error:
> error C2664: 'SetSpacing' : cannot convert parameter 1 from 'class
> itk::Vector<double,3>' to 'const double []'
>         No user-defined-conversion operator available that can perform
> this conversion, or the operator cannot be called
> 
> Shouldn't there be another function in itkSpatialObject which takes an
> itkVector as an input?
> 
> 
> Thanks,
> Corinne
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>