<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:????
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks.But even if i set up FileLowerLeftOn. The contour still fliped.<div>Here are the codes i used, is there any problem?&nbsp;</div><div><br><div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkJPEGReader&gt; jpegReader =</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>vtkSmartPointer&lt;vtkJPEGReader&gt;::New(); &nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader-&gt;FileLowerLeftOn();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader-&gt;SetFilePrefix("C:/Users/DawnWind/Desktop/000/");</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader-&gt;SetFilePattern("%s%d.jpg");</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader-&gt;SetDataByteOrderToLittleEndian();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader-&gt;SetDataSpacing(2.0 / 3, 2.0 / 3, 1);&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader-&gt;SetFileNameSliceSpacing(1);&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader-&gt;SetDataExtent(0, 209, 0, 209, 0, 0);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader-&gt;Update();&nbsp;</div><div><br></div><div><br></div><div><div>The full codes please see the&nbsp;<i style="line-height: 21px; font-style: normal; color: rgb(68, 68, 68); font-family: 'Microsoft YaHei UI', 'Microsoft YaHei', ??, Calibri, sans-serif; font-size: 15px;">attachments in</i></div><div><br></div><div><a id="rpFocusElt" href="https://blu175.mail.live.com/mail/17.0.6156.0403/Compose/RteFrameResources.aspx?ch=8824048901591138608&amp;mkt=zh-cn" style="line-height: 19px; text-decoration: none; color: rgb(0, 114, 198); cursor: pointer; font-family: 'Microsoft Yahei', Verdana, Simsun, 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; font-size: 14px; height: 1px; width: 1px; display: block; outline: none; position: absolute;"></a><div class="ReadMsgTop" style="line-height: 19px; margin: 5px 0px; color: rgb(68, 68, 68); font-family: 'Microsoft Yahei', Verdana, Simsun, 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', 'BBAlpha Sans', 'S60 Sans', Arial, sans-serif; font-size: 14px;"><ul style="margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; list-style: none;"><li class="ToolbarItem ToolbarItemLast CloseLink FloatRight t_lnk" style="margin: 10px 0px 0px; float: right; display: block; white-space: nowrap; height: 16px;"><a aid="rd_close" href="https://blu175.mail.live.com/mail/#" title="?? ??(Esc)" style="text-decoration: none; color: rgb(0, 114, 198); cursor: pointer; padding: 0px 0px 0px 6px; display: block; margin-bottom: 0px;"><img src="https://blu175.mail.live.com/mail/clear.gif" class="g_close " alt="????" style="border: none; width: 11px; height: 11px; background-image: url(https://a.gfx.ms/strip_metro4.png); background-color: transparent; background-attachment: scroll; overflow: hidden; background-position: -35px -257px; background-repeat: no-repeat no-repeat;"></a></li><li class="ToolbarItem ToolbarItemThinPadding NextMessage FloatRight" style="margin: 11px 0px 0px; float: right; display: block; white-space: nowrap; height: 16px;"><span class="Enabled"><a aid="rd_next" title="?????(Ctrl+.)" href="https://blu175.mail.live.com/mail/#" style="text-decoration: none; color: rgb(0, 114, 198); cursor: pointer; padding: 0px 2px; display: block; margin-bottom: 0px;"><img src="https://blu175.mail.live.com/mail/clear.gif" class="i_rm_n" title="?????(Ctrl+.)" alt="?????" style="border: none; width: 16px; height: 16px; background-image: url(https://a.gfx.ms/strip_metro4.png); background-color: transparent; background-attachment: scroll; overflow: hidden; background-position: -1px -69px; background-repeat: no-repeat no-repeat;"></a></span></li><li class="ToolbarItem PreviousMessage FloatRight" style="margin: 11px 0px 0px; float: right; display: block; white-space: nowrap; height: 16px;"><span class="Disabled" style="display: block; padding: 0px 3px; color: rgb(0, 0, 0); margin-bottom: 0px;"><img src="https://blu175.mail.live.com/mail/clear.gif" class="i_rm_p_d" alt="?????" style="width: 16px; height: 16px; background-image: url(https://a.gfx.ms/strip_metro4.png); background-color: transparent; background-attachment: scroll; overflow: hidden; background-position: -18px -324px; background-repeat: no-repeat no-repeat;"></span></li><li style="margin: 0px;"><h2 class="ReadMsgSubject TextSizeLarge" style="line-height: 29px; font-size: 21px; font-family: 'Microsoft Yahei', Verdana, Simsun, 'Segoe UI Web Light', 'Segoe UI Light', 'Segoe UI Web Regular', 'Segoe UI', 'Segoe UI Symbol', 'Helvetica Neue', Arial; font-weight: normal; margin: 0px 0px 14px; padding-top: 1px;">Re: [vtkusers] vtkPointWidget set the right positionþ</h2><div><a id="rmic1_senderName" class="t_atc ICName" style="color: rgb(0, 0, 0); cursor: pointer; white-space: nowrap;">from Chen DawnWind</a><span class="UnsafeSenderEmail" style="white-space: nowrap;">&nbsp;(cybfly1@hotmail.com)</span></div><div><span class="UnsafeSenderEmail" style="white-space: nowrap;"><br></span></div><div><span class="UnsafeSenderEmail" style="white-space: nowrap;">Thanks.</span></div><div><span class="UnsafeSenderEmail" style="white-space: nowrap;"><br></span></div></li></ul></div></div></div>DawnWind.Chen<div>CSU</div><br><br><div><div id="SkyDrivePlaceholder"></div>&gt; From: david.gobbi@gmail.com<br>&gt; Date: Tue, 16 Apr 2013 15:30:34 -0600<br>&gt; To: vtkusers@vtk.org<br>&gt; Subject: Re: [vtkusers] Readers read image with some kind of reveral?<br>&gt; <br>&gt; On Tue, Apr 16, 2013 at 10:17 AM, David Doria &lt;daviddoria@gmail.com&gt; wrote:<br>&gt; &gt; On Tue, Apr 16, 2013 at 11:45 AM, ChenDawnWind &lt;cybfly1@hotmail.com&gt; wrote:<br>&gt; &gt;&gt; Hi everyone,<br>&gt; &gt;&gt; when i use the reader such as vtkJPEGReader to read one image file(see<br>&gt; &gt;&gt; attachment) and extract the contour of<br>&gt; &gt;&gt; the img, then read the result output and print the points with OpenCV.<br>&gt; &gt;&gt; Then i found the image was not the way it used to be.<br>&gt; &gt;&gt; In the attachment the original image is number 1, and the contour image is<br>&gt; &gt;&gt; number 2.<br>&gt; &gt;&gt; It is clear that the image reversal in some way.<br>&gt; &gt;&gt; Cause i have to set the point of the contour in the 3D model,<br>&gt; &gt;&gt; with this revesal the calculated center of the white target in the the<br>&gt; &gt;&gt; original image was not suit the reveral image 2.<br>&gt; &gt;&gt; So i wanna know is there any way to avoid this revesal and to read file as<br>&gt; &gt;&gt; it used to be?<br>&gt; &gt;&gt; Thanks!<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; DawnWind.Chen<br>&gt; &gt;&gt; CSU<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; It looks to me like you are just viewing the points from a different<br>&gt; &gt; viewpoint. If you want to change the view on the VTK side of things,<br>&gt; &gt; check out:<br>&gt; &gt; http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/vtkCamera<br>&gt; &gt;<br>&gt; &gt; for how to position and aim the camera.<br>&gt; &gt;<br>&gt; &gt; David<br>&gt; <br>&gt; I don't think this is a camera issue.  The vtkJPEGReader does in fact<br>&gt; flip the image.  In JPEG the first pixel is at the upper left corner<br>&gt; of the image, while VTK's 2D coordinate system (the one used for<br>&gt; vtkActor2D) has the first pixel at the lower left corner of the<br>&gt; renderer.  The reader flips the image so that it appears the right way<br>&gt; up on the screen when displayed with vtkImageViewer.  This flip of<br>&gt; course means that the coordinates of any points that you get from<br>&gt; contouring the image will be flipped top-to-bottom.<br>&gt; <br>&gt; For some readers, you can call FileLowerLeftOn() to stop the reader<br>&gt; from flipping the image.<br>&gt; <br>&gt;  - David<br>&gt; _______________________________________________<br>&gt; Powered by www.kitware.com<br>&gt; <br>&gt; Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>&gt; <br>&gt; Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; <br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; http://www.vtk.org/mailman/listinfo/vtkusers<br></div></div></div></div>                                               </div></body>
</html>