<span style="font-family:arial, sans-serif;font-size:14px;border-collapse:collapse">Hi everyone,<div><br></div><div>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 (<a href="http://i274.photobucket.com/albums/jj262/dzenanz/OnlineImageHosting/Y_axis_current.png">Y_axis_current.png</a>). Flipping slices either vertically or horizontally resolves the discrepancy between 2D slices and 3D visualization (<span style="font-family:arial, sans-serif;font-size:14px;border-collapse:collapse"><a href="http://i274.photobucket.com/albums/jj262/dzenanz/OnlineImageHosting/Y_axis_inverted.png">Y_axis_inverted.png</a></span>).</div>
<div><br></div><div>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).</div>
<div><br></div><div>Am I doing something wrong? If no, how do you deal with this?</div><div><br></div><div>Regards,</div><div>Dženan</div></span>