[Insight-users] 3 questions (FFT filters)

Jakub Bican jakub.bican at matfyz.cz
Sat Sep 16 12:26:54 EDT 2006


Thanks,

i've got it!

i overlooked, that movingImage was itk::Image<>::ConstPointer for some 
strange reason. So it was not possible to call SetOrigin() on it! With 
itk::Image<>::Pointer works everything fine ;)

I was wondering what happened, because there is method to set double[] 
as a new origin ( 
http://www.itk.org/Doxygen/html/classitk_1_1ImageBase.html#itk_1_1VectorImagez1228_1 
  ).

Thanks again and regards,

	Jakub



Martin Urschler napsal(a):
> hi
> 
>> 3) impossible to pass origin into image
>> I need to manually set an origin of an image:
>>  double origin[ Dimension ];
>>  for (unsigned int i = 0; i < Dimension; i++)
>>    {
>>    origin[i] = 0.0;
>>    }
>>  movingImage->SetOrigin(origin);
> 
> you can't pass a standard C array as the origin to an image, the origin 
> of an image is an itk::Point
> 
> try this:
> 
> MovingImageType::PointType origin;
> for (unsigned int i = 0; i < Dimension; i++)
>    origin[i]=0.0;
> movingImage->SetOrigin(origin);
> 
> regards,
> Martin
> 


More information about the Insight-users mailing list