Hi Sharwari,<br><br>The errors I am getting are:<br><pre>Linking...<br>   Creating library Debug\mygui.lib and object Debug\mygui.exp<br>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
<br>Debug\mygui.exe : fatal error LNK1120: 1 unresolved externals<br></pre>Is it because of the cmakelist.txt file? <br><br>Thanks,<br>Ashish<br><br><div><span class="gmail_quote">On 10/17/06, <b class="gmail_sendername">
Sharwari Mavalankar</b> &lt;<a href="mailto:sharwari@gmail.com">sharwari@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>hi Ashish,</div>
<div>What exactly was the error?</div><div><span class="e" id="q_10e591f0611b443d_1">
<div>Sharwari<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 10/17/06, <b class="gmail_sendername">Ashish Singh</b> &lt;<a href="mailto:mrasingh@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mrasingh@gmail.com</a>
&gt; wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">Hi Sharwari,<br><br>I have these variables set to ON. I have already build vtk and kwwidgets with TCL,TK options set to ON and tested it with examples. They run fine.
<br><br>I think I didnt put the question correctly. What I was asking was how does the cmakelist.txt file look like for the code you posted here. I am making a GUI for my dicom volume rendering based on the code you posted and when I build this GUI code that gives me linker error. So I was thinking that maybe I am doing something wrong there. Can you please tell me how the 
cmaklist.txt file look like for kwwidget GUI code?<br><br><br>Thanks,<br><span>Ashish</span> 
<div><span><br><br>
<div><span class="gmail_quote">On 10/17/06, <b class="gmail_sendername">Sharwari Mavalankar</b> &lt;<a href="mailto:sharwari@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> sharwari@gmail.com
</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>hi Ashish,</div>
<div>The cmake file (for vtk) should have the following two variables set to ON.</div>
<div>VTK_USE_TK&nbsp; and </div>
<div>VTK_WRAP_TCL</div>
<div>So try and build vtk again using these two cmake variables to ON and then build KWWidgets again.</div>
<div>Let me know if it helps.</div>
<div>Thanks </div><span>
<div>Sharwari</div>
<div><br><br>&nbsp;</div></span>
<div><span>
<div><span class="gmail_quote">On 10/17/06, <b class="gmail_sendername">Ashish Singh</b> &lt;<a href="mailto:mrasingh@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mrasingh@gmail.com</a>

 &gt; wrote:</span> 
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">Hi Sharwari, I am getting a linker error for my dicom volume GUI code (using KWWidgets) which is exactly similar to ur code above. I am not sure if my cmakelist file is right. Can you plz. tell me what goes in the cmakelist file? 
<br><br>Thanks,<br><span>Ashish</span> 
<div><span><br><br>
<div><span class="gmail_quote">On 10/17/06, <b class="gmail_sendername">Ashish Singh</b> &lt;<a href="mailto:mrasingh@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mrasingh@gmail.com</a>

 &gt; wrote:</span> 
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Sharwari, <br>How does the cmake file for your code look like? What all things need to go in the cmake file? is there an example you are following? 
<br>So soes your volume finally show up ?<br>I got Qt working with VTK but am stuck again with transfering data between Qt and vtk. <br><br>Thanks,<br><span>Ashish</span> 
<div><span><br><br><br>
<div><span class="gmail_quote">On 10/17/06, <b class="gmail_sendername">Amy Squillacote</b> &lt;<a href="mailto:amy.squillacote@kitware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> amy.squillacote@kitware.com 
</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">Hi Sharwari,<br><br>I'm copying this back to the vtkusers list so other people can see the resolution of your problem.<br><br>- Amy<br><br>Sharwari Mavalankar wrote: 
<blockquote cite="http://mid2462f9f80610170846t83fdfb8xbb2a9e20a226e21d@mail.gmail.com" type="cite">
<div>hi Amy,</div>
<div>Thanks for your email.</div>
<div>yes I have turned both the CMAKE variables to bool value =ON.</div>
<div>But I realized that there were some .dll and .lib files that had to be updated.</div>
<div>I did that and now that error is gone.</div>
<div>but thanks anyways!</div>
<div>Sharwari 
<div><span><br><br><span class="gmail_quote">On 10/17/06, <b class="gmail_sendername">Amy Squillacote</b> &lt;<a href="mailto:amy.squillacote@kitware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

 amy.squillacote@kitware.com</a>&gt; wrote:</span></span></div></div>
