<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? </div><div><br><div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkJPEGReader> jpegReader =</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>vtkSmartPointer<vtkJPEGReader>::New(); </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader->FileLowerLeftOn();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader->SetFilePrefix("C:/Users/DawnWind/Desktop/000/");</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader->SetFilePattern("%s%d.jpg");</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader->SetDataByteOrderToLittleEndian();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader->SetDataSpacing(2.0 / 3, 2.0 / 3, 1); </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader->SetFileNameSliceSpacing(1); </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader->SetDataExtent(0, 209, 0, 209, 0, 0);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jpegReader->Update(); </div><div><br></div><div><br></div><div><div>The full codes please see the <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&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;"> (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>> From: david.gobbi@gmail.com<br>> Date: Tue, 16 Apr 2013 15:30:34 -0600<br>> To: vtkusers@vtk.org<br>> Subject: Re: [vtkusers] Readers read image with some kind of reveral?<br>> <br>> On Tue, Apr 16, 2013 at 10:17 AM, David Doria <daviddoria@gmail.com> wrote:<br>> > On Tue, Apr 16, 2013 at 11:45 AM, ChenDawnWind <cybfly1@hotmail.com> wrote:<br>> >> Hi everyone,<br>> >> when i use the reader such as vtkJPEGReader to read one image file(see<br>> >> attachment) and extract the contour of<br>> >> the img, then read the result output and print the points with OpenCV.<br>> >> Then i found the image was not the way it used to be.<br>> >> In the attachment the original image is number 1, and the contour image is<br>> >> number 2.<br>> >> It is clear that the image reversal in some way.<br>> >> Cause i have to set the point of the contour in the 3D model,<br>> >> with this revesal the calculated center of the white target in the the<br>> >> original image was not suit the reveral image 2.<br>> >> So i wanna know is there any way to avoid this revesal and to read file as<br>> >> it used to be?<br>> >> Thanks!<br>> >><br>> >> DawnWind.Chen<br>> >> CSU<br>> ><br>> ><br>> > It looks to me like you are just viewing the points from a different<br>> > viewpoint. If you want to change the view on the VTK side of things,<br>> > check out:<br>> > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/vtkCamera<br>> ><br>> > for how to position and aim the camera.<br>> ><br>> > David<br>> <br>> I don't think this is a camera issue. The vtkJPEGReader does in fact<br>> flip the image. In JPEG the first pixel is at the upper left corner<br>> of the image, while VTK's 2D coordinate system (the one used for<br>> vtkActor2D) has the first pixel at the lower left corner of the<br>> renderer. The reader flips the image so that it appears the right way<br>> up on the screen when displayed with vtkImageViewer. This flip of<br>> course means that the coordinates of any points that you get from<br>> contouring the image will be flipped top-to-bottom.<br>> <br>> For some readers, you can call FileLowerLeftOn() to stop the reader<br>> from flipping the image.<br>> <br>> - David<br>> _______________________________________________<br>> Powered by www.kitware.com<br>> <br>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>> <br>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>> <br>> Follow this link to subscribe/unsubscribe:<br>> http://www.vtk.org/mailman/listinfo/vtkusers<br></div></div></div></div>                                            </div></body>
</html>