[Insight-users] registering images from thumbnails

Mauro Maiorca mauromaiorca at gmail.com
Tue Jun 2 07:54:23 EDT 2009


On Wed, May 27, 2009 at 5:20 AM, Kevin H. Hobbs <hobbsk at ohiou.edu> wrote:

> I added all those caveats because if the pixel spacing and image origin
> are not preserved when the thumbnails were made then the translation and
> rotation would not be useful.

Indeed, you were right, origin were not preserved (gosh!) something
like that saved the day:

[...]
  itk::Point<double, Dimension> newOrigin;
  newOrigin; [0] = 0;
  newOrigin; [1] = 0;
  newOrigin; [2] = 0;
  img1->SetOrigin(newOrigin;);
  img2->SetOrigin(newOrigin;);
[...]

cheers.
Mauro


PS. really appreciated pag. 220/221 of the itk software guide: "In
fact if you decide to use this filter, you should write your code,
then go for a long walk, get more coffee and ask yourself if you
really needed to use this filter." LOL :-) I really had a long walk
before actually understand it :-)


More information about the Insight-users mailing list