<div><span>
<div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">Hi Sharwari,<br><br>In the VTK that you're using with KWWidgets, did you turn on both of the following CMake variables: VTK_USE_RENDERING and VTK_WRAP_TCL? Both of them are required in order for vtkTkRenderWidget to be built. 
<br><br>- Amy<br><br>Sharwari Mavalankar wrote: 
<blockquote cite="http://mid2462f9f80610161638n44f0c3d6t98d8207f9bbf1d5e@mail.gmail.com" type="cite">
<div><span>
<div>hi all,</div>
<div>I am working on creating a UI using KWWidgets.</div>
<div>I want to display a 3D volume in this UI from 2D BMP slices.</div>
<div>The volume rendering is working fine without the UI.But I seem to have some problem with the UI.</div>
<div>It displays the UI window, but I cannot see the 3D volume inside it.</div>
<div>Addionally on running the program I get the following error on the vtkoutput window.</div>
<div>
<p>ERROR: In C:\Program Files\KWWidgets\KWWidgets-HEAD-cvs\vtkKWTkUtilities.cxx, line 221<br>vtkKWApplication (0x03414370): <br>&nbsp;&nbsp;&nbsp; Script: <br>vtkTkRenderWidget .1.10.18.21.22.25.100.102.104.107.108 -rw Addr=03428710<br>

&nbsp;&nbsp;&nbsp; Returned Error on line 1: <br>invalid command name &quot;vtkTkRenderWidget&quot;<br>Stack trace: <br>invalid command name &quot;vtkTkRenderWidget&quot;<br>&nbsp;&nbsp;&nbsp; while executing<br>&quot;vtkTkRenderWidget .1.10.18.21.22.25.100.102.104.107.108 -rw Addr=03428710&quot; 
</p>
<p><br>ERROR: In C:\Program Files\KWWidgets\KWWidgets-HEAD-cvs\vtkKWWidget.cxx, line 301<br>vtkKWCoreWidget (0x03428990): Error creating the widget .1.10.18.21.22.25.100.102.104.107.108 of type vtkTkRenderWidget: invalid command name &quot;vtkTkRenderWidget&quot; 
</p>
<p>ERROR: In C:\Program Files\KWWidgets\KWWidgets-HEAD-cvs\vtkKWTkUtilities.cxx, line 221<br>vtkKWApplication (0x03414370): <br>&nbsp;&nbsp;&nbsp; Script: <br>grid .1.10.18.21.22.25.100.102.104.107.108 -row 0 -column 0 -sticky nsew<br>

&nbsp;&nbsp;&nbsp; Returned Error on line 1: <br>bad window path name &quot;.1.10.18.21.22.25.100.102.104.107.108&quot;<br>Stack trace: <br>bad window path name &quot;.1.10.18.21.22.25.100.102.104.107.108&quot;<br>&nbsp;&nbsp;&nbsp; while executing<br>

&quot;grid .1.10.18.21.22.25.100.102.104.107.108 -row 0 -column 0 -sticky nsew&quot;</p>
<p><br>ERROR: In C:\Program Files\KWWidgets\KWWidgets-HEAD-cvs\vtkKWApplication.cxx, line 999<br>vtkKWApplication (0x03414370): TclTk error: Object named: vtkTemp44, could not find requested method: ConfigureCallback<br>

