<DIV>hi everybody,</DIV>
<DIV> </DIV>
<DIV>i am new to vtk and i am trying to build a 2D unstructured grid that represents a beam made of 8 triangles and 10 points.</DIV>
<DIV>i have already built a 3D unstructured grid using hexahedrons and things worked quite fine. On the other hands i always get an errror saying " nameofmyfile.exe has encountered a problem and needs to close". i am almost sure that nothing is wrong with the code which goes as follows:</DIV>
<DIV>// points coordinates</DIV>
<DIV> static float coord[10][3]=<BR> { <BR> {0,0,0},<BR> {1,0,0},<BR> {2,0,0},<BR> {3,0,0},<BR> {4,0,0},<BR> {0,1,0},<BR> {1,1,0},<BR> {2,1,0},<BR> {3,1,0},<BR> {4,1,0}};</DIV>
<DIV> </DIV>
<DIV>// Cells connectivity<BR>vtkIdType indices[8][3]=<BR> {<BR> {1,2,7},<BR> {1,7,6},<BR> {2,3,8},<BR> {2,8,7},<BR> {3,4,9},<BR> {3,9,8},<BR> {4,5,10},<BR> {4,10,9}};<BR> </DIV>
<DIV> </DIV>
<DIV> vtkPoints *pts=vtkPoints::New();<BR>for (int i=0;i<10;i++) </DIV>
<DIV> pts->InsertPoint(i,coord[i]);<BR> </DIV>
<DIV>vtkUnstructuredGrid *grid=vtkUnstructuredGrid::New();<BR><BR>for ( i=0;i<8;i++) grid->InsertNextCell(VTK_TRIANGLE,10,indices[i]);</DIV>
<DIV>grid->SetPoints(pts);</DIV>
<DIV> </DIV>
<DIV>vtkDataSetMapper *gridmap =vtkDataSetMapper::New();<BR>gridmap->SetInput(grid);</DIV>
<DIV> </DIV>
<DIV>vtkActor *gridact=vtkActor::New();<BR>gridact->SetMapper(gridmap);</DIV>
<DIV> </DIV>
<DIV>vtkRenderer *ren1=vtkRenderer::New();<BR>ren1->AddActor(gridact);<BR></DIV>
<DIV>vtkRenderWindow *renwin=vtkRenderWindow::New();<BR>renwin->AddRenderer(ren1);<BR></DIV>
<DIV>vtkRenderWindowInteractor *renwinint=vtkRenderWindowInteractor::New();</DIV>
<DIV>renwinint->SetRenderWindow(renwin);<BR></DIV>
<DIV>renwin->Render();<BR>renwinint->Start();</DIV>
<DIV> </DIV>
<DIV>the same code worked for the hexahedron. it's kind of strange that is not working for the triangles.</DIV>
<DIV>please help.</DIV>
<DIV>thx.</DIV>
<DIV><BR><BR><B><I>vtkusers-request@vtk.org</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Send vtkusers mailing list submissions to<BR>vtkusers@vtk.org<BR><BR>To subscribe or unsubscribe via the World Wide Web, visit<BR>http://www.vtk.org/mailman/listinfo/vtkusers<BR>or, via email, send a message with subject or body 'help' to<BR>vtkusers-request@vtk.org<BR><BR>You can reach the person managing the list at<BR>vtkusers-owner@vtk.org<BR><BR>When replying, please edit your Subject line so it is more specific<BR>than "Re: Contents of vtkusers digest..."<BR><BR><BR>Today's Topics:<BR><BR>1. Re: Compiling VTK with DevCpp and MinGW (Dimitrios Andritsos)<BR>2. Re: Compiling VTK with DevCpp and MinGW (David Cole)<BR>3. Averaging vtkTransforms (Kevin Wilson)<BR>4. setposition (Louis Desjardins)<BR>5. Offscreen Rendering with Windows (Rene Tschirley)<BR>6. Problem with sampling using vtkProbeFilter (Charles
Boivin)<BR><BR><BR>----------------------------------------------------------------------<BR><BR>Message: 1<BR>Date: Wed, 20 Jul 2005 19:23:25 +0300<BR>From: "Dimitrios Andritsos" <JIMANDR@HOTMAIL.COM><BR>Subject: Re: [vtkusers] Compiling VTK with DevCpp and MinGW<BR>To: "David Cole" <DAVID.COLE@KITWARE.COM><BR>Cc: vtkusers@vtk.org<BR>Message-ID: <BAY21-DAV126D45EBFDF87615FF3871B8D70@PHX.GBL><BR>Content-Type: text/plain; format=flowed; charset="iso-8859-1";<BR>reply-type=response<BR><BR>I am using CMake 2.0.6 and I am trying to build vtk 4.4.<BR><BR>I played a little bit with CMakeLists.txt files where I tried to comment <BR>out any attempts to load support for either tcl, python or java and although <BR>I didn't get the dll erros I still get an error that the command <BR>vtk_make_instantiator2 cannot be found. The errors are generated if I <BR>comment out loading vtkLoadCmakeExtensions and vtkCompileCmakeExtensions. I <BR>am not a CMake guru so I don't really know how to do such
changes.<BR><BR>Dimitris<BR><BR>----- Original Message ----- <BR>From: "David Cole" <DAVID.COLE@KITWARE.COM><BR>To: "Dimitrios Andritsos" <JIMANDR@HOTMAIL.COM><BR>Cc: <VTKUSERS@VTK.ORG><BR>Sent: Wednesday, July 20, 2005 6:57 PM<BR>Subject: Re: [vtkusers] Compiling VTK with DevCpp and MinGW<BR><BR><BR>> Hmmmm...<BR>><BR>> So: what version of CMake are you using? (I was assuming latest released <BR>> or CVS: 2.0.6 or later?)<BR>> What version of VTK are you trying to build?<BR>> I have only built VTK from recent CVS with MinGW. Can you update your VTK <BR>> to latest CVS?<BR>><BR>> Dimitrios Andritsos wrote:<BR>><BR>>> Hello David,<BR>>><BR>>> Thank you for your reply. I don't need Tcl but I am not really sure how <BR>>> to turn this option off. The error that I am getting is generated while <BR>>> CMake tries to configure and generate the initial makefiles, before I get <BR>>> the option of turning the various wrapping
options on or off. Do you know <BR>>> if I could turn the Tcl wrapping option off even before cmake tries to <BR>>> configure the makefiles?<BR>>><BR>>> Thanks a lot,<BR>>> Dimitris<BR>>><BR>>> ----- Original Message ----- From: "David Cole" <DAVID.COLE@KITWARE.COM><BR>>> To: "Dimitrios Andritsos" <JIMANDR@HOTMAIL.COM><BR>>> Cc: <VTKUSERS@VTK.ORG><BR>>> Sent: Wednesday, July 20, 2005 4:44 PM<BR>>> Subject: Re: [vtkusers] Compiling VTK with DevCpp and MinGW<BR>>><BR>>><BR>>>> It sounds like you have VTK_WRAP_TCL turned on. I'm not sure if TCL<BR>>>> wrapping will work from a MinGW compile, unless there's a MinGW<BR>>>> supported version of Tcl/Tk that you can install. You'll need the libs<BR>>>> to link against.<BR>>>><BR>>>> Has anybody out there done a Tcl wrapped build of VTK under MinGW?<BR>>>><BR>>>> Do you still get that error if
you set VTK_WRAP_TCL to OFF when you<BR>>>> configure with CMakeSetup?<BR>>>> Do you need TCL wrapping?<BR>>>><BR>>>> HTH a little bit,<BR>>>> David<BR>>>><BR>>>> Dimitrios Andritsos wrote:<BR>>>><BR>>>>> Hello all,<BR>>>>> I' ve been trying (unsuccessfully) to build vtk with the mingw <BR>>>>> compiler in windows. From some previous posts I saw that runing cmake <BR>>>>> via msys would work but I get an error message that:<BR>>>>> 'LOAD_COMMAND Attempt to load command failed from file: <BR>>>>> cmVTK_WRAP_TCL2.dll' The process I follow is: 1)Run msys 2)Run <BR>>>>> cmakesetup (cmake -i is not working) 3)Try to generate unix makefiles.<BR>>>>> My goal is to build *.a lib files and in general build the vtk <BR>>>>> binaries in unix format to use within the dev-cpp environment.<BR>>>>> Any help
would be greatly appreciated.<BR>>>>> Thanks in advance!<BR>>>>> Dimitris<BR>>>>><BR>>>>> ------------------------------------------------------------------------<BR>>>>><BR>>>>><BR>>>>> _______________________________________________<BR>>>>> This is the private VTK discussion list. Please keep messages on-topic. <BR>>>>> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR>>>>> Follow this link to subscribe/unsubscribe:<BR>>>>> http://www.vtk.org/mailman/listinfo/vtkusers<BR>>>>><BR>>>><BR>>>><BR>>><BR>> <BR><BR><BR>------------------------------<BR><BR>Message: 2<BR>Date: Wed, 20 Jul 2005 12:58:32 -0400<BR>From: David Cole <DAVID.COLE@KITWARE.COM><BR>Subject: Re: [vtkusers] Compiling VTK with DevCpp and MinGW<BR>To: Dimitrios Andritsos <JIMANDR@HOTMAIL.COM><BR>Cc: vtkusers@vtk.org<BR>Message-ID:
<42DE82B8.60904@kitware.com><BR>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<BR><BR>Do you have to use VTK 4.4?<BR><BR>Can you update to the latest VTK from CVS? This does build under MinGW <BR>with no source code changes. (See evidence at : <BR>http://www.vtk.org/Testing/Sites/ARRAKIS.kitware/Win32-mingw/20050720-0300-Nightly/Test.html)<BR><BR>If I can make some time to investigate, I'll see if I can figure out a <BR>patch to apply on top of a VTK 4.4 source tree to allow building with <BR>MinGW. No promises, though. May not be for a while. If somebody else has <BR>already done this, please chime in...<BR><BR>Thanks,<BR>David<BR><BR>Dimitrios Andritsos wrote:<BR><BR>> I am using CMake 2.0.6 and I am trying to build vtk 4.4.<BR>><BR>> I played a little bit with CMakeLists.txt files where I tried to <BR>> comment out any attempts to load support for either tcl, python or <BR>> java and although I didn't get the dll erros I still get an error that
<BR>> the command vtk_make_instantiator2 cannot be found. The errors are <BR>> generated if I comment out loading vtkLoadCmakeExtensions and <BR>> vtkCompileCmakeExtensions. I am not a CMake guru so I don't really <BR>> know how to do such changes.<BR>><BR>> Dimitris<BR>><BR>> ----- Original Message ----- From: "David Cole" <DAVID.COLE@KITWARE.COM><BR>> To: "Dimitrios Andritsos" <JIMANDR@HOTMAIL.COM><BR>> Cc: <VTKUSERS@VTK.ORG><BR>> Sent: Wednesday, July 20, 2005 6:57 PM<BR>> Subject: Re: [vtkusers] Compiling VTK with DevCpp and MinGW<BR>><BR>><BR>>> Hmmmm...<BR>>><BR>>> So: what version of CMake are you using? (I was assuming latest <BR>>> released or CVS: 2.0.6 or later?)<BR>>> What version of VTK are you trying to build?<BR>>> I have only built VTK from recent CVS with MinGW. Can you update your <BR>>> VTK to latest CVS?<BR>>><BR>>> Dimitrios Andritsos
wrote:<BR>>><BR>>>> Hello David,<BR>>>><BR>>>> Thank you for your reply. I don't need Tcl but I am not really sure <BR>>>> how to turn this option off. The error that I am getting is <BR>>>> generated while CMake tries to configure and generate the initial <BR>>>> makefiles, before I get the option of turning the various wrapping <BR>>>> options on or off. Do you know if I could turn the Tcl wrapping <BR>>>> option off even before cmake tries to configure the makefiles?<BR>>>><BR>>>> Thanks a lot,<BR>>>> Dimitris<BR>>>><BR>>>> ----- Original Message ----- From: "David Cole" <BR>>>> <DAVID.COLE@KITWARE.COM><BR>>>> To: "Dimitrios Andritsos" <JIMANDR@HOTMAIL.COM><BR>>>> Cc: <VTKUSERS@VTK.ORG><BR>>>> Sent: Wednesday, July 20, 2005 4:44 PM<BR>>>> Subject: Re: [vtkusers] Compiling VTK with DevCpp and
MinGW<BR>>>><BR>>>><BR>>>>> It sounds like you have VTK_WRAP_TCL turned on. I'm not sure if TCL<BR>>>>> wrapping will work from a MinGW compile, unless there's a MinGW<BR>>>>> supported version of Tcl/Tk that you can install. You'll need the libs<BR>>>>> to link against.<BR>>>>><BR>>>>> Has anybody out there done a Tcl wrapped build of VTK under MinGW?<BR>>>>><BR>>>>> Do you still get that error if you set VTK_WRAP_TCL to OFF when you<BR>>>>> configure with CMakeSetup?<BR>>>>> Do you need TCL wrapping?<BR>>>>><BR>>>>> HTH a little bit,<BR>>>>> David<BR>>>>><BR>>>>> Dimitrios Andritsos wrote:<BR>>>>><BR>>>>>> Hello all,<BR>>>>>> I' ve been trying (unsuccessfully) to build vtk with the mingw <BR>>>>>> compiler in windows. From some
previous posts I saw that runing <BR>>>>>> cmake via msys would work but I get an error message that:<BR>>>>>> 'LOAD_COMMAND Attempt to load command failed from file: <BR>>>>>> cmVTK_WRAP_TCL2.dll' The process I follow is: 1)Run msys 2)Run <BR>>>>>> cmakesetup (cmake -i is not working) 3)Try to generate unix <BR>>>>>> makefiles.<BR>>>>>> My goal is to build *.a lib files and in general build the vtk <BR>>>>>> binaries in unix format to use within the dev-cpp environment.<BR>>>>>> Any help would be greatly appreciated.<BR>>>>>> Thanks in advance!<BR>>>>>> Dimitris<BR>>>>>><BR>>>>>> ------------------------------------------------------------------------ <BR>>>>>><BR>>>>>><BR>>>>>><BR>>>>>>
_______________________________________________<BR>>>>>> This is the private VTK discussion list. Please keep messages <BR>>>>>> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR>>>>>> Follow this link to subscribe/unsubscribe:<BR>>>>>> http://www.vtk.org/mailman/listinfo/vtkusers<BR>>>>>><BR>>>>><BR>>>>><BR>>>><BR>>><BR>><BR><BR><BR>------------------------------<BR><BR>Message: 3<BR>Date: Wed, 20 Jul 2005 13:05:09 -0400<BR>From: "Kevin Wilson" <KWILSON@IMAGING.ROBARTS.CA><BR>Subject: [vtkusers] Averaging vtkTransforms<BR>To: <VTKUSERS@VTK.ORG><BR>Message-ID: <PDELIKEGAHECAHLPECJDIEFHCBAA.KWILSON@IMAGING.ROBARTS.CA><BR>Content-Type: text/plain; charset="iso-8859-1"<BR><BR>Hi all,<BR><BR>I have about 10 polydata Transforms that I want to average into one<BR>Transform. My question is - is there any easier way to do this that<BR>extracting each rotation and
translation and averaging them manually?? I<BR>tried to look at vtkTransformCollection but I didn't see any GetAverage() in<BR>the documentation.<BR><BR>Any Suggestions??<BR><BR>Kevin<BR><BR><BR><BR>------------------------------<BR><BR>Message: 4<BR>Date: Wed, 20 Jul 2005 19:55:43 +0000<BR>From: "Louis Desjardins" <LOST_BITS1110@HOTMAIL.COM><BR>Subject: [vtkusers] setposition<BR>To: vtkusers@vtk.org<BR>Message-ID: <BAY107-F178216FA1EBFE0DB392E8199D70@PHX.GBL><BR>Content-Type: text/plain; format=flowed<BR><BR>Hi experts,<BR><BR>just a simple question -<BR><BR>I have a vtkActor2D (a vtkTextActor to be exact) whose position I want to <BR>set according to its view coordinates (or viewport even). When i use the <BR>SetPosition() method, this seems to use some other coordinate system <BR>(because I can set the position to values greater than 1, like 100 for <BR>instance)<BR><BR>However I have also used a vtkScalarBarActor in my program whose position I <BR>set using SetPosition and it
seems to be working in view coordinates..<BR><BR>So I'm a littel confused as to how I should go about setting my <BR>vtkTextActor's position, in terms of view (or viewport) coordinates. Maybe <BR>its not using the SetPosition() mehtod..?<BR><BR>thanks!!<BR>LD<BR><BR><BR><BR><BR>------------------------------<BR><BR>Message: 5<BR>Date: Wed, 20 Jul 2005 22:27:28 +0200<BR>From: Rene Tschirley <POOH@LAVA.CS.TU-BERLIN.DE><BR>Subject: [vtkusers] Offscreen Rendering with Windows<BR>To: vtkusers@vtk.org<BR>Message-ID: <20050720202728.GC30869@lava.cs.tu-berlin.de><BR>Content-Type: text/plain; charset=iso-8859-1<BR><BR>Dear all,<BR><BR><BR>Did anybody try to use offscreen rendering on the Windows OS? As far as I<BR>understand earlier discussions, there is the way to do offscreen<BR>rendering using the Mesa subsystem on the *nix platform as well as a<BR>virtual framebuffer.<BR><BR>I'm curious if there is a significant chance to let VTK render images<BR>which I can then use in my Java
application. This has to be as<BR>platform-independent as possible (a compiled VTK-JAR for each target<BR>platform would be bad enough for my project), so I don't even want to use<BR>Cygwin.<BR><BR><BR>Yours,<BR>René<BR><BR>-- <BR>Dr.-Ing. René Tschirley<BR>http://www.tschirley.com<BR><BR><BR>------------------------------<BR><BR>Message: 6<BR>Date: Wed, 20 Jul 2005 16:46:49 -0600<BR>From: Charles Boivin <OKEOVTK@GMAIL.COM><BR>Subject: [vtkusers] Problem with sampling using vtkProbeFilter<BR>To: vtkusers@vtk.org<BR>Message-ID: <60ba95805072015462f0fe7c0@mail.gmail.com><BR>Content-Type: text/plain; charset="iso-8859-1"<BR><BR>Hello all,<BR><BR>I have been using the vtkProbeFilter with an imagedata as a source and<BR>some polydata surface (an isosurface, generated from vtkContourFilter)<BR>as input. The imagedata has point data only. This works relatively<BR>well, except at the edges of my domain. I sometimes get some values<BR>that are arbitrarily set to zero there. I have
attached an image<BR>(isosurfaceproblem.png) that shows that problem -- I know for a fact<BR>that the values at the bottom edge should NOT be zero (and should be<BR>smoother than what is shown). The result is very inconsistent -- i.e.<BR>if I change the input isosurface slightly, the location of problem<BR>points on the bottom edge will change. I also sometimes see this<BR>problem appear on other edges.<BR><BR>I have also included an image (slicenoproblem.png) that shows the same<BR>edge, but colored on a vtkImageGeometryDataFilter (i.e. just a<BR>'slice') of the domain. The lookup table for the value displayed is<BR>the same for both. This shows that there is no problem for the bottom<BR>edge...<BR><BR>Anyone have any idea what is going on? Is it possible that<BR>vtkProbeFilter sometimes 'misses' the source data and therefore<BR>outputs 0 at a location? Is there possibly a problem with my input (or<BR>source) data? I am using VTK4.4 on a Windows machine. Source code<BR>built using
VS.Net 2003.<BR><BR>Thank you in advance for all ideas/suggestions...<BR><BR>Charles Boivin<BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: isosurfaceproblem.png<BR>Type: image/png<BR>Size: 36960 bytes<BR>Desc: not available<BR>Url : http://public.kitware.com/pipermail/vtkusers/attachments/20050720/a27956a1/isosurfaceproblem.png<BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: slicenoproblem.png<BR>Type: image/png<BR>Size: 22639 bytes<BR>Desc: not available<BR>Url : http://public.kitware.com/pipermail/vtkusers/attachments/20050720/a27956a1/slicenoproblem.png<BR><BR>------------------------------<BR><BR>_______________________________________________<BR>vtkusers mailing list<BR>vtkusers@vtk.org<BR>http://www.vtk.org/mailman/listinfo/vtkusers<BR><BR><BR>End of vtkusers Digest, Vol 15, Issue 53<BR>****************************************<BR></BLOCKQUOTE><p>
                <hr size=1> <a href="http://us.rd.yahoo.com/evt=34442/*http://www.yahoo.com/r/hs">Start your day with Yahoo! - make it your home page </a>