[Insight-users] Rasterizing a Cylinder Spatial Object into an Image
Luis Ibanez
luis.ibanez at kitware.com
Tue Sep 29 17:43:19 EDT 2009
Hi Juliette,
Please find attached the modified code from your
example.
Your code was doing fine, except for missing to
define the origin of the image.
By default, the CylinderSpatialObject is placed in
space in such a way that the origin of coordinates
is in the center of the cylinder.
The image, on the other hand, uses the origin
of coordinates as the default corner.
For this reason, the physical extent of the image
was covering only one quadrant of the cylinder.
In the attached code you will find that the image
origin is now set in such a way that the cylinder
will be placed in the middle of the image.
Note that an alternative solution could have been
to move the cylinder position, instead of moving
the image position.
Please give it a try at the attached code and
let us know if you find any problems,
Thanks
Luis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myCylinderSpatialObject.cpp
Type: text/x-c++src
Size: 2530 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090929/d6b0a88c/attachment.cpp>
More information about the Insight-users
mailing list