or the method was called with incorrect arguments.</p>
<p>Object named: vtkTemp44, could not find requested method: ConfigureCallback<br>or the method was called with incorrect arguments.</p>
<p>&nbsp;&nbsp;&nbsp; while executing<br>&quot;vtkTemp44 ConfigureCallback 900 668&quot;<br>&nbsp;&nbsp;&nbsp; (command bound to event)</p>
<p>&nbsp;Here is my code</p>
<p>//The following code includes the vtk code and the KWWidgets code for the user interface.<br>#include &quot;vtkRenderer.h&quot;<br>#include &quot;vtkRenderWindow.h&quot;<br>#include &quot;vtkRenderWindowInteractor.h&quot; 
<br>#include &quot;vtkBMPReader.h&quot;<br>#include &quot;vtkPolyDataMapper.h&quot;<br>#include &quot;vtkActor.h&quot;<br>#include &quot;vtkActor2D.h&quot;<br>#include &quot;vtkImageActor.h&quot;<br>#include &quot;vtkOutlineFilter.h

 &quot;<br>#include &quot;vtkCamera.h&quot;<br>#include &quot;vtkProperty.h&quot;<br>#include &quot;vtkPolyDataNormals.h&quot;<br>#include &quot;vtkContourFilter.h&quot;<br>#include &quot;vtkDataSetMapper.h&quot;<br>#include &quot; 
vtkImageMapper.h&quot;<br>#include &quot;vtkVolumeMapper.h&quot;<br>#include &quot;vtkVolumeRayCastMapper.h&quot;<br>#include &quot;vtkVolumeRayCastCompositeFunction.h&quot;<br>#include &quot;vtkPiecewiseFunction.h&quot; 
<br>#include &quot;vtkVolumeProperty.h&quot;<br>#include &quot;vtkColorTransferFunction.h&quot;<br>#include &quot;vtkLight.h&quot;<br>#include &quot;vtkFixedPointVolumeRayCastMapper.h&quot;<br>#include &quot;vtkKWApplication.h

 &quot;<br>#include &quot;vtkKWWindowBase.h&quot;<br>#include &quot;vtkKWRenderWidget.h&quot;<br>#include &quot;vtkKWWindow.h&quot;<br>#include &quot;vtkKWFrame.h&quot;</p>
