<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi Eric, <div><br></div><div>I am using the </div><div><br></div><div>VTK 5.4.2</div><div><br></div><div>on Mac OS X 10.6 and 10.4</div><div><br></div><div>I have compiled the sources without using the Cocoa or Carbon library </div><div>so I assume the rendering is happening via the xwindow system. </div><div><br></div><div>I will set up a small example.</div><div><br></div><div>Greetings</div><div><br></div><div>Phil</div><div><br><div><div>On Mar 30, 2010, at 2:56 PM, Eric E. Monson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hey Phil,</div><div><br></div>Is your VTK on 10.6 built using Cocoa or Carbon? And, which VTK version are you using on each machine?<div><br></div><div>I don't know what the cause would be, but I know there are some differences and the info might be help the people who know more of the details track down the source of the inconsistent behavior.</div><div><br></div><div>Thanks,</div><div>-Eric</div><div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>------------------------------------------------------</div><div>Eric E Monson</div><div>Duke Visualization Technology Group</div><div><br class="webkit-block-placeholder"></div></span></div><br><div><div>On Mar 29, 2010, at 4:18 PM, Dr. Philip Julian Broser wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I tried that but it does not change the behavior of the program.<div><br></div><div>But interestingly when I am compiling and using the software on a machine running Mac OSX10.4 the slice updates without any problem,</div><div><br></div><div>but when I am using 10.6 the problems starts.</div><div><br></div><div>Does any body know anything about any buck on 10.6?</div><div><br></div><div><div>On Mar 29, 2010, at 5:19 PM, Jothybasu K Selvaraj wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">You should be adding your Imageactor to some renderWindow. So, try RenderWindow->Render().<br><br>Jothy<br><br><div class="gmail_quote">On Mon, Mar 29, 2010 at 3:07 PM, Dr. Philip Julian Broser <span dir="ltr"><<a href="mailto:philip.broser@doctors.net.uk">philip.broser@doctors.net.uk</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;"><div>Dear VTK Users,</div><div><br></div><div>I am still struggling with updating the zslice in the vtkImageActor</div> <div><br></div><div><br></div><div>I am visualising 3D Volume Data (tiff) using an vtkImageActor:</div><div><font face="Menlo" size="3"><span style="font-size: 11px;"><br></span></font></div><div><span style="font-family: Menlo; font-size: 11px;">vtkImageData *FaImage = (correctly loaded 3d volume data, see down below)</span></div> <div><font face="Menlo" size="3"><span style="font-size: 11px;"><br></span></font></div><div style="margin: 0px;">vtkImageActor *ImageActor = vtkImageActor::New();</div><div><font face="Menlo" size="3"><span style="font-size: 11px;"><div style="margin: 0px;"> ImageActor->SetInput (FaImage); </div></span></font></div><div><div style="margin: 0px;">ImageActor->SetZSlice (<font color="#3d00db">2</font>);</div></div><div><br></div><div>The visualisation of the first Zslice works very well. </div> <div><br></div><div>However my program visualizes 3D Volume MRI data and overlays it with vtk meshes of brain structures i.e. the thalmus.</div><div>To check that the structure in the vtk mesh was correctly segmented and localized I want to look at single z planes.</div> <div>In order to be able to select different planes I have written a simple Event Class. </div><div>With every click of the mouse the image plane should shift by one pixel in z. </div><div>The first plane is always well visualised and the actor seems to be correctly initiated </div> <div>but the plane is not updated when a event occurs even so the command SetZSlice is called with the new z value.</div><div><br></div><div>Does any body have an idea why the image actor is not updated?</div><div><br></div> <div>Kind regards</div><div><br></div><div>Phil</div><div><br></div><div><br></div><div><div style="margin: 0px;"><span style="color: rgb(204, 0, 162);">class</span> myEventClass : <span style="color: rgb(204, 0, 162);">public</span> vtkCommand</div> <div style="margin: 0px;">{</div><div style="margin: 0px; min-height: 13px;"><span style="white-space: pre;">        </span><br></div><div style="margin: 0px; min-height: 13px;"><br></div><div style="margin: 0px; min-height: 13px;"> <br></div><div style="margin: 0px;"><span style="white-space: pre;">        </span><span style="color: rgb(204, 0, 162);">virtual</span> <span style="color: rgb(204, 0, 162);">void</span> Execute<span style="white-space: pre;">        </span>( <span style="white-space: pre;">        </span>vtkObject * <span style="white-space: pre;">        </span>caller, <span style="color: rgb(204, 0, 162);">unsigned</span> <span style="color: rgb(204, 0, 162);">long</span> <span style="white-space: pre;">        </span>eventId, <span style="color: rgb(204, 0, 162);">void</span> * <span style="white-space: pre;">        </span>callData) <span style="white-space: pre;">        </span></div> <div style="margin: 0px;"><span style="white-space: pre;">        </span>{</div><div style="margin: 0px;"><span style="white-space: pre;">        </span><span style="color: rgb(204, 0, 162);">int</span> max=ImageActor->GetWholeZMax<span style="white-space: pre;">        </span>( );</div> <div style="margin: 0px;"><span style="white-space: pre;">        </span><span style="color: rgb(204, 0, 162);">int</span> min=ImageActor->GetWholeZMin<span style="white-space: pre;">        </span>( );</div><div style="margin: 0px; min-height: 13px;"> <br></div><div style="margin: 0px; min-height: 13px;"><br></div><div style="margin: 0px;"><span style="white-space: pre;">        </span><span style="color: rgb(204, 0, 162);">if</span> (dir==<span style="color: rgb(61, 0, 219);">0</span>)</div> <div style="margin: 0px;"><span style="white-space: pre;">        </span>{</div><div style="margin: 0px;"><span style="white-space: pre;">        </span>z=z+<span style="color: rgb(61, 0, 219);">1</span>;</div><div style="margin: 0px;"> <span style="white-space: pre;">        </span><span style="color: rgb(204, 0, 162);">if</span> (z>max ) {z=max;dir=<span style="color: rgb(61, 0, 219);">1</span>;}</div><div style="margin: 0px;"><span style="white-space: pre;">        </span>}</div> <div style="margin: 0px; color: rgb(204, 0, 162);"><span style="color: rgb(0, 0, 0);"><span style="white-space: pre;">        </span></span>else</div><div style="margin: 0px;"><span style="white-space: pre;">        </span>{</div><div style="margin: 0px;"> <span style="white-space: pre;">        </span>z=z-<span style="color: rgb(61, 0, 219);">1</span>;</div><div style="margin: 0px;"><span style="white-space: pre;">        </span><span style="color: rgb(204, 0, 162);">if</span> (z<min) {z=min;dir=<span style="color: rgb(61, 0, 219);">0</span>;}</div> <div style="margin: 0px;"><span style="white-space: pre;">        </span>};</div><div style="margin: 0px; min-height: 13px;"><span style="white-space: pre;">        </span><br></div><div style="margin: 0px; min-height: 13px;"><span style="white-space: pre;">                </span><br> </div><div style="margin: 0px;"><span style="white-space: pre;">        </span><b>ImageActor->SetZSlice (z);</b></div><div style="margin: 0px; min-height: 13px;"><span style="white-space: pre;">        </span><br></div><div style="margin: 0px; min-height: 13px;"> <span style="white-space: pre;">                </span><br></div><div style="margin: 0px;"><span style="white-space: pre;">        </span>cout << <span style="color: rgb(226, 3, 0);">"Current z Slice:"</span> << z << endl;</div> <div style="margin: 0px;"><span style="white-space: pre;">        </span>};</div><div style="margin: 0px; min-height: 13px;"><span style="white-space: pre;">        </span><br></div><div style="margin: 0px; color: rgb(204, 0, 162);"><span style="color: rgb(0, 0, 0);"><span style="white-space: pre;">        </span></span>public<span style="color: rgb(0, 0, 0);">: </span></div> <div style="margin: 0px;"><span style="white-space: pre;">        </span>myEventClass() {</div><div style="margin: 0px;"><span style="white-space: pre;">        </span>z=<span style="color: rgb(61, 0, 219);">0</span>;</div><div style="margin: 0px;"> <span style="white-space: pre;">        </span>dir=<span style="color: rgb(61, 0, 219);">0</span>; </div><div style="margin: 0px;"><span style="white-space: pre;">        </span>}<span style="white-space: pre;">        </span></div><div style="margin: 0px; min-height: 13px;"> <span style="white-space: pre;">        </span><br></div><div style="margin: 0px;"><span style="white-space: pre;">        </span><span style="color: rgb(204, 0, 162);">void</span> SetImageActor(vtkImageActor *iA) {ImageActor=iA;};</div> <div style="margin: 0px;"><span style="white-space: pre;">        </span></div><div style="margin: 0px; min-height: 13px;"><span style="white-space: pre;">        </span><br></div><div style="margin: 0px; color: rgb(204, 0, 162);">private<span style="color: rgb(0, 0, 0);">:</span></div> <div style="margin: 0px;"><span style="white-space: pre;">        </span>vtkImageActor *ImageActor;</div><div style="margin: 0px;"><span style="white-space: pre;">        </span><span style="color: rgb(204, 0, 162);">int</span> z;</div> <div style="margin: 0px;"><span style="white-space: pre;">        </span><span style="color: rgb(204, 0, 162);">int</span> dir;</div><div style="margin: 0px;">};</div><div style="margin: 0px;"><br></div><div style="margin: 0px;"> <br></div><div style="margin: 0px;"><div style="margin: 0px;">vtkImageData (0x101022350)</div><div style="margin: 0px;"> Debug: Off</div><div style="margin: 0px;"> Modified Time: 554</div><div style="margin: 0px;"> Reference Count: 3</div> <div style="margin: 0px;"> Registered Events: (none)</div><div style="margin: 0px;"> Source: (none)</div><div style="margin: 0px;"> Information: 0x1010224b0</div><div style="margin: 0px;"> Data Released: False</div><div style="margin: 0px;"> Global Release Data: Off</div><div style="margin: 0px;"> UpdateTime: 0</div><div style="margin: 0px;"> Release Data: Off</div><div style="margin: 0px;"> UpdateExtent: Not Initialized</div><div style="margin: 0px;"> RequestExactExtent: Off</div> <div style="margin: 0px;"> Field Data:</div><div style="margin: 0px;"> Debug: Off</div><div style="margin: 0px;"> Modified Time: 456</div><div style="margin: 0px;"> Reference Count: 1</div><div style="margin: 0px;"> Registered Events: (none)</div><div style="margin: 0px;"> Number Of Arrays: 0</div><div style="margin: 0px;"> Number Of Components: 0</div><div style="margin: 0px;"> Number Of Tuples: 0</div><div style="margin: 0px;"> Number Of Points: 414720</div><div style="margin: 0px;"> Number Of Cells: 397100</div><div style="margin: 0px;"> Cell Data:</div><div style="margin: 0px;"> Debug: Off</div><div style="margin: 0px;"> Modified Time: 459</div> <div style="margin: 0px;"> Reference Count: 1</div><div style="margin: 0px;"> Registered Events: (none)</div><div style="margin: 0px;"> Number Of Arrays: 0</div><div style="margin: 0px;"> Number Of Components: 0</div> <div style="margin: 0px;"> Number Of Tuples: 0</div><div style="margin: 0px;"> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )</div><div style="margin: 0px;"> Interpolate Flags: ( 1 1 1 1 1 0 0 )</div><div style="margin: 0px;"> Pass Through Flags: ( 1 1 1 1 1 1 1 )</div><div style="margin: 0px;"> Scalars: (none)</div><div style="margin: 0px;"> Vectors: (none)</div><div style="margin: 0px;"> Normals: (none)</div><div style="margin: 0px;"> TCoords: (none)</div><div style="margin: 0px;"> Tensors: (none)</div><div style="margin: 0px;"> GlobalIds: (none)</div><div style="margin: 0px;"> PedigreeIds: (none)</div><div style="margin: 0px;"> Point Data:</div> <div style="margin: 0px;"> Debug: Off</div><div style="margin: 0px;"> Modified Time: 552</div><div style="margin: 0px;"> Reference Count: 1</div><div style="margin: 0px;"> Registered Events: (none)</div><div style="margin: 0px;"> Number Of Arrays: 1</div><div style="margin: 0px;"> Array 0 name = NULL</div><div style="margin: 0px;"> Number Of Components: 1</div><div style="margin: 0px;"> Number Of Tuples: 414720</div><div style="margin: 0px;"> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )</div><div style="margin: 0px;"> Interpolate Flags: ( 1 1 1 1 1 0 0 )</div><div style="margin: 0px;"> Pass Through Flags: ( 1 1 1 1 1 1 1 )</div><div style="margin: 0px;"> Scalars: </div> <div style="margin: 0px;"> Debug: Off</div><div style="margin: 0px;"> Modified Time: 452</div><div style="margin: 0px;"> Reference Count: 2</div><div style="margin: 0px;"> Registered Events: (none)</div> <div style="margin: 0px;"> Name: (none)</div><div style="margin: 0px;"> Data type: unsigned char</div><div style="margin: 0px;"> Size: 414720</div><div style="margin: 0px;"> MaxId: 414719</div><div style="margin: 0px;"> NumberOfComponents: 1</div><div style="margin: 0px;"> Information: 0</div><div style="margin: 0px;"> Name: (none)</div><div style="margin: 0px;"> Number Of Components: 1</div><div style="margin: 0px;"> Number Of Tuples: 414720</div><div style="margin: 0px;"> Size: 414720</div><div style="margin: 0px;"> MaxId: 414719</div><div style="margin: 0px;"> LookupTable: (none)</div><div style="margin: 0px;"> Array: 0x101100000</div> <div style="margin: 0px;"> Vectors: (none)</div><div style="margin: 0px;"> Normals: (none)</div><div style="margin: 0px;"> TCoords: (none)</div><div style="margin: 0px;"> Tensors: (none)</div><div style="margin: 0px;"> GlobalIds: (none)</div><div style="margin: 0px;"> PedigreeIds: (none)</div><div style="margin: 0px;"> Bounds: </div><div style="margin: 0px;"> Xmin,Xmax: (0, 237.5)</div><div style="margin: 0px;"> Ymin,Ymax: (0, 237.5)</div> <div style="margin: 0px;"> Zmin,Zmax: (0, 110)</div><div style="margin: 0px;"> Compute Time: 0</div><div style="margin: 0px;"> ScalarType: 3</div><div style="margin: 0px;"> NumberOfScalarComponents: 1</div><div style="margin: 0px;"> Spacing: (2.5, 2.5, 2.5)</div><div style="margin: 0px;"> Origin: (0, 0, 0)</div><div style="margin: 0px;"> Dimensions: (96, 96, 45)</div><div style="margin: 0px;"> Increments: (0, 0, 0)</div><div style="margin: 0px;"> Extent: (0, 95, 0, 95, 0, 44)</div></div><div><font face="Menlo" size="3"><span style="font-size: 11px;"><br></span></font></div></div></div><br>_______________________________________________<br> Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br> <br> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> <br> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br> <br> Follow this link to subscribe/unsubscribe:<br> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br> <br></blockquote></div><br></div> </blockquote></div><br></div>_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br></div></blockquote></div><br></div></body></html>