[Insight-users] Y axis inversion during slice extraction
Dženan Zukić
dzenanz at gmail.com
Mon Jul 12 10:33:38 EDT 2010
Hi everyone,
in the attached simple code for slice extraction. I am using similar code in
my segmentation tool. The problem is that 2D slices, which I display using
Qt, look flipped
(Y_axis_current.png<http://i274.photobucket.com/albums/jj262/dzenanz/OnlineImageHosting/Y_axis_current.png>).
Flipping slices either vertically or horizontally resolves the discrepancy
between 2D slices and 3D visualization
(Y_axis_inverted.png<http://i274.photobucket.com/albums/jj262/dzenanz/OnlineImageHosting/Y_axis_inverted.png>
).
I believe the problem arises somewhere due to origin of coordinate system
(lower left vs upper
left). \InsightToolkit-3.18.0\Code\BasicFilters\itkExtractImageFilter.txx,
line 206 clearly states that direction cosines are not taken care of. PNG
image writer does not take into account coordinate system conventions
(conclusion based on a glimpse into code).
Am I doing something wrong? If no, how do you deal with this?
Regards,
Dženan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100712/ec09da33/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExtractSlices.cpp
Type: application/octet-stream
Size: 2449 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100712/ec09da33/attachment.obj>
More information about the Insight-users
mailing list