<p>int main(int argc, char *argv[])<br>{<br>&nbsp;<br>&nbsp;// Initialize Tcl.This is required otherwise the program crashes.<br>&nbsp;<br>&nbsp;Tcl_Interp *interp = vtkKWApplication::InitializeTcl(argc, argv, &amp;cerr);<br>&nbsp; if (!interp)<br>

&nbsp; {<br>&nbsp; cerr &lt;&lt; &quot;Error: InitializeTcl failed&quot; &lt;&lt; endl ;<br>&nbsp; return 1;<br>&nbsp; }</p>
<p><br>//using bmp to read gray image<br>&nbsp;vtkBMPReader *reader = vtkBMPReader::New();<br>&nbsp;reader-&gt;SetFilePattern(&quot;%s%d.bmp&quot;);<br>&nbsp;<br>&nbsp;&nbsp;reader-&gt;SetFilePrefix(&quot;C:\\Images\\PositionCReal\\Depth5mm\\slice&quot;); 
<br>&nbsp;<br>&nbsp;<br>&nbsp;reader-&gt;SetDataExtent(0, 310, 0, 310, 1, 8);<br>&nbsp;reader-&gt;SetDataSpacing(1.0,1.0,20.0);<br>&nbsp;reader-&gt;SetDataOrigin(0.0, 0.0, 0.0);<br>&nbsp;reader-&gt;Update();<br>&nbsp;<br>&nbsp; <br>&nbsp;//vtkImageData *finalImg = reader-&gt;GetOutput(); 
<br>&nbsp;<br>&nbsp; <br>&nbsp;vtkPiecewiseFunction *tfun = vtkPiecewiseFunction::New();</p>
<p>//The following lines of code displays the copper target for position A and C<br>&nbsp;tfun-&gt;AddPoint(128,0.009);<br>&nbsp;tfun-&gt;AddPoint(180,1.0);<br>&nbsp;tfun-&gt;AddPoint(200,1.0);<br>&nbsp;tfun-&gt;AddPoint(255,0.0009);</p>
<p>&nbsp;&nbsp;vtkFixedPointVolumeRayCastMapper *volumeMapper = vtkFixedPointVolumeRayCastMapper::New();<br>&nbsp;<br>&nbsp;//volumeMapper-&gt;SetSampleDistance(1.0);</p>
<p>&nbsp;//volumeMapper-&gt;SetInput(finalImg);<br>&nbsp;volumeMapper-&gt;SetInput(reader-&gt;GetOutput());</p>
<p>&nbsp;vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New();</p>
<p>&nbsp; //show gray volume<br>&nbsp;volumeProperty-&gt;IndependentComponentsOff();<br>&nbsp;volumeProperty-&gt;SetScalarOpacity(tfun);<br>&nbsp;&nbsp;<br><br>&nbsp;<br>&nbsp;vtkVolume *newvol = vtkVolume::New();<br>&nbsp;newvol-&gt;SetMapper(volumeMapper);<br>

&nbsp;newvol-&gt;SetProperty(volumeProperty);</p>
<p>&nbsp;vtkOutlineFilter *outline = vtkOutlineFilter::New();<br>&nbsp;outline-&gt;SetInput((vtkDataSet *) reader-&gt;GetOutput());</p>
<p>&nbsp;vtkPolyDataMapper *outlineMapper = vtkPolyDataMapper::New();<br>&nbsp;outlineMapper-&gt;SetInput(outline-&gt;GetOutput());</p>
<p>&nbsp;vtkActor *outlineActor = vtkActor::New();<br>&nbsp;outlineActor-&gt;SetMapper(outlineMapper);<br>&nbsp;outlineActor-&gt;GetProperty()-&gt;SetColor(1,1,1);</p>
<p>&nbsp;</p>
<p>&nbsp;//Create a KWWidgets Application<br>&nbsp;vtkKWApplication *app = vtkKWApplication::New();<br>&nbsp;app-&gt;SetRegistryLevel(0);<br>&nbsp;app-&gt;PromptBeforeExitOff();</p>
<p>&nbsp;&nbsp;&nbsp;<br>&nbsp;vtkKWTopLevel *top = vtkKWTopLevel::New();<br>&nbsp;top-&gt;SetApplication(app);<br>&nbsp;top-&gt;Create(); <br>&nbsp;</p>
<p>&nbsp;//Add a window for the application<br>&nbsp;vtkKWWindow *win = vtkKWWindow::New();<br>&nbsp;app-&gt;AddWindow(win);<br>&nbsp;win-&gt;SecondaryPanelVisibilityOff();<br>&nbsp;win-&gt;MainPanelVisibilityOff();<br>&nbsp;win-&gt;Create();</p>
<p><br>&nbsp;vtkKWRenderWidget *renderwidget = vtkKWRenderWidget::New();<br>&nbsp;renderwidget-&gt;SetParent(win-&gt;GetViewFrame());<br>&nbsp;renderwidget-&gt;Create();<br>&nbsp;renderwidget-&gt;AddViewProp(newvol);<br>&nbsp;renderwidget-&gt;CornerAnnotationVisibilityOn(); 
<br>&nbsp;app-&gt;Script(&quot;pack %s -expand y -fill both -anchor c -expand y&quot;,renderwidget-&gt;GetWidgetName());<br>&nbsp;<br>&nbsp;win-&gt;Display();<br>&nbsp;app-&gt;Start();</p>
<p>&nbsp;<br>&nbsp;<br>&nbsp;win-&gt;Display();<br>&nbsp;app-&gt;Start();</p>
<p><br>&nbsp;return(0);</p>
<p>}<br></p>
<p>Can someone please help me out.</p>
<p>Thanks&nbsp;</p>
<p>Sharwari&nbsp;</p>
<p>&nbsp;</p>
<p><br>&nbsp;</p></div></span></div><pre><hr size="4" width="90%">
_______________________________________________<br>This is the private VTK discussion list. <br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">





http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.vtk.org/mailman/listinfo/vtkusers</a>
  </pre></blockquote></div></blockquote></div><br></span></div></blockquote></div><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: 
<a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://www.vtk.org/mailman/listinfo/vtkusers </a><br><br><br></blockquote></div><br></span></div></blockquote></div><br></span></div></blockquote></div><br></span></div></blockquote></div><br></span></div></blockquote></div>

<br>

</span></div></blockquote></div><br>