From vermaas at astron.nl Tue Apr 1 06:57:29 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Tue, 01 Apr 2003 13:57:29 +0200 Subject: [vtkusers] kitware: please answer timer event question Message-ID: Hi, Is anybody form Kitware listening? I have posted my problems with starting a timer-event a few times the last weeks, but I get no response. Getting pretty desperate about that one. Could anybody give me some help with it? Thanks, Nico Vermaas From c.p.botha at its.tudelft.nl Tue Apr 1 07:13:32 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 01 Apr 2003 14:13:32 +0200 Subject: [vtkusers] kitware: please answer timer event question In-Reply-To: References: Message-ID: <1049199212.16579.57.camel@dutidad> On Tue, 2003-04-01 at 13:57, Nico Vermaas wrote: > Is anybody form Kitware listening? > I have posted my problems with starting a timer-event a few times the last weeks, but I get no response. Getting pretty desperate about that one. Could anybody give me some help with it? I did answer to the list. Are you subscribed? Maybe you just missed my mail. Would you like me to resend it? -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From c.p.botha at its.tudelft.nl Tue Apr 1 07:24:07 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 01 Apr 2003 14:24:07 +0200 Subject: [Fwd: Re: [vtkusers] timer events] Message-ID: <1049199847.16598.59.camel@dutidad> Here is the weekly rerun of my incredibly popular mail that you somehow missed. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ -------------- next part -------------- An embedded message was scrubbed... From: "Charl P. Botha" Subject: Re: [vtkusers] timer events Date: 31 Mar 2003 11:54:42 +0200 Size: 3004 URL: From c.p.botha at its.tudelft.nl Tue Apr 1 07:58:46 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 01 Apr 2003 14:58:46 +0200 Subject: [vtkusers] timer events In-Reply-To: References: Message-ID: <1049201926.16598.76.camel@dutidad> Hi Nico, Let's keep this on the list, as other people might also find it useful. BTW, your mailer is being VERY naughty with line-wrapping. On Tue, 2003-04-01 at 14:36, Nico Vermaas wrote: > What I have is 2 applications that communicate with each other: > > (1) a GUI that is made with Delphi (for Linux). I use that GUI to > change settings like colors, dimensions and it has some buttons with > predefined views. Later I will be adding different kind of predefined > visualisations. These settings are then transferred to a second app by > means of a simple ascii file. > > (2) A C++/VTK applications where the user can interact using the > standard vtk interactors. This app reads the settings from the ascii > file I mentioned and adjusts the visualisations accordingly. Actually > it checks if that ascii file exists and if it does it calls an update > function. There is also some data written back to the ascii file (cam > positions) which are read in by the (1) again. > > But... when I change anything in (1) the visualisations in (2) will not > be updated untill I switch to (2) and do something there (because > myUpdate is triggered by the modified event). Or when I invalidate > part of the window of (1) by dragging another window over it. > > What I want is that myUpdate is triggered in (2) whenever I change a > setting in (1). So I thought that I could let a timer check for the > existence of that ascii file. But I can't get the bloody timer to > start ticking. I.e. you want to use a hammer as a figure-saw. :) This is not what that timer is for. The timer in the interactor is used by certain interactor styles to do their work. It is not there for you to play with. The Right Way(tm) to do what you want to do would be to integrate VTK with your Kylix application. This comes down to setting the WindowId of the RenderWindow to the WindowId (handle, whatever) of a window in your Kylix application. Have a look at some of the VTK to widget set glue code, e.g. http://cpbotha.net/vtkFlRenderWindowInteractor.html If you REALLY want to do it by polling a text file (ugh) then create a VTK application with an extra thread that consists of a select() loop on your file. This extra thread can then notify the VTK logic in your primary thread when something changes. Alternatively, you could create a VTK/some widget set (e.g. FLTK, QT) application that polls the file in its idle loop. The simple VTK event loop doesn't support an idle event itself. HTH, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From vermaas at astron.nl Tue Apr 1 08:14:16 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Tue, 01 Apr 2003 15:14:16 +0200 Subject: [vtkusers] timer events Message-ID: Hi Charl, Mmm... the idea is to keep the two app's separated, because in a later stage I want to use other ways of controlling the C++/VTK app. Now it is a simple Delphi GUI, but later it can be anything. Even a text editor or a website. As long as the interface is simple, clear and standard. (and that's what the ascii file is for, it doesn't come much simpeler and more standard than ascii I think). (Q1): When I connect the window to a windowID in Delphi, could I then still be able to those two applications work side-by-side or would I have to do everything in Delphi then? (I am using the pascal language, not the c++ language in Kylix). (Q2): What is a 'select()' loop? And how do I create a VTK app with an extra thread? (I'm quite new to this as you might guess). Nico >>> "Charl P. Botha" 04/01/03 02:58pm >>> The Right Way(tm) to do what you want to do would be to integrate VTK with your Kylix application. This comes down to setting the WindowId of the RenderWindow to the WindowId (handle, whatever) of a window in your Kylix application. Have a look at some of the VTK to widget set glue code, e.g. http://cpbotha.net/vtkFlRenderWindowInteractor.html If you REALLY want to do it by polling a text file (ugh) then create a VTK application with an extra thread that consists of a select() loop on your file. This extra thread can then notify the VTK logic in your primary thread when something changes. Alternatively, you could create a VTK/some widget set (e.g. FLTK, QT) application that polls the file in its idle loop. The simple VTK event loop doesn't support an idle event itself. HTH, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From c.p.botha at its.tudelft.nl Tue Apr 1 08:25:55 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 01 Apr 2003 15:25:55 +0200 Subject: [vtkusers] timer events In-Reply-To: References: Message-ID: <1049203555.16579.98.camel@dutidad> Hello Nico, Please fix your mailer. It's not line-breaking. On Tue, 2003-04-01 at 15:14, Nico Vermaas wrote: > Mmm... the idea is to keep the two app's separated, because in a later > stage I want to use other ways of controlling the C++/VTK app. Now it > is a simple Delphi GUI, but later it can be anything. Even a text > editor or a website. As long as the interface is simple, clear and > standard. (and that's what the ascii file is for, it doesn't come much > simpeler and more standard than ascii I think). > > (Q1): When I connect the window to a windowID in Delphi, could I then > still be able to those two applications work side-by-side or would I > have to do everything in Delphi then? (I am using the pascal language, > not the c++ language in Kylix). It would become one application and you would have to write some code to wrap the C++ with the Pascal calling convention compliant thunks. I had forgotten that Kylix could mean Object Pascal. This solution is still an elegant one, but may be too involved and not suitable to your purposes. > (Q2): What is a 'select()' loop? And how do I create a VTK app with an > extra thread? (I'm quite new to this as you might guess). 1. man select 2. http://www.opengroup.org/onlinepubs/007908799/xsh/pthread.h.html 3. http://www.llnl.gov/computing/tutorials/workshops/workshop/pthreads/MAIN.html Be VERY careful with threading and calling into VTK code. You could break your application easily. I have a much better idea: You could also code your VTK application with a TCP/IP interface that your client app (Kylix, a web-based PHP app or just a stupid CGI, etc) can connect to and talk to in XML. It could then drive the visualisation application in a clean and standard way, no stupid hacks. Python, along with a library such as Twisted (IIRC), would be ideal for this. This solution satisfies all your requirements and has a large number of advantages over your current idea. In short: you're going to have to spend much time reading and learning in the next few days. :) Good luck, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From vermaas at astron.nl Tue Apr 1 09:05:34 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Tue, 01 Apr 2003 16:05:34 +0200 Subject: [vtkusers] timer events Message-ID: Hi Charl, I don't see how that would solve the problem. The VTK application must then still react to outside information right? Somewhere in the event loop it must then still be forced to check for data. Maybe I should look into abandoning the standard interactor event loop and try to make one myself that uses that select() thing you mentioned. Thanks for your help, I'll keep on struggling for a bit I'm afraid. Nico >>> "Charl P. Botha" 04/01/03 03:25pm >>> Hello Nico, I have a much better idea: You could also code your VTK application with a TCP/IP interface that your client app (Kylix, a web-based PHP app or just a stupid CGI, etc) can connect to and talk to in XML. It could then drive the visualisation application in a clean and standard way, no stupid hacks. Python, along with a library such as Twisted (IIRC), would be ideal for this. This solution satisfies all your requirements and has a large number of advantages over your current idea. In short: you're going to have to spend much time reading and learning in the next few days. :) Good luck, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From millerjv at crd.ge.com Tue Apr 1 09:30:23 2003 From: millerjv at crd.ge.com (Miller, James V (Research)) Date: Tue, 1 Apr 2003 09:30:23 -0500 Subject: [vtkusers] vtkImageViewer2, image disappearing with slice adjustment Message-ID: I have been using vtkImageViewer2 for most of my image viewing needs for maybe the last year or so. I like vtkImageViewer2 because I can zoom into the image and I can easily add geometry to scene using viewer->SetInput( myImage ); viewer->GetRenderer()->AddActor( myActor ); This is nice when I want to "draw" on top of an image. For instance, I can construct a PolyData of "edges" and draw them on top of an image. Or I can highlight sections of an image, etc. But when I use vtkImageViewer2 to display slices from a volume, I hit upon a problem. I could only look at the first few slices of volume. After the first few slices, the image would always be black. My first thought was this was an "extent" problem with the viewer, but digging through the code, everything checked out. vtkImageViewer2 uses the 3D rendering/texture mapping engine to draw a slice onto a plane. It turns out that the location of that plane is based on the "z-coordinate" of the slice. As you adjust the slice that is viewed, the plane moves and eventually gets outside the camera clipping range. I am not sure whether this really a bug or not. If you are mixing the image with 3D geometry, I think you want the z-coordinate of the plane to be adjusted as you switch slices. This way the image can "hide" the portions of the geometry that is behind it. There are other ways to do this now using the ImagePlaneWidgets but ImageViewer2 is a quick and dirty solution, especially if you want to restrict the view to be down the z-axis. vtkImageViewer2 is confusing, however, when just using the viewer to look at each slice in the volume. I post this message here because I think google will index this message so other people can find the solution. The solution is rather easy. Whenever you call SetZSlice on the viewer, you need to reset the camera clipping range. viewer->SetZSlice( slice ); viewer->GetRenderer()->ResetCameraClippingRange(); That is all there is to that. Jim Miller _____________________________________ Visualization & Computer Vision GE Research Bldg. KW, Room C218B P.O. Box 8, Schenectady NY 12301 millerjv at research.ge.com james.miller at research.ge.com (518) 387-4005, Dial Comm: 8*833-4005, Cell: (518) 505-7065, Fax: (518) 387-6981 -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.p.botha at its.tudelft.nl Tue Apr 1 09:45:20 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 01 Apr 2003 16:45:20 +0200 Subject: [vtkusers] timer events In-Reply-To: References: Message-ID: <1049208320.16598.125.camel@dutidad> Hi Nico, On Tue, 2003-04-01 at 16:05, Nico Vermaas wrote: > I don't see how that would solve the problem. The VTK application must > then still react to outside information right? Somewhere in the event > loop it must then still be forced to check for data. Maybe I should > look into abandoning the standard interactor event loop and try to > make one myself that uses that select() thing you mentioned. Once again, you'll combine the VTK application with a library (Twisted and/or FLTK) that will offer you a more flexible event loop in which you'll be able to react on the XML communication as it happens. Dig? :) -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From haefele at dpt-info.u-strasbg.fr Tue Apr 1 12:07:59 2003 From: haefele at dpt-info.u-strasbg.fr (Matthieu HAEFELE) Date: Tue, 01 Apr 2003 19:07:59 +0200 Subject: [vtkusers] python bindings Message-ID: <3E89C76F.1020403@dpt-info.u-strasbg.fr> Hello, My question is not directly connected with vtk but if someone could help !! I'm about to do python bindings on a simulation code which will interact with my VTK application. How are the python bindings designed in vtk ? Do you use a tool like distutils, modulator ...? or you do everything from scratch ? What do you think about tools like boost ? Thanks in advance Matthieu HAEFELE From xliu6 at nd.edu Tue Apr 1 11:25:57 2003 From: xliu6 at nd.edu (Xiangyi Liu) Date: Tue, 1 Apr 2003 11:25:57 -0500 Subject: [vtkusers] Please have a look "How to remove poorly shaped tetrahedra" Message-ID: <1049214357.3e89bd95cab62@webmail.nd.edu> Hi all, For those of you who are familar with generating volume mesh using VTK. I used vtkClipVolume to get 3D tetrahedral mesh of a volume. The problem is that a considerable portion of the tetrahedra are poorly shaped, in terms that the volume of these tetrahedra is really small. I wonder if there is a ready to use class that can remove these tetrahedra. I found several classes, but most of them are for 2D or 3D surface mesh. I wonder if you have gone through this. Any suggestion will be highly appreciated! Xiangyi From ramakrishna.prakash at quest-global.com Tue Apr 1 11:57:06 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Tue, 1 Apr 2003 22:27:06 +0530 Subject: [vtkusers] Surface reconstruction Message-ID: <000701c2f86f$badc4010$de0ba8c0@qtwblr01.questglobal.com> Users, My problem is something like this. I have a surface. I pick 3 or more points on the surface. Now I want to build a plane which will be identical to the source surface(same normal as the source) and I want to place this surface exactly over the source surface. I tried using vtkSurfaceReconstructionFilter, but its not giving me the right results. Does any body know what will be the right approach for this problem? Thanks Shyam From prabhu at aero.iitm.ernet.in Tue Apr 1 13:09:10 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Tue, 1 Apr 2003 23:39:10 +0530 Subject: [vtkusers] python bindings In-Reply-To: <3E89C76F.1020403@dpt-info.u-strasbg.fr> References: <3E89C76F.1020403@dpt-info.u-strasbg.fr> Message-ID: <16009.54726.726696.212669@monster.linux.in> >>>>> "MH" == Matthieu HAEFELE writes: MH> Hello, My question is not directly connected with vtk but if MH> someone could help !! We already answered you here: http://public.kitware.com/pipermail/vtkusers/2003-March/016976.html cheers, prabhu From sdalal at inter.net.il Tue Apr 1 16:21:46 2003 From: sdalal at inter.net.il (Sharbel Dalal) Date: Tue, 1 Apr 2003 23:21:46 +0200 Subject: [vtkusers] VTK and c# Message-ID: <000001c2f894$b6b022c0$c257e650@sharbelniebr69> Hello, I am doing a project for university in which ill be using VTK to draw functions. The project's GUI is done using C# and then C# calls functions written in a C++ DLL. Does anyone have an idea of how to use a C++ complied VTK DLL in C# and is that possible? (ive checked the .NET documentation and such a thing is possible, I just would like to know if anyone has tried it, or knows for sure that its possible) Please reply directly to my email for I don't know how to search for a reply on the newlestter. sdalal at inter.net.il id really appreciate and response to my email. Thanks Sharbel Dalal -------------- next part -------------- An HTML attachment was scrubbed... URL: From mglistmail at totalise.co.uk Tue Apr 1 16:48:53 2003 From: mglistmail at totalise.co.uk (Martin Gardner) Date: Tue, 01 Apr 2003 22:48:53 +0100 Subject: [vtkusers] Using vtkImagePlaneWidget::GetVector1 via tcl Message-ID: <3E8A0945.7070302@totalise.co.uk> Hi, Can anyone tell me if I am doing this right.. I want to get the vector 1 of an image plane widget from a tcl script. set f_v1_x 0.0 set f_v1_y 0.0 set f_v1_z 0.0 $f_plane GetVector1 f_v1_x f_v1_y f_v1_z but this always returns 0.0 0.0 0.0 even when the plane widget has been changed by the user. Thanks Martin -- mglistmail at totalise.co.uk From dean.inglis at on.aibn.com Tue Apr 1 20:27:01 2003 From: dean.inglis at on.aibn.com (dean.inglis at on.aibn.com) Date: Tue, 1 Apr 2003 20:27:01 -0500 Subject: [vtkusers] Using vtkImagePlaneWidget::GetVector1 via tcl Message-ID: <20030402012701.UITY25567.tomts22-srv.bellnexxia.net@[209.226.175.249]> Martin, from the tcl wrapping perspective, the methods GetVector1 and GetVector2 have to be added to the VTK/Wrapping/hints file, then you could do something like set f_v1 [f_plane GetVector1] set f_v1_x [lindex $f_v1 0] set f_v1_y [lindex $f_v1 1] set f_v1_z [lindex $f_v1 2] I will add these to the hints file. In the meantime you could use set f_o [f_plane GetOrigin] set f_p1 [f_plane GetPoint1] set f_p2 [f_plane GetPoint2] and calculate, fro example, f_v1 from the components of f_p1 and f_o Dean From Neil.Killeen at atnf.csiro.au Tue Apr 1 22:39:02 2003 From: Neil.Killeen at atnf.csiro.au (Neil Killeen) Date: Wed, 2 Apr 2003 13:39:02 +1000 (EST) Subject: [vtkusers] vtkImageMapper error Message-ID: <49AA3A3C863E5B4C911320AEF99E5DA3039CA6F1-100001@wing-ep.tip.csiro.au> Hello some time ago, our student posted a message http://public.kitware.com/pipermail/vtkusers/2003-February/016105.html requesting help with vtkImageMapper. He received no reply, and the problem still exists in VTK 4.2 The enclosed test program, stretch.cxx, will generate a Bus Error under Solaris. Under Linux, where he was working, the behaviour was un-useful (see message above). Run the program with the provided jpg image as input. ./stretch tycho.jpg The basic function causing the trouble is vtkImageMapper::RenderToRectangleOn(); when this function call is commented out, the program runs successfully. We assume his usage of the funciton is correct but would be delighted to learn otherwise ! Would somebody respond please ? thanks Neil Killeen // stretch.cxx #include #include #include #include #include #include #include #include #include #include using namespace std; #define WINWIDTH 300 #define WINHEIGHT 300 int main(int argc, char **argv) { int dims[3]; vtkJPEGReader *jpeg = vtkJPEGReader::New();{ jpeg->SetFileName(argv[1]); jpeg->Update(); jpeg->GetOutput()->GetDimensions(dims); } vtkImageMapper *mapper = vtkImageMapper::New();{ mapper->SetInput(jpeg->GetOutput()); mapper->RenderToRectangleOn(); // Trouble maker } vtkActor2D *actor = vtkActor2D::New();{ actor->SetMapper(mapper); actor->GetPosition2Coordinate()->SetCoordinateSystemToViewport(); actor->SetPosition(0,0); actor->SetPosition2(dims[0],dims[1]); } vtkRenderer *ren = vtkRenderer::New();{ ren->AddActor(actor); } vtkRenderWindow *win = vtkRenderWindow::New();{ win->AddRenderer(ren); win->SetSize(dims[0],dims[1]); } vtkRenderWindowInteractor *rwi = vtkRenderWindowInteractor::New();{ rwi->SetRenderWindow(win); rwi->Start(); } return 0; } -------------- next part -------------- A non-text attachment was scrubbed... Name: tycho.jpg Type: image/jpeg Size: 12221 bytes Desc: URL: From dean.inglis at on.aibn.com Tue Apr 1 22:42:27 2003 From: dean.inglis at on.aibn.com (dean.inglis at on.aibn.com) Date: Tue, 1 Apr 2003 22:42:27 -0500 Subject: [vtkusers] pb tcl wrapping Examples/Build/vtkmy Message-ID: <20030402034227.IZJK1664.tomts9-srv.bellnexxia.net@[209.226.175.249]> Hi, can someone with cmake/tcl wrapping experience help me sort this out. I am trying to build my own out of source libs/dlls similar to VTK/Examples/Build/vtkmy (for me its called vtkLocal not vtkmy). The shared libs build fine but not the tcl ones. Below is a brief error log... Dean Building shared library c:\Builder\Releases\vtkRelease\bin\vtkLocalImagingTCL.dll... Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Error: Unresolved external 'vtkTclInDelete(Tcl_Interp *)' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external '_Tcl_DeleteCommand' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external 'vtkTclGetPointerFromObject(const char *, const char *, Tcl_Interp *, int&)' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external 'vtkTclGetObjectFromPointer(Tcl_Interp *, void *, int (*)(void *, Tcl_Interp *, int, char * *))' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external '_Tcl_GetDouble' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external '_Tcl_GetInt' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external '_Tcl_ResetResult' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external '_Tcl_SetResult' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external 'vtkTclListInstances(Tcl_Interp *, void *)' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external 'vtkImageToImageFilterCppCommand(vtkImageToImageFilter *, Tcl_Interp *, int, char * *)' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external '_Tcl_AppendResult' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEEUCLIDEANDISTANCEANALYSISTCL.OBJ Error: Unresolved external 'vtkImageHybridMedian2DAnytypeCommand(void *, Tcl_Interp *, int, char * *)' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKLOCALIMAGINGTCLINIT.OBJ Error: Unresolved external 'vtkImageHybridMedian2DAnytypeNewCommand()' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKLOCALIMAGINGTCLINIT.OBJ Error: Unresolved external 'vtkImageSourceCppCommand(vtkImageSource *, Tcl_Interp *, int, char * *)' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEQUADSOURCETCL.OBJ Error: Unresolved external 'vtkImageIterateFilterCppCommand(vtkImageIterateFilter *, Tcl_Interp *, int, char * *)' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGESKELETONPRUNE2DTCL.OBJ Error: Unresolved external 'vtkObjectCppCommand(vtkObject *, Tcl_Interp *, int, char * *)' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKVOXELPROFILETCL.OBJ Error: Unresolved external 'vtkTclCreateNew(Tcl_Interp *, const char *, void * (*)(), int (*)(void *, Tcl_Interp *, int, char * *))' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKLOCALIMAGINGTCLINIT.OBJ Error: Unresolved external '_Tcl_PkgProvide' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKLOCALIMAGINGTCLINIT.OBJ Error: Unresolved external 'vtkImageSpatialFilterCppCommand(vtkImageSpatialFilter *, Tcl_Interp *, int, char * *)' referenced from C:\BUILDER\DEVELOPER\VTKLOCALRELEASE\IMAGING\VTKIMAGEHYBRIDMEDIAN2DANYTYPETCL.OBJ ** error 1 ** deleting c:\Builder\Releases\vtkRelease\bin\vtkLocalImagingTCL.dll ** error 1 ** deleting default_target ** error 1 ** deleting default_target_Imaging ** error 1 ** deleting default_target From dean.inglis at on.aibn.com Tue Apr 1 21:46:22 2003 From: dean.inglis at on.aibn.com (dean.inglis at on.aibn.com) Date: Tue, 1 Apr 2003 21:46:22 -0500 Subject: [vtkusers] Using vtkImagePlaneWidget::GetVector1 via tcl Message-ID: <20030402024622.LLYK22713.tomts17-srv.bellnexxia.net@[209.226.175.134]> Martin, after looking at this again with less haste, I'm pretty certain (I am not a tcl expert so someone else please comment?) that vtkImagePlaneWidget (IPW) would have to maintain ivars float Vector1[3] and float Vector2[3] to pass pointers to for the tcl wrapping to work. That is: void vtkImagePlaneWidget::GetVector1(float v1[3]) doesn't work, but float* vtkImagePlaneWidget::GetVector1() would work only if IPW maintains Vector1 explicitly. The reason IPW methods like GetOrigin succeed is because they call the corresponding functions of IPW's internal vtkPlaneSource, which does maintain an ivar float Origin[3]. If you can use my suggested work around from last post that would be best. Dean From dean.inglis at on.aibn.com Tue Apr 1 21:46:22 2003 From: dean.inglis at on.aibn.com (dean.inglis at on.aibn.com) Date: Tue, 1 Apr 2003 21:46:22 -0500 Subject: [vtkusers] Using vtkImagePlaneWidget::GetVector1 via tcl Message-ID: <20030402024622.LLYK22713.tomts17-srv.bellnexxia.net@[209.226.175.134]> Martin, after looking at this again with less haste, I'm pretty certain (I am not a tcl expert so someone else please comment?) that vtkImagePlaneWidget (IPW) would have to maintain ivars float Vector1[3] and float Vector2[3] to pass pointers to for the tcl wrapping to work. That is: void vtkImagePlaneWidget::GetVector1(float v1[3]) doesn't work, but float* vtkImagePlaneWidget::GetVector1() would work only if IPW maintains Vector1 explicitly. The reason IPW methods like GetOrigin succeed is because they call the corresponding functions of IPW's internal vtkPlaneSource, which does maintain an ivar float Origin[3]. If you can use my suggested work around from last post that would be best. Dean From dream_vst at yahoo.com Wed Apr 2 00:43:51 2003 From: dream_vst at yahoo.com (Jack Thakkar) Date: Tue, 1 Apr 2003 21:43:51 -0800 (PST) Subject: [vtkusers] Reading CT scan images Message-ID: <20030402054351.46780.qmail@web10705.mail.yahoo.com> Hi, I want to read CT scan images ( Dicom format). I am using VTK 4.2 and C++. I need to know which class is the most appropriate for this. Also if I have CT scsns of IS&C format of Toshiba scanner, can I convert it into DICOM, how? Thank you Jack --------------------------------- Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more -------------- next part -------------- An HTML attachment was scrubbed... URL: From lisong at vrac.iastate.edu Wed Apr 2 01:11:16 2003 From: lisong at vrac.iastate.edu (Song Li) Date: Wed, 02 Apr 2003 00:11:16 -0600 Subject: [vtkusers] problem when using vtkExtractUnstructuredGrid Message-ID: <3E8A7F04.C55AEBB@vrac.iastate.edu> Hi, I have a program use "vtkExtractUnstructuredGrid" to extract pieces from a big UnstructuredGrid dataset, it works fine with the old vtk files which don't have FieldData. While if the big dataset has FieldData, it appears that there is no scalar information in the small piece which was produced by my program , "(the object of small data)->GetPointData()->GetScalars()" will return 0. I compared ASCII files of both big and small vtk files, it seems OK, the only questionable thing is the line with string "scalar" in: ====================================================================================== # vtk DataFile Version 3.0 vtk output ASCII DATASET UNSTRUCTURED_GRID FIELD FieldData 1 scalars 1 273774 float ^^^^^^^^^^^^^^^^^^ ====================================================================================== are the same, no matter in big or small file there is 273774, while the numbers follow the other terms reflect the change of size, for example, in big file is "POINT_DATA 273774", in small file the correspondant line is "POINT_DATA 21153". My visualiztion program can handle the big dataset with FieldData or non-FieldData datasets no matter it is produced by "vtkExtractUnstructuredGrid" or not. Any suggestions, comments, solutions??? Thanks! -- Song Li VRAC(Virtual Reality Application Center),Iowa State University Email: lisong at vrac.iastate.edu Homepage: http://www.vrac.iastate.edu/~lisong -------------- next part -------------- An HTML attachment was scrubbed... URL: From guxiangguo at hotmail.com Wed Apr 2 01:38:07 2003 From: guxiangguo at hotmail.com (Vicart Gu) Date: Wed, 2 Apr 2003 14:38:07 +0800 Subject: [vtkusers] How to use vtkPicker and vtkCommand ? Message-ID: Any help is appreciated! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mglistmail at totalise.co.uk Wed Apr 2 02:48:37 2003 From: mglistmail at totalise.co.uk (Martin Gardner) Date: Wed, 02 Apr 2003 08:48:37 +0100 Subject: [vtkusers] Using vtkImagePlaneWidget::GetVector1 via tcl In-Reply-To: <20030402024622.LLYK22713.tomts17-srv.bellnexxia.net@[209.226.175.134]> References: <20030402024622.LLYK22713.tomts17-srv.bellnexxia.net@[209.226.175.134]> Message-ID: <3E8A95D5.8050203@totalise.co.uk> Hi Dean, Thanks for your advice I have tried your work around and it works fine. Cheers Martin dean.inglis at on.aibn.com wrote: > Martin, > > after looking at this again with less haste, > I'm pretty certain (I am not a tcl expert so > someone else please comment?) that > vtkImagePlaneWidget (IPW) would have to maintain > ivars float Vector1[3] and float Vector2[3] > to pass pointers to for the tcl wrapping to > work. That is: > > void vtkImagePlaneWidget::GetVector1(float v1[3]) > doesn't work, but > float* vtkImagePlaneWidget::GetVector1() > would work only if IPW maintains Vector1 > explicitly. The reason IPW methods like GetOrigin > succeed is because they call the corresponding > functions of IPW's internal vtkPlaneSource, which > does maintain an ivar float Origin[3]. If you > can use my suggested work around from last post > that would be best. > > Dean > > > > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From gigabyte at mutimusic.com Wed Apr 2 04:27:41 2003 From: gigabyte at mutimusic.com (cynthia bruyns) Date: Wed, 02 Apr 2003 01:27:41 -0800 Subject: [vtkusers] VTK on Mac OS X Message-ID: Hello, When I try to compile VTK-4.2.1 on Mac OS X 10.2 using CMake, I get the following. What is the deal with the security framework?? bruyns% make cmake.depends is up-to-date /Library/VTK-4.2.1/Wrapping: building default_target /Library/VTK-4.2.1/Utilities: building default_target cmake.depends is up-to-date /Library/VTK-4.2.1/Utilities/zlib: building default_target /Library/VTK-4.2.1/Utilities/jpeg: building default_target /Library/VTK-4.2.1/Utilities/png: building default_target /Library/VTK-4.2.1/Utilities/tiff: building default_target /Library/VTK-4.2.1/Utilities/expat: building default_target /Library/VTK-4.2.1/Utilities/Doxygen: building default_target cmake.depends is up-to-date /Library/VTK-4.2.1/Utilities/freetype: building default_target Building object file ftmac.o... In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20, from /Library/VTK-4.2.1/Utilities/freetype/src/base/ftmac.c:68: /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:25: OT/OT.h: No such file or directory In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20, from /Library/VTK-4.2.1/Utilities/freetype/src/base/ftmac.c:68: /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37: NSLCore/NSLCore.h: No such file or directory /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:41: SecurityCore/SecurityCore.h: No such file or directory In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/CarbonSound.framework /Headers/CarbonSound.h:30, from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:33, from /Library/VTK-4.2.1/Utilities/freetype/src/base/ftmac.c:68: /System/Library/Frameworks/Carbon.framework/Frameworks/CarbonSound.framework /Headers/Sound.h:29: AvailabilityMacros.h: No such file or directory In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/CommonPanels.framewor k/Headers/CommonPanels.h:37, from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:49, from /Library/VTK-4.2.1/Utilities/freetype/src/base/ftmac.c:68: /System/Library/Frameworks/Carbon.framework/Frameworks/CommonPanels.framewor k/Headers/NSL.h:20: NSLCore/NSLCore.h: No such file or directory In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:61, from /Library/VTK-4.2.1/Utilities/freetype/src/base/ftmac.c:68: /System/Library/Frameworks/Carbon.framework/Frameworks/SecurityHI.framework/ Headers/SecurityHI.h:20: SecurityCore/SecurityCore.h: No such file or directory In file included from /System/Library/Frameworks/Carbon.framework/Frameworks/SecurityHI.framework/ Headers/SecurityHI.h:29, from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:61, from /Library/VTK-4.2.1/Utilities/freetype/src/base/ftmac.c:68: /System/Library/Frameworks/Carbon.framework/Frameworks/SecurityHI.framework/ Headers/KeychainHI.h:20: SecurityCore/KeychainCore.h: No such file or directory make[5]: *** [ftmac.o] Error 1 make[4]: *** [default_target] Error 2 make[3]: *** [default_target_freetype] Error 2 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Utilities] Error 2 make: *** [default_target] Error 2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rrp at imm.dtu.dk Wed Apr 2 04:29:01 2003 From: rrp at imm.dtu.dk (Rasmus Reinhold Paulsen) Date: Wed, 2 Apr 2003 11:29:01 +0200 (METDST) Subject: [vtkusers] otherCellPosition regression test fails on my system and valhalla.kitware Message-ID: When I run the regression test otherCellposition always fails with a memory exception. I have "approximately" located the location of the fail in the source code. It happens only in release mode and not in debug mode. It is also dependent on the amount of (unrelated) source out-commented. A real nasty one, that is. The Dashboard today shows that valhalla.kitware seems to suffer from the same error. Does anybody else experience this strange thing? System specs: Windows XP with all updates VC 6, SP5 VTK configured with support for TCL/TK. If wanted I can provide the source code with the fail more exposed. Regards, Rasmus From sdalal at inter.net.il Wed Apr 2 06:03:37 2003 From: sdalal at inter.net.il (Sharbel Dalal) Date: Wed, 2 Apr 2003 13:03:37 +0200 Subject: [vtkusers] Drwaing Functions using VTK Message-ID: <000c01c2f907$8352e390$c257e650@sharbelniebr69> Hello, I am a student and I am doing a project for my university , it's a semi matlab language and we need to draw planes in the project, I chose VTK to do so, I am sure it has the capabilities to do so, but ive been reading the examples and all I found was an example of a quadric function, can anyone tell me how (or perhaps give me an example) I can draw a non linear function e.g f(x,y,z)=x^7*y^2+z*y+2 Your help would be really appreciated. Thanks Sharbel -------------- next part -------------- An HTML attachment was scrubbed... URL: From mccdo at iastate.edu Wed Apr 2 08:04:39 2003 From: mccdo at iastate.edu (Doug McCorkle) Date: Wed, 2 Apr 2003 07:04:39 -0600 (CST) Subject: [vtkusers] BUG: Vector Name lost after transform Message-ID: <3947231033910@webmail.iastate.edu> Thanks for the reply and for committing the fixes. I downloaded the nightly vtk release on April 1. With the new version many problems disappeared. However, one problem was still evident... Symptom: Vector Name lost after transform ////////////// sample code ////////////// vtkTransform * transform = vtkTransform::New(); transform->Scale( 10, 10, 10 ); cout << "\nprinting pointset..." << endl; pointset->Print( cout ); vtkTransformFilter * transFilter = vtkTransformFilter::New(); transFilter->SetInput( pointset ); transFilter->SetTransform( transform ); cout << "\nprinting transFilter->GetOutput()..." << endl; transFilter->GetOutput()->Update(); transFilter->GetOutput()->Print( cout ); ////////////// code output ////////////// printing pointset... vtkUnstructuredGrid (0x1027a810) <...> Point Data: Debug: Off Modified Time: 2148 Reference Count: 1 Registered Events: (none) Number Of Arrays: 2 Array 0 name = custom_scalars_name Array 1 name = custom_vectors_name Number Of Components: 4 Number Of Tuples: 80 Copy Flags: ( 1 1 1 1 1 ) Scalars: Debug: Off Modified Time: 2143 Reference Count: 1 Registered Events: (none) Name: custom_scalars_name <...> Vectors: <...> Name: custom_vectors_name <...> printing transFilter->GetOutput()... vtkUnstructuredGrid (0x1026e498) <...> Point Data: Debug: Off Modified Time: 2718 Reference Count: 1 Registered Events: (none) Number Of Arrays: 2 Array 0 name = NULL Array 1 name = custom_scalars_name Number Of Components: 4 Number Of Tuples: 80 Copy Flags: ( 1 0 1 1 1 ) Scalars: Debug: Off Modified Time: 2143 Reference Count: 2 Registered Events: (none) Name: custom_scalars_name <...> Vectors: <...> Name: (none) <...> Key differences between outputs... - Array 0 name being set to NULL after the transform - Copy Flags array contains a zero on the transformed Point Data - Reference Count Number is 2 on the transformed scalar - Vector Name is NULL on the transformed vector From berk.geveci at kitware.com Wed Apr 2 09:16:01 2003 From: berk.geveci at kitware.com (Berk Geveci) Date: 02 Apr 2003 09:16:01 -0500 Subject: [vtkusers] Re: BUG: Vector Name lost after transform In-Reply-To: <3947231033910@webmail.iastate.edu> References: <3947231033910@webmail.iastate.edu> Message-ID: <1049292979.25706.18.camel@caemlyn.kitwarein.com> I can fix this. However, it is not a bug. The output vectors are not the same as the input vectors, since they have been transformed. Of course, it is debatable whether this changes the nature of the vectors but it is not required that the filter keeps the name. As far as the other differences input and output go (copy flags, reference counts), they are normal. -Berk nb: Please send your messages to the VTK mailing list (feel free to CC me) since there might be others who can benefit from the answers. On Wed, 2003-04-02 at 08:04, Doug McCorkle wrote: > Thanks for the reply and for committing the fixes. > I downloaded the nightly vtk release on April 1. > With the new version many problems disappeared. > However, one problem was still evident... > > > Symptom: Vector Name lost after transform > > ////////////// sample code ////////////// > vtkTransform * transform = vtkTransform::New(); > transform->Scale( 10, 10, 10 ); > > cout << "\nprinting pointset..." << endl; > pointset->Print( cout ); > > vtkTransformFilter * transFilter = vtkTransformFilter::New(); > transFilter->SetInput( pointset ); > transFilter->SetTransform( transform ); > > cout << "\nprinting transFilter->GetOutput()..." << endl; > transFilter->GetOutput()->Update(); > transFilter->GetOutput()->Print( cout ); > > ////////////// code output ////////////// > printing pointset... > vtkUnstructuredGrid (0x1027a810) > <...> > Point Data: > Debug: Off > Modified Time: 2148 > Reference Count: 1 > Registered Events: (none) > Number Of Arrays: 2 > Array 0 name = custom_scalars_name > Array 1 name = custom_vectors_name > Number Of Components: 4 > Number Of Tuples: 80 > Copy Flags: ( 1 1 1 1 1 ) > Scalars: > Debug: Off > Modified Time: 2143 > Reference Count: 1 > Registered Events: (none) > Name: custom_scalars_name > <...> > Vectors: > <...> > Name: custom_vectors_name > <...> > > printing transFilter->GetOutput()... > vtkUnstructuredGrid (0x1026e498) > <...> > Point Data: > Debug: Off > Modified Time: 2718 > Reference Count: 1 > Registered Events: (none) > Number Of Arrays: 2 > Array 0 name = NULL > Array 1 name = custom_scalars_name > Number Of Components: 4 > Number Of Tuples: 80 > Copy Flags: ( 1 0 1 1 1 ) > Scalars: > Debug: Off > Modified Time: 2143 > Reference Count: 2 > Registered Events: (none) > Name: custom_scalars_name > <...> > Vectors: > <...> > Name: (none) > <...> > > > Key differences between outputs... > - Array 0 name being set to NULL after the transform > - Copy Flags array contains a zero on the transformed Point Data > - Reference Count Number is 2 on the transformed scalar > - Vector Name is NULL on the transformed vector > From mlouw at unizar.es Wed Apr 2 09:36:49 2003 From: mlouw at unizar.es (Markus Louw) Date: Wed, 2 Apr 2003 16:36:49 +0200 Subject: [vtkusers] Lighting and textures Message-ID: <000e01c2f925$50934490$869ed29b@GTC.LAB> Hi all Is there a way to use vtk to calculate the new colour intensity values for an object, given a texture, and given a particular light source? I'd like to use the new colour intensity values on the surface, for some other calculations, and not necessarily render the object+texture+lighting each time. thanks! Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhunter at ace.bsd.uchicago.edu Wed Apr 2 09:49:20 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 02 Apr 2003 08:49:20 -0600 Subject: [vtkusers] Reading CT scan images In-Reply-To: <20030402054351.46780.qmail@web10705.mail.yahoo.com> (Jack Thakkar's message of "Tue, 1 Apr 2003 21:43:51 -0800 (PST)") References: <20030402054351.46780.qmail@web10705.mail.yahoo.com> Message-ID: >>>>> "Jack" == Jack Thakkar writes: Jack> Hi, I want to read CT scan images ( Dicom format). I am Jack> using VTK 4.2 and C++. I need to know which class is the Jack> most appropriate for this. Also if I have CT scsns of IS&C Jack> format of Toshiba scanner, can I convert it into DICOM, how? As for DICOM, check the archives: http://www.kitware.com/cgi-bin/htsearch You'll find many threads on reading DICOM files. Also, check the FAQ: http://public.kitware.com/cgi-bin/vtkfaq?req=all#3.6 As for IS&C, I don't know anything about the format, but if all the data is stored regularly at the end of the file (after a fixed length header) vtkImageReader or a derived class with appropriate settings can do the job. Check the examples in the Examples/Medical/Cxx dir that comes with the VTK src for examples of how to set these flags. John Hunter From james at rogue-research.com Wed Apr 2 09:51:55 2003 From: james at rogue-research.com (James Dessart) Date: Wed, 2 Apr 2003 09:51:55 -0500 Subject: [vtkusers] Problems linking using CodeWarrior on Mac OS X Message-ID: It seems with CodeWarrior 8 and gcc 3, C++ name mangling has been harmonized. As such, I decided to try to link a mach-o app in CodeWarrior, using VTK. I'm using the Metrowerks linker inside of CodeWarrior, linking to dylibs built in the usual way. I get two unresolved symbols, the default constructor for tkOStrStreamWrapper and the destructor. I looked into the symbol table for libvtkCommon, and there are destructor and constructor symbols, but not the exact ones it was looking for, strangely enough. Anyways, here are the symbols from libvtkCommon.dylib: 0007e9b0 T __ZN20vtkOStrStreamWrapperD1Ev 0007e978 T __ZN20vtkOStrStreamWrapperD2Ev 0007e9e8 T __ZN20vtkOStrStreamWrapperD4Ev and here is the symbol CodeWarrior's looking for: __ZN20vtkOStrStreamWrapperD0Ev Now, that particular symbol is also referenced in libvtkRendering.dylib, but it's the one specified in libCommon. However, CodeWarrior seems to think it can't link the two... Anyone have a clue? thanks in advance, James From jdhunter at ace.bsd.uchicago.edu Wed Apr 2 15:17:53 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 02 Apr 2003 14:17:53 -0600 Subject: [vtkusers] picking actor Message-ID: I have a class Marker that is derived from vtk.vtkActor in python, and a scene that is populated with a number of these markers and some other actors that I don't want to pick. I pick a marker with picker = vtk.vtkPropPicker() picker.PickProp(x, y, renderer, markers) actor = picker.GetActor() if actor is None: return where markers is a vtkActorCollection of the actors I'm interested in. This code successfully picks the actor under point; eg, if I call actor.SetVisibility(0), it becomes invisible. However, when I get the string representation of the actor, it reports itself as a vtkOpenGLActor, and does not have the attributes of my derived class. I need to be able to get the instance of my derived class. I can imagine a way to hack this out, eg by comparing some attribute of the vtkOpenGLActor with the instances of my Marker class (like the center, which will be unique for my markers), but I suspect there is an elegant, right way to do it. Thanks, John Hunter From Michael-Dresser at mail.omrf.ouhsc.edu Wed Apr 2 16:04:38 2003 From: Michael-Dresser at mail.omrf.ouhsc.edu (Mike Dresser, MD, PhD) Date: Wed, 2 Apr 2003 15:04:38 -0600 Subject: [vtkusers] Ambiguous symbol error on compiling VTK with VP1000 support Message-ID: Hello all. I'm trying to build VTK with support for the VolumePro1000 board (WIN2K; MSVC6; VTK from CVS; vli.h, vli3.lib and vli3.dll dated 11/28/2001 from VTK website). When compiling vtkOpenGLVolumeProVP1000Mapper.cxx (and others), I get error C2872 (ambiguous symbol) about VLIContext, VLILookupTable, etc., which looks to arise from both VLIContext and vli3::VLIContext (etc.) being declared. I found a similar problem/request in the VTK archives from Sept. 2002, but no reply. Thanks for any help. Mike ---------- Michael E. Dresser, MD/PhD Assoc. Member, Molecular and Cell Biology Director, Core Facility for Imaging 405-271-7682 Oklahoma Medical Research Foundation 825 NE 13th St. Oklahoma City, OK 73104 From pjc at hootenanny.org Wed Apr 2 16:24:23 2003 From: pjc at hootenanny.org (Peter J Carr) Date: Wed, 2 Apr 2003 16:24:23 -0500 Subject: [vtkusers] renderwindow interactor with MacOS X and Java Message-ID: <794478AA-6551-11D7-876C-000393B3E494@hootenanny.org> I am testing Java wrapping with the latest version of VTK on MacOS X (10.2.4) with Java 1.4.1. In going through the "Examples/Tutorial" steps I am able to compile and run steps one through four with Java wrapping. I have a problem with Step5. The program compiles and runs, but the cone doesn't render in the window and there is now ability to interact with the scene using the mouse or keyboard. Does anybody have a working example which uses Java wrapping and vtkRenderWindowInteractor. Thanks, Peter Carr From jeff at cdnorthamerica.com Wed Apr 2 16:27:41 2003 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Wed, 02 Apr 2003 16:27:41 -0500 Subject: [vtkusers] picking actor In-Reply-To: References: Message-ID: <3E8B55CD.3040606@cdnorthamerica.com> Hi, Is there some form of instanceof or dynamic cast in python (i'm sure there is)? If so, you could cast the actor to your concrete type and then ask it for the appropriate info. Not elegant, but functional. -Jeff John Hunter wrote: >I have a class Marker that is derived from vtk.vtkActor in python, and >a scene that is populated with a number of these markers and some >other actors that I don't want to pick. I pick a marker with > > picker = vtk.vtkPropPicker() > picker.PickProp(x, y, renderer, markers) > actor = picker.GetActor() > if actor is None: return > >where markers is a vtkActorCollection of the actors I'm interested in. >This code successfully picks the actor under point; eg, if I call >actor.SetVisibility(0), it becomes invisible. > >However, when I get the string representation of the actor, it reports >itself as a vtkOpenGLActor, and does not have the attributes of my >derived class. I need to be able to get the instance of my derived >class. I can imagine a way to hack this out, eg by comparing some >attribute of the vtkOpenGLActor with the instances of my Marker class >(like the center, which will be unique for my markers), but I suspect >there is an elegant, right way to do it. > >Thanks, >John Hunter >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- Jeff Lee Software Engineer Computational Dynamics North America Ltd 21 Lafayette Street, Suite 230 Lebanon NH 03766 USA fax: 603 643 9994 phone: 603 643 9993 x109 http://www.cd-adapco.com From jeff at cdnorthamerica.com Wed Apr 2 16:30:44 2003 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Wed, 02 Apr 2003 16:30:44 -0500 Subject: [vtkusers] renderwindow interactor with MacOS X and Java In-Reply-To: <794478AA-6551-11D7-876C-000393B3E494@hootenanny.org> References: <794478AA-6551-11D7-876C-000393B3E494@hootenanny.org> Message-ID: <3E8B5684.4030801@cdnorthamerica.com> Hi, There are examples in Wrapping/Java/ that use vtkGenericRenderWindowInteractor, but I don't know if they work yet with osx. -Jeff Peter J Carr wrote: > I am testing Java wrapping with the latest version of VTK on MacOS X > (10.2.4) with Java 1.4.1. > > In going through the "Examples/Tutorial" steps I am able to compile > and run steps one through four with Java wrapping. > I have a problem with Step5. > The program compiles and runs, but the cone doesn't render in the > window and there is now ability to interact with the scene using the > mouse or keyboard. > > Does anybody have a working example which uses Java wrapping and > vtkRenderWindowInteractor. > > Thanks, > Peter Carr > > > _______________________________________________ > This is the private VTK discussion list. Please keep messages > on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > From haase at msg.ucsf.edu Wed Apr 2 16:38:12 2003 From: haase at msg.ucsf.edu (Sebastian Haase) Date: Wed, 2 Apr 2003 13:38:12 -0800 Subject: [vtkusers] Re: VTK/VP1000 "ambiguous" error on compilation References: Message-ID: <02a601c2f960$2956db90$3b45da80@rodan> Hi Mike, > Hello Sebastien. > > I found in the VTK archives that you had a problem that I'm now having, that > trying to compile VTK with VP1000 support gives an "ambiuguous" error > because of global plus vli3:: declarations of various VLI classes (even > though I'm using MSVC6 in Windows, not Linux). Did you get a solution to > your problem, that might help me? Thanks for any help. > > (I'm sending this request to the vtkusers list also, but I thought you may > not keep up with it.) that's actually correct - I would have missed it ... If I recall correctly there should be another posting by me in the same archive where I said what I did. I remember vagely something about namespaces and that I needed to go into one file and change it to include "vli3.h" to "vli.h" or the other way around - THIS IS JUST FROM MEMORY - THE CORRECT FILENAMES ARE LIKELY TO BE DIFFERENT.... Let me know if this already helps - otherwise I'll go into my files and start looking.... I actually never really got started on the VP1000 + VTK project - it's still on my (lon term) todo-list. I am interested in how it works for you and what you are planning to do with it... Have a nice day, Sebastian Haase From David.Pont at ForestResearch.co.nz Wed Apr 2 16:43:52 2003 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Thu, 3 Apr 2003 09:43:52 +1200 Subject: [vtkusers] Drwaing Functions using VTK Message-ID: Sharbel, vtkQuadric wont do it, and I dont know of any other way. I think you would have to derive a new class from vtkImplicitFunction, vtkQuadric be a good starting point. The heart of implicit functions in vtk is two functions: EvaluateFunction and EvaluateGradient. You could define a new vtk class that allows the user to provide these functions, registered with the class and called when required. This will allow users to define there own, arbitrary implicit functions. The routine in vtk is then to sample the implicit function over a volume with vtkSampleFunction, and then extract a surface, typically f=0, with vtkContourFilter. regards Dave |--------+---------------------------------> | | "Sharbel Dalal" | | | | | | Sent by: | | | vtkusers-admin at public.k| | | itware.com | | | | | | | | | 02/04/2003 23:03 | | | | |--------+---------------------------------> >------------------------------------------------------------------------------------------------------------| | | | To: | | cc: | | Subject: [vtkusers] Drwaing Functions using VTK | >------------------------------------------------------------------------------------------------------------| Hello, I am a student and I am doing a project for my university , it's a semi matlab language and we need to draw planes in the project, I chose VTK to do so, I am sure it has the capabilities to do so, but ive been reading the examples and all I found was an example of a quadric function, can anyone tell me how (or perhaps give me an example) I can draw a non linear function e.g f(x,y,z)=x^7*y^2+z*y+2 Your help would be really appreciated. Thanks Sharbel From y_alakese at hotmail.com Wed Apr 2 18:42:23 2003 From: y_alakese at hotmail.com (Yasin Alakese) Date: Wed, 02 Apr 2003 23:42:23 +0000 Subject: [vtkusers] vtkXYPlotActor2D strange behaviour ?? Message-ID: Hi When we create a x-y plot, and we give x range, y range, everything is okay! But if I try to change y range or x range(like in code below), the title and the numbers glide! Can someone tell me how if we can avoid this?? Regards Yasin Alakese /****/ #include #include #include #include #include #include #include "vtkAxisActor2D.h" #include #define DIM 4 int main(int argc, char* argv[]) { vtkAxisActor2D *xAxis, *yAxis; vtkDataArray *dataArray1 = vtkDataArray::CreateDataArray(VTK_FLOAT); dataArray1->SetNumberOfTuples(DIM); vtkDataArray *dataArray2 = vtkDataArray::CreateDataArray(VTK_FLOAT); dataArray2->SetNumberOfTuples(DIM); vtkXYPlotActor *plot = vtkXYPlotActor::New(); vtkFieldData *fieldData = vtkFieldData::New(); vtkDataObject *dataObject = vtkDataObject::New(); vtkRenderer *renderer = vtkRenderer::New(); vtkRenderWindow *renderWindow = vtkRenderWindow::New(); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); vtkTextProperty *text = vtkTextProperty::New(); float x = 3; float y = 1; dataArray1->SetTuple(0, &x); dataArray2->SetTuple(0, &y); x = 2; y = 0.0; dataArray1->SetTuple(1, &x); dataArray2->SetTuple(1, &y); x = 1.0; y = 0.5; dataArray1->SetTuple(2, &x); dataArray2->SetTuple(2, &y); x = 0.0; y = 0.0; dataArray1->SetTuple(3, &x); dataArray2->SetTuple(3, &y); fieldData->AllocateArrays(2); fieldData->AddArray(dataArray1); fieldData->AddArray(dataArray2); dataObject->SetFieldData(fieldData); plot->AddDataObjectInput(dataObject); plot->SetTitle("Arc"); plot->SetXTitle("cos(t)"); plot->SetYTitle("sin(t)"); plot->SetFontFamilyToTimes(); plot->SetYRange(-1.0, 1.0); plot->SetXRange(0.0, 4.0); plot->SetXValuesToValue(); plot->SetWidth(0.9); plot->SetHeight(0.9); plot->SetPosition(0.05, 0.05); plot->SetDataObjectXComponent(0, 0); plot->SetDataObjectYComponent(0, 1); xAxis = plot->GetXAxisActor2D(); yAxis = plot->GetYAxisActor2D(); xAxis->SetFontFactor(10); yAxis->SetFontFactor(10); renderer->AddActor2D(plot); renderWindow->AddRenderer(renderer); iren->SetRenderWindow(renderWindow); renderWindow->Render(); //now it will do plot->SetYRange(-10.0, 10.0); renderWindow->Render(); iren->Start(); dataArray1->Delete(); dataArray2->Delete(); fieldData->Delete(); dataObject->Delete(); plot->Delete(); renderer->Delete(); renderWindow->Delete(); iren->Delete(); return 0; } _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From qiuxuefm at 163.com Wed Apr 2 23:36:28 2003 From: qiuxuefm at 163.com (xiaohua lv) Date: Thu, 3 Apr 2003 12:36:28 +0800 Subject: [vtkusers] How to read image files? Message-ID: <20030403043307.33FEE1C82D67C@sm212.163.com> vtkusers? I need to read a series of image files. Those files each has a header of 15 bytes.I want to know how to jump over the header and read only the image data. ????????xiaohua lv ????????qiuxuefm at 163.com ??????????2003-04-03 From ramakrishna.prakash at quest-global.com Wed Apr 2 23:56:54 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Thu, 3 Apr 2003 10:26:54 +0530 Subject: [vtkusers] Normal Calculation Message-ID: <001001c2f99d$72ad0ac0$de0ba8c0@qtwblr01.questglobal.com> Hi, I have a set of points. Is it possible to calculate the normal of a plane containing these points? Thanks Shyam From chandranram4u at rediffmail.com Thu Apr 3 00:24:12 2003 From: chandranram4u at rediffmail.com (ramu chandran) Date: 3 Apr 2003 05:24:12 -0000 Subject: [vtkusers] vtkImplicitSelectionLoop Message-ID: <20030403052412.27020.qmail@webmail9.rediffmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From affable at hd2.dot.net.in Thu Apr 3 01:14:24 2003 From: affable at hd2.dot.net.in (cspl) Date: Thu, 3 Apr 2003 11:44:24 +0530 Subject: [vtkusers] Volume Clipping... Message-ID: <005b01c2f9a8$465b84a0$01000001@macinfo.net> Hi all, Any body have any idea of clipping a volume ( a set of images) using vtk classes??? we have vtkClipVolume, vtkClipDataSet, vtkClipPolyData classes to clip data. But among these classes which class will help in clipping image data and returns vtkImageData. I tried with all the above classes but none helped me. These classes return vtkUnstructuredGrid type of data. How to convert this data type to vtkImageData type? If i give 10 images, let say, of dimensions 128x128x10 and apply clipping the region which is in the form of a cuboid, 50x50x10, in the center of the volume then i should get the clipped output in the vtkimageData object. Is there any way to solve this problem? Please help me in this regard. Thanks in advance. -Regards, Sateesh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.p.botha at its.tudelft.nl Thu Apr 3 02:24:06 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Thu, 3 Apr 2003 09:24:06 +0200 Subject: [vtkusers] Volume Clipping... In-Reply-To: <005b01c2f9a8$465b84a0$01000001@macinfo.net> References: <005b01c2f9a8$465b84a0$01000001@macinfo.net> Message-ID: <20030403072406.GB7214@dutidad.twi.tudelft.nl> On Thu, Apr 03, 2003 at 11:44:24AM +0530, cspl wrote: > Any body have any idea of clipping a volume ( a set of images) > If i give 10 images, let say, of dimensions 128x128x10 and > apply clipping the region which is in the form of a cuboid, 50x50x10, > in the center of the volume then i should get the clipped output in the > vtkimageData object. Is there any way to solve this problem? Have a look at vtkExtractVOI. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From Pedro.Patron at imag.fr Thu Apr 3 03:37:02 2003 From: Pedro.Patron at imag.fr (Pedro.Patron at imag.fr) Date: Thu, 3 Apr 2003 10:37:02 +0200 Subject: [vtkusers] vtkandqt run example Message-ID: <1049359022.3e8bf2aeccf65@webmail.imag.fr> Hi everybody, Just a little remark for the people how wants to integrate VTK in a Qt interface and they are beginners like me. This is the interactor.pro configuration file example that runs for Qt 3.1.0 and Vtk 4.2.1: TEMPLATE = app CONFIG = qt warn_on release console opengl win32:LIBS = $(VTKDIR)\lib\vtklib.lib imm32.lib win32:TMAKE_CFLAGS += -MD win32:TMAKE_CXXFLAGS += -MD win32:TMAKE_LFLAGS += /nodefaultlib:libc.lib INCLUDEPATH = $(VTKDIR) \ $(VTKDIR)\Graphics \ $(VTKDIR)\Common \ $(VTKDIR)\Imaging \ $(VTKDIR)\Filtering \ $(VTKDIR)\Rendering LIBS += -L$(VTKDIR)/bin -lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkRendering HEADERS = ../src/renderwindowinteractor.h \ ../src/renderwindow.h SOURCES = interactormain.cpp \ ../src/renderwindowinteractor.cpp \ ../src/renderwindow.cpp TARGET = interactor DEFINES = VTKNODLL # enable this, if you want the double buffering of qt instead # of vtk # DEFINES += QT_DOUBLEBUFFER ------------------------------------------------- envoy? via Webmail/IMAG ! From cz_lj at yahoo.com.cn Thu Apr 3 06:08:39 2003 From: cz_lj at yahoo.com.cn (=?GB2312?Q?=B3=C2=D7=BF?=) Date: Thu, 3 Apr 2003 19:8:39 +0800 Subject: [vtkusers] about .obj file Message-ID: <20030403110732.7FE711ABEC@public.kitware.com> Hi,all vtkusers Who can understand the information in the .obj file?I want to get the coordinate of all the vertex of a 3D model.I don't know which information I should extract from the .obj file. From dave.porritt at dspace.co.uk Thu Apr 3 06:28:45 2003 From: dave.porritt at dspace.co.uk (Dave Porritt) Date: Thu, 03 Apr 2003 12:28:45 +0100 Subject: [vtkusers] PM-Visualization Studio Message-ID: <3E8C1AED.503@dspace.co.uk> Hi, Is this package available any more? The Principia Mathematica web site appears to be dormant. Regards, Dave From aai at Cs.Nott.AC.UK Thu Apr 3 06:26:50 2003 From: aai at Cs.Nott.AC.UK (Ainojie Alexander Irune) Date: Thu, 03 Apr 2003 12:26:50 +0100 Subject: [vtkusers] creating 3D graphs from series time data Message-ID: <3E8C1A7A.4090607@cs.nott.ac.uk> Hi, Can anyone help. I am trying to create 3D graphs from some data stored in a text file. Can anyone help with tips as to how to go about doing this. Or has anyone got any examples on generating graphs from static data. thanks alot Alex From vermaas at astron.nl Thu Apr 3 06:29:45 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Thu, 03 Apr 2003 13:29:45 +0200 Subject: [vtkusers] How do I convert a vtkExtractVOI to vtkDataset? or using in a vtkProbe Message-ID: Hi, I have a 'vtkImageData' that I 'clipped' with 'SetVOI' to get a smaller datacube. The result is a 'vtkExtractVOI' that I can use in the graphics pipeline. I want to use 'vtkProbeFilter' to 'shoot' a line through the dataset and draw an XYPlot. It works for my complete dataset (the 'vtkImageData'), but not for my clipped dataset (the 'vtkExtractVOI'). My problem is that 'probe->SetSource' requires a 'vtkDataset' and not a 'vtkExtractVOI'. I tried this to cast it to 'vtkDataSet', but I get a 'segmentation fault' when I run. probe->SetSource(this->ImageData); //probe->SetSource((vtkDataSet*)this->myExtractVOI); (a) is there a way to convert my 'vtkExtractVOI' back to a 'vtkImageData' or a 'vtkDataset'? (b) Is there a way to let 'probe->SetSource' accept a 'vtkExtractVOI'? Thanks, Nico Vermaas From robbel at science.uva.nl Thu Apr 3 09:24:57 2003 From: robbel at science.uva.nl (Robert Belleman) Date: Thu, 3 Apr 2003 16:24:57 +0200 (CEST) Subject: [vtkusers] How do I convert a vtkExtractVOI to vtkDataset? or using in a vtkProbe In-Reply-To: References: Message-ID: <34820.212.153.190.4.1049379897.squirrel@webmail.science.uva.nl> Nico, > I have a 'vtkImageData' that I 'clipped' with 'SetVOI' to get a smaller > datacube. The result is a 'vtkExtractVOI' that I can use in the graphics > pipeline. The *class* you use is called vtkExtractVOI. Its *result* (or "output") is of type vtkImageData. > I want to use 'vtkProbeFilter' to 'shoot' a line through the dataset and > draw an XYPlot. It works for my complete dataset (the 'vtkImageData'), > but not for my clipped dataset (the 'vtkExtractVOI'). > > My problem is that 'probe->SetSource' requires a 'vtkDataset' and not a > 'vtkExtractVOI'. I tried this to cast it to 'vtkDataSet', but I get a > 'segmentation fault' when I run. You should pass the output of vtkExtractVOI to the probe, not the class itself. I.e. probe->SetSource(this->myExtractVOI->GetOutput()); -- Rob -- [] Robert Belleman X Section Computational Science [] [] robbel at science.uva.nl |X| University of Amsterdam, the Netherlands [] [] tel: (+31) 20 525 7510 X http://www.science.uva.nl/~robbel/ [] From vermaas at astron.nl Thu Apr 3 08:57:15 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Thu, 03 Apr 2003 15:57:15 +0200 Subject: [vtkusers] How do I convert a vtkExtractVOI to vtkDataset? or using in a vtkProbe Message-ID: Rob, Brilliant, that was it, thanks a lot... Nico ==================================================== Nico Vermaas ASTRON - Westerbork Synthesis Radio Telescope Schattenberg 1 - 9433 TA Zwiggelte - The Netherlands tel: +31 593 598710 vermaas at astron.nl ==================================================== >>> "Robert Belleman" 04/03/03 04:24pm >>> Nico, > I have a 'vtkImageData' that I 'clipped' with 'SetVOI' to get a smaller > datacube. The result is a 'vtkExtractVOI' that I can use in the graphics > pipeline. The *class* you use is called vtkExtractVOI. Its *result* (or "output") is of type vtkImageData. > I want to use 'vtkProbeFilter' to 'shoot' a line through the dataset and > draw an XYPlot. It works for my complete dataset (the 'vtkImageData'), > but not for my clipped dataset (the 'vtkExtractVOI'). > > My problem is that 'probe->SetSource' requires a 'vtkDataset' and not a > 'vtkExtractVOI'. I tried this to cast it to 'vtkDataSet', but I get a > 'segmentation fault' when I run. You should pass the output of vtkExtractVOI to the probe, not the class itself. I.e. probe->SetSource(this->myExtractVOI->GetOutput()); -- Rob -- [] Robert Belleman X Section Computational Science [] [] robbel at science.uva.nl |X| University of Amsterdam, the Netherlands [] [] tel: (+31) 20 525 7510 X http://www.science.uva.nl/~robbel/ [] From anast.jm at pg.com Thu Apr 3 10:09:16 2003 From: anast.jm at pg.com (anast.jm at pg.com) Date: Thu, 3 Apr 2003 10:09:16 -0500 Subject: [vtkusers] How to read image files? Message-ID: Xiaohua, try vtkImageReader SetHeaderSize also try reading the documentation on the vtk web site, sometimes these types of questions are easy to answer by yourself just scanning through doc page for the class of interest. To find the needed method you may need to look at super classes which is quite easy with the hyperlinks in each doc page. Try it...you'll like it! ....john Internet Mail Message Received from host: public.kitware.com [24.97.130.19] "xiaohua lv" Sent by: vtkusers-admin at public.kitware.com 04/02/2003 11:36 PM To: "vtkusers at public.kitware.com" cc: (bcc: John Anast-JM/PGI) Subject: [vtkusers] How to read image files? vtkusers? I need to read a series of image files. Those files each has a header of 15 bytes.I want to know how to jump over the header and read only the image data. ????????xiaohua lv ????????qiuxuefm at 163.com ??????????2003-04-03 _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jonathan.Bailleul at greyc.ismra.fr Thu Apr 3 11:21:20 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Thu, 03 Apr 2003 18:21:20 +0200 Subject: [vtkusers] Setting colors to individual cell References: <20030327023537.24896.qmail@mailweb34.rediffmail.com> Message-ID: <3E8C5F80.37B40349@greyc.ismra.fr> Nanditha Thakur wrote: > > Hello Users, > I have a 3D object. Can I set different color to > some of the cells(or points) of this object? This is how my > requirement is going to be. Say my actor is blue in color.I will > pick some of the cells of the object by clicking on it. Now I want > to set, say red color, to these picked cells. Is it possible to do > so in VTK? Help! > > Thanks > Nanditha > Dear Nanditha, I am just dealing with a similar problem right now! My choice consisted in glyphing the points of the selected cell instead, since I just didn't figure out how to proceed otherwise. I still have problems to solve, but it seems fairly usable. Let me know if you need to know more about this, or if you managed to do what you planned! Best Regards, -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From berklist at nycap.rr.com Thu Apr 3 11:43:59 2003 From: berklist at nycap.rr.com (Berk Geveci) Date: 03 Apr 2003 11:43:59 -0500 Subject: [vtkusers] Setting colors to individual cell In-Reply-To: <3E8C5F80.37B40349@greyc.ismra.fr> References: <20030327023537.24896.qmail@mailweb34.rediffmail.com> <3E8C5F80.37B40349@greyc.ismra.fr> Message-ID: <1049388240.11034.30.camel@caemlyn.kitwarein.com> On Thu, 2003-04-03 at 11:21, Jonathan Bailleul wrote: > Nanditha Thakur wrote: > > > > Hello Users, > > I have a 3D object. Can I set different color to > > some of the cells(or points) of this object? This is how my > > requirement is going to be. Say my actor is blue in color.I will > > pick some of the cells of the object by clicking on it. Now I want > > to set, say red color, to these picked cells. Is it possible to do > > so in VTK? Help! > > > > Thanks > > Nanditha > > Create cell scalars of constant value. Color by these. When a cell is picked, change the value for that cell. You will have to create a custom lookup table probably. From prabhu at aero.iitm.ernet.in Thu Apr 3 12:04:10 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Thu, 3 Apr 2003 22:34:10 +0530 Subject: [vtkusers] picking actor In-Reply-To: References: Message-ID: <16012.27018.422293.132500@monster.linux.in> >>>>> "JH" == John Hunter writes: JH> I have a class Marker that is derived from vtk.vtkActor in JH> python, and a scene that is populated with a number of these JH> markers and some other actors that I don't want to pick. I JH> pick a marker with [snip] JH> However, when I get the string representation of the actor, it JH> reports itself as a vtkOpenGLActor, and does not have the JH> attributes of my derived class. I need to be able to get the JH> instance of my derived class. I can imagine a way to hack JH> this out, eg by comparing some attribute of the vtkOpenGLActor JH> with the instances of my Marker class (like the center, which JH> will be unique for my markers), but I suspect there is an JH> elegant, right way to do it. That is a little surprising. I'm way out of touch on this but the following fragment works fine for me with VTK off CVS, Python2.2. In [2]: import vtk In [3]: class MyMapper(vtk.vtkPolyDataMapper): ...: def test(self): ...: print "MyMapper.test()" ...: print self.a ...: In [4]: c = vtk.vtkConeSource() In [5]: m = MyMapper () In [6]: m.SetInput(c.GetOutput()) In [7]: m.a = 100 In [8]: m.test() MyMapper.test() 100 In [9]: a = vtk.vtkActor() In [10]: a.SetMapper(m) In [11]: m1 = a.GetMapper () In [12]: m1.test() MyMapper.test() 100 cheers, prabhu p.s. I'm using the excellent IPython interpreter (http://ipython.scipy.org) From jdhunter at ace.bsd.uchicago.edu Thu Apr 3 13:35:11 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 03 Apr 2003 12:35:11 -0600 Subject: [vtkusers] picking actor In-Reply-To: <16012.27018.422293.132500@monster.linux.in> (Prabhu Ramachandran's message of "Thu, 3 Apr 2003 22:34:10 +0530") References: <16012.27018.422293.132500@monster.linux.in> Message-ID: >>>>> "Prabhu" == Prabhu Ramachandran writes: Prabhu> That is a little surprising. I'm way out of touch on this Prabhu> but the following fragment works fine for me with VTK off Prabhu> CVS, Python2.2. Yep, that would work fine for me too. My case is a little different. My class is derived from vtk.Actor and I am dealing with an actor *returned by a call a vtk.vtkPropPicker*. It's only after it comes back from the picker that I lose the derived attributes. Here is how I am working around it now. When I add my marker to the vtkActorCollection, I add the original object to a dictionary with the address as key. key = marker.GetAddressAsString('Marker') self.markerMap[key] = marker self.markers.AddItem(marker) self.ren.AddActor(marker) After I pick the actor and get a vtkOpenGLActor back, I can get the original actor back with it's special attributes with: picker = vtk.vtkPropPicker() picker.PickProp(x, y, renderer, self.markers) actor = picker.GetActor() key = actor.GetAddressAsString('Marker') marker = self.markerMap[key] print marker.call_some_derived_func() This works for now, but if someone knows a better way, I'm eager to hear it. Prabhu> p.s. I'm using the excellent IPython interpreter Me too :-) John Hunter From tdeschamps at lbl.gov Thu Apr 3 14:50:45 2003 From: tdeschamps at lbl.gov (Thomas Deschamps) Date: Thu, 03 Apr 2003 11:50:45 -0800 Subject: [vtkusers] Who is using vtkRIBExporter? Message-ID: <3E8C9095.3000906@lbl.gov> Hi vtkUsers, This question is in between vtk and other rendering softwares. I am just wondering if anyone is using vtkRIBExporter. I would like to use it too, but apparently there is no open-source renderman compatible renderer available. Blue Moon Ray-tracer links have disappeared. POV-Ray looks not compatible. I don't know others. Does anyone knows another free renderer which can read the .RIB files? Does anyone still has BMR code? Thanks, Thomas (TDeschamps at lbl.gov) From mcsalas at chilesat.net Thu Apr 3 15:36:25 2003 From: mcsalas at chilesat.net (mcsalas at chilesat.net) Date: Thu, 3 Apr 2003 16:36:25 -0400 Subject: [vtkusers] Please I need Help. Message-ID: <3E3A80AC00007ED3@mail.chilesat.net> I have a txt file, with every line is a polygon. p.e polygon1 v1,v2,v3,v4 polygon2 v1,v2,v3,v4,v5,v6,v7 polygonN Vn,...., Vn+1 I need render this with VTK. I can make the first polygon, but i don't know how a make array of actor's or something like this. maybe a loop with add any polygon to finish this, and display all in a only render window. Please help. I send many post and i have answer to very little quantity of this. I'm very stressed by this problem. Please Help me. Best Regards from CHILE and I Hope the best for all VTK - User's. Max From David.Pont at ForestResearch.co.nz Thu Apr 3 16:13:43 2003 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Fri, 4 Apr 2003 09:13:43 +1200 Subject: [vtkusers] Normal Calculation Message-ID: Hi Shyam, vtkPolygon::ComputeNormal should do it. Read the doc for vtkPolygon to understand the requirements. Dave Pont |--------+--------------------------------------> | | "R K Shyamprakash" | | | | | | Sent by: | | | vtkusers-admin at public.kitwar| | | e.com | | | | | | | | | 03/04/2003 16:56 | | | | |--------+--------------------------------------> >------------------------------------------------------------------------------------------------------------| | | | To: "Vtkusers (E-mail)" | | cc: | | Subject: [vtkusers] Normal Calculation | >------------------------------------------------------------------------------------------------------------| Hi, I have a set of points. Is it possible to calculate the normal of a plane containing these points? Thanks Shyam _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: < http://public.kitware.com/cgi-bin/vtkfaq> Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From rpm at wag.caltech.edu Thu Apr 3 17:57:48 2003 From: rpm at wag.caltech.edu (Richard Muller) Date: Thu, 3 Apr 2003 14:57:48 -0800 Subject: [vtkusers] Problem with Python and VTK Message-ID: I'm having trouble with making Python and VTK work nicely together. I'm using Python 2.2.1 and VTK 4.2.1 on a Linux box. I've built VTK and the python bindings without problems. Most of the features in VTK work fine, but when I try to do contours, I get the error: ValueError: method requires a VTK object. I found the FAQ entry here: http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq02.004.htp that addresses this issue, but the fixes don't work for me. First, I can't use vtkpython because for some reason it doesn't pick up the other modules in my site-packages directory (most notably NumPy). Secondly, when I either try to rebuild with CMAKE_SKIP_RPATH or when I delete the *.so files in the bin directory, then Python can't find the *.so files at all. I've run the 'python setup.py install' commands, and the libraries are under my site-packages directory, but Python insists upon using the version of vtk.py that is in my build directory. It's like it remembers it somehow, although I've used 'printenv' to see if any env variables are pointing to it, and I can't find any. I would be grateful for any help anyone can offer. Rick Muller rpm at wag.caltech.edu http://wag.caltech.edu/home/rpm From ramakrishna.prakash at quest-global.com Thu Apr 3 20:36:19 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Fri, 4 Apr 2003 07:06:19 +0530 Subject: [vtkusers] Please I need Help. In-Reply-To: <3E3A80AC00007ED3@mail.chilesat.net> Message-ID: <000001c2fa4a$97480a80$de0ba8c0@qtwblr01.questglobal.com> Hi Max, Determine the no. of polygons you nedd to render(say n). create an array of actor of length "n"; now in a loop you can create the actors and render it in the renderer. I am not sure if this is the answer you wanted. Can you be more clear in your explanation regards shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of mcsalas at chilesat.net Sent: Friday, April 04, 2003 2:06 AM To: vtkusers at public.kitware.com Subject: [vtkusers] Please I need Help. I have a txt file, with every line is a polygon. p.e polygon1 v1,v2,v3,v4 polygon2 v1,v2,v3,v4,v5,v6,v7 polygonN Vn,...., Vn+1 I need render this with VTK. I can make the first polygon, but i don't know how a make array of actor's or something like this. maybe a loop with add any polygon to finish this, and display all in a only render window. Please help. I send many post and i have answer to very little quantity of this. I'm very stressed by this problem. Please Help me. Best Regards from CHILE and I Hope the best for all VTK - User's. Max _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From chandranram4u at rediffmail.com Thu Apr 3 21:18:32 2003 From: chandranram4u at rediffmail.com (ramu chandran) Date: 4 Apr 2003 02:18:32 -0000 Subject: [vtkusers] Extracting dataset from polydata Message-ID: <20030404021832.4618.qmail@webmail8.rediffmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ramakrishna.prakash at quest-global.com Thu Apr 3 21:51:04 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Fri, 4 Apr 2003 08:21:04 +0530 Subject: [vtkusers] Extracting dataset from polydata In-Reply-To: <20030404021832.4618.qmail@webmail8.rediffmail.com> Message-ID: <000001c2fa55$09734a70$de0ba8c0@qtwblr01.questglobal.com> Hi Ramu, you can use probe filter. the following is the code in java. vtkProbeFilter probe = new vtkProbeFilter(); probe.SetSource(yourPolyData); probe.SetInput(yourDatSet); The out put of the probe filter will be yourPolyData-yourDatSet. regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of ramu chandran Sent: Friday, April 04, 2003 7:49 AM To: vtkusers at public.kitware.com Subject: [vtkusers] Extracting dataset from polydata Hi, I have a 3d object defined by a vtkPolyData. I also have a vtkDataSet which defines part of the polydata. Now how can I extract the polydata with this dataset(my resulting polydata should be polydata-dataset). Please help. Thanks Ramu _______________________________________________________________________ Odomos - the only mosquito protection outside 4 walls - Click here to know more! http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htm&&odomos&&w n _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From rrp at imm.dtu.dk Fri Apr 4 03:07:39 2003 From: rrp at imm.dtu.dk (Rasmus Reinhold Paulsen) Date: Fri, 4 Apr 2003 10:07:39 +0200 (METDST) Subject: [vtkusers] Can not connect to public.kitware.com Message-ID: For the last two days I have experienced problems trying to reach public.kitware.com and www.itk.org. Traceroute can't even resolve the addresses. Anyone else having similar problems? Regards, Rasmus From prabhu at aero.iitm.ernet.in Fri Apr 4 03:07:49 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Fri, 4 Apr 2003 13:37:49 +0530 Subject: [vtkusers] Problem with Python and VTK In-Reply-To: References: Message-ID: <16013.15701.605215.563292@monster.linux.in> >>>>> "RM" == Richard Muller writes: RM> I'm having trouble with making Python and VTK work nicely RM> together. I'm using Python 2.2.1 and VTK 4.2.1 on a Linux box. [snip] RM> First, I can't use vtkpython because for some reason it RM> doesn't pick up the other modules in my site-packages RM> directory (most notably NumPy). A traceback of this would help. The following information would also help: python -c "import sys; print sys.path" RM> Secondly, when I either try to rebuild with CMAKE_SKIP_RPATH RM> or when I delete the *.so files in the bin directory, then RM> Python can't find the *.so files at all. I've run the 'python RM> setup.py install' commands, and the libraries are under my RM> site-packages directory, but Python insists upon using the RM> version of vtk.py that is in my build directory. It's like it RM> remembers it somehow, although I've used 'printenv' to see if RM> any env variables are pointing to it, and I can't find any. Well, the way I build and use VTK (on personal machines) is to not install it but run it off the CVS tree (i.e. I use approach 2 as documented in the README.txt). It works reliably well. If you want to use python setup.py install there are three issues that you have to cover for. 1. make install as provided with VTK typically installs the libs into /usr/local/lib/vtk which is *NOT* in your linkers path which means that you need to edit ld.so.conf suitably or define LD_LIBRARY_PATH. Admittedly this is not documented but I thought the traceback would help figure this one out. 2. You need to make sure there are links to the libvtk*Python.so files inside site-packages/vtk_python/ 3. Finally the libvtk*.so files in your build tree need to be moved out of the place they were built in. The basic idea is simple. 1. You need to install the VTK libs (all of them) in the linkers path. 2. You need to tell Python where to find the libvtk*Python.so's and also where to find the directory that contains all the Python modules (typically Wrapping/Python) On lab machines I install libvtk*.so into /usr/local/lib (and put this path in ld.so.conf). Then do the following: cd $VTK_SRC_ROOT/Wrapping/Python python setup.py install --prefix=/usr/local cd /usr/local/lib/python2.2/site-packages/vtk_python/ ln -s ../../../libvtk*Python.so . Finally I do this: cd $VTK_SRC_ROOT mv bin bin1 # or rm -rf bin cheers, prabhu From cz_lj at yahoo.com.cn Fri Apr 4 03:21:31 2003 From: cz_lj at yahoo.com.cn (=?GB2312?Q?=B3=C2=D7=BF?=) Date: Fri, 4 Apr 2003 16:21:31 +0800 Subject: [vtkusers] about building a 3D model of more than one absolute area in one program Message-ID: <20030404082125.1464A1AB3B@public.kitware.com> Hi,all vtkusers I want to realize the function of building a 3D model of more than one absolute area in one program.My How can I do it by using vtkMarchingCubes? My demand is about two aspects: (1) when rendering in window,different areas must be distinguished by different colors;(2)when I write my output file of vertex coordinates,I must have ability to choose the data of which area to be output. From Jonathan.Bailleul at greyc.ismra.fr Fri Apr 4 04:05:40 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Fri, 04 Apr 2003 11:05:40 +0200 Subject: [vtkusers] about building a 3D model of more than one absolute area in one program References: <20030404082125.1464A1AB3B@public.kitware.com> Message-ID: <3E8D4AE4.945F564F@greyc.ismra.fr> ???? wrote: > > Hi,all vtkusers > I want to realize the function of building a 3D model of more than one absolute area in one program.My How can I do it by using vtkMarchingCubes? My demand is about two aspects: (1) when rendering in window,different areas must be distinguished by different colors;(2)when I write my output file of vertex coordinates,I must have ability to choose the data of which area to be output. Doing this without discriminating disconnected volumes is trivially simple, but the marching cube filter actually transforms every non-null voxel into a mesh! Maybe can we detect cycles in the vtkPolydata structure and move them in different structures?? -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From c.p.botha at its.tudelft.nl Fri Apr 4 04:15:27 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Fri, 4 Apr 2003 11:15:27 +0200 Subject: [vtkusers] about building a 3D model of more than one absolute area in one program In-Reply-To: <3E8D4AE4.945F564F@greyc.ismra.fr> References: <20030404082125.1464A1AB3B@public.kitware.com> <3E8D4AE4.945F564F@greyc.ismra.fr> Message-ID: <20030404091527.GK9131@dutidad.twi.tudelft.nl> On Fri, Apr 04, 2003 at 11:05:40AM +0200, Jonathan Bailleul wrote: > ???? wrote: > > > > Hi,all vtkusers > > I want to realize the function of building a 3D model of more than one absolute area in one program.My How can I do it by using vtkMarchingCubes? My demand is about two aspects: (1) when rendering in window,different areas must be distinguished by different colors;(2)when I write my output file of vertex coordinates,I must have ability to choose the data of which area to be output. > > Doing this without discriminating disconnected volumes is trivially > simple, but the marching cube filter actually transforms every non-null > voxel into a mesh! Maybe can we detect cycles in the vtkPolydata > structure and move them in different structures?? You could look at the vtkPolyDataConnectivityFilter: http://www.vtk.org/doc/nightly/html/classvtkPolyDataConnectivityFilter.html -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From Jonathan.Bailleul at greyc.ismra.fr Fri Apr 4 04:15:10 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Fri, 04 Apr 2003 11:15:10 +0200 Subject: [vtkusers] Setting colors to individual cell References: <20030327023537.24896.qmail@mailweb34.rediffmail.com> <3E8C5F80.37B40349@greyc.ismra.fr> <1049388240.11034.30.camel@caemlyn.kitwarein.com> Message-ID: <3E8D4D1E.E5E7504C@greyc.ismra.fr> Berk Geveci wrote: > > On Thu, 2003-04-03 at 11:21, Jonathan Bailleul wrote: > > Nanditha Thakur wrote: > > > > > > Hello Users, > > > I have a 3D object. Can I set different color to > > > some of the cells(or points) of this object? This is how my > > > requirement is going to be. Say my actor is blue in color.I will > > > pick some of the cells of the object by clicking on it. Now I want > > > to set, say red color, to these picked cells. Is it possible to do > > > so in VTK? Help! > > > > > > Thanks > > > Nanditha > > > > > Create cell scalars of constant value. Color by these. > When a cell is picked, change the value for that cell. You > will have to create a custom lookup table probably. Err, how can we set a color attribute to a cell? I looked in the documentation but saw nothing to attach such properties. Thank you in advance. -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From vermaas at astron.nl Fri Apr 4 01:57:55 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Fri, 04 Apr 2003 08:57:55 +0200 Subject: [vtkusers] Removing al actors from a Renderer (I get multiple XYPlots in one renderer) Message-ID: Hi, I want to draw and update an XYPlotActor, but when I draw a new one (by addingAddActor2D(xyplot)) then the old one just also stays in there. So I need to delete the old one first. I tried this... and I do get the right count that increases every time I add an actor. But the Removing part does not work. vtkActorCollection *actors = vtkActorCollection::New(); int NumberOfActors = renderer->VisibleActorCount(); actors=this->renderer->GetActors(); for (int i=0; irenderer->RemoveActor(actors->GetNextActor()); } actors->Delete(); Q: How do I delete all actors from a renderer? Nico From heiland at ncsa.uiuc.edu Fri Apr 4 05:48:03 2003 From: heiland at ncsa.uiuc.edu (Randy Heiland) Date: Fri, 4 Apr 2003 04:48:03 -0600 Subject: [vtkusers] Can not connect to public.kitware.com In-Reply-To: Rasmus Reinhold Paulsen "[vtkusers] Can not connect to public.kitware.com" (Apr 4, 10:07am) References: Message-ID: <1030404044803.ZM28994@pecos.ncsa.uiuc.edu> On Apr 4, 10:07am, Rasmus Reinhold Paulsen wrote: > Subject: [vtkusers] Can not connect to public.kitware.com > For the last two days I have experienced problems trying to reach > public.kitware.com and www.itk.org. Traceroute can't even resolve the > addresses. Anyone else having similar problems? > > Regards, > Rasmus Nope. Works from here. Randy From rrp at imm.dtu.dk Fri Apr 4 06:12:08 2003 From: rrp at imm.dtu.dk (Rasmus Reinhold Paulsen) Date: Fri, 4 Apr 2003 13:12:08 +0200 (METDST) Subject: [vtkusers] Can not connect to public.kitware.com In-Reply-To: Message-ID: On Fri, 4 Apr 2003, Pearu Peterson wrote: > > For the last two days I have experienced problems trying to reach > > public.kitware.com and www.itk.org. Traceroute can't even resolve the > > addresses. Anyone else having similar problems? > > I had it today. For some reason a nameserver (in Europe/Tallinn, > tried on different independent hosts) could not resolve these host names: > > $ host www.itk.org > Nameserver not responding > www.itk.org A record not found, try again > > but in US machine there was no problem. As a quick fix, I added > > 24.97.130.18 www.kitware.com > 24.97.130.19 www.vtk.org > 24.97.130.19 www.itk.org > 24.97.130.19 public.kitware.com > > to /etc/hosts. Yes, I have also tracked the problem to the nameserver here at INRIA, Sophia-Antipolis, France. No problems in connecting from Denmark. So it is probably just a question of time before the local nameserver is refreshed. Thanks, Rasmus From jdhunter at ace.bsd.uchicago.edu Fri Apr 4 07:24:40 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Fri, 04 Apr 2003 06:24:40 -0600 Subject: [vtkusers] Removing al actors from a Renderer (I get multiple XYPlots in one renderer) In-Reply-To: ("Nico Vermaas"'s message of "Fri, 04 Apr 2003 08:57:55 +0200") References: Message-ID: >>>>> "Nico" == Nico Vermaas writes: Nico> Hi, I want to draw and update an XYPlotActor, but when I Nico> draw a new one (by addingAddActor2D(xyplot)) then the old Nico> one just also stays in there. So I need to delete the old Nico> one first. Nico> I tried this... and I do get the right count that increases Nico> every time I add an actor. But the Removing part does not Nico> work. Nico> Q: How do I delete all actors from a renderer? Perhaps you need to call InitTraversal first... And are you calling Render after you remove the actors? vtkActorCollection *actors = vtkActorCollection::New(); int NumberOfActors = renderer->VisibleActorCount(); actors=this->renderer->GetActors(); actors->InitTraversal() for (int i=0; irenderer->RemoveActor(actors->GetNextActor()); } renderer->Render() actors->Delete(); John Hunter From mcsalas at chilesat.net Fri Apr 4 08:09:01 2003 From: mcsalas at chilesat.net (mcsalas at chilesat.net) Date: Fri, 4 Apr 2003 09:09:01 -0400 Subject: [vtkusers] Please I need Help Message-ID: <3E3A80AC00008031@mail.chilesat.net> I think, the trouble is: The polygons are iregular, they can have 4 or more vertex. I can Determine the numbers of polygons, but i the vertex of each one polygon usualy are distinct. I attach the txt file, the three last numbers of each file are in order: (X,Y) The center point of the polygon. L, This is another factor to compute the color of the polygon A, The area of the polygon. Best Regards Max -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pozos-2.txt URL: From chandranram4u at rediffmail.com Fri Apr 4 08:12:17 2003 From: chandranram4u at rediffmail.com (ramu chandran) Date: 4 Apr 2003 13:12:17 -0000 Subject: [vtkusers] clipping -- please help Message-ID: <20030404131217.14774.qmail@webmail30.rediffmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Jonathan.Bailleul at greyc.ismra.fr Fri Apr 4 08:35:28 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Fri, 04 Apr 2003 15:35:28 +0200 Subject: [vtkusers] Please I need Help References: <3E3A80AC00008031@mail.chilesat.net> Message-ID: <3E8D8A20.DC8B8468@greyc.ismra.fr> mcsalas at chilesat.net wrote: > > I think, the trouble is: The polygons are iregular, they can have 4 or more > vertex. I can Determine the numbers of polygons, but i the vertex of each > one polygon usualy are distinct. > > I attach the txt file, the three last numbers of each file are in order: > > (X,Y) The center point of the polygon. > L, This is another factor to compute the color of the polygon > A, The area of the polygon. > > Best Regards > > Max > > ------------------------------------------------------------------------ > Name: pozos-2.txt > pozos-2.txt Type: Plain Text (text/plain) > Encoding: base64 This might not answer your question directly, but here is an example of visualisation program that displays on the same window several polygons, which are supposed to stand in separate vtk files. Vtk file format is trivial to understand and generate (just a list of points coordinates, and a list of polygons expressend in lists of points indexes): # vtk DataFile Version 3.0 vtk output ASCII DATASET POLYDATA POINTS 66 float -0.0357923 0.0108192 -0.145189 0.0253222 0.058125 0.0727218 -0.0227519 -0.119053 0.0607138 etc... each three numbers represent one point POLYGONS 128 512 3 2 19 18 3 19 7 20 3 20 6 18 ... up to the 128th polygon I presume you can build a single vtk file and arrange the list of polygons so as to comply with instructions of file/ using my program, all your polygons (even separate) will be rendered as a single actor. If you want several actors, just make one file for each polygon. I hope this gives you enough elements to solve your problems! -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From Jonathan.Bailleul at greyc.ismra.fr Fri Apr 4 08:36:58 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Fri, 04 Apr 2003 15:36:58 +0200 Subject: [vtkusers] Please I need Help References: <3E3A80AC00008031@mail.chilesat.net> <3E8D8A20.DC8B8468@greyc.ismra.fr> Message-ID: <3E8D8A7A.961B4974@greyc.ismra.fr> oops, the promised example is: http://www.greyc.ismra.fr/~bailleul/These/vtkView.cc -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From mcsalas at chilesat.net Fri Apr 4 09:24:58 2003 From: mcsalas at chilesat.net (mcsalas at chilesat.net) Date: Fri, 4 Apr 2003 10:24:58 -0400 Subject: RE RE: [vtkusers] Please I need Help Message-ID: <3E3A80AC00008076@mail.chilesat.net> Jonathan, Thank's for you help, but i need handle any polygon such an Actor, in other words, for each one polygon i need an actor, because i need make a operations under they's. I think maybe make a ActorArray, but i don't know how i pass the vertex if the most polygons are distinct. Regards, Max From prjoshi18 at hotmail.com Fri Apr 4 10:12:15 2003 From: prjoshi18 at hotmail.com (Pravin Joshi) Date: Fri, 04 Apr 2003 15:12:15 +0000 Subject: [vtkusers] Problem with .vtk file Message-ID: Hi, I got a .vtk with data in the format that is at the end of this mail. The data is not read by a program that I wrote, but when I use a similar data from the vtk CD-ROM it works perfect. Please someone help me track my mistake. Thanks. Pravin # vtk DataSet Version 2.0 Data Values for Population ASCII DATASET POLYDATA POINTS 75 float 1 0.592 0 2 0.888 0 3 1.243 0 4 2.784 0 5 3.708 0 . . 75 0.536 0 LINES 1 76 75 0 1 2 . . 73 74 POINT_DATA 75 SCALARS volume float LOOKUP_TABLE default 134698 202056 282806 . . _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From Jonathan.Bailleul at greyc.ismra.fr Fri Apr 4 11:29:45 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Fri, 04 Apr 2003 18:29:45 +0200 Subject: RE RE: [vtkusers] Please I need Help References: <3E3A80AC00008076@mail.chilesat.net> Message-ID: <3E8DB2F9.BDC04C33@greyc.ismra.fr> mcsalas at chilesat.net wrote: > > Jonathan, Thank's for you help, but i need handle any polygon such an Actor, > in other words, for each one polygon i need an actor, because i need make > a operations under they's. I think maybe make a ActorArray, but i don't know > how i pass the vertex if the most polygons are distinct. > > Regards, > > Max Here is a very good example from VTK that explains how to perform the whole stuff (even if you might ignore the scalars and just concentrate onto vertices and polygons - use 'w' to have them appear): http://www.greyc.ismra.fr/~bailleul/These/GoodPolyExple-Cube.cxx Good luck! (and good weekend, for me at least) ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From Jonathan.Bailleul at greyc.ismra.fr Fri Apr 4 11:50:54 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Fri, 04 Apr 2003 18:50:54 +0200 Subject: [vtkusers] How to handle different keys events? Message-ID: <3E8DB7EE.9B807385@greyc.ismra.fr> Dear all, I managed to handle 'any key' event using the code below. My problem is that I'd be happy to discriminate keys, and I really can't figure out how (even if you could notice I significantly advanced since my last post). can anybody help? Thanks in advance. void vectraEventHandler(vtkObject* caller, unsigned long eventId, void* ClientData, void* data) { switch (eventId) { case vtkCommand::TimerEvent: cout << endl << "TimerEvent"; break; case vtkCommand::KeyPressEvent: { something for any key } break; default: cout << endl << "UnhandledEvent"; } } and in main section: vtkCallbackCommand *cbc = vtkCallbackCommand::New(); cbc -> SetCallback(vectraEventHandler); iren -> AddObserver(vtkCommand::KeyPressEvent, cbc); -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From rpm at wag.caltech.edu Fri Apr 4 11:53:28 2003 From: rpm at wag.caltech.edu (Richard Muller) Date: Fri, 4 Apr 2003 08:53:28 -0800 Subject: [vtkusers] Problem with Python and VTK In-Reply-To: <16013.15701.605215.563292@monster.linux.in> Message-ID: On Friday, April 4, 2003, at 12:07 AM, Prabhu Ramachandran wrote: > RM> First, I can't use vtkpython because for some reason it > RM> doesn't pick up the other modules in my site-packages > RM> directory (most notably NumPy). > > A traceback of this would help. The following information would also > help: > > python -c "import sys; print sys.path" My mistake; I rebuilt python, numpy, and vtk and now the vtkpython is able to import numpy. Thanks for such a detailed response; since I have a solution that works, I'll stick with this. But I'll keep your message on file in case I need to change strategies at some point in the future. Rick Rick Muller rpm at wag.caltech.edu http://wag.caltech.edu/home/rpm From c.p.botha at its.tudelft.nl Fri Apr 4 12:07:29 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Fri, 4 Apr 2003 19:07:29 +0200 Subject: [vtkusers] How to handle different keys events? In-Reply-To: <3E8DB7EE.9B807385@greyc.ismra.fr> References: <3E8DB7EE.9B807385@greyc.ismra.fr> Message-ID: <20030404170729.GA11515@dutidad.twi.tudelft.nl> On Fri, Apr 04, 2003 at 06:50:54PM +0200, Jonathan Bailleul wrote: > I managed to handle 'any key' event using the code below. My problem is > that I'd be happy to discriminate keys, and I really can't figure out > how (even if you could notice I significantly advanced since my last > post). can anybody help? The caller parameter of your handler should be the RenderWindowInteractor. Use its GetKeySym() method. Please see the documentation for vtkRenderWindowInteractor for more ways to query the current event information. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From jdhunter at ace.bsd.uchicago.edu Fri Apr 4 12:28:05 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Fri, 04 Apr 2003 11:28:05 -0600 Subject: [vtkusers] picking in a view of a vtkImagePlaneWidget Message-ID: I have an vtkImageActor that is the output of a vtkImagePlaneWidget colorMap = vtk.vtkImageMapToColors() ... some color map commands ... colorMap.SetLookupTable(planeWidget.GetLookupTable()) imageActor = vtk.vtkImageActor() colorMap.SetInput(planeWidget.GetResliceOutput()) imageActor.SetInput(colorMap.GetOutput()) I am rendering this imageActor in a different render window from the one the plane widget is in. The plane widgets may not be orthogonal to the major axes. I want to pick a point in the imageActor render window, and get the world coordinates of the point in the image data under the pointer. I am wondering if I can do this with a picker. I tried vtkPropPicker, but this always returned the imageActor, not the coordinates of the imageActor under the point. I tried vtkPointPicker, picker = vtk.vtkPointPicker() b = picker.Pick(xp, yp, 0.0, renderer) if b: id = picker.GetPointId() but this always failed (b=FALSE) even when my pointer was clearly over the imageActor. Ditto for vtkCellPicker. Can this be done with a picker, or do I need to compute the world point by doing the transformations from viewport coords myself? Thanks, John Hunter From ashok at nmr.mgh.harvard.edu Fri Apr 4 12:45:19 2003 From: ashok at nmr.mgh.harvard.edu (Ashok Kumar) Date: Fri, 04 Apr 2003 12:45:19 -0500 Subject: [vtkusers] GLX errors Message-ID: <3E8DC4AF.9040408@nmr.mgh.harvard.edu> Hi everyone!, I am new to vtk. I have compiled VTK-4.2.1 without the MangledMesa option for Linux Redhat 7.3. Whenever I run a rendering program including the Tutorial programs distributed with vtk I keep on getting the following error: vtk Cone.tcl X Error of failed request: GLXBadRenderRequest Major opcode of failed request: 129 (GLX) Minor opcode of failed request : 1 (X_GLXRender) Serial number of failed request: 77 Current serial number in output stream: 78 I wrote a simple image reader and renderer which reads a 3d image and displays one of its slices. This works 50% of the time and then again I get the same "GLX" errors. I would really appreciate it if someone could help mw figure out the source of the errors. Regards, Kumar. From philipp.batchelor at kcl.ac.uk Fri Apr 4 13:03:52 2003 From: philipp.batchelor at kcl.ac.uk (philipp.batchelor at kcl.ac.uk) Date: Fri, 4 Apr 2003 19:03:52 +0100 (BST) Subject: [vtkusers] awt_Lock In-Reply-To: <20030404170729.GA11515@dutidad.twi.tudelft.nl> Message-ID: Hi everybody I have been trying to get vtk in Matlab on Linux, according to the instructions by J. Anast found at this link: http://www.cns.bu.edu/~speech/software/vtkMatLab_Instr.txt but I'm having some trouble with 'awt_Lock' coming from vtkRenderingJava. vtk + java work, at least the Cone example does. Matlab + java work, in the sense that my own HelloWorld.java loads and runs. However, I started modifying this HelloWorld.java example by adding some lines from vtkMatlab.java, as described on the site. import vtk.* doesn't complain, but 'protected vtkRenderWindow rw = new vtkRenderWindow(); ' complains about Native interface (error about VTKInit). A search on the vtk mailing list led me to try putting a 'protected vtkPanel renPanel = new vtkPanel();' just before. This then causes the error message '...libvtkRenderingJava.so: /usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: awt_Lock and a search for 'awt_Lock' doesn't find much, the most relevant maybe http://www.thalion-graphics.de/jgraph/doc/devel/graph3d-jniconstraints.html All the other vtk libraries do not generate complaints from matlab, so the problem really seems to come from System.loadLibrary("vtkRenderingJava"); I greped the vtk source for 'awt', but I'm not sure what to look for, I also ldd'ed the libraries, this looks ok. I'm not an everyday user of java, so maybe I'm missing something? Versions: linux: RH 7.1, 2.4.7-10 java: jdk1.4.1 matlab: 6.5r13, typing version -java in matlab produces 'Java 1.3.1 with Blackdown Java-Linux Team Java HotSpot(TM) Server VM' I noticed in vtkJavaAwt.h 'awt.version = JAWT_VERSION_1_3;' could it be a version problem? any suggestion welcome...and sorry as I realise that it is as much a java question as a vtk one. P. Batchelor From berklist at nycap.rr.com Fri Apr 4 13:23:55 2003 From: berklist at nycap.rr.com (Berk Geveci) Date: 04 Apr 2003 13:23:55 -0500 Subject: [vtkusers] GLX errors In-Reply-To: <3E8DC4AF.9040408@nmr.mgh.harvard.edu> References: <3E8DC4AF.9040408@nmr.mgh.harvard.edu> Message-ID: <1049480635.419.34.camel@caemlyn.kitwarein.com> It looks like you might have issues with your GL libraries/drivers. Which drivers/card do you use ? Do you display remotely ? On Fri, 2003-04-04 at 12:45, Ashok Kumar wrote: > Hi everyone!, > > I am new to vtk. I have compiled VTK-4.2.1 without the MangledMesa > option for Linux Redhat 7.3. Whenever I run a rendering program > including the Tutorial programs distributed with vtk I keep on getting > the following error: > > vtk Cone.tcl > X Error of failed request: GLXBadRenderRequest > Major opcode of failed request: 129 (GLX) > Minor opcode of failed request : 1 (X_GLXRender) > Serial number of failed request: 77 > Current serial number in output stream: 78 > > I wrote a simple image reader and renderer which reads a 3d image and > displays one of its slices. This works 50% of the time and then again I > get the same "GLX" errors. > > I would really appreciate it if someone could help mw figure out the > source of the errors. > > Regards, > > Kumar. > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From jeff at cdnorthamerica.com Fri Apr 4 13:22:59 2003 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Fri, 04 Apr 2003 13:22:59 -0500 Subject: [vtkusers] awt_Lock In-Reply-To: References: Message-ID: <3E8DCD83.5000004@cdnorthamerica.com> philipp.batchelor at kcl.ac.uk wrote: >Hi everybody > >I have been trying to get vtk in Matlab on Linux, according to the >instructions by J. Anast found at this link: >http://www.cns.bu.edu/~speech/software/vtkMatLab_Instr.txt >but I'm having some trouble with 'awt_Lock' coming from vtkRenderingJava. > >vtk + java work, at least the Cone example does. >Matlab + java work, in the sense that my own HelloWorld.java loads and >runs. > >However, I started modifying this HelloWorld.java example by adding some >lines from vtkMatlab.java, as described on the site. >import vtk.* doesn't complain, but > >'protected vtkRenderWindow rw = new vtkRenderWindow(); ' > >complains about Native interface (error about VTKInit). A search on the > What does the stack trace look like? awt_Lock comes from java libs. Can you post the offensive code and also include a copy of the vtkPanel you are using? Is this vtk4.2? -Jeff >vtk mailing list led me to try putting a > >'protected vtkPanel renPanel = new vtkPanel();' > >just before. This then causes the error message >'...libvtkRenderingJava.so: >/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: awt_Lock > >and a search for 'awt_Lock' doesn't find much, the most relevant maybe >http://www.thalion-graphics.de/jgraph/doc/devel/graph3d-jniconstraints.html > >All the other vtk libraries do not generate complaints from matlab, so the >problem really seems to come from >System.loadLibrary("vtkRenderingJava"); > >I greped the vtk source for 'awt', but I'm not sure what to look for, I >also ldd'ed the libraries, this looks ok. >I'm not an everyday user of java, so maybe I'm missing something? > >Versions: >linux: RH 7.1, 2.4.7-10 >java: jdk1.4.1 >matlab: 6.5r13, >typing version -java in matlab produces 'Java 1.3.1 with Blackdown >Java-Linux Team Java HotSpot(TM) Server VM' >I noticed in vtkJavaAwt.h 'awt.version = JAWT_VERSION_1_3;' >could it be a version problem? > >any suggestion welcome...and sorry as I realise that it is as much a java >question as a vtk one. > >P. Batchelor > > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > From philipp.batchelor at kcl.ac.uk Fri Apr 4 13:53:48 2003 From: philipp.batchelor at kcl.ac.uk (philipp.batchelor at kcl.ac.uk) Date: Fri, 4 Apr 2003 19:53:48 +0100 (BST) Subject: [vtkusers] awt_Lock In-Reply-To: <3E8DCD83.5000004@cdnorthamerica.com> Message-ID: > > > What does the stack trace look like? awt_Lock comes from java libs. > Can you post the offensive code and also include a copy of the vtkPanel > you are using? Is this vtk4.2? > -Jeff > Yes, sorry, vtk 4.2, (gcc 3.2). In matlab, the whole error message is: >h = javaObject('HelloWorldApp') ??? Error using ==> javaObject Java exception occurred: java.lang.UnsatisfiedLinkError: /projects/vtk/linux2.2/vtkNightly/VTK-4.2.1/bin/libvtkRenderingJava.so: /usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: awt_Lock at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306) at java.lang.Runtime.loadLibrary0(Runtime.java:749) at java.lang.System.loadLibrary(System.java:820) at vtk.vtkPanel.(vtkPanel.java:31) at HelloWorldApp.(HelloWorldApp.java:22). The HelloWorldApp.java is import vtk.*; public class HelloWorldApp { public HelloWorldApp() {System.out.println("Hello Yalin!"); }; public static void hello() { System.out.println("Hello World! 2"); //Display the string. } protected vtkPanel renPanel = new vtkPanel(); } Without the vtkPanel line, matlab runs the class as expected. Doing System.loadLibrary("vtkRenderingJava"); leads to the same error message. Cheers, P > >vtk mailing list led me to try putting a > > > >'protected vtkPanel renPanel = new vtkPanel();' > > > >just before. This then causes the error message > >'...libvtkRenderingJava.so: > >/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: awt_Lock > > > >and a search for 'awt_Lock' doesn't find much, the most relevant maybe > >http://www.thalion-graphics.de/jgraph/doc/devel/graph3d-jniconstraints.html > > > >All the other vtk libraries do not generate complaints from matlab, so the > >problem really seems to come from > >System.loadLibrary("vtkRenderingJava"); > > > >I greped the vtk source for 'awt', but I'm not sure what to look for, I > >also ldd'ed the libraries, this looks ok. > >I'm not an everyday user of java, so maybe I'm missing something? > > > >Versions: > >linux: RH 7.1, 2.4.7-10 > >java: jdk1.4.1 > >matlab: 6.5r13, > >typing version -java in matlab produces 'Java 1.3.1 with Blackdown > >Java-Linux Team Java HotSpot(TM) Server VM' > >I noticed in vtkJavaAwt.h 'awt.version = JAWT_VERSION_1_3;' > >could it be a version problem? > > > >any suggestion welcome...and sorry as I realise that it is as much a java > >question as a vtk one. > > > >P. Batchelor > > > > > >_______________________________________________ > >This is the private VTK discussion list. > >Please keep messages on-topic. Check the FAQ at: > >Follow this link to subscribe/unsubscribe: > >http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From jeff at cdnorthamerica.com Fri Apr 4 14:09:16 2003 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Fri, 04 Apr 2003 14:09:16 -0500 Subject: [vtkusers] awt_Lock In-Reply-To: References: Message-ID: <3E8DD85C.7010205@cdnorthamerica.com> did you compile vtk yourself, or are you using a nightly? it looks odd that matlab is running a 1.3.1 jvm and you are using vtk binaries linked against java1.4.1. have you tried any of the java examples that came with vtk? -Jeff philipp.batchelor at kcl.ac.uk wrote: >>What does the stack trace look like? awt_Lock comes from java libs. >>Can you post the offensive code and also include a copy of the vtkPanel >>you are using? Is this vtk4.2? >>-Jeff >> >> >> > >Yes, sorry, vtk 4.2, (gcc 3.2). >In matlab, the whole error message is: > > > >>h = javaObject('HelloWorldApp') >> >> >??? Error using ==> javaObject >Java exception occurred: >java.lang.UnsatisfiedLinkError: >/projects/vtk/linux2.2/vtkNightly/VTK-4.2.1/bin/libvtkRenderingJava.so: >/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: >awt_Lock > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306) > at java.lang.Runtime.loadLibrary0(Runtime.java:749) > at java.lang.System.loadLibrary(System.java:820) > at vtk.vtkPanel.(vtkPanel.java:31) > at HelloWorldApp.(HelloWorldApp.java:22). > > >The HelloWorldApp.java is > >import vtk.*; >public class HelloWorldApp { > public HelloWorldApp() {System.out.println("Hello Yalin!"); }; > public static void hello() { > System.out.println("Hello World! 2"); //Display the string. > } > protected vtkPanel renPanel = new vtkPanel(); > >} > > >Without the vtkPanel line, matlab runs the class as expected. >Doing System.loadLibrary("vtkRenderingJava"); leads to the same error >message. >Cheers, >P > > > >>vtk >> >> >mailing list led me to try putting a > > > > >>>'protected vtkPanel renPanel = new vtkPanel();' >>> >>>just before. This then causes the error message >>>'...libvtkRenderingJava.so: >>>/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: awt_Lock >>> >>>and a search for 'awt_Lock' doesn't find much, the most relevant maybe >>>http://www.thalion-graphics.de/jgraph/doc/devel/graph3d-jniconstraints.html >>> >>>All the other vtk libraries do not generate complaints from matlab, so the >>>problem really seems to come from >>>System.loadLibrary("vtkRenderingJava"); >>> >>>I greped the vtk source for 'awt', but I'm not sure what to look for, I >>>also ldd'ed the libraries, this looks ok. >>>I'm not an everyday user of java, so maybe I'm missing something? >>> >>>Versions: >>>linux: RH 7.1, 2.4.7-10 >>>java: jdk1.4.1 >>>matlab: 6.5r13, >>>typing version -java in matlab produces 'Java 1.3.1 with Blackdown >>>Java-Linux Team Java HotSpot(TM) Server VM' >>>I noticed in vtkJavaAwt.h 'awt.version = JAWT_VERSION_1_3;' >>>could it be a version problem? >>> >>>any suggestion welcome...and sorry as I realise that it is as much a java >>>question as a vtk one. >>> >>>P. Batchelor >>> >>> >>>_______________________________________________ >>>This is the private VTK discussion list. >>>Please keep messages on-topic. Check the FAQ at: >>>Follow this link to subscribe/unsubscribe: >>>http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> >>> >>_______________________________________________ >>This is the private VTK discussion list. >>Please keep messages on-topic. Check the FAQ at: >>Follow this link to subscribe/unsubscribe: >>http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > From philipp.batchelor at kcl.ac.uk Fri Apr 4 14:22:26 2003 From: philipp.batchelor at kcl.ac.uk (philipp.batchelor at kcl.ac.uk) Date: Fri, 4 Apr 2003 20:22:26 +0100 (BST) Subject: [vtkusers] awt_Lock In-Reply-To: <3E8DD85C.7010205@cdnorthamerica.com> Message-ID: I did compile vtk myself, and used the java on our system. Matlab was installed on our system, it comes with its own jvm. I wasn't able to get Matlab to use 1.4.1, normally there is an env variable called MATLAB_JAVA for this, but matlab doesn't start if I set it to 1.4.1. But the fact that the java example without vtkPanel works seems to imply that it is not the main issue. I did test Cone.java, which worked fine, I'll try more examples P On Fri, 4 Apr 2003, Jeff Lee wrote: > did you compile vtk yourself, or are you using a nightly? it looks odd > that matlab is running a 1.3.1 jvm and you are using vtk binaries linked > against java1.4.1. have you tried any of the java examples that came > with vtk? > -Jeff > > philipp.batchelor at kcl.ac.uk wrote: > > >>What does the stack trace look like? awt_Lock comes from java libs. > >>Can you post the offensive code and also include a copy of the vtkPanel > >>you are using? Is this vtk4.2? > >>-Jeff > >> > >> > >> > > > >Yes, sorry, vtk 4.2, (gcc 3.2). > >In matlab, the whole error message is: > > > > > > > >>h = javaObject('HelloWorldApp') > >> > >> > >??? Error using ==> javaObject > >Java exception occurred: > >java.lang.UnsatisfiedLinkError: > >/projects/vtk/linux2.2/vtkNightly/VTK-4.2.1/bin/libvtkRenderingJava.so: > >/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: > >awt_Lock > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382) > > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306) > > at java.lang.Runtime.loadLibrary0(Runtime.java:749) > > at java.lang.System.loadLibrary(System.java:820) > > at vtk.vtkPanel.(vtkPanel.java:31) > > at HelloWorldApp.(HelloWorldApp.java:22). > > > > > >The HelloWorldApp.java is > > > >import vtk.*; > >public class HelloWorldApp { > > public HelloWorldApp() {System.out.println("Hello Yalin!"); }; > > public static void hello() { > > System.out.println("Hello World! 2"); //Display the string. > > } > > protected vtkPanel renPanel = new vtkPanel(); > > > >} > > > > > >Without the vtkPanel line, matlab runs the class as expected. > >Doing System.loadLibrary("vtkRenderingJava"); leads to the same error > >message. > >Cheers, > >P > > > > > > > >>vtk > >> > >> > >mailing list led me to try putting a > > > > > > > >>>'protected vtkPanel renPanel = new vtkPanel();' > >>> > >>>just before. This then causes the error message > >>>'...libvtkRenderingJava.so: > >>>/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: awt_Lock > >>> > >>>and a search for 'awt_Lock' doesn't find much, the most relevant maybe > >>>http://www.thalion-graphics.de/jgraph/doc/devel/graph3d-jniconstraints.html > >>> > >>>All the other vtk libraries do not generate complaints from matlab, so the > >>>problem really seems to come from > >>>System.loadLibrary("vtkRenderingJava"); > >>> > >>>I greped the vtk source for 'awt', but I'm not sure what to look for, I > >>>also ldd'ed the libraries, this looks ok. > >>>I'm not an everyday user of java, so maybe I'm missing something? > >>> > >>>Versions: > >>>linux: RH 7.1, 2.4.7-10 > >>>java: jdk1.4.1 > >>>matlab: 6.5r13, > >>>typing version -java in matlab produces 'Java 1.3.1 with Blackdown > >>>Java-Linux Team Java HotSpot(TM) Server VM' > >>>I noticed in vtkJavaAwt.h 'awt.version = JAWT_VERSION_1_3;' > >>>could it be a version problem? > >>> > >>>any suggestion welcome...and sorry as I realise that it is as much a java > >>>question as a vtk one. > >>> > >>>P. Batchelor > >>> > >>> > >>>_______________________________________________ > >>>This is the private VTK discussion list. > >>>Please keep messages on-topic. Check the FAQ at: > >>>Follow this link to subscribe/unsubscribe: > >>>http://public.kitware.com/mailman/listinfo/vtkusers > >>> > >>> > >>> > >>> > >>> > >>_______________________________________________ > >>This is the private VTK discussion list. > >>Please keep messages on-topic. Check the FAQ at: > >>Follow this link to subscribe/unsubscribe: > >>http://public.kitware.com/mailman/listinfo/vtkusers > >> > >> > >> > > > >_______________________________________________ > >This is the private VTK discussion list. > >Please keep messages on-topic. Check the FAQ at: > >Follow this link to subscribe/unsubscribe: > >http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From jbiddiscombe at skippingmouse.co.uk Fri Apr 4 05:50:41 2003 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Fri, 4 Apr 2003 11:50:41 +0100 Subject: [vtkusers] vtkImageMapper error References: <49AA3A3C863E5B4C911320AEF99E5DA3039CA6F1-100001@wing-ep.tip.csiro.au> Message-ID: <001a01c2fa98$09cb0bf0$0100a8c0@tigger> No. Don't use RenderToRectangleOn unless you are requesting a specific region of the screen // Description: // If RenderToRectangle is set (by default not), then the imagemapper // will render the image into the rectangle supplied by the Actor2D's // PositionCoordinate and Position2Coordinate if you haven't explicitly set position and position2 then don't use it. JB ----- Original Message ----- From: "Neil Killeen" To: Sent: Wednesday, April 02, 2003 4:39 AM Subject: [vtkusers] vtkImageMapper error > Hello > > some time ago, our student posted a message > > http://public.kitware.com/pipermail/vtkusers/2003-February/016105.html > > requesting help with vtkImageMapper. > > He received no reply, and the problem still exists in VTK 4.2 > > The enclosed test program, stretch.cxx, will generate a Bus Error under > Solaris. Under Linux, where he was working, the behaviour was > un-useful (see message above). > > Run the program with the provided jpg image as input. > > ./stretch tycho.jpg > > > The basic function causing the trouble is > > vtkImageMapper::RenderToRectangleOn(); > > when this function call is commented out, the program runs successfully. > We assume his usage of the funciton is correct but would be delighted > to learn otherwise ! > > > Would somebody respond please ? > > thanks > Neil Killeen > > > > > // stretch.cxx > > #include > #include > #include > #include > #include > #include > #include > #include > > #include > #include > using namespace std; > > #define WINWIDTH 300 > #define WINHEIGHT 300 > > int main(int argc, char **argv) > { > int dims[3]; > > vtkJPEGReader *jpeg = vtkJPEGReader::New();{ > jpeg->SetFileName(argv[1]); > jpeg->Update(); > jpeg->GetOutput()->GetDimensions(dims); > } > vtkImageMapper *mapper = vtkImageMapper::New();{ > mapper->SetInput(jpeg->GetOutput()); > mapper->RenderToRectangleOn(); // Trouble maker > } > > vtkActor2D *actor = vtkActor2D::New();{ > actor->SetMapper(mapper); > actor->GetPosition2Coordinate()->SetCoordinateSystemToViewport(); > actor->SetPosition(0,0); > actor->SetPosition2(dims[0],dims[1]); > } > > vtkRenderer *ren = vtkRenderer::New();{ > ren->AddActor(actor); > } > > vtkRenderWindow *win = vtkRenderWindow::New();{ > win->AddRenderer(ren); > win->SetSize(dims[0],dims[1]); > } > > vtkRenderWindowInteractor *rwi = vtkRenderWindowInteractor::New();{ > rwi->SetRenderWindow(win); > rwi->Start(); > } > > return 0; > } > > > > From massimo.ivani at mlsw.com Thu Apr 3 12:28:44 2003 From: massimo.ivani at mlsw.com (Massimo Ivani) Date: Thu, 3 Apr 2003 19:28:44 +0200 Subject: [vtkusers] how to get point connection Message-ID: <005301c2fa06$7adf2f70$f254dfd9@compaq> Hello vtk users, I cutted (using vtkCutter) a cylinder with a plane (vtkPlane), so I got a vtkPolyData who is the intersection. I would like to get lines who connect single points of this intersection. I can read single points using GetPoint function but points are not in sequence so when I connect a point to another I have strange result. How can I know connection between two points. Thank you in advance Dr. Massimo Ivani Media Lab Software Tel.: +39 0187 517775 Fax: +39 0187 511833 massimo.ivani at mlsw.com www.mlsw.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From massimo.ivani at mlsw.com Fri Apr 4 02:12:50 2003 From: massimo.ivani at mlsw.com (Massimo Ivani) Date: Fri, 4 Apr 2003 09:12:50 +0200 Subject: [vtkusers] how to get point connection Message-ID: <004a01c2fa79$9b890430$f254dfd9@compaq> Hello vtk users, I cutted (using vtkCutter) a cylinder with a plane (vtkPlane), so I have a vtkPolyData who is the intersection. I would like to get lines who connect single points of this intersection. I can read single points using GetPoint function but points are not in sequence so when I connect a point to another I have strange result. How can I know connection between two points. Thank you in advance Dr. Massimo Ivani Media Lab Software Tel.: +39 0187 517775 Fax: +39 0187 511833 massimo.ivani at mlsw.com www.mlsw.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From apbai at yahoo.com Fri Apr 4 15:09:22 2003 From: apbai at yahoo.com (P Bai) Date: Fri, 4 Apr 2003 12:09:22 -0800 (PST) Subject: [vtkusers] Memory usage increased after vtkDecimatePro filtering?? Message-ID: <20030404200922.66546.qmail@web13102.mail.yahoo.com> Hi all, I've been playing with vtkDecimatePro lately in my project. I can clearly see from the rendering result that the number of triangles are reduced a lot. But to my surprise, I noticed that the memory usage was actually increased comparing to not doing decimation. I'm using vtk 4.2 with VC++ 6.0 on Windows NT. Here's what my code looks like - // someline is a huge and complicated line polydata vtkTubeFilter* tube = vtkTubeFilter::New(); tube->SetNumberOfSides(8); tube->SetInput(someline); tube->SetRadius(0.25); vtkTriangleFilter* triangleFilter = vtkTriangleFilter::New(); triangleFilter->SetInput(tube->GetOutput()); vtkDecimatePro* decimate = vtkDecimatePro::New(); decimate->SetInput(triangleFilter->GetOutput()); decimate->SetTargetReduction(0.8); mapper->SetInput(decimate->GetOutput()); decimate->Delete(); triangleFilter->Delete(); tube->Delete(); Did I do any wrong? Many thanks, Ping __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com From jeff at cdnorthamerica.com Fri Apr 4 15:15:31 2003 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Fri, 04 Apr 2003 15:15:31 -0500 Subject: [vtkusers] awt_Lock In-Reply-To: References: Message-ID: <3E8DE7E3.3090508@cdnorthamerica.com> philipp.batchelor at kcl.ac.uk wrote: >I did compile vtk myself, and used the java on our system. Matlab was >installed on our system, it comes with its own jvm. I wasn't able >to get Matlab to use 1.4.1, normally there is an env variable called >MATLAB_JAVA for this, but matlab doesn't start if I set it to 1.4.1. But >the fact that the java example without vtkPanel works seems to imply that >it is not the main issue. > It seems to be the main issue for me - your original "hello world" example did no graphics or jawt drawing. I suspect that your build of vtk with java1.4.1 headers is somehow conflicting with the 1.3.1 jvm. Perhaps if you tried compiling vtk against jdk1.3.1 this might go away.... >I did test Cone.java, which worked fine, I'll try more examples > inside matlab, or from the command-line? -Jeff > >P > > On Fri, 4 Apr 2003, Jeff Lee wrote: > > > >>did you compile vtk yourself, or are you using a nightly? it looks odd >>that matlab is running a 1.3.1 jvm and you are using vtk binaries linked >>against java1.4.1. have you tried any of the java examples that came >>with vtk? >>-Jeff >> >>philipp.batchelor at kcl.ac.uk wrote: >> >> >> >>>>What does the stack trace look like? awt_Lock comes from java libs. >>>>Can you post the offensive code and also include a copy of the vtkPanel >>>>you are using? Is this vtk4.2? >>>>-Jeff >>>> >>>> >>>> >>>> >>>> >>>Yes, sorry, vtk 4.2, (gcc 3.2). >>>In matlab, the whole error message is: >>> >>> >>> >>> >>> >>>>h = javaObject('HelloWorldApp') >>>> >>>> >>>> >>>> >>>??? Error using ==> javaObject >>>Java exception occurred: >>>java.lang.UnsatisfiedLinkError: >>>/projects/vtk/linux2.2/vtkNightly/VTK-4.2.1/bin/libvtkRenderingJava.so: >>>/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: >>>awt_Lock >>> at java.lang.ClassLoader$NativeLibrary.load(Native Method) >>> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382) >>> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306) >>> at java.lang.Runtime.loadLibrary0(Runtime.java:749) >>> at java.lang.System.loadLibrary(System.java:820) >>> at vtk.vtkPanel.(vtkPanel.java:31) >>> at HelloWorldApp.(HelloWorldApp.java:22). >>> >>> >>>The HelloWorldApp.java is >>> >>>import vtk.*; >>>public class HelloWorldApp { >>> public HelloWorldApp() {System.out.println("Hello Yalin!"); }; >>> public static void hello() { >>> System.out.println("Hello World! 2"); //Display the string. >>> } >>> protected vtkPanel renPanel = new vtkPanel(); >>> >>>} >>> >>> >>>Without the vtkPanel line, matlab runs the class as expected. >>>Doing System.loadLibrary("vtkRenderingJava"); leads to the same error >>>message. >>>Cheers, >>>P >>> >>> >>> >>> >>> >>>>vtk >>>> >>>> >>>> >>>> >>>mailing list led me to try putting a > > >>> >>> >>> >>> >>>>>'protected vtkPanel renPanel = new vtkPanel();' >>>>> >>>>>just before. This then causes the error message >>>>>'...libvtkRenderingJava.so: >>>>>/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: awt_Lock >>>>> >>>>>and a search for 'awt_Lock' doesn't find much, the most relevant maybe >>>>>http://www.thalion-graphics.de/jgraph/doc/devel/graph3d-jniconstraints.html >>>>> >>>>>All the other vtk libraries do not generate complaints from matlab, so the >>>>>problem really seems to come from >>>>>System.loadLibrary("vtkRenderingJava"); >>>>> >>>>>I greped the vtk source for 'awt', but I'm not sure what to look for, I >>>>>also ldd'ed the libraries, this looks ok. >>>>>I'm not an everyday user of java, so maybe I'm missing something? >>>>> >>>>>Versions: >>>>>linux: RH 7.1, 2.4.7-10 >>>>>java: jdk1.4.1 >>>>>matlab: 6.5r13, >>>>>typing version -java in matlab produces 'Java 1.3.1 with Blackdown >>>>>Java-Linux Team Java HotSpot(TM) Server VM' >>>>>I noticed in vtkJavaAwt.h 'awt.version = JAWT_VERSION_1_3;' >>>>>could it be a version problem? >>>>> >>>>>any suggestion welcome...and sorry as I realise that it is as much a java >>>>>question as a vtk one. >>>>> >>>>>P. Batchelor >>>>> >>>>> >>>>>_______________________________________________ >>>>>This is the private VTK discussion list. >>>>>Please keep messages on-topic. Check the FAQ at: >>>>>Follow this link to subscribe/unsubscribe: >>>>>http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>_______________________________________________ >>>>This is the private VTK discussion list. >>>>Please keep messages on-topic. Check the FAQ at: >>>>Follow this link to subscribe/unsubscribe: >>>>http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>>> >>>> >>>> >>>_______________________________________________ >>>This is the private VTK discussion list. >>>Please keep messages on-topic. Check the FAQ at: >>>Follow this link to subscribe/unsubscribe: >>>http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> >>> >>_______________________________________________ >>This is the private VTK discussion list. >>Please keep messages on-topic. Check the FAQ at: >>Follow this link to subscribe/unsubscribe: >>http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > From c.p.botha at its.tudelft.nl Fri Apr 4 15:15:53 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Fri, 4 Apr 2003 22:15:53 +0200 Subject: [vtkusers] how to get point connection In-Reply-To: <005301c2fa06$7adf2f70$f254dfd9@compaq> References: <005301c2fa06$7adf2f70$f254dfd9@compaq> Message-ID: <20030404201553.GA11879@dutidad.twi.tudelft.nl> On Thu, Apr 03, 2003 at 07:28:44PM +0200, Massimo Ivani wrote: > I cutted (using vtkCutter) a cylinder with a plane (vtkPlane), so I got a > vtkPolyData who is the intersection. I would like to get lines who connect > single points of this intersection. I can read single points using GetPoint > function but points are not in sequence so when I connect a point to another Have a look at the ClipCow example that ships with VTK. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From matei.mancas at tcts.fpms.ac.be Fri Apr 4 06:30:39 2003 From: matei.mancas at tcts.fpms.ac.be (Matei MANCAS) Date: Fri, 4 Apr 2003 13:30:39 +0200 Subject: [vtkusers] extent, spacing and origin propagation problem through filters Message-ID: <009d01c2fa9d$9e88f360$0f0910ac@Surprise> Hi, all! I thought that if first I have a ImageData having some extent, spacing, etc and than if I applay a filter on it, I will keep the same extent and spacing... But it seems to be wrong! I have the following example : int a,z,e,r,t,y; data->VolReader->GetExtent(a,z,e,r,t,y); //here I have the good Z extent (0 100) (VolReader is a vtkImageData) vtkImageShiftScale *my_shift = vtkImageShiftScale::New(); //a filter my_shift->SetInput(data->VolReader); my_shift->SetScale(my_shift->GetScale()/256.0); my_shift->SetOutputScalarTypeToUnsignedChar(); data->VolReader=my_shift->GetOutput(); // I have the same bad results using DeepCopy method... data->VolReader->GetExtent(a,z,e,r,t,y); //here I have a bad Z extent (0 -1) my_shift->GetOutput()->GetExtent(a,z,e,r,t,y); //here I have a bad Z extent too : (0 -1) my_shift->GetInput()->GetExtent(a,z,e,r,t,y); //here I have the good Z extent (0 100) This problem seems to be common to all vtkImageToImageFilter, so I would really need help on this subject : I would want to apply to a vtkImageData one or more filters before rendering it. I really thanks you a lot for your help!!! Matei -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.p.botha at its.tudelft.nl Fri Apr 4 15:50:45 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Fri, 4 Apr 2003 22:50:45 +0200 Subject: [vtkusers] extent, spacing and origin propagation problem through filters In-Reply-To: <009d01c2fa9d$9e88f360$0f0910ac@Surprise> References: <009d01c2fa9d$9e88f360$0f0910ac@Surprise> Message-ID: <20030404205045.GB11879@dutidad.twi.tudelft.nl> On Fri, Apr 04, 2003 at 01:30:39PM +0200, Matei MANCAS wrote: > int a,z,e,r,t,y; > data->VolReader->GetExtent(a,z,e,r,t,y); //here I have the good Z extent (0 100) (VolReader is a vtkImageData) > > vtkImageShiftScale *my_shift = vtkImageShiftScale::New(); //a filter > my_shift->SetInput(data->VolReader); > my_shift->SetScale(my_shift->GetScale()/256.0); > my_shift->SetOutputScalarTypeToUnsignedChar(); > > data->VolReader=my_shift->GetOutput(); // I have the same bad results using DeepCopy method... > What results do you get if you call my_shift->Update() BEFORE you do the following calls to GetExtent()? > data->VolReader->GetExtent(a,z,e,r,t,y); //here I have a bad Z extent (0 -1) > > my_shift->GetOutput()->GetExtent(a,z,e,r,t,y); //here I have a bad Z extent too : (0 -1) > my_shift->GetInput()->GetExtent(a,z,e,r,t,y); //here I have the good Z extent (0 100) -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From jbiddiscombe at skippingmouse.co.uk Fri Apr 4 19:11:46 2003 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Sat, 5 Apr 2003 01:11:46 +0100 Subject: [vtkusers] vtkImageMapper error References: <49AA3A3C863E5B4C911320AEF99E5DA3039CA6F1-100001@wing-ep.tip.csiro.au> Message-ID: <001d01c2fb08$08ba1c40$0100a8c0@tigger> Yes. There's a bug in the render to rectangle code. What's happening is that the render to rectangle is scaling the image correctly, but unbeknown to it, the image mapper base class has "cropped" the extents of the visible image before the rectangle scaling is applied. Hence it gets the scaling wrong and as the screen size drops below the image size an error is apparent. It doesn't happen when the screen size is bigger than the image because no cropping occurs. A fix you can use temporarily is to mapper->SetRenderToRectangle(1); mapper->SetUseCustomExtents(1); int ex[4] = { 0, dims[0]-1, 0, dims[1]-1 }; mapper->SetCustomDisplayExtents(ex); now we've fixed the extents that are displayed to the limits of the image and nomatter what happens, the correct pixels are being used, and the scaling is preserved. it may take me a while to fix this bug, so perhaps a short term solution is to alter the docs to tell the user to use custom extents (which is what I always do and why I've never noticed the bug) Thanks for pointing it out JB ----- Original Message ----- From: "Neil Killeen" To: Sent: Wednesday, April 02, 2003 4:39 AM Subject: [vtkusers] vtkImageMapper error > Hello > > some time ago, our student posted a message > > http://public.kitware.com/pipermail/vtkusers/2003-February/016105.html > > requesting help with vtkImageMapper. > > He received no reply, and the problem still exists in VTK 4.2 > > The enclosed test program, stretch.cxx, will generate a Bus Error under > Solaris. Under Linux, where he was working, the behaviour was > un-useful (see message above). > > Run the program with the provided jpg image as input. > > ./stretch tycho.jpg > > > The basic function causing the trouble is > > vtkImageMapper::RenderToRectangleOn(); > > when this function call is commented out, the program runs successfully. > We assume his usage of the funciton is correct but would be delighted > to learn otherwise ! > > > Would somebody respond please ? > > thanks > Neil Killeen > > > > > // stretch.cxx > > #include > #include > #include > #include > #include > #include > #include > #include > > #include > #include > using namespace std; > > #define WINWIDTH 300 > #define WINHEIGHT 300 > > int main(int argc, char **argv) > { > int dims[3]; > > vtkJPEGReader *jpeg = vtkJPEGReader::New();{ > jpeg->SetFileName(argv[1]); > jpeg->Update(); > jpeg->GetOutput()->GetDimensions(dims); > } > vtkImageMapper *mapper = vtkImageMapper::New();{ > mapper->SetInput(jpeg->GetOutput()); > mapper->RenderToRectangleOn(); // Trouble maker > } > > vtkActor2D *actor = vtkActor2D::New();{ > actor->SetMapper(mapper); > actor->GetPosition2Coordinate()->SetCoordinateSystemToViewport(); > actor->SetPosition(0,0); > actor->SetPosition2(dims[0],dims[1]); > } > > vtkRenderer *ren = vtkRenderer::New();{ > ren->AddActor(actor); > } > > vtkRenderWindow *win = vtkRenderWindow::New();{ > win->AddRenderer(ren); > win->SetSize(dims[0],dims[1]); > } > > vtkRenderWindowInteractor *rwi = vtkRenderWindowInteractor::New();{ > rwi->SetRenderWindow(win); > rwi->Start(); > } > > return 0; > } > > > > From pjc at hootenanny.org Fri Apr 4 19:24:11 2003 From: pjc at hootenanny.org (Peter J Carr) Date: Fri, 4 Apr 2003 19:24:11 -0500 Subject: [vtkusers] java wrapping macos x, jdk 1.4 Message-ID: has anyone gotten java wrapping working on MacOS X? If so please let me know which version of vtk, java, and mac os x you are using. Please send a CMakeCache.txt file so I can test on my system. I would like to use a gui i have already developed in java but use vtk for rendering within a java.awt.Canvas or javax.swing.JPanel. at the moment I am using the latest release of vtk from cvs and Java 1.4.1. I had to make some changes to VTK/Common/vtkJavaAwt.h in order for it to compile. I will send the modified file if there is interest. when i run the java examples I am not able to use vtkRenderWindowInteractor. The test program (Examples/Tutorial/Step5/Java/Cone5.java) compiles and runs, but nothing shows up in the render window. i am just about to start tracking down the problem: - is it a problem with JNI on the Mac? - is it a problem with AWT or Swing threads and VTK threads? this is new information (and a lot of info to digest just to get a cone on the screen). i appreciate any pointers. especially some hints for tracking down the problem. thanks, peter carr p.s. does anyone know how to uninstall java 1.4.1 on the mac? From dean.inglis at on.aibn.com Fri Apr 4 19:51:43 2003 From: dean.inglis at on.aibn.com (dean.inglis at on.aibn.com) Date: Fri, 4 Apr 2003 19:51:43 -0500 Subject: [vtkusers] picking in a view of a vtkImagePlaneWidget Message-ID: <20030405005142.NMQR4086.tomts23-srv.bellnexxia.net@[209.226.175.134]> John, with vtkPropPicker, did you try something like init: PropPicker->InitializePickList(); PropPicker->AddPickList(Prop); useage: if( !PropPicker->PickProp(X,Y,CurrentRenderer) ){ return; } if( Prop != this->PropPicker->GetProp() ){ return; } float pos[3]; PropPicker->GetPickPosition(pos); I have used this scheme to successfully pick on an vtkImageActor. There may need to be a trasformation involved to change pos into something you could look up into the origina image data. Dean From jbiddiscombe at skippingmouse.co.uk Fri Apr 4 05:52:30 2003 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Fri, 4 Apr 2003 11:52:30 +0100 Subject: [vtkusers] vtkImageMapper error References: <49AA3A3C863E5B4C911320AEF99E5DA3039CA6F1-100001@wing-ep.tip.csiro.au> Message-ID: <002001c2fa98$4b184550$0100a8c0@tigger> Sorry, I see you have set it to use position and position2. I will try your code and see what's wrong. JB ----- Original Message ----- From: "Neil Killeen" To: Sent: Wednesday, April 02, 2003 4:39 AM Subject: [vtkusers] vtkImageMapper error > Hello > > some time ago, our student posted a message > > http://public.kitware.com/pipermail/vtkusers/2003-February/016105.html > > requesting help with vtkImageMapper. > > He received no reply, and the problem still exists in VTK 4.2 > > The enclosed test program, stretch.cxx, will generate a Bus Error under > Solaris. Under Linux, where he was working, the behaviour was > un-useful (see message above). > > Run the program with the provided jpg image as input. > > ./stretch tycho.jpg > > > The basic function causing the trouble is > > vtkImageMapper::RenderToRectangleOn(); > > when this function call is commented out, the program runs successfully. > We assume his usage of the funciton is correct but would be delighted > to learn otherwise ! > > > Would somebody respond please ? > > thanks > Neil Killeen > > > > > // stretch.cxx > > #include > #include > #include > #include > #include > #include > #include > #include > > #include > #include > using namespace std; > > #define WINWIDTH 300 > #define WINHEIGHT 300 > > int main(int argc, char **argv) > { > int dims[3]; > > vtkJPEGReader *jpeg = vtkJPEGReader::New();{ > jpeg->SetFileName(argv[1]); > jpeg->Update(); > jpeg->GetOutput()->GetDimensions(dims); > } > vtkImageMapper *mapper = vtkImageMapper::New();{ > mapper->SetInput(jpeg->GetOutput()); > mapper->RenderToRectangleOn(); // Trouble maker > } > > vtkActor2D *actor = vtkActor2D::New();{ > actor->SetMapper(mapper); > actor->GetPosition2Coordinate()->SetCoordinateSystemToViewport(); > actor->SetPosition(0,0); > actor->SetPosition2(dims[0],dims[1]); > } > > vtkRenderer *ren = vtkRenderer::New();{ > ren->AddActor(actor); > } > > vtkRenderWindow *win = vtkRenderWindow::New();{ > win->AddRenderer(ren); > win->SetSize(dims[0],dims[1]); > } > > vtkRenderWindowInteractor *rwi = vtkRenderWindowInteractor::New();{ > rwi->SetRenderWindow(win); > rwi->Start(); > } > > return 0; > } > > > > From jimandr at hotmail.com Sat Apr 5 02:46:25 2003 From: jimandr at hotmail.com (Dimitris Andritsos) Date: Sat, 05 Apr 2003 10:46:25 +0300 Subject: [vtkusers] Implicit functions rendering using an octree Message-ID: Hello everyone, I am a new user to VTK and I would like your help. I am designing a programm that takes as input implicit functions (in the form of an equation), parses and evaluates them. During the evaluation phase, an octree data structure is constructed and I want to use VTK to view the surface. How should this be done? I tried using marching cubes and although it works, because vtkImage data have to be used, the number of evaluations is very big and the time it takes to render the surfaces is prohibitive. Can another type of data set be used with the octree and marching cubes or any other contouring class of Vtk? The octree uses the cube as the basic voxel. The problem associated with the octree, as I understand it, is that I end up with cubes of various sizes and this is why I can't use marching cubes. I would really appreciate any help on this problem. It is not mandatory that I have to go with the octree so any other suggestion is welcome. I am thinking of the octree for performance efficiency reasons. Thanks a lot in advance, Jimmy _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail From aborsic at sc-aip.com Sat Apr 5 06:16:49 2003 From: aborsic at sc-aip.com (aborsic at sc-aip.com) Date: Sat, 05 Apr 2003 13:16:49 +0200 (CEST) Subject: [vtkusers] PYTHON_UTIL_LIBRARY-NOTFOUND Message-ID: <1049541409.3e8ebb21eb4cd@www.sc-aip.com> Dear All, I'm having the same problem encoutered by an other user on the list: I'm trying to build VTK 4.2.1 on a windows Xp machine with Visual Studio 7.0 and Python 2.1. When configuring the build, cmake complains about PYTHON_UTIL_LIBRARY NOT FOUND, and the build is not allowed. I will be thankfull for any suggestion, Regards, Andrea. From philipp.batchelor at kcl.ac.uk Sat Apr 5 09:20:17 2003 From: philipp.batchelor at kcl.ac.uk (philipp.batchelor at kcl.ac.uk) Date: Sat, 5 Apr 2003 15:20:17 +0100 (BST) Subject: [vtkusers] awt_Lock In-Reply-To: <3E8DE7E3.3090508@cdnorthamerica.com> Message-ID: I tried Cone.java on the command line where it works, in Matlab it doesn't (Matlab claims not to find the class), but as Cone.java has a 'main' method, it is not too surprising. I tried again the other route, i.e. to force matlab to use jdk1.4.1, but it hangs, so I suppose I'll have to try to recompile vtk with 1.3.1. But this raises one question, does vtk need jre, or full jdk? (well, I'll find out by trying) Matlab only comes with jre1.3.1. Thanks for inputs already, certainly helps pin down. P On Fri, 4 Apr 2003, Jeff Lee wrote: > > > philipp.batchelor at kcl.ac.uk wrote: > > >I did compile vtk myself, and used the java on our system. Matlab was > >installed on our system, it comes with its own jvm. I wasn't able > >to get Matlab to use 1.4.1, normally there is an env variable called > >MATLAB_JAVA for this, but matlab doesn't start if I set it to 1.4.1. But > >the fact that the java example without vtkPanel works seems to imply that > >it is not the main issue. > > > It seems to be the main issue for me - your original "hello world" > example did no graphics or jawt drawing. I suspect that your build of > vtk with java1.4.1 headers is somehow conflicting with the 1.3.1 jvm. > Perhaps if you tried compiling vtk against jdk1.3.1 this might go away.... > > >I did test Cone.java, which worked fine, I'll try more examples > > > inside matlab, or from the command-line? > -Jeff > > > > >P > > > > On Fri, 4 Apr 2003, Jeff Lee wrote: > > > > > > > >>did you compile vtk yourself, or are you using a nightly? it looks odd > >>that matlab is running a 1.3.1 jvm and you are using vtk binaries linked > >>against java1.4.1. have you tried any of the java examples that came > >>with vtk? > >>-Jeff > >> > >>philipp.batchelor at kcl.ac.uk wrote: > >> > >> > >> > >>>>What does the stack trace look like? awt_Lock comes from java libs. > >>>>Can you post the offensive code and also include a copy of the vtkPanel > >>>>you are using? Is this vtk4.2? > >>>>-Jeff > >>>> > >>>> > >>>> > >>>> > >>>> > >>>Yes, sorry, vtk 4.2, (gcc 3.2). > >>>In matlab, the whole error message is: > >>> > >>> > >>> > >>> > >>> > >>>>h = javaObject('HelloWorldApp') > >>>> > >>>> > >>>> > >>>> > >>>??? Error using ==> javaObject > >>>Java exception occurred: > >>>java.lang.UnsatisfiedLinkError: > >>>/projects/vtk/linux2.2/vtkNightly/VTK-4.2.1/bin/libvtkRenderingJava.so: > >>>/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: > >>>awt_Lock > >>> at java.lang.ClassLoader$NativeLibrary.load(Native Method) > >>> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382) > >>> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306) > >>> at java.lang.Runtime.loadLibrary0(Runtime.java:749) > >>> at java.lang.System.loadLibrary(System.java:820) > >>> at vtk.vtkPanel.(vtkPanel.java:31) > >>> at HelloWorldApp.(HelloWorldApp.java:22). > >>> > >>> > >>>The HelloWorldApp.java is > >>> > >>>import vtk.*; > >>>public class HelloWorldApp { > >>> public HelloWorldApp() {System.out.println("Hello Yalin!"); }; > >>> public static void hello() { > >>> System.out.println("Hello World! 2"); //Display the string. > >>> } > >>> protected vtkPanel renPanel = new vtkPanel(); > >>> > >>>} > >>> > >>> > >>>Without the vtkPanel line, matlab runs the class as expected. > >>>Doing System.loadLibrary("vtkRenderingJava"); leads to the same error > >>>message. > >>>Cheers, > >>>P > >>> > >>> > >>> > >>> > >>> > >>>>vtk > >>>> > >>>> > >>>> > >>>> > >>>mailing list led me to try putting a > > > >>> > >>> > >>> > >>> > >>>>>'protected vtkPanel renPanel = new vtkPanel();' > >>>>> > >>>>>just before. This then causes the error message > >>>>>'...libvtkRenderingJava.so: > >>>>>/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: awt_Lock > >>>>> > >>>>>and a search for 'awt_Lock' doesn't find much, the most relevant maybe > >>>>>http://www.thalion-graphics.de/jgraph/doc/devel/graph3d-jniconstraints.html > >>>>> > >>>>>All the other vtk libraries do not generate complaints from matlab, so the > >>>>>problem really seems to come from > >>>>>System.loadLibrary("vtkRenderingJava"); > >>>>> > >>>>>I greped the vtk source for 'awt', but I'm not sure what to look for, I > >>>>>also ldd'ed the libraries, this looks ok. > >>>>>I'm not an everyday user of java, so maybe I'm missing something? > >>>>> > >>>>>Versions: > >>>>>linux: RH 7.1, 2.4.7-10 > >>>>>java: jdk1.4.1 > >>>>>matlab: 6.5r13, > >>>>>typing version -java in matlab produces 'Java 1.3.1 with Blackdown > >>>>>Java-Linux Team Java HotSpot(TM) Server VM' > >>>>>I noticed in vtkJavaAwt.h 'awt.version = JAWT_VERSION_1_3;' > >>>>>could it be a version problem? > >>>>> > >>>>>any suggestion welcome...and sorry as I realise that it is as much a java > >>>>>question as a vtk one. > >>>>> > >>>>>P. Batchelor > >>>>> From jiafucang at hotmail.com Sat Apr 5 09:26:56 2003 From: jiafucang at hotmail.com (Fucang Jia) Date: Sat, 05 Apr 2003 22:26:56 +0800 Subject: [vtkusers] vtkMesaRenderWindow problem ( related to Mangled Mesa) Message-ID: Hi everyon, I compiled VTK-4.2.1 with mangled mesa on Redhat 8.0. I can run the example VTK/Rendering/Testing/Tcl/MesaText.tcl. But I can not run the script located in VTK/Examples/MangledMesa/Tcl: OffScreenCone.tcl and OffScreenPrinting.tcl. The error is there is no "vtkMesaRenderWindow". I do not know why. I compiled the vtk package according to the Examples/MangledMesa/readme.txt. The Mesa library I used is Mesa-5.0.1. Could you give me some help on this problem? I compile this function mainly for animation , generating a series of png files, then use other software to combine them to a avi file. I could not use vtkRenderWindowToImage to write more than one output file. Could you think there is other way to do animation without mangled mesa? Thank you very much! Best regards! Fucang _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From skboyd at ucalgary.ca Sat Apr 5 10:08:58 2003 From: skboyd at ucalgary.ca (Steven Boyd) Date: Sat, 05 Apr 2003 08:08:58 -0700 Subject: [vtkusers] vtkRenderWindowInteractor controls Message-ID: <3E8EF18A.C6C66D34@ucalgary.ca> Hello, I have two questions regarding the vtkRenderWindowInteractor: 1. How do I set the interactor to "ObjectMode" (i.e., so the actor rotates, not the camera) versus "CameraMode"? I read that I can press the "o" key while interacting, but is it possible to set the default interaction mode to ObjectMode in the source? 2. Can I restrict the mouse interaction to rotations in one plane (i.e., rotation about the Z axis) rather than 3D rotations? Thanks, Steve -- Steven Boyd, PhD Assistant Professor Department of Mechanical and Manufacturing Engineering University of Calgary 2500 University Drive, N.W. Calgary, Alberta, Canada, T2N 1N4 tel. 1.403.220.4173 fax. 1.403.282.8406 skboyd at ucalgary.ca ------------------------------------------------------------------- From vtk at cens.ioc.ee Sat Apr 5 10:28:07 2003 From: vtk at cens.ioc.ee (Pearu Peterson) Date: Sat, 5 Apr 2003 18:28:07 +0300 (EEST) Subject: [vtkusers] Crash with subsequent creation of vtkRenderWindow in Python Message-ID: Hi, The following Pyhton code """ from vtk import vtkRenderWindow win = vtkRenderWindow() win.SetSize((400,400)) win.Render() raw_input('Press any key to close window: ') del win raw_input('Press any key to create a new window: ') win = vtkRenderWindow() win.DebugOn() win.SetSize((400,400)) win.Render() raw_input('Press any key to exit: ') """ crashes with the following output: """ MMX cpu detected. Mesa: Mesa DEBUG build Apr 5 2003 11:45:16 Press any key to close window: Press any key to create new window: Debug: In /home/users/pearu/cvs/VTK/Rendering/vtkRenderWindow.cxx, line 219 vtkXOpenGLRenderWindow (0x821a2b0): Starting Render Method. Debug: In /home/users/pearu/cvs/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 494 vtkXOpenGLRenderWindow (0x821a2b0): Resizing the xwindow X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 78 (X_CreateColormap) Value in failed request: 0x401a1d54 Serial number of failed request: 8 Current serial number in output stream: 13 vtkDebugLeaks has detected LEAKS! Class vtkXOpenGLRenderWindow has 1 instance still around. Class vtkIdList has 1 instance still around. Class vtkRendererCollection has 1 instance still around. """ I am using VTK from its CVS and Mesa 5.0.1, both built with gcc-2.95.4 on Debian woody. Is the above Python code buggy or is it VTK or Mesa bug? What is the correct way to close a RenderWindow and open another one? I have noticed that there is no problem if to create several subsequent RenderWindows but whenever one is closed before opening another RenderWindow, this crash occures. Any ideas? Thanks, Pearu From c.p.botha at its.tudelft.nl Sat Apr 5 10:56:25 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Sat, 5 Apr 2003 17:56:25 +0200 Subject: [vtkusers] vtkRenderWindowInteractor controls In-Reply-To: <3E8EF18A.C6C66D34@ucalgary.ca> References: <3E8EF18A.C6C66D34@ucalgary.ca> Message-ID: <20030405155625.GA13713@dutidad.twi.tudelft.nl> On Sat, Apr 05, 2003 at 08:08:58AM -0700, Steven Boyd wrote: > 1. How do I set the interactor to "ObjectMode" (i.e., so the actor > rotates, not the camera) versus "CameraMode"? I read that I can press > the "o" key while interacting, but is it possible to set the default > interaction mode to ObjectMode in the source? One way is to create an instance of vtkInteractorStyleTrackballActor or vtkInteractorStyleJoystickActor and assign it to the RWI with SetInteractorStyle(). > 2. Can I restrict the mouse interaction to rotations in one plane (i.e., > rotation about the Z axis) rather than 3D rotations? Hmmm, as far as I can remember, this is not implemented in the available interactorstyles. It shouldn't be too difficult to derive your own. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From c.p.botha at its.tudelft.nl Sat Apr 5 11:04:53 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Sat, 5 Apr 2003 18:04:53 +0200 Subject: [vtkusers] Crash with subsequent creation of vtkRenderWindow in Python In-Reply-To: References: Message-ID: <20030405160453.GB13713@dutidad.twi.tudelft.nl> On Sat, Apr 05, 2003 at 06:28:07PM +0300, Pearu Peterson wrote: > > """ > from vtk import vtkRenderWindow > win = vtkRenderWindow() > win.SetSize((400,400)) > win.Render() > raw_input('Press any key to close window: ') > del win > raw_input('Press any key to create a new window: ') > win = vtkRenderWindow() > win.DebugOn() > win.SetSize((400,400)) > win.Render() > raw_input('Press any key to exit: ') > """ > > crashes with the following output: It doesn't crash here: Debian, NVidia binary drivers 1.0-4191, XFree86 4.2.1, VTK CVS, Python 2.2.1 I also tested it on my Debian laptop, XFree86 4.3.0, DRI CVS (i.e. also Mesa 5.0.1), VTK CVS, Python 2.2.1 without incident. > I am using VTK from its CVS and Mesa 5.0.1, both built > with gcc-2.95.4 on Debian woody. > > Is the above Python code buggy or is it VTK or Mesa bug? > What is the correct way to close a RenderWindow and open another one? > > I have noticed that there is no problem if to create several > subsequent RenderWindows but whenever one is closed before opening > another RenderWindow, this crash occures. Any ideas? The RenderWindow should disappear when all references (including Python bindings) to it are removed. Things get more complicated when you use a vtkRenderWindow along with an external widget set, but that is not the case here. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From vtk at cens.ioc.ee Sat Apr 5 11:29:18 2003 From: vtk at cens.ioc.ee (Pearu Peterson) Date: Sat, 5 Apr 2003 19:29:18 +0300 (EEST) Subject: [vtkusers] Crash with subsequent creation of vtkRenderWindow in Python In-Reply-To: <20030405160453.GB13713@dutidad.twi.tudelft.nl> Message-ID: On Sat, 5 Apr 2003, Charl P. Botha wrote: > On Sat, Apr 05, 2003 at 06:28:07PM +0300, Pearu Peterson wrote: > > > > """ > > from vtk import vtkRenderWindow > > win = vtkRenderWindow() > > win.SetSize((400,400)) > > win.Render() > > raw_input('Press any key to close window: ') > > del win > > raw_input('Press any key to create a new window: ') > > win = vtkRenderWindow() > > win.DebugOn() > > win.SetSize((400,400)) > > win.Render() > > raw_input('Press any key to exit: ') > > """ > > > > crashes with the following output: > > It doesn't crash here: Debian, NVidia binary drivers 1.0-4191, XFree86 4.2.1, > VTK CVS, Python 2.2.1 > > I also tested it on my Debian laptop, XFree86 4.3.0, DRI CVS (i.e. also Mesa > 5.0.1), VTK CVS, Python 2.2.1 without incident. Could this be an X issue then? I am on XFree86 Version 3.3.6a (driver Mach64) > > I have noticed that there is no problem if to create several > > subsequent RenderWindows but whenever one is closed before opening > > another RenderWindow, this crash occures. Any ideas? > > The RenderWindow should disappear when all references (including Python > bindings) to it are removed. Things get more complicated when you use a > vtkRenderWindow along with an external widget set, but that is not the case > here. Yes, I know. The above case is a result of a major reduction of a real app having the same problem. Here follows more diagnostics: """ from vtk import vtkRenderWindow def win(): w = vtkRenderWindow() w.SetSize((400,400)) w.Render() return w w = win() w2 = win() raw_input('Press any key to close window: ') del w raw_input('Press any key to close another window: ') del w2 raw_input('Press any key to exit: ') """ crashes at statement `del w2` with segmentation fault. libwadpy gives the following traceback: """ WAD: Segmentation fault. #17 0x080797e9 in PyEval_EvalCode() #16 0x080777ed in PyEval_EvalCodeEx() #15 0x08075b80 in ?() #14 0x080c2c1d in PyDict_DelItem() #13 0x4096d789 in PyVTKObject_PyDelete__FP11PyVTKObject() #12 0x4096f94e in vtkPythonDeleteObjectFromHash__FP7_object(obj=0x8514b40) in 'vtkPythonUtil.cxx', line 1314 #11 0x406dde20 in _._19vtkSmartPointerBase(this=0xbfffe470,__in_chrg=2) in 'vtkSmartPointerBase.cxx', line 44 #10 0x406de02d in UnRegister__19vtkSmartPointerBase(this=0xbfffe470) in 'vtkSmartPointerBase.cxx', line 85 #9 0x41fd66af in UnRegister__15vtkRenderWindowP13vtkObjectBase(this=0x8514968,o=0x0) in 'vtkRenderWindow.cxx', line 991 #8 0x40684aa0 in UnRegister__9vtkObjectP13vtkObjectBase(this=0x8514968,o=0x0) in 'vtkObject.cxx', line 245 #7 0x42078462 in _._22vtkXOpenGLRenderWindow(this=0x8514968,__in_chrg=3) in 'vtkXOpenGLRenderWindow.cxx', line 353 #6 0x424fa5d3 in glXDestroyContext(dpy=0x8514be8,ctx=0x8518af8) in 'glxapi.c', line 208 #5 0x424fecd6 in Fake_glXDestroyContext(dpy=0x8514be8,ctx=0x8518af8) in 'fakeglx.c ', line 1462 #4 0x42505f34 in XMesaGarbageCollect() in 'xm_api.c', line 2530 #3 0x425d68b7 in XSync() #2 0x425daba6 in _XReply() #1 0x425d980c in ?() #0 0x425f4cae in _X11TransWrite() /home/users/pearu/src/Mesa-5.0.1/src/X/xm_api.c, line 2530 /* NOT_NEEDED */ #else => XSync(b->display, False); if (!window_exists( b->display, b->frontbuffer )) { """ Thanks for a quick response, Pearu From c.p.botha at its.tudelft.nl Sat Apr 5 12:07:31 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Sat, 5 Apr 2003 19:07:31 +0200 Subject: [vtkusers] Crash with subsequent creation of vtkRenderWindow in Python In-Reply-To: References: <20030405160453.GB13713@dutidad.twi.tudelft.nl> Message-ID: <20030405170731.GD13713@dutidad.twi.tudelft.nl> On Sat, Apr 05, 2003 at 07:29:18PM +0300, Pearu Peterson wrote: > #6 0x424fa5d3 in glXDestroyContext(dpy=0x8514be8,ctx=0x8518af8) in 'glxapi.c', line 208 > #5 0x424fecd6 in Fake_glXDestroyContext(dpy=0x8514be8,ctx=0x8518af8) in 'fakeglx.c ', line 1462 > #4 0x42505f34 in XMesaGarbageCollect() in 'xm_api.c', line 2530 > #3 0x425d68b7 in XSync() > #2 0x425daba6 in _XReply() > #1 0x425d980c in ?() > #0 0x425f4cae in _X11TransWrite() Hmmm, this is a perfectly normal glxDestroyContext call in vtkXOpenGLRenderWindow. Maybe you could check what happens in that unfortunately named Fake_glXDestroyContext() call in Mesa? It's very difficult for me to help debugging this as I can't reproduce it. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From vtk at cens.ioc.ee Sat Apr 5 12:50:40 2003 From: vtk at cens.ioc.ee (Pearu Peterson) Date: Sat, 5 Apr 2003 20:50:40 +0300 (EEST) Subject: [vtkusers] Crash with subsequent creation of vtkRenderWindow in Python In-Reply-To: <20030405170731.GD13713@dutidad.twi.tudelft.nl> Message-ID: On Sat, 5 Apr 2003, Charl P. Botha wrote: > On Sat, Apr 05, 2003 at 07:29:18PM +0300, Pearu Peterson wrote: > > #6 0x424fa5d3 in glXDestroyContext(dpy=0x8514be8,ctx=0x8518af8) in 'glxapi.c', line 208 > > #5 0x424fecd6 in Fake_glXDestroyContext(dpy=0x8514be8,ctx=0x8518af8) in 'fakeglx.c ', line 1462 > > #4 0x42505f34 in XMesaGarbageCollect() in 'xm_api.c', line 2530 > > #3 0x425d68b7 in XSync() > > #2 0x425daba6 in _XReply() > > #1 0x425d980c in ?() > > #0 0x425f4cae in _X11TransWrite() > > Hmmm, this is a perfectly normal glxDestroyContext call in > vtkXOpenGLRenderWindow. Maybe you could check what happens in that > unfortunately named Fake_glXDestroyContext() call in Mesa? Well, this is the code from fakeglx.c: """ /* * Our fake GLX context will contain a "real" GLX context and an XMesa context. * * Note that a pointer to a __GLXcontext is a pointer to a fake_glx_context, * and vice versa. * * We really just need this structure in order to make the libGL functions * glXGetCurrentContext(), glXGetCurrentDrawable() and glXGetCurrentDisplay() * work correctly. */ struct fake_glx_context { __GLXcontext glxContext; /* this MUST be first! */ XMesaContext xmesaContext; }; static void Fake_glXDestroyContext( Display *dpy, GLXContext ctx ) { struct fake_glx_context *glxCtx = (struct fake_glx_context *) ctx; (void) dpy; MakeCurrent_PrevContext = 0; MakeCurrent_PrevDrawable = 0; MakeCurrent_PrevReadable = 0; MakeCurrent_PrevDrawBuffer = 0; MakeCurrent_PrevReadBuffer = 0; XMesaDestroyContext( glxCtx->xmesaContext ); XMesaGarbageCollect(); } """ where from xm_api.c """ void XMesaDestroyContext( XMesaContext c ) { #ifdef FX if (c->xm_draw_buffer && c->xm_buffer->FXctx) fxMesaDestroyContext(c->xm_draw_buffer->FXctx); #endif if (c->gl_ctx) { _swsetup_DestroyContext( c->gl_ctx ); _swrast_DestroyContext( c->gl_ctx ); _tnl_DestroyContext( c->gl_ctx ); _ac_DestroyContext( c->gl_ctx ); _mesa_destroy_context( c->gl_ctx ); } FREE( c ); } /* * Look for XMesaBuffers whose X window has been destroyed. * Deallocate any such XMesaBuffers. */ void XMesaGarbageCollect( void ) { XMesaBuffer b, next; for (b=XMesaBufferList; b; b=next) { next = b->Next; if (b->display && b->frontbuffer && b->type == WINDOW) { #ifdef XFree86Server /* NOT_NEEDED */ #else XSync(b->display, False); if (!window_exists( b->display, b->frontbuffer )) { /* found a dead window, free the ancillary info */ XMesaDestroyBuffer( b ); } #endif } } } """ I'll try to play with the above code (e.g. I am not sure why XFree86Server was not defined in my case). But if you have any hints what to try, they are most welcome. > It's very difficult for me to help debugging this as I can't reproduce it. Sure, it's understandable. Thanks, Pearu From mglistmail at totalise.co.uk Sun Apr 6 14:49:27 2003 From: mglistmail at totalise.co.uk (Martin Gardner) Date: Sun, 06 Apr 2003 19:49:27 +0100 Subject: [vtkusers] vtkPNGReader and multiple files Message-ID: <3E9076B7.6080003@totalise.co.uk> Hi, Could someone confirm whether or not vtkPNGReader can handle multiple files? I want to create a volume from a load of png images do I have to use vtkImageReader instead? Cheers Martin -- mglistmail at totalise.co.uk From David.Pont at ForestResearch.co.nz Sun Apr 6 17:51:38 2003 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Mon, 7 Apr 2003 09:51:38 +1200 Subject: [vtkusers] Implicit functions rendering using an octree Message-ID: Hi Jimmy, I had just started on a vtk class to 'polygonize' implicit functions, based on an adaptive refinement algorithm. I hope to get something working in a week or so (this is a part-time effort only). The algorithm has a nice combination of speed and accuracy, with user control over accuracy. Currently in vtk you have to sample implicit functions over a regular volume and then contour. This new class will output polydata directly (it uses cubes of different sizes too...) which should be much faster. Just last week a user asked for a way of evaluating 'arbitrary' implicit functions, so your work on that front sounds useful. How about you create a class derived from vtkImplicitFunction that calls user defined callbacks for EvaluateFunction and EvaluateGradient. I suggest you keep the parsing etc within your application, although this might be useful too....! ? I can work on the polygonizer unless you have the desire or the need to solve this yourself. So at the end we will have two very useful vtk classes. what do you think? Dave Pont |--------+---------------------------------> | | "Dimitris Andritsos" | | | | | | Sent by: | | | vtkusers-admin at public.k| | | itware.com | | | | | | | | | 05/04/2003 19:46 | | | | |--------+---------------------------------> >------------------------------------------------------------------------------------------------------------| | | | To: vtkusers at public.kitware.com | | cc: | | Subject: [vtkusers] Implicit functions rendering using an octree | >------------------------------------------------------------------------------------------------------------| Hello everyone, I am a new user to VTK and I would like your help. I am designing a programm that takes as input implicit functions (in the form of an equation), parses and evaluates them. During the evaluation phase, an octree data structure is constructed and I want to use VTK to view the surface. How should this be done? I tried using marching cubes and although it works, because vtkImage data have to be used, the number of evaluations is very big and the time it takes to render the surfaces is prohibitive. Can another type of data set be used with the octree and marching cubes or any other contouring class of Vtk? The octree uses the cube as the basic voxel. The problem associated with the octree, as I understand it, is that I end up with cubes of various sizes and this is why I can't use marching cubes. I would really appreciate any help on this problem. It is not mandatory that I have to go with the octree so any other suggestion is welcome. I am thinking of the octree for performance efficiency reasons. Thanks a lot in advance, Jimmy _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: < http://public.kitware.com/cgi-bin/vtkfaq> Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From garsha at itg.uiuc.edu Sun Apr 6 21:25:00 2003 From: garsha at itg.uiuc.edu (Karl Garsha) Date: Sun, 06 Apr 2003 20:25:00 -0500 Subject: [vtkusers] mayavi ValueError: method requires a vtk object Message-ID: <3E90D36C.7070801@itg.uiuc.edu> Greetings, I've built VTK 4.2 + Python2.2 with Tkinter on LinuxPPC (Kernel 2.4.20-ppc-r3) and everything works well (at least the examples I've tried). I'm trying to run MayaVi--I've installed using the setup.py script and there were no errors. When I run the test_vtk.py script in the docs directory everthing checks out A-OK. I can import mayavi in the python interpreter without incident. As far as I can tell everything should be in order, but I'm having problems getting MayaVi to run with the "mayavi" command. The error I get follows: > mayavi& [1] 26883 > Traceback (most recent call last): File "/usr/local/bin/mayavi", line 277, in ? app = MayaViTkGUI (r) File "/usr/local/lib/python2.2/site-packages/mayavi/Main.py", line 779, in __init__ self.renwin = Misc.RenderWindow.RenderWindow (self.renwin_frame) File "/usr/local/lib/python2.2/site-packages/mayavi/Misc/RenderWindow.py", line 124, in __init__ mode='vtk') File "/usr/local/lib/python2.2/site-packages/mayavi/Misc/Lights.py", line 696, in __init__ self.lights = self._create_lights() File "/usr/local/lib/python2.2/site-packages/mayavi/Misc/Lights.py", line 704, in _create_lights lights.insert(i, Light()) File "/usr/local/lib/python2.2/site-packages/mayavi/Misc/Lights.py", line 36, in __init__ self.glyph = LightGlyph() File "/usr/local/lib/python2.2/site-packages/mayavi/Misc/Lights.py", line 160, in __init__ capmapper.SetInput(pdata) ValueError: method requires a VTK object I'm not sure what to make of this--has anyone seen this before? Compared to OS X (which I scrapped because I finally realized that it didn't permit software rendering for OpenGL, and I'm running an older video subsystem) things have been pretty smooth on LinuxPPC (things compile about 5x faster too). Any insights would be much appreciated. Thanks in advance and best regards, Karl From Neil.Killeen at atnf.csiro.au Sun Apr 6 23:44:00 2003 From: Neil.Killeen at atnf.csiro.au (Neil Killeen) Date: Mon, 7 Apr 2003 13:44:00 +1000 (EST) Subject: [vtkusers] vtkImageMapper error In-Reply-To: <001d01c2fb08$08ba1c40$0100a8c0@tigger> Message-ID: <49AA3A3C863E5B4C911320AEF99E5DA3039FE907-100000@wing-ep.tip.csiro.au> John On Sat, 5 Apr 2003, John Biddiscombe wrote: > Yes. There's a bug in the render to rectangle code. > > What's happening is that the render to rectangle is scaling the image > correctly, but unbeknown to it, the image mapper base class has "cropped" > the extents of the visible image before the rectangle scaling is applied. > Hence it gets the scaling wrong and as the screen size drops below the image > size an error is apparent. It doesn't happen when the screen size is bigger > than the image because no cropping occurs. > > A fix you can use temporarily is to > mapper->SetRenderToRectangle(1); > mapper->SetUseCustomExtents(1); > int ex[4] = { 0, dims[0]-1, 0, dims[1]-1 }; > mapper->SetCustomDisplayExtents(ex); > now we've fixed the extents that are displayed to the limits of the image > and nomatter what happens, the correct pixels are being used, and the > scaling is preserved. > > it may take me a while to fix this bug, so perhaps a short term solution is > to alter the docs to tell the user to use custom extents (which is what I > always do and why I've never noticed the bug) > > Thanks for pointing it out > > JB > Under Linux indeed this changed the behaviour to something more sensible. Under Solaris I still get a Bus Error, even with this new code. Do you have the opportunity to try it under Solaris ? thanks Neil From ramakrishna.prakash at quest-global.com Mon Apr 7 02:03:43 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Mon, 7 Apr 2003 11:33:43 +0530 Subject: [vtkusers] Centerline length calculation Message-ID: <000e01c2fccb$72024ff0$de0ba8c0@qtwblr01.questglobal.com> Hi, I have a "U" shaped pipe object. How can I determine the centerline distance of this pipe. Centerline distance is the distance between centers of two ends of the pipe as shown in the attachment. Help. Thanks Shyam -------------- next part -------------- A non-text attachment was scrubbed... Name: centerline.jpg Type: application/octet-stream Size: 14153 bytes Desc: not available URL: From vermaas at astron.nl Mon Apr 7 02:06:10 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Mon, 07 Apr 2003 08:06:10 +0200 Subject: [vtkusers] Removing al actors from a Renderer (I get multiple XYPlots inone renderer) Message-ID: Hi, Do you know what happens when I have 'yourActor' as a member and use AddActor(yourActor) in a memberfunction that is called in a loop? I must be adding 'yourActor's' continuesly to the renderer, but I do not see the NumberOfActors growing when I use 'renderer->VisibleActorCount()'. Do you think this leads to problems? Do I need to remove the actors or will it overwrite the existing actor because I use the same vtkActor every time? Nico >>> "R K Shyamprakash" 04/04/03 12:28pm >>> Hi, Make sure you call InitTraversal() on vtkActorCollection before taking the actor count. Else you can also use yourRenderer->RemoveActor(yourActor). regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Nico Vermaas Sent: Friday, April 04, 2003 12:28 PM To: vtkusers at public.kitware.com Subject: [vtkusers] Removing al actors from a Renderer (I get multiple XYPlots inone renderer) Hi, I want to draw and update an XYPlotActor, but when I draw a new one (by addingAddActor2D(xyplot)) then the old one just also stays in there. So I need to delete the old one first. I tried this... and I do get the right count that increases every time I add an actor. But the Removing part does not work. vtkActorCollection *actors = vtkActorCollection::New(); int NumberOfActors = renderer->VisibleActorCount(); actors=this->renderer->GetActors(); for (int i=0; irenderer->RemoveActor(actors->GetNextActor()); } actors->Delete(); Q: How do I delete all actors from a renderer? Nico _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From vermaas at astron.nl Mon Apr 7 02:31:06 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Mon, 07 Apr 2003 08:31:06 +0200 Subject: [vtkusers] Removing al actors from a Renderer (I get multipleXYPlots inone renderer) Message-ID: Rob, Thanks for your reply, one more question about this. I have my vtkLODActor declared as a member (vtkLODActor* myActor) and I use AddActor(myActor) in a member function that is called many times during execution (actually from the event loop). I would expect actors building up like this, but my VisibleActorCount() only gives one. But I'm not sure if the 'visible' actors realy represent *all* the actors in the renderer, so.. Q: is there an actor added to the renderer every time I use AddActor, or is it overwriting the previous actor when I use the same vtkLODActor var? Nico >>>> Robert Belleman 04/04/03 01:24pm >>> >Nico, > >> I tried this... and I do get the right count that increases every time >> I add an actor. But the Removing part does not work. >> >> vtkActorCollection *actors = vtkActorCollection::New(); >Later in your code, you obtain a pointer to the vtkActorCollection >maintained by the renderer. I.e. do not create your own. Do: > > vtkActorCollection *actors = NULL; > >> int NumberOfActors = renderer->VisibleActorCount(); You mentioned you want to remove *2D* actors. The code you have given removes *3D* actors. See the GetActors2D() and RemoveActor2D() methods in vtkViewport. > actors=this->renderer->GetActors(); Don't forget to initialize the traversal of the collection: actors->InitTraversal(); > for (int i=0; i this->renderer->RemoveActor(actors->GetNextActor()); > } That's bascially correct. > actors->Delete(); As this is not your vtkActorCollection, do not Delete() it. Just remove that line. > Q: How do I delete all actors from a renderer? What you did came close, but removes 3D actors. If you want to remove 2D actors, also look into the methods I mentioned above. -- Rob -- [] Robert Belleman X [] [] robbel at science.uva.nl |X| University of Amsterdam, the Netherlands [] [] tel: (+31) 20 525 7510 X http://www.science.uva.nl/~robbel/ [] From ramakrishna.prakash at quest-global.com Mon Apr 7 02:48:35 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Mon, 7 Apr 2003 12:18:35 +0530 Subject: [vtkusers] Removing al actors from a Renderer (I getmultiple XYPlots inone renderer) In-Reply-To: Message-ID: <001401c2fcd1$b6c9ad30$de0ba8c0@qtwblr01.questglobal.com> Nico, I am not sure if the actors get overwritten. Give me some time, I will check and get back to you. I have point or two to check. 1. Do you call renWin->Render() every time after you add the actor?(renWin is RendererWindow.) 2. Instead of using renderer->VisibleActorCount() try using actorCollection = renderer->GetActors(); actorCollection->InitTraversal(); actorCollection->GetNumberOfActors() Check if the actor count increases. Regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Nico Vermaas Sent: Monday, April 07, 2003 11:36 AM To: ramakrishna.prakash at quest-global.com Cc: vtkusers at public.kitware.com Subject: RE: [vtkusers] Removing al actors from a Renderer (I getmultiple XYPlots inone renderer) Hi, Do you know what happens when I have 'yourActor' as a member and use AddActor(yourActor) in a memberfunction that is called in a loop? I must be adding 'yourActor's' continuesly to the renderer, but I do not see the NumberOfActors growing when I use 'renderer->VisibleActorCount()'. Do you think this leads to problems? Do I need to remove the actors or will it overwrite the existing actor because I use the same vtkActor every time? Nico >>> "R K Shyamprakash" 04/04/03 12:28pm >>> Hi, Make sure you call InitTraversal() on vtkActorCollection before taking the actor count. Else you can also use yourRenderer->RemoveActor(yourActor). regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Nico Vermaas Sent: Friday, April 04, 2003 12:28 PM To: vtkusers at public.kitware.com Subject: [vtkusers] Removing al actors from a Renderer (I get multiple XYPlots inone renderer) Hi, I want to draw and update an XYPlotActor, but when I draw a new one (by addingAddActor2D(xyplot)) then the old one just also stays in there. So I need to delete the old one first. I tried this... and I do get the right count that increases every time I add an actor. But the Removing part does not work. vtkActorCollection *actors = vtkActorCollection::New(); int NumberOfActors = renderer->VisibleActorCount(); actors=this->renderer->GetActors(); for (int i=0; irenderer->RemoveActor(actors->GetNextActor()); } actors->Delete(); Q: How do I delete all actors from a renderer? Nico _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From matei.mancas at tcts.fpms.ac.be Mon Apr 7 02:53:09 2003 From: matei.mancas at tcts.fpms.ac.be (Matei MANCAS) Date: Mon, 7 Apr 2003 08:53:09 +0200 Subject: [vtkusers] extent, spacing and origin propagation problem through filters References: <009d01c2fa9d$9e88f360$0f0910ac@Surprise> <20030404205045.GB11879@dutidad.twi.tudelft.nl> Message-ID: <004201c2fcd2$59abd3c0$0f0910ac@Surprise> Thanks! It was the secret! I did some upadates on all objects but not on the filter, so when I did it it worked well! If one want to compute a filter and not to put it immediatly in a viewer, one must do a filter->Update()!!!! So, thank you Charl! Matei ----- Original Message ----- From: "Charl P. Botha" To: Sent: Friday, April 04, 2003 10:50 PM Subject: Re: [vtkusers] extent, spacing and origin propagation problem through filters > On Fri, Apr 04, 2003 at 01:30:39PM +0200, Matei MANCAS wrote: > > int a,z,e,r,t,y; > > data->VolReader->GetExtent(a,z,e,r,t,y); //here I have the good Z extent (0 100) (VolReader is a vtkImageData) > > > > vtkImageShiftScale *my_shift = vtkImageShiftScale::New(); //a filter > > my_shift->SetInput(data->VolReader); > > my_shift->SetScale(my_shift->GetScale()/256.0); > > my_shift->SetOutputScalarTypeToUnsignedChar(); > > > > data->VolReader=my_shift->GetOutput(); // I have the same bad results using DeepCopy method... > > > > What results do you get if you call my_shift->Update() BEFORE you do the > following calls to GetExtent()? > > > data->VolReader->GetExtent(a,z,e,r,t,y); //here I have a bad Z extent (0 -1) > > > > my_shift->GetOutput()->GetExtent(a,z,e,r,t,y); //here I have a bad Z extent too : (0 -1) > > my_shift->GetInput()->GetExtent(a,z,e,r,t,y); //here I have the good Z extent (0 100) > > -- > charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From vermaas at astron.nl Mon Apr 7 02:54:58 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Mon, 07 Apr 2003 08:54:58 +0200 Subject: [vtkusers] Removing al actors from a Renderer (I getmultiple XYPlots inone renderer) Message-ID: Hi Shyam, 1: Yes I do... when the user makes a change I draw and render everything again (from the event loop). 2: GetNumberOfActors() does not seem to exist. It doesn't compile and I cannot find it in the online VTK documentation. (do you have it?) That's why I wondered that the 'VisibleActorCount()' gives back exactly, the total actor count? Nico >>> "R K Shyamprakash" 04/07/03 08:48am >>> Nico, I am not sure if the actors get overwritten. Give me some time, I will check and get back to you. I have point or two to check. 1. Do you call renWin->Render() every time after you add the actor?(renWin is RendererWindow.) 2. Instead of using renderer->VisibleActorCount() try using actorCollection = renderer->GetActors(); actorCollection->InitTraversal(); actorCollection->GetNumberOfActors() Check if the actor count increases. Regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Nico Vermaas Sent: Monday, April 07, 2003 11:36 AM To: ramakrishna.prakash at quest-global.com Cc: vtkusers at public.kitware.com Subject: RE: [vtkusers] Removing al actors from a Renderer (I getmultiple XYPlots inone renderer) Hi, Do you know what happens when I have 'yourActor' as a member and use AddActor(yourActor) in a memberfunction that is called in a loop? I must be adding 'yourActor's' continuesly to the renderer, but I do not see the NumberOfActors growing when I use 'renderer->VisibleActorCount()'. Do you think this leads to problems? Do I need to remove the actors or will it overwrite the existing actor because I use the same vtkActor every time? Nico >>> "R K Shyamprakash" 04/04/03 12:28pm >>> Hi, Make sure you call InitTraversal() on vtkActorCollection before taking the actor count. Else you can also use yourRenderer->RemoveActor(yourActor). regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Nico Vermaas Sent: Friday, April 04, 2003 12:28 PM To: vtkusers at public.kitware.com Subject: [vtkusers] Removing al actors from a Renderer (I get multiple XYPlots inone renderer) Hi, I want to draw and update an XYPlotActor, but when I draw a new one (by addingAddActor2D(xyplot)) then the old one just also stays in there. So I need to delete the old one first. I tried this... and I do get the right count that increases every time I add an actor. But the Removing part does not work. vtkActorCollection *actors = vtkActorCollection::New(); int NumberOfActors = renderer->VisibleActorCount(); actors=this->renderer->GetActors(); for (int i=0; irenderer->RemoveActor(actors->GetNextActor()); } actors->Delete(); Q: How do I delete all actors from a renderer? Nico _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From matei.mancas at tcts.fpms.ac.be Mon Apr 7 03:04:31 2003 From: matei.mancas at tcts.fpms.ac.be (Matei MANCAS) Date: Mon, 7 Apr 2003 09:04:31 +0200 Subject: [vtkusers] vtkPNGReader and multiple files References: <3E9076B7.6080003@totalise.co.uk> Message-ID: <008a01c2fcd3$efe386c0$0f0910ac@Surprise> Hi! Yes! vtkPNGReader can handle multiple files! It is associated with vtkImageReader2 not vtkImageReader... You can use a script like this for files "my_dir/im0001R0.png to my_dir/im0348R0.png ": vtkPNGReader *noduleReader2 = vtkPNGReader::New(); noduleReader2->SetFilePrefix(your prefix); //the prefix contains your dir path and the constant part of your file name : "my_dir/im" noduleReader2->SetFilePattern(the end of your files); //here it will be "%s%.4dR0.png"; noduleReader2->SetDataExtent(your file extent....); noduleReader2->SetDataSpacing(1,1,1); //or your spacing.... noduleReader2->UpdateWholeExtent(); //your reader ready to be used!!!! Hop it helps Matei ----- Original Message ----- From: "Martin Gardner" To: "vtkusers" Sent: Sunday, April 06, 2003 8:49 PM Subject: [vtkusers] vtkPNGReader and multiple files > Hi, > > Could someone confirm whether or not vtkPNGReader can handle multiple files? > I want to create a volume from a load of png images do I have to use > vtkImageReader instead? > > Cheers > > Martin > > -- > mglistmail at totalise.co.uk > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From ramakrishna.prakash at quest-global.com Mon Apr 7 03:10:42 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Mon, 7 Apr 2003 12:40:42 +0530 Subject: [vtkusers] Removing al actors from a Renderer (Igetmultiple XYPlots inone renderer) In-Reply-To: Message-ID: <001501c2fcd4$cdf00240$de0ba8c0@qtwblr01.questglobal.com> Nico, sorry. The method you should use is actorCollection->GetNumberOfItems(); Let me know if it works. Regards Shyam -----Original Message----- From: Nico Vermaas [mailto:vermaas at astron.nl] Sent: Monday, April 07, 2003 12:25 PM To: ramakrishna.prakash at quest-global.com Cc: vtkusers at public.kitware.com Subject: RE: [vtkusers] Removing al actors from a Renderer (Igetmultiple XYPlots inone renderer) Hi Shyam, 1: Yes I do... when the user makes a change I draw and render everything again (from the event loop). 2: GetNumberOfActors() does not seem to exist. It doesn't compile and I cannot find it in the online VTK documentation. (do you have it?) That's why I wondered that the 'VisibleActorCount()' gives back exactly, the total actor count? Nico >>> "R K Shyamprakash" 04/07/03 08:48am >>> Nico, I am not sure if the actors get overwritten. Give me some time, I will check and get back to you. I have point or two to check. 1. Do you call renWin->Render() every time after you add the actor?(renWin is RendererWindow.) 2. Instead of using renderer->VisibleActorCount() try using actorCollection = renderer->GetActors(); actorCollection->InitTraversal(); actorCollection->GetNumberOfActors() Check if the actor count increases. Regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Nico Vermaas Sent: Monday, April 07, 2003 11:36 AM To: ramakrishna.prakash at quest-global.com Cc: vtkusers at public.kitware.com Subject: RE: [vtkusers] Removing al actors from a Renderer (I getmultiple XYPlots inone renderer) Hi, Do you know what happens when I have 'yourActor' as a member and use AddActor(yourActor) in a memberfunction that is called in a loop? I must be adding 'yourActor's' continuesly to the renderer, but I do not see the NumberOfActors growing when I use 'renderer->VisibleActorCount()'. Do you think this leads to problems? Do I need to remove the actors or will it overwrite the existing actor because I use the same vtkActor every time? Nico >>> "R K Shyamprakash" 04/04/03 12:28pm >>> Hi, Make sure you call InitTraversal() on vtkActorCollection before taking the actor count. Else you can also use yourRenderer->RemoveActor(yourActor). regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Nico Vermaas Sent: Friday, April 04, 2003 12:28 PM To: vtkusers at public.kitware.com Subject: [vtkusers] Removing al actors from a Renderer (I get multiple XYPlots inone renderer) Hi, I want to draw and update an XYPlotActor, but when I draw a new one (by addingAddActor2D(xyplot)) then the old one just also stays in there. So I need to delete the old one first. I tried this... and I do get the right count that increases every time I add an actor. But the Removing part does not work. vtkActorCollection *actors = vtkActorCollection::New(); int NumberOfActors = renderer->VisibleActorCount(); actors=this->renderer->GetActors(); for (int i=0; irenderer->RemoveActor(actors->GetNextActor()); } actors->Delete(); Q: How do I delete all actors from a renderer? Nico _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From vermaas at astron.nl Mon Apr 7 03:13:48 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Mon, 07 Apr 2003 09:13:48 +0200 Subject: [vtkusers] Removing al actors from a Renderer (Igetmultiple XYPlots inone renderer) Message-ID: Shyam, Yes.. this works. The NumberOfItems, as well as the NumberOfVisibleActors, stay the same. In another RenderWindow I am using a locally defined actor2d and there the number of actors does grow. So, the conclusion must be that when we use the actors as a member that AddActor in a member function overwrites them. Thats good.. greetings, Nico >>> "R K Shyamprakash" 04/07/03 09:10am >>> Nico, sorry. The method you should use is actorCollection->GetNumberOfItems(); Let me know if it works. Regards Shyam -----Original Message----- From: Nico Vermaas [mailto:vermaas at astron.nl] Sent: Monday, April 07, 2003 12:25 PM To: ramakrishna.prakash at quest-global.com Cc: vtkusers at public.kitware.com Subject: RE: [vtkusers] Removing al actors from a Renderer (Igetmultiple XYPlots inone renderer) Hi Shyam, 1: Yes I do... when the user makes a change I draw and render everything again (from the event loop). 2: GetNumberOfActors() does not seem to exist. It doesn't compile and I cannot find it in the online VTK documentation. (do you have it?) That's why I wondered that the 'VisibleActorCount()' gives back exactly, the total actor count? Nico >>> "R K Shyamprakash" 04/07/03 08:48am >>> Nico, I am not sure if the actors get overwritten. Give me some time, I will check and get back to you. I have point or two to check. 1. Do you call renWin->Render() every time after you add the actor?(renWin is RendererWindow.) 2. Instead of using renderer->VisibleActorCount() try using actorCollection = renderer->GetActors(); actorCollection->InitTraversal(); actorCollection->GetNumberOfActors() Check if the actor count increases. Regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Nico Vermaas Sent: Monday, April 07, 2003 11:36 AM To: ramakrishna.prakash at quest-global.com Cc: vtkusers at public.kitware.com Subject: RE: [vtkusers] Removing al actors from a Renderer (I getmultiple XYPlots inone renderer) Hi, Do you know what happens when I have 'yourActor' as a member and use AddActor(yourActor) in a memberfunction that is called in a loop? I must be adding 'yourActor's' continuesly to the renderer, but I do not see the NumberOfActors growing when I use 'renderer->VisibleActorCount()'. Do you think this leads to problems? Do I need to remove the actors or will it overwrite the existing actor because I use the same vtkActor every time? Nico >>> "R K Shyamprakash" 04/04/03 12:28pm >>> Hi, Make sure you call InitTraversal() on vtkActorCollection before taking the actor count. Else you can also use yourRenderer->RemoveActor(yourActor). regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Nico Vermaas Sent: Friday, April 04, 2003 12:28 PM To: vtkusers at public.kitware.com Subject: [vtkusers] Removing al actors from a Renderer (I get multiple XYPlots inone renderer) Hi, I want to draw and update an XYPlotActor, but when I draw a new one (by addingAddActor2D(xyplot)) then the old one just also stays in there. So I need to delete the old one first. I tried this... and I do get the right count that increases every time I add an actor. But the Removing part does not work. vtkActorCollection *actors = vtkActorCollection::New(); int NumberOfActors = renderer->VisibleActorCount(); actors=this->renderer->GetActors(); for (int i=0; irenderer->RemoveActor(actors->GetNextActor()); } actors->Delete(); Q: How do I delete all actors from a renderer? Nico _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From robbel at science.uva.nl Mon Apr 7 03:22:46 2003 From: robbel at science.uva.nl (Robert Belleman) Date: Mon, 07 Apr 2003 09:22:46 +0200 Subject: [vtkusers] Removing al actors from a Renderer (I get multipleXYPlots inone renderer) References: Message-ID: <3E912746.1070600@science.uva.nl> Nico, >[...] >Q: is there an actor added to the renderer every time I use AddActor, >or is it overwriting the previous actor when I use the same vtkLODActor >var? > Looking at the source code; if the actor has previously been added, nothing will be added (i.e. the previously added actor will not be overwritten either): void vtkViewport::AddProp(vtkProp *p) { if (!this->Props->IsItemPresent(p)) // because of this line { this->Props->AddItem(p); p->AddConsumer(this); } } -- Rob From john.biddiscombe at mirada-solutions.com Mon Apr 7 06:23:09 2003 From: john.biddiscombe at mirada-solutions.com (John Biddiscombe) Date: Mon, 7 Apr 2003 11:23:09 +0100 Subject: [vtkusers] vtkImageMapper error Message-ID: <4926A5BE4AFE7C4A83D5CF5CDA7B775407AF3F@oxcore01.mirada-solutions.com> Neil, >> Under Linux indeed this changed the behaviour to something more sensible. << Good. >> Under Solaris I still get a Bus Error, even with this new code. Do you have the opportunity to try it under Solaris ? >> Hmmmm. I'm afraid I haven't touched a solaris box for a long time and can't get a hold of one easily. Can you step through the imagemapper code and see where the error happens? Does it happen every time or just when the window becomes zero sized or anything like that? The only thing that the RenderToRectangle code really does is insert an additional glPixelZoom( float,float) call before the draw and then glPixelZoom( 1.0, 1.0) afterwards. if (self->GetRenderToRectangle()) { int rectwidth = (actorPos2[0] - actorPos[0]) + 1; int rectheight = (actorPos2[1] - actorPos[1]) + 1; float xscale = (float)rectwidth/width; float yscale = (float)rectheight/height; glPixelZoom(xscale, yscale); } is really it. width and height are the (visible) image dimensions and are wrong when the image is cropped - that's the bug you have just found - can you see if they are becoming zero at any point. possibly some bug in unrelated code is causing a div by zero or something. can you try inserting a check wherever you see the above lines? (they appear many times in vtkopenglimagemapper) JB PS why solaris and nothing else? From nanditha_thakur at rediffmail.com Mon Apr 7 06:38:38 2003 From: nanditha_thakur at rediffmail.com (Nanditha Thakur) Date: 7 Apr 2003 10:38:38 -0000 Subject: [vtkusers] Radius Message-ID: <20030407103838.10063.qmail@webmail36.rediffmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From john.biddiscombe at mirada-solutions.com Mon Apr 7 07:03:13 2003 From: john.biddiscombe at mirada-solutions.com (John Biddiscombe) Date: Mon, 7 Apr 2003 12:03:13 +0100 Subject: [vtkusers] vtkImageMapper error Message-ID: <4926A5BE4AFE7C4A83D5CF5CDA7B7754071244@oxcore01.mirada-solutions.com> Sorry, I realized after I sent this that looking to see if thewidth/height are zero doen't help because you've set the custom extents anyway. In this case I'm lost for an idea. I can only suggest stepping through the code and seeing where the error happesn. maybe then some idea will spring to mind... JB -----Original Message----- From: John Biddiscombe Sent: 07 April 2003 11:23 To: Neil Killeen; John Biddiscombe Cc: Glen.Coates at csiro.au; vtkusers at public.kitware.com Subject: RE: [vtkusers] vtkImageMapper error Neil, >> Under Linux indeed this changed the behaviour to something more sensible. << Good. >> Under Solaris I still get a Bus Error, even with this new code. Do you have the opportunity to try it under Solaris ? >> Hmmmm. I'm afraid I haven't touched a solaris box for a long time and can't get a hold of one easily. Can you step through the imagemapper code and see where the error happens? Does it happen every time or just when the window becomes zero sized or anything like that? The only thing that the RenderToRectangle code really does is insert an additional glPixelZoom( float,float) call before the draw and then glPixelZoom( 1.0, 1.0) afterwards. if (self->GetRenderToRectangle()) { int rectwidth = (actorPos2[0] - actorPos[0]) + 1; int rectheight = (actorPos2[1] - actorPos[1]) + 1; float xscale = (float)rectwidth/width; float yscale = (float)rectheight/height; glPixelZoom(xscale, yscale); } is really it. width and height are the (visible) image dimensions and are wrong when the image is cropped - that's the bug you have just found - can you see if they are becoming zero at any point. possibly some bug in unrelated code is causing a div by zero or something. can you try inserting a check wherever you see the above lines? (they appear many times in vtkopenglimagemapper) JB PS why solaris and nothing else? _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From andy.cedilnik at kitware.com Mon Apr 7 07:19:07 2003 From: andy.cedilnik at kitware.com (Andy Cedilnik) Date: 07 Apr 2003 07:19:07 -0400 Subject: [vtkusers] PYTHON_UTIL_LIBRARY-NOTFOUND In-Reply-To: <1049541409.3e8ebb21eb4cd@www.sc-aip.com> References: <1049541409.3e8ebb21eb4cd@www.sc-aip.com> Message-ID: <1049714347.20232.1554.camel@xanth> Hello Andrea, Just point PYTHON_UTIL_LIBRARY to the location of python21.lib file. This file should be in libs subdirectory of your python installation. Andy On Sat, 2003-04-05 at 06:16, aborsic at sc-aip.com wrote: > Dear All, > > I'm having the same problem encoutered by an other user on the list: > > I'm trying to build VTK 4.2.1 on a windows Xp machine with Visual Studio 7.0 > and Python 2.1. > > When configuring the build, cmake complains about PYTHON_UTIL_LIBRARY NOT > FOUND, and the build is not allowed. > > I will be thankfull for any suggestion, From SApplegate at northropgrumman.com Mon Apr 7 08:43:22 2003 From: SApplegate at northropgrumman.com (Applegate, Sheldon L.) Date: Mon, 7 Apr 2003 05:43:22 -0700 Subject: [vtkusers] (no subject) Message-ID: Hi. Wish to start serious use of VTK, and for various reasons need to use Python. Got the book, understand the concepts well enough to get rolling. I have not found VTK documentation / man pages with the Python syntax. Does such a beast exist? (and where?) Thanks Sheldon Applegate From c.p.botha at its.tudelft.nl Mon Apr 7 08:50:41 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 07 Apr 2003 14:50:41 +0200 Subject: [vtkusers] (no subject) In-Reply-To: References: Message-ID: <1049719841.19388.17.camel@dutidad> On Mon, 2003-04-07 at 14:43, Applegate, Sheldon L. wrote: > Wish to start serious use of VTK, and for various reasons need to use > Python. > Got the book, understand the concepts well enough to get rolling. > > I have not found VTK documentation / man pages with the Python syntax. There is an almost 1 to 1 mapping between the C++ and Python syntax. There are also a number of Python-based examples in the latest VTK. As far as I know, there is no separate VTK documentation dedicated to the Python bindings. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From Mathieu.Malaterre at creatis.insa-lyon.fr Mon Apr 7 08:50:17 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Mon, 07 Apr 2003 14:50:17 +0200 Subject: [vtkusers] (no subject) In-Reply-To: References: Message-ID: <3E917409.3060107@creatis.insa-lyon.fr> http://www.google.com/search?q=vtk+python&sourceid=mozilla-search&start=0&start=0 and examples: http://www.vtk.org/doc/nightly/html/c2_vtk_e_0.html Just pick python examples under 'Python category' of each class: ex: http://public.kitware.com/cgi-bin/cvsweb.cgi/~checkout~/VTK/Examples/IO/Python/flamingo.py HTH mathieu Applegate, Sheldon L. wrote: > Hi. > > Wish to start serious use of VTK, and for various reasons need to use > Python. > Got the book, understand the concepts well enough to get rolling. > > I have not found VTK documentation / man pages with the Python syntax. > > Does such a beast exist? (and where?) > > Thanks > > Sheldon Applegate > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From pearu at cens.ioc.ee Fri Apr 4 06:04:01 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Fri, 4 Apr 2003 14:04:01 +0300 (EEST) Subject: [vtkusers] Can not connect to public.kitware.com In-Reply-To: Message-ID: On Fri, 4 Apr 2003, Rasmus Reinhold Paulsen wrote: > For the last two days I have experienced problems trying to reach > public.kitware.com and www.itk.org. Traceroute can't even resolve the > addresses. Anyone else having similar problems? I had it today. For some reason a nameserver (in Europe/Tallinn, tried on different independent hosts) could not resolve these host names: $ host www.itk.org Nameserver not responding www.itk.org A record not found, try again but in US machine there was no problem. As a quick fix, I added 24.97.130.18 www.kitware.com 24.97.130.19 www.vtk.org 24.97.130.19 www.itk.org 24.97.130.19 public.kitware.com to /etc/hosts. HTH, Pearu From berklist at nycap.rr.com Mon Apr 7 09:30:12 2003 From: berklist at nycap.rr.com (Berk Geveci) Date: 07 Apr 2003 09:30:12 -0400 Subject: [vtkusers] vtkMesaRenderWindow problem ( related to Mangled Mesa) In-Reply-To: References: Message-ID: <1049722215.25946.25.camel@caemlyn.kitwarein.com> > I compiled VTK-4.2.1 with mangled mesa on Redhat 8.0. I can run the example > VTK/Rendering/Testing/Tcl/MesaText.tcl. But I can not run the script located > in VTK/Examples/MangledMesa/Tcl: OffScreenCone.tcl and > OffScreenPrinting.tcl. The error is there is no "vtkMesaRenderWindow". I do > not know why. I compiled the vtk package according to the > Examples/MangledMesa/readme.txt. The Mesa library I used is Mesa-5.0.1. These two scripts are broken. They will be fixed in VTK 4.2.2. For now, you can edit them and replace vtkMesaRenderWindow with vtkXMesaRenderWindow to fix the problem. > Could you give me some help on this problem? I compile this function mainly > for animation , generating a series of png files, then use other software to > combine them to a avi file. I could not use vtkRenderWindowToImage to write > more than one output file. If you do not need offscreen rendering, you don't have to use mangled mesa. Just use a vtkRenderWindowToImage (make sure you call Modified() on it everytime you render a new image). From mstenzel at pankow.in-berlin.de Mon Apr 7 14:21:17 2003 From: mstenzel at pankow.in-berlin.de (Martin Stenzel) Date: Mon, 7 Apr 2003 20:21:17 +0200 (CEST) Subject: [vtkusers] VTK does not compile on AIX Message-ID: Hi there, since I want to install "slicer" I am in need of installing VTK version 4.0 (Version 4.2 not (yet) supported). My system is AIX 4.3.3 (running on an RS/6000). I am using the GNU tools (gcc, g++) IBM provides with the Toolbox. I downloaded the official Linux version and jumped into the source tree. I defined my compiler by pointing CC and CXX to the appropriate programs. Well, cmake (version 1.4.7) works fine (I activated Tcl) and some libraries are built (e.g. libvtkCommon.so, libvtkCommonTCL.so, libvtkpng.so) to name a few. However, the build does not complete: g -I/scratch/tmp/VTK/Imaging -I/scratch/tmp/VTK/Graphics -I/scratch/tmp/VTK/IO -I/scratch/tmp/VTK/Utilities/zlib -I/scratch/tmp/VTK/Utilities/png -I/scratch/tmp/VTK/Utilities/jpeg -I/scratch/tmp/VTK/Common/Testing/Cxx -c /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx -o vtkAssignAttribute.o /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx: In method `vtkAssignAttribute::vtkAssignAttribute ()': /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx:71: invalid use of type decl `enum vtkAssignAttribute::AttributeLocation' as expression /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx:73: invalid use of type decl `enum vtkAssignAttribute::AttributeLocation' as expression /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx: In method `void vtkAssignAttribute::Assign (const char *, int, int)': /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx:113: invalid use of type decl `enum vtkAssignAttribute::AttributeLocation' as expression /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx: In method `void vtkAssignAttribute::Assign (int, int, int)': /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx:139: invalid use of type decl `enum vtkAssignAttribute::AttributeLocation' as expression /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx: In method `void vtkAssignAttribute::Execute ()': /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx:221: invalid use of type decl `enum vtkAssignAttribute::AttributeLocation' as expression /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx:225: invalid use of type decl `enum vtkAssignAttribute::AttributeLocation' as expression /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx:225: switch quantity not an integer /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx: In method `void vtkAssignAttribute::PrintSelf (ostream &, vtkIndent)': /scratch/tmp/VTK/Graphics/vtkAssignAttribute.cxx:271: invalid use of type decl `enum vtkAssignAttribute::AttributeLocation' as expression make: 1254-004 The error code from the last command is 1. I am not really into C programming, what went wrong? Many thanks in advance, M. Stenzel -- -- -- -- -- -- -- -- -- --- M.Stenzel, Berlin, Germany mstenzel at pank0w.in-berlin.de -- -- -- -- -- -- -- -- -- --- GPG key available: http://me.in-berlin.de/~pankow -- -- -- -- -- -- -- -- -- --- From dmpd at onetel.net.uk Mon Apr 7 15:17:16 2003 From: dmpd at onetel.net.uk (D.M.P.Davies) Date: Mon, 07 Apr 2003 20:17:16 +0100 Subject: [vtkusers] Clipping Sufaces With Constant Value Surfaces Message-ID: <3E91CEBC.3B6CA741@onetel.net.uk> Hello vtkUsers, Does anyone know if it is possible to clip an unstructured grid boundary with surfaces of two contour values and combine the clipped edges (say with thresholding) to give a solid looking bounded set of polygons? It's the boundary clipping that seems the difficulty. Many Thanks Dave (Davies) From scharver at evl.uic.edu Mon Apr 7 17:44:53 2003 From: scharver at evl.uic.edu (Chris Scharver) Date: Mon, 7 Apr 2003 16:44:53 -0500 Subject: [vtkusers] Line distance implicit function Message-ID: Hello, I would like to use a distance function to clip some poly data. I don't need to visualize the distance function, so vtkImplicitModeller isn't quite what I want. However, it does seem to provide the core functionality of sampling distance from a line. I want to use a vtkImplicitFunction with vtkClipPolyData. The input is just a list of lines, but I don't want the sampled volume since that would not match with my polygon data. Do I need to create my own vtkImplicitFunction from scratch, or is there something already available of which I can take advantage? Looking at vtkImplicitModeller.cxx, it seems like I may be able to use vtkCell::EvaluatePosition() to take care of the work for me. Would vtkPolyLine's implementation for that method correctly determine an input point's distance from a given line? Or I am being overly optimistic? :) Thanks, Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 From andy.cedilnik at kitware.com Mon Apr 7 17:56:12 2003 From: andy.cedilnik at kitware.com (Andy Cedilnik) Date: 07 Apr 2003 17:56:12 -0400 Subject: [vtkusers] About problems with connecting to www.vtk.org Message-ID: <1049752572.19265.35.camel@xanth> Hello All, Since people are worried, let me answer like this: All our servers are working fine. www.vtk.org is the same server as public.kitware.com and that is one that manages all our mailing lists. So, if you get e-mail from this list, that means that on our side things more or less work. The reason for recent problem is therefore not the servers themselves, but the network between wherever you are and downtown Clifton Park, NY. That said, I suspect it may had something to do with the ice storm we had here last weekend. It did cut down a whole bunch of electricity, phone, and cable TV lines. Since Internet needs electricity, chances are that parts of the local infrastructure was also down. Thank you for your concern. Andy Cedilnik Kitware Inc. From clinton at elemtech.com Mon Apr 7 18:07:13 2003 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 07 Apr 2003 16:07:13 -0600 Subject: [vtkusers] window resize behavior Message-ID: <3E91F691.6040804@elemtech.com> Hi, Why is it that if you have a window with a high width to height ratio, the model gets small to fit? But when you have a high height to width ratio, the model doesn't get small? Is there any way to set it so that if your window is shrinking in width that the model gets smaller too? Thanks, Clint From David.Pont at ForestResearch.co.nz Mon Apr 7 19:35:17 2003 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Tue, 8 Apr 2003 11:35:17 +1200 Subject: [vtkusers] Line distance implicit function Message-ID: Hi Chris, I think you could use vtkImplicitModeller followed by vtkImplicitDataSet but this is very inefficient. It seems vtkImplicitModeller is like vtkImplicitFunction and vtkSampleFunction rolled up together. It would be nice to unroll this: make a class derived from vtkImplicitFunction which contains the EvaluatePosition stuff to get the distance functionality. You might have to use local differences to get the gradient? Then you could pass this new implicit function directly to the clipper. This sounds much smarter, and a useful class. regards Dave Pont |--------+---------------------------------> | | Chris Scharver | | | | | | Sent by: | | | vtkusers-admin at public.k| | | itware.com | | | | | | | | | 08/04/2003 09:44 | | | | |--------+---------------------------------> >------------------------------------------------------------------------------------------------------------| | | | To: vtkusers at public.kitware.com | | cc: | | Subject: [vtkusers] Line distance implicit function | >------------------------------------------------------------------------------------------------------------| Hello, I would like to use a distance function to clip some poly data. I don't need to visualize the distance function, so vtkImplicitModeller isn't quite what I want. However, it does seem to provide the core functionality of sampling distance from a line. I want to use a vtkImplicitFunction with vtkClipPolyData. The input is just a list of lines, but I don't want the sampled volume since that would not match with my polygon data. Do I need to create my own vtkImplicitFunction from scratch, or is there something already available of which I can take advantage? Looking at vtkImplicitModeller.cxx, it seems like I may be able to use vtkCell::EvaluatePosition() to take care of the work for me. Would vtkPolyLine's implementation for that method correctly determine an input point's distance from a given line? Or I am being overly optimistic? :) Thanks, Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: < http://public.kitware.com/cgi-bin/vtkfaq> Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From Neil.Killeen at atnf.csiro.au Mon Apr 7 21:30:29 2003 From: Neil.Killeen at atnf.csiro.au (Neil Killeen) Date: Tue, 8 Apr 2003 11:30:29 +1000 (EST) Subject: [vtkusers] vtkImageMapper error In-Reply-To: <4926A5BE4AFE7C4A83D5CF5CDA7B7754071244@oxcore01.mirada-solutions.com> Message-ID: John On Mon, 7 Apr 2003, John Biddiscombe wrote: > Sorry, I realized after I sent this that looking to see if thewidth/height are zero doen't help because you've set the custom extents anyway. In this case I'm lost for an idea. I can only suggest stepping through the code and seeing where the error happesn. maybe then some idea will spring to mind... > > JB > ok. when i get the chance then i will build a debug version and see where the error occurs. It is not triggered until the pipeline is activated, so it could be anywhere. We don't run only Solaris. Our two main platforms are solaris and linux. In the nearish future we will largely develop with Linux though. Does the dahsboard under Solaris show any problem for this class ? cheers Neil > -----Original Message----- > From: John Biddiscombe > Sent: 07 April 2003 11:23 > To: Neil Killeen; John Biddiscombe > Cc: Glen.Coates at csiro.au; vtkusers at public.kitware.com > Subject: RE: [vtkusers] vtkImageMapper error > > > Neil, > > >> > Under Linux indeed this changed the behaviour to something > more sensible. > << > > Good. > > >> > Under Solaris I still get a Bus Error, even with this new code. > Do you have the opportunity to try it under Solaris ? > >> > > Hmmmm. I'm afraid I haven't touched a solaris box for a long time and can't get a hold of one easily. Can you step through the imagemapper code and see where the error happens? Does it happen every time or just when the window becomes zero sized or anything like that? The only thing that the RenderToRectangle code really does is insert an additional glPixelZoom( float,float) call before the draw and then glPixelZoom( 1.0, 1.0) afterwards. > > if (self->GetRenderToRectangle()) > { > int rectwidth = (actorPos2[0] - actorPos[0]) + 1; > int rectheight = (actorPos2[1] - actorPos[1]) + 1; > float xscale = (float)rectwidth/width; > float yscale = (float)rectheight/height; > glPixelZoom(xscale, yscale); > } > is really it. width and height are the (visible) image dimensions and are wrong when the image is cropped - that's the bug you have just found - can you see if they are becoming zero at any point. possibly some bug in unrelated code is causing a div by zero or something. can you try inserting a check wherever you see the above lines? (they appear many times in vtkopenglimagemapper) > > JB > PS why solaris and nothing else? > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From kch90 at dvis.cs.ccu.edu.tw Mon Apr 7 22:06:35 2003 From: kch90 at dvis.cs.ccu.edu.tw (Ivan Kuo) Date: Tue, 8 Apr 2003 10:06:35 +0800 Subject: [vtkusers] Run-time error of vtkStreamLine in vtk4.2.1 Message-ID: <000801c2fd73$7b62bcd0$67657b8c@IVAN> Hi, I follow the example of vtkStreamLine in the document of vtk4.0.2 and the code works fine in vtk4.0.2. When i port it to the vtk4.2.1, the code occurs a run-time error: "Error: In c:\martlink\vtk42\vtk\Graphics\vtkStreamer.cxx, line 475 vtkStreamLine(0X0ADB09F0) No vector data defined!!" my environment is "Windows" with "vtk Java". I can't figure out which function causes error in vtk 4.2.1 after reading the example vtkStreamLine in 4.2.1 document. Or any example about "vtkPLOT3DReader with vtkStreamLine" is available? I would really appreciate any help. below is my main code: p3dReader.SetXYZFileName(baseDir+ grid); p3dReader.SetQFileName(baseDir+ solution); p3dReader.SetScalarFunctionNumber(153); p3dReader.SetVectorFunctionNumber(200); p3dReader.Update(); vtkLineSource rake = new vtkLineSource(); rake.SetPoint1(0, 0, 0); rake.SetPoint2(2, 2, 2); rake.SetResolution(21); vtkRungeKutta4 integ= new vtkRungeKutta4(); vtkStreamLine streamers= new vtkStreamLine(); streamers.SetInput(p3dReader.GetOutput()); streamers.SetSource(rake.GetOutput()); streamers.SetIntegrator(integ); streamers.SetMaximumPropagationTime(MPT); streamers.SpeedScalarsOn(); streamers.SetIntegrationStepLength(ISL); streamers.SetStepLength(0.25); vtkPolyDataMapper mapTubes= new vtkPolyDataMapper(); mapTubes.SetInput(streamers.GetOutput()); mapTubes.SetScalarRange(p3dReader.GetOutput().GetScalarRange()); Ivan Kuo kch90 at cs.ccu.edu.tw -------------- next part -------------- An HTML attachment was scrubbed... URL: From Neil.Killeen at atnf.csiro.au Mon Apr 7 22:06:51 2003 From: Neil.Killeen at atnf.csiro.au (Neil Killeen) Date: Tue, 8 Apr 2003 12:06:51 +1000 (EST) Subject: [vtkusers] Python Utility library In-Reply-To: Message-ID: I'm trying to get python 2.1 running with vtk now. In http://public.kitware.com/pipermail/vtkusers/2003-April/017189.html it was advised "Just point PYTHON_UTIL_LIBRARY to the location of python21.lib file. This file should be in libs subdirectory of your python installation. Andy" but this file does not exist anywhere in my python2.1 installation e.g. % pwd /usr/local/lib/python2.1 % find . -name "python*" -print ./config/python.o I do have % find . -name "lib*" -print ./site-packages/libglade.py ./site-packages/Pmw/Pmw_0_8_5/lib ./site-packages/libglade.pyo ./site-packages/libglade.pyc ./lib-old ./lib-dynload ./lib-tk ./config/libpython2.1.a ./config/libpython2.1.so so the only real library is the last one; but I thought this was where I should be pointing PYTHON_LIBRARY not PYTHON_UTIL_LIBRARY So I too have nothing to point this cmake variable at ! Does this indicate the python installations are not complete perhaps ? thanks Neil From chandranram4u at rediffmail.com Tue Apr 8 00:40:58 2003 From: chandranram4u at rediffmail.com (ramu chandran) Date: 8 Apr 2003 04:40:58 -0000 Subject: [vtkusers] Angle Calculation Message-ID: <20030408044058.17361.qmail@webmail7.rediffmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Neil.Killeen at atnf.csiro.au Tue Apr 8 01:57:29 2003 From: Neil.Killeen at atnf.csiro.au (Neil Killeen) Date: Tue, 8 Apr 2003 15:57:29 +1000 (EST) Subject: [vtkusers] vtk/Python build In-Reply-To: Message-ID: <49AA3A3C863E5B4C911320AEF99E5DA303A2C8C9-200000@wing-ep.tip.csiro.au> G'day again... I succesfully built the python wrappers under Linux (vtk 4.2, python 2.1). The mysterious PYTHON_UTIL library automatically (not sure how as the FindPythonLibs.cmake file does not try to find this library) put itself down to be /usr/lib/libutil.a phoenix-235% ar tv libutil.a rw-r--r-- 0/0 1936 Sep 18 19:41 2002 login.o rw-r--r-- 0/0 968 Sep 18 19:41 2002 login_tty.o rw-r--r-- 0/0 1344 Sep 18 19:41 2002 logout.o rw-r--r-- 0/0 1144 Sep 18 19:41 2002 logwtmp.o rw-r--r-- 0/0 1708 Sep 18 19:41 2002 openpty.o rw-r--r-- 0/0 1032 Sep 18 19:41 2002 forkpty.o This library was used in the link for 'vtkpython'. I don't know if it is the right one or if it is even needed. Under Solaris I didn't do so well. It failed to build the shareable object libvtkCommonPython.so (the command is appended below) generating allocation linker errors (see attachment for some sample errors). For the named symbols (e.g. like PyErr_Format) I could not find where they might live. I tried a few things but could not get it to build. I compared the build command with the linux one and it is identical except that under linux I used -lpthread instead of -lthread (tried adding that to no avail). I get the impression that there aren't many Solaris vtk systems out there (the dashboard has only one with no output presently) so I am not too hopeful that anybody has vtkpython running under Solaris :-( cheers Neil #!/bin/csh gcc-3.1.1 -fPIC -shared -o /nfs/mid/software/vtk/binary/sun4sol/bin/libvtkCommonPython.so \ vtkCommonPythonInit.o vtkAbstractMapperPython.o vtkAbstractTransformPython.o vtkActor2DPython.o \ vtkActor2DCollectionPython.o vtkAmoebaMinimizerPython.o vtkAssemblyNodePython.o \ vtkAssemblyPathPython.o vtkAssemblyPathsPython.o vtkBitArrayPython.o \ vtkByteSwapPython.o vtkCellPython.o vtkCell3DPython.o vtkCellArrayPython.o vtkCellDataPython.o vtkCellLinksPython.o \ vtkCellTypesPython.o vtkCharArrayPython.o vtkCollectionPython.o vtkCollectionIteratorPython.o vtkContourValuesPython.o \ vtkConvexPointSetPython.o vtkCoordinatePython.o vtkCriticalSectionPython.o vtkCylindricalTransformPython.o \ vtkDataArrayPython.o vtkDataArrayCollectionPython.o vtkDataArrayCollectionIteratorPython.o vtkDataArraySelectionPython.o \ vtkDataObjectPython.o vtkDataObjectCollectionPython.o vtkDataSetPython.o vtkDataSetAttributesPython.o \ vtkDataSetCollectionPython.o vtkDebugLeaksPython.o vtkDirectoryPython.o vtkDoubleArrayPython.o vtkDynamicLoaderPython.o \ vtkEdgeTablePython.o vtkEmptyCellPython.o vtkExplicitCellPython.o vtkExtentTranslatorPython.o vtkFieldDataPython.o vtkFileOutputWindowPython.o vtkFloatArrayPython.o vtkFunctionParserPython.o \ vtkFunctionSetPython.o vtkGeneralTransformPython.o \ vtkGenericCellPython.o vtkHeapPython.o vtkHexahedronPython.o vtkHomogeneousTransformPython.o vtkIdListPython.o \ vtkIdListCollectionPython.o vtkIdTypeArrayPython.o vtkIdentityTransformPython.o \ vtkImageDataPython.o vtkImplicitFunctionPython.o \ vtkImplicitFunctionCollectionPython.o vtkIndentPython.o vtkInitialValueProblemSolverPython.o vtkInstantiatorPython.o \ vtkIntArrayPython.o vtkInterpolatedVelocityFieldPython.o vtkLinePython.o vtkLinearTransformPython.o vtkLocatorPython.o \ vtkLogLookupTablePython.o vtkLongArrayPython.o vtkLookupTablePython.o vtkMapper2DPython.o vtkMathPython.o \ vtkMatrix4x4Python.o vtkMatrixToHomogeneousTransformPython.o vtkMatrixToLinearTransformPython.o \ vtkMultiPartExtentTranslatorPython.o vtkMultiThreaderPython.o vtkMutexLockPython.o vtkNonLinearCellPython.o \ vtkObjectPython.o vtkObjectBasePython.o vtkObjectFactoryPython.o vtkObjectFactoryCollectionPython.o \ vtkOrderedTriangulatorPython.o vtkOutputWindowPython.o vtkOverrideInformationPython.o \ vtkOverrideInformationCollectionPython.o vtkPerspectiveTransformPython.o vtkPixelPython.o vtkPlanePython.o \ vtkPlaneCollectionPython.o vtkPlanesPython.o vtkPointDataPython.o vtkPointLocatorPython.o vtkPointSetPython.o \ vtkPointsPython.o vtkPolyDataPython.o vtkPolyLinePython.o vtkPolyVertexPython.o vtkPolygonPython.o \ vtkPriorityQueuePython.o vtkProcessObjectPython.o vtkPropPython.o vtkPropAssemblyPython.o vtkPropCollectionPython.o \ vtkProperty2DPython.o vtkPyramidPython.o vtkQuadPython.o vtkQuadraticEdgePython.o vtkQuadraticHexahedronPython.o \ vtkQuadraticQuadPython.o vtkQuadraticTetraPython.o vtkQuadraticTrianglePython.o vtkQuadricPython.o \ vtkRectilinearGridPython.o vtkReferenceCountPython.o vtkRungeKutta2Python.o vtkRungeKutta4Python.o \ vtkRungeKutta45Python.o vtkScalarsToColorsPython.o vtkShortArrayPython.o vtkSourcePython.o vtkSphericalTransformPython.o \ vtkStructuredDataPython.o vtkStructuredGridPython.o vtkStructuredPointsPython.o vtkTableExtentTranslatorPython.o \ vtkTensorPython.o vtkTetraPython.o vtkTimeStampPython.o vtkTimerLogPython.o vtkTransformPython.o \ vtkTransformCollectionPython.o vtkTrianglePython.o vtkTriangleStripPython.o vtkUnsignedCharArrayPython.o \ vtkUnsignedIntArrayPython.o vtkUnsignedLongArrayPython.o vtkUnsignedShortArrayPython.o vtkUnstructuredGridPython.o \ vtkVersionPython.o vtkVertexPython.o vtkViewportPython.o vtkVoidArrayPython.o vtkVoxelPython.o vtkWarpTransformPython.o \ vtkWedgePython.o vtkWindowPython.o vtkWindowLevelLookupTablePython.o vtkXMLFileOutputWindowPython.o vtkPythonUtil.o \ -L. -L/nfs/mid/software/vtk/binary/sun4sol/bin -L/usr/local/lib/python2.1/config -lpython2.1 \ -lvtkCommon -lthread -ldl -lm \ -Wl,-R.:/nfs/mid/software/vtk/binary/sun4sol/bin:/usr/local/lib/python2.1/config -------------- next part -------------- Text relocation remains referenced against symbol offset in file 0x22ec /usr/local/lib/python2.1/config/libpython2.1.a(listobject.o) 0x22f0 /usr/local/lib/python2.1/config/libpython2.1.a(listobject.o) 0x120c /usr/local/lib/python2.1/config/libpython2.1.a(object.o) 0x3ec0 /usr/local/lib/python2.1/config/libpython2.1.a(stringobject.o) 0x505c /usr/local/lib/python2.1/config/libpython2.1.a(stringobject.o) 0xcd4 /usr/local/lib/python2.1/config/libpython2.1.a(tupleobject.o) 0xed8 /usr/local/lib/python2.1/config/libpython2.1.a(unicodeobject.o) 0x6c10 /usr/local/lib/python2.1/config/libpython2.1.a(ceval.o) 0x394 /usr/local/lib/python2.1/config/libpython2.1.a(future.o) 0x1760 /usr/local/lib/python2.1/config/libpython2.1.a(getargs.o) 0x1a48 /usr/local/lib/python2.1/config/libpython2.1.a(import.o) 0x1898 /usr/local/lib/python2.1/config/libpython2.1.a(marshal.o) 0x1a84 /usr/local/lib/python2.1/config/libpython2.1.a(marshal.o) 0x1a88 /usr/local/lib/python2.1/config/libpython2.1.a(marshal.o) 0xd38 /usr/local/lib/python2.1/config/libpython2.1.a(modsupport.o) 0xd3c /usr/local/lib/python2.1/config/libpython2.1.a(modsupport.o) 0x1fc8 /usr/local/lib/python2.1/config/libpython2.1.a(pythonrun.o) 0x1fcc /usr/local/lib/python2.1/config/libpython2.1.a(pythonrun.o) 0x2b0 /usr/local/lib/python2.1/config/libpython2.1.a(structmember.o) 0x340 /usr/local/lib/python2.1/config/libpython2.1.a(_sre.o) 0x2c3c /usr/local/lib/python2.1/config/libpython2.1.a(_sre.o) 0x710 /usr/local/lib/python2.1/config/libpython2.1.a(tokenizer.o) 0xb40 /usr/local/lib/python2.1/config/libpython2.1.a(tokenizer.o) 0x0 /usr/local/lib/python2.1/config/libpython2.1.a(import.o) 0x10 /usr/local/lib/python2.1/config/libpython2.1.a(dynload_shlib.o) 0x14 /usr/local/lib/python2.1/config/libpython2.1.a(pystate.o) 0x18 /usr/local/lib/python2.1/config/libpython2.1.a(pystate.o) 0x8 /usr/local/lib/python2.1/config/libpython2.1.a(getcompiler.o) PyExc_TypeError 0x4 /usr/local/lib/python2.1/config/libpython2.1.a(abstract.o) PyExc_TypeError 0x8 /usr/local/lib/python2.1/config/libpython2.1.a(abstract.o) PyExc_TypeError 0x4b4 /usr/local/lib/python2.1/config/libpython2.1.a(abstract.o) PyExc_TypeError 0x4f4 /usr/local/lib/python2.1/config/libpython2.1.a(rangeobject.o) PyRun_InteractiveOneFlags 0x870 /usr/local/lib/python2.1/config/libpython2.1.a(pythonrun.o) PyRun_InteractiveOneFlags 0x898 /usr/local/lib/python2.1/config/libpython2.1.a(pythonrun.o) PyDict_Size 0x1078 /usr/local/lib/python2.1/config/libpython2.1.a(classobject.o) PyModule_GetFilename 0x470 /usr/local/lib/python2.1/config/libpython2.1.a(moduleobject.o) memchr 0x1274 /usr/local/lib/python2.1/config/libpython2.1.a(fileobject.o) memchr 0x1390 /usr/local/lib/python2.1/config/libpython2.1.a(fileobject.o) PyParser_SimpleParseFile 0xe98 /usr/local/lib/python2.1/config/libpython2.1.a(import.o) PyParser_SimpleParseFile 0x19b8 /usr/local/lib/python2.1/config/libpython2.1.a(pythonrun.o) PyParser_SimpleParseFile 0x1a5c /usr/local/lib/python2.1/config/libpython2.1.a(pythonrun.o) _PyUnicode_ToLowercase 0x3c30 /usr/local/lib/python2.1/config/libpython2.1.a(unicodeobject.o) PyMember_Get 0x43a8 /usr/local/lib/python2.1/config/libpython2.1.a(classobject.o) PyMember_Get 0x3e0 /usr/local/lib/python2.1/config/libpython2.1.a(funcobject.o) PyObject_GetAttrString 0x2c60 /usr/local/lib/python2.1/config/libpython2.1.a(abstract.o) PyObject_GetAttrString 0x298c /usr/local/lib/python2.1/config/libpython2.1.a(classobject.o) PyString_Format 0x105c /usr/local/lib/python2.1/config/libpython2.1.a(abstract.o) PyBuffer_Type 0x2c /usr/local/lib/python2.1/config/libpython2.1.a(bufferobject.o) PyClass_Type 0x2f60 /usr/local/lib/python2.1/config/libpython2.1.a(abstract.o) PyMarshal_WriteObjectToFile 0xf64 /usr/local/lib/python2.1/config/libpython2.1.a(import.o) strrchr 0xb14 /usr/local/lib/python2.1/config/libpython2.1.a(errors.o) link 0x7c4 /usr/local/lib/python2.1/config/libpython2.1.a(posixmodule.o) link 0x7d4 /usr/local/lib/python2.1/config/libpython2.1.a(posixmodule.o) PyExc_IOError 0x2b0 /usr/local/lib/python2.1/config/libpython2.1.a(object.o) 0x2d9c /usr/local/lib/python2.1/config/libpython2.1.a(abstract.o) 0x2da0 /usr/local/lib/python2.1/config/libpython2.1.a(abstract.o) _PyErr_BadInternalCall 0xf3c /usr/local/lib/python2.1/config/libpython2.1.a(classobject.o) _PyErr_BadInternalCall 0x414c /usr/local/lib/python2.1/config/libpython2.1.a(classobject.o) 0xa4 /usr/local/lib/python2.1/config/libpython2.1.a(floatobject.o) PyTuple_Type 0x884 /usr/local/lib/python2.1/config/libpython2.1.a(tupleobject.o) PyTuple_Type 0x888 /usr/local/lib/python2.1/config/libpython2.1.a(tupleobject.o) Py_GetExecPrefix 0xd48 /usr/local/lib/python2.1/config/libpython2.1.a(sysmodule.o) setreuid 0x18dc /usr/local/lib/python2.1/config/libpython2.1.a(posixmodule.o) PyLong_AsDouble 0x578 /usr/local/lib/python2.1/config/libpython2.1.a(floatobject.o) frexp 0x21c /usr/local/lib/python2.1/config/libpython2.1.a(longobject.o) frexp 0x158c /usr/local/lib/python2.1/config/libpython2.1.a(object.o) PyExc_KeyError 0x68c /usr/local/lib/python2.1/config/libpython2.1.a(funcobject.o) PyExc_KeyError 0x694 /usr/local/lib/python2.1/config/libpython2.1.a(funcobject.o) statvfs 0x2a58 /usr/local/lib/python2.1/config/libpython2.1.a(posixmodule.o) free 0x4e8 /usr/local/lib/python2.1/config/libpython2.1.a(classobject.o) free 0x1310 /usr/local/lib/python2.1/config/libpython2.1.a(classobject.o) From ramakrishna.prakash at quest-global.com Tue Apr 8 03:13:31 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Tue, 8 Apr 2003 12:43:31 +0530 Subject: [vtkusers] vtkPointSet Message-ID: <000701c2fd9e$5cf586d0$de0ba8c0@qtwblr01.questglobal.com> Hi All, I have a collection of points (vtkPoints) which may define a line or a curve. How can I break this into points of uniform distance? Help. Thanks Shyam From nanditha_thakur at rediffmail.com Tue Apr 8 03:37:15 2003 From: nanditha_thakur at rediffmail.com (Nanditha Thakur) Date: 8 Apr 2003 07:37:15 -0000 Subject: [vtkusers] Disk Message-ID: <20030408073715.21327.qmail@mailweb33.rediffmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From I.deBoer at polytec.de Tue Apr 8 03:40:07 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Tue, 8 Apr 2003 09:40:07 +0200 Subject: [vtkusers] How to create a polygon hole in a texture ? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F372@02polywbr.waldbronn.polytec.de> Hi, this is really killing me! How can I create a simple hole in my plane texture? I have something like: float fAspectRatio = (float)iImageWidth/(float)iImageHeight; vtkBMPReader *bmpReader = vtkBMPReader::New(); bmpReader->SetFileName(cstrImageName); vtkTexture *atext = vtkTexture::New(); atext->SetInput(bmpReader->GetOutput()); vtkPlaneSource *plane = vtkPlaneSource::New(); plane->SetOrigin( 0.0, 0.0, 0.0); plane->SetPoint1( fAspectRatio*0.5, 0.0, 0.0); plane->SetPoint2( 0.0, 0.5, 0.0); plane->SetCenter( 0.0, 0.0, 0.0); vtkPolyDataMapper *planeMapper = vtkPolyDataMapper::New(); planeMapper->SetInput(plane->GetOutput()); m_pvtkActor->SetMapper(planeMapper); m_pvtkActor->SetTexture(atext); m_pvtkRenderer->AddActor(m_pvtkActor); Now, I want to put two holes in my texture, one triangle and one quad. But I don't see how this works. I tried to use vtkClipDataSet in combination with vtkImplicitDataSet. But that didn't work out. I didn't get any hole. Then I tried something like: vtkSphere *sphere = vtkSphere::New(); sphere->SetRadius(.5); sphere->SetCenter(0,0,0); vtkClipPolyData *clipper = vtkClipPolyData::New(); clipper->SetInput(plane->GetOutput()); clipper->SetClipFunction(sphere); clipper->GenerateClipScalarsOn(); clipper->GenerateClippedOutputOn(); clipper->SetValue(0); .. planeMapper->SetInput(clipper->GetOutput()); .. Didn't work either. any hints ? thanks... greets Ingo From novalet at yahoo.com.cn Tue Apr 8 04:12:32 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Tue, 8 Apr 2003 16:12:32 +0800 (CST) Subject: [vtkusers] How to run vtk tcl script in c/c++ Message-ID: <20030408081232.91014.qmail@web15208.mail.bjs.yahoo.com> Hi! I recently working on an application which is written in c++ and it will generate vtk tcl script. I formerly run these script in windows explorer. They work nice. But to make the work more fluently, i try to run it in application itself when the user press some button. But i didn't work it out. Look, there is some simple sample i borrowed from web. ====================================================================================== #include #include #include /* defines TCL structures/procs etc... */ main(int argc, char *argv[]) { Tcl_Interp *interpreter; int status; char cmd[]="proc incr {n} {return [expr $n+1]};set n 5;puts \"incr $n=[incr $n]\";return Tcl_Eval"; /* get filename from command line */ if (argc != 2) { fprintf (stderr,"expected a TCL script file:e.g. \"%s fileName\"\n", argv[0]); exit(1); } /* create a new TCL interpreter, which contains all the TCL commands but no TCL variables, procedures and has an empty executuion stack */ interpreter = Tcl_CreateInterp(); /* Tcl_EvalFile passes the TCL script as a file */ status = Tcl_EvalFile(interpreter, argv[1]); if (*interpreter->result != 0) printf("computed by %s\n", interpreter->result); ====================================================================================== If i try to run a simple tcl scripts, for example ============================ puts "Hello world" ============================ it works. the console will receive "Hello world" but when i try to use a vtk script in various testing scripts in vtk4.2.1, the status returned is TCL_OK, but nothing happen in screen. If i try wish83 with this script, it works. So i think it is not a problem of TCLLIBPATH. any guru can give me some suggestion? PS. my OS is win2k, and vtk4.2.1, tcl/tk 8.3 ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ?????KTV, ????????OK~~ http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html From P.W.deBruin at its.tudelft.nl Tue Apr 8 04:49:05 2003 From: P.W.deBruin at its.tudelft.nl (Paul de Bruin) Date: Tue, 8 Apr 2003 10:49:05 +0200 Subject: [vtkusers] Python bindings / initial values / BuildLinks Message-ID: <20030408084905.GB16154@dutids.twi.tudelft.nl> Hi All, After an upgrade to the latest CVS of VTK the python bindings appear to be broken. Short example: #!/usr/bin/env python from vtk import * a=vtkPolyData() a.BuildLinks() which errors with: TypeError: function takes exactly 1 argument (0 given) (a.BuildLinks(0) works fine btw) The problem appears to be that the BuildLinks definition in vtkPolyData.h changed between versions 1.123 and 1.124 from: void BuildLinks(); to void BuildLinks(int initialSize=0); Apparently, something goes awry with the generation of python bindings and default parameters. Of course, one can think of several workarounds, but a permanent solution would be much appreciated. Regards, PdB -- ir. P.W. de Bruin, Delft University of Technology Faculty of Information Technology and Systems http://visualisation.tudelft.nl/~paul PGP-ID:CD36D25B From john.biddiscombe at mirada-solutions.com Tue Apr 8 05:20:56 2003 From: john.biddiscombe at mirada-solutions.com (John Biddiscombe) Date: Tue, 8 Apr 2003 10:20:56 +0100 Subject: [vtkusers] vtkImageMapper error Message-ID: <4926A5BE4AFE7C4A83D5CF5CDA7B7754071248@oxcore01.mirada-solutions.com> > Does the dahsboard under Solaris show any problem for this class ? No. And I'm a little unhappy about that because the Dashboard tests were re-vamped after the switch to vtk4.x and I noticed after your initial post that the RenderRectangle test is no longer part of the test suite. I had to surf the kitware cvs archives of old vtk releases to find the test so that I could double check your code (see if anything obvious was missing). If anyone from kitware is reading.... Why were so many tests removed? Actually, I'll cc this to the developers list... JB From andy.cedilnik at kitware.com Tue Apr 8 07:41:54 2003 From: andy.cedilnik at kitware.com (Andy Cedilnik) Date: 08 Apr 2003 07:41:54 -0400 Subject: [vtkusers] vtk/Python build In-Reply-To: <49AA3A3C863E5B4C911320AEF99E5DA303A2C8C9-200000@wing-ep.tip.csiro.au> References: <49AA3A3C863E5B4C911320AEF99E5DA303A2C8C9-200000@wing-ep.tip.csiro.au> Message-ID: <1049802114.19268.38.camel@xanth> Hi Neil, My mistake. I thought you are on Windows. On some Linux platforms libpython2.1.a depends on libutil.a. Unfortunately at the time CMake 1.6 was not released yet, so we are just looking for that library. It should however work fine without it if you do not have it. If it does not, let me know and I will fix it. Andy On Tue, 2003-04-08 at 01:57, Neil Killeen wrote: > G'day again... > > I succesfully built the python wrappers under Linux (vtk 4.2, python 2.1). > > The mysterious PYTHON_UTIL library automatically (not sure how as the > FindPythonLibs.cmake file does not try to find this library) put > itself down to be > > /usr/lib/libutil.a > > phoenix-235% ar tv libutil.a > rw-r--r-- 0/0 1936 Sep 18 19:41 2002 login.o > rw-r--r-- 0/0 968 Sep 18 19:41 2002 login_tty.o > rw-r--r-- 0/0 1344 Sep 18 19:41 2002 logout.o > rw-r--r-- 0/0 1144 Sep 18 19:41 2002 logwtmp.o > rw-r--r-- 0/0 1708 Sep 18 19:41 2002 openpty.o > rw-r--r-- 0/0 1032 Sep 18 19:41 2002 forkpty.o > > > This library was used in the link for 'vtkpython'. I don't know > if it is the right one or if it is even needed. > > Under Solaris I didn't do so well. It failed to build the shareable > object libvtkCommonPython.so (the command is appended below) generating > allocation linker errors (see attachment for some sample errors). For > the named symbols (e.g. like PyErr_Format) I could not find where they > might live. I tried a few things but could not get it to build. > > I compared the build command with the linux one and it is identical > except that under linux I used -lpthread instead of -lthread (tried > adding that to no avail). > > I get the impression that there aren't many Solaris vtk systems > out there (the dashboard has only one with no output presently) > so I am not too hopeful that anybody has vtkpython running > under Solaris :-( From ken.martin at kitware.com Tue Apr 8 09:06:13 2003 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 8 Apr 2003 09:06:13 -0400 Subject: [vtk-developers] RE: [vtkusers] vtkImageMapper error In-Reply-To: <4926A5BE4AFE7C4A83D5CF5CDA7B7754071248@oxcore01.mirada-solutions.com> Message-ID: <002301c2fdcf$a3d61890$4001a8c0@kitwarein.com> > If anyone from kitware is reading.... > > Why were so many tests removed? Three main possible reasons. First the test added no coverage. We removed all tests that added no coverage beyond other tests. They slow down the testing process and add no value (except as examples but tests are not supposed to be examples -- as a result of developer feedback). Second, the test may have been added to VTK after the 4.0 cvs repo was created and the person who added it never added it to the 4.0 cvs. The third possibility is that the test when examined was determined to be broken, armed & dangerous, etc., and was not included in 4.0. I don't know which is most likely for the specific test you are describing but it was probably one of those three. Thanks Ken From jdhunter at ace.bsd.uchicago.edu Tue Apr 8 10:02:53 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Tue, 08 Apr 2003 09:02:53 -0500 Subject: [vtkusers] Angle Calculation In-Reply-To: <20030408044058.17361.qmail@webmail7.rediffmail.com> ("ramu chandran"'s message of "8 Apr 2003 04:40:58 -0000") References: <20030408044058.17361.qmail@webmail7.rediffmail.com> Message-ID: >>>>> "ramu" == ramu chandran writes: ramu> Hi, How can I calculate the angle of the plane with respect ramu> to X, Y or Z axes using the normal of the plane. The angle any line makes with another line can be obtained from the relation: x . y = |x| |y| cos(alpha) where '.' is the dot product, |x| is the norm of x, and alpha is the angle between x and y. Thus if x and y have norm 1, you can get the angle as acos(x . y). In python: a = (1,0,0) # the normed x axis b = plane.GetNormal() # the normalized plane normal dotprod = vtk.vtkMath.Dot(a,b) alpha = acos(dotprod) # angle in radians I believe the normals from vtkPlanes are always normalized, but if you are dealing normals that don't have length 1, you can normalize them with vtk.vtkMath.Normalize(b) Ditto for the y and z axes. Now if you want the angle of the plane, rather than the normal, I think you'll just want to do 90 - 180.0/pi*alpha John Hunter From I.deBoer at polytec.de Tue Apr 8 10:18:41 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Tue, 8 Apr 2003 16:18:41 +0200 Subject: [vtkusers] How to animate/warp displacement ? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD93C19B6@02polywbr.waldbronn.polytec.de> Hi, I didn't find any easy-to-understand sample on this. Maybe someone can give some help on this? I have 5 points, like: vtkPoints *points = vtkPoints::New(); points->InsertPoint( 0, 0.0, 0.0, 0.0); points->InsertPoint( 1, 1.0, 0.0, 0.0); points->InsertPoint( 2, 1.0, 1.0, 0.0); points->InsertPoint( 3, 0.0, 1.0, 0.0); points->InsertPoint( 4, 0.5, 0.5, 0.0); There is a displacement in 3 stages for each point. The four corner points stay where they are. The middle point (index 4) moves to the following points: (0.5, 0.5, 0.25), (0.5, 0.75, 0.5), (0.5, 0.5, 1.0) I have set the points into a vtkStructuredGrid, than used a vtkStructuredGridGeometryFilter. After that I have do something like vtkWarpVector->SetInput(geomfilter->GetOutput()) right ? But where do I have to put my actual displacement ? Are ther any small/easy samples on this ? I only found dispPlot.tcl but it loads a file I doesn't help to understand what's behind all this. I converted the dispPlot to C++ and used a Timer to change the ScaleFactor of the WarpVector to do the actual animation, so that works... thanks & greets Ingo From jan.fransens at luc.ac.be Tue Apr 8 10:23:41 2003 From: jan.fransens at luc.ac.be (Jan Fransens) Date: Tue, 8 Apr 2003 16:23:41 +0200 Subject: [vtkusers] Point data generation Message-ID: Hi, I am currently working on an surface fitting algorithm and for testing purposes, I want to be able to generate virtual 360 degrees range scans of arbitrary 3D models. In other words, I would like to convert given polydata to a set of unstructured points, that together form a description of the objects surface. I would also like these points to be spaced evenly in space i.e. small triangles generate less point samples than larger ones. Does anyone have experience doing this kind of thing, or knows a preferred way to handle this? many thanks, j a n From winston at cat.rpi.edu Tue Apr 8 10:58:11 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Tue, 08 Apr 2003 10:58:11 -0400 Subject: [vtkusers] Disk References: <20030408073715.21327.qmail@mailweb33.rediffmail.com> Message-ID: <3E92E383.4030003@cat.rpi.edu> Nanditha Thakur wrote: > Hi, > I define three points. How can I construct a disk object which > will have these three points on its circumference. Please help me. I > don't know how to proceed. Proceed with Google: http://www.google.com/search?q=equation+circle+through+three+points+3d The second URL it returns gives some tips: http://mathforum.org/library/drmath/view/51726.html -Jeremy From MBeaver408 at aol.com Tue Apr 8 11:04:13 2003 From: MBeaver408 at aol.com (MBeaver408 at aol.com) Date: Tue, 8 Apr 2003 11:04:13 EDT Subject: [vtkusers] how so I unsubscribe to the detail and only get dugests Message-ID: <1ab.12fc2cd8.2bc43eed@aol.com> Is it possible to post this on some web site or in each e-mail from this group. -M Beaver -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcsalas at chilesat.net Tue Apr 8 12:02:31 2003 From: mcsalas at chilesat.net (mcsalas at chilesat.net) Date: Tue, 8 Apr 2003 12:02:31 -0400 Subject: [vtkusers] WireFrame and Render!! Message-ID: <3E91C761000002C7@mail.chilesat.net> Hi VTK User's, i have two surfaces in the vtkRenderWindow, the first is a Delaunay2D, and the other is a vtkPolygon. I try to call a wireframe only for the vtkPolygon surface, and not for the delaunay, how i make this?? i call wireframe pushing the "w" key. My other problem is with the vtkPolygon, when i call the wireframe, the surface show the wireframe cuting, this is some lines in the upper face, and the other lines in the down face, i want show the lines only in the upper face, i don't know what's happens. I atach some pics of this. (sorry for the size) Best regards from Chile, and Thank's in Advance Max. -------------- next part -------------- A non-text attachment was scrubbed... Name: side_down_voronoi.jpg Type: image/pjpeg Size: 7240 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: side_up_voronoi.jpg Type: image/pjpeg Size: 7252 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: voronoi and delaunay.jpg Type: image/pjpeg Size: 10759 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: surface_voronoi.jpg Type: image/pjpeg Size: 9155 bytes Desc: not available URL: From Kyle_Roberson at duratekinc.com Tue Apr 8 12:04:53 2003 From: Kyle_Roberson at duratekinc.com (Roberson, Kyle) Date: Tue, 8 Apr 2003 09:04:53 -0700 Subject: [vtkusers] Newbie: example of putting a series of hexahedren into an unstruc tured geometry Message-ID: <4C7EFB6E2A295648AFE702CA96CD482F9593D5@wmns1.duratekinc.com> I'm confused on how to put in more than one hexahedren into the same unstructured geometry. I've looked at the Python example and I can put in several each in their own unstructured geometry (by modifying BuildUGrid.py). But I want to load it up with an ABAQUS model so I can slice and dice the results. I've ordered the printed documentation, but it will be several weeks before that winds its way through purchasing. Anybody have a short python example that loads a few into the same unstructured geometry? -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.cook at cs.ucl.ac.uk Tue Apr 8 12:42:01 2003 From: p.cook at cs.ucl.ac.uk (Phil Cook) Date: Tue, 8 Apr 2003 17:42:01 +0100 Subject: [vtkusers] WireFrame and Render!! In-Reply-To: <20030408160102.20758.69609.Mailman@public.kitware.com> Message-ID: <0574CFC0-69E1-11D7-A08B-000393CEB57E@cs.ucl.ac.uk> On Tuesday, Apr 8, 2003, at 17:01 Europe/London, vtkusers-request at public.kitware.com wrote: > Hi VTK User's, i have two surfaces in the vtkRenderWindow, the first > is a > Delaunay2D, and the other is a vtkPolygon. I try to call a wireframe > only > for the vtkPolygon surface, and not for the delaunay, how i make this?? You can call actor->GetProperty()->SetRepresentationToWireframe() on an individual vtkActor. Pressing "w" causes this to be called for all Actors in the Renderer. Phil From Pedro.Patron at imag.fr Tue Apr 8 13:42:34 2003 From: Pedro.Patron at imag.fr (Pedro Patron) Date: Tue, 8 Apr 2003 19:42:34 +0200 Subject: [vtkusers] Example Medical3 doesnt run Message-ID: <200304081942.34583.Pedro.Patron@imag.fr> Hello, I'm doing an application for medical image. I need to show the three principal planes (axial, coronal, saggital) from a vtkVolume16Reader. I've executed the example Medical3.cxx and It renders only the translucent skin but not the planes. I don't know what's the problem. I'm using the 4.2.1 version of VTK over Linux Mandrake 9.0. Thank you in advance for your help. From hartley at comp.lancs.ac.uk Tue Apr 8 13:47:50 2003 From: hartley at comp.lancs.ac.uk (Edward Hartley) Date: Tue, 8 Apr 2003 18:47:50 +0100 Subject: [vtkusers] Building and Installing Python Wrappers Message-ID: <377889D6-69EA-11D7-A493-0003939CD440@comp.lancs.ac.uk> HI Are the VTK Python Wrappers built using Cable or hand crafted? Regards Ed Hartley From sxa at fluent.com Tue Apr 8 14:25:30 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Tue, 8 Apr 2003 14:25:30 -0400 Subject: [vtkusers] Question about Wireframe display ! Message-ID: <010101c2fdfc$3c7bafc0$8ae4e9c0@sxapc> Greetings ! We need to generate a CAD outline wireframes of our 3D shapes\solids. These shapes are created as follows : A) Starting from an initial polyline describing a non-convex polygon. B) Generating a surface for this polygon by using vtkGLUTesselatorFilter C) Creating a 3D shape by extruding the polygon along its normal. The normal VTK wireframe mode displays all the lines and it is too much. We would only need the main lines; those describing the shape as a volume. Is there a filter that would output the disired result ? (As shown in the image attached) Thanks ! _____________________________________ Seb -------------- next part -------------- A non-text attachment was scrubbed... Name: outline.jpg Type: image/jpeg Size: 22560 bytes Desc: not available URL: From brad.king at kitware.com Tue Apr 8 15:02:18 2003 From: brad.king at kitware.com (Brad King) Date: Tue, 8 Apr 2003 15:02:18 -0400 (EDT) Subject: [vtkusers] Building and Installing Python Wrappers In-Reply-To: <377889D6-69EA-11D7-A493-0003939CD440@comp.lancs.ac.uk> Message-ID: > Are the VTK Python Wrappers built using Cable or hand crafted? Neither. They are generated by a small tool that comes with VTK. It is built along with the rest of VTK when wrapping is on. All you need is to have python installed before you run CMake to build VTK. Then you can turn on the VTK_WRAP_PYTHON option to get python wrappers. -Brad From prabhu at aero.iitm.ernet.in Tue Apr 8 15:37:57 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Wed, 9 Apr 2003 01:07:57 +0530 Subject: [vtkusers] mayavi ValueError: method requires a vtk object In-Reply-To: <3E90D36C.7070801@itg.uiuc.edu> References: <3E90D36C.7070801@itg.uiuc.edu> Message-ID: <16019.9493.217330.761045@monster.linux.in> >>>>> "KG" == Karl Garsha writes: KG> Greetings, I've built VTK 4.2 + Python2.2 with Tkinter on [snip] KG> line 160, in __init__ capmapper.SetInput(pdata) ValueError: KG> method requires a VTK object Please read the FAQ entry here: http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq02.004.htp if that does not help try this: http://public.kitware.com/pipermail/vtkusers/2003-April/017122.html cheers, prabhu From prabhu at aero.iitm.ernet.in Tue Apr 8 15:40:31 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Wed, 9 Apr 2003 01:10:31 +0530 Subject: [vtkusers] (no subject) In-Reply-To: References: Message-ID: <16019.9647.280359.600150@monster.linux.in> >>>>> "ASL" == Sheldon L Applegate writes: ASL> I have not found VTK documentation / man pages with the ASL> Python syntax. VTK/Wrapping/Python/README_WRAP.txt should provide all the information you need. cheers, prabhu From scharver at evl.uic.edu Tue Apr 8 15:20:46 2003 From: scharver at evl.uic.edu (Chris Scharver) Date: Tue, 8 Apr 2003 14:20:46 -0500 Subject: [vtkusers] VTK Debug setting on OS X Message-ID: Hi, I noticed that the OS X build doesn't set CMAKE_CXX_FLAGS_DEBUG and CMAKE_C_FLAGS_DEBUG by default. These should be set to -g. Another project using VTK couldn't set these variables because I did not originally them when I built VTK, so UseVTK.cmake was overriding them. I'm not sure if this would be a VTK change or a CMake default setting change for the OS X compiler, but it should probably be set in one of the two places. Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 From David.Pont at ForestResearch.co.nz Tue Apr 8 17:21:06 2003 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Wed, 9 Apr 2003 09:21:06 +1200 Subject: [vtkusers] How to create a polygon hole in a texture ? Message-ID: Hi Ingo, You should try the SetXResolution and SetYResolution with some 'higher' values (16?) to clip your plane. I think the defaults are 1, so the plane has just one quad, all four corners are outside the implicit sphere and the clipper assumes there is no polygon to be clipped. Subdividing the plane will allow the clipper to work. You may want even higher resolution to get an accurate shaped hole. I dont know how clippers handle textures, hopefully texture coordinates are 'clipped' too. regards Dave Pont |--------+---------------------------------> | | "De Boer Ingo" | | | | | | Sent by: | | | vtkusers-admin at public.k| | | itware.com | | | | | | | | | 08/04/2003 19:40 | | | | |--------+---------------------------------> >------------------------------------------------------------------------------------------------------------| | | | To: | | cc: | | Subject: [vtkusers] How to create a polygon hole in a texture ? | >------------------------------------------------------------------------------------------------------------| Hi, this is really killing me! How can I create a simple hole in my plane texture? I have something like: float fAspectRatio = (float)iImageWidth/(float)iImageHeight; vtkBMPReader *bmpReader = vtkBMPReader::New(); bmpReader->SetFileName(cstrImageName); vtkTexture *atext = vtkTexture::New(); atext->SetInput(bmpReader->GetOutput()); vtkPlaneSource *plane = vtkPlaneSource::New(); plane->SetOrigin( 0.0, 0.0, 0.0); plane->SetPoint1( fAspectRatio*0.5, 0.0, 0.0); plane->SetPoint2( 0.0, 0.5, 0.0); plane->SetCenter( 0.0, 0.0, 0.0); vtkPolyDataMapper *planeMapper = vtkPolyDataMapper::New(); planeMapper->SetInput(plane->GetOutput()); m_pvtkActor->SetMapper(planeMapper); m_pvtkActor->SetTexture(atext); m_pvtkRenderer->AddActor(m_pvtkActor); Now, I want to put two holes in my texture, one triangle and one quad. But I don't see how this works. I tried to use vtkClipDataSet in combination with vtkImplicitDataSet. But that didn't work out. I didn't get any hole. Then I tried something like: vtkSphere *sphere = vtkSphere::New(); sphere->SetRadius(.5); sphere->SetCenter(0,0,0); vtkClipPolyData *clipper = vtkClipPolyData::New(); clipper->SetInput(plane->GetOutput()); clipper->SetClipFunction(sphere); clipper->GenerateClipScalarsOn(); clipper->GenerateClippedOutputOn(); clipper->SetValue(0); .. planeMapper->SetInput(clipper->GetOutput()); .. Didn't work either. any hints ? thanks... greets Ingo _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: < http://public.kitware.com/cgi-bin/vtkfaq> Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From David.Pont at ForestResearch.co.nz Tue Apr 8 17:24:20 2003 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Wed, 9 Apr 2003 09:24:20 +1200 Subject: [vtkusers] Point data generation Message-ID: Hi Jan, can you use vtkDecimate to reduce the number of triangles? run with different targets to get a set of LOD models. Then extract the points only (not cells). I dont know if there is a filter to do this but it could be done quite simply by iterating through the points in the data set and feeding them into a new unstructured grid. regards Dave Pont |--------+---------------------------------> | | "Jan Fransens" | | | | | | Sent by: | | | vtkusers-admin at public.k| | | itware.com | | | | | | | | | 09/04/2003 02:23 | | | | |--------+---------------------------------> >------------------------------------------------------------------------------------------------------------| | | | To: | | cc: | | Subject: [vtkusers] Point data generation | >------------------------------------------------------------------------------------------------------------| Hi, I am currently working on an surface fitting algorithm and for testing purposes, I want to be able to generate virtual 360 degrees range scans of arbitrary 3D models. In other words, I would like to convert given polydata to a set of unstructured points, that together form a description of the objects surface. I would also like these points to be spaced evenly in space i.e. small triangles generate less point samples than larger ones. Does anyone have experience doing this kind of thing, or knows a preferred way to handle this? many thanks, j a n _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: < http://public.kitware.com/cgi-bin/vtkfaq> Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From David.Pont at ForestResearch.co.nz Tue Apr 8 17:28:05 2003 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Wed, 9 Apr 2003 09:28:05 +1200 Subject: [vtkusers] Question about Wireframe display ! Message-ID: Hi Seb, Try vtkFeatureEdges, with FeatureEdgesOn and FeatureAngle about 80?. This is not exactly what you want but very close, should do the trick. regards Dave |--------+---------------------------------> | | "Sebastien Auclair" | | | | | | Sent by: | | | vtkusers-admin at public.k| | | itware.com | | | | | | | | | 09/04/2003 06:25 | | | | |--------+---------------------------------> >------------------------------------------------------------------------------------------------------------| | | | To: | | cc: | | Subject: [vtkusers] Question about Wireframe display ! | >------------------------------------------------------------------------------------------------------------| Greetings ! We need to generate a CAD outline wireframes of our 3D shapes\solids. These shapes are created as follows : A) Starting from an initial polyline describing a non-convex polygon. B) Generating a surface for this polygon by using vtkGLUTesselatorFilter C) Creating a 3D shape by extruding the polygon along its normal. The normal VTK wireframe mode displays all the lines and it is too much. We would only need the main lines; those describing the shape as a volume. Is there a filter that would output the disired result ? (As shown in the image attached) Thanks ! _____________________________________ Seb (See attached file: outline.jpg) -------------- next part -------------- A non-text attachment was scrubbed... Name: outline.jpg Type: image/jpeg Size: 22560 bytes Desc: not available URL: From Neil.Killeen at atnf.csiro.au Tue Apr 8 21:06:00 2003 From: Neil.Killeen at atnf.csiro.au (Neil Killeen) Date: Wed, 9 Apr 2003 11:06:00 +1000 (EST) Subject: [vtkusers] vtk/Python build In-Reply-To: <1049802114.19268.38.camel@xanth> Message-ID: On 8 Apr 2003, Andy Cedilnik wrote: > Hi Neil, > > My mistake. I thought you are on Windows. On some Linux platforms > libpython2.1.a depends on libutil.a. Unfortunately at the time CMake 1.6 > was not released yet, so we are just looking for that library. It should > however work fine without it if you do not have it. If it does not, let > me know and I will fix it. > > Andy > Andy no it was not your mistake. i was referring to someone else's post and your answer was to them - it was the only information i could find on this library. ok so it is clear now. Linux needs it, nothing much else seems to. Could the VTK CMakeLists.txt file have a Linux o/s dependency so that the PYTON_UTIL variable is not presented to the user when it is unnecessary (I spent some time trying to find out what it was and where it was) cheers Neil From smahaade at essence.utsi.edu Tue Apr 8 22:25:50 2003 From: smahaade at essence.utsi.edu (Subha) Date: Tue, 8 Apr 2003 20:25:50 -0600 Subject: [vtkusers] some oddities Message-ID: <20030403015710.M91725@mail2.utsi.edu> Hello all, I tried a small experiment using vtkContourFilter ( intended for use somewhere else). I used the code from vtkContourFilter::Execute() function in my main program (literally copied and pasted the code from the vtkContourFilter class in my program ) to generate an isosurface for a Structured Grid dataset and timed it. My program flows like this (program files also attached) method-1 (my program) ========= myMainProgram.cxx { reader->update() TIME START code from vtkContourFilter::Execute() with proper inputs, initializations TIME END above generated vtkPolyData polyDataMapper->SetInput(above generated polyData) renderWindow->render() } I also rendered the isosurface in the way it is usually done (I have timed this method between setting the input to contour filter and the render command because of the way the vtk pipeline works ). method-2 ======== TIME START contour->SetInput(structuredGrid) polydataMapper->SetInput(contour->GetOutput()) actor->setMapper(polyDataMapper) renderWindow->render() TIME END 1) Under the same load conditions on a dedicated PC, method-1 was significantly slower than method-2. Method-1 takes as much as 10 seconds more than method-2 to render a 7000 cell structured grid (which translates to that atleast 100 times the number of machine cycles on a 733 mhz and 512 mb ram linux machine). 2) Most of the time seems to have been taken by the vtkHexahedron::Contour(...) function ( this function is called from the vtkContourFilter::Execute() function. It interpolates & creates the triangles and new points for the isosurface ) I ran the programs in gdb to look through all the classes where the vtkHexahedron::Contour(...) function leads, but am unable to say "Why" there is a significant delay is caused when using method-1. If anyone has any clues as to what might be happening, will you please make time to tell me ? I am grateful for any pointers/ thoughts that you can share with me. Thanks & Regards, Subha. ******************************* Subha Mahaadevan ------v-- / __ |_*\\ |_| |_| \\ ******************************* -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: myProgram.cxx URL: From rbade at isg.cs.uni-magdeburg.de Wed Apr 9 02:20:27 2003 From: rbade at isg.cs.uni-magdeburg.de (Ragnar Bade) Date: Wed, 9 Apr 2003 08:20:27 +0200 Subject: [vtkusers] Re: Example Medical3 doesnt run - its true Message-ID: <000d01c2fe60$1cd87ae0$aa1b2c8d@bifrost> Hi I posted this problem some weeks ago but nothing happens. I'm using VTK 4.2.1 on a Windows Platform and get the same buggy result. One short-term solution is to use the obsolete vtkStructuredPointsGeometryFilter. eg.: // saggital plane vtkStructuredPointsGeometryFilter *saggitalSection = vtkStructuredPointsGeometryFilter::New(); saggitalSection->SetExtent (32,32, 0,63, 0, 93); saggitalSection->SetInput(v16->GetOutput()); vtkPolyDataMapper *saggitalMapper = vtkPolyDataMapper::New(); saggitalMapper->SetInput( saggitalSection->GetOutput()); saggitalMapper->ScalarVisibilityOn(); saggitalMapper->SetScalarRange( 0, 2000); saggitalMapper->SetLookupTable( bwLut); vtkActor *saggital = vtkActor::New(); saggital->SetMapper( saggitalMapper); But I am also interested in getting a actual bugfix for the code in the Medical3.cxx example. And not this unsupported one I mentioned here. Ragnar Bade From novalet at yahoo.com.cn Wed Apr 9 02:25:56 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Wed, 9 Apr 2003 14:25:56 +0800 (CST) Subject: [vtkusers] memory leak when use with MFC Message-ID: <20030409062556.8942.qmail@web15214.mail.bjs.yahoo.com> Hi! I compile the sample of examples/gui/win32/vtkMFC/vtkMDI and vtkSDI. But when i close the application, there were hundreds of memory leak. Then i simplify the usage of vtk, to only this->ren = vtkRenderer::New(); this->ren->Delete(); but the leaks still happen. Get rid of all vtk part, then there is not any leak. So i believe if the dll of vtk loaded, there will be leaks. At last i turn MFC to link as a static lib. The leaks go away. I am not a master in compiler. Does it mean vtk can't cooperate with MFC dll? or something else i must do to let them cooperate together? ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ?????KTV, ????????OK~~ http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Apr 9 03:43:22 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 09 Apr 2003 09:43:22 +0200 Subject: [vtkusers] Question about Wireframe display ! In-Reply-To: <010101c2fdfc$3c7bafc0$8ae4e9c0@sxapc> References: <010101c2fdfc$3c7bafc0$8ae4e9c0@sxapc> Message-ID: <3E93CF1A.8010200@creatis.insa-lyon.fr> Sebastien, Were you looking for : vtkImageConstantPad ? Maybe have a look at the Canny.tcl example http://public.kitware.com/cgi-bin/cvsweb.cgi/~checkout~/VTK/Graphics/Testing/Tcl/Canny.tcl HTH, mathieu Sebastien Auclair wrote: > Greetings ! > > We need to generate a CAD outline wireframes of our 3D shapes\solids. These > shapes are created as follows : > A) Starting from an initial polyline describing a non-convex polygon. > B) Generating a surface for this polygon by using > vtkGLUTesselatorFilter > C) Creating a 3D shape by extruding the polygon along its normal. > > The normal VTK wireframe mode displays all the lines and it is too much. We > would only need the main lines; those describing the shape as a volume. > Is there a filter that would output the disired result ? (As shown in the > image attached) > > Thanks ! > _____________________________________ > Seb > > > > ------------------------------------------------------------------------ > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From I.deBoer at polytec.de Wed Apr 9 04:35:34 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Wed, 9 Apr 2003 10:35:34 +0200 Subject: [vtkusers] How to create a polygon hole in a texture ? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F377@02polywbr.waldbronn.polytec.de> Hi David, that doesn't work. I still don't see anything. Here's comes the code snip. Any further suggestions ? Actually it doesn't have to a sphere. I need a polygon of n sides. greets Ingo void CVtkData::CreateFromColorIndex(BYTE *pBuffer, int iWidth, int iHeight) { float fAspectRatio = (float)iWidth/(float)iHeight; vtkImageData *image = vtkImageData::New(); image->SetExtent(0, iWidth, 0, iHeight, 0, 0); image->SetUpdateExtent(0, iWidth, 0, iHeight, 0, 0); image->SetScalarTypeToUnsignedChar(); for (int j = 0; j < iHeight; j++) for (int i = 0; i < iWidth; i++) *((BYTE*)image->GetScalarPointer(i,j,0)) = *pBuffer++; if (m_pvtkTexture) m_pvtkTexture->Delete(); m_pvtkTexture = vtkTexture::New(); m_pvtkTexture->SetInput(image); m_pvtkTexture->InterpolateOn(); vtkPlaneSource *plane = vtkPlaneSource::New(); plane->SetOrigin( 0.0, 0.0, 0.0); plane->SetPoint1( fAspectRatio*0.5, 0.0, 0.0); plane->SetPoint2( 0.0, 0.5, 0.0); plane->SetCenter( 0.0, 0.0, 0.0); plane->SetXResolution(64); plane->SetYResolution(64); vtkPolyDataMapper *planeMapper = vtkPolyDataMapper::New(); #define MAKE_HOLE #ifdef MAKE_HOLE vtkSphere *sphere = vtkSphere::New(); sphere->SetRadius(.5); sphere->SetCenter(0,0,0); vtkClipPolyData *clipper = vtkClipPolyData::New(); clipper->SetInput(plane->GetOutput()); clipper->SetClipFunction(sphere); clipper->GenerateClipScalarsOn(); clipper->GenerateClippedOutputOn(); clipper->SetValue(0); planeMapper->SetInput(clipper->GetOutput()); #else planeMapper->SetInput(plane->GetOutput()); #endif m_pvtkActor->SetMapper(planeMapper); m_pvtkActor->SetTexture(m_pvtkTexture); m_pvtkRenderer->AddActor(m_pvtkActor); m_pvtkRenderer->SetBackground(1, 1, 1); planeMapper->Delete(); plane->Delete(); image->Delete(); } From Pedro.Patron at imag.fr Wed Apr 9 04:49:15 2003 From: Pedro.Patron at imag.fr (Pedro Patron) Date: Wed, 9 Apr 2003 10:49:15 +0200 Subject: [vtkusers] Re: Example Medical3 doesnt run In-Reply-To: <20030408182501.2852.6938.Mailman@public.kitware.com> References: <20030408182501.2852.6938.Mailman@public.kitware.com> Message-ID: <200304091049.15232.Pedro.Patron@imag.fr> I've be able to make it runs this way: vtkImageDataGeometryFilter *saggitalSection = vtkImageDataGeometryFilter::New(); saggitalSection->SetExtent(32, 32, 0, 63, 0, 92); saggitalSection->SetInput(v16->GetOutput()); vtkPolyDataMapper *saggitalMapper = vtkPolyDataMapper::New(); saggitalMapper->SetInput(saggitalSection->GetOutput()); //saggitalMapper->ScalarsVisibleOn(); saggitalMapper->SetScalarRange(0,2000); saggitalMapper->SetLookupTable(bwLut); vtkActor * saggital = vtkActor::New(); saggital->SetMapper(saggitalMapper); Instead of the original: vtkImageMapToColors *saggitalColors = vtkImageMapToColors::New(); saggitalColors->SetInput(v16->GetOutput()); saggitalColors->SetLookupTable(bwLut); vtkImageActor *saggital = vtkImageActor::New(); saggital->SetInput(saggitalColors->GetOutput()); saggital->SetDisplayExtent(32,32, 0,63, 0,92); Does anyone know the problem with the second form? How is the better way to do it? Thank you in advance. > Message: 3 > From: Pedro Patron > Organization: GMCAO-TIMC > To: vtkusers at public.kitware.com > Date: Tue, 8 Apr 2003 19:42:34 +0200 > Subject: [vtkusers] Example Medical3 doesnt run > > Hello, > > I'm doing an application for medical image. > I need to show the three principal planes (axial, coronal, saggital) from= > a=20 > vtkVolume16Reader. > I've executed the example Medical3.cxx and It renders only the translucen= > t=20 > skin but not the planes. > I don't know what's the problem. > I'm using the 4.2.1 version of VTK over Linux Mandrake 9.0. > > Thank you in advance for your help. > > > > --__--__-- From massimo.ivani at mlsw.com Wed Apr 9 04:55:39 2003 From: massimo.ivani at mlsw.com (Massimo Ivani) Date: Wed, 9 Apr 2003 10:55:39 +0200 Subject: [vtkusers] Problems resizing vtkRenderWindow Message-ID: <002401c2fe75$cbd703d0$f254dfd9@compaq> Hello vtk Users, 1) I create a vtkRenderWindow 2) I add actors 3) all is ok 4) I resize vtkRenderWindow (Full screen) 5) I see a black screen with a small rectangle (left-top position) having same dimension of vtkRenderWindow before resize. 6) vtk seems to work well but picture is clippled by that small rectangle. Thank you for your help. Dr. Massimo Ivani Media Lab Software Tel.: +39 0187 517775 Fax: +39 0187 511833 massimo.ivani at mlsw.com www.mlsw.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From I.deBoer at polytec.de Wed Apr 9 05:32:48 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Wed, 9 Apr 2003 11:32:48 +0200 Subject: [vtkusers] Problems resizing vtkRenderWindow Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F37E@02polywbr.waldbronn.polytec.de> Hi, > Thank you for your help. I do a SetSize of the RenderWindow when resizing the ClientWindow. (Works on Windows). Maybe it helps... RenderWindow->SetSize(cx, cy); greets Ingo From hartley at comp.lancs.ac.uk Wed Apr 9 07:46:08 2003 From: hartley at comp.lancs.ac.uk (Edward Hartley) Date: Wed, 9 Apr 2003 12:46:08 +0100 Subject: [vtkusers] vtk python Message-ID: hi I've built VTK with the Python wrapper enabled the build proceeds satisfactorily. I've installed the vtk wrappers in my site-packages directory and the VTK4.2.1 directory is in my PYTHONPATH However python >>>import vtk produces Import Error /usr/local/packages/VTK4.2.1/bin/libvtkComon.so: undefined symbol: __tiostream I built with CMAKE linker flag -L/usr/lib -llibstdc++-3-libc6.2.2.10.0 which nm shows has this symbol I would welcome any suggestions. Regards Ed Hartley From c.p.botha at its.tudelft.nl Wed Apr 9 08:09:41 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 09 Apr 2003 14:09:41 +0200 Subject: [vtkusers] vtk python In-Reply-To: References: Message-ID: <1049890181.15827.2.camel@dutidad> On Wed, 2003-04-09 at 13:46, Edward Hartley wrote: > I've built VTK with the Python wrapper enabled > the build proceeds satisfactorily. > I've installed the vtk wrappers in my site-packages directory > and the VTK4.2.1 directory is in my PYTHONPATH > However > python > >>>import vtk > produces > > Import Error /usr/local/packages/VTK4.2.1/bin/libvtkComon.so: > undefined symbol: __tiostream > > I built with CMAKE linker flag -L/usr/lib -llibstdc++-3-libc6.2.2.10.0 > which nm shows has this symbol Why did you explicitly add this library? It should not be necessary if you build with g++? Did you build with VTK_USE_ANSI_STDLIB_DEFAULT on or off? On your setup, it should probably be on. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From Jonathan.Bailleul at greyc.ismra.fr Wed Apr 9 08:46:42 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Wed, 09 Apr 2003 13:46:42 +0100 Subject: [vtkusers] Point data generation References: Message-ID: <3E941632.9DBDFEC4@greyc.ismra.fr> David.Pont at ForestResearch.co.nz wrote: > > Hi Jan, > can you use vtkDecimate to reduce the number of triangles? run with > different targets to get a set of LOD models. Err, could you explain me the point of running with different targets? What means LOD anyway? (Level Of Detail?) Thanks in advance. -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From zhou at isg.cs.uni-magdeburg.de Wed Apr 9 09:03:03 2003 From: zhou at isg.cs.uni-magdeburg.de (Jianlong Zhou) Date: Wed, 9 Apr 2003 15:03:03 +0200 Subject: [vtkusers] make movies from a set of images. Message-ID: <3E943626.5091.1386500@localhost> Hi, vtk users, I have a set of ppm images and I want to make a movie from these images. Which tool can be used to make movie from a set of ppm images? Thank you in advance. Regards, Jianlong From jcpouce at yahoo.com Wed Apr 9 09:14:01 2003 From: jcpouce at yahoo.com (jean-charles campagne) Date: Wed, 9 Apr 2003 06:14:01 -0700 (PDT) Subject: [vtkusers] animation, vtkPoints update, pipeline update Message-ID: <20030409131401.64586.qmail@web41509.mail.yahoo.com> Hello, I am trying to make an animation ( the data is time based) the data represent point in 3D. These points would be moving since the coordinates of the points vary with time. (I'm using C++) here's the pipeline i am using : -------------------------------------- vtkPoints | V vtkPolyData | V vtkGlyph3D <- vtkSphereSource | V vtkPolyDataMapper | V vtkActor | V vtkRenderer | V vtkRenderWindow -------------------------------------- The vtkPoints are generated manually. Here is the type of loop i'm trying to do : (points is of type vtkPoints) : ---------------------------------------------------- while (1) { renWin->Render(); // should update... UpdatePoints(points);// something like : // points->SetPoint(i, // x(i,t), // y(i,t), // z(i,t)); } ---------------------------------------------------- it seems that the pipeline is not being updated... it seems it's not the way to do so (it render the first frame alright and all the other frames are the same : i think the pipeline is not being update correctly...) I browsed the documentation for various methods that would update the pipeline (i tried calling Render() on different parts of the pipeline), and at best i got a blank screen... I would appreciate if you could tell me what's wrong. Many thanks. Cheers, JCC. __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com From novalet at yahoo.com.cn Wed Apr 9 09:24:09 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Wed, 9 Apr 2003 21:24:09 +0800 (CST) Subject: [vtkusers] how to test parallel? Message-ID: <20030409132409.17298.qmail@web15213.mail.bjs.yahoo.com> Hi! I built vtk with parallel. But i have not tried it yet. Any one can show me how to run the test in the examples/parallelprocessing directory? I have several pc in win2k linked by 100M LAN. Thank you! ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ?????KTV, ????????OK~~ http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html From I.deBoer at polytec.de Wed Apr 9 09:29:38 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Wed, 9 Apr 2003 15:29:38 +0200 Subject: [vtkusers] Some help on this one, please Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD93C19B7@02polywbr.waldbronn.polytec.de> Hi, first of all I am rather new to VTK. I took a look at the samples and did already some coding. Now, I want to code a simple cube and show it. I have made a simple vtk file like: # vtk DataFile Version 1.0 cube ASCII DATASET POLYDATA POINTS 8 float 0.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 1.0 0.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0 POLYGONS 6 30 4 0 1 2 3 4 4 5 6 7 4 0 1 5 4 4 2 3 7 6 4 0 4 7 3 4 1 2 6 5 POINT_DATA 8 VECTORS mode8 float 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 -6.850900e-04 1.131900e-01 -4.838000e-04 -3.533400e-02 1.260400e-01 6.314500e-02 -5.096200e-02 8.419700e-02 6.382000e-02 -1.532600e-03 2.888500e-01 -7.648200e-04 I can read that with the vtkPolyDataReader and show it. Now, I want to hardcode the same thing, like: vtkPoints *points = vtkPoints::New(); points->SetNumberOfPoints(8); points->InsertPoint( 0, 0.0, 0.0, 0.0); points->InsertPoint( 1, 1.0, 0.0, 0.0); points->InsertPoint( 2, 1.0, 1.0, 0.0); and so on. I want to put it on a vtkStructuredGrid, like: vtkStructuredGrid *grid = vtkStructuredGrid::New(); grid->SetPoints(points); grid->GetPointData()->SetVectors(vectors); vtkStructuredGridGeometryFilter *geom = vtkStructuredGridGeometryFilter::New(); geom->SetInput(grid); vtkDataSetMapper *plateMapper = vtkDataSetMapper::New(); plateMapper->SetInput(geom->GetOutput()); But where do I set the polygons ? And how do I build the polygons ? The thing is that I don't see anything. Could anyone give/send me a small sample on this one, please ? greets Ingo From I.deBoer at polytec.de Wed Apr 9 09:36:42 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Wed, 9 Apr 2003 15:36:42 +0200 Subject: [vtkusers] make movies from a set of images. Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD93C19B8@02polywbr.waldbronn.polytec.de> > I have a set of ppm images and I want to make a movie from > these images. Which tool can be used to make movie from a set of ppm images? It depends on your system. On Irix there is moviemaker or makemovie. On Windows there is a MultiMedia-SDK. Also there is also source code/binaries at www.mpeg.org. But maybe you have to change your ppm images to some other format. ImageMagick is a very good tool for converting. greets Ingo From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Apr 9 09:39:54 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 09 Apr 2003 15:39:54 +0200 Subject: [vtkusers] wxVTKRenderWindow: magic --sync Message-ID: <3E9422AA.3010205@creatis.insa-lyon.fr> Hi all, I swear I didn't hide anything in my pockets but on the contrary I would be very gratfull to anyone that could find the trick. I also apologize for all the cross posting. This is a **long** email. Please bear with me. I was in touch with Vadim Zeitlin about this problem but failed to produce a simple example that didn't make use of VTK. Basically VTK is a layer that abstract OpenGL stuff. * Description of the problem; I am using wxVTKRenderWindow into my project and found a naughty behavior when draging the mouse out of the VTK window and dropping the mouse on top of let say the satus bar. While browsing the python source code, I understood this came from a bug in wxGTK prior to 2.3.2. As I am using wxGTK 2.4.0 I thought this bug was fixed. So I modified the python source file: line 71, I changed: WX_USE_X_CAPTURE = 0 into WX_USE_X_CAPTURE = 1 and I added a status bar to the main frame. You can download this modfied version from: http://www.creatis.insa-lyon.fr/~malaterre/wxVTKRenderWindowInteractor.py Then you can start the script like this (don't forget '--sync' option): $python wxVTKRenderWindowInteractor.py --sync You'll see that everything is working properly. Even the drag and drop on the status bar (for not convinced people you can turn back WX_USE_X_CAPTURE = 0 and see that the status bar makes users loose the mouse events). --- Now comes the magic part. Start this script again *without* the --sync option: $python wxVTKRenderWindowInteractor.py if you click *without* moving the mouse, everything should go smoothly. But then, try again and drag the mouse to the status bar... yeah you lost the mouse event! You need to kill this app from a ssh session ! I haven't been able to reproduce this bug on wxGTK prior to 2.3.2. There was a big change from 2.3.1 to 2.3.2 that's why it is a bit hard for me to track down the modification that only deal with my problem. --- As I don't believe anymore in magical stuff, I decide to hack down the wxPython source and found that the '--sync' option was only there to active an XSynchronize event. So I tried to modify the vtkXOpenGLRenderWindow class. I uncommented the XSynchronize (line 867), but this didn't make any change. Whereas the '--sync' was still working. Any X11 guru comment on that ? Version: Linux RedHat 7.3 wxPython 2.4.0.7 python 2.2 gtk+-1.2.10-22 VTK 4.3 (fresh CVS) thank you all for reading me, mathieu ps: If you've reach this far, you are a very patient guy ! -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From novalet at yahoo.com.cn Wed Apr 9 10:01:21 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Wed, 9 Apr 2003 22:01:21 +0800 (CST) Subject: [vtkusers] slow down in MFC? Message-ID: <20030409140121.19005.qmail@web15204.mail.bjs.yahoo.com> Hi! I try to embed tcl into my MFC code for it will be easier to dynamic generate pipeline. I did it by Tcl_EvalFile the tcl script, use vtkTclGetPointerFromObject to get the vtkRenderer to c++ pointer, and then link this pointer with vtkWin32OpenGLRenderWindow. It runs smoothly, but compare with the original tcl script it is much slower. The test use capcow.tcl, the windows size is almost the same, i count turns of cows in half minute by pressing the mouse on the right-bottom corner of windows to make the camera rotate as quick as possible. The result of test is MFC will only half against raw TCL script. I may try other solution someday. But before other tests, i wanna know if there any speed analysis by writing the same pipeline in cpp and tcl respectively. Can you lend me a hand? Thank you! ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ?????KTV, ????????OK~~ http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html From I.deBoer at polytec.de Wed Apr 9 10:01:59 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Wed, 9 Apr 2003 16:01:59 +0200 Subject: [vtkusers] Some help on this one, please Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F385@02polywbr.waldbronn.polytec.de> Hi, I found the Cube.cxx sample. Sorry & Thanks greets Ingo From andy.cedilnik at kitware.com Wed Apr 9 11:30:55 2003 From: andy.cedilnik at kitware.com (Andy Cedilnik) Date: 09 Apr 2003 11:30:55 -0400 Subject: [vtkusers] vtk/Python build In-Reply-To: References: Message-ID: <1049902255.19271.132.camel@xanth> Hi Neil, PYTHON_UTIL_LIBRARY should be marked as advanced (and it is in nightly and next vtk release). So, ignore it. Andy On Tue, 2003-04-08 at 21:06, Neil Killeen wrote: > ok so it is clear now. Linux needs it, nothing much else seems to. > > Could the VTK CMakeLists.txt file have a Linux o/s dependency so that > the PYTON_UTIL variable is not presented to the user when it is unnecessary > (I spent some time trying to find out what it was and where it was) From c.p.botha at its.tudelft.nl Wed Apr 9 11:43:47 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 09 Apr 2003 17:43:47 +0200 Subject: [vtkusers] wxVTKRenderWindow: magic --sync In-Reply-To: <3E9422AA.3010205@creatis.insa-lyon.fr> References: <3E9422AA.3010205@creatis.insa-lyon.fr> Message-ID: <1049903027.15830.29.camel@dutidad> On Wed, 2003-04-09 at 15:39, Mathieu Malaterre wrote: > if you click *without* moving the mouse, everything should go smoothly. > But then, try again and drag the mouse to the status bar... > yeah you lost the mouse event! You need to kill this app from a ssh > session ! Without --sync, this did indeed prevent my X from reacting to any further interaction. I had to switch to a VT and kill the Python process. One click was all it took. Have you _really_ not been able to reduce this to a simpler wxPython-only example? What happens if you replace the wxVTKRenderWindowInteractor by a panel? -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From smahaade at essence.utsi.edu Wed Apr 9 12:42:13 2003 From: smahaade at essence.utsi.edu (Subha) Date: Wed, 9 Apr 2003 10:42:13 -0600 Subject: [vtkusers] help with Contouring oddities using vtkContourFilter Message-ID: <20030403015710.M91725@mail2.utsi.edu> Hello all, ( am re-sending this mail bcos the earlier mail that I sent out did not attach my file properly). I tried a small experiment using vtkContourFilter ( intended for use somewhere else). I used the code from vtkContourFilter::Execute() function in my main program (literally copied and pasted the code from the vtkContourFilter class in my program ) to generate an isosurface for a Structured Grid dataset and timed it. My program flows like this (program files also attached) method-1 (my program) ========= myMainProgram.cxx { reader->update() TIME START code from vtkContourFilter::Execute() with proper inputs, initializations TIME END above generated vtkPolyData polyDataMapper->SetInput(above generated polyData) renderWindow->render() } I also rendered the isosurface in the way it is usually done (I have timed this method between setting the input to contour filter and the render command because of the way the vtk pipeline works ). method-2 ======== TIME START contour->SetInput(structuredGrid) polydataMapper->SetInput(contour->GetOutput()) actor->setMapper(polyDataMapper) renderWindow->render() TIME END 1) Under the same load conditions on a dedicated PC, method-1 was significantly slower than method-2. Method-1 takes as much as 10 seconds more than method-2 to render a 7000 cell structured grid (which translates to that atleast 100 times the number of machine cycles on a 733 mhz and 512 mb ram linux machine). 2) Most of the time seems to have been taken by the vtkHexahedron::Contour(...) function ( this function is called from the vtkContourFilter::Execute() function. It interpolates & creates the triangles and new points for the isosurface ) I ran the programs in gdb to look through all the classes where the vtkHexahedron::Contour(...) function leads, but am unable to say "Why" there is a significant delay is caused when using method-1. I am missing something very obvious here. Will any of you experienced folks who know what might be happening, please make time to tell me ? I am grateful for any pointers/ thoughts that you can share with me. Thanks & Regards, Subha. //**************************************************************************// #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkActor.h" #include "vtkStructuredGridReader.h" #include "vtkPolyDataMapper.h" #include "../../patented/vtkMarchingContourFilter.h" #include "vtkLight.h" #include "vtkRenderWindowInteractor.h" #include "vtkMergePoints.h" #include "vtkMarchingCubesCases.h" #include #include #include #include #include #include "SaveImage.h" void main( int argc , char *argv[] ) { char a; int totalPoints, totalCells; //float value; ofstream kout("marchIndex.txt", ios::out); static int count=0; clock_t start, end, proStart, proEnd; struct tms tmsstart, tmsend, tmsProStart, tmsProEnd; int status; static long clktck = 0; vtkRenderer *renderer = vtkRenderer::New(); renderer->SetBackground(1,1,1); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(renderer); renWin->SetSize(300,300); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); vtkLight *light1 = vtkLight::New(); renderer->AddLight(light1); vtkActor *actor = vtkActor::New(); cout<< "reading from file" <SetFileName(argv[1]); reader->SetScalarsName("sc2"); reader->Update(); vtkStructuredGrid *structGrid = reader->GetOutput(); vtkPointData *pointData = structGrid->GetPointData(); vtkScalars *scalars = pointData->GetScalars(); vtkPolyDataMapper *volMapper = vtkPolyDataMapper::New(); totalCells = structGrid->GetNumberOfCells(); float value[10]; value[0] = 0.0; value[1] = 0.1; value[2] = 0.2; value[3] = 0.3; value[4] = 0.5; value[5] = 0.6; value[6] = 0.7; value[7] = 0.8; value[8] = 0.9; value[9] = 1.0; /**** CODE FROM vtkContourFilter.cxx::Execute() **********/ static int CASE_MASK[8] = {1,2,4,8,16,32,64,128}; TRIANGLE_CASES *triCase; EDGE_LIST *edge; int i, j, index, *vert; static int vertMap[8] = { 0, 1, 3, 2, 4, 5, 7, 6 }; if((start = times(&tmsstart)) == -1) cout << "times error " <InitPointInsertion(newPts, structGrid->GetBounds(), estimatedSize); vtkCellArray * verts = vtkCellArray::New(); verts->Allocate(estimatedSize, estimatedSize); vtkCellArray * lines = vtkCellArray::New(); lines->Allocate(estimatedSize, estimatedSize); vtkCellArray * polys = vtkCellArray::New(); polys->Allocate(estimatedSize, estimatedSize); vtkPolyData *output = vtkPolyData::New(); vtkScalars *cellScalars = vtkScalars::New(); cellScalars->Allocate(VTK_CELL_SIZE); //vtkPointData inPd is just pointData here vtkPointData *outPd = output->GetPointData(); vtkCellData *inCd = structGrid->GetCellData(); vtkCellData *outCd = output->GetCellData(); outPd->CopyScalarsOn(); outPd->InterpolateAllocate(pointData, estimatedSize, estimatedSize); outCd->CopyAllocate(inCd, estimatedSize, estimatedSize); int numContours = 10; vtkIdList *cellPts; //vtkIdList *NcellList = vtkIdList::New(); static int count1=0; //vtkPolyData *output1 = vtkPolyData::New(); int cellNumber; for (int k=0; k < 10; k++) { for (int cellId=0; cellId < totalCells; cellId++) { prevCells = polys->GetNumberOfCells(); cell = structGrid->GetCell(cellId); cellPts = cell->GetPointIds(); scalars->GetScalars(cellPts,cellScalars); for ( i=0, index = 0; i < 8; i++) { if (cellScalars->GetScalar(vertMap[i]) >= value[k]) { index |= CASE_MASK[i]; } } cell->Contour(value[k], cellScalars, locator, verts, lines, polys, pointData, outPd, inCd, cellId, outCd); currentCells = polys->GetNumberOfCells(); // if(prevCells < currentCells) { // kout << cellId << " " << index << " " << k << endl; // count1 ++; } }// for all cells } // for all contour values // Update ourselves. Because we don't know up front how many verts, lines, // polys we've created, take care to reclaim memory. // output->SetPoints(newPts); newPts->Delete(); if (verts->GetNumberOfCells()) { output->SetVerts(verts); } verts->Delete(); if (lines->GetNumberOfCells()) { output->SetLines(lines); } lines->Delete(); if (polys->GetNumberOfCells()) { output->SetPolys(polys); } polys->Delete(); locator->Initialize();//releases leftover memory output->Squeeze(); /*** Usual code below ********/ volMapper->SetInput(output); actor->SetMapper(volMapper); renderer->AddActor(actor); renWin->Render(); cout << "polys created " << output->GetNumberOfCells() << endl; if( ( end = times(&tmsend)) == -1 ) cout << "times error tmsend " << endl; if( 0 == clktck) if( (clktck = sysconf(_SC_CLK_TCK)) < 0) cout << "sysconf error " <Start(); /** enable user interaction using mouse **/ //clean up cout<<" reclaiming memory "<Delete(); renWin->Delete(); iren->Delete(); reader->Delete(); cellScalars->Delete(); locator->Delete(); output->Delete(); // structGrid->Delete(); // contour->Delete(); // geom->Delete(); volMapper->Delete(); // NcellList->Delete(); light1->Delete(); actor->Delete(); } ******************************* Subha Mahaadevan ------v-- / __ |_*\\ |_| |_| \\ ******************************* From mktory at cs.sfu.ca Wed Apr 9 12:52:18 2003 From: mktory at cs.sfu.ca (Melanie Tory) Date: Wed, 09 Apr 2003 09:52:18 -0700 Subject: [vtkusers] multiple renderers with a java vtkPanel Message-ID: <5.2.0.9.0.20030409094311.00b0b008@cs.sfu.ca> Hi, I'm trying to use multiple renderers/viewports with a java vtkPanel. I have the main renderer (the one in the vtkPanel) and have also added several secondary renderers to the render window. I want each renderer to show different actors. My problem is that actors only show up in my secondary renderers if I also add them to the main renderer. Has anyone else had this problem? Any idea how to fix it would be appreciated. By the way, I'm using vtk3.2 on win2k. Thanks, Melanie Tory From jlpina at ivo.cps.unizar.es Wed Apr 9 13:09:09 2003 From: jlpina at ivo.cps.unizar.es (Jose Luis Pina) Date: Wed, 09 Apr 2003 19:09:09 +0200 Subject: [vtkusers] Color Delaunay3D In-Reply-To: <20030212170007.8572.15703.Mailman@public.kitware.com> Message-ID: <5.2.0.9.0.20030409185347.00af5590@ivo.cps.unizar.es> I have a set of points with an scalar value associated. I make a Delaunay3D and gives some subsets, every point in the subset has the same scalar value. I want give diferent colors to the subsets generated by Delaunay3D according its scalar values Is it posible?. Is there any other pipeline doing this?. The pipeline is (abstract): vtkUnstruredGridReader vtkDelaunay3D del vtkGeometryFilter cg vtkLookupTable vtkPolyDataMapper SetColorModeToMapScalars SetScalarRange 0 1 SetLookupTable lut vtkLODActor vtkRenderer ren1 AddActor vtkRenderWindow But no colors appears. jlpina at ivo.cps.unizar.es From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Apr 9 13:09:39 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 09 Apr 2003 19:09:39 +0200 Subject: [vtkusers] wxVTKRenderWindow: magic --sync In-Reply-To: <1049903027.15830.29.camel@dutidad> References: <3E9422AA.3010205@creatis.insa-lyon.fr> <1049903027.15830.29.camel@dutidad> Message-ID: <3E9453D3.6000701@creatis.insa-lyon.fr> Charl, Thanks for taking the time to try my crappy code. This bug is really killing me I have been trying to reproduce it with standard wx componennt (wxFrame, wxGLCanvas, wxWindow, wxPanel) but with no luck. BTW I am a bit suprised that you managed to freeze your X session without moving your mouse. --- I don't know if a lot of people feel concerned about it except you, anyway in case I have CC vtk mailing list. I have removed a *lot* of stuff from wxVTKRenderWindowInteractor to make it more readable. And I have written a small app that use it: http://www.creatis.insa-lyon.fr/~malaterre/wxVTK/MyApp.tgz Then start it like this: $ py wxMyApp.py --sync IMPORTANT: *To use it, you should first resize the window !* Then to make it failed or not you can play with the '--sync' option. All you have to do then is to drag/drop the mouse on the status bar. Furthermore if you want to compare to a custom window (from standard wx distro) go to wxMyFrame.py and change nobug=1 to nobug=0. --- Now I can say that commenting line 55 (wxVTKRenderWindow.py): #self._Iren.LeftButtonPressEvent() make a lots of differences. Even if you don't see anymore the cone moving at last when you drop the mouse on the status bar, you'll see the print "up" works ! And without the '--sync' option. --- Finally you can also try commenting line 21: #parent.Show() You'll see that the vtkXOpenGLRenderWindow will display outside of the wxWindow and if you play with the mouse on the wxWindow, the cone is moving. It shows that the vtkXOpenGLRenderWindow doesn't 'hide' the wxWindow/wxGLCanvas it's derived from. I'll still try to track this bug, but honestly I am really fed up with my X session freezing all the time... mathieu Charl P. Botha wrote: > On Wed, 2003-04-09 at 15:39, Mathieu Malaterre wrote: > >>if you click *without* moving the mouse, everything should go smoothly. >>But then, try again and drag the mouse to the status bar... >>yeah you lost the mouse event! You need to kill this app from a ssh >>session ! > > > Without --sync, this did indeed prevent my X from reacting to any > further interaction. I had to switch to a VT and kill the Python > process. One click was all it took. > > Have you _really_ not been able to reduce this to a simpler > wxPython-only example? What happens if you replace the > wxVTKRenderWindowInteractor by a panel? > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From c.p.botha at its.tudelft.nl Wed Apr 9 14:08:16 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Wed, 9 Apr 2003 20:08:16 +0200 Subject: [vtkusers] wxVTKRenderWindow: magic --sync In-Reply-To: <3E9453D3.6000701@creatis.insa-lyon.fr> References: <3E9422AA.3010205@creatis.insa-lyon.fr> <1049903027.15830.29.camel@dutidad> <3E9453D3.6000701@creatis.insa-lyon.fr> Message-ID: <20030409180816.GA15101@dutidad.twi.tudelft.nl> Mathieu, On Wed, Apr 09, 2003 at 07:09:39PM +0200, Mathieu Malaterre wrote: > Thanks for taking the time to try my crappy code. > This bug is really killing me I have been trying to reproduce it > with standard wx componennt (wxFrame, wxGLCanvas, wxWindow, wxPanel) but > with no luck. Please have a look at the CreateTimer calls in wxRenderWindowInteractor. If I had the time (which I don't right now), I'd add debug prints to the CreateTimer and DestroyTimer methods to see if they still get called REGULARLY during interaction with your test case. In the case of the default joystick interactor, they should. It could be some strange interaction between the wxTimer and wxCaptureMouse (you never know). Good luck, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From nick.smethurst at free.fr Wed Apr 9 14:25:51 2003 From: nick.smethurst at free.fr (N Smethurst) Date: Wed, 9 Apr 2003 20:25:51 +0200 Subject: [vtkusers] animation, vtkPoints update, pipeline update In-Reply-To: <20030409131401.64586.qmail@web41509.mail.yahoo.com> References: <20030409131401.64586.qmail@web41509.mail.yahoo.com> Message-ID: <200304092025.51175.nick.smethurst@free.fr> I don't think SetPoints() calls Modified().. so try points->Modified() and if it doesn't work, you can curse me for giving advice when I am still a beginner. :) nick Le Mercredi 9 Avril 2003 15:14, jean-charles campagne a ?crit : > it seems that the pipeline is not being updated... > > it seems it's not the way to do so (it render the > first frame alright > and all the other frames are the same : i think the > pipeline is not > being update correctly...) > > I browsed the documentation for various methods that > would update the > pipeline (i tried calling Render() on different parts > of the > pipeline), and at best i got a blank screen... From mlouw at unizar.es Wed Apr 9 14:25:52 2003 From: mlouw at unizar.es (Markus Louw) Date: Wed, 9 Apr 2003 20:25:52 +0200 Subject: [vtkusers] Deleting a vtkPointset Message-ID: <002601c2fec5$73d5a970$869ed29b@GTC.LAB> Hi All When I tell it to delete(X) a vtkPoint, it tells me the destructor is protected, but otherwise there is a memory leak (in my program, since I can't delete the pointer). Something seems wrong with the vtkPoint.Reset() function, my program only works if I create a new vtkPoint each time... any suggestions? Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: From TDeschamps at lbl.gov Wed Apr 9 14:51:05 2003 From: TDeschamps at lbl.gov (TDeschamps at lbl.gov) Date: Wed, 09 Apr 2003 11:51:05 -0700 Subject: [vtkusers] Finding the appropriate vtkCommand::*Event Message-ID: <26480325f9b4.25f9b4264803@lbl.gov> HI vtkUsers, I would like to know if someone knows what kind of event is suitable: I have an interface where I would like some process to execute all the time. like a timer that print the time on the viewport I have already other events executing, like LeftButtonPressEvent, LeftButtonReleaseEvent, MouseMoveEvent, etc.. I would still like to be able to call these events, but I really want this process to be called all the time when no other event is. Thanks, Thomas (TDeschamps at lbl.gov) From David.Pont at ForestResearch.co.nz Wed Apr 9 17:22:42 2003 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Thu, 10 Apr 2003 09:22:42 +1200 Subject: [vtkusers] How to create a polygon hole in a texture ? Message-ID: Hi Ingo, Your plane has height 0.5, width fAspectRatio*.5, ie around 0.5. The sphere has radius 0.5 and thus diameter 1 and is clipping everything! Try a smaller sphere, eg 0.25. If you really want to clip with a polygon you might want to look at vtkImplicitSelectionLoop and vtkImplicitDataSet, or wait to see if I ever complete an experimantal class I have that uses polydata as an implicit function. regards Dave Pont "De Boer Ingo" tec.de> cc: Subject: Re: [vtkusers] How to create a polygon hole in a texture ? 09/04/2003 20:35 Hi David, that doesn't work. I still don't see anything. Here's comes the code snip. Any further suggestions ? Actually it doesn't have to a sphere. I need a polygon of n sides. greets Ingo void CVtkData::CreateFromColorIndex(BYTE *pBuffer, int iWidth, int iHeight) { float fAspectRatio = (float)iWidth/(float)iHeight; vtkImageData *image = vtkImageData::New(); image->SetExtent(0, iWidth, 0, iHeight, 0, 0); image->SetUpdateExtent(0, iWidth, 0, iHeight, 0, 0); image->SetScalarTypeToUnsignedChar(); for (int j = 0; j < iHeight; j++) for (int i = 0; i < iWidth; i++) *((BYTE*)image->GetScalarPointer(i,j,0)) = *pBuffer++; if (m_pvtkTexture) m_pvtkTexture->Delete(); m_pvtkTexture = vtkTexture::New(); m_pvtkTexture->SetInput(image); m_pvtkTexture->InterpolateOn(); vtkPlaneSource *plane = vtkPlaneSource::New(); plane->SetOrigin( 0.0, 0.0, 0.0); plane->SetPoint1( fAspectRatio*0.5, 0.0, 0.0); plane->SetPoint2( 0.0, 0.5, 0.0); plane->SetCenter( 0.0, 0.0, 0.0); plane->SetXResolution(64); plane->SetYResolution(64); vtkPolyDataMapper *planeMapper = vtkPolyDataMapper::New(); #define MAKE_HOLE #ifdef MAKE_HOLE vtkSphere *sphere = vtkSphere::New(); sphere->SetRadius(.5); sphere->SetCenter(0,0,0); vtkClipPolyData *clipper = vtkClipPolyData::New(); clipper->SetInput(plane->GetOutput()); clipper->SetClipFunction(sphere); clipper->GenerateClipScalarsOn(); clipper->GenerateClippedOutputOn(); clipper->SetValue(0); planeMapper->SetInput(clipper->GetOutput()); #else planeMapper->SetInput(plane->GetOutput()); #endif m_pvtkActor->SetMapper(planeMapper); m_pvtkActor->SetTexture(m_pvtkTexture); m_pvtkRenderer->AddActor(m_pvtkActor); m_pvtkRenderer->SetBackground(1, 1, 1); planeMapper->Delete(); plane->Delete(); image->Delete(); } From David.Pont at ForestResearch.co.nz Wed Apr 9 17:31:36 2003 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Thu, 10 Apr 2003 09:31:36 +1200 Subject: [vtkusers] Point data generation Message-ID: Salut Jonathan, sorry for the poor answer. Yes LOD is level of detail. vtkDecimate provides the method SetTargetReduction, it also provides several other methods to control the final number of polgons (see the documentation for details). So my thought was you could take your original data set, pass it through vtkDecimate with one value for TargetReduction, save the points, change TargetReduction and repeat, if you are clever you might put this in a loop and save the data to file at each pass. At each pass you would reduce the original data set to a smaller and smaller set of points. These sets of points can be used to represent the original object at different levels of resolution. regards Dave Pont |--------+----------------------------------> | | Jonathan Bailleul | | | | | | Sent by: | | | Jonathan.Bailleul at greyc.| | | ismra.fr | | | | | | | | | 10/04/2003 00:46 | | | | |--------+----------------------------------> >------------------------------------------------------------------------------------------------------------| | | | To: David.Pont at ForestResearch.co.nz | | cc: Jan Fransens , vtkusers at public.kitware.com | | Subject: Re: [vtkusers] Point data generation | >------------------------------------------------------------------------------------------------------------| David.Pont at ForestResearch.co.nz wrote: > > Hi Jan, > can you use vtkDecimate to reduce the number of triangles? run with > different targets to get a set of LOD models. Err, could you explain me the point of running with different targets? What means LOD anyway? (Level Of Detail?) Thanks in advance. -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From scharver at evl.uic.edu Wed Apr 9 18:05:09 2003 From: scharver at evl.uic.edu (Chris Scharver) Date: Wed, 9 Apr 2003 17:05:09 -0500 Subject: [vtkusers] Line distance implicit function In-Reply-To: References: Message-ID: At 11:35 AM +1200 on 04/08/2003, David.Pont at ForestResearch.co.nz wrote: > I think you could use vtkImplicitModeller followed by vtkImplicitDataSet >but this is very inefficient. It seems vtkImplicitModeller is like >vtkImplicitFunction and vtkSampleFunction rolled up together. It would be >nice to unroll this: make a class derived from vtkImplicitFunction which >contains the EvaluatePosition stuff to get the distance functionality. You >might have to use local differences to get the gradient? Then you could >pass this new implicit function directly to the clipper. This sounds much >smarter, and a useful class. Thanks for the response! Looking at the code in a little more detail, it looks like I should be able to just grab the part that I need. vtkCell already handles the significant work involved. I'll likel have time to implement just what I need for a vtkImplicitPolyDataFunction, but once I get that done I'll make it available so that it can be polished off and perhaps contributed. Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 From R.C.W.Mandl at chello.nl Wed Apr 9 18:02:14 2003 From: R.C.W.Mandl at chello.nl (Rene Mandl) Date: Thu, 10 Apr 2003 00:02:14 +0200 Subject: [vtkusers] vtkRIBExporter problem Message-ID: <3E949866.2060402@chello.nl> Hi, I try to export a simple polydata object with vtkRibExporter but for some reason the color information is passed incorrectly. (If I use another exporter like vtkVRMLExporter then the output is ok) I have enclosed the tcl script, a file containing the polydata object and the resulting rib file. Is there someone who can tell me what I am doing wrong? Regards, Rene Mandl the TCL script: --------------------------------- #!/usr/local//bin/vtk -f package require vtkinteraction vtkPolyDataReader polyRead polyRead SetFileName "example.pdata" vtkPolyDataMapper mapper mapper SetInput [ polyRead GetOutput ] vtkActor actor actor SetMapper mapper # Create graphics stuff vtkRenderer ren1 vtkRenderWindow renWin renWin AddRenderer ren1 vtkRenderWindowInteractor iren iren SetRenderWindow renWin vtkRIBExporter myRIB vtkPolyDataWriter pwrite ren1 AddActor actor ren1 SetBackground 1 1 1 iren Initialize iren AddObserver UserEvent {wm deiconify .vtkInteract} # prevent the tk window from showing up then start the event loop wm withdraw . update renWin Render myRIB SetInput renWin myRIB SetFilePrefix "example" myRIB BackgroundOn myRIB SetPixelSamples 1 1 myRIB Write puts "file example.rib contains exported scene" --------------------------------- the polydata object (in file "example.pdata"): --------------------------------- # vtk DataFile Version 3.0 vtk output ASCII DATASET POLYDATA POINTS 36 float 0 0 0 10 0 0 20 0 0 30 0 0 40 0 0 50 0 0 0 10 0 10 10 0 20 10 0 30 10 0 40 10 0 50 10 0 0 20 0 10 20 0 20 20 0 30 20 0 40 20 0 50 20 0 0 30 0 10 30 0 20 30 0 30 30 0 40 30 0 50 30 0 0 40 0 10 40 0 20 40 0 30 40 0 40 40 0 50 40 0 0 50 0 10 50 0 20 50 0 30 50 0 40 50 0 50 50 0 POLYGONS 25 125 4 0 1 7 6 4 1 2 8 7 4 2 3 9 8 4 3 4 10 9 4 4 5 11 10 4 6 7 13 12 4 7 8 14 13 4 8 9 15 14 4 9 10 16 15 4 10 11 17 16 4 12 13 19 18 4 13 14 20 19 4 14 15 21 20 4 15 16 22 21 4 16 17 23 22 4 18 19 25 24 4 19 20 26 25 4 20 21 27 26 4 21 22 28 27 4 22 23 29 28 4 24 25 31 30 4 25 26 32 31 4 26 27 33 32 4 27 28 34 33 4 28 29 35 34 CELL_DATA 25 COLOR_SCALARS scalars 3 0 0 0 0 0 0 0.8 0.8 0.8 0 0 0 0 0 0 0 0 0 0 0 0 0.7 0.7 0.7 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0.6 0.6 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0.5 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0.4 0.4 0 0 0 0 0 0 POINT_DATA 36 --------------------------------- the output file (rib): --------------------------------- rameBegin 1 Display "example.tif" "file" "rgba" Declare "bgcolor" "uniform color" Imager "background" "bgcolor" [1.000000 1.000000 1.000000] PixelSamples 1 1 Projection "perspective" "fov" [30.000000] Identity Transform [-1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 ] Rotate -0.000000 0.000000 0.000000 1.000000 Rotate -0.000000 1.000000 0.000000 0.000000 Rotate 179.999995 0.000000 1.000000 0.000000 Translate -25.000000 -25.000000 -149.282028 Orientation "rh" WorldBegin LightSource "ambientlight" 1 LightSource "distantlight" 2 "intensity" [1.000000] "lightcolor" [1.000000 1.000000 1.000000] "from" [25.000000 25.000000 149.282028] "to" [25.000000 25.000000 0.000000] AttributeBegin TransformBegin Opacity [1.000000 1.000000 1.000000] Color [1.000000 1.000000 1.000000] Surface "plastic" "Ka" [0.000000] "Kd" [1.000000] "Ks" [0.000000] "roughness" [1.000000] "specularcolor" [1.000000 1.000000 1.000000] ConcatTransform [1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 ] Polygon "P" [0.000000 0.000000 0.000000 10.000000 0.000000 0.000000 10.000000 10.000000 0.000000 0.000000 10.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.698039 0.698039 0.698039 0.000000 0.000000 0.000000 ] Polygon "P" [10.000000 0.000000 0.000000 20.000000 0.000000 0.000000 20.000000 10.000000 0.000000 10.000000 10.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.800000 0.800000 0.800000 0.000000 0.000000 0.000000 0.698039 0.698039 0.698039 ] Polygon "P" [20.000000 0.000000 0.000000 30.000000 0.000000 0.000000 30.000000 10.000000 0.000000 20.000000 10.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.800000 0.800000 0.800000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [30.000000 0.000000 0.000000 40.000000 0.000000 0.000000 40.000000 10.000000 0.000000 30.000000 10.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [40.000000 0.000000 0.000000 50.000000 0.000000 0.000000 50.000000 10.000000 0.000000 40.000000 10.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [0.000000 10.000000 0.000000 10.000000 10.000000 0.000000 10.000000 20.000000 0.000000 0.000000 20.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.698039 0.698039 0.698039 0.000000 0.000000 0.000000 0.600000 0.600000 0.600000 ] Polygon "P" [10.000000 10.000000 0.000000 20.000000 10.000000 0.000000 20.000000 20.000000 0.000000 10.000000 20.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.698039 0.698039 0.698039 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [20.000000 10.000000 0.000000 30.000000 10.000000 0.000000 30.000000 20.000000 0.000000 20.000000 20.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [30.000000 10.000000 0.000000 40.000000 10.000000 0.000000 40.000000 20.000000 0.000000 30.000000 20.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [40.000000 10.000000 0.000000 50.000000 10.000000 0.000000 50.000000 20.000000 0.000000 40.000000 20.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.498039 0.498039 0.498039 0.000000 0.000000 0.000000 ] Polygon "P" [0.000000 20.000000 0.000000 10.000000 20.000000 0.000000 10.000000 30.000000 0.000000 0.000000 30.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.600000 0.600000 0.600000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [10.000000 20.000000 0.000000 20.000000 20.000000 0.000000 20.000000 30.000000 0.000000 10.000000 30.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [20.000000 20.000000 0.000000 30.000000 20.000000 0.000000 30.000000 30.000000 0.000000 20.000000 30.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [30.000000 20.000000 0.000000 40.000000 20.000000 0.000000 40.000000 30.000000 0.000000 30.000000 30.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.400000 0.400000 0.400000 0.000000 0.000000 0.000000 ] Polygon "P" [40.000000 20.000000 0.000000 50.000000 20.000000 0.000000 50.000000 30.000000 0.000000 40.000000 30.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.498039 0.498039 0.498039 0.000000 0.000000 0.000000 0.400000 0.400000 0.400000 ] Polygon "P" [0.000000 30.000000 0.000000 10.000000 30.000000 0.000000 10.000000 40.000000 0.000000 0.000000 40.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.349020 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [10.000000 30.000000 0.000000 20.000000 30.000000 0.000000 20.000000 40.000000 0.000000 10.000000 40.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.658824 0.803922 0.396078 0.349020 0.000000 0.000000 ] Polygon "P" [20.000000 30.000000 0.000000 30.000000 30.000000 0.000000 30.000000 40.000000 0.000000 20.000000 40.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.003922 0.000000 0.000000 0.658824 0.803922 0.396078 ] Polygon "P" [30.000000 30.000000 0.000000 40.000000 30.000000 0.000000 40.000000 40.000000 0.000000 30.000000 40.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.400000 0.400000 0.400000 0.000000 0.000000 0.000000 0.003922 0.000000 0.000000 ] Polygon "P" [40.000000 30.000000 0.000000 50.000000 30.000000 0.000000 50.000000 40.000000 0.000000 40.000000 40.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.400000 0.400000 0.400000 0.000000 0.000000 0.000000 0.345098 0.231373 0.470588 0.000000 0.000000 0.000000 ] Polygon "P" [0.000000 40.000000 0.000000 10.000000 40.000000 0.000000 10.000000 50.000000 0.000000 0.000000 50.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.349020 0.000000 0.000000 0.000000 0.000000 0.000000 0.003922 0.007843 0.000000 ] Polygon "P" [10.000000 40.000000 0.000000 20.000000 40.000000 0.000000 20.000000 50.000000 0.000000 10.000000 50.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.349020 0.000000 0.000000 0.658824 0.803922 0.396078 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [20.000000 40.000000 0.000000 30.000000 40.000000 0.000000 30.000000 50.000000 0.000000 20.000000 50.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.658824 0.803922 0.396078 0.003922 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ] Polygon "P" [30.000000 40.000000 0.000000 40.000000 40.000000 0.000000 40.000000 50.000000 0.000000 30.000000 50.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.003922 0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000 ] Polygon "P" [40.000000 40.000000 0.000000 50.000000 40.000000 0.000000 50.000000 50.000000 0.000000 40.000000 50.000000 0.000000 ] "N" [0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000 ] "Cs" [0.000000 0.000000 0.000000 0.345098 0.231373 0.470588 0.011765 0.000000 0.000000 1.000000 1.000000 1.000000 ] TransformEnd AttributeEnd WorldEnd FrameEnd --------------------------------- From David.Pont at ForestResearch.co.nz Wed Apr 9 18:29:34 2003 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Thu, 10 Apr 2003 10:29:34 +1200 Subject: [vtkusers] Line distance implicit function Message-ID: Chris, this sounds great. I will be happy to give it a test drive when its ready. Keep me posted. regards Dave Pont |--------+---------------------------------> | | Chris Scharver | | | | | | Sent by: | | | vtkusers-admin at public.k| | | itware.com | | | | | | | | | 10/04/2003 10:05 | | | | |--------+---------------------------------> >------------------------------------------------------------------------------------------------------------| | | | To: vtkusers at public.kitware.com | | cc: | | Subject: Re: [vtkusers] Line distance implicit function | >------------------------------------------------------------------------------------------------------------| At 11:35 AM +1200 on 04/08/2003, David.Pont at ForestResearch.co.nz wrote: > I think you could use vtkImplicitModeller followed by vtkImplicitDataSet >but this is very inefficient. It seems vtkImplicitModeller is like >vtkImplicitFunction and vtkSampleFunction rolled up together. It would be >nice to unroll this: make a class derived from vtkImplicitFunction which >contains the EvaluatePosition stuff to get the distance functionality. You >might have to use local differences to get the gradient? Then you could >pass this new implicit function directly to the clipper. This sounds much >smarter, and a useful class. Thanks for the response! Looking at the code in a little more detail, it looks like I should be able to just grab the part that I need. vtkCell already handles the significant work involved. I'll likel have time to implement just what I need for a vtkImplicitPolyDataFunction, but once I get that done I'll make it available so that it can be polished off and perhaps contributed. Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: < http://public.kitware.com/cgi-bin/vtkfaq> Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From nundys at neuro.duke.edu Wed Apr 9 19:12:54 2003 From: nundys at neuro.duke.edu (Surajit Nundy) Date: Wed, 9 Apr 2003 19:12:54 -0400 Subject: [vtkusers] Is Java vtkPanel working for anyone on Mac OS X? In-Reply-To: <20030409221202.19602.20420.Mailman@public.kitware.com> Message-ID: Has anyone been able to use vtkPanel on an OS X machine? If so, I would be very grateful if I could be informed of how to do it. If not, what needs to be done to fix it? Current examples such as SimpleVTK.java do not work as it should. Thanks Surajit Nundy From cz_lj at yahoo.com.cn Thu Apr 10 00:32:28 2003 From: cz_lj at yahoo.com.cn (=?gb2312?q?Chenzhuo?=) Date: Thu, 10 Apr 2003 12:32:28 +0800 (CST) Subject: [vtkusers] about reconstructing two separate model Message-ID: <20030410043228.88805.qmail@web15002.mail.bjs.yahoo.com> Hi,all vtkusers I want to reconstruct two separate model from the same series of medical images.That means I want to build model of two separate areas in the images.I want to the two model can be produced simutaneously in my program,it is to say,when my program is run one time,the two model are both produced.I use vtkMarchingCubes to build the model of the area of a particular scalar value.Now I can build a single model with running program once.Who can you how to produce more than one model by running program only once. _________________________________________________________ Do You Yahoo!? ?????KTV, ????????OK~~ http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html From cz_lj at yahoo.com.cn Thu Apr 10 00:32:33 2003 From: cz_lj at yahoo.com.cn (=?gb2312?q?Chenzhuo?=) Date: Thu, 10 Apr 2003 12:32:33 +0800 (CST) Subject: [vtkusers] about reconstructing two separate model Message-ID: <20030410043233.22076.qmail@web15006.mail.bjs.yahoo.com> Hi,all vtkusers I want to reconstruct two separate model from the same series of medical images.That means I want to build model of two separate areas in the images.I want to the two model can be produced simutaneously in my program,it is to say,when my program is run one time,the two model are both produced.I use vtkMarchingCubes to build the model of the area of a particular scalar value.Now I can build a single model with running program once.Who can you how to produce more than one model by running program only once. _________________________________________________________ Do You Yahoo!? ????,???? - ????????????! http://cn.ent.yahoo.com/newsletter/index.html From ksoft44 at hotmail.com Thu Apr 10 01:49:48 2003 From: ksoft44 at hotmail.com (kannan) Date: Thu, 10 Apr 2003 11:19:48 +0530 Subject: [vtkusers] Deleting a vtkPointset References: <002601c2fec5$73d5a970$869ed29b@GTC.LAB> Message-ID: you can delete a vtkpoint by the delete command. eg:- vtkpoint *x=vtkpoint::new(); x->delete(); ----- Original Message ----- From: Markus Louw To: vtkusers at public.kitware.com Sent: Wednesday, April 09, 2003 11:55 PM Subject: [vtkusers] Deleting a vtkPointset Hi All When I tell it to delete(X) a vtkPoint, it tells me the destructor is protected, but otherwise there is a memory leak (in my program, since I can't delete the pointer). Something seems wrong with the vtkPoint.Reset() function, my program only works if I create a new vtkPoint each time... any suggestions? Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: From novalet at yahoo.com.cn Thu Apr 10 01:45:50 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Thu, 10 Apr 2003 13:45:50 +0800 (CST) Subject: [vtkusers] slow down when use tcl api Message-ID: <20030410054550.35013.qmail@web15210.mail.bjs.yahoo.com> yesterday i write a letter about my experience in using tcl/vtk in MFC program. But in fact, the problem is nothing to do with the MFC, because even the simplest c file will have such problem. Look, below is the simplest tcl interpreter i written in tcl API. ================================================================ #include #include #include int app_init(Tcl_Interp *interp); int main(int argc, char **argv) { Tk_Main(argc, argv, app_init); return 0; } int app_init(Tcl_Interp *interp) { if(Tcl_Init(interp) == TCL_ERROR) return TCL_ERROR; if(Tk_Init(interp) == TCL_ERROR) return TCL_ERROR; return 0; } ============================================================================ Compile it to a exe called "mytcl.exe", then i use this simplest tcl interpreter to run the script in the vtk. for example mytcl capcow.tcl wish83 capcow.tcl you can also exam with other tcl script. The conclusion is the wish83 run much faster than mytcl. So the tcl api must be the source to hinder the vtk rendering speed. I hope the pals on the list help: (1) exam the same test on a linux platform. (2) maybe some guru can compare the wish83 code with the tcl api to find out what's wrong. My aim is using tcl to organize vtk pipeline in a c/c++ program, but if this design will slow the program so much, it would not be a good idea. But i can't understand why the api have a performance problem, i guess the wish83 or tclsh83 are built on the base of such api. PS my OS is win2k, i have test it on both vc6 and vc7, both debug and release mode (vc6 has a worse performance :< ) ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ?????KTV, ????????OK~~ http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html From shuang112 at 163.com Thu Apr 10 03:08:03 2003 From: shuang112 at 163.com (shuang) Date: Thu, 10 Apr 2003 15:08:03 +0800 (CST) Subject: [vtkusers] =?gb2312?B?cHJvYmxlbSBvZiB1c2luZyB2dGtQTFlSZWFkZXI=?= Message-ID: <3E951853.0000A6.06474@bj148.163.com> Dear all: I'm a newcomer of VTK.I have problem of using vtkPLYReader. I write a program to read and view the PLY model,but there is something wrong with vtkPLYReader.when I make the project,there is a make error: undefined reference to 'vtkPLYReader::New()' My code with vtkPLYReader is as follow: ... #include "vtkPLYReader.h" ... int main( int argc, char *argv[] ) { ... vtkPLYReader *r=vtkPLYReader::New(); ... } Can you tell me the reason and how to solve it? Thanks in advance! Shuang ============================================================= ????VIP?????????????????????????? http://vip.163.com ???????????????????????????? http://www.nease.net ?????????? - ????????????! http://love.163.com From Mathieu.Malaterre at creatis.insa-lyon.fr Thu Apr 10 04:02:55 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Thu, 10 Apr 2003 10:02:55 +0200 Subject: [vtkusers] problem of using vtkPLYReader In-Reply-To: <3E951853.0000A6.06474@bj148.163.com> References: <3E951853.0000A6.06474@bj148.163.com> Message-ID: <3E95252F.7070609@creatis.insa-lyon.fr> Shuang, Please include a maximum of informations otherwise we won't be able to answer you. Anyway here are some propositions: 1 did you install correctly VTK ? 2 did you used cmake to build it ? 3 did you link your app to (lib)vtkIO.(dll/so) ? 4 did you add the path : where_vtk_is_installed/include/vtk in your project (for a make install) otherwise use this path: where_vtk_source_is/IO HTH mathieu shuang wrote: > Dear all: > I'm a newcomer of VTK.I have problem of using vtkPLYReader. > I write a program to read and view the PLY model,but there is something wrong with vtkPLYReader.when I make the project,there is a make error: > > undefined reference to 'vtkPLYReader::New()' > > My code with vtkPLYReader is as follow: > > ... > #include "vtkPLYReader.h" > ... > int main( int argc, char *argv[] ) > { > ... > vtkPLYReader *r=vtkPLYReader::New(); > ... > } > > Can you tell me the reason and how to solve it? > > Thanks in advance! > > Shuang > ============================================================= > ????VIP?????????????????????????? http://vip.163.com > ???????????????????????????? http://www.nease.net > ?????????? - ????????????! http://love.163.com > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From shuang112 at 163.com Thu Apr 10 04:41:12 2003 From: shuang112 at 163.com (shuang) Date: Thu, 10 Apr 2003 16:41:12 +0800 (CST) Subject: [vtkusers] =?gb2312?B?IHByb2JsZW0gb2YgdXNpbmcgdnRrUExZUmVhZGVy?= Message-ID: <3E952E28.00004C.00630@bj230.163.com> Dear all: I'm a newcomer of VTK.I have problem of using vtkPLYReader. I write a program to read and view the PLY model,but there is something wrong with vtkPLYReader.when I make the project,there is a make error: undefined reference to 'vtkPLYReader::New()' I installed VTK 4 correctly under Redhat8.0; I can complie and run the examples of VTK; I use cmake generate the makefile; My code with vtkPLYReader is as follow: ... #include "vtkPLYReader.h" ... int main( int argc, char *argv[] ) { ... vtkPLYReader *r=vtkPLYReader::New(); ... } I can get the .o correctly. if I just define the pointer and dont allocate memory as follow: vtkPLYReader *r; and use other method of vtkPLYReader such as SetFileName(),there is no error message when I build it. Can you tell me the reason and how to solve it? Thanks in advance! Shuang ============================================================= ????VIP?????????????????????????? http://vip.163.com ???????????????????????????? http://www.nease.net ?????????? - ????????????! http://love.163.com From shuang112 at 163.com Thu Apr 10 04:59:55 2003 From: shuang112 at 163.com (shuang) Date: Thu, 10 Apr 2003 16:59:55 +0800 (CST) Subject: [vtkusers] =?gb2312?B?cHJvYmxlbSBvZiB1c2luZyB2dGtQTFlSZWFkZXI=?= Message-ID: <3E95328B.000019.16301@bj231.163.com> Dear all: I'm a newcomer of VTK.I have problem of using vtkPLYReader. I write a program to read and view the PLY model,but there is something wrong with vtkPLYReader.when I make the project,there is a make error: undefined reference to 'vtkPLYReader::New()' I installed VTK 4 under Redhat8.0 correctly; I can compile the examples with VTK and run them; I use cmake to generate the Makefile. My code with vtkPLYReader is as follow: ... #include "vtkPLYReader.h" ... int main( int argc, char *argv[] ) { ... vtkPLYReader *r=vtkPLYReader::New(); ... } If I just define the pointer and dont allocate memory,and use some other method of vtkPLYReader as SetFileName(),there is no error when I build it,but when run it,as supposed,segmentation fault. Can you tell me the reason and how to solve it? Thanks in advance! Shuang ============================================================= ????VIP?????????????????????????? http://vip.163.com ???????????????????????????? http://www.nease.net ?????????? - ????????????! http://love.163.com From jdhunter at ace.bsd.uchicago.edu Thu Apr 10 06:37:35 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 10 Apr 2003 05:37:35 -0500 Subject: [vtkusers] Finding the appropriate vtkCommand::*Event In-Reply-To: <26480325f9b4.25f9b4264803@lbl.gov> (TDeschamps@lbl.gov's message of "Wed, 09 Apr 2003 11:51:05 -0700") References: <26480325f9b4.25f9b4264803@lbl.gov> Message-ID: >>>>> "TDeschamps" == TDeschamps writes: TDeschamps> I would still like to be able to call these events, TDeschamps> but I really want this process to be called all the TDeschamps> time when no other event is. As far as I know, VTK doesn't have an idle event or a timer event that happens every so often whether or not you are interacting with the window. While there are vtkCommand::TimerEvent's, I don't think these are issued when the window is idling. GTK provides timer and idle event loops. Perhaps the GUI system you are using does as well? John Hunter From shuang112 at 163.com Thu Apr 10 06:49:56 2003 From: shuang112 at 163.com (shuang) Date: Thu, 10 Apr 2003 18:49:56 +0800 (CST) Subject: [vtkusers] =?gb2312?B?UmU6IFJlOiBbdnRrdXNlcnNdICBwcm9ibGVtIG9mIHVzaW5nIHZ0a1BMWVJlYWRlcg==?= Message-ID: <3E954C54.000007.08405@bj231.163.com> Hi, I installed the office release of VTK: VTK 4.2 I did try "vtkPLYReader *r = new vtkPLYReader;",but the make error message said that vtkPLYReader is protected. Shuang > Shuang, > Ok thanks for providing these infos, anyway I still need to know the > exact version of VTK. And do you use a build or installed version ? > I am using VTK from a fresh CVS and everything went smoothly. > > To know the exact version you could just do: > > grep VERSION VTK/CMakeLists.txt > > --- > as a try, you could try replacing: > > vtkPLYReader *r=vtkPLYReader::New(); > by > vtkPLYReader *r= new vtkPLYReader; > > just to see if it works. (I know this is bad for parsing). > > --- > Also if you have built the python/tcl binding you can try: > $python > > import vtk > > r = vtk.vtkPLYReader() > > > thanks, > mathieu > > shuang wrote: > > Dear all: > > > > I'm a newcomer of VTK.I have problem of using vtkPLYReader. > > I write a program to read and view the PLY model,but there is something wrong with vtkPLYReader.when I make the project,there is a make error: > > > > undefined reference to 'vtkPLYReader::New()' > > > > I installed VTK 4 correctly under Redhat8.0; > > I can complie and run the examples of VTK; > > I use cmake generate the makefile; > > > > My code with vtkPLYReader is as follow: > > > > ... > > #include "vtkPLYReader.h" > > ... > > int main( int argc, char *argv[] ) > > { > > ... > > vtkPLYReader *r=vtkPLYReader::New(); > > ... > > } > > > > I can get the .o correctly. > > > > if I just define the pointer and dont allocate memory as follow: > > > > vtkPLYReader *r; > > > > and use other method of vtkPLYReader such as SetFileName(),there is no error message when I build it. > > > > Can you tell me the reason and how to solve it? > > > > Thanks in advance! > > > > Shuang > > > > > > > > ============================================================= > > ????VIP?????????????????????????? http://vip.163.com > > ???????????????????????????? http://www.nease.net > > ?????????? - ????????????! http://love.163.com > > _______________________________________________ > > This is the private VTK discussion list. > > Please keep messages on-topic. Check the FAQ at: > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Mathieu Malaterre > CREATIS > 28 Avenue du Doyen LEPINE > B.P. Lyon-Montchat > 69394 Lyon Cedex 03 > http://www.creatis.insa-lyon.fr/~malaterre/ > > ============================================================= ????VIP?????????????????????????? http://vip.163.com ???????????????????????????? http://www.nease.net ?????????? - ????????????! http://love.163.com From jcpouce at yahoo.com Thu Apr 10 07:07:40 2003 From: jcpouce at yahoo.com (jean-charles campagne) Date: Thu, 10 Apr 2003 04:07:40 -0700 (PDT) Subject: [vtkusers] animation, vtkPoints update, pipeline update Message-ID: <20030410110740.93681.qmail@web41501.mail.yahoo.com> thanks ! it does work ! the other way i tried was : deleting the old points and allocating new points with new coordinates. but your solution is far more efficient ! JCC. -------------------------------------- From: N Smethurst To: vtkusers Subject: Re: [vtkusers] animation, vtkPoints update, pipeline update Date: Wed, 9 Apr 2003 20:25:51 +0200 I don't think SetPoints() calls Modified().. so try points->Modified() and if it doesn't work, you can curse me for giving advice when I am still a beginner. :) nick Le Mercredi 9 Avril 2003 15:14, jean-charles campagne a ?crit : > it seems that the pipeline is not being updated... > > it seems it's not the way to do so (it render the > first frame alright > and all the other frames are the same : i think the > pipeline is not > being update correctly...) > > I browsed the documentation for various methods that > would update the > pipeline (i tried calling Render() on different parts > of the > pipeline), and at best i got a blank screen... __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com From hartley at comp.lancs.ac.uk Thu Apr 10 07:13:32 2003 From: hartley at comp.lancs.ac.uk (Edward Hartley) Date: Thu, 10 Apr 2003 12:13:32 +0100 Subject: [vtkusers] Re: vtk Python In-Reply-To: <20030409163501.21205.33107.Mailman@public.kitware.com> Message-ID: <772C4FC5-6B45-11D7-AC0D-0003939CD440@comp.lancs.ac.uk> > > > On Wed, 2003-04-09 at 13:46, Edward Hartley wrote: >> >> >> I built with CMAKE linker flag -L/usr/lib -llibstdc++-3-libc6.2.2.10.0 >> which nm shows has this symbol > > Why did you explicitly add this library? It should not be necessary if > you build with g++? > > Did you build with VTK_USE_ANSI_STDLIB_DEFAULT on or off? On your > setup, it should probably be on. > My first build attempt did have only the VTK_USE_ANSI_STDLIB_DEFAULT option on I got build errors of the libvtkIO.so and libvtkCommon.so undefined reference to isstream ostream and streambuf etc. so I assumed it had not picked up the library in the standard place so I went looking for the library with that specific symbol I'm building on Linux RedHat 7.1 gcc 2.96 so I expect this is partly the problem. > -- > charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ > > From jmbeotegui at yahoo.es Thu Apr 10 07:19:54 2003 From: jmbeotegui at yahoo.es (=?iso-8859-1?q?jose=20beotegui?=) Date: Thu, 10 Apr 2003 13:19:54 +0200 (CEST) Subject: [vtkusers] Installing VTK in W2000 Message-ID: <20030410111954.34477.qmail@web21509.mail.yahoo.com> Hello users, I want to install VTK4.0 and Tcl/Tk under Windows 2000 Professional and I've got problems during the installation process. Should I install vtk40core, ActiveTcl8.3.4.1 and vtk40tcl in the same folder? Is there another way to install it? Thanks in advance. --------------------------------- Yahoo! Messenger Nueva versión: Super Webcam, voz, caritas animadas, y más #161;Gratis! -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.p.botha at its.tudelft.nl Thu Apr 10 07:21:15 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 10 Apr 2003 13:21:15 +0200 Subject: [vtkusers] Re: vtk Python In-Reply-To: <772C4FC5-6B45-11D7-AC0D-0003939CD440@comp.lancs.ac.uk> References: <772C4FC5-6B45-11D7-AC0D-0003939CD440@comp.lancs.ac.uk> Message-ID: <1049973675.16680.6.camel@dutidad> On Thu, 2003-04-10 at 13:13, Edward Hartley wrote: > > Why did you explicitly add this library? It should not be necessary if > > you build with g++? > > > > Did you build with VTK_USE_ANSI_STDLIB_DEFAULT on or off? On your > > setup, it should probably be on. > > > My first build attempt did have only the VTK_USE_ANSI_STDLIB_DEFAULT > option on > I got build errors of the libvtkIO.so and libvtkCommon.so undefined > reference to isstream ostream and streambuf > etc. > so I assumed it had not picked up the library in the standard place > so I went looking for the library with that specific symbol > I'm building on Linux RedHat 7.1 gcc 2.96 > so I expect this is partly the problem. Indeed. The build MUST work on that setup with VTK_USE_ANSI_STDLIB_DEFAULT == ON. Rather do NOT link libstdc++ explicitly... If you could try it again with those settings and send the error output (last 20 lines or so of the build log) that would help to track down your problem. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From I.deBoer at polytec.de Thu Apr 10 07:26:35 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Thu, 10 Apr 2003 13:26:35 +0200 Subject: AW: [vtkusers] Installing VTK in W2000 Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F391@02polywbr.waldbronn.polytec.de> Hi, > Is there another way to install it? Why not use 4.2 release ? Works fine under XP. I found everything I need in the setup. greets Ingo From Jonathan.Bailleul at greyc.ismra.fr Thu Apr 10 08:04:42 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Thu, 10 Apr 2003 13:04:42 +0100 Subject: [vtkusers] Newbie question: how to check which updates have been performed to a given release? Message-ID: <3E955DDA.66C8993D@greyc.ismra.fr> Dear all, I've installed VTK 4.0 but noticed that version 4.2 was already available for download. My question is: how can I know which bug corrections / updates / new functions have been applied to this new version, or for any version in general. The answer might seem easy for you, but it still isn't for me! Could you give me a clue? In advance, thank you for your help. -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From Pedro.Patron at imag.fr Thu Apr 10 08:05:36 2003 From: Pedro.Patron at imag.fr (Pedro Patron) Date: Thu, 10 Apr 2003 14:05:36 +0200 Subject: [vtkusers] Open Inventor format Message-ID: <200304101405.36455.Pedro.Patron@imag.fr> Hi everybody! Does anyone know how can I read a .iv file or how can I convert it in a readable file format for vtk? Thank you in advance. From I.deBoer at polytec.de Thu Apr 10 08:15:35 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Thu, 10 Apr 2003 14:15:35 +0200 Subject: AW: [vtkusers] Newbie question: how to check which updates have been performed to a given release? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F394@02polywbr.waldbronn.polytec.de> Hi, > The answer might seem easy for you, but it still isn't for > me! Could you give me a clue? How about the FAQ? 6.8. Changes to VTK between 4.0 and 4.2 http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.008.htp greets Ingo From Mathieu.Malaterre at creatis.insa-lyon.fr Thu Apr 10 08:13:01 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Thu, 10 Apr 2003 14:13:01 +0200 Subject: [vtkusers] Open Inventor format In-Reply-To: <200304101405.36455.Pedro.Patron@imag.fr> References: <200304101405.36455.Pedro.Patron@imag.fr> Message-ID: <3E955FCD.4010601@creatis.insa-lyon.fr> Pedro, Please read the FAQ before posting a question: http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq03.002.htp mathieu Pedro Patron wrote: > Hi everybody! > > Does anyone know how can I read a .iv file or how can I convert it in a > readable file format for vtk? > > Thank you in advance. > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From I.deBoer at polytec.de Thu Apr 10 08:47:39 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Thu, 10 Apr 2003 14:47:39 +0200 Subject: [vtkusers] Re: Example Medical3 doesnt run - its true - Bug ? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F397@02polywbr.waldbronn.polytec.de> Hi, I also tried the medical3 sample under tcl and mfc/c++. I found out that the tcl version shows the planes correctly as images from the dataset. The c++ version shows planes but without images. I can see some cuttings like a plane, but no image. Maybe there is a bug somewhere ? greets Ingo From Petrek at kmlinux.fjfi.cvut.cz Thu Apr 10 03:26:36 2003 From: Petrek at kmlinux.fjfi.cvut.cz (Martin Petrek) Date: Thu, 10 Apr 2003 09:26:36 +0200 (CEST) Subject: [vtkusers] Texture problem - is it a BUG? Message-ID: Hi, I've problem with mapping texture onto the surface made of triangles. I've texture Image 't.ppm' (256x256) and i like to map it on surface. I've defined 2 triangles and texture coordinates (see code). The corners of the texture corespondentwith the right points. But the result is quite strange. Can anybody tell me what I'm doing wrong? Please help. Martin #!/usr/bin/vtk package require vtk package require vtkinteraction vtkPolyData triang vtkPoints points vtkCellArray polys vtkPolyDataMapper triangMapper vtkActor triangActor points InsertPoint 0 0 0 0 points InsertPoint 1 1 0 0 points InsertPoint 2 1 1 0 points InsertPoint 3 0 1 0 polys InsertNextCell 3 polys InsertCellPoint 0 polys InsertCellPoint 1 polys InsertCellPoint 2 polys InsertNextCell 3 polys InsertCellPoint 2 polys InsertCellPoint 3 polys InsertCellPoint 0 triang SetPoints points triang SetPolys polys vtkFloatArray tc tc SetNumberOfComponents 2 tc SetNumberOfTuples 6 tc SetTuple2 0 0 0 tc SetTuple2 1 1 0 tc SetTuple2 2 1 1 tc SetTuple2 3 1 1 tc SetTuple2 4 0 1 tc SetTuple2 5 0 0 [triang GetPointData] SetTCoords tc vtkPNMReader pnmReader pnmReader SetFileName "t.ppm" vtkTexture atext atext SetInput [pnmReader GetOutput] atext InterpolateOn triangMapper SetInput triang triangActor SetMapper triangMapper triangActor SetTexture atext vtkRenderer ren1 vtkRenderWindow renWin renWin AddRenderer ren1 vtkRenderWindowInteractor iren iren SetRenderWindow renWin ren1 SetBackground 0.1 0.2 0.4 ren1 AddActor triangActor renWin SetSize 500 500 # render the image iren AddObserver UserEvent {wm deiconify .vtkInteract} renWin Render ren1 ResetCameraClippingRange renWin Render # prevent the tk window from showing up then start the event loop wm withdraw . -- *********************************************************** * -----------------------+ \'/ F J F I * * Martin Petrek | O C V U T * * 5. rocnik FJFI CVUT | \'/ \'/ PRAHA * * -----------------------+ * * * * Fakulta jaderna a fyzikalne inzenyrska * * Faculty of Nuclear sciences and Physical engineering * * ======================================================= * * email : petrek at newton.fjfi.cvut.cz * * www : http://www-troja.fjfi.cvut.cz/~petrek * * http://bimbo.fjfi.cvut.cz/~petrek * * ICQ : 52725854 nyni opet v akci * * * *********************************************************** -------------- next part -------------- A non-text attachment was scrubbed... Name: t.ppm Type: image/x-portable-pixmap Size: 65596 bytes Desc: URL: From scharver at evl.uic.edu Thu Apr 10 09:35:55 2003 From: scharver at evl.uic.edu (Chris Scharver) Date: Thu, 10 Apr 2003 08:35:55 -0500 Subject: [vtkusers] Open Inventor format In-Reply-To: <200304101405.36455.Pedro.Patron@imag.fr> References: <200304101405.36455.Pedro.Patron@imag.fr> Message-ID: At 2:05 PM +0200 04/10/2003, Pedro Patron wrote: >Does anyone know how can I read a .iv file or how can I convert it in a >readable file format for vtk? Are you trying to just read an .iv file, or would tighter integration with Inventor be useful? If you have Coin3d or another Inventor implementation available, I'm working on some code that converts an Inventor shape into vtkPolyData. It doesn't work on an entire model unless you flatten it (with ivfix or something similar) beforehand. I currently have it working with both Coin3d on MacOS X and TGS Inventor under Windows. VTK doesn't support directly reading Inventor files, but you could either import them using the code above or develop your own method to convert the models. Hope this helps, Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 From jaufre_devosse at yahoo.com Thu Apr 10 10:14:25 2003 From: jaufre_devosse at yahoo.com (=?iso-8859-1?q?Jaufre=20Devosse?=) Date: Thu, 10 Apr 2003 16:14:25 +0200 (CEST) Subject: [vtkusers] substract a PolyData from another (boolean operation) Message-ID: <20030410141425.12580.qmail@web41410.mail.yahoo.com> I have 2 questions. 1) I want to substract a polydata from another? 2) Is it possible to substract a solid or filled polydata from another? Please give me some help, I've try to use vtkImplicitDataSet with vtkClipPolyData but the result is a difference of colors not shape. I want make a substract like a boolean operation( the difference). Thank to answer me. ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran?ais ! Yahoo! Mail : http://fr.mail.yahoo.com From krs at cs.uncc.edu Thu Apr 10 10:19:53 2003 From: krs at cs.uncc.edu (K.R.Subramanian) Date: Thu, 10 Apr 2003 10:19:53 -0400 Subject: [vtkusers] ATI cards with Linux.. References: <20030410141425.12580.qmail@web41410.mail.yahoo.com> Message-ID: <3E957D89.28BB2A3D@cs.uncc.edu> Has anyone any experience using some of the new ATI cards (like 9700, 9800) on Linux with VTK? I would like some comparions to high end NVidia cards. Are they similar? I also would like to know if the drivers on ATI cards are readily available. -- K.R.Subramanian Phone: (704) 687-4872 Department of Computer Science FAX: (704) 687-4893 UNC Charlotte, CARC 311 Email: krs at cs.uncc.edu Charlotte, NC 28223-0001 Web: http://www.cs.uncc.edu/~krs -------------- next part -------------- An HTML attachment was scrubbed... URL: From sxa at fluent.com Thu Apr 10 10:46:42 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Thu, 10 Apr 2003 10:46:42 -0400 Subject: [vtkusers] substract a PolyData from another (boolean operation) References: <20030410141425.12580.qmail@web41410.mail.yahoo.com> Message-ID: <000701c2ff70$00243c70$8ae4e9c0@sxapc> We also have this need. >From what I've found out, the only way to do Boolean operations is through implicit function of vtk primitives. Boolean on any polydata dataset as such is not available. If someone can prove me wrong, I would be extremely happy ! Take a look at the icecream example in the vtk books. (related to vtkImplicitBoolean) ____________________________ Seb ----- Original Message ----- From: "Jaufre Devosse" To: Sent: Thursday, April 10, 2003 10:14 AM Subject: [vtkusers] substract a PolyData from another (boolean operation) > > I have 2 questions. > > 1) I want to substract a polydata from another? > 2) Is it possible to substract a solid or filled > polydata from another? > > Please give me some help, I've try to use > vtkImplicitDataSet with vtkClipPolyData but the result > is a difference of colors not shape. > > I want make a substract like a boolean operation( the > difference). > > Thank to answer me. > > ___________________________________________________________ > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran?ais ! > Yahoo! Mail : http://fr.mail.yahoo.com > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From rgupta at imaging.robarts.ca Thu Apr 10 11:34:13 2003 From: rgupta at imaging.robarts.ca (Ravi Gupta) Date: Thu, 10 Apr 2003 11:34:13 -0400 Subject: [vtkusers] Building executables - CMake - VTK Message-ID: <3E958EF5.8000108@imaging.robarts.ca> Hi, I am trying to build my own executables for vtk. I can build the .o files fine but I can't get the cmake build process to build my executable. I added ADD_EXECUTABLE(dwt ${DWT_SRCS}) to the CMakeLists.txt file. I looked at the testing and examples directories and their CMakeList.txt files but can't see what they did different. I can cd /DWT after the build cc -o dwt abc.o xyz.o works file. UNIX SunOS 5.8 c++ Any help would be appreciated. Ravi -- Ravi Gupta Programmer ################################################### Robarts Research - Imaging | 100 Perth Drive Tel: (519) 663-5777 ext. 1-34077 | London, Ontario Fax: (519) 663-3403 | N6A 5K8 E-Mail: rgupta at imaging.robarts.ca | Canada ################################################### ################################################### http://www.imaging.robarts.ca/ http://www.imaging.robarts.ca/coders http://www.imaging.robarts.ca/~rgupta ################################################### "Be the change you wish to see in the world." -Mohandas Karamchand Gandhi From c.p.botha at its.tudelft.nl Thu Apr 10 15:30:22 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Thu, 10 Apr 2003 21:30:22 +0200 Subject: [vtkusers] Re: vtk python In-Reply-To: References: Message-ID: <20030410193022.GB21127@dutidad.twi.tudelft.nl> Please keep this on the list as it might be useful to others! On Thu, Apr 10, 2003 at 04:19:51PM +0100, Edward Hartley wrote: > /usr/local/packages/VTK-4.2.1/bin/libvtkIO.so: undefined reference to > `istream::seekg(long long)' > /usr/local/packages/VTK-4.2.1/bin/libvtkIO.so: undefined reference to > `ios::rdstate(void) const' > /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference > to `ostrstream::str(void)' > /usr/local/packages/VTK-4.2.1/bin/libvtkIO.so: undefined reference to > `istream::operator>>(double &)' > /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference > to `streambuf::pbase(void) const' > /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference > to `streambuf::uflow(void)' > /usr/local/packages/VTK-4.2.1/bin/libvtkIO.so: undefined reference to > `ostream::seekp(long long)' > /usr/local/packages/VTK-4.2.1/bin/libvtkIO.so: undefined reference to > `ifstream::ifstream(int, char const *, int, int)' > /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference > to `string_char_traits::assign(char &, char const &)' > /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference > to `streambuf::seekpos(long long, int)' > /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference > to `streambuf::seekoff(long long, ios::seek_dir, int)' > /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference > to `streambuf type_info function' > collect2: ld returned 1 exit status > make[3]: *** [/usr/local/packages/VTK-4.2.1/bin/vtkpython] Error 1 > make[2]: *** [default_target] Error 2 > make[1]: *** [default_target_Wrapping_Python] Error 2 > make: *** [default_target] Error 2 SNIP > //C++ compiler > CMAKE_CXX_COMPILER:STRING=/usr/bin/gcc This is your problem. *WHY* is this gcc and not g++ or c++? Fix this and your build should work. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From patrick.gendron at cnrc-nrc.gc.ca Thu Apr 10 17:39:36 2003 From: patrick.gendron at cnrc-nrc.gc.ca (Gendron, Patrick) Date: Thu, 10 Apr 2003 17:39:36 -0400 Subject: [vtkusers] Black right border when stretching my window Message-ID: <8F419A9A5A98D611AF8D0004AC4CA41E6A832B@nrcbouex1.imi.nrc.ca> Hi! I have a problem, I draw a vtkRenderWindow inside an existing Window with SetWindowId(HWND), but when I maximize that window there is black space where is supposed to be additional viewing space. Same phenomenon happens in ParaView 0.6. Smaller is the viewing space when the application is started and the RenderWindow displayed, bigger will be the black space on the right and the bottom of the viewing space Does anybody can help me? Notes: Windows 2000, C++ Builder 5, VTK 4.0, ATI Radeo 7200 <> <> Patrick Gendron Agent technique | Technical officer T?l. | tel. (450) 641-5418 Fax (450) 641-5106 Courriel | E-mail : Patrick.Gendron at cnrc-nrc.gc.ca Institut des mat?riaux industriels | Industrial Materials Institute Conseil national de recherches Canada | National Research Council Canada 75, de Mortagne, Boucherville, Qu?bec, Canada, J4B 6Y4 Gouvernement du Canada | Government of Canada -------------- next part -------------- A non-text attachment was scrubbed... Name: before_stretching.jpg Type: image/jpeg Size: 11763 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after_stretching.jpg Type: image/jpeg Size: 39383 bytes Desc: not available URL: From xueling at pdx.edu Thu Apr 10 17:52:19 2003 From: xueling at pdx.edu (xueling at pdx.edu) Date: Thu, 10 Apr 2003 14:52:19 -0700 Subject: [vtkusers] How to use vtk in VC++? Message-ID: <1050011539.3e95e79386cb6@webmail.pdx.edu> Hi, I am a beginner of vtk. I'd like to know the first step I need to do if I want to build a project in VC++ 6.0 Appreciate your advise! Thanks & Regards Xueling From Yang at AGIUSA.COM Thu Apr 10 17:50:55 2003 From: Yang at AGIUSA.COM (Xianjin Yang) Date: Thu, 10 Apr 2003 16:50:55 -0500 Subject: [vtkusers] Black right border when stretching my window Message-ID: <6AC51773FA304E469DEE9569AF903E5B1686AC@mail.exchngsvr.agiusa.com> This is a graphics card problem. You may reduce the hardware acceleration level (see attachment) or update your graphics card driver (get the latest version of the driver). Sometimes, reducing screen resolution or number of colors helps. Yang -----Original Message----- From: Gendron, Patrick [mailto:patrick.gendron at cnrc-nrc.gc.ca] Sent: Thursday, April 10, 2003 4:40 PM To: Vtkusers (E-mail) Subject: [vtkusers] Black right border when stretching my window Hi! I have a problem, I draw a vtkRenderWindow inside an existing Window with SetWindowId(HWND), but when I maximize that window there is black space where is supposed to be additional viewing space. Same phenomenon happens in ParaView 0.6. Smaller is the viewing space when the application is started and the RenderWindow displayed, bigger will be the black space on the right and the bottom of the viewing space Does anybody can help me? Notes: Windows 2000, C++ Builder 5, VTK 4.0, ATI Radeo 7200 <> <> Patrick Gendron Agent technique | Technical officer T?l. | tel. (450) 641-5418 Fax (450) 641-5106 Courriel | E-mail : Patrick.Gendron at cnrc-nrc.gc.ca Institut des mat?riaux industriels | Industrial Materials Institute Conseil national de recherches Canada | National Research Council Canada 75, de Mortagne, Boucherville, Qu?bec, Canada, J4B 6Y4 Gouvernement du Canada | Government of Canada -------------- next part -------------- A non-text attachment was scrubbed... Name: HardwareAcc.jpg Type: image/jpeg Size: 42772 bytes Desc: not available URL: From mdl78 at libero.it Thu Apr 10 18:39:24 2003 From: mdl78 at libero.it (Mdl) Date: Fri, 11 Apr 2003 00:39:24 +0200 Subject: [vtkusers] How to use vtk in VC++? References: <1050011539.3e95e79386cb6@webmail.pdx.edu> Message-ID: <004501c2ffb2$0965e710$31810b17@bambinello> >I am a beginner of vtk. I'd like to know the first step I need to do if I want >to build a project in VC++ 6.0 First of all you can find the instructions somewhere in the docs; there are also many old posts in the mailing list that can help you. Anyway, assuming that you do not want to compile VTK but only to build your projects, the short answer is that all you need to do is get the pre-compiled libraries (*.lib) and tell the linker where to find them (in the Project properties). Of course, to get your code compiled you also need to tell the compiler where VTK header files (*.h) are (it depends upon where you installed VTK). Hope that's enough, otherwise check in the docs or on the website (www.vtk.org). ________________________________________ Marco Di Lorenzo (mdl78 at libero.it) ________________________________________ IAC-CNR di Roma Istituto per le Applicazioni del Calcolo "M. Picone" Viale del Policlinico, 137 00161, Roma ________________________________________ From xueling at pdx.edu Thu Apr 10 19:36:12 2003 From: xueling at pdx.edu (xueling at pdx.edu) Date: Thu, 10 Apr 2003 16:36:12 -0700 Subject: [vtkusers] How to use vtk in VC++? In-Reply-To: <004501c2ffb2$0965e710$31810b17@bambinello> References: <1050011539.3e95e79386cb6@webmail.pdx.edu> <004501c2ffb2$0965e710$31810b17@bambinello> Message-ID: <1050017772.3e95ffec7d290@webmail.pdx.edu> Hi, Thanks for your kind information. I want to compile VTK. I have downloaded vtk42-latestversion and installed it. But my problem is I cannot find commom and graphics folder under vtk when I tried to add them into tool > options. I have tried several ways that have been posted, but none of them works. I don't know why. Do I have to buy the book "The Visualisation ToolKit Users' Guide"? Could you please tell me in detail, I mean the procedure, how to config before I can compile the code successfully? Appreciate your advise! Thanks & Regards Xueling Quoting Mdl : > > >I am a beginner of vtk. I'd like to know the first step I need to do if I > want > >to build a project in VC++ 6.0 > > First of all you can find the instructions somewhere in the docs; there are > also many old posts in the mailing list that can help you. > Anyway, assuming that you do not want to compile VTK but only to build your > projects, the short answer is that all you need to do is get the > pre-compiled libraries (*.lib) and tell the linker where to find them (in > the Project properties). Of course, to get your code compiled you also need > to tell the compiler where VTK header files (*.h) are (it depends upon where > you installed VTK). > > Hope that's enough, otherwise check in the docs or on the website > (www.vtk.org). > > ________________________________________ > > Marco Di Lorenzo > (mdl78 at libero.it) > ________________________________________ > > IAC-CNR di Roma > Istituto per le Applicazioni del Calcolo "M. Picone" > Viale del Policlinico, 137 > 00161, Roma > ________________________________________ > > > > From cz_lj at yahoo.com.cn Thu Apr 10 20:16:34 2003 From: cz_lj at yahoo.com.cn (=?gb2312?q?Chenzhuo?=) Date: Fri, 11 Apr 2003 08:16:34 +0800 (CST) Subject: [vtkusers] about vtkBMPReader Message-ID: <20030411001634.53701.qmail@web15002.mail.bjs.yahoo.com> Hi,all vtkusers If I want to build a 3D model of a series of color images by using vtkMarchingCubes.Which class of vtkImageRead2 should I use to read the image data.Can vtkBMPReader do the task?What should I do?Please help me. _________________________________________________________ Do You Yahoo!? ?????KTV, ????????OK~~ http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html From novalet at yahoo.com.cn Fri Apr 11 01:10:45 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Fri, 11 Apr 2003 13:10:45 +0800 (CST) Subject: [vtkusers] About the slow down in tcl api Message-ID: <20030411051045.65969.qmail@web15204.mail.bjs.yahoo.com> Hi! pals I should apologize for yesterdays' two letters complaining of tcl api. In fact i discover it only slow down in MS studio environment. If your run executes in command windows, it runs as quickly as wish83. It seems even in "release" mode, vc environment do some watch on the running process, which make it run slower. I am very sorry if my letters waste some of your treasureful time. ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ?????KTV, ????????OK~~ http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html From cz_lj at yahoo.com.cn Fri Apr 11 01:18:22 2003 From: cz_lj at yahoo.com.cn (=?gb2312?q?Chenzhuo?=) Date: Fri, 11 Apr 2003 13:18:22 +0800 (CST) Subject: [vtkusers] about vtkBMPReader and vtkMarchingCubes Message-ID: <20030411051822.67183.qmail@web15005.mail.bjs.yahoo.com> Hi,all vtkusers I am much puzzled at the second parameter of the function vtkMarchingCubes::SetValue(int i,float value). Now I have a series of BMP images, and I want to build a 3D model of a series of areas in BMP images. But I don't know what value(the direct scalevalue from image or RGB value in image or some other value) I should give to the parameter.Please help me!!! _________________________________________________________ Do You Yahoo!? ?????KTV, ????????OK~~ http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html From I.deBoer at polytec.de Fri Apr 11 02:16:42 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Fri, 11 Apr 2003 08:16:42 +0200 Subject: [vtkusers] How to use vtk in VC++? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3A7@02polywbr.waldbronn.polytec.de> Hi, > Could you please tell me in detail, I mean the procedure, > how to config before I can compile the code successfully? Actually it is rather simple. Download the source of vtk. Also CMake. Start CMake, choose your compiler and then CMake generates your wsp/dsp files. Or as Marco said... If you only want to build projects of your own. Download the setup.exe, install it. In the Studio set the include and lib directory. That's it. greets Ingo From I.deBoer at polytec.de Fri Apr 11 02:20:36 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Fri, 11 Apr 2003 08:20:36 +0200 Subject: AW: [vtkusers] Black right border when stretching my window Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3A8@02polywbr.waldbronn.polytec.de> Hi, maybe Yang is right? > Notes: Windows 2000, C++ Builder 5, VTK 4.0, ATI Radeo 7200 I have WinXP, VC++, VTK 4.2, ATI Radean 9000. It works without any trouble (also ParaView)... Well... atleast there is no problem on the computer side ;) greets Ingo From mglistmail at totalise.co.uk Fri Apr 11 03:19:58 2003 From: mglistmail at totalise.co.uk (Martin Gardner) Date: Fri, 11 Apr 2003 08:19:58 +0100 Subject: [vtkusers] VolumeRendering PNG image sequences Message-ID: <3E966C9E.2030608@totalise.co.uk> Hi everyone, Does anyone have any tips with respect to volume rendering png image sequences? Just supplying the output of the vtkPNGReader to the vtkVolumeMapper doesn't do the trick. Do I need to extract a single component value from the rgb tuples first? Any hints on how to do that? Cheers Martin From Mathieu.Malaterre at creatis.insa-lyon.fr Fri Apr 11 03:32:49 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Fri, 11 Apr 2003 09:32:49 +0200 Subject: [vtkusers] Open Inventor format In-Reply-To: <200304101949.11489.Pedro.Patron@imag.fr> References: <200304101405.36455.Pedro.Patron@imag.fr> <3E955FCD.4010601@creatis.insa-lyon.fr> <200304101949.11489.Pedro.Patron@imag.fr> Message-ID: <3E966FA1.5050301@creatis.insa-lyon.fr> Pedro, Sorry I was a bit upset, please apologize. So here is a good link : http://www.help3d.com/3D_Software/3D_Software_2/convertors/convertors.html Please also note that this come from the mailing list archive which is a real goldmine: http://public.kitware.com/pipermail/vtkusers/2002-December/014913.html HTH ...this time ! mathieu Pedro Patron wrote: > Hello Mathieu, > > Thank you for your mail but it doesn't answer my question. > > I know there are not a vtkIVImporter or vtkIVReader. What I'm asking is if is > anybody knows how can I convert a .iv file in a format that vtk can read. > Have you got the answer? > > Thank you in advance ;-) > > Pedro > > On Thursday 10 April 2003 14:13, you wrote: > >>Pedro, >> >> Please read the FAQ before posting a question: >> >>http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq03.002.htp >> >>mathieu >> >>Pedro Patron wrote: >> >>>Hi everybody! >>> >>>Does anyone know how can I read a .iv file or how can I convert it in a >>>readable file format for vtk? >>> >>>Thank you in advance. >>>_______________________________________________ >>>This is the private VTK discussion list. >>>Please keep messages on-topic. Check the FAQ at: >>> Follow this link to >>>subscribe/unsubscribe: >>>http://public.kitware.com/mailman/listinfo/vtkusers > > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From zhao-yq at cs.sjtu.edu.cn Fri Apr 11 04:50:47 2003 From: zhao-yq at cs.sjtu.edu.cn (zhao yong qiang) Date: Fri, 11 Apr 2003 16:50:47 +0800 Subject: [vtkusers] help!!!about Marchingcubes Message-ID: <000a01c30007$725fadf0$4c00a8c0@fly> HI all, I use series of MRI images as the source data and vtkMarchingCube to construct 3d object, but it does not show good effect.. somewhere of the object are transparent. How can I get the solid 3d object? and how to paint different color according to different texture? Sincerely, Zhao Yongqiang Dept. of Computer Science & Engineering Shanghai JiaoTong University Shanghai, China zhao-yq at cs.sjtu.edu.cn -------------- next part -------------- An HTML attachment was scrubbed... URL: From hartley at comp.lancs.ac.uk Fri Apr 11 05:30:45 2003 From: hartley at comp.lancs.ac.uk (Edward Hartley) Date: Fri, 11 Apr 2003 10:30:45 +0100 Subject: [vtkusers] Re: vtk python In-Reply-To: <20030410193022.GB21127@dutidad.twi.tudelft.nl> Message-ID: <4560F200-6C00-11D7-84CC-0003939CD440@comp.lancs.ac.uk> On Thursday, April 10, 2003, at 08:30 pm, Charl P. Botha wrote: > Please keep this on the list as it might be useful to others! > OK will do > On Thu, Apr 10, 2003 at 04:19:51PM +0100, Edward Hartley wrote: >> /usr/local/packages/VTK-4.2.1/bin/libvtkIO.so: undefined reference to >> `istream::seekg(long long)' >> /usr/local/packages/VTK-4.2.1/bin/libvtkIO.so: undefined reference to >> `ios::rdstate(void) const' >> /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference >> to `ostrstream::str(void)' >> /usr/local/packages/VTK-4.2.1/bin/libvtkIO.so: undefined reference to >> `istream::operator>>(double &)' >> /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference >> to `streambuf::pbase(void) const' >> /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference >> to `streambuf::uflow(void)' >> /usr/local/packages/VTK-4.2.1/bin/libvtkIO.so: undefined reference to >> `ostream::seekp(long long)' >> /usr/local/packages/VTK-4.2.1/bin/libvtkIO.so: undefined reference to >> `ifstream::ifstream(int, char const *, int, int)' >> /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference >> to `string_char_traits::assign(char &, char const &)' >> /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference >> to `streambuf::seekpos(long long, int)' >> /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference >> to `streambuf::seekoff(long long, ios::seek_dir, int)' >> /usr/local/packages/VTK-4.2.1/bin/libvtkCommon.so: undefined reference >> to `streambuf type_info function' >> collect2: ld returned 1 exit status >> make[3]: *** [/usr/local/packages/VTK-4.2.1/bin/vtkpython] Error 1 >> make[2]: *** [default_target] Error 2 >> make[1]: *** [default_target_Wrapping_Python] Error 2 >> make: *** [default_target] Error 2 > > SNIP > >> //C++ compiler >> CMAKE_CXX_COMPILER:STRING=/usr/bin/gcc > > This is your problem. *WHY* is this gcc and not g++ or c++? Fix this > and > your build should work. Probably because I've got too used to typing ./configure expecting the options to be taken care of ;-) This sorts it out many thanks > -- > charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ > From jiang at Telematik-Institut.de Fri Apr 11 08:51:30 2003 From: jiang at Telematik-Institut.de (Chunyan Jiang) Date: Fri, 11 Apr 2003 14:51:30 +0200 Subject: [vtkusers] How to use VTK in JBuilder Message-ID: Hello everyone, Who can give me an example that how to use VTK in JBuilder? I'm a new comer for JBuilder. Thank you very much! Chunyan *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** From ramakrishna.prakash at quest-global.com Fri Apr 11 09:41:06 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Fri, 11 Apr 2003 19:11:06 +0530 Subject: [vtkusers] Java Problem Message-ID: <000001c30030$408ae320$de0ba8c0@qtwblr01.questglobal.com> Hello, I am using vtk 4.2 with JDK 1.4 in Win NT environment. Often my application crashes with following error eventhough. I use proper mutex locking. As answered in mailing list earlier, I never use vtkRenderWindow.Render() directly, but still the problem persists. Can some body help. An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69592AF0 Function=[Unknown.] Library=C:\WINNT\System32\nvoglnt.dll NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at vtk.vtkGenericRenderWindowInteractor.TimerEvent_13(Native Method) at vtk.vtkGenericRenderWindowInteractor.TimerEvent(C:/martink/vtk42/vtkdist/jav a/vtk/vtkGenericRenderWindowInteractor.java:64) at vtk.vtkCanvas$DelayAction.actionPerformed(vtkCanvas.java:250) at javax.swing.Timer.fireActionPerformed(Timer.java:271) at javax.swing.Timer$DoPostEvent.run(Timer.java:201) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja va:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java :150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) Dynamic libraries: 0x00400000 - 0x00406000 d:\apps\jdk1.4\bin\javaw.exe 0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll 0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll 0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll 0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll 0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll 0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll 0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll 0x10000000 - 0x10018000 C:\WINNT\System32\NVDESK32.DLL 0x6D330000 - 0x6D45C000 d:\apps\jdk1.4\jre\bin\client\jvm.dll 0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll 0x6D1D0000 - 0x6D1D7000 d:\apps\jdk1.4\jre\bin\hpi.dll 0x6D300000 - 0x6D30D000 d:\apps\jdk1.4\jre\bin\verify.dll 0x6D210000 - 0x6D229000 d:\apps\jdk1.4\jre\bin\java.dll 0x6D320000 - 0x6D32D000 d:\apps\jdk1.4\jre\bin\zip.dll 0x6D000000 - 0x6D0FA000 D:\Apps\jdk1.4\jre\bin\awt.dll 0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV 0x76AB0000 - 0x76AB5000 C:\WINNT\System32\IMM32.dll 0x77B20000 - 0x77BD7000 C:\WINNT\system32\ole32.dll 0x0B0A0000 - 0x0B138000 D:\Apps\vtk42\bin\vtkCommonJava.dll 0x0B140000 - 0x0B30E000 D:\Apps\vtk42\bin\vtkCommon.dll 0x780A0000 - 0x780B2000 C:\WINNT\System32\MSVCIRT.dll 0x780C0000 - 0x78121000 C:\WINNT\System32\MSVCP60.dll 0x0B310000 - 0x0B332000 D:\Apps\vtk42\bin\vtkFilteringJava.dll 0x0B340000 - 0x0B3B1000 D:\Apps\vtk42\bin\vtkFiltering.dll 0x0B3C0000 - 0x0B3FF000 D:\Apps\vtk42\bin\vtkIOJava.dll 0x0B400000 - 0x0B5DD000 D:\Apps\vtk42\bin\vtkIO.dll 0x0B5E0000 - 0x0B602000 D:\Apps\vtk42\bin\vtkpng.dll 0x0B610000 - 0x0B623000 D:\Apps\vtk42\bin\vtkzlib.dll 0x0B630000 - 0x0B652000 D:\Apps\vtk42\bin\vtkjpeg.dll 0x0B660000 - 0x0B6AE000 D:\Apps\vtk42\bin\vtktiff.dll 0x0B6B0000 - 0x0B6D3000 D:\Apps\vtk42\bin\vtkexpat.dll 0x0B6E0000 - 0x0B72A000 D:\Apps\vtk42\bin\vtkImagingJava.dll 0x0B730000 - 0x0B990000 D:\Apps\vtk42\bin\vtkImaging.dll 0x0B990000 - 0x0BA1F000 D:\Apps\vtk42\bin\vtkGraphicsJava.dll 0x0BA20000 - 0x0BC9B000 D:\Apps\vtk42\bin\vtkGraphics.dll 0x0BCA0000 - 0x0BD11000 D:\Apps\vtk42\bin\vtkRenderingJava.dll 0x0BD20000 - 0x0BF5E000 D:\Apps\vtk42\bin\vtkRendering.dll 0x755B0000 - 0x75678000 C:\WINNT\System32\OPENGL32.dll 0x76C80000 - 0x76CA2000 C:\WINNT\System32\GLU32.dll 0x77160000 - 0x77167000 C:\WINNT\System32\DCIMAN32.dll 0x0BF60000 - 0x0BF71000 D:\Apps\vtk42\bin\vtkftgl.dll 0x0BF80000 - 0x0BFCD000 D:\Apps\vtk42\bin\vtkfreetype.dll 0x6D230000 - 0x6D235000 D:\Apps\jdk1.4\jre\bin\jawt.dll 0x0DFA0000 - 0x0DFE6000 D:\Apps\vtk42\bin\vtkHybridJava.dll 0x0DFF0000 - 0x0E15F000 D:\Apps\vtk42\bin\vtkHybrid.dll 0x0E160000 - 0x0E17F000 D:\Apps\vtk42\bin\vtkParallelJava.dll 0x0E180000 - 0x0E20F000 D:\Apps\vtk42\bin\vtkParallel.dll 0x776D0000 - 0x776D8000 C:\WINNT\system32\WSOCK32.dll 0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll 0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll 0x6D180000 - 0x6D1D0000 D:\Apps\jdk1.4\jre\bin\fontmanager.dll 0x77130000 - 0x77156000 C:\WINNT\System32\ddraw.dll 0x69500000 - 0x6968A000 C:\WINNT\System32\nvoglnt.dll 0x71300000 - 0x71306000 C:\WINNT\system32\MSIDLE.DLL 0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll 0x71DC0000 - 0x71DCA000 C:\WINNT\System32\PSAPI.DLL Local Time = Fri Apr 11 19:02:44 2003 Elapsed Time = 6 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode) # # An error report file has been saved as hs_err_pid283.log. # Please refer to the file for further information. # Thanks Shyam From I.deBoer at polytec.de Fri Apr 11 10:05:55 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Fri, 11 Apr 2003 16:05:55 +0200 Subject: [vtkusers] What's more efficient ? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD93C19BB@02polywbr.waldbronn.polytec.de> Hi, I want to animate some data. The x,y positions stay the same. The z-value is changing. Now, I can either: 1. make 1 Actor and change the points on each animtion step or 2. make i Actors (before the actual animation) and only show the current Actor on each animation step. any comments on this one? greets Ingo From yeager at cgd.ucar.edu Thu Apr 10 17:14:53 2003 From: yeager at cgd.ucar.edu (Stephen Yeager) Date: Thu, 10 Apr 2003 15:14:53 -0600 (MDT) Subject: [vtkusers] (no subject) Message-ID: Hello: I run into trouble compiling VTK4.2 on AIX with xlC. The make dies on object file vtkAbstractMapper.o: Building object file vtkAbstractMapper.o... "/contrib/vtk-4.2/VTK/Common/vtkDataObject.h", line 192.3: 1540-0219 (S) The call to "operator<<" has no best match. "/contrib/vtk-4.2/VTK/Common/vtkDataObject.h", line 192.3: 1540-1228 (I) Argument number 1 is an lvalue of type "vtkOStreamWrapper". "/contrib/vtk-4.2/VTK/Common/vtkDataObject.h", line 192.3: 1540-1228 (I) Argument number 2 is an lvalue of type "int [6]". "/contrib/vtk-4.2/VTK/Common/vtkOStreamWrapper.h", line 61.22: 1540-1202 (I) No candidate is better than "vtkOStreamWrapper::operator<<(void *)". etc. This also happens when I try to compile the CVS download of VTK. Can anyone tell me what compiler options are needed for this make? or better, can anyone provide a successful CMakeCache.txt file for xlC on AIX? Thanks, Steve +-------------------------------------------------------------------+ | Stephen Yeager | National Center for Atmospheric Research | | CGD - Oceanography | 1850 Table Mesa Drive | | yeager at ncar.ucar.edu | Boulder, Colorado 80303 | | Voice: (303) 497-1721 | | +--------- http://www.cgd.ucar.edu/oce/yeager/yeager.html ----------+ From winston at cat.rpi.edu Fri Apr 11 11:11:36 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Fri, 11 Apr 2003 11:11:36 -0400 Subject: [vtkusers] VolumeRendering PNG image sequences References: <3E966C9E.2030608@totalise.co.uk> Message-ID: <3E96DB28.8080800@cat.rpi.edu> Martin Gardner wrote: > [...] Do I need to extract a single component value from > the rgb tuples first? Any hints on how to do that? Have a look at vtkImageLuminance. -Jeremy From mstenzel at pankow.in-berlin.de Fri Apr 11 20:06:46 2003 From: mstenzel at pankow.in-berlin.de (Martin Stenzel) Date: Sat, 12 Apr 2003 02:06:46 +0200 (CEST) Subject: [vtkusers] How to test VTK setup Message-ID: Hi there, I successfully built VTK version 4 on IBM's AIX 4.3.3. 1. How do I test my setup? I tried to run e.g. "vtk Mace.tcl" and other examples and receive: Illegal instruction and that's it. This information is not really useful by itself. How can I test my setup? 2. Which environment variables have to be set? By the way I am using version 4.0 'cause the program slicer depends on this version. Regards, Martin. -- -- -- -- -- -- -- -- -- --- M.Stenzel, Berlin, Germany mstenzel at pank0w.in-berlin.de -- -- -- -- -- -- -- -- -- --- GPG key available: http://me.in-berlin.de/~pankow -- -- -- -- -- -- -- -- -- --- From ramakrishna.prakash at quest-global.com Sat Apr 12 02:04:09 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Sat, 12 Apr 2003 11:34:09 +0530 Subject: [vtkusers] Java Problem In-Reply-To: <3E96CF8D.9030104@cdnorthamerica.com> Message-ID: <000401c300b9$557f9440$de0ba8c0@qtwblr01.questglobal.com> Hi, Thanks for the reply. I am using Windows NT4.0. If there is no fix for this problem in Windows NT, then this is of great concern to me as the application I am developing has to run all windows and Unix platforms. Is there any way I can come over this problem? Can somebody tell me the best way to use the vtkMutexLock. A small code snippet will be of great help. Thanks Shyam -----Original Message----- From: Jeff Lee [mailto:jeff at cdnorthamerica.com] Sent: Friday, April 11, 2003 7:52 PM To: R K Shyamprakash Subject: Re: [vtkusers] Java Problem Hi, I looked at that line in vtkCanvas and all it is doing is calling the interactor's timer event. Are you using winnt4.0? I have heard of many problems on nt4.0 with java (see archives), however this works fine on later windows(win98, win2k, winxp). I have heard of no other fixes except to upgrade your os. You could also try upgrading your ogl libs. -Jeff R K Shyamprakash wrote: >Hello, > I am using vtk 4.2 with JDK 1.4 in Win NT environment. Often my >application crashes with following error eventhough. I use proper mutex >locking. As answered in mailing list earlier, I never use >vtkRenderWindow.Render() directly, but still the problem persists. Can some >body help. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69592AF0 >Function=[Unknown.] >Library=C:\WINNT\System32\nvoglnt.dll > >NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > >Current Java thread: > at vtk.vtkGenericRenderWindowInteractor.TimerEvent_13(Native Method) > at >vtk.vtkGenericRenderWindowInteractor.TimerEvent(C:/martink/vtk42/vtkdist/ja v >a/vtk/vtkGenericRenderWindowInteractor.java:64) > at vtk.vtkCanvas$DelayAction.actionPerformed(vtkCanvas.java:250) > at javax.swing.Timer.fireActionPerformed(Timer.java:271) > at javax.swing.Timer$DoPostEvent.run(Timer.java:201) > at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) > at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) > at >java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.j a >va:197) > at >java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.jav a >:150) > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) > at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) > >Dynamic libraries: >0x00400000 - 0x00406000 d:\apps\jdk1.4\bin\javaw.exe >0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll >0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll >0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll >0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll >0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll >0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll >0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll >0x10000000 - 0x10018000 C:\WINNT\System32\NVDESK32.DLL >0x6D330000 - 0x6D45C000 d:\apps\jdk1.4\jre\bin\client\jvm.dll >0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll >0x6D1D0000 - 0x6D1D7000 d:\apps\jdk1.4\jre\bin\hpi.dll >0x6D300000 - 0x6D30D000 d:\apps\jdk1.4\jre\bin\verify.dll >0x6D210000 - 0x6D229000 d:\apps\jdk1.4\jre\bin\java.dll >0x6D320000 - 0x6D32D000 d:\apps\jdk1.4\jre\bin\zip.dll >0x6D000000 - 0x6D0FA000 D:\Apps\jdk1.4\jre\bin\awt.dll >0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV >0x76AB0000 - 0x76AB5000 C:\WINNT\System32\IMM32.dll >0x77B20000 - 0x77BD7000 C:\WINNT\system32\ole32.dll >0x0B0A0000 - 0x0B138000 D:\Apps\vtk42\bin\vtkCommonJava.dll >0x0B140000 - 0x0B30E000 D:\Apps\vtk42\bin\vtkCommon.dll >0x780A0000 - 0x780B2000 C:\WINNT\System32\MSVCIRT.dll >0x780C0000 - 0x78121000 C:\WINNT\System32\MSVCP60.dll >0x0B310000 - 0x0B332000 D:\Apps\vtk42\bin\vtkFilteringJava.dll >0x0B340000 - 0x0B3B1000 D:\Apps\vtk42\bin\vtkFiltering.dll >0x0B3C0000 - 0x0B3FF000 D:\Apps\vtk42\bin\vtkIOJava.dll >0x0B400000 - 0x0B5DD000 D:\Apps\vtk42\bin\vtkIO.dll >0x0B5E0000 - 0x0B602000 D:\Apps\vtk42\bin\vtkpng.dll >0x0B610000 - 0x0B623000 D:\Apps\vtk42\bin\vtkzlib.dll >0x0B630000 - 0x0B652000 D:\Apps\vtk42\bin\vtkjpeg.dll >0x0B660000 - 0x0B6AE000 D:\Apps\vtk42\bin\vtktiff.dll >0x0B6B0000 - 0x0B6D3000 D:\Apps\vtk42\bin\vtkexpat.dll >0x0B6E0000 - 0x0B72A000 D:\Apps\vtk42\bin\vtkImagingJava.dll >0x0B730000 - 0x0B990000 D:\Apps\vtk42\bin\vtkImaging.dll >0x0B990000 - 0x0BA1F000 D:\Apps\vtk42\bin\vtkGraphicsJava.dll >0x0BA20000 - 0x0BC9B000 D:\Apps\vtk42\bin\vtkGraphics.dll >0x0BCA0000 - 0x0BD11000 D:\Apps\vtk42\bin\vtkRenderingJava.dll >0x0BD20000 - 0x0BF5E000 D:\Apps\vtk42\bin\vtkRendering.dll >0x755B0000 - 0x75678000 C:\WINNT\System32\OPENGL32.dll >0x76C80000 - 0x76CA2000 C:\WINNT\System32\GLU32.dll >0x77160000 - 0x77167000 C:\WINNT\System32\DCIMAN32.dll >0x0BF60000 - 0x0BF71000 D:\Apps\vtk42\bin\vtkftgl.dll >0x0BF80000 - 0x0BFCD000 D:\Apps\vtk42\bin\vtkfreetype.dll >0x6D230000 - 0x6D235000 D:\Apps\jdk1.4\jre\bin\jawt.dll >0x0DFA0000 - 0x0DFE6000 D:\Apps\vtk42\bin\vtkHybridJava.dll >0x0DFF0000 - 0x0E15F000 D:\Apps\vtk42\bin\vtkHybrid.dll >0x0E160000 - 0x0E17F000 D:\Apps\vtk42\bin\vtkParallelJava.dll >0x0E180000 - 0x0E20F000 D:\Apps\vtk42\bin\vtkParallel.dll >0x776D0000 - 0x776D8000 C:\WINNT\system32\WSOCK32.dll >0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll >0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll >0x6D180000 - 0x6D1D0000 D:\Apps\jdk1.4\jre\bin\fontmanager.dll >0x77130000 - 0x77156000 C:\WINNT\System32\ddraw.dll >0x69500000 - 0x6968A000 C:\WINNT\System32\nvoglnt.dll >0x71300000 - 0x71306000 C:\WINNT\system32\MSIDLE.DLL >0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll >0x71DC0000 - 0x71DCA000 C:\WINNT\System32\PSAPI.DLL > >Local Time = Fri Apr 11 19:02:44 2003 >Elapsed Time = 6 ># ># The exception above was detected in native code outside the VM ># ># Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode) ># ># An error report file has been saved as hs_err_pid283.log. ># Please refer to the file for further information. ># > > >Thanks >Shyam > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > From Mathieu.Malaterre at creatis.insa-lyon.fr Sat Apr 12 04:02:36 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Sat, 12 Apr 2003 10:02:36 +0200 Subject: [vtkusers] valgrind + vtkStandardNewMacro Message-ID: <3E97C81C.2050303@creatis.insa-lyon.fr> Hi all, Does anyone here is using valgrind to purify(tm) there program ? I don't understand why it says there are leaks on every 'vtkStandardNewMacro' ? Is there any special option to use ? For now I am using: __GL_FORCE_GENERIC_CPU=1 valgrind -v --leak-check=yes --show-reachable=yes (I have installed the lastest nvidia driver) thanks, mathieu -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From jeff at cdnorthamerica.com Sat Apr 12 06:38:26 2003 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Sat, 12 Apr 2003 06:38:26 -0400 Subject: [vtkusers] Java Problem In-Reply-To: <000401c300b9$557f9440$de0ba8c0@qtwblr01.questglobal.com> References: <000401c300b9$557f9440$de0ba8c0@qtwblr01.questglobal.com> Message-ID: <3E97ECA2.2050900@cdnorthamerica.com> Is your nvoglnt.dll the latest/greatest? Perhaps upgrading opengl might help? I don't think any extra mutex locking will work here. Does the straight vtkPanel cause the same exception anywhere? If you disable the code inside the DelayAction to not call iren.TimerEvent(), do you get the same problems? I don't have an nt4.0 box here, so I can't really test. -Jeff R K Shyamprakash wrote: >Hi, > Thanks for the reply. I am using Windows NT4.0. If there is no fix >for this problem in Windows NT, then this is of great concern to me as the >application I am developing has to run all windows and Unix platforms. Is >there any way I can come over this problem? Can somebody tell me the best >way to use the vtkMutexLock. A small code snippet will be of great help. > >Thanks >Shyam > >-----Original Message----- >From: Jeff Lee [mailto:jeff at cdnorthamerica.com] >Sent: Friday, April 11, 2003 7:52 PM >To: R K Shyamprakash >Subject: Re: [vtkusers] Java Problem > > >Hi, >I looked at that line in vtkCanvas and all it is doing is calling the >interactor's timer event. Are you using winnt4.0? I have heard of many >problems on nt4.0 with java (see archives), however this works fine on >later windows(win98, win2k, winxp). I have heard of no other fixes >except to upgrade your os. You could also try upgrading your ogl libs. >-Jeff > >R K Shyamprakash wrote: > > > >>Hello, >> I am using vtk 4.2 with JDK 1.4 in Win NT environment. Often my >>application crashes with following error eventhough. I use proper mutex >>locking. As answered in mailing list earlier, I never use >>vtkRenderWindow.Render() directly, but still the problem persists. Can some >>body help. >> >>An unexpected exception has been detected in native code outside the VM. >>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69592AF0 >>Function=[Unknown.] >>Library=C:\WINNT\System32\nvoglnt.dll >> >>NOTE: We are unable to locate the function name symbol for the error >> just occurred. Please refer to release documentation for possible >> reason and solutions. >> >> >>Current Java thread: >> at vtk.vtkGenericRenderWindowInteractor.TimerEvent_13(Native Method) >> at >>vtk.vtkGenericRenderWindowInteractor.TimerEvent(C:/martink/vtk42/vtkdist/ja >> >> >v > > >>a/vtk/vtkGenericRenderWindowInteractor.java:64) >> at vtk.vtkCanvas$DelayAction.actionPerformed(vtkCanvas.java:250) >> at javax.swing.Timer.fireActionPerformed(Timer.java:271) >> at javax.swing.Timer$DoPostEvent.run(Timer.java:201) >> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) >> at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) >> at >>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.j >> >> >a > > >>va:197) >> at >>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.jav >> >> >a > > >>:150) >> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) >> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) >> at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) >> >>Dynamic libraries: >>0x00400000 - 0x00406000 d:\apps\jdk1.4\bin\javaw.exe >>0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll >>0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll >>0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll >>0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll >>0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll >>0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll >>0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll >>0x10000000 - 0x10018000 C:\WINNT\System32\NVDESK32.DLL >>0x6D330000 - 0x6D45C000 d:\apps\jdk1.4\jre\bin\client\jvm.dll >>0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll >>0x6D1D0000 - 0x6D1D7000 d:\apps\jdk1.4\jre\bin\hpi.dll >>0x6D300000 - 0x6D30D000 d:\apps\jdk1.4\jre\bin\verify.dll >>0x6D210000 - 0x6D229000 d:\apps\jdk1.4\jre\bin\java.dll >>0x6D320000 - 0x6D32D000 d:\apps\jdk1.4\jre\bin\zip.dll >>0x6D000000 - 0x6D0FA000 D:\Apps\jdk1.4\jre\bin\awt.dll >>0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV >>0x76AB0000 - 0x76AB5000 C:\WINNT\System32\IMM32.dll >>0x77B20000 - 0x77BD7000 C:\WINNT\system32\ole32.dll >>0x0B0A0000 - 0x0B138000 D:\Apps\vtk42\bin\vtkCommonJava.dll >>0x0B140000 - 0x0B30E000 D:\Apps\vtk42\bin\vtkCommon.dll >>0x780A0000 - 0x780B2000 C:\WINNT\System32\MSVCIRT.dll >>0x780C0000 - 0x78121000 C:\WINNT\System32\MSVCP60.dll >>0x0B310000 - 0x0B332000 D:\Apps\vtk42\bin\vtkFilteringJava.dll >>0x0B340000 - 0x0B3B1000 D:\Apps\vtk42\bin\vtkFiltering.dll >>0x0B3C0000 - 0x0B3FF000 D:\Apps\vtk42\bin\vtkIOJava.dll >>0x0B400000 - 0x0B5DD000 D:\Apps\vtk42\bin\vtkIO.dll >>0x0B5E0000 - 0x0B602000 D:\Apps\vtk42\bin\vtkpng.dll >>0x0B610000 - 0x0B623000 D:\Apps\vtk42\bin\vtkzlib.dll >>0x0B630000 - 0x0B652000 D:\Apps\vtk42\bin\vtkjpeg.dll >>0x0B660000 - 0x0B6AE000 D:\Apps\vtk42\bin\vtktiff.dll >>0x0B6B0000 - 0x0B6D3000 D:\Apps\vtk42\bin\vtkexpat.dll >>0x0B6E0000 - 0x0B72A000 D:\Apps\vtk42\bin\vtkImagingJava.dll >>0x0B730000 - 0x0B990000 D:\Apps\vtk42\bin\vtkImaging.dll >>0x0B990000 - 0x0BA1F000 D:\Apps\vtk42\bin\vtkGraphicsJava.dll >>0x0BA20000 - 0x0BC9B000 D:\Apps\vtk42\bin\vtkGraphics.dll >>0x0BCA0000 - 0x0BD11000 D:\Apps\vtk42\bin\vtkRenderingJava.dll >>0x0BD20000 - 0x0BF5E000 D:\Apps\vtk42\bin\vtkRendering.dll >>0x755B0000 - 0x75678000 C:\WINNT\System32\OPENGL32.dll >>0x76C80000 - 0x76CA2000 C:\WINNT\System32\GLU32.dll >>0x77160000 - 0x77167000 C:\WINNT\System32\DCIMAN32.dll >>0x0BF60000 - 0x0BF71000 D:\Apps\vtk42\bin\vtkftgl.dll >>0x0BF80000 - 0x0BFCD000 D:\Apps\vtk42\bin\vtkfreetype.dll >>0x6D230000 - 0x6D235000 D:\Apps\jdk1.4\jre\bin\jawt.dll >>0x0DFA0000 - 0x0DFE6000 D:\Apps\vtk42\bin\vtkHybridJava.dll >>0x0DFF0000 - 0x0E15F000 D:\Apps\vtk42\bin\vtkHybrid.dll >>0x0E160000 - 0x0E17F000 D:\Apps\vtk42\bin\vtkParallelJava.dll >>0x0E180000 - 0x0E20F000 D:\Apps\vtk42\bin\vtkParallel.dll >>0x776D0000 - 0x776D8000 C:\WINNT\system32\WSOCK32.dll >>0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll >>0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll >>0x6D180000 - 0x6D1D0000 D:\Apps\jdk1.4\jre\bin\fontmanager.dll >>0x77130000 - 0x77156000 C:\WINNT\System32\ddraw.dll >>0x69500000 - 0x6968A000 C:\WINNT\System32\nvoglnt.dll >>0x71300000 - 0x71306000 C:\WINNT\system32\MSIDLE.DLL >>0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll >>0x71DC0000 - 0x71DCA000 C:\WINNT\System32\PSAPI.DLL >> >>Local Time = Fri Apr 11 19:02:44 2003 >>Elapsed Time = 6 >># >># The exception above was detected in native code outside the VM >># >># Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode) >># >># An error report file has been saved as hs_err_pid283.log. >># Please refer to the file for further information. >># >> >> >>Thanks >>Shyam >> >>_______________________________________________ >>This is the private VTK discussion list. >>Please keep messages on-topic. Check the FAQ at: >> >> > > > >>Follow this link to subscribe/unsubscribe: >>http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > > From ramakrishna.prakash at quest-global.com Sat Apr 12 07:27:56 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Sat, 12 Apr 2003 16:57:56 +0530 Subject: [vtkusers] Java Problem In-Reply-To: <3E97ECA2.2050900@cdnorthamerica.com> Message-ID: <000001c300e6$916ec660$de0ba8c0@qtwblr01.questglobal.com> Hello Jeff, nvoglnt.dll is version 4.0(NVIDIA display driver). I am not sure if it is the latest available, i will cross check with that. This is what I do. When I click on the actor, I pick the cell, retrieve the data array of that cell and set different value to the data array by calling vtkFloatArray.SetValue(int index,double value); It works fine on some actors but fails on some. I don't get exception every time at iren.TimerEvent(). Most of the time it happens when vtkPanel calls vtkRenderWindow.Render() saying the canvas is locked. below is the most common error message. NewDemoCanvas(which you will find in the error message) is my class which extends vtkCanvas. I tried to use vtkPanel instead of vtkCanvas but without success. An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69592AF0 Function=[Unknown.] Library=C:\WINNT\System32\nvoglnt.dll NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at vtk.vtkRenderWindow.Render_6(Native Method) at vtk.vtkRenderWindow.Render(vtkRenderWindow.java:36) at vtk.vtkPanel.Render(vtkPanel.java:141) - locked <02C53E50> (a NewDemoCanvas) at vtk.vtkPanel.mouseDragged(vtkPanel.java:332) at java.awt.Component.processMouseMotionEvent(Component.java:5141) at java.awt.Component.processEvent(Component.java:4894) at java.awt.Container.processEvent(Container.java:1566) at java.awt.Component.dispatchEventImpl(Component.java:3598) at java.awt.Container.dispatchEventImpl(Container.java:1623) at java.awt.Component.dispatchEvent(Component.java:3439) at java.awt.EventQueue.dispatchEvent(EventQueue.java:450) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja va:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java :150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) Dynamic libraries: 0x00400000 - 0x00406000 d:\apps\jdk1.4\bin\javaw.exe 0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll 0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll 0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll 0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll 0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll 0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll 0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll 0x10000000 - 0x10018000 C:\WINNT\System32\NVDESK32.DLL 0x6D330000 - 0x6D45C000 d:\apps\jdk1.4\jre\bin\client\jvm.dll 0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll 0x6D1D0000 - 0x6D1D7000 d:\apps\jdk1.4\jre\bin\hpi.dll 0x6D300000 - 0x6D30D000 d:\apps\jdk1.4\jre\bin\verify.dll 0x6D210000 - 0x6D229000 d:\apps\jdk1.4\jre\bin\java.dll 0x6D320000 - 0x6D32D000 d:\apps\jdk1.4\jre\bin\zip.dll 0x6D000000 - 0x6D0FA000 D:\Apps\jdk1.4\jre\bin\awt.dll 0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV 0x76AB0000 - 0x76AB5000 C:\WINNT\System32\IMM32.dll 0x77B20000 - 0x77BD7000 C:\WINNT\system32\ole32.dll 0x0B0A0000 - 0x0B138000 D:\Apps\vtk42\bin\vtkCommonJava.dll 0x0B140000 - 0x0B30E000 D:\Apps\vtk42\bin\vtkCommon.dll 0x780A0000 - 0x780B2000 C:\WINNT\System32\MSVCIRT.dll 0x780C0000 - 0x78121000 C:\WINNT\System32\MSVCP60.dll 0x0B310000 - 0x0B332000 D:\Apps\vtk42\bin\vtkFilteringJava.dll 0x0B340000 - 0x0B3B1000 D:\Apps\vtk42\bin\vtkFiltering.dll 0x0B3C0000 - 0x0B3FF000 D:\Apps\vtk42\bin\vtkIOJava.dll 0x0B400000 - 0x0B5DD000 D:\Apps\vtk42\bin\vtkIO.dll 0x0B5E0000 - 0x0B602000 D:\Apps\vtk42\bin\vtkpng.dll 0x0B610000 - 0x0B623000 D:\Apps\vtk42\bin\vtkzlib.dll 0x0B630000 - 0x0B652000 D:\Apps\vtk42\bin\vtkjpeg.dll 0x0B660000 - 0x0B6AE000 D:\Apps\vtk42\bin\vtktiff.dll 0x0B6B0000 - 0x0B6D3000 D:\Apps\vtk42\bin\vtkexpat.dll 0x0B6E0000 - 0x0B72A000 D:\Apps\vtk42\bin\vtkImagingJava.dll 0x0B730000 - 0x0B990000 D:\Apps\vtk42\bin\vtkImaging.dll 0x0B990000 - 0x0BA1F000 D:\Apps\vtk42\bin\vtkGraphicsJava.dll 0x0BA20000 - 0x0BC9B000 D:\Apps\vtk42\bin\vtkGraphics.dll 0x0BCA0000 - 0x0BD11000 D:\Apps\vtk42\bin\vtkRenderingJava.dll 0x0BD20000 - 0x0BF5E000 D:\Apps\vtk42\bin\vtkRendering.dll 0x755B0000 - 0x75678000 C:\WINNT\System32\OPENGL32.dll 0x76C80000 - 0x76CA2000 C:\WINNT\System32\GLU32.dll 0x77160000 - 0x77167000 C:\WINNT\System32\DCIMAN32.dll 0x0BF60000 - 0x0BF71000 D:\Apps\vtk42\bin\vtkftgl.dll 0x0BF80000 - 0x0BFCD000 D:\Apps\vtk42\bin\vtkfreetype.dll 0x6D230000 - 0x6D235000 D:\Apps\jdk1.4\jre\bin\jawt.dll 0x0DFA0000 - 0x0DFE6000 D:\Apps\vtk42\bin\vtkHybridJava.dll 0x0DFF0000 - 0x0E15F000 D:\Apps\vtk42\bin\vtkHybrid.dll 0x0E160000 - 0x0E17F000 D:\Apps\vtk42\bin\vtkParallelJava.dll 0x0E180000 - 0x0E20F000 D:\Apps\vtk42\bin\vtkParallel.dll 0x776D0000 - 0x776D8000 C:\WINNT\system32\WSOCK32.dll 0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll 0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll 0x6D180000 - 0x6D1D0000 D:\Apps\jdk1.4\jre\bin\fontmanager.dll 0x77130000 - 0x77156000 C:\WINNT\System32\ddraw.dll 0x69500000 - 0x6968A000 C:\WINNT\System32\nvoglnt.dll 0x71300000 - 0x71306000 C:\WINNT\system32\MSIDLE.DLL 0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll 0x71DC0000 - 0x71DCA000 C:\WINNT\System32\PSAPI.DLL Local Time = Sat Apr 12 16:48:06 2003 Elapsed Time = 12 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode) # # An error report file has been saved as hs_err_pid159.log. # Please refer to the file for further information. # Thanks Shyam -----Original Message----- From: Jeff Lee [mailto:jeff at cdnorthamerica.com] Sent: Saturday, April 12, 2003 4:08 PM To: R K Shyamprakash Cc: Vtkusers (E-mail) Subject: Re: [vtkusers] Java Problem Is your nvoglnt.dll the latest/greatest? Perhaps upgrading opengl might help? I don't think any extra mutex locking will work here. Does the straight vtkPanel cause the same exception anywhere? If you disable the code inside the DelayAction to not call iren.TimerEvent(), do you get the same problems? I don't have an nt4.0 box here, so I can't really test. -Jeff R K Shyamprakash wrote: >Hi, > Thanks for the reply. I am using Windows NT4.0. If there is no fix >for this problem in Windows NT, then this is of great concern to me as the >application I am developing has to run all windows and Unix platforms. Is >there any way I can come over this problem? Can somebody tell me the best >way to use the vtkMutexLock. A small code snippet will be of great help. > >Thanks >Shyam > >-----Original Message----- >From: Jeff Lee [mailto:jeff at cdnorthamerica.com] >Sent: Friday, April 11, 2003 7:52 PM >To: R K Shyamprakash >Subject: Re: [vtkusers] Java Problem > > >Hi, >I looked at that line in vtkCanvas and all it is doing is calling the >interactor's timer event. Are you using winnt4.0? I have heard of many >problems on nt4.0 with java (see archives), however this works fine on >later windows(win98, win2k, winxp). I have heard of no other fixes >except to upgrade your os. You could also try upgrading your ogl libs. >-Jeff > >R K Shyamprakash wrote: > > > >>Hello, >> I am using vtk 4.2 with JDK 1.4 in Win NT environment. Often my >>application crashes with following error eventhough. I use proper mutex >>locking. As answered in mailing list earlier, I never use >>vtkRenderWindow.Render() directly, but still the problem persists. Can some >>body help. >> >>An unexpected exception has been detected in native code outside the VM. >>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69592AF0 >>Function=[Unknown.] >>Library=C:\WINNT\System32\nvoglnt.dll >> >>NOTE: We are unable to locate the function name symbol for the error >> just occurred. Please refer to release documentation for possible >> reason and solutions. >> >> >>Current Java thread: >> at vtk.vtkGenericRenderWindowInteractor.TimerEvent_13(Native Method) >> at >>vtk.vtkGenericRenderWindowInteractor.TimerEvent(C:/martink/vtk42/vtkdist/j a >> >> >v > > >>a/vtk/vtkGenericRenderWindowInteractor.java:64) >> at vtk.vtkCanvas$DelayAction.actionPerformed(vtkCanvas.java:250) >> at javax.swing.Timer.fireActionPerformed(Timer.java:271) >> at javax.swing.Timer$DoPostEvent.run(Timer.java:201) >> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) >> at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) >> at >>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread. j >> >> >a > > >>va:197) >> at >>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.ja v >> >> >a > > >>:150) >> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) >> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) >> at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) >> >>Dynamic libraries: >>0x00400000 - 0x00406000 d:\apps\jdk1.4\bin\javaw.exe >>0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll >>0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll >>0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll >>0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll >>0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll >>0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll >>0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll >>0x10000000 - 0x10018000 C:\WINNT\System32\NVDESK32.DLL >>0x6D330000 - 0x6D45C000 d:\apps\jdk1.4\jre\bin\client\jvm.dll >>0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll >>0x6D1D0000 - 0x6D1D7000 d:\apps\jdk1.4\jre\bin\hpi.dll >>0x6D300000 - 0x6D30D000 d:\apps\jdk1.4\jre\bin\verify.dll >>0x6D210000 - 0x6D229000 d:\apps\jdk1.4\jre\bin\java.dll >>0x6D320000 - 0x6D32D000 d:\apps\jdk1.4\jre\bin\zip.dll >>0x6D000000 - 0x6D0FA000 D:\Apps\jdk1.4\jre\bin\awt.dll >>0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV >>0x76AB0000 - 0x76AB5000 C:\WINNT\System32\IMM32.dll >>0x77B20000 - 0x77BD7000 C:\WINNT\system32\ole32.dll >>0x0B0A0000 - 0x0B138000 D:\Apps\vtk42\bin\vtkCommonJava.dll >>0x0B140000 - 0x0B30E000 D:\Apps\vtk42\bin\vtkCommon.dll >>0x780A0000 - 0x780B2000 C:\WINNT\System32\MSVCIRT.dll >>0x780C0000 - 0x78121000 C:\WINNT\System32\MSVCP60.dll >>0x0B310000 - 0x0B332000 D:\Apps\vtk42\bin\vtkFilteringJava.dll >>0x0B340000 - 0x0B3B1000 D:\Apps\vtk42\bin\vtkFiltering.dll >>0x0B3C0000 - 0x0B3FF000 D:\Apps\vtk42\bin\vtkIOJava.dll >>0x0B400000 - 0x0B5DD000 D:\Apps\vtk42\bin\vtkIO.dll >>0x0B5E0000 - 0x0B602000 D:\Apps\vtk42\bin\vtkpng.dll >>0x0B610000 - 0x0B623000 D:\Apps\vtk42\bin\vtkzlib.dll >>0x0B630000 - 0x0B652000 D:\Apps\vtk42\bin\vtkjpeg.dll >>0x0B660000 - 0x0B6AE000 D:\Apps\vtk42\bin\vtktiff.dll >>0x0B6B0000 - 0x0B6D3000 D:\Apps\vtk42\bin\vtkexpat.dll >>0x0B6E0000 - 0x0B72A000 D:\Apps\vtk42\bin\vtkImagingJava.dll >>0x0B730000 - 0x0B990000 D:\Apps\vtk42\bin\vtkImaging.dll >>0x0B990000 - 0x0BA1F000 D:\Apps\vtk42\bin\vtkGraphicsJava.dll >>0x0BA20000 - 0x0BC9B000 D:\Apps\vtk42\bin\vtkGraphics.dll >>0x0BCA0000 - 0x0BD11000 D:\Apps\vtk42\bin\vtkRenderingJava.dll >>0x0BD20000 - 0x0BF5E000 D:\Apps\vtk42\bin\vtkRendering.dll >>0x755B0000 - 0x75678000 C:\WINNT\System32\OPENGL32.dll >>0x76C80000 - 0x76CA2000 C:\WINNT\System32\GLU32.dll >>0x77160000 - 0x77167000 C:\WINNT\System32\DCIMAN32.dll >>0x0BF60000 - 0x0BF71000 D:\Apps\vtk42\bin\vtkftgl.dll >>0x0BF80000 - 0x0BFCD000 D:\Apps\vtk42\bin\vtkfreetype.dll >>0x6D230000 - 0x6D235000 D:\Apps\jdk1.4\jre\bin\jawt.dll >>0x0DFA0000 - 0x0DFE6000 D:\Apps\vtk42\bin\vtkHybridJava.dll >>0x0DFF0000 - 0x0E15F000 D:\Apps\vtk42\bin\vtkHybrid.dll >>0x0E160000 - 0x0E17F000 D:\Apps\vtk42\bin\vtkParallelJava.dll >>0x0E180000 - 0x0E20F000 D:\Apps\vtk42\bin\vtkParallel.dll >>0x776D0000 - 0x776D8000 C:\WINNT\system32\WSOCK32.dll >>0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll >>0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll >>0x6D180000 - 0x6D1D0000 D:\Apps\jdk1.4\jre\bin\fontmanager.dll >>0x77130000 - 0x77156000 C:\WINNT\System32\ddraw.dll >>0x69500000 - 0x6968A000 C:\WINNT\System32\nvoglnt.dll >>0x71300000 - 0x71306000 C:\WINNT\system32\MSIDLE.DLL >>0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll >>0x71DC0000 - 0x71DCA000 C:\WINNT\System32\PSAPI.DLL >> >>Local Time = Fri Apr 11 19:02:44 2003 >>Elapsed Time = 6 >># >># The exception above was detected in native code outside the VM >># >># Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode) >># >># An error report file has been saved as hs_err_pid283.log. >># Please refer to the file for further information. >># >> >> >>Thanks >>Shyam >> >>_______________________________________________ >>This is the private VTK discussion list. >>Please keep messages on-topic. Check the FAQ at: >> >> > > > >>Follow this link to subscribe/unsubscribe: >>http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > > From bgoodrick at ipns.com Sat Apr 12 11:13:02 2003 From: bgoodrick at ipns.com (Brent Goodrick) Date: Sat, 12 Apr 2003 08:13:02 -0700 Subject: [vtkusers] vtkTkRenderWidget:Linux:Python and VTK threaded:each render spawns zombie In-Reply-To: <3E6F6860.69732A01@v1.wustl.edu> References: <3E6F6860.69732A01@v1.wustl.edu> Message-ID: <16024.11518.928379.5120@gargle.gargle.HOWL> Hi Donna, You are building on RH 6.1 and executing on RH 8.0 which is bad news. GLIBC has changed, name mangling in the compiler has changed, etc. etc. I would suggest compiling under the same system (compiler+libraries+OSrevision) in which you execute on. If you are bound and determined to do it, you may try the compatibility libraries that Red Hat has shipped in the past (RH 7.x anyhow). I expect that they would discontinue those libraries at some point, so that would not be a good long term strategy. Brent Goodrick PT Software >>>>> "donna" == donna writes: donna> Build environment: donna> Linux RedHat 6.1 (Cartman) 2.2.12-20 (uni-processor) donna> gcc 3.2.2 donna> Python 2.1.3 donna> VTK cvs co -D "10/5/2002" donna> both python and vtk configured with threads donna> When I run the following simple python script on a dual processor host donna> running Linux RedHat 8.0 (Psyche) 2.4.18-26.8.0smp, each render spawns a donna> zombie python process: donna> http://pulvinar.wustl.edu/donna/SureFit/Linux/volview.py donna> (This script is a simplified version of donna> http://public.kitware.com/cgi-bin/cvsweb.cgi/VTK/Examples/Medical/Python/Medical3.py; donna> thanks to will and prabhu for making it available.) donna> Keypress 'i' or 'd' in the image widget (increment or decrement the donna> slice displayed from VTK_DATA_ROOT + "/Data/headsq/quarter") triggers a donna> vtkTkRenderWidget render. Running python in gdb, with several printf donna> messages inserted into VTK/Common/vtkDataObject.cxx and donna> VTK/Common/vtkImageData.cxx, produces this output: donna> *** DISPLAYING slice 30 donna> ...vtkImageData::UpdateData ... donna> ...vtkDataObject::UpdateData begin... donna> ...propagate the UpdateData to the source... ...Source-> UpdateData... donna> ...vtkImageData::UpdateData ... donna> ...vtkDataObject::UpdateData begin... donna> ...vtkDataObject::UpdateData end... donna> ...checking this->UpdateNumberOfPieces == 1 ... donna> ...confirmed this->UpdateNumberOfPieces == 1 ... donna> [New Thread 24580 (LWP 668)] ...this-> UpdatePiece... ...this-> UpdateNumberOfPieces... ...this-> UpdateGhostLevel... donna> ...vtkDataObject::UpdateData end... donna> ...checking this->UpdateNumberOfPieces == 1 ... donna> ...confirmed this->UpdateNumberOfPieces == 1 ... donna> The modified versions of vtkDataObject.cxx and vtkImageData.cxx are here donna> -- just printf statements added to see where the thread is being donna> spawned: donna> http://pulvinar.wustl.edu/donna/SureFit/Linux/vtkDataObject.cxx donna> http://pulvinar.wustl.edu/donna/SureFit/Linux/vtkImageData.cxx donna> The thread is being spawned when vtkImageData::UpdateData returns to donna> vtkDataObject::UpdateData, because this->UpdateNumberOfPieces == 1. donna> There seems to be some recursion here. Can anyone help me understand donna> why python is spawning a new thread here? These threads look like this donna> in ps -efl output: donna> 044 Z donna 1590 1589 0 75 0 - 0 do_exi 10:59 pts/2 donna> 00:00:00 [python ] donna> 044 Z donna 1591 1589 0 80 0 - 0 do_exi 10:59 pts/2 donna> 00:00:00 [python ] donna> 044 Z donna 1592 1589 0 80 0 - 0 do_exi 10:59 pts/2 donna> 00:00:00 [python ] donna> 044 Z donna 1593 1589 0 76 0 - 0 do_exi 10:59 pts/2 donna> 00:00:00 [python ] donna> They have caused crashes for one user, whose soft maxproc limit is donna> 1024. My application has numerous render events, and in his case donna> several threads are being spawned per render. When the number of donna> zombies approaches 1000, my application crashes. This seems to happen donna> despite increasing the maxproc limit. (Python seems to be crashing at donna> the machine's soft limit, regardless of the user's environment.) donna> I can rebuild python and vtk without threads, and the user doesn't donna> crash. But I'd like to understand why the renders are spawning these donna> threads. Any ideas are appreciated. donna> Thanks, donna> Donna Hanlon donna> _______________________________________________ donna> This is the private VTK discussion list. donna> Please keep messages on-topic. Check the FAQ at: donna> Follow this link to subscribe/unsubscribe: donna> http://public.kitware.com/mailman/listinfo/vtkusers From jiang at Telematik-Institut.de Sat Apr 12 11:42:15 2003 From: jiang at Telematik-Institut.de (Chunyan Jiang) Date: Sat, 12 Apr 2003 17:42:15 +0200 Subject: [vtkusers] Primary vtk question in JBuilder Message-ID: Hi, all, I would like to use vtk in JBuilder. So I test the primary example Cone.java in JBuilder 8. However, I don't know how to set the library path or something else. The first sentence "import vtk.*;" can not pass the compile. The error message is "Can not access directory vtk". Could some one help me? Thanks in advance! Chunyan *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** From jiang at Telematik-Institut.de Sat Apr 12 11:45:16 2003 From: jiang at Telematik-Institut.de (Chunyan Jiang) Date: Sat, 12 Apr 2003 17:45:16 +0200 Subject: [vtkusers] Where is vtk warped class for Java? Message-ID: Hello, If I want to use vtk in JBuilder, should I download vtk warped classes for Java? Where can I find it? Thanks a lot! Chunyan *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** From astermaymay at sjtu.edu.cn Sat Apr 12 14:05:55 2003 From: astermaymay at sjtu.edu.cn (astermaymay at sjtu.edu.cn) Date: Sun, 13 Apr 2003 02:05:55 +0800 (BEIST) Subject: [vtkusers] a question about vtkTextureMapToPlane,help!! Message-ID: <20030412180555.7C34715A40B@sjtu.edu.cn> I have a question,why the output doesn\'t change? when I use the code below ,I can get anarbitrary slice vtkPlane *plane=vtkPlane::New(); plane->SetOrigin(100,0,0); plane->SetNormal(1,0,0); vtkCutter *planeCutter=vtkCutter::New(); planeCutter->SetCutFunction(plane); planeCutter->SetInput(v16->GetOutput()); //v16 is a structureddata vtkPolyDataMapper *planeMapper=vtkPolyDataMapper::New(); planeMapper->SetInput(planeCutter->GetOutput()); planeMapper->SetScalarRange(200,2000); planeMapper->SetLookupTable(bwLut); vtkActor *planeActor=vtkActor::New(); planeActor->SetMapper(planeMapper); aRenderer->AddActor(planeActor); aRenderer->SetBackground(1,1,1); ..................... but when I want to texture this slice to XY plane,the output doesn\'t change :( ,it seems that the vtktexturemaptoplane doesn\'t operation vtkPlane *plane=vtkPlane::New(); plane->SetOrigin(100,0,0); plane->SetNormal(1,0,0); vtkCutter *planeCutter=vtkCutter::New(); planeCutter->SetCutFunction(plane); planeCutter->SetInput(v16->GetOutput()); //v16 is a structureddata here I add: vtkTextureMapToPlane *planetextureMapper=vtkTextureMapToPlane::New(); planetextureMapper->SetInput(planeCutter->GetOutput()); planetextureMapper->AutomaticPlaneGenerationOn(); planetextureMapper->SetOrigin(0,0,0); planetextureMapper->SetNormal(0,0,1); vtkCastToConcrete *geometryPD=vtkCastToConcrete::New(); geometryPD->SetInput(planetextureMapper->GetOutput()); vtkPolyDataMapper *planeMapper=vtkPolyDataMapper::New(); planeMapper->SetInput(geometryPD->GetPolyDataOutput()); planeMapper->SetScalarRange(200,2000); planeMapper->SetLookupTable(bwLut); vtkActor *planeActor=vtkActor::New(); planeActor->SetMapper(planeMapper); aRenderer->AddActor(planeActor); aRenderer->SetBackground(1,1,1); who can tell me why?What effect does vtktexturemaptoplane has in the pipeline? From zhongfu.zhou at materials.oxford.ac.uk Sat Apr 12 18:32:23 2003 From: zhongfu.zhou at materials.oxford.ac.uk (Zhongfu Zhou) Date: Sat, 12 Apr 2003 22:32:23 +0000 Subject: [vtkusers] build VTK with java in linux Message-ID: <3E9893F7.6020206@materials.oxford.ac.uk> Dear All, Could you please help me in a problem I meet in building VTK with jave in Redhat linux system. I installed CMake, java and VTK properly. The file vtk.jar also can be found in the directory ../VTK/bin. But when I run javac Cone.java, it returns following errors. But I don't know how to set up the "CLASSPATH" environment. Any one can help me? Many thanks in advance. Zhongfu --------------------------------------------------------------------- > javac Cone.java > Cone.java:9: Can't find default package `vtk'. Check the CLASSPATH environment variable and the access to the archives > Cone.java:33: Type `vtkConeSource' not found in the declaration of the local variable `cone'. > vtkConeSource cone = new vtkConeSource(); > ^ > Cone.java:45: Type `vtkPolyDataMapper' not found in the declaration of the local variable `coneMapper'. > vtkPolyDataMapper coneMapper = new vtkPolyDataMapper(); > ^ > Cone.java:55: Type `vtkActor' not found in the declaration of the local variable `coneActor'. > vtkActor coneActor = new vtkActor(); > ^ > Cone.java:64: Type `vtkRenderer' not found in the declaration of the local variable `ren1'. > vtkRenderer ren1 = new vtkRenderer(); > ^ > Cone.java:73: Type `vtkRenderWindow' not found in the declaration of the local variable `renWin'. > vtkRenderWindow renWin = new vtkRenderWindow(); > ^ > 6 errors From zxem at my169.com Sun Apr 13 06:05:04 2003 From: zxem at my169.com (zx) Date: Sun, 13 Apr 2003 10:5:4 +0000 Subject: [vtkusers] About book Message-ID: Dear all. Does anyone know where has the free copy of this book. It is hard to borrow and expensive to buy, especially for student! Thanks! X.Z. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zxem at my169.com Sun Apr 13 06:18:23 2003 From: zxem at my169.com (zx) Date: Sun, 13 Apr 2003 10:18:23 +0000 Subject: [vtkusers] About book Message-ID: Dear all. Does anyone know where has the free copy of this book. It is hard to borrow and expensive to buy, especially for student! Thanks! X.Z. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zxem at my169.com Sun Apr 13 06:53:11 2003 From: zxem at my169.com (zx) Date: Sun, 13 Apr 2003 10:53:11 +0000 Subject: [vtkusers] About Book Message-ID: Dear all. Does anyone know where has the free copy of this book. It is hard to borrow and expensive to buy, especially for student! Thanks! X.Z. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim.fooy at pandora.be Sun Apr 13 08:15:37 2003 From: tim.fooy at pandora.be (Tim Fooy) Date: Sun, 13 Apr 2003 14:15:37 +0200 Subject: [vtkusers] 3d plotting Message-ID: <200304131415.37794.tim.fooy@pandora.be> Hi all, I have been looking quite some time now in the documentation on the VTK homepage, but given the enormous number of classes I can't find what I'm looking for and I hope someone might give me a hint in the right direction. What I want to do is actually quite simple. I have an ascii file with 4 columns of numbers, and I need to make a colored 3d plot with them. Column 1 is X, 2 is Y, 3 is Z, and 4 is turned to a color. I guess there must be more simple ways than to read in all the points, manually create 4-point-polygons, manually try to assign colors to all polygon points, and also try to get some axes with tics in the graph... Could someone tell me what classes I am looking for? (I work in C++ or Tcl) Thanks in advance! Tim From yass at uscx.net Sun Apr 13 10:37:18 2003 From: yass at uscx.net (yasser salman) Date: Sun, 13 Apr 2003 07:37:18 -0700 (PDT) Subject: [vtkusers] read BMP/tiff Message-ID: <20030413143718.86E423B67@sitemail.everyone.net> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From prabhu at aero.iitm.ernet.in Sun Apr 13 12:17:29 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Sun, 13 Apr 2003 21:47:29 +0530 Subject: [vtkusers] 3d plotting In-Reply-To: <200304131415.37794.tim.fooy@pandora.be> References: <200304131415.37794.tim.fooy@pandora.be> Message-ID: <16025.36249.436687.289910@monster.linux.in> >>>>> "TF" == Tim Fooy writes: TF> Hi all, I have been looking quite some time now in the TF> documentation on the VTK homepage, but given the enormous TF> number of classes I can't find what I'm looking for and I hope TF> someone might give me a hint in the right direction. You need to see how your data is organized. Are the points regularly organized, are they structured or unstructured? If its not really organized do you know how to make a volume with the points you have? In these cases you need to create a VTK data file with your data and use an appropriate data reader and use the data to do what you want. VTK data files support structured points, structured grids, unstructured grids and polydata. The best online reference for the VTK data format is here: http://vtk.org/pdf/file-formats.pdf I don't know of other references and for want of better references you could also read this presentation: http://mayavi.sf.net/docs/mayavi_talk.pdf that has a brief section on VTK data files. cheers, prabhu From Nigel.Hoschke at csiro.au Sun Apr 13 18:02:04 2003 From: Nigel.Hoschke at csiro.au (Nigel.Hoschke at csiro.au) Date: Mon, 14 Apr 2003 08:02:04 +1000 Subject: [vtkusers] Rendering Multiple Volumes Message-ID: <473AF46D8DE0514A87C70F33257DA5A854DC70@ding-ep.tip.csiro.au> I am trying to render two volumes whose boundaries intersect. Despite both the volumes being mainly opaque the second volume added to the render is completely blocked out by the first. Does any one know a way to fix this problem? Thanks, Nigel From c.p.botha at its.tudelft.nl Sun Apr 13 18:17:58 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Mon, 14 Apr 2003 00:17:58 +0200 Subject: [vtkusers] Rendering Multiple Volumes In-Reply-To: <473AF46D8DE0514A87C70F33257DA5A854DC70@ding-ep.tip.csiro.au> References: <473AF46D8DE0514A87C70F33257DA5A854DC70@ding-ep.tip.csiro.au> Message-ID: <20030413221758.GA16418@dutidad.twi.tudelft.nl> On Mon, Apr 14, 2003 at 08:02:04AM +1000, Nigel.Hoschke at csiro.au wrote: > I am trying to render two volumes whose boundaries intersect. Despite both > the volumes being mainly opaque the second volume added to the render is > completely blocked out by the first. Does any one know a way to fix this > problem? What exactly are you trying to do? When you say volumes, do you mean vtkVolumes or do you mean it in a more generic sense? My crystal ball must be acting up again tonight, because I can't see what exactly you're problem is. In anycase, please remember what happens when anything translucent is rendered (yes, "mainly opaque" is still translucent to the rendering pipeline). -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From c.p.botha at its.tudelft.nl Sun Apr 13 18:25:00 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Mon, 14 Apr 2003 00:25:00 +0200 Subject: [vtkusers] Rendering Multiple Volumes In-Reply-To: <20030413221758.GA16418@dutidad.twi.tudelft.nl> References: <473AF46D8DE0514A87C70F33257DA5A854DC70@ding-ep.tip.csiro.au> <20030413221758.GA16418@dutidad.twi.tudelft.nl> Message-ID: <20030413222500.GB16418@dutidad.twi.tudelft.nl> On Mon, Apr 14, 2003 at 12:17:58AM +0200, Charl P. Botha wrote: > be acting up again tonight, because I can't see what exactly you're problem Urgh, I meant "your problem" of course. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From Nigel.Hoschke at csiro.au Sun Apr 13 18:52:47 2003 From: Nigel.Hoschke at csiro.au (Nigel.Hoschke at csiro.au) Date: Mon, 14 Apr 2003 08:52:47 +1000 Subject: [vtkusers] Rendering Multiple Volumes Message-ID: <473AF46D8DE0514A87C70F33257DA5A854DC73@ding-ep.tip.csiro.au> At the moment I have two sets of structured points data that are read from .vtk files using the vtkStructuredPointsReader. These are both passed through vtkVolumeTextureMapper2D into separate vtkLODProp3D which are then added to the vtkRenderer using the AddVolume method. The outputs of the vtkVolumeTextureMapper2D are added to the vtkLODProp3D with the ADDLod method that takes in a vtkVolumeProperty. A user defined vtkPiecewiseFunction has been used with SetScalarOpacity method for the vtkVolumeProperty to make most of the volumes translucent. From novalet at yahoo.com.cn Sun Apr 13 21:37:42 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Mon, 14 Apr 2003 09:37:42 +0800 (CST) Subject: [vtkusers] object of vtk in TCL Message-ID: <20030414013742.75643.qmail@web15209.mail.bjs.yahoo.com> Hi! I find the objects created by the vtk are not a variable. for example: % vtkRenderer ren ren % info vars tcl_rcFileName tkPriv.:0 tcl_version argv argv0 tcl_interactive errormsg VTK_DATA_ROOT tcl_traceCompile tk_library auto_oldpath tk_version errorCode auto_path tk_strictMotif errorInfo tkPriv auto_index env tcl_patchLevel argc tk_patchLevel tcl_traceExec tcl_libPath errorMessage tcl_library tcl_platform % the "ren" isn't inside the "info vars" How can i get a description of object? I try: % puts $ren can't read "ren": no such variable I am a newbie in tcl. Hope somebody can lend me a hand :) Another probleam is how to delete such a object? Sometimes, my script want to replace the former object to another type. for example: % vtkImageViewer ren ren: a vtk object with that name already exists. It seems can't be replaced by declare a new object with same name. So there must be a way to delete it, isn't it? Thank you!! ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ?????KTV, ????????OK~~ http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html From winston at cat.rpi.edu Mon Apr 14 00:10:03 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Mon, 14 Apr 2003 00:10:03 -0400 Subject: [vtkusers] object of vtk in TCL References: <20030414013742.75643.qmail@web15209.mail.bjs.yahoo.com> Message-ID: <3E9A349B.2020200@cat.rpi.edu> Chen Fu wrote: > I find the objects created by the vtk are not a > variable. [...] > How can i get a description of object? Use its Print method. E.g., vtkImageViewer ren ... ren Print > I am a newbie in tcl. Hope somebody can lend me a hand Tcl/Tk in Five Easy Lessons: http://herzberg.ca.sandia.gov/TclCourse/ > Another probleam is how to delete such a object? Use its Delete method. -Jeremy From Neil.Killeen at atnf.csiro.au Mon Apr 14 01:46:04 2003 From: Neil.Killeen at atnf.csiro.au (Neil Killeen) Date: Mon, 14 Apr 2003 15:46:04 +1000 (EST) Subject: [vtkusers] vtk/Python build In-Reply-To: Message-ID: Hi all I haven't made any further progress getting the Python (v 2.1) wrappers running under Solaris (V 5.6) for vtk (V 4.2). See original message http://public.kitware.com/pipermail/vtkusers/2003-April/017205.html The dashboard continues to have no Solaris build. 1) Does the dashboard test include VTK Python wrappers 2) Are there any active Solaris dashboard systems ? 3) Have the VTK Python wrappers ever been know to build under solaris (regarldess of versions) that anybody knows ? cheers Neil From I.deBoer at polytec.de Mon Apr 14 03:25:02 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Mon, 14 Apr 2003 09:25:02 +0200 Subject: [vtkusers] Clip a polygonal hole from an image ? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3AF@02polywbr.waldbronn.polytec.de> Hi, I want to clip a polygonal hole from an image. So far I 1. create the vtkImageData (to create an image from a buffer) 2. create a vtkTexture 3. create a vtkPlaneSource for the texture (Resolution was 128,128... I also tried higher/lower values) 4. create the vtkPolyData for the clipping region 5. create the vtkImplicitDataSet 6. create the clipper vtkClipPolyData clipper->SetInput(planesource->GetOutput()); clipper->SetClipFunction(dataset); If I do all of this I get something like image1.jpg. If I show the actual polgonal object, it looks like image2.jpg which is the correct one, of course. I tried to increase the resolution of the plane but it didn't help. Is there some other solution for making this hole, eg. by the alpha channel of the texture or something like that ? greets Ingo -------------- next part -------------- A non-text attachment was scrubbed... Name: Image1.jpg Type: image/jpeg Size: 13956 bytes Desc: Image1.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Image2.jpg Type: image/jpeg Size: 10764 bytes Desc: Image2.jpg URL: From c.p.botha at its.tudelft.nl Mon Apr 14 03:26:29 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Mon, 14 Apr 2003 09:26:29 +0200 Subject: [vtkusers] Rendering Multiple Volumes In-Reply-To: <473AF46D8DE0514A87C70F33257DA5A854DC73@ding-ep.tip.csiro.au> References: <473AF46D8DE0514A87C70F33257DA5A854DC73@ding-ep.tip.csiro.au> Message-ID: <20030414072629.GA17502@dutidad.twi.tudelft.nl> On Mon, Apr 14, 2003 at 08:52:47AM +1000, Nigel.Hoschke at csiro.au wrote: > At the moment I have two sets of structured points data that are read from > .vtk files using the vtkStructuredPointsReader. These are both passed > through vtkVolumeTextureMapper2D into separate vtkLODProp3D which are then > added to the vtkRenderer using the AddVolume method. The outputs of the > vtkVolumeTextureMapper2D are added to the vtkLODProp3D with the ADDLod > method that takes in a vtkVolumeProperty. A user defined > vtkPiecewiseFunction has been used with SetScalarOpacity method for the > vtkVolumeProperty to make most of the volumes translucent. Okay. This is still not as good as a short Python or Tcl/Tk example that other readers of this list can run, but it's better than nothing. Does the same happen if you use a vtkVolume (i.e. no vtkLODProp3D)? For all clarity, the volume that you add to the renderer FIRST gets occluded by the volume that you add afterwards? -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From s_amit4u at rediffmail.com Mon Apr 14 03:38:06 2003 From: s_amit4u at rediffmail.com (amit shrivastava) Date: 14 Apr 2003 07:38:06 -0000 Subject: [vtkusers] To visualize Angio data using Volume rendering (MIP) Message-ID: <20030414073806.10674.qmail@webmail5.rediffmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dshamoni at science.uva.nl Mon Apr 14 03:52:12 2003 From: dshamoni at science.uva.nl (Denis Shamonin) Date: Mon, 14 Apr 2003 09:52:12 +0200 Subject: [vtkusers] About Book In-Reply-To: References: Message-ID: <3E9A68AC.1080206@science.uva.nl> > > > Dear all. > Does anyone know where has the free copy of this book. > It is hard to borrow and expensive to buy, especially for student! > > Thanks! > > X.Z. > There is no free copy of this book. You can have a look VTK TUTORIAL here http://cherokee.ncsa.uiuc.edu/~semeraro/PPT/VTK_TUTORIAL/v3_document.htm -- Denis Shamonin From paul at opes.com.au Tue Apr 15 04:47:50 2003 From: paul at opes.com.au (Paul Tait) Date: Tue, 15 Apr 2003 16:47:50 +0800 Subject: [vtkusers] dark printing and clipboard Message-ID: <004301c3032b$b29dd0f0$0a0aa8c0@opes.com.au> Hi VTK 4.0 I'm trying to get my MFC printing working I'm using pretty much the same code as in the examples and I've implemented clipboard copying but in both cases my plots come out dark I also print out a vtkScalarbarActor which displays perfectly, so I know i'm doing something wrong here are my lut's // create a top lookup table topLut = vtkLookupTable::New(); topLut->SetTableRange(0, 256); topLut->SetHueRange(0.7, 0); topLut->SetSaturationRange(1, 1); topLut->SetValueRange(0.8, 1); topLut->Build(); // create a bottom lookup table bottomLut = vtkLookupTable::New(); bottomLut->SetTableRange(0, 256); bottomLut->SetHueRange(0.7, 0); bottomLut->SetSaturationRange(.8, .8); bottomLut->SetValueRange(1, 1); bottomLut->Build(); // create lut for depth legend legendLut = vtkLookupTable::New(); legendLut->SetTableRange(0, 256); legendLut->SetHueRange(0.7, 0); legendLut->SetSaturationRange(1, 1); legendLut->SetValueRange(0.8, 1); legendLut->SetRange(-deepest / 100, -shallowest / 100); legendLut->Build(); legend->SetLookupTable(legendLut); legend->SetOrientationToVertical(); legend->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); legend->SetWidth(0.05); legend->SetHeight(0.99); legend->GetPositionCoordinate()->SetValue(0.01, 0.01); legend->SetTitle("depth x 100"); Props->AddItem(legend); From michael.hilbinger at nmfgmbh.de Mon Apr 14 05:09:50 2003 From: michael.hilbinger at nmfgmbh.de (Michael Hilbinger) Date: Mon, 14 Apr 2003 11:09:50 +0200 Subject: [vtkusers] Streamline in fluid flow In-Reply-To: <20030414072601.25703.76408.Mailman@public.kitware.com> Message-ID: Hello to everybody, I have a question concerning the use of streamlines: Is it possible to perform mathematical operations on a physical field along a previous generated streamline? What I want to do: investigation of temperature loss of liquid metals during casting. I highly would apreciate any comments or experience on that topic. Best regards Michael ------------------------------------ Dr.-Ing. R.M. Hilbinger Neue Materialien F?rth GmbH Dr. Mack Strasse 81 90762 F?rth/Bay. Tel.: ++49(0)911-7667234 Mobil.: 0175-8356453 Fax.: ++49(0)911-7667215 email: michael.hilbinger at nmfgmbh.de web: http://www.nmfgmbh.de ------------------------------------ _o --/-> (_)/(_) ------------------------------------ From john.biddiscombe at mirada-solutions.com Mon Apr 14 05:49:27 2003 From: john.biddiscombe at mirada-solutions.com (John Biddiscombe) Date: Mon, 14 Apr 2003 10:49:27 +0100 Subject: [vtkusers] Rendering Multiple Volumes Message-ID: <4926A5BE4AFE7C4A83D5CF5CDA7B7754071260@oxcore01.mirada-solutions.com> When rendering a volume using a raycast mapper, a ray is fired through the volume and the pixel colour/intensity id generated from the sum of all interactions of the ray as it passes through (given your compositing/transfer function). The result is a single pixel with a z-depth of the nearest non zero voxel the ray passed through... when a second volume is raycast...if it overlaps the first, the same process is performed, but this time when the "result" pixel is generated, it will only be copied to screen if the z-depth is closer than the pixel written previously...to get the two volume to be blended properly, one would need to override the raycast mapper and tell it to check both volumes and composite the final pixel value from the transfer functions of both individual rays (taking into account the depths of voxels in both volumes as it passes through). this is quite a lot more complicated and vtk doesn't do it. a vtkMulti-Volume-RayCastMapper would be nice, but probably quite slow! JB (PS. I may need correction on some of the above) > -----Original Message----- > From: Charl P. Botha [mailto:c.p.botha at its.tudelft.nl] > Sent: 14 April 2003 08:26 > To: vtkusers at public.kitware.com > Subject: Re: [vtkusers] Rendering Multiple Volumes > > > On Mon, Apr 14, 2003 at 08:52:47AM +1000, > Nigel.Hoschke at csiro.au wrote: > > At the moment I have two sets of structured points data > that are read from > > .vtk files using the vtkStructuredPointsReader. These are > both passed > > through vtkVolumeTextureMapper2D into separate vtkLODProp3D > which are then > > added to the vtkRenderer using the AddVolume method. The > outputs of the > > vtkVolumeTextureMapper2D are added to the vtkLODProp3D with > the ADDLod > > method that takes in a vtkVolumeProperty. A user defined > > vtkPiecewiseFunction has been used with SetScalarOpacity > method for the > > vtkVolumeProperty to make most of the volumes translucent. > > Okay. This is still not as good as a short Python or Tcl/Tk > example that > other readers of this list can run, but it's better than nothing. > > Does the same happen if you use a vtkVolume (i.e. no > vtkLODProp3D)? For all > clarity, the volume that you add to the renderer FIRST gets > occluded by the > volume that you add afterwards? > > -- > charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From jcpouce at yahoo.com Mon Apr 14 05:58:49 2003 From: jcpouce at yahoo.com (jean-charles campagne) Date: Mon, 14 Apr 2003 02:58:49 -0700 (PDT) Subject: AW: [vtkusers] animation, vtkPoints update, pipeline update In-Reply-To: <1484AEC8AB498A4EB64D4A8137D23FD93C19BC@02polywbr.waldbronn.polytec.de> Message-ID: <20030414095849.41543.qmail@web41506.mail.yahoo.com> hello, --- De Boer Ingo wrote: > > Hi Jean, > > > I am trying to make an animation ( the data is > time > > based) the data > > represent point in 3D. These points would be > moving > > since the > > coordinates of the points vary with time. (I'm > using > > C++) > > I am trying the same. Could you go in a bit more > detail? > In your PointsUpdate-Function... Do you create a new > > vtkPolyData and vtkPolyDataMapper or do you keep > them as a member of your class ? > I guess the vtkPoints is also a member, which is > initialized > and the filled with new data in the > PointsUpdate-Function ? > > thanks & greets > Ingo > here is the source of the "demo" i managed to write (hope the source won't get mangled in the email) (i know it's ugly code and not OO, but my concern here was just to learn vtk) -------------------------------------------------- #include "vtkSphereSource.h" #include "vtkPolyDataMapper.h" #include "vtkRenderWindow.h" #include "vtkCamera.h" #include "vtkActor.h" #include "vtkRenderer.h" #include "vtkStructuredPointsReader.h" #include "vtkGlyph3D.h" #include "vtkRenderWindowInteractor.h" #include "vtkPoints.h" #include "vtkPolyData.h" #include "vtkProperty.h" int main( int argc, char *argv[] ) { vtkPoints *points = vtkPoints::New(); vtkSphereSource *sphere = vtkSphereSource::New(); vtkPolyData *data = vtkPolyData::New(); vtkGlyph3D *verts = vtkGlyph3D::New(); vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New(); vtkActor *sphereActor = vtkActor::New(); vtkRenderer *ren1= vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); const int ni = 20; points->SetNumberOfPoints(ni); for (int i=0; i SetPoint(i, (double)(i%30)*0.1, (double)0, (double)(i/20)); } sphere->SetRadius(0.04 ); sphere->SetPhiResolution( 4 ); sphere->SetThetaResolution( 4 ); data->SetPoints(points); verts->SetSource(sphere->GetOutput()); verts->SetInput(data); verts->ScalingOff(); sphereMapper->SetInput( verts->GetOutput() ); sphereActor->SetMapper( sphereMapper ); sphereActor->GetProperty()->SetOpacity(0.5); sphereActor->RotateY(-45.0); ren1->AddActor( sphereActor ); ren1->SetBackground( 1.0, 1.0, 1.0 ); renWin->AddRenderer( ren1 ); renWin->SetSize( 300, 300 ); double u=0.2; int uu=0; int n=0; while (1) { for (int i=0; i SetPoint(i, (double)(i%20)*0.1, (double)0.2*sin(u*i/10.0*u), (double)(i/20)); } u+=0.01; points->Modified(); renWin->Render(); } // sphere->Delete(); // sphereMapper->Delete(); // sphereActor->Delete(); // ren1->Delete(); // renWin->Delete(); // vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); // iren->SetRenderWindow(renWin); // iren->Initialize(); // iren->Start(); return 0; } __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com From c.p.botha at its.tudelft.nl Mon Apr 14 06:17:04 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 14 Apr 2003 12:17:04 +0200 Subject: [vtkusers] Rendering Multiple Volumes In-Reply-To: <4926A5BE4AFE7C4A83D5CF5CDA7B7754071260@oxcore01.mirada-solutions.com> References: <4926A5BE4AFE7C4A83D5CF5CDA7B7754071260@oxcore01.mirada-solutions.com> Message-ID: <1050315424.17728.99.camel@dutidad> On Mon, 2003-04-14 at 11:49, John Biddiscombe wrote: > When rendering a volume using a raycast mapper, a ray is fired through > the volume and the pixel colour/intensity id generated from the sum of > all interactions of the ray as it passes through (given your > compositing/transfer function). The result is a single pixel with a > z-depth of the nearest non zero voxel the ray passed through... He's using a vtkVolumeTextureMapper2D, which uses axis orthogonal texture-mapped planes to do the compositing in hardware. He's adding this to a vtkLODProp3D, which should use a vtkVolume to render this. In that case, it's part of the translucent rendering stage, which makes the symptoms he's seeing (the first volume occluding the second volume) a bit more difficult to explain away. One strange thing I'm seeing is that the depth mask is not being turned off during this rendering (although it IS turned off for a vtkVolumeRayCastMapper), meaning that even a semi-opaque pixel will prevent a further away pixel from being rendered, which is not entirely correct. This WOULD explain what he's seeing. Lisa, could you comment? In anycase, as you've said, even if blending is allowed, there is no easy way of perfectly blending the two volumes, unless the rendering of the texture-mapped planes is ordered back-to-front globally for the two volumes. Even this is not a complete solution, as the planes can overlap. One could perhaps pre-blend the volumes cleverly if the volumes remain static with regards to each other. > JB (PS. I may need correction on some of the above) Or elaboration. :) -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From affable at hd2.dot.net.in Mon Apr 14 06:39:57 2003 From: affable at hd2.dot.net.in (cspl) Date: Mon, 14 Apr 2003 16:09:57 +0530 Subject: [vtkusers] Mapping ROI on Render window to the corresponding Volume data after Volume rendering Message-ID: <001c01c30272$31e3dd10$01000001@macinfo.net> Hi ! After rendering the volume using a raycast function I would like to draw ROI on the rendered Volume and get the Volume data pertaining to the ROI. I understand that the render window displays the Volume Data as a 2D image with a 3D effect. When I draw a ROI on the RenderWindow, I am able to get that 2D image in the ROI from the renderwindow and not the corresponding Volume data. Can anyone help us in identifying a class / function which can map the ROI drawn on the renderwindow to the corresponding Volume data. I would like to delete the part selected by the ROI / save it as a different Volume. Thanks for help. Regards, Sunanda -------------- next part -------------- An HTML attachment was scrubbed... URL: From john.biddiscombe at mirada-solutions.com Mon Apr 14 06:42:26 2003 From: john.biddiscombe at mirada-solutions.com (John Biddiscombe) Date: Mon, 14 Apr 2003 11:42:26 +0100 Subject: [vtkusers] Rendering Multiple Volumes Message-ID: <4926A5BE4AFE7C4A83D5CF5CDA7B775407AF46@oxcore01.mirada-solutions.com> > the texture-mapped planes is ordered back-to-front globally > for the two > volumes. Even this is not a complete solution, as the planes can > overlap. One could perhaps pre-blend the volumes cleverly if the > volumes remain static with regards to each other. oooh. nasty indeed. Preblending would sort of work, but then you'd need to remove one of the overlapping regions. However it's not a nice solution because of the probable need to store the original if anything moved. > > JB (PS. I may need correction on some of the above) > > Or elaboration. :) Indeed. reading a bit more of the posts would probably have given me a clue that raycasting wasn't being used. oops. JB From jcpouce at yahoo.com Mon Apr 14 07:14:42 2003 From: jcpouce at yahoo.com (jean-charles campagne) Date: Mon, 14 Apr 2003 04:14:42 -0700 (PDT) Subject: [vtkusers] proper use of vtkStructuredPoints in C++ for vtkVolume ? Message-ID: <20030414111442.53057.qmail@web41501.mail.yahoo.com> hello, i'm trying to generated a volume (vtkVolumeRayCastMapper) out of structured points in C++. But i am having troubles specifying the points manually (eg from an array of integers or float). Can someone illustrate the use of vtkStructuredPoints (specifying points/dimensions/... manu)? this is the source of the program i'm trying to write correctly. It fails miserably at the rendering phase. i'm guessing i'm missing or mis-initializing something... but i'm not sure what... ----------------------------------------- #include "vtkRenderWindow.h" #include "vtkCamera.h" #include "vtkActor.h" #include "vtkRenderer.h" #include "vtkStructuredPoints.h" #include "vtkVolumeRayCastMapper.h" #include "vtkRenderWindowInteractor.h" #include "vtkPoints.h" int main( int argc, char *argv[] ) { vtkPoints *points = vtkPoints::New(); vtkVolumeMapper *volumeMapper = vtkVolumeRayCastMapper::New(); vtkVolume *volume = vtkVolume::New(); vtkRenderer *ren1= vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); vtkStructuredPoints *structuredPoints = vtkStructuredPoints::New(); structuredPoints->SetSpacing(1.0,1.0,1.0); structuredPoints->SetScalarType(VTK_UNSIGNED_SHORT); structuredPoints->SetDimensions(2, 2, 2); structuredPoints->SetNumberOfScalarComponents (1); structuredPoints->SetUpdateExtent(-100,100,-100,100,-100,100); structuredPoints->SetExtent(-10,100,-100,100,-100,100); //setting points const int n = 5; for (int i=0; iSetScalarComponentFromFloat (i, j, k, 0, 1.0); } } } volumeMapper->SetInput(structuredPoints); volume->SetMapper(volumeMapper); ren1->AddVolume(volume); ren1->SetBackground( 1.0, 1.0, 1.0 ); renWin->AddRenderer( ren1 ); renWin->SetSize( 300, 300 ); renWin->Render(); return 0; } ----------------------------------------- many thanks JCC __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com From chandranram4u at rediffmail.com Mon Apr 14 08:31:02 2003 From: chandranram4u at rediffmail.com (ramu chandran) Date: 14 Apr 2003 12:31:02 -0000 Subject: [vtkusers] VTK patented classes Message-ID: <20030414123102.23809.qmail@webmail31.rediffmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From yeager at cgd.ucar.edu Fri Apr 11 17:42:20 2003 From: yeager at cgd.ucar.edu (Stephen Yeager) Date: Fri, 11 Apr 2003 15:42:20 -0600 (MDT) Subject: [vtkusers] compiling on AIX with xlC Message-ID: Hello: I run into trouble compiling VTK4.2 on AIX with xlC. The make dies on object file vtkAbstractMapper.o: Building object file vtkAbstractMapper.o... "/contrib/vtk-4.2/VTK/Common/vtkDataObject.h", line 192.3: 1540-0219 (S) The call to "operator<<" has no best match. "/contrib/vtk-4.2/VTK/Common/vtkDataObject.h", line 192.3: 1540-1228 (I) Argument number 1 is an lvalue of type "vtkOStreamWrapper". "/contrib/vtk-4.2/VTK/Common/vtkDataObject.h", line 192.3: 1540-1228 (I) Argument number 2 is an lvalue of type "int [6]". "/contrib/vtk-4.2/VTK/Common/vtkOStreamWrapper.h", line 61.22: 1540-1202 (I) No candidate is better than "vtkOStreamWrapper::operator<<(void *)". etc. This also happens when I try to compile the CVS download of VTK. Can anyone tell me what compiler options are needed for this make? or better, can anyone provide a successful CMakeCache.txt file for xlC on AIX? Thanks, Steve +-------------------------------------------------------------------+ | Stephen Yeager | National Center for Atmospheric Research | | CGD - Oceanography | 1850 Table Mesa Drive | | yeager at ncar.ucar.edu | Boulder, Colorado 80303 | | Voice: (303) 497-1721 | | +--------- http://www.cgd.ucar.edu/oce/yeager/yeager.html ----------+ From berklist at nycap.rr.com Mon Apr 14 09:22:52 2003 From: berklist at nycap.rr.com (Berk Geveci) Date: 14 Apr 2003 09:22:52 -0400 Subject: [vtkusers] Streamline in fluid flow In-Reply-To: References: Message-ID: <1050326573.28507.3.camel@caemlyn.kitwarein.com> > Is it possible to perform mathematical operations on a physical field along > a previous generated streamline? Not using existing vtk filters. You have to get the generated streamline data (as a vtkPolyData object) and perform the calculation yourself. It shouldn't be too hard. Each streamline (or two, if the both integration directions were used) is stored as one cell. All you have to do is to get each cell and iterate over the points. -Berk From jiang at Telematik-Institut.de Mon Apr 14 09:25:46 2003 From: jiang at Telematik-Institut.de (Chunyan Jiang) Date: Mon, 14 Apr 2003 15:25:46 +0200 Subject: [vtkusers] Ugent question! vtk and JBuilder Message-ID: Hello, every one, Does some body use vtk in JBuilder? I am new comer for JBuilder. I download vtk 4.2 and install it. There is vtk.jar in \bin. However I don't know how to set the environment in JBuilder 8. So I can not even run simple example. Could some one help me? Thanks a lot! Chunyan *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** From tim.fooy at pandora.be Mon Apr 14 09:23:50 2003 From: tim.fooy at pandora.be (Tim Fooy) Date: Mon, 14 Apr 2003 15:23:50 +0200 Subject: [vtkusers] 3d plotting In-Reply-To: <16025.36249.436687.289910@monster.linux.in> References: <200304131415.37794.tim.fooy@pandora.be> <16025.36249.436687.289910@monster.linux.in> Message-ID: <200304141523.50287.tim.fooy@pandora.be> On Sunday 13 April 2003 18:17, Prabhu Ramachandran wrote: > >>>>> "TF" == Tim Fooy writes: > > TF> Hi all, I have been looking quite some time now in the > TF> documentation on the VTK homepage, but given the enormous > TF> number of classes I can't find what I'm looking for and I hope > TF> someone might give me a hint in the right direction. > > You need to see how your data is organized. Are the points regularly > organized, are they structured or unstructured? If its not really > organized do you know how to make a volume with the points you have? > In these cases you need to create a VTK data file with your data and > use an appropriate data reader and use the data to do what you want. > VTK data files support structured points, structured grids, > unstructured grids and polydata. The best online reference for the > VTK data format is here: > > http://vtk.org/pdf/file-formats.pdf The data is structured, and of this form: X Y Z 0 0 5.2 1 0 6.4 0 1 4.8 1 1 4.3 .. They probably can be put into a structured grid, but I don't know in which way I can end up with a plot of the 3D surface above the XY plane, consisting of 4-point tiles, and with axes indicating the X and Y values. So some hints on class names that I might use for that would be really helpful: if I know what to use/look for, then I'll find my way through the documentation of the methods to actually make the plot. Thanks for helping, Tim From Joris.VandenWyngaerd at esat.kuleuven.ac.be Mon Apr 14 09:51:46 2003 From: Joris.VandenWyngaerd at esat.kuleuven.ac.be (joris) Date: Mon, 14 Apr 2003 15:51:46 +0200 Subject: [vtkusers] vtkImageWindow in vtk 4.2.2. Message-ID: <000601c3028c$fd716550$c9bd3a86@esat.kuleuven.ac.be> I am trying to upgrade to vtk 4.2.2. I have the impression that vtkImageWindow dissapeared. Is an alternative available for this class ? Joris ================ Joris Vanden Wyngaerd coordinates : http://www.esat.kuleuven.ac.be/~joris/personalia.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From skboyd at ucalgary.ca Mon Apr 14 10:56:05 2003 From: skboyd at ucalgary.ca (Steve Boyd) Date: Mon, 14 Apr 2003 07:56:05 -0700 Subject: [vtkusers] Fonts? Message-ID: <3E9ACC05.61D514CB@ucalgary.ca> Hi, I'm using vtkTextMapper methods ->SetBold(), ->SetFontSize(), and ->SetFontFamily() and get a warning message that these methods have been obsoleted. How can I modify the font now? Sincerely, Steve -- Steven Boyd, PhD Assistant Professor Department of Mechanical and Manufacturing Engineering University of Calgary 2500 University Drive, N.W. Calgary, Alberta, Canada, T2N 1N4 tel. 1.403.220.4173 fax. 1.403.282.8406 skboyd at ucalgary.ca ------------------------------------------------------------------- From yass at uscx.net Mon Apr 14 10:00:28 2003 From: yass at uscx.net (yasser salman) Date: Mon, 14 Apr 2003 07:00:28 -0700 (PDT) Subject: [vtkusers] Plz help!!Tiff so Dark Message-ID: <20030414140028.DFF2F421F@sitemail.everyone.net> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Mathieu.Malaterre at creatis.insa-lyon.fr Mon Apr 14 10:00:27 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Mon, 14 Apr 2003 16:00:27 +0200 Subject: [vtkusers] vtkImageWindow in vtk 4.2.2. In-Reply-To: <000601c3028c$fd716550$c9bd3a86@esat.kuleuven.ac.be> References: <000601c3028c$fd716550$c9bd3a86@esat.kuleuven.ac.be> Message-ID: <3E9ABEFB.4030806@creatis.insa-lyon.fr> Joris, Please read the FAQ: http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.008.htp mathieu joris wrote: > I am trying to upgrade to vtk 4.2.2. > > I have the impression that vtkImageWindow dissapeared. Is an alternative > available for this class ? > > Joris > > ================ > Joris Vanden Wyngaerd > coordinates : http://www.esat.kuleuven.ac.be/~joris/personalia.html > > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From sebastien.barre at kitware.com Mon Apr 14 10:28:44 2003 From: sebastien.barre at kitware.com (Sebastien BARRE) Date: Mon, 14 Apr 2003 10:28:44 -0400 Subject: [vtkusers] Fonts? In-Reply-To: <3E9ACC05.61D514CB@ucalgary.ca> Message-ID: <5.2.1.1.0.20030414102807.023b36d8@pop.biz.rr.com> At 4/14/2003 10:56 AM, Steve Boyd wrote: >Hi, > >I'm using vtkTextMapper methods ->SetBold(), ->SetFontSize(), and >->SetFontFamily() and get a warning message that these methods have been >obsoleted. How can I modify the font now? FQA: 6.14. Text properties in VTK 4.2 http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.014.htp -- Sebastien Barre From zhou at isg.cs.uni-magdeburg.de Mon Apr 14 10:47:51 2003 From: zhou at isg.cs.uni-magdeburg.de (Jianlong Zhou) Date: Mon, 14 Apr 2003 16:47:51 +0200 Subject: [vtkusers] clip volume to form a hole inside the volume. Message-ID: <3E9AE637.10081.561B2E@localhost> Dear all, My data is 3D volume data. I defined a sphere shape region and want to clip out this sphere region to render the other part of the volume with direct volume rendering. Would someone suggest me how to clip out the sphere region and render the left part of the volume? I am using vtk3.2. Thanks in advance. Jianlong From zhou at isg.cs.uni-magdeburg.de Mon Apr 14 11:29:36 2003 From: zhou at isg.cs.uni-magdeburg.de (Jianlong Zhou) Date: Mon, 14 Apr 2003 17:29:36 +0200 Subject: [vtkusers] To run the tcl examples Message-ID: <3E9AF000.12581.7C52EF@localhost> hi, vtk users, I am using vtk3.2 now. I want to run tcl examples in source directory. I have compiled vtktcl.dll successfully according to the guidence of readme.html. But when I run the tcl examples, I always get the error like this: invalid command name "vtkRenderer" while executing "vtkRenderer ren1" (file "..\vol\example.tcl"line 10). That means it cannot recognize any vtk classes in TCL. Does anyone one tell me how to make the tcl examples run under vtk3.2 on Windows xp? Thanks in advance. Jianlong From winston at cat.rpi.edu Mon Apr 14 11:43:07 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Mon, 14 Apr 2003 11:43:07 -0400 Subject: [vtkusers] Re: Plz help!!Tiff so Dark References: <20030414140028.DFF2F421F@sitemail.everyone.net> Message-ID: <3E9AD70B.E46868A@cat.rpi.edu> yasser salman wrote: > > hi all. Yasser, Please don't email me directly with such questions unless we have previously established a dialog about it on the vtk-users list. > when i read a tiff image it seems so dark the following cose that i use: > vtkTIFFReader* reader = vtkTIFFReader::New(); > reader->SetFileName("D:/yasser/1.tif"); //location of tiff image. > vtkImageViewer* viewer = vtkImageViewer::New(); > viewer->SetInput(reader->GetOutput()); > viewer->SetSize(256,256); //size of my image > viewer->Render(); You need to set your window and level: viewer->SetColorWindow(256); viewer->SetColorLevel(128); The values you use will be dependent on your data; I used 256 & 128 as an example (with 8-bit unsigned monochrome pixels). As for the medical example, I don't have one handy & I don't have time to find one for you. I suggest you try searching the archives http://www.kitware.com/search.html or try Google http://www.google.com Also, just keep trying to massage the medical example code -- it's all there; you just have to tweak it. HTH, -Jeremy From winston at cat.rpi.edu Mon Apr 14 12:00:06 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Mon, 14 Apr 2003 12:00:06 -0400 Subject: [vtkusers] VTK patented classes References: <20030414123102.23809.qmail@webmail31.rediffmail.com> Message-ID: <3E9ADB06.32BE1A60@cat.rpi.edu> ramu chandran wrote: > I am using VTK with Java. I suppose I am not allowed to > use the patented classes for commercial purposes. Can I assume > that only those classes appearing under "patented" directory in > CVS are prohibited from commercial use and rest all classes can be > used without any leagal issues? Please let me know. It's not that you are prohibited from using the patented classes for commerical purposes, it's that you must make a licensing arrangement with the patent holder(s). Also, you need make no such arrangement for classes not in the Patented directory, but other BSD license-style requirements apply. See README.html#Copyright in your VTK source directory. HTH, but IANAL, -Jeremy From winston at cat.rpi.edu Mon Apr 14 12:06:25 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Mon, 14 Apr 2003 12:06:25 -0400 Subject: [vtkusers] About Book References: <3E9A68AC.1080206@science.uva.nl> Message-ID: <3E9ADC81.3494F0DC@cat.rpi.edu> Denis Shamonin wrote: > > Does anyone know where has the free copy of this book. > > It is hard to borrow and expensive to buy, especially for student! > > > There is no free copy of this book. > You can have a look VTK TUTORIAL here > http://cherokee.ncsa.uiuc.edu/~semeraro/PPT/VTK_TUTORIAL/v3_document.htm Not to mention, proceeds from book sales go to supporting the documentation effort. If you don't buy the book, you deprive the community of its roadmap to the code. If you are at a university where the book is being used for a course, you should be able to buy it at the "bulk" rate of $65 from your campus bookstore, instead of the individual $85 price. $65 is a few of hours of tutoring, or ~6 hrs of TAing, right? ;-) -Jeremy From Kyle_Roberson at duratekinc.com Mon Apr 14 12:20:58 2003 From: Kyle_Roberson at duratekinc.com (Roberson, Kyle) Date: Mon, 14 Apr 2003 09:20:58 -0700 Subject: [vtkusers] directly adding elements to unstructured grids... extension to mo re than one Message-ID: <4C7EFB6E2A295648AFE702CA96CD482F9593DB@wmns1.duratekinc.com> I'm trying to make unstructured grids out of various ABAQUS elements. I can successfully make a picture of the model by making an unstructured grid for EACH element and turning it into an independent actor. I would like to put several elements into each unstructured grid and turn that into an actor to make my subsequent manipulations easier to handle. However, I havent figured out how to do that. When I add more than one to the unstructured grid, no graphics come out the other end. Here's what I'm doing now (in Python). Only two types of elements are in to save space. Cheers, Kyle # Create the usual rendering stuff. ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) renWin.SetSize(1280, 1024) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) ren.SetBackground(.1, .2, .4) # Use the brute-force method to make an actor for each thing for k,v in elem.items() : if v[0] == "S3R" : thingPoints = vtk.vtkPoints() thingPoints.SetNumberOfPoints(3) thingPoints.InsertPoint(0, node[v[2]][0], node[v[2]][1], node[v[2]][2]) thingPoints.InsertPoint(1, node[v[3]][0], node[v[3]][1], node[v[3]][2]) thingPoints.InsertPoint(2, node[v[4]][0], node[v[4]][1], node[v[4]][2]) aThing = vtk.vtkTriangle() aThing.GetPointIds().SetId(0, 0) aThing.GetPointIds().SetId(1, 1) aThing.GetPointIds().SetId(2, 2) aThingGrid = vtk.vtkUnstructuredGrid() aThingGrid.Allocate(1, 1) aThingGrid.InsertNextCell(aThing.GetCellType(),\ aThing.GetPointIds()) aThingGrid.SetPoints(thingPoints) aThingMapper = vtk.vtkDataSetMapper() aThingMapper.SetInput(aThingGrid) aThingActor = vtk.vtkActor() aThingActor.SetMapper(aThingMapper) aThingActor.GetProperty().SetDiffuseColor(1, 1, 0) # aThingActor.GetProperty().SetOpacity(0.15) aThingActor.GetProperty().SetRepresentationToWireframe() ren.AddActor(aThingActor) elif v[0] == "S4R" : thingPoints = vtk.vtkPoints() thingPoints.SetNumberOfPoints(4) thingPoints.InsertPoint(0, node[v[2]][0], node[v[2]][1], node[v[2]][2]) thingPoints.InsertPoint(1, node[v[3]][0], node[v[3]][1], node[v[3]][2]) thingPoints.InsertPoint(2, node[v[4]][0], node[v[4]][1], node[v[4]][2]) thingPoints.InsertPoint(3, node[v[5]][0], node[v[5]][1], node[v[5]][2]) aThing = vtk.vtkQuad() aThing.GetPointIds().SetId(0, 0) aThing.GetPointIds().SetId(1, 1) aThing.GetPointIds().SetId(2, 2) aThing.GetPointIds().SetId(3, 3) aThingGrid = vtk.vtkUnstructuredGrid() aThingGrid.Allocate(1, 1) aThingGrid.InsertNextCell(aThing.GetCellType(),\ aThing.GetPointIds()) aThingGrid.SetPoints(thingPoints) aThingMapper = vtk.vtkDataSetMapper() aThingMapper.SetInput(aThingGrid) aThingActor = vtk.vtkActor() aThingActor.SetMapper(aThingMapper) aThingActor.GetProperty().SetDiffuseColor(1, 1, 0) # aThingActor.GetProperty().SetOpacity(0.15) aThingActor.GetProperty().SetRepresentationToWireframe() ren.AddActor(aThingActor) # ... several more for different elements elided ... # Render the scene and start interaction. iren.Initialize() renWin.Render() iren.Start() -------------- next part -------------- An HTML attachment was scrubbed... URL: From winston at cat.rpi.edu Mon Apr 14 12:36:16 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Mon, 14 Apr 2003 12:36:16 -0400 Subject: [vtkusers] To run the tcl examples References: <3E9AF000.12581.7C52EF@localhost> Message-ID: <3E9AE380.2CBC9EF7@cat.rpi.edu> Jianlong Zhou wrote: > > hi, vtk users, > > I am using vtk3.2 now. I want to run tcl examples in source directory. I have compiled > vtktcl.dll successfully according to the guidence of readme.html. But when I run the tcl > examples, I always get the error like this: > > invalid command name "vtkRenderer" while executing "vtkRenderer ren1" (file > "..\vol\example.tcl"line 10). > > That means it cannot recognize any vtk classes in TCL. Do you have the path to VTK in your PATH environment variable? Start/Settings/ControlPanel/System, on one of the tabs (depending on version of Windows), there should be an Environment Variables button or setting. Edit the User or System variable PATH to contain the path to your compiled DLL. HTH, -Jeremy From cnavarro at ncsa.uiuc.edu Mon Apr 14 12:47:00 2003 From: cnavarro at ncsa.uiuc.edu (Christopher M. Navarro) Date: Mon, 14 Apr 2003 11:47:00 -0500 (CDT) Subject: [vtkusers] directly adding elements to unstructured grids... extension to mo re than one In-Reply-To: <4C7EFB6E2A295648AFE702CA96CD482F9593DB@wmns1.duratekinc.com> Message-ID: On Mon, 14 Apr 2003, Roberson, Kyle wrote: > I'm trying to make unstructured grids out of various ABAQUS elements. I can > successfully make a picture of the model by making an unstructured grid for > EACH element and turning it into an independent actor. I would like to put > several elements into each unstructured grid and turn that into an actor to > make my subsequent manipulations easier to handle. However, I havent figured > out how to do that. When I add more than one to the unstructured grid, no > graphics come out the other end. > Have you tried vtkAppendFilter? You can use it to append unstructuredgrids. -chris From mstenzel at pankow.in-berlin.de Mon Apr 14 13:03:11 2003 From: mstenzel at pankow.in-berlin.de (Martin Stenzel) Date: Mon, 14 Apr 2003 19:03:11 +0200 (CEST) Subject: [vtkusers] compiling on AIX with xlC In-Reply-To: Message-ID: On Fri, 11 Apr 2003, Stephen Yeager wrote: > Hello: > > I run into trouble compiling VTK4.2 on AIX with xlC. The make dies > on object file vtkAbstractMapper.o: > > This also happens when I try to compile the CVS download of VTK. Can > anyone tell me what compiler options are needed for this make? or better, > can anyone provide a successful CMakeCache.txt file for xlC on AIX? > I recently compiled VTK 4.0 on AIX 4.3.3 with gcc 3.2.1. See my posting. However, still I could not verify the properness of this build. Regards, Martin. From prabhu at aero.iitm.ernet.in Mon Apr 14 14:06:03 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Mon, 14 Apr 2003 23:36:03 +0530 Subject: [vtkusers] About Book In-Reply-To: <3E9ADC81.3494F0DC@cat.rpi.edu> References: <3E9A68AC.1080206@science.uva.nl> <3E9ADC81.3494F0DC@cat.rpi.edu> Message-ID: <16026.63627.751498.5728@monster.linux.in> >>>>> "JW" == Jeremy Winston writes: JW> $65 is a few of hours of tutoring, or ~6 hrs of TAing, right? JW> ;-) Wrong! $65 is more than half a *months* stipend where I come from!! So, while $65 is nothing for some folks its heck of a lot of money for some others. cheers, prabhu From prabhu at aero.iitm.ernet.in Mon Apr 14 14:29:19 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Mon, 14 Apr 2003 23:59:19 +0530 Subject: [vtkusers] 3d plotting In-Reply-To: <200304141523.50287.tim.fooy@pandora.be> References: <200304131415.37794.tim.fooy@pandora.be> <16025.36249.436687.289910@monster.linux.in> <200304141523.50287.tim.fooy@pandora.be> Message-ID: <16026.65023.20528.13753@monster.linux.in> >>>>> "TF" == Tim Fooy writes: TF> The data is structured, and of this form: X Y Z 0 0 5.2 1 0 TF> 6.4 0 1 4.8 1 1 4.3 .. They probably can be put into a TF> structured grid, but I don't know in which way I can end up TF> with a plot of the 3D surface above the XY plane, consisting Create a structured points data (or structured grid if that does not work) with constant Z and treat your given z values as scalar attributes at each of the points on the plane. Then use the vtkWarpScalar class to warp the plane using the scalars to produce a carpet plot. Use vtkPolyDataNormals if you want a smoother appearance. Use vtkCubeAxesActor2D for the axes. That should get you started. cheers, prabhu From winston at cat.rpi.edu Mon Apr 14 15:20:35 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Mon, 14 Apr 2003 15:20:35 -0400 Subject: [vtkusers] About Book References: <3E9A68AC.1080206@science.uva.nl> <3E9ADC81.3494F0DC@cat.rpi.edu> <16026.63627.751498.5728@monster.linux.in> Message-ID: <3E9B0A03.F4C91D21@cat.rpi.edu> Prabhu Ramachandran wrote: > > Jeremy Winston writes: > > $65 is a few of hours of tutoring, or ~6 hrs of TAing, right? > > Wrong! $65 is more than half a *months* stipend where I come from!! > So, while $65 is nothing for some folks its heck of a lot of money for > some others. All apologies. My unintentional U.S.-o-centricism is showing. I guess the tutorial previously mentioned is the way to go, then. http://cherokee.ncsa.uiuc.edu/~semeraro/PPT/VTK_TUTORIAL/v3_document.htm -Jeremy From nick.smethurst at free.fr Mon Apr 14 16:44:43 2003 From: nick.smethurst at free.fr (N Smethurst) Date: Mon, 14 Apr 2003 22:44:43 +0200 Subject: [vtkusers] About Book In-Reply-To: <16026.63627.751498.5728@monster.linux.in> References: <3E9ADC81.3494F0DC@cat.rpi.edu> <16026.63627.751498.5728@monster.linux.in> Message-ID: <200304142244.43472.nick.smethurst@free.fr> What annoyed me about these books is that it is almost like they were purposely written to be hopelessly incomplete unless you buy both. I am also a poor student and I ended up buying both books eventually and paying the high shipping costs to France. I spent about $170 in total with the shipping costs.. that translates into more than a months food budget. However, I kept my mouth shut since I figured that the volumes sold are lower than many books and so the gross profit needs to be higher. Maybe the idea of a student discount would be a possibility as I am sure there are many students who really can't afford that kind of money? Nic Le Lundi 14 Avril 2003 20:06, Prabhu Ramachandran a ?crit : > Wrong! $65 is more than half a *months* stipend where I come from!! > So, while $65 is nothing for some folks its heck of a lot of money for > some others. From Scott.Harris at wpafb.af.mil Mon Apr 14 16:54:29 2003 From: Scott.Harris at wpafb.af.mil (Harris Scott R Civ AFRL/SNJM) Date: Mon, 14 Apr 2003 16:54:29 -0400 Subject: [vtkusers] Strange problem with Python Message-ID: <67348AAF0635D511866A00508BDF0CC805C0A248@fszhtv11.wpafb.af.mil> I've been trying to upgrade to the CVS version of VTK, but I'm experiencing an odd problem. I get this error when my program starts: wxPython imported... Traceback (most recent call last): File "POP.py", line 26, in ? import POPView File "PythonSource/POPView.py", line 20, in ? from vtk import * File "/home/scott/VTK-4.2.2/Wrapping/Python/vtk/__init__.py", line 10, in ? from imaging import * File "/home/scott/VTK-4.2.2/Wrapping/Python/vtk/imaging.py", line 7, in ? from libvtkImagingPython import * ImportError: /home/scott/VTK/bin/libvtkImagingPython.so: R_PPC_REL24 relocation at 0x0d9a5d48 for symbol `utterworthHighPassPCc' out of range This error happens when the project I'm working on starts up. I've tried to reproduce the problem in a small test script, but I can't. I can import vtk in small test scripts and interactively in python with no problem. The demos all work fine as well. I don't see the problem with the 4.2.2 relese. I've compiled both 4.2.2 and the CVS version with identical options in ccmake. I'm using VTK with python 2.2 and wxPython. My machine is a mac powerbook running yellowdog linux 2.3 (similar to redhat). I don't understand the error message, so I don't know where to start looking. Any help would be appreciated! Thanks, -Scott Scott Harris scottrharris at earthlink.net From yass at uscx.net Mon Apr 14 18:03:56 2003 From: yass at uscx.net (yasser salman) Date: Mon, 14 Apr 2003 15:03:56 -0700 (PDT) Subject: [vtkusers] 3D Tiff rendering! Message-ID: <20030414220356.E78D84822@sitemail.everyone.net> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From winston at cat.rpi.edu Mon Apr 14 19:22:21 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Mon, 14 Apr 2003 19:22:21 -0400 Subject: [vtkusers] 3D Tiff rendering! References: <20030414220356.E78D84822@sitemail.everyone.net> Message-ID: <3E9B42AD.1070201@cat.rpi.edu> yasser salman wrote: > Hi.., > i worte the this code to read a series of tiff file ., it works but the first image only appeared in the windowview.. i wanna to handle these images to create a 3D rendering (as in example Medical2.cxx..can u help me for this..also how i can process it separetly after reding it.. > thanx.. > vtkTIFFReader *Reader = vtkTIFFReader::New(); > Reader->SetFilePrefix ("D:/tiff/TIFF/MRI"); > Reader->SetFilePattern("%s%.4d.tif");// my First file MRI0001.tiff > Reader->SetDataExtent (0,255,0,255,1,15); // 15 slice only.. > Reader->SetDataSpacing(1,1,1); > Reader->Update(); vtkExtractVOI *VOI = vtkExtractVOI::New(); VOI->SetInput(Reader->GetOutput()); VOI->SetVOI(0,255,0,255,1,1); > vtkImageViewer* viewer = vtkImageViewer::New(); > viewer->SetColorWindow(255); > viewer->SetColorLevel(128); viewer->SetInput(VOI->GetOutput()); > viewer->SetSize(256,256); > viewer->Render(); To change the slice you're viewing, just make another call to VOI's SetVOI() method, with the slice number you want as the last two parameters (e.g., VOI->SetVOI(0,255,0,255,2,2)), and Render() again. (You might have to call VOI's Update() method, I'm not sure.) As for viewing the whole volume, Medical2.cxx is only showing two isocontours, not the voxel data. Read the source, run the compiled code, then read it again. That's the best way to learn it. That's what I do. HTH, -Jeremy From tdeschamps at lbl.gov Mon Apr 14 20:02:42 2003 From: tdeschamps at lbl.gov (Thomas Deschamps) Date: Mon, 14 Apr 2003 17:02:42 -0700 Subject: [vtkusers] Pb using vtkAppendPolyData & vtkPolyDataConnectivityFilter Message-ID: <3E9B4C22.7040103@lbl.gov> Hi vtkUsers, I am using vtkAppendPolyData for selecting contours which have a certain length among all the contours I have. My problem is that it takes a LOT of time. The following code remove all the closed contours which have a length smaller than contourLength void function( int contourLength, vtkPolyData * myPolyData ) { vtkPolyDataConnectivityFilter * connectivity = vtkPolyDataConnectivityFilter::New (); connectivity -> SetInput( myPolyData ); connectivity -> SetExtractionModeToSpecifiedRegions(); connectivity -> Update(); vtkPolyData * localPolyData = vtkPolyData::New(); int nbRegions = connectivity -> GetNumberOfExtractedRegions(); for( int i = 0 ; i < nbRegions ; i++ ) { vtkAppendPolyData * append = vtkAppendPolyData::New(); connectivity -> AddSpecifiedRegion(i); connectivity -> Update(); int nbLines = connectivity -> GetOutput() -> GetNumberOfLines(); if( nbLines >= contourLength ) append -> AddInput( connectivity -> GetOutput() ); append -> AddInput( localPolyData ); append -> Update(); localPolyData -> DeepCopy( append -> GetOutput()); connectivity -> DeleteSpecifiedRegion(i); append -> Delete(); } myPolyData -> DeepCopy( localPolyData ); localPolyData -> Delete(); connectivity -> Delete(); } You may ask why I am not using the "append" outside of the loop. This is because it looks like append -> AddInput() is not making a copy of the input polydata, but keeps track of the pointer, even if this pointer is modified in the future. Therefore it was not working like that. When the number of contours is > 1000, and when each contour is between 4 and 700 lines, it takes 30 minutes... There is surely something more efficient that what I am doing, but I don't know what. Thank you for reading this. Thomas (tdeschamps at lbl.gov) From Bhautik.Joshi at csiro.au Mon Apr 14 23:13:48 2003 From: Bhautik.Joshi at csiro.au (Bhautik.Joshi at csiro.au) Date: Tue, 15 Apr 2003 13:13:48 +1000 Subject: [vtkusers] [vtkusers]vtk using haptics Message-ID: > I'm a newone in VTK. I'd like to use 'vkt' for haptics rendering. > Specially, I'm using PHANToM (Sensable Technologies., Inc) now. > Does anybody include the GHOST SDK in vtk rendering to interface > haptics? > At first, I just want to try to deform simple object using vtk. > I don't have any idea how I can include the haptics(GHOST). This list is what I put together after a quick bit of googling (isn't that a wonderful verb?): There is a posting about this in the vtkusers archives dating back to October 2000: http://public.kitware.com/pipermail/vtkusers/2000-October/004596.html And you might want to get in touch with these people at the University of Siena, with software which loads VTK data for haptic interaction (though I'm not sure if VTK itself is used for rendering): http://www.dii.unisi.it/~domenico/research/fetouch/ And I think the Julius software framework also combines some aspects of VTK and haptic interaction: http://www.julius.caesar.de/home/home.html Also: http://virtual.uta.edu/CD/BIMANUAL%20HAPTICWORKSTATION%20FOR%20LAPAROSCOPIC% 20SURGERY%20SIMULATION.htm http://www.fz-juelich.de/vislab/virtual/svt/ This list is by no means complete, and there is probably a whole lot more information out there. Its a topic close to my research interests as well, so if anybody has been able to work haptics into the VTK pipeline (or vice versa!) I'd also love to hear about it :) Cheers, Bhautik ---------------------------------- Bhautik Joshi PhD Student UNSW/CSIRO (CTIP) Australia Tel: +61293724256 Mob: +61404032617 Email: bhautik.joshi(at)csiro.au ---------------------------------- From novalet at yahoo.com.cn Tue Apr 15 00:31:36 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Tue, 15 Apr 2003 12:31:36 +0800 (CST) Subject: [vtkusers] object of vtk in TCL In-Reply-To: <3E9A349B.2020200@cat.rpi.edu> Message-ID: <20030415043136.71729.qmail@web15202.mail.bjs.yahoo.com> Well, but whether there is a command which can let me know the vtk objects' name in tcl environment. Something like "info vtk"? --- Jeremy Winston ????> Chen Fu wrote: > > I find the objects created by the vtk are not a > > variable. [...] > > How can i get a description of object? > > Use its Print method. > > E.g., > > vtkImageViewer ren > ... > > ren Print > > > > I am a newbie in tcl. Hope somebody can lend me a > hand > > Tcl/Tk in Five Easy Lessons: > http://herzberg.ca.sandia.gov/TclCourse/ > > > > Another probleam is how to delete such a object? > > Use its Delete method. > > -Jeremy > > ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ??????CCTV-2??????????????????????? http://rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cctv_wireless_study From paul at opes.com.au Wed Apr 16 01:03:43 2003 From: paul at opes.com.au (Paul Tait) Date: Wed, 16 Apr 2003 13:03:43 +0800 Subject: [vtkusers] Re: dark printing and clipboard Message-ID: <009301c303d5$8dfcd3e0$0a0aa8c0@opes.com.au> Hi Maybe I can tempt you with more details :-) I am displaying 2 surfaces made up of triangles. Hence the top & bottom lut which use scalars attached to each surface. I'm using the vtlLightinghKit so my theory is that the surfaces have an "intrinsic" color which is changed (lightened) by the lighting kit to produce what I see on the screen. When I print only get those "intrinsic" colors. Thats why the 2D scale bar gets displayed ok..... I think So how do I get vtk to give me the post processed pixels for printing???? Hi VTK 4.0 I'm trying to get my MFC printing working I'm using pretty much the same code as in the examples and I've implemented clipboard copying but in both cases my plots come out dark I also print out a vtkScalarbarActor which displays perfectly, so I know i'm doing something wrong here are my lut's // create a top lookup table topLut = vtkLookupTable::New(); topLut->SetTableRange(0, 256); topLut->SetHueRange(0.7, 0); topLut->SetSaturationRange(1, 1); topLut->SetValueRange(0.8, 1); topLut->Build(); // create a bottom lookup table bottomLut = vtkLookupTable::New(); bottomLut->SetTableRange(0, 256); bottomLut->SetHueRange(0.7, 0); bottomLut->SetSaturationRange(.8, .8); bottomLut->SetValueRange(1, 1); bottomLut->Build(); // create lut for depth legend legendLut = vtkLookupTable::New(); legendLut->SetTableRange(0, 256); legendLut->SetHueRange(0.7, 0); legendLut->SetSaturationRange(1, 1); legendLut->SetValueRange(0.8, 1); legendLut->SetRange(-deepest / 100, -shallowest / 100); legendLut->Build(); legend->SetLookupTable(legendLut); legend->SetOrientationToVertical(); legend->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); legend->SetWidth(0.05); legend->SetHeight(0.99); legend->GetPositionCoordinate()->SetValue(0.01, 0.01); legend->SetTitle("depth x 100"); Props->AddItem(legend); From hqzhou at nju.edu.cn Tue Apr 15 01:43:55 2003 From: hqzhou at nju.edu.cn (Huiqun Zhou) Date: Tue, 15 Apr 2003 13:43:55 +0800 Subject: [vtkusers] Where is vtkProjectedPolyDataRayBounder class? Message-ID: <009701c30312$00ab5930$1a00a8c0@goofy> Dear vtkusers, Can anyone give me a pointer what is the replacement of vtkProjectedPolyDataRayBounder class? This class existed till version 3.2, but is gone since version 4.0. Huiqun Zhou -------------- next part -------------- An HTML attachment was scrubbed... URL: From prabhu at aero.iitm.ernet.in Tue Apr 15 04:56:43 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Tue, 15 Apr 2003 14:26:43 +0530 Subject: [vtkusers] About Book In-Reply-To: <3E9B0A03.F4C91D21@cat.rpi.edu> References: <3E9A68AC.1080206@science.uva.nl> <3E9ADC81.3494F0DC@cat.rpi.edu> <16026.63627.751498.5728@monster.linux.in> <3E9B0A03.F4C91D21@cat.rpi.edu> Message-ID: <16027.51531.279095.565107@monster.linux.in> >>>>> "JW" == Jeremy Winston writes: JW> Prabhu Ramachandran wrote: >> Jeremy Winston writes: > $65 is a few of >> hours of tutoring, or ~6 hrs of TAing, right? >> >> Wrong! $65 is more than half a *months* stipend where I come >> from!! So, while $65 is nothing for some folks its heck of a >> lot of money for some others. JW> All apologies. My unintentional U.S.-o-centricism is showing. No offence taken, I was just reminding folks that the value of money differs from place to place... JW> I guess the tutorial previously mentioned is the way to go, JW> then. JW> http://cherokee.ncsa.uiuc.edu/~semeraro/PPT/VTK_TUTORIAL/v3_document.htm Yes, its pretty nice. Thanks for the url, will be useful to point out to. This along with the IEEE paper by W. Schroeder et al. should hopefully give a new user a decent start. The IEE paper and some others are available from here: http://www.barre.nom.fr/vtk/links-doc.html cheers, prabhu From zxem at my169.com Tue Apr 15 06:28:59 2003 From: zxem at my169.com (zx) Date: Tue, 15 Apr 2003 10:28:59 +0000 Subject: [vtkusers] Thank! and Question about visualization Message-ID: Dear all, Thank you very much for providing all the useful information of vtk to me. Does anyone also know some good papers or resources about visualization? I have read some textbook about 3D Computer Graphics, but still not clear about the relation beteen Computer Graphics and Visualization. Regards! Xin Zhao -------------- next part -------------- An HTML attachment was scrubbed... URL: From affable at hd2.dot.net.in Tue Apr 15 04:39:43 2003 From: affable at hd2.dot.net.in (cspl) Date: Tue, 15 Apr 2003 14:09:43 +0530 Subject: [vtkusers] Mapping ROI on Render window to the corresponding Volume data after Volume rendering Message-ID: <00aa01c30333$6234f8c0$01000001@macinfo.net> Hi ! After rendering the volume using a raycast function I would like to draw ROI on the rendered Volume and get the Volume data pertaining to the ROI. I understand that the render window displays the Volume Data as a 2D image with a 3D effect. When I draw a ROI on the RenderWindow, I am able to get that 2D image in the ROI from the renderwindow and not the corresponding Volume data. Can anyone help us in identifying a class / function which can map the ROI drawn on the renderwindow to the corresponding Volume data. I would like to delete the part selected by the ROI / save it as a different Volume. Thanks for help. Regards, Sunanda -------------- next part -------------- An HTML attachment was scrubbed... URL: From malcolm at geovision.co.za Tue Apr 15 06:34:18 2003 From: malcolm at geovision.co.za (Malcolm Drummond) Date: Tue, 15 Apr 2003 12:34:18 +0200 Subject: [vtkusers] directly adding elements to unstructured grids... extension to mo re than one References: <4C7EFB6E2A295648AFE702CA96CD482F9593DB@wmns1.duratekinc.com> Message-ID: <002201c3033a$9f8e3770$adf4fea9@bart> directly adding elements to unstructured grids... extension to more than oneHi Kyle Here's a TCL script that combines many wedges into one UG dataset - it could be more efficient but at least it's a starting point. Hope this helps Malcolm ----- Original Message ----- From: Roberson, Kyle To: Vtk-Mailing-List (E-mail) Sent: Monday, April 14, 2003 6:20 PM Subject: [vtkusers] directly adding elements to unstructured grids... extension to mo re than one I'm trying to make unstructured grids out of various ABAQUS elements. I can successfully make a picture of the model by making an unstructured grid for EACH element and turning it into an independent actor. I would like to put several elements into each unstructured grid and turn that into an actor to make my subsequent manipulations easier to handle. However, I havent figured out how to do that. When I add more than one to the unstructured grid, no graphics come out the other end. Here's what I'm doing now (in Python). Only two types of elements are in to save space. Cheers, Kyle # Create the usual rendering stuff. ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) renWin.SetSize(1280, 1024) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) ren.SetBackground(.1, .2, .4) # Use the brute-force method to make an actor for each thing for k,v in elem.items() : if v[0] == "S3R" : thingPoints = vtk.vtkPoints() thingPoints.SetNumberOfPoints(3) thingPoints.InsertPoint(0, node[v[2]][0], node[v[2]][1], node[v[2]][2]) thingPoints.InsertPoint(1, node[v[3]][0], node[v[3]][1], node[v[3]][2]) thingPoints.InsertPoint(2, node[v[4]][0], node[v[4]][1], node[v[4]][2]) aThing = vtk.vtkTriangle() aThing.GetPointIds().SetId(0, 0) aThing.GetPointIds().SetId(1, 1) aThing.GetPointIds().SetId(2, 2) aThingGrid = vtk.vtkUnstructuredGrid() aThingGrid.Allocate(1, 1) aThingGrid.InsertNextCell(aThing.GetCellType(),\ aThing.GetPointIds()) aThingGrid.SetPoints(thingPoints) aThingMapper = vtk.vtkDataSetMapper() aThingMapper.SetInput(aThingGrid) aThingActor = vtk.vtkActor() aThingActor.SetMapper(aThingMapper) aThingActor.GetProperty().SetDiffuseColor(1, 1, 0) # aThingActor.GetProperty().SetOpacity(0.15) aThingActor.GetProperty().SetRepresentationToWireframe() ren.AddActor(aThingActor) elif v[0] == "S4R" : thingPoints = vtk.vtkPoints() thingPoints.SetNumberOfPoints(4) thingPoints.InsertPoint(0, node[v[2]][0], node[v[2]][1], node[v[2]][2]) thingPoints.InsertPoint(1, node[v[3]][0], node[v[3]][1], node[v[3]][2]) thingPoints.InsertPoint(2, node[v[4]][0], node[v[4]][1], node[v[4]][2]) thingPoints.InsertPoint(3, node[v[5]][0], node[v[5]][1], node[v[5]][2]) aThing = vtk.vtkQuad() aThing.GetPointIds().SetId(0, 0) aThing.GetPointIds().SetId(1, 1) aThing.GetPointIds().SetId(2, 2) aThing.GetPointIds().SetId(3, 3) aThingGrid = vtk.vtkUnstructuredGrid() aThingGrid.Allocate(1, 1) aThingGrid.InsertNextCell(aThing.GetCellType(),\ aThing.GetPointIds()) aThingGrid.SetPoints(thingPoints) aThingMapper = vtk.vtkDataSetMapper() aThingMapper.SetInput(aThingGrid) aThingActor = vtk.vtkActor() aThingActor.SetMapper(aThingMapper) aThingActor.GetProperty().SetDiffuseColor(1, 1, 0) # aThingActor.GetProperty().SetOpacity(0.15) aThingActor.GetProperty().SetRepresentationToWireframe() ren.AddActor(aThingActor) # ... several more for different elements elided ... # Render the scene and start interaction. iren.Initialize() renWin.Render() iren.Start() -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: wedges1.tcl Type: application/octet-stream Size: 1345 bytes Desc: not available URL: From ramakrishna.prakash at quest-global.com Tue Apr 15 06:43:18 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Tue, 15 Apr 2003 16:13:18 +0530 Subject: [vtkusers] Java Problem In-Reply-To: <3E980267.7010902@cdnorthamerica.com> Message-ID: <005801c3033b$d43eb8e0$de0ba8c0@qtwblr01.questglobal.com> Jeff, It works. Great show. Can you please tell me where all it is mandatory to put a Lock/Unlock block so that I can get over this problem permanently. Thanks Shyam -----Original Message----- From: Jeff Lee [mailto:jeff at cdnorthamerica.com] Sent: Saturday, April 12, 2003 5:41 PM To: R K Shyamprakash Subject: Re: [vtkusers] Java Problem Hi Shyam, Could you try to put a Lock()/UnLock() around wherever you call pick in NewDemoCanvas.java. Picking does a MakeCurrent which accesses the drawing surface - this is one of those methods which needs to be locked. Let me know if this helps, -Jeff R K Shyamprakash wrote: >Jeff, > No, TestVTKCanvas works fine for me. Even in my example the behavior is >highly unpredictable as some time it works perfectly fine. I am attaching a >zipped file. > >Thanks >Shyam > > >-----Original Message----- >From: Jeff Lee [mailto:jeff at cdnorthamerica.com] >Sent: Saturday, April 12, 2003 4:57 PM >To: R K Shyamprakash >Subject: Re: [vtkusers] Java Problem > > >can you send me some code which demonstrates the problem? does >TestVTKCanvas give you the same problems? >-Jeff > >R K Shyamprakash wrote: > > > >>Hello Jeff, >> >> nvoglnt.dll is version 4.0(NVIDIA display driver). I am not sure if >> >> >it > > >>is the latest available, i will cross check with that. This is what I do. >>When I click on the actor, I pick the cell, retrieve the data array of that >>cell and set different value to the data array by calling >>vtkFloatArray.SetValue(int index,double value); >>It works fine on some actors but fails on some. I don't get exception every >>time at >>iren.TimerEvent(). Most of the time it happens when vtkPanel calls >>vtkRenderWindow.Render() saying the canvas is locked. below is the most >>common error message. NewDemoCanvas(which you will find in the error >>message) is my class which extends vtkCanvas. I tried to use vtkPanel >>instead of vtkCanvas but without success. >> >>An unexpected exception has been detected in native code outside the VM. >>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69592AF0 >>Function=[Unknown.] >>Library=C:\WINNT\System32\nvoglnt.dll >> >>NOTE: We are unable to locate the function name symbol for the error >> just occurred. Please refer to release documentation for possible >> reason and solutions. >> >> >>Current Java thread: >> at vtk.vtkRenderWindow.Render_6(Native Method) >> at vtk.vtkRenderWindow.Render(vtkRenderWindow.java:36) >> at vtk.vtkPanel.Render(vtkPanel.java:141) >> - locked <02C53E50> (a NewDemoCanvas) >> at vtk.vtkPanel.mouseDragged(vtkPanel.java:332) >> at java.awt.Component.processMouseMotionEvent(Component.java:5141) >> at java.awt.Component.processEvent(Component.java:4894) >> at java.awt.Container.processEvent(Container.java:1566) >> at java.awt.Component.dispatchEventImpl(Component.java:3598) >> at java.awt.Container.dispatchEventImpl(Container.java:1623) >> at java.awt.Component.dispatchEvent(Component.java:3439) >> at java.awt.EventQueue.dispatchEvent(EventQueue.java:450) >> at >>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread. j >> >> >a > > >>va:197) >> at >>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.ja v >> >> >a > > >>:150) >> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) >> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) >> at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) >> >>Dynamic libraries: >>0x00400000 - 0x00406000 d:\apps\jdk1.4\bin\javaw.exe >>0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll >>0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll >>0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll >>0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll >>0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll >>0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll >>0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll >>0x10000000 - 0x10018000 C:\WINNT\System32\NVDESK32.DLL >>0x6D330000 - 0x6D45C000 d:\apps\jdk1.4\jre\bin\client\jvm.dll >>0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll >>0x6D1D0000 - 0x6D1D7000 d:\apps\jdk1.4\jre\bin\hpi.dll >>0x6D300000 - 0x6D30D000 d:\apps\jdk1.4\jre\bin\verify.dll >>0x6D210000 - 0x6D229000 d:\apps\jdk1.4\jre\bin\java.dll >>0x6D320000 - 0x6D32D000 d:\apps\jdk1.4\jre\bin\zip.dll >>0x6D000000 - 0x6D0FA000 D:\Apps\jdk1.4\jre\bin\awt.dll >>0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV >>0x76AB0000 - 0x76AB5000 C:\WINNT\System32\IMM32.dll >>0x77B20000 - 0x77BD7000 C:\WINNT\system32\ole32.dll >>0x0B0A0000 - 0x0B138000 D:\Apps\vtk42\bin\vtkCommonJava.dll >>0x0B140000 - 0x0B30E000 D:\Apps\vtk42\bin\vtkCommon.dll >>0x780A0000 - 0x780B2000 C:\WINNT\System32\MSVCIRT.dll >>0x780C0000 - 0x78121000 C:\WINNT\System32\MSVCP60.dll >>0x0B310000 - 0x0B332000 D:\Apps\vtk42\bin\vtkFilteringJava.dll >>0x0B340000 - 0x0B3B1000 D:\Apps\vtk42\bin\vtkFiltering.dll >>0x0B3C0000 - 0x0B3FF000 D:\Apps\vtk42\bin\vtkIOJava.dll >>0x0B400000 - 0x0B5DD000 D:\Apps\vtk42\bin\vtkIO.dll >>0x0B5E0000 - 0x0B602000 D:\Apps\vtk42\bin\vtkpng.dll >>0x0B610000 - 0x0B623000 D:\Apps\vtk42\bin\vtkzlib.dll >>0x0B630000 - 0x0B652000 D:\Apps\vtk42\bin\vtkjpeg.dll >>0x0B660000 - 0x0B6AE000 D:\Apps\vtk42\bin\vtktiff.dll >>0x0B6B0000 - 0x0B6D3000 D:\Apps\vtk42\bin\vtkexpat.dll >>0x0B6E0000 - 0x0B72A000 D:\Apps\vtk42\bin\vtkImagingJava.dll >>0x0B730000 - 0x0B990000 D:\Apps\vtk42\bin\vtkImaging.dll >>0x0B990000 - 0x0BA1F000 D:\Apps\vtk42\bin\vtkGraphicsJava.dll >>0x0BA20000 - 0x0BC9B000 D:\Apps\vtk42\bin\vtkGraphics.dll >>0x0BCA0000 - 0x0BD11000 D:\Apps\vtk42\bin\vtkRenderingJava.dll >>0x0BD20000 - 0x0BF5E000 D:\Apps\vtk42\bin\vtkRendering.dll >>0x755B0000 - 0x75678000 C:\WINNT\System32\OPENGL32.dll >>0x76C80000 - 0x76CA2000 C:\WINNT\System32\GLU32.dll >>0x77160000 - 0x77167000 C:\WINNT\System32\DCIMAN32.dll >>0x0BF60000 - 0x0BF71000 D:\Apps\vtk42\bin\vtkftgl.dll >>0x0BF80000 - 0x0BFCD000 D:\Apps\vtk42\bin\vtkfreetype.dll >>0x6D230000 - 0x6D235000 D:\Apps\jdk1.4\jre\bin\jawt.dll >>0x0DFA0000 - 0x0DFE6000 D:\Apps\vtk42\bin\vtkHybridJava.dll >>0x0DFF0000 - 0x0E15F000 D:\Apps\vtk42\bin\vtkHybrid.dll >>0x0E160000 - 0x0E17F000 D:\Apps\vtk42\bin\vtkParallelJava.dll >>0x0E180000 - 0x0E20F000 D:\Apps\vtk42\bin\vtkParallel.dll >>0x776D0000 - 0x776D8000 C:\WINNT\system32\WSOCK32.dll >>0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll >>0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll >>0x6D180000 - 0x6D1D0000 D:\Apps\jdk1.4\jre\bin\fontmanager.dll >>0x77130000 - 0x77156000 C:\WINNT\System32\ddraw.dll >>0x69500000 - 0x6968A000 C:\WINNT\System32\nvoglnt.dll >>0x71300000 - 0x71306000 C:\WINNT\system32\MSIDLE.DLL >>0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll >>0x71DC0000 - 0x71DCA000 C:\WINNT\System32\PSAPI.DLL >> >>Local Time = Sat Apr 12 16:48:06 2003 >>Elapsed Time = 12 >># >># The exception above was detected in native code outside the VM >># >># Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode) >># >># An error report file has been saved as hs_err_pid159.log. >># Please refer to the file for further information. >># >> >>Thanks >>Shyam >> >>-----Original Message----- >>From: Jeff Lee [mailto:jeff at cdnorthamerica.com] >>Sent: Saturday, April 12, 2003 4:08 PM >>To: R K Shyamprakash >>Cc: Vtkusers (E-mail) >>Subject: Re: [vtkusers] Java Problem >> >> >>Is your nvoglnt.dll the latest/greatest? Perhaps upgrading opengl might >>help? I don't think any extra mutex locking will work here. Does the >>straight vtkPanel cause the same exception anywhere? If you disable the >>code inside the DelayAction to not call iren.TimerEvent(), do you get >>the same problems? I don't have an nt4.0 box here, so I can't really test. >>-Jeff >> >>R K Shyamprakash wrote: >> >> >> >> >> >>>Hi, >>> Thanks for the reply. I am using Windows NT4.0. If there is no fix >>>for this problem in Windows NT, then this is of great concern to me as the >>>application I am developing has to run all windows and Unix platforms. Is >>>there any way I can come over this problem? Can somebody tell me the best >>>way to use the vtkMutexLock. A small code snippet will be of great help. >>> >>>Thanks >>>Shyam >>> >>>-----Original Message----- >>>From: Jeff Lee [mailto:jeff at cdnorthamerica.com] >>>Sent: Friday, April 11, 2003 7:52 PM >>>To: R K Shyamprakash >>>Subject: Re: [vtkusers] Java Problem >>> >>> >>>Hi, >>>I looked at that line in vtkCanvas and all it is doing is calling the >>>interactor's timer event. Are you using winnt4.0? I have heard of many >>>problems on nt4.0 with java (see archives), however this works fine on >>>later windows(win98, win2k, winxp). I have heard of no other fixes >>>except to upgrade your os. You could also try upgrading your ogl libs. >>>-Jeff >>> >>>R K Shyamprakash wrote: >>> >>> >>> >>> >>> >>> >>> >>>>Hello, >>>> I am using vtk 4.2 with JDK 1.4 in Win NT environment. Often my >>>>application crashes with following error eventhough. I use proper mutex >>>>locking. As answered in mailing list earlier, I never use >>>>vtkRenderWindow.Render() directly, but still the problem persists. Can >>>> >>>> >>>> >>>> >>some >> >> >> >> >>>>body help. >>>> >>>>An unexpected exception has been detected in native code outside the VM. >>>>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69592AF0 >>>>Function=[Unknown.] >>>>Library=C:\WINNT\System32\nvoglnt.dll >>>> >>>>NOTE: We are unable to locate the function name symbol for the error >>>> just occurred. Please refer to release documentation for possible >>>> reason and solutions. >>>> >>>> >>>>Current Java thread: >>>> at vtk.vtkGenericRenderWindowInteractor.TimerEvent_13(Native Method) >>>> at >>>>vtk.vtkGenericRenderWindowInteractor.TimerEvent(C:/martink/vtk42/vtkdist / >>>> >>>> >j > > >>>> >>>> >>a >> >> >> >> >>>> >>>> >>>v >>> >>> >>> >>> >>> >>> >>>>a/vtk/vtkGenericRenderWindowInteractor.java:64) >>>> at vtk.vtkCanvas$DelayAction.actionPerformed(vtkCanvas.java:250) >>>> at javax.swing.Timer.fireActionPerformed(Timer.java:271) >>>> at javax.swing.Timer$DoPostEvent.run(Timer.java:201) >>>> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) >>>> at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) >>>> at >>>>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea d >>>> >>>> >. > > >>>> >>>> >>j >> >> >> >> >>>> >>>> >>>a >>> >>> >>> >>> >>> >>> >>>>va:197) >>>> at >>>>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread. j >>>> >>>> >a > > >>>> >>>> >>v >> >> >> >> >>>> >>>> >>>a >>> >>> >>> >>> >>> >>> >>>>:150) >>>> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) >>>> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) >>>> at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) >>>> >>>>Dynamic libraries: >>>>0x00400000 - 0x00406000 d:\apps\jdk1.4\bin\javaw.exe >>>>0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll >>>>0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll >>>>0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll >>>>0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll >>>>0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll >>>>0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll >>>>0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll >>>>0x10000000 - 0x10018000 C:\WINNT\System32\NVDESK32.DLL >>>>0x6D330000 - 0x6D45C000 d:\apps\jdk1.4\jre\bin\client\jvm.dll >>>>0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll >>>>0x6D1D0000 - 0x6D1D7000 d:\apps\jdk1.4\jre\bin\hpi.dll >>>>0x6D300000 - 0x6D30D000 d:\apps\jdk1.4\jre\bin\verify.dll >>>>0x6D210000 - 0x6D229000 d:\apps\jdk1.4\jre\bin\java.dll >>>>0x6D320000 - 0x6D32D000 d:\apps\jdk1.4\jre\bin\zip.dll >>>>0x6D000000 - 0x6D0FA000 D:\Apps\jdk1.4\jre\bin\awt.dll >>>>0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV >>>>0x76AB0000 - 0x76AB5000 C:\WINNT\System32\IMM32.dll >>>>0x77B20000 - 0x77BD7000 C:\WINNT\system32\ole32.dll >>>>0x0B0A0000 - 0x0B138000 D:\Apps\vtk42\bin\vtkCommonJava.dll >>>>0x0B140000 - 0x0B30E000 D:\Apps\vtk42\bin\vtkCommon.dll >>>>0x780A0000 - 0x780B2000 C:\WINNT\System32\MSVCIRT.dll >>>>0x780C0000 - 0x78121000 C:\WINNT\System32\MSVCP60.dll >>>>0x0B310000 - 0x0B332000 D:\Apps\vtk42\bin\vtkFilteringJava.dll >>>>0x0B340000 - 0x0B3B1000 D:\Apps\vtk42\bin\vtkFiltering.dll >>>>0x0B3C0000 - 0x0B3FF000 D:\Apps\vtk42\bin\vtkIOJava.dll >>>>0x0B400000 - 0x0B5DD000 D:\Apps\vtk42\bin\vtkIO.dll >>>>0x0B5E0000 - 0x0B602000 D:\Apps\vtk42\bin\vtkpng.dll >>>>0x0B610000 - 0x0B623000 D:\Apps\vtk42\bin\vtkzlib.dll >>>>0x0B630000 - 0x0B652000 D:\Apps\vtk42\bin\vtkjpeg.dll >>>>0x0B660000 - 0x0B6AE000 D:\Apps\vtk42\bin\vtktiff.dll >>>>0x0B6B0000 - 0x0B6D3000 D:\Apps\vtk42\bin\vtkexpat.dll >>>>0x0B6E0000 - 0x0B72A000 D:\Apps\vtk42\bin\vtkImagingJava.dll >>>>0x0B730000 - 0x0B990000 D:\Apps\vtk42\bin\vtkImaging.dll >>>>0x0B990000 - 0x0BA1F000 D:\Apps\vtk42\bin\vtkGraphicsJava.dll >>>>0x0BA20000 - 0x0BC9B000 D:\Apps\vtk42\bin\vtkGraphics.dll >>>>0x0BCA0000 - 0x0BD11000 D:\Apps\vtk42\bin\vtkRenderingJava.dll >>>>0x0BD20000 - 0x0BF5E000 D:\Apps\vtk42\bin\vtkRendering.dll >>>>0x755B0000 - 0x75678000 C:\WINNT\System32\OPENGL32.dll >>>>0x76C80000 - 0x76CA2000 C:\WINNT\System32\GLU32.dll >>>>0x77160000 - 0x77167000 C:\WINNT\System32\DCIMAN32.dll >>>>0x0BF60000 - 0x0BF71000 D:\Apps\vtk42\bin\vtkftgl.dll >>>>0x0BF80000 - 0x0BFCD000 D:\Apps\vtk42\bin\vtkfreetype.dll >>>>0x6D230000 - 0x6D235000 D:\Apps\jdk1.4\jre\bin\jawt.dll >>>>0x0DFA0000 - 0x0DFE6000 D:\Apps\vtk42\bin\vtkHybridJava.dll >>>>0x0DFF0000 - 0x0E15F000 D:\Apps\vtk42\bin\vtkHybrid.dll >>>>0x0E160000 - 0x0E17F000 D:\Apps\vtk42\bin\vtkParallelJava.dll >>>>0x0E180000 - 0x0E20F000 D:\Apps\vtk42\bin\vtkParallel.dll >>>>0x776D0000 - 0x776D8000 C:\WINNT\system32\WSOCK32.dll >>>>0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll >>>>0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll >>>>0x6D180000 - 0x6D1D0000 D:\Apps\jdk1.4\jre\bin\fontmanager.dll >>>>0x77130000 - 0x77156000 C:\WINNT\System32\ddraw.dll >>>>0x69500000 - 0x6968A000 C:\WINNT\System32\nvoglnt.dll >>>>0x71300000 - 0x71306000 C:\WINNT\system32\MSIDLE.DLL >>>>0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll >>>>0x71DC0000 - 0x71DCA000 C:\WINNT\System32\PSAPI.DLL >>>> >>>>Local Time = Fri Apr 11 19:02:44 2003 >>>>Elapsed Time = 6 >>>># >>>># The exception above was detected in native code outside the VM >>>># >>>># Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode) >>>># >>>># An error report file has been saved as hs_err_pid283.log. >>>># Please refer to the file for further information. >>>># >>>> >>>> >>>>Thanks >>>>Shyam >>>> >>>>_______________________________________________ >>>>This is the private VTK discussion list. >>>>Please keep messages on-topic. Check the FAQ at: >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >>> >>> >>> >>> >>>>Follow this link to subscribe/unsubscribe: >>>>http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>_______________________________________________ >>>This is the private VTK discussion list. >>>Please keep messages on-topic. Check the FAQ at: >>> >>> >>> >>> >> >> >> >> >> >>>Follow this link to subscribe/unsubscribe: >>>http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> >> >> > >-- >Jeff Lee >Software Engineer >Computational Dynamics North America Ltd >21 Lafayette Street, Suite 230 >Lebanon NH 03766 USA >fax: 603 643 9994 >phone: 603 643 9993 x109 >http://www.cd-adapco.com > > -- Jeff Lee Software Engineer Computational Dynamics North America Ltd 21 Lafayette Street, Suite 230 Lebanon NH 03766 USA fax: 603 643 9994 phone: 603 643 9993 x109 http://www.cd-adapco.com From asiram00 at hotmail.com Tue Apr 15 08:42:03 2003 From: asiram00 at hotmail.com (marisa aurelio) Date: Tue, 15 Apr 2003 12:42:03 +0000 Subject: [vtkusers] read raw image Message-ID: Hi vtkUsers, I have a doubt about reading raw images. I know that raw images can be read on IrfanView by they ask for the "File Header Size" and I don't know how to get it!!! Can anybody help me??? Thanks in advance!!! Marisa _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From asiram00 at hotmail.com Tue Apr 15 08:42:31 2003 From: asiram00 at hotmail.com (marisa aurelio) Date: Tue, 15 Apr 2003 12:42:31 +0000 Subject: [vtkusers] read raw image Message-ID: Hi vtkUsers, I have a doubt about reading raw images. I know that raw images can be read on IrfanView by they ask for the "File Header Size" and I don't know how to get it!!! Can anybody help me??? Thanks in advance!!! Marisa _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail From volpecr at crd.ge.com Tue Apr 15 09:23:19 2003 From: volpecr at crd.ge.com (Volpe, Christopher R (Research)) Date: Tue, 15 Apr 2003 09:23:19 -0400 Subject: [vtkusers] [vtkusers]vtk using haptics Message-ID: As part of our internal augmentation of vtk called "gevtk", we have a haptic application based on a vtk class that wraps a very small portion of the GHOST library. In fact, it's just a vtk wrapper around the gstForceFeedback class. In the callback we call another class that implements all the haptic collision and reaction logic. We haven't wrapped any other portions of the GHOST library because we model our haptic objects as volumes, not polydata, for performance reasons. Chris Dr. Christopher R. Volpe, Ph.D. Computer Scientist Visualization and Computer Vision Lab Imaging Technologies GE Global Research Center Bldg KW, Room C215 P.O. Box 8, Schenectady, NY 12301 (518) 387-7766, Dial Comm: 8*833-7766, Fax: (518) 387-6981 e-mail: volpecr at crd.ge.com web: http://www.crd.ge.com/~volpecr > -----Original Message----- > From: Bhautik.Joshi at csiro.au [mailto:Bhautik.Joshi at csiro.au] > Sent: Monday, April 14, 2003 11:14 PM > To: limy at rpi.edu; vtkusers at public.kitware.com > Subject: RE: [vtkusers] [vtkusers]vtk using haptics > > > > I'm a newone in VTK. I'd like to use 'vkt' for haptics rendering. > > Specially, I'm using PHANToM (Sensable Technologies., Inc) now. > > Does anybody include the GHOST SDK in vtk rendering to interface > > haptics? > > At first, I just want to try to deform simple object using vtk. > > I don't have any idea how I can include the haptics(GHOST). > > This list is what I put together after a quick bit of > googling (isn't that a > wonderful verb?): > > There is a posting about this in the vtkusers archives dating back to > October 2000: > http://public.kitware.com/pipermail/vtkusers/2000-October/004596.html > > And you might want to get in touch with these people at the > University of > Siena, with software which loads VTK data for haptic > interaction (though I'm > not sure if VTK itself is used for rendering): > http://www.dii.unisi.it/~domenico/research/fetouch/ > > And I think the Julius software framework also combines some > aspects of VTK > and haptic interaction: > http://www.julius.caesar.de/home/home.html > > Also: > http://virtual.uta.edu/CD/BIMANUAL%20HAPTICWORKSTATION%20FOR%2 0LAPAROSCOPIC% 20SURGERY%20SIMULATION.htm http://www.fz-juelich.de/vislab/virtual/svt/ This list is by no means complete, and there is probably a whole lot more information out there. Its a topic close to my research interests as well, so if anybody has been able to work haptics into the VTK pipeline (or vice versa!) I'd also love to hear about it :) Cheers, Bhautik ---------------------------------- Bhautik Joshi PhD Student UNSW/CSIRO (CTIP) Australia Tel: +61293724256 Mob: +61404032617 Email: bhautik.joshi(at)csiro.au ---------------------------------- _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From I.deBoer at polytec.de Tue Apr 15 09:25:12 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Tue, 15 Apr 2003 15:25:12 +0200 Subject: [vtkusers] Transparency Question Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD93C19BE@02polywbr.waldbronn.polytec.de> Hi, I have a question about transparency. I have a texture which is color coded with a scalar. I set the transparency with the actor, like m_pvtkActorData->GetProperty()->SetOpacity(m_fTransparency); This sets the transparency for the texture aswell as for the color scalars. How can I make the transparency of the texture 100% and only the colors transparent to let's say 50% ? here is a code snip: m_pvtkPolydata->GetPointData()->SetTCoords(tCoords); m_pvtkPolydata->SetPoints(m_pvtkPoints); m_pvtkPolydata->SetPolys(polygons); m_pvtkPolydata->GetPointData()->SetScalars(scalars); m_pvtkPolyDataMapper->SetInput(m_pvtkPolydata); m_pvtkPolyDataMapper->SetScalarRange(0,m_lPoints); m_pvtkActorData->SetMapper(m_pvtkPolyDataMapper); m_pvtkActorData->SetTexture(m_pvtkTexture); m_pvtkActorData->GetProperty()->SetOpacity(m_fTransparency); greets Ingo From donna at v1.wustl.edu Tue Apr 15 09:53:14 2003 From: donna at v1.wustl.edu (Donna) Date: Tue, 15 Apr 2003 08:53:14 -0500 Subject: [vtkusers] vtkTkRenderWidget:Linux:Python and VTK threaded:each render spawns zombie References: <3E6F6860.69732A01@v1.wustl.edu> <16024.11518.928379.5120@gargle.gargle.HOWL> Message-ID: <3E9C0ECA.5070802@v1.wustl.edu> Hi again Brent, As I explained here, I don't want users to have to build my application: http://public.kitware.com/pipermail/vtkusers/2003-March/016428.html I know we'll need to upgrade our build host at some point, but right now building on this host produces binaries that are more interoperable than those built with later Linux versions. After posting the message below, I rebuilt VTK and python without threads, and this problem goes away (without any apparent performance hit). My no-threads app runs fine on Linux RedHat 8.0 and 7.1 SMP. I found the behavior (each render spawning a process) strange enough to report it. Let's hope it is unique to my build environment. Donna Brent Goodrick wrote: > Hi Donna, > > You are building on RH 6.1 and executing on RH 8.0 which is bad news. > GLIBC has changed, name mangling in the compiler has changed, > etc. etc. I would suggest compiling under the same system > (compiler+libraries+OSrevision) in which you execute on. > > If you are bound and determined to do it, you may try the > compatibility libraries that Red Hat has shipped in the past (RH 7.x > anyhow). I expect that they would discontinue those libraries at some > point, so that would not be a good long term strategy. > > Brent Goodrick > PT Software > > >>>>>>"donna" == donna writes: >>>>> > > donna> Build environment: > donna> Linux RedHat 6.1 (Cartman) 2.2.12-20 (uni-processor) > donna> gcc 3.2.2 > donna> Python 2.1.3 > donna> VTK cvs co -D "10/5/2002" > donna> both python and vtk configured with threads > > donna> When I run the following simple python script on a dual processor host > donna> running Linux RedHat 8.0 (Psyche) 2.4.18-26.8.0smp, each render spawns a > donna> zombie python process: > > donna> http://pulvinar.wustl.edu/donna/SureFit/Linux/volview.py > > donna> (This script is a simplified version of > donna> http://public.kitware.com/cgi-bin/cvsweb.cgi/VTK/Examples/Medical/Python/Medical3.py; > donna> thanks to will and prabhu for making it available.) > > donna> Keypress 'i' or 'd' in the image widget (increment or decrement the > donna> slice displayed from VTK_DATA_ROOT + "/Data/headsq/quarter") triggers a > donna> vtkTkRenderWidget render. Running python in gdb, with several printf > donna> messages inserted into VTK/Common/vtkDataObject.cxx and > donna> VTK/Common/vtkImageData.cxx, produces this output: > > donna> *** DISPLAYING slice 30 > donna> ...vtkImageData::UpdateData ... > donna> ...vtkDataObject::UpdateData begin... > donna> ...propagate the UpdateData to the source... > ...Source-> UpdateData... > donna> ...vtkImageData::UpdateData ... > donna> ...vtkDataObject::UpdateData begin... > donna> ...vtkDataObject::UpdateData end... > donna> ...checking this->UpdateNumberOfPieces == 1 ... > donna> ...confirmed this->UpdateNumberOfPieces == 1 ... > donna> [New Thread 24580 (LWP 668)] > ...this-> UpdatePiece... > ...this-> UpdateNumberOfPieces... > ...this-> UpdateGhostLevel... > donna> ...vtkDataObject::UpdateData end... > donna> ...checking this->UpdateNumberOfPieces == 1 ... > donna> ...confirmed this->UpdateNumberOfPieces == 1 ... > > donna> The modified versions of vtkDataObject.cxx and vtkImageData.cxx are here > donna> -- just printf statements added to see where the thread is being > donna> spawned: > > donna> http://pulvinar.wustl.edu/donna/SureFit/Linux/vtkDataObject.cxx > donna> http://pulvinar.wustl.edu/donna/SureFit/Linux/vtkImageData.cxx > > donna> The thread is being spawned when vtkImageData::UpdateData returns to > donna> vtkDataObject::UpdateData, because this->UpdateNumberOfPieces == 1. > donna> There seems to be some recursion here. Can anyone help me understand > donna> why python is spawning a new thread here? These threads look like this > donna> in ps -efl output: > > donna> 044 Z donna 1590 1589 0 75 0 - 0 do_exi 10:59 pts/2 > donna> 00:00:00 [python ] > donna> 044 Z donna 1591 1589 0 80 0 - 0 do_exi 10:59 pts/2 > donna> 00:00:00 [python ] > donna> 044 Z donna 1592 1589 0 80 0 - 0 do_exi 10:59 pts/2 > donna> 00:00:00 [python ] > donna> 044 Z donna 1593 1589 0 76 0 - 0 do_exi 10:59 pts/2 > donna> 00:00:00 [python ] > > donna> They have caused crashes for one user, whose soft maxproc limit is > donna> 1024. My application has numerous render events, and in his case > donna> several threads are being spawned per render. When the number of > donna> zombies approaches 1000, my application crashes. This seems to happen > donna> despite increasing the maxproc limit. (Python seems to be crashing at > donna> the machine's soft limit, regardless of the user's environment.) > > donna> I can rebuild python and vtk without threads, and the user doesn't > donna> crash. But I'd like to understand why the renders are spawning these > donna> threads. Any ideas are appreciated. > > donna> Thanks, > > donna> Donna Hanlon > donna> _______________________________________________ > donna> This is the private VTK discussion list. > donna> Please keep messages on-topic. Check the FAQ at: > donna> Follow this link to subscribe/unsubscribe: > donna> http://public.kitware.com/mailman/listinfo/vtkusers > From nNunn at ausport.gov.au Tue Apr 15 10:54:12 2003 From: nNunn at ausport.gov.au (Nigel Nunn) Date: Wed, 16 Apr 2003 00:54:12 +1000 Subject: [vtkusers] Re: dark printing and clipboard Message-ID: <7AF3524792FFD511A17A0000F81E965E472DDC@ELMO> Hi Paul, I've also struck the problem of images rendering fine on-screen but losing their user-defined lighting when rendered off-screen. e.g. into the clipboard. One place damage may occur is here: void vtkOpenGLRenderer::DeviceRender(void) { this->RenderWindow->MakeCurrent(); this->ClearLights(); <--- clears all lights! this->UpdateCamera(); this->UpdateLightGeometry(); this->UpdateLights(); <--- not properly restored? glMatrixMode(GL_MODELVIEW); this->UpdateGeometry(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); } If no user-defined lights are active, then UpdateLights() adds a headlight and at least there is some light in the image. But (guessing here) if we have added a custom set of lights, then these are lost in the call to ClearLights(); but not restored in UpdateLights(). And since there is a "non-zero" number of lights, the default headlight is not added, and scene is dark. My (solution :-) when making movies, is to turn off light-kits or other user-defined lights, and adjust the scene to be visible with just the default headlight (which is better than nothing). If I get time, I plan to build a debug Vtk and trace this. Hope you can find a better fix! Nigel > I am displaying 2 surfaces made up of triangles. Hence the > top & bottom lut which use scalars attached to each surface. > I'm using the vtlLightinghKit so my theory is that the surfaces > have an "intrinsic" color which is changed (lightened) by the > lighting kit to produce what I see on the screen. When I print > only get those "intrinsic" colors. Thats why the 2D scale bar > gets displayed ok..... I think > > So how do I get vtk to give me the post processed pixels for > printing? > > Hi > > VTK 4.0 > > I'm trying to get my MFC printing working > > I'm using pretty much the same code as in the examples and > I've implemented clipboard copying but in both cases my plots > come out dark > > I also print out a vtkScalarbarActor which displays perfectly, > so I know i'm doing something wrong ********************************************************************** This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender. Keep up to date with what's happening in Australian sport. Visit http://www.ausport.gov.au ********************************************************************** From Mathieu.Malaterre at creatis.insa-lyon.fr Tue Apr 15 11:18:03 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Tue, 15 Apr 2003 17:18:03 +0200 Subject: [vtkusers] wxVTKRenderWindowInteractor class In-Reply-To: <3E9C0A4A.2080505@kitware.com> References: <3E8D4230.8010703@creatis.insa-lyon.fr> <3E8D8CC5.1070602@kitware.com> <3E9BD53F.3080108@creatis.insa-lyon.fr> <3E9C0A4A.2080505@kitware.com> Message-ID: <3E9C22AB.8040702@creatis.insa-lyon.fr> Hi all, I am pleased to release this archive. This is a complete rewrote of wxVTKRenderWindowInteractor but in real C++ code. This class is what I called a back-swig of wxVTKRenderWindow.py. It has -almost- the same look & feel as the python one. You'll find either a CMakeList.txt for building small examples toward VTK 4.x and in wxVTK/oldbin/ a Makefile to build against vtk 3.2. These small examples have been shamelessly taken from David Marshall's archive ;) This has only been tested on wxGTK 2.2.9, wxGTK 2.3.1, wxGTK 2.4.0 and wxGTK from cvs (only Linux for now). --------- The most important thing (which is currently not clear yet) is: http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?8:msn:35104:ofoclegabbpaiopbgagi To sum up the problem, since wxGTK 2.3.2 there is a problem that prevents wxVTKRenderWindow to work with VTK, that's why David Gobbi introduced WX_USE_X_CAPTURE to deal with it. As I wanted my wxVTKRenderWindow* to work the same way under MSW and GTK I tracked down what seems to me a bug. The hack describes on this URL allows to use wxGTK 2.4.0 just as wxGTK 2.3.2 (and earlier) without problem, but this is only a bad hack for now. BTW if any wxGTK guru could comment on that... Please take the time to test it on any plateforms and send me your suggestions/comments. mathieu -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ -------------- next part -------------- A non-text attachment was scrubbed... Name: wxVTK.tgz Type: application/x-tar Size: 13207 bytes Desc: not available URL: From c.p.botha at its.tudelft.nl Tue Apr 15 11:35:17 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 15 Apr 2003 17:35:17 +0200 Subject: [vtkusers] wxVTKRenderWindowInteractor class In-Reply-To: <3E9C22AB.8040702@creatis.insa-lyon.fr> References: <3E8D4230.8010703@creatis.insa-lyon.fr> <3E8D8CC5.1070602@kitware.com> <3E9BD53F.3080108@creatis.insa-lyon.fr> <3E9C0A4A.2080505@kitware.com> <3E9C22AB.8040702@creatis.insa-lyon.fr> Message-ID: <1050420916.29348.12.camel@dutidad> Hi Mathieu, On Tue, 2003-04-15 at 17:18, Mathieu Malaterre wrote: > The most important thing (which is currently not clear yet) is: > http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?8:msn:35104:ofoclegabbpaiopbgagi > > To sum up the problem, since wxGTK 2.3.2 there is a problem that > prevents wxVTKRenderWindow to work with VTK, that's why David Gobbi > introduced WX_USE_X_CAPTURE to deal with it. As I wanted my I would vote for disabling CaptureMouse() altogether or rethinking its use in the wxWindows + VTK hybrids. Even on systems where CaptureMouse works, it's easy to get the app into an unusable state by for instance programmatically focusing another window (calling Raise() or somesuch). This means that the previous window still has the mouse, but a new window has the focus and it's not possible to change this state of affairs with mouse interaction. It's almost like a mouse lockup. What's the opinion here of GUI experts with regards to windows capturing mouses during interaction? Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From prabhu at aero.iitm.ernet.in Tue Apr 15 12:17:08 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Tue, 15 Apr 2003 21:47:08 +0530 Subject: [vtkusers] Strange problem with Python In-Reply-To: <67348AAF0635D511866A00508BDF0CC805C0A248@fszhtv11.wpafb.af.mil> References: <67348AAF0635D511866A00508BDF0CC805C0A248@fszhtv11.wpafb.af.mil> Message-ID: <16028.12420.297485.775930@monster.linux.in> >>>>> "HS" == Harris Scott R Civ writes: HS> I get this error when my program starts: [snip] HS> 7, in ? from libvtkImagingPython import * ImportError: HS> /home/scott/VTK/bin/libvtkImagingPython.so: R_PPC_REL24 HS> relocation at 0x0d9a5d48 for symbol `utterworthHighPassPCc' HS> out of range Hmm, I also dont understand the error. Here are a few thoughts: 1. What happens if you try this on an interactive session? from libvtkImagingPython import * How about ldd on libvtkImagingPython.so? 2. Do you have different versions of the vtk libraries on your system? Or do you have many copies of the libraries, perhaps the linker is confused by some older copies. 3. Are you doing something funny with sys.path in your application? 4. Are you doing something funny with threads? A real shot in the dark! [snip] HS> I don't see the problem with the 4.2.2 relese. I've compiled HS> both 4.2.2 and the CVS version with identical options in HS> ccmake. I assume both crash? Perhaps the presence of both libs is causing the problem? Good luck! cheers, prabhu From sakumar79 at hotmail.com Tue Apr 15 12:42:10 2003 From: sakumar79 at hotmail.com (Arun Srinivasan) Date: Tue, 15 Apr 2003 11:42:10 -0500 Subject: [vtkusers] Problem linking program Message-ID: Hi, I am trying to compile a program that I wrote and while linking I get the following error messages: objects.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObjectBase::CollectRevisions(class std::basic_ostream > &)" (?CollectRevisions at vtkObjectBase@@MAEXAAV?$basic_o stream at DU?$char_traits at D@std@@@std@@@Z) objects.obj : error LNK2001: unresolved external symbol "public: virtual void __ thiscall vtkObjectBase::PrintTrailer(class std::basic_ostream > &,class vtkIndent)" (?PrintTrailer at vtkObjectBase@@UAEXAAV?$ba sic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z) objects.obj : error LNK2001: unresolved external symbol "public: virtual void __ thiscall vtkObjectBase::PrintHeader(class std::basic_ostream > &,class vtkIndent)" (?PrintHeader at vtkObjectBase@@UAEXAAV?$basi c_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z) objects.obj : error LNK2001: unresolved external symbol "public: virtual void __ thiscall vtkObjectBase::PrintSelf(class std::basic_ostream > &,class vtkIndent)" (?PrintSelf at vtkObjectBase@@UAEXAAV?$basic_os tream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z) vtkFile.exe : fatal error LNK1120: 4 unresolved externals I cannot understand what the error is... I have made sure that all the .lib files are in the include list and I even tried adding vtkObjectBase.obj to the list of objects to be linked. Any idea what the problem might be? Thanks in advance, Arun K Srinivasan _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From lesoto at utalca.cl Tue Apr 15 15:42:18 2003 From: lesoto at utalca.cl (Leonardo Soto) Date: Tue, 15 Apr 2003 12:42:18 -0700 Subject: [vtkusers] problems using vtkBorlandRenderWindow Message-ID: <006301c30387$200da7e0$1dcb5392@utalca.cl> Hi vtkUsers, I've been using the vtkBorlandRenderWindow component for C++ Builder 6 and everything goes fine if I add no object to the renderer of the component, but if I do so then it crashes when I close the application. The exception is raised at: DummyCritSect.Lock(); // vtkPolyData::~vtkPolyData() If I destroy the component before the form is closed (on the OnFormClose event) then there is no exception but there are some resource leaks. There is something not properly handled in the component, as you can see the former exception happens even in the example given in the last vtk release: /Examples/GUI/Win32/vtkBorland/ProjectDemo/Form_Test.cpp What can I do to get it right? Is there anybody working in some vtk component for C++ Builder? I would like to work with somebody to make an easy to use robust component. Thanks, Leonardo From winston at cat.rpi.edu Tue Apr 15 13:39:33 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Tue, 15 Apr 2003 13:39:33 -0400 Subject: [vtkusers] read raw image References: Message-ID: <3E9C43D5.8060503@cat.rpi.edu> marisa aurelio wrote: > I have a doubt about reading raw images. > I know that raw images can be read on IrfanView by they ask for the > "File Header Size" and I don't know how to get it!!! You have to know the pixel width & height, w & h, of the image. If you know them, you can compute the header size: Header_size = File_size - w*h*bytes_per_pixel since by definition, the header comes at the head of the file, before the data. Bytes_per_pixel is usually 1 or 2. Unfortunately, it is also possible that there is a "trailer" of pad bytes, so this method is not foolproof. But its a place to start. HTH, -Jeremy From jiang at Telematik-Institut.de Tue Apr 15 14:20:16 2003 From: jiang at Telematik-Institut.de (Chunyan Jiang) Date: Tue, 15 Apr 2003 20:20:16 +0200 Subject: [vtkusers] Strange problem--VTK in JBuilder Message-ID: Dear Vtk-users, I use vtk 4.2 with JBuilder8 in Win2000. I just try a simple example for test. It is Cone.java. The application can not run. When I debug it, I find that it will stop at the first sentence: vtkConeSource cone = new vtkConeSource(); The error message is as following: java.lang.UnsatisfiedLinkError: VTKInit at vtk.vtkConeSource.VTKInit(Native Method) at vtk.vtkObject.(C:/martink/vtk42/vtkdist/java/vtk/vtkObject.java:98) at vtk.vtkProcessObject.(C:/martink/vtk42/vtkdist/java/vtk/vtkProcessObje ct.java:86) at vtk.vtkSource.(C:/martink/vtk42/vtkdist/java/vtk/vtkSource.java:86) at vtk.vtkPolyDataSource.(C:/martink/vtk42/vtkdist/java/vtk/vtkPolyDataSo urce.java:30) at vtk.vtkConeSource.(C:/martink/vtk42/vtkdist/java/vtk/vtkConeSource.jav a:114) at javavtk.Cone1.render(Cone1.java:35) at javavtk.Application1.(Application1.java:45) at javavtk.Application1.main(Application1.java:55) It is quite strange. I have not such path: C:/martink/vtk42 in my computer. And I set the configure libraries as C://Programme/vtk42/bin/vtk.jar. Could some one help me to solve this problem? Thank you very much!! Chunyan *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** From lisa.avila at kitware.com Tue Apr 15 15:10:47 2003 From: lisa.avila at kitware.com (Lisa Avila) Date: Tue, 15 Apr 2003 15:10:47 -0400 Subject: [vtkusers] Where is vtkProjectedPolyDataRayBounder class? In-Reply-To: <009701c30312$00ab5930$1a00a8c0@goofy> Message-ID: <5.2.0.9.0.20030415150801.03d12f18@pop.biz.rr.com> Hello, There is no replacement to this class - the functionality was removed in VTK 4.0. The ray cast mapper does support oblique clipping planes and complex cropping operations but no longer supports this specialized type of clipping. Lisa At 01:43 AM 4/15/2003, Huiqun Zhou wrote: >Dear vtkusers, > >Can anyone give me a pointer what is the replacement of >vtkProjectedPolyDataRayBounder >class? This class existed till version 3.2, but is gone since version 4.0. > >Huiqun Zhou -------------- next part -------------- An HTML attachment was scrubbed... URL: From mglistmail at totalise.co.uk Tue Apr 15 15:51:49 2003 From: mglistmail at totalise.co.uk (Martin Gardner) Date: Tue, 15 Apr 2003 20:51:49 +0100 Subject: [vtkusers] Populating Image Data Message-ID: <3E9C62D5.8030606@totalise.co.uk> Hi, Does anyone know how to populate a 3D vtkImageData object with slices from a vtkImageReslice? Trouble being that I want each slice to be performed using a different origin and normal so I cant just set the vtkImageReslice output dimensionality to 3. But I want to generate a volume containing all of these slices. I hope that is clear enough.. Cheers Martin From Yang at AGIUSA.COM Tue Apr 15 15:41:41 2003 From: Yang at AGIUSA.COM (Xianjin Yang) Date: Tue, 15 Apr 2003 14:41:41 -0500 Subject: [vtkusers] problems using vtkBorlandRenderWindow Message-ID: <6AC51773FA304E469DEE9569AF903E5B1686B8@mail.exchngsvr.agiusa.com> I am using vtk 4.2.1 and Borland C++ Builder 6 on WinXP Pro and have not run into the problem you mentioned. I just tried the example under /Examples/GUI/Win32/vtkBorland/ProjectDemo/ and it worked fine on my PC. I'd love to see more and better VTK/BCB components, and would like to contribute if possible. Yang -----Original Message----- From: Leonardo Soto [mailto:lesoto at utalca.cl] Sent: Tuesday, April 15, 2003 2:42 PM To: vtkusers at public.kitware.com Cc: j.biddiscombe at rl.ac.uk Subject: [vtkusers] problems using vtkBorlandRenderWindow Hi vtkUsers, I've been using the vtkBorlandRenderWindow component for C++ Builder 6 and everything goes fine if I add no object to the renderer of the component, but if I do so then it crashes when I close the application. The exception is raised at: DummyCritSect.Lock(); // vtkPolyData::~vtkPolyData() If I destroy the component before the form is closed (on the OnFormClose event) then there is no exception but there are some resource leaks. There is something not properly handled in the component, as you can see the former exception happens even in the example given in the last vtk release: /Examples/GUI/Win32/vtkBorland/ProjectDemo/Form_Test.cpp What can I do to get it right? Is there anybody working in some vtk component for C++ Builder? I would like to work with somebody to make an easy to use robust component. Thanks, Leonardo _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From imho at skynet.be Tue Apr 15 15:54:28 2003 From: imho at skynet.be (imho) Date: Tue, 15 Apr 2003 21:54:28 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 Message-ID: <3E9C6374.9050703@skynet.be> Hi all, I try to replace vtk 4.0 to vtk 45.2, but some files I used aren't found by the compiler : Compiling... affichage16coupes.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichage16coupes.h(4) : fatal error C1083: Cannot open include file: 'vtkRenderWindow.h': No such file or directory affichage1coupe.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichage1coupe.h(4) : fatal error C1083: Cannot open include file: 'vtkRenderWindow.h': No such file or directory affichage4coupes.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichage4coupes.h(4) : fatal error C1083: Cannot open include file: 'vtkRenderWindow.h': No such file or directory affichage4vues.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichage4vues.h(4) : fatal error C1083: Cannot open include file: 'vtkRenderWindow.h': No such file or directory affichageReg.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichagereg.h(4) : fatal error C1083: Cannot open include file: 'vtkRenderWindow.h': No such file or directory affichageVTK.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichagevtk.h(5) : fatal error C1083: Cannot open include file: 'vtkImageCast.h': No such file or directory main.cpp c:\qt\include\vtkqtobjectfactory.h(12) : fatal error C1083: Cannot open include file: 'vtkObjectFactory.h': No such file or directory moc_newprojectwindow.cpp c:\qt\include\vtkqtobjectfactory.h(12) : fatal error C1083: Cannot open include file: 'vtkObjectFactory.h': No such file or directory newprojectwindow.cpp c:\qt\include\vtkqtobjectfactory.h(12) : fatal error C1083: Cannot open include file: 'vtkObjectFactory.h': No such file or directory vtkInteractorStyleCustom.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.h(4) : fatal error C1083: Cannot open include file: 'vtkInteractorStyle.h': No such file or directory What should I do? Is it something different with vtk 4.2? thanks From tim.fooy at pandora.be Tue Apr 15 16:47:56 2003 From: tim.fooy at pandora.be (Tim Fooy) Date: Tue, 15 Apr 2003 22:47:56 +0200 Subject: [vtkusers] SetDataMask Message-ID: <200304152247.56094.tim.fooy@pandora.be> Hi all, I was going through some of the examples that come with VTK, and I came across the SetDataMask method of the vtkImageReader class. What does a "datamask" mean? I checked the doc pages on the site, but the explanation of the method just repeats the method's name and thus isn't very helpful. Thanks in advance, Tim From imho at skynet.be Tue Apr 15 17:16:29 2003 From: imho at skynet.be (imho) Date: Tue, 15 Apr 2003 23:16:29 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 Message-ID: <3E9C76AD.5050300@skynet.be> Hi all, I try to replace vtk 4.0 to vtk 4.2, but some files I used aren't found by the compiler : Compiling... affichage16coupes.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichage16coupes.h(4) : fatal error C1083: Cannot open include file: 'vtkRenderWindow.h': No such file or directory affichage1coupe.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichage1coupe.h(4) : fatal error C1083: Cannot open include file: 'vtkRenderWindow.h': No such file or directory affichage4coupes.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichage4coupes.h(4) : fatal error C1083: Cannot open include file: 'vtkRenderWindow.h': No such file or directory affichage4vues.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichage4vues.h(4) : fatal error C1083: Cannot open include file: 'vtkRenderWindow.h': No such file or directory affichageReg.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichagereg.h(4) : fatal error C1083: Cannot open include file: 'vtkRenderWindow.h': No such file or directory affichageVTK.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\affichagevtk.h(5) : fatal error C1083: Cannot open include file: 'vtkImageCast.h': No such file or directory main.cpp c:\qt\include\vtkqtobjectfactory.h(12) : fatal error C1083: Cannot open include file: 'vtkObjectFactory.h': No such file or directory moc_newprojectwindow.cpp c:\qt\include\vtkqtobjectfactory.h(12) : fatal error C1083: Cannot open include file: 'vtkObjectFactory.h': No such file or directory newprojectwindow.cpp c:\qt\include\vtkqtobjectfactory.h(12) : fatal error C1083: Cannot open include file: 'vtkObjectFactory.h': No such file or directory vtkInteractorStyleCustom.cpp c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.h(4) : fatal error C1083: Cannot open include file: 'vtkInteractorStyle.h': No such file or directory What should I do? Is it something different with vtk 4.2? thanks From jiang at Telematik-Institut.de Wed Apr 16 03:46:25 2003 From: jiang at Telematik-Institut.de (Chunyan Jiang) Date: Wed, 16 Apr 2003 09:46:25 +0200 Subject: AW: [vtkusers] Strange problem--VTK in JBuilder In-Reply-To: <3E9CB6C5.4030807@yahoo.com> Message-ID: Jarek, I have set the PATH as C://Programme/vtk42/bin. But it does not work. And there is another problem in the Cone.java. There are some static definition: static { System.loadLibrary("vtkCommonJava"); System.loadLibrary("vtkFilteringJava"); System.loadLibrary("vtkIOJava"); System.loadLibrary("vtkImagingJava"); System.loadLibrary("vtkGraphicsJava"); // System.loadLibrary("vtkRenderingJava"); } Every library works well except "vtkRenderingJava". So I comment this line. If I add it then the following error message will present when the application runs: The Dynamic Link Library jawt.dll can not be find at the given path: C:\JBuilder8\jdk1.4\bin; C:\WINNT\System32;C:\WINNT\system;...... In any case the java.lang.UnsatisfiedLinkError will appear. How can I get vtk in JBuilder? Thanks a lot! Chunyan -----Ursprungliche Nachricht----- Von: Jarek Sacha [mailto:galicjan at yahoo.com] Gesendet: Mittwoch, 16. April 2003 03:50 An: Chunyan Jiang Betreff: Re: [vtkusers] Strange problem--VTK in JBuilder Chunyan Jiang wrote: >Dear Vtk-users, >I use vtk 4.2 with JBuilder8 in Win2000. I just try a simple example for >test. It is Cone.java. The application can not run. When I debug it, I find >that it will stop at the first sentence: vtkConeSource cone = new >vtkConeSource(); The error message is as following: >java.lang.UnsatisfiedLinkError: VTKInit at vtk.vtkConeSource.VTKInit(Native >Method) at >vtk.vtkObject.(C:/martink/vtk42/vtkdist/java/vtk/vtkObject.java:98) >at >vtk.vtkProcessObject.(C:/martink/vtk42/vtkdist/java/vtk/vtkProcessObj e >ct.java:86) at >vtk.vtkSource.(C:/martink/vtk42/vtkdist/java/vtk/vtkSource.java:86) >at >vtk.vtkPolyDataSource.(C:/martink/vtk42/vtkdist/java/vtk/vtkPolyDataS o >urce.java:30) at >vtk.vtkConeSource.(C:/martink/vtk42/vtkdist/java/vtk/vtkConeSource.ja v >a:114) at javavtk.Cone1.render(Cone1.java:35) at >javavtk.Application1.(Application1.java:45) at >javavtk.Application1.main(Application1.java:55) > >It is quite strange. I have not such path: C:/martink/vtk42 in my computer. >And I set the configure libraries as C://Programme/vtk42/bin/vtk.jar. > > You need to add location of VTK Java DLLs to your system PATH variable., I assume that you have them in C://Programme/vtk42/bin Jarek From I.deBoer at polytec.de Wed Apr 16 03:52:27 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Wed, 16 Apr 2003 09:52:27 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> Hi, > I try to replace vtk 4.0 to vtk 4.2, but some files I used > aren't found by the compiler : The files are in 4.2. Your include directories seem to be wrong. I have the .h files in 4.2 greets Ingo From imho at skynet.be Wed Apr 16 03:59:37 2003 From: imho at skynet.be (imho) Date: Wed, 16 Apr 2003 09:59:37 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 In-Reply-To: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> Message-ID: <3E9D0D69.5020008@skynet.be> An HTML attachment was scrubbed... URL: From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Apr 16 04:05:47 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 16 Apr 2003 10:05:47 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 In-Reply-To: <3E9D0D69.5020008@skynet.be> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> <3E9D0D69.5020008@skynet.be> Message-ID: <3E9D0EDB.9030904@creatis.insa-lyon.fr> imho, All the major changes in VTK from 4.0 to 4.2 are describe here: http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.008.htp Furthermore you won't have an 'include' directory till you actually build *and* install VTK. Beware that two existing versions are very likely to cause huge problems. Remove one before installing the second one. Finally how did you download VTK 4.2 ? If by cvs make sure to do a 'cvs update'. Also please note that the VTK 4.x branch is in : cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/VTK and not cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/vtk HTH mathieu imho wrote: > Hi, > That's strange, because I didn't find the .h files in my vtk 4.2 directory. > I don't have any "includes" directory as I had with vtk 4.0. > > De Boer Ingo wrote: > >>Hi, >> >> >> >>>I try to replace vtk 4.0 to vtk 4.2, but some files I used >>>aren't found by the compiler : >>> >>> >>The files are in 4.2. Your include directories seem to be wrong. >>I have the .h files in 4.2 >> >>greets >> Ingo >> >> >> >> >> > _______________________________________________ This is the private VTK > discussion list. Please keep messages on-topic. Check the FAQ at: Follow > this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From imho at skynet.be Wed Apr 16 05:00:09 2003 From: imho at skynet.be (imho) Date: Wed, 16 Apr 2003 11:00:09 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 In-Reply-To: <3E9D0EDB.9030904@creatis.insa-lyon.fr> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> <3E9D0D69.5020008@skynet.be> <3E9D0EDB.9030904@creatis.insa-lyon.fr> Message-ID: <3E9D1B99.4010407@skynet.be> Hi Mathieu, I have downloaded the tar gz on the site, and installed it with cmake in an other folder than vtk 4.0. I'm under windows, so I have changed the VTK environment variable to vtk 4.2, but now what else should I change to make it work again? Thanks Mathieu Malaterre wrote: > imho, > All the major changes in VTK from 4.0 to 4.2 are describe here: > > http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.008.htp > > Furthermore you won't have an 'include' directory till you > actually build *and* install VTK. Beware that two existing versions > are very likely to cause huge problems. Remove one before installing > the second one. > > Finally how did you download VTK 4.2 ? If by cvs make sure to do a > 'cvs update'. Also please note that the VTK 4.x branch is in : > > cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/VTK > > and not > > cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/vtk > > > HTH > mathieu > > imho wrote: > >> Hi, >> That's strange, because I didn't find the .h files in my vtk 4.2 >> directory. >> I don't have any "includes" directory as I had with vtk 4.0. >> >> De Boer Ingo wrote: >> >>> Hi, >>> >>> >>> >>>> I try to replace vtk 4.0 to vtk 4.2, but some files I used aren't >>>> found by the compiler : >>>> >>> >>> The files are in 4.2. Your include directories seem to be wrong. >>> I have the .h files in 4.2 >>> greets >>> Ingo >>> >>> >>> >>> >>> >> _______________________________________________ This is the private >> VTK discussion list. Please keep messages on-topic. Check the FAQ at: >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > From I.deBoer at polytec.de Wed Apr 16 05:06:17 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Wed, 16 Apr 2003 11:06:17 +0200 Subject: AW: [vtkusers] from VTK 4.0 to 4.2 Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3C3@02polywbr.waldbronn.polytec.de> Hi, > Furthermore you won't have an 'include' directory till you actually > build *and* install VTK. Beware that two existing versions are very > likely to cause huge problems. Remove one before installing the second one. I just installed the 4.2 binaries and it worked without compiling the sources and I had the include directory... But I had to setup the paths for the VisualStudio. greets Ingo From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Apr 16 05:03:21 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 16 Apr 2003 11:03:21 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 In-Reply-To: <3E9D1B99.4010407@skynet.be> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> <3E9D0D69.5020008@skynet.be> <3E9D0EDB.9030904@creatis.insa-lyon.fr> <3E9D1B99.4010407@skynet.be> Message-ID: <3E9D1C59.9010302@creatis.insa-lyon.fr> imho, Did you read: http://www.imm.dtu.dk/pubdb/views/edoc_download.php/502/pdf/imm502.pdf If not, you better read it first. Otherwise, make sure you change the path to vtk in your newproject/CMakeCache.txt to the correct one: Restart cmake in your *own* project and make sure nothing is pointing toward your old VTK 4.0 installation. mathieu imho wrote: > Hi Mathieu, > I have downloaded the tar gz on the site, and installed it with cmake in > an other folder than vtk 4.0. > I'm under windows, so I have changed the VTK environment variable to vtk > 4.2, but now what else should I change to make it work again? > > Thanks > > Mathieu Malaterre wrote: > >> imho, >> All the major changes in VTK from 4.0 to 4.2 are describe here: >> >> http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.008.htp >> >> Furthermore you won't have an 'include' directory till you >> actually build *and* install VTK. Beware that two existing versions >> are very likely to cause huge problems. Remove one before installing >> the second one. >> >> Finally how did you download VTK 4.2 ? If by cvs make sure to do a >> 'cvs update'. Also please note that the VTK 4.x branch is in : >> >> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/VTK >> >> and not >> >> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/vtk >> >> >> HTH >> mathieu >> >> imho wrote: >> >>> Hi, >>> That's strange, because I didn't find the .h files in my vtk 4.2 >>> directory. >>> I don't have any "includes" directory as I had with vtk 4.0. >>> >>> De Boer Ingo wrote: >>> >>>> Hi, >>>> >>>> >>>> >>>>> I try to replace vtk 4.0 to vtk 4.2, but some files I used aren't >>>>> found by the compiler : >>>>> >>>> >>>> >>>> The files are in 4.2. Your include directories seem to be wrong. >>>> I have the .h files in 4.2 >>>> greets >>>> Ingo >>>> >>>> >>>> >>>> >>>> >>> _______________________________________________ This is the private >>> VTK discussion list. Please keep messages on-topic. Check the FAQ at: >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Apr 16 05:07:42 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 16 Apr 2003 11:07:42 +0200 Subject: AW: [vtkusers] from VTK 4.0 to 4.2 In-Reply-To: <1484AEC8AB498A4EB64D4A8137D23FD955F3C3@02polywbr.waldbronn.polytec.de> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3C3@02polywbr.waldbronn.polytec.de> Message-ID: <3E9D1D5E.8090208@creatis.insa-lyon.fr> > installed 4.2 binaries [snip] > without compiling really ! imho said he downloaded the source, thus he might be able to use /patented, turn ANSI on ... mathieu -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From imho at skynet.be Wed Apr 16 05:36:57 2003 From: imho at skynet.be (imho) Date: Wed, 16 Apr 2003 11:36:57 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 In-Reply-To: <3E9D1C59.9010302@creatis.insa-lyon.fr> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> <3E9D0D69.5020008@skynet.be> <3E9D0EDB.9030904@creatis.insa-lyon.fr> <3E9D1B99.4010407@skynet.be> <3E9D1C59.9010302@creatis.insa-lyon.fr> Message-ID: <3E9D2439.7090509@skynet.be> Hi Mathieu, thanks for the link, I didn't know it. I didn't delete yet the vtk 4.0 version and I try the Visual configuration, I didn't do like that for the includes paths. Now I have a c:\program files\microsoft visual studio\vc98\include\ostream(362) compiler limit : internal heap limit reached; use /Zm to specify a higher limit, but I've already put a /Zm with 500, 800, and then 5000! thanks Mathieu Malaterre wrote: > imho, > Did you read: > > http://www.imm.dtu.dk/pubdb/views/edoc_download.php/502/pdf/imm502.pdf > > If not, you better read it first. > Otherwise, make sure you change the path to vtk in your > newproject/CMakeCache.txt to the correct one: Restart cmake in your > *own* project and make sure nothing is pointing toward your old VTK > 4.0 installation. > > mathieu > > imho wrote: > >> Hi Mathieu, >> I have downloaded the tar gz on the site, and installed it with cmake >> in an other folder than vtk 4.0. >> I'm under windows, so I have changed the VTK environment variable to >> vtk 4.2, but now what else should I change to make it work again? >> >> Thanks >> >> Mathieu Malaterre wrote: >> >>> imho, >>> All the major changes in VTK from 4.0 to 4.2 are describe here: >>> >>> http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.008.htp >>> >>> Furthermore you won't have an 'include' directory till you >>> actually build *and* install VTK. Beware that two existing versions >>> are very likely to cause huge problems. Remove one before installing >>> the second one. >>> >>> Finally how did you download VTK 4.2 ? If by cvs make sure to do >>> a 'cvs update'. Also please note that the VTK 4.x branch is in : >>> >>> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/VTK >>> >>> and not >>> >>> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/vtk >>> >>> >>> HTH >>> mathieu >>> >>> imho wrote: >>> >>>> Hi, >>>> That's strange, because I didn't find the .h files in my vtk 4.2 >>>> directory. >>>> I don't have any "includes" directory as I had with vtk 4.0. >>>> >>>> De Boer Ingo wrote: >>>> >>>>> Hi, >>>>> >>>>> >>>>> >>>>>> I try to replace vtk 4.0 to vtk 4.2, but some files I used aren't >>>>>> found by the compiler : >>>>>> >>>>> >>>>> >>>>> >>>>> The files are in 4.2. Your include directories seem to be wrong. >>>>> I have the .h files in 4.2 >>>>> greets >>>>> Ingo >>>>> >>>>> >>>>> >>>>> >>>>> >>>> _______________________________________________ This is the private >>>> VTK discussion list. Please keep messages on-topic. Check the FAQ >>>> at: Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> >>> >> > > From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Apr 16 05:55:35 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 16 Apr 2003 11:55:35 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 In-Reply-To: <3E9D2439.7090509@skynet.be> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> <3E9D0D69.5020008@skynet.be> <3E9D0EDB.9030904@creatis.insa-lyon.fr> <3E9D1B99.4010407@skynet.be> <3E9D1C59.9010302@creatis.insa-lyon.fr> <3E9D2439.7090509@skynet.be> Message-ID: <3E9D2897.2030401@creatis.insa-lyon.fr> imho, Could you try the tricks describe here: http://public.kitware.com/pipermail/vtkusers/2002-October/014036.html and http://public.kitware.com/pipermail/vtkusers/2002-May/011228.html Keep finger cross, mathieu...definitely convinced of Linux superiority ;) BTW: I am sure you could have thought of this solution if you were using the search engine from: http://www.kitware.com/search.html imho wrote: > Hi Mathieu, > > thanks for the link, I didn't know it. > I didn't delete yet the vtk 4.0 version and I try the Visual > configuration, I didn't do like that for the includes paths. > Now I have a c:\program files\microsoft visual > studio\vc98\include\ostream(362) compiler limit : internal heap limit > reached; use /Zm to specify a higher limit, but I've already put a /Zm > with 500, 800, and then 5000! > > > thanks > > Mathieu Malaterre wrote: > >> imho, >> Did you read: >> >> http://www.imm.dtu.dk/pubdb/views/edoc_download.php/502/pdf/imm502.pdf >> >> If not, you better read it first. >> Otherwise, make sure you change the path to vtk in your >> newproject/CMakeCache.txt to the correct one: Restart cmake in your >> *own* project and make sure nothing is pointing toward your old VTK >> 4.0 installation. >> >> mathieu >> >> imho wrote: >> >>> Hi Mathieu, >>> I have downloaded the tar gz on the site, and installed it with cmake >>> in an other folder than vtk 4.0. >>> I'm under windows, so I have changed the VTK environment variable to >>> vtk 4.2, but now what else should I change to make it work again? >>> >>> Thanks >>> >>> Mathieu Malaterre wrote: >>> >>>> imho, >>>> All the major changes in VTK from 4.0 to 4.2 are describe here: >>>> >>>> http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.008.htp >>>> >>>> Furthermore you won't have an 'include' directory till you >>>> actually build *and* install VTK. Beware that two existing versions >>>> are very likely to cause huge problems. Remove one before installing >>>> the second one. >>>> >>>> Finally how did you download VTK 4.2 ? If by cvs make sure to do >>>> a 'cvs update'. Also please note that the VTK 4.x branch is in : >>>> >>>> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/VTK >>>> >>>> and not >>>> >>>> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/vtk >>>> >>>> >>>> HTH >>>> mathieu >>>> >>>> imho wrote: >>>> >>>>> Hi, >>>>> That's strange, because I didn't find the .h files in my vtk 4.2 >>>>> directory. >>>>> I don't have any "includes" directory as I had with vtk 4.0. >>>>> >>>>> De Boer Ingo wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> >>>>>> >>>>>>> I try to replace vtk 4.0 to vtk 4.2, but some files I used aren't >>>>>>> found by the compiler : >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> The files are in 4.2. Your include directories seem to be wrong. >>>>>> I have the .h files in 4.2 >>>>>> greets >>>>>> Ingo >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ This is the private >>>>> VTK discussion list. Please keep messages on-topic. Check the FAQ >>>>> at: Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>>> >>>> >>>> >>>> >>> >> >> > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From imho at skynet.be Wed Apr 16 06:10:15 2003 From: imho at skynet.be (imho) Date: Wed, 16 Apr 2003 12:10:15 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 In-Reply-To: <3E9D2897.2030401@creatis.insa-lyon.fr> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> <3E9D0D69.5020008@skynet.be> <3E9D0EDB.9030904@creatis.insa-lyon.fr> <3E9D1B99.4010407@skynet.be> <3E9D1C59.9010302@creatis.insa-lyon.fr> <3E9D2439.7090509@skynet.be> <3E9D2897.2030401@creatis.insa-lyon.fr> Message-ID: <3E9D2C07.2020804@skynet.be> Hi Mathieu, I don't know how to set the instantiator size to 5 :( I've also tried to make it work on linux, with the vtk 4.0 but developping my project first on windows I failed to have what I wanted on linux. (Qt + VTK + ITK... it was compiling, but I had some mysterious things on the execution) so fort the moment I focalise on windows. thanks Mathieu Malaterre wrote: > imho, > Could you try the tricks describe here: > > http://public.kitware.com/pipermail/vtkusers/2002-October/014036.html > and > http://public.kitware.com/pipermail/vtkusers/2002-May/011228.html > > Keep finger cross, > > mathieu...definitely convinced of Linux superiority ;) > BTW: I am sure you could have thought of this solution if you were > using the search engine from: http://www.kitware.com/search.html > > > > imho wrote: > >> Hi Mathieu, >> >> thanks for the link, I didn't know it. >> I didn't delete yet the vtk 4.0 version and I try the Visual >> configuration, I didn't do like that for the includes paths. >> Now I have a c:\program files\microsoft visual >> studio\vc98\include\ostream(362) compiler limit : internal heap limit >> reached; use /Zm to specify a higher limit, but I've already put a >> /Zm with 500, 800, and then 5000! >> >> >> thanks >> >> Mathieu Malaterre wrote: >> >>> imho, >>> Did you read: >>> >>> http://www.imm.dtu.dk/pubdb/views/edoc_download.php/502/pdf/imm502.pdf >>> >>> If not, you better read it first. >>> Otherwise, make sure you change the path to vtk in your >>> newproject/CMakeCache.txt to the correct one: Restart cmake in your >>> *own* project and make sure nothing is pointing toward your old VTK >>> 4.0 installation. >>> >>> mathieu >>> >>> imho wrote: >>> >>>> Hi Mathieu, >>>> I have downloaded the tar gz on the site, and installed it with >>>> cmake in an other folder than vtk 4.0. >>>> I'm under windows, so I have changed the VTK environment variable >>>> to vtk 4.2, but now what else should I change to make it work again? >>>> >>>> Thanks >>>> >>>> Mathieu Malaterre wrote: >>>> >>>>> imho, >>>>> All the major changes in VTK from 4.0 to 4.2 are describe here: >>>>> >>>>> http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.008.htp >>>>> >>>>> Furthermore you won't have an 'include' directory till you >>>>> actually build *and* install VTK. Beware that two existing >>>>> versions are very likely to cause huge problems. Remove one before >>>>> installing the second one. >>>>> >>>>> Finally how did you download VTK 4.2 ? If by cvs make sure to >>>>> do a 'cvs update'. Also please note that the VTK 4.x branch is in : >>>>> >>>>> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/VTK >>>>> >>>>> and not >>>>> >>>>> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/vtk >>>>> >>>>> >>>>> HTH >>>>> mathieu >>>>> >>>>> imho wrote: >>>>> >>>>>> Hi, >>>>>> That's strange, because I didn't find the .h files in my vtk 4.2 >>>>>> directory. >>>>>> I don't have any "includes" directory as I had with vtk 4.0. >>>>>> >>>>>> De Boer Ingo wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> >>>>>>> >>>>>>>> I try to replace vtk 4.0 to vtk 4.2, but some files I used >>>>>>>> aren't found by the compiler : >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> The files are in 4.2. Your include directories seem to be wrong. >>>>>>> I have the .h files in 4.2 >>>>>>> greets >>>>>>> Ingo >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> _______________________________________________ This is the >>>>>> private VTK discussion list. Please keep messages on-topic. Check >>>>>> the FAQ at: Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> >> > > From aborsic at sc-aip.com Wed Apr 16 06:18:53 2003 From: aborsic at sc-aip.com (Andrea Borsic) Date: Wed, 16 Apr 2003 12:18:53 +0200 (CEST) Subject: [vtkusers] Refresh problems with WinXp & VTK 4.2 Message-ID: <1050488333.3e9d2e0d08780@www.sc-aip.com> Dear All, I'm experiencing strange problems with VTK 4.2 on the following system: Laptop Compaq EVO N1020V, which is: P4 256MB RAM ATI graphics adapter (chipset IGP 340M) Windows XP Pro Visual Studio .NET Firstly I must say that on the same system VTK 4.0 runs fine. PROBLEMS: After deleting completely VTK 4.0 and installing VTK 4.2 wintel precompiled binaries, all tcl examples run extremely slow, to the point that it is impossible to drag the renderer window around, and that it takes tens of seconds to render the teapot. The same thing happens if I rebuild the VTK 4.2.1 distribution from scratch, and then either running the tcl example scripts or compiling & running the SampleMFC application. Has anyone experienced anything similar ? Best Regards and thanks in advance for your attention, Andrea Borsic. SC-AIP s.a.s. Scientific Computing & Applied Inverse Problems Via Boggio 61/A 100138 Torino - ITALY From imho at skynet.be Wed Apr 16 06:21:22 2003 From: imho at skynet.be (imho) Date: Wed, 16 Apr 2003 12:21:22 +0200 Subject: [vtkusers] VTK interactor has changed? Message-ID: <3E9D2EA2.6000506@skynet.be> Hi all, as I said I try to upgrade from 4.0 to 4.2, and additionnally to my heap problem I have a class vtkInteractorStyleCustom : public vtkInteractorStyle, and some things working before are no missing... thanks for helping :/ the code : ------------------------------------------------------ void vtkInteractorStyleCustom::OnLeftButtonDown(int ctrl, int shift, int x, int y) { this->FindPokedRenderer(x, y); if (this->CurrentRenderer == NULL) { return; } int * xy= this->CurrentRenderer->GetRenderWindow()->GetSize(); width=xy[0]/2; height=xy[1]/2; if (reslice && (x<=width) && (y>=height)) { double positionX = x; double positionY = y - height ; double spacing = hg->getSpacing(); double slice = (double)((positionX-(width/2))/(double)((width/2)/spacing)); double slice2 = (double)(((positionY)-(height/2))/(double)((height/2)/spacing)); bg->setSpacing(slice); bd->setSpacing2(slice2); } else { this->UpdateInternalState(ctrl, shift, x, y); this->FindPokedCamera(x, y); if (this->HasObserver(vtkCommand::LeftButtonPressEvent)) { this->InvokeEvent(vtkCommand::LeftButtonPressEvent,NULL); } else { if (this->ShiftKey) { //// I haven't got a Middle button ! if (this->CtrlKey) { this->StartDolly(); } else { this->StartPan(); } } else { if (this->CtrlKey) { this->StartSpin(); } else { this->StartRotate(); } } } } if (hg != NULL && hg->GetRenderer() == this->CurrentRenderer) { double positionX = x; double positionY = y - height ; hg->bougerViseur(positionX, positionY); hg->selectionner(positionX, positionY); if (hd) { hd->deselectionner(); hd->bougerViseur(positionX, positionY); } if (bg) { bg->deselectionner(); bg->bougerViseur(positionX, positionY); } if (bd) { bd->deselectionner(); bd->bougerViseur(positionX, positionY); } } else if (hd != NULL && hd->GetRenderer() == this->CurrentRenderer) { double positionX = x - width; double positionY = y - height ; hd->bougerViseur(positionX, positionY); hd->selectionner(positionX, positionY); if (hg) { hg->deselectionner(); hg->bougerViseur(positionX, positionY); } if (bg) { bg->deselectionner(); bg->bougerViseur(positionX, positionY); } if (bd) { bd->deselectionner(); bd->bougerViseur(positionX, positionY); } } else if (bg != NULL && bg->GetRenderer() == this->CurrentRenderer) { double positionX = x; double positionY = y; bg->bougerViseur(positionX, positionY); bg->selectionner(positionX, positionY); if (hd) { hd->deselectionner(); hd->bougerViseur(positionX, positionY); } if (hg) { hg->deselectionner(); hg->bougerViseur(positionX, positionY); } if (bd) { bd->deselectionner(); bd->bougerViseur(positionX, positionY); } } else if (bd != NULL && bd->GetRenderer() == this->CurrentRenderer) { double positionX = x - width; double positionY = y; bd->bougerViseur(positionX, positionY); bd->selectionner(positionX, positionY); if (hd) { hd->deselectionner(); hd->bougerViseur(positionX, positionY); } if (bg) { bg->deselectionner(); bg->bougerViseur(positionX, positionY); } if (hg) { hg->deselectionner(); hg->bougerViseur(positionX, positionY); } } this->CurrentRenderer->GetRenderWindow()->Render(); } --------------------------------------------- the messages : c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.cpp(64) : error C2039: 'UpdateInternalState' : is not a member of 'vtkInteractorStyleCustom' c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.h(11) : see declaration of 'vtkInteractorStyleCustom' c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.cpp(66) : error C2039: 'FindPokedCamera' : is not a member of 'vtkInteractorStyleCustom' c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.h(11) : see declaration of 'vtkInteractorStyleCustom' c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.cpp(73) : error C2039: 'ShiftKey' : is not a member of 'vtkInteractorStyleCustom' c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.h(11) : see declaration of 'vtkInteractorStyleCustom' c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.cpp(75) : error C2039: 'CtrlKey' : is not a member of 'vtkInteractorStyleCustom' c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.h(11) : see declaration of 'vtkInteractorStyleCustom' c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.cpp(86) : error C2039: 'CtrlKey' : is not a member of 'vtkInteractorStyleCustom' c:\documents and settings\administrateur\mes documents\memoire\newproject\vtkinteractorstylecustom.h(11) : see declaration of 'vtkInteractorStyleCustom' From novalet at yahoo.com.cn Wed Apr 16 09:05:36 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Wed, 16 Apr 2003 21:05:36 +0800 (CST) Subject: [vtkusers] problem about the tcl render window Message-ID: <20030416130536.10361.qmail@web15214.mail.bjs.yahoo.com> Hi! I use vtkImageViewer to see the generated image. It works well after the first "viewer Render". The viewer find the suitable size to show the image. But if i close this window and press "viewer Render" again, tcl invoke a strange window that its width is almost as the screen and its height is narrowest can only see the title line part of window. Then i make it zoom to whole screen size, it shows the image data as the left bottom corner. So the render is right, but just has wrong size. In fact, in my computer(win2k, tcl8.3, vtk4.2), the viewer's first "Render" works fine, but the other "Render" on this viewer always get that strange window. I don't know why it acts like that and whether it is a bug in vtk. For my application, I must permit the users to close or reopen the vtkImageViewer windows. I hope every "Render" has its suitable size. How can i get this feature? Any suggestion? ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ??????CCTV-2??????????????????????? http://rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cctv_wireless_study From galicjan at yahoo.com Wed Apr 16 09:29:42 2003 From: galicjan at yahoo.com (Jarek Sacha) Date: Wed, 16 Apr 2003 06:29:42 -0700 (PDT) Subject: AW: [vtkusers] Strange problem--VTK in JBuilder In-Reply-To: Message-ID: <20030416132942.2505.qmail@web20911.mail.yahoo.com> --- Chunyan Jiang wrote: > I have set the PATH as C://Programme/vtk42/bin. But it does not work. > And > there is another problem in the Cone.java. There are some static > definition: > static { > System.loadLibrary("vtkCommonJava"); > System.loadLibrary("vtkFilteringJava"); > System.loadLibrary("vtkIOJava"); > System.loadLibrary("vtkImagingJava"); > System.loadLibrary("vtkGraphicsJava"); > // System.loadLibrary("vtkRenderingJava"); > } > Every library works well except "vtkRenderingJava". So I comment this > line. > If I add it then the following error message will present when the > application runs: > The Dynamic Link Library jawt.dll can not be find at the given path: > C:\JBuilder8\jdk1.4\bin; C:\WINNT\System32;C:\WINNT\system;...... > > In any case the java.lang.UnsatisfiedLinkError will appear. How can I > get > vtk in JBuilder? You need to add location of jawt.dll to your PATH too. I am guessing that you should have it in C:\JBuilder8\jdk1.4\jre\bin. Jarek __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com From Jonathan.Bailleul at greyc.ismra.fr Wed Apr 16 09:41:56 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Wed, 16 Apr 2003 14:41:56 +0100 Subject: [vtkusers] How to retrieve the on-screen x,y coordinates of a 3D actor point? Message-ID: <3E9D5DA4.2EC2BBE1@greyc.ismra.fr> Dear all, I know how to access the points values out of a polydata object used to make an actor, but can I determine the on-screen projected position of these points at a given stage of actor visualization? In advance, thank you for your help. -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From andy.cedilnik at kitware.com Wed Apr 16 10:15:24 2003 From: andy.cedilnik at kitware.com (Andy Cedilnik) Date: 16 Apr 2003 10:15:24 -0400 Subject: [vtkusers] How to retrieve the on-screen x,y coordinates of a 3D actor point? In-Reply-To: <3E9D5DA4.2EC2BBE1@greyc.ismra.fr> References: <3E9D5DA4.2EC2BBE1@greyc.ismra.fr> Message-ID: <1050502524.32439.8401.camel@xanth> Hi Jonathan, vtkRenderer has methods for converting from world space to screen space. Andy On Wed, 2003-04-16 at 09:41, Jonathan Bailleul wrote: > Dear all, > > I know how to access the points values out of a polydata object used to > make an actor, but can I determine the on-screen projected position of > these points at a given stage of actor visualization? > > > In advance, thank you for your help. > From tim.fooy at pandora.be Wed Apr 16 11:08:04 2003 From: tim.fooy at pandora.be (Tim Fooy) Date: Wed, 16 Apr 2003 17:08:04 +0200 Subject: [vtkusers] rectilinear grid problem Message-ID: <200304161708.04014.tim.fooy@pandora.be> I just spent over two hours trying to figure out what is wrong with this datafile and this code... If someone sees the error, then please let me know. the data file: # vtk DataFile Version 4.2 just a grid ASCII DATASET RECTILINEAR_GRID DIMENSIONS 7 8 1 X_COORDINATES 7 int 1 10 100 500 1000 2000 5000 Y_COORDINATES 8 int 1 2 3 4 5 6 7 8 Z_COORDINATES 1 int 1 #some scalar data follows the code (tcl): package require vtk package require vtkinteraction vtkRectilinearGridReader reader reader SetFileName "the correct filename to the above written file" vtkRectilinearGridGeometryFilter geometry geometry SetInput [reader GetOutput] geometry SetExtent 0 6 0 7 0 0 vtkPolyDataMapper mapper mapper SetInput [geometry GetOutput] vtkActor actor actor SetMapper mapper # and then the usual rendering stuff. As far as I can see, this code exactly matches the code of RGrid.cxx in the Examples/DataManipulation/Cxx directory, yet RGrid gets the grid as output, and this code gets nothing... Thanks for any help, Tim From imho at skynet.be Wed Apr 16 11:08:15 2003 From: imho at skynet.be (imho) Date: Wed, 16 Apr 2003 17:08:15 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 In-Reply-To: <3E9D6A8F.8010807@creatis.insa-lyon.fr> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> <3E9D0D69.5020008@skynet.be> <3E9D0EDB.9030904@creatis.insa-lyon.fr> <3E9D1B99.4010407@skynet.be> <3E9D1C59.9010302@creatis.insa-lyon.fr> <3E9D2439.7090509@skynet.be> <3E9D2897.2030401@creatis.insa-lyon.fr> <3E9D2C07.2020804@skynet.be> <3E9D6A8F.8010807@creatis.insa-lyon.fr> Message-ID: <3E9D71DF.6080903@skynet.be> Mathieu, we were looking for something fast, free, cross-plateform and stable. We tried FLTK in september-october and it wasn't stable at all. I don't know wxWindow, is it better? We use Qt just for the main interface. Mathieu Malaterre wrote: > imho, > Is there any particular reason why you want Qt ? Did you tried > FTLK, or wxWindow which has a much better outlooking. > > mathieu > > imho wrote: > >> Hi Mathieu, >> >> I don't know how to set the instantiator size to 5 :( >> I've also tried to make it work on linux, with the vtk 4.0 but >> developping my project first on windows I failed to have what I >> wanted on linux. (Qt + VTK + ITK... it was compiling, but I had some >> mysterious things on the execution) so fort the moment I focalise on >> windows. >> >> thanks >> >> Mathieu Malaterre wrote: >> >>> imho, >>> Could you try the tricks describe here: >>> >>> http://public.kitware.com/pipermail/vtkusers/2002-October/014036.html >>> and >>> http://public.kitware.com/pipermail/vtkusers/2002-May/011228.html >>> >>> Keep finger cross, >>> >>> mathieu...definitely convinced of Linux superiority ;) >>> BTW: I am sure you could have thought of this solution if you were >>> using the search engine from: http://www.kitware.com/search.html >>> >>> >>> >>> imho wrote: >>> >>>> Hi Mathieu, >>>> >>>> thanks for the link, I didn't know it. >>>> I didn't delete yet the vtk 4.0 version and I try the Visual >>>> configuration, I didn't do like that for the includes paths. >>>> Now I have a c:\program files\microsoft visual >>>> studio\vc98\include\ostream(362) compiler limit : internal heap >>>> limit reached; use /Zm to specify a higher limit, but I've already >>>> put a /Zm with 500, 800, and then 5000! >>>> >>>> >>>> thanks >>>> >>>> Mathieu Malaterre wrote: >>>> >>>>> imho, >>>>> Did you read: >>>>> >>>>> http://www.imm.dtu.dk/pubdb/views/edoc_download.php/502/pdf/imm502.pdf >>>>> >>>>> >>>>> If not, you better read it first. >>>>> Otherwise, make sure you change the path to vtk in your >>>>> newproject/CMakeCache.txt to the correct one: Restart cmake in >>>>> your *own* project and make sure nothing is pointing toward your >>>>> old VTK 4.0 installation. >>>>> >>>>> mathieu >>>>> >>>>> imho wrote: >>>>> >>>>>> Hi Mathieu, >>>>>> I have downloaded the tar gz on the site, and installed it with >>>>>> cmake in an other folder than vtk 4.0. >>>>>> I'm under windows, so I have changed the VTK environment variable >>>>>> to vtk 4.2, but now what else should I change to make it work again? >>>>>> >>>>>> Thanks >>>>>> >>>>>> Mathieu Malaterre wrote: >>>>>> >>>>>>> imho, >>>>>>> All the major changes in VTK from 4.0 to 4.2 are describe here: >>>>>>> >>>>>>> http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.008.htp >>>>>>> >>>>>>> Furthermore you won't have an 'include' directory till you >>>>>>> actually build *and* install VTK. Beware that two existing >>>>>>> versions are very likely to cause huge problems. Remove one >>>>>>> before installing the second one. >>>>>>> >>>>>>> Finally how did you download VTK 4.2 ? If by cvs make sure >>>>>>> to do a 'cvs update'. Also please note that the VTK 4.x branch >>>>>>> is in : >>>>>>> >>>>>>> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/VTK >>>>>>> >>>>>>> and not >>>>>>> >>>>>>> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/vtk >>>>>>> >>>>>>> >>>>>>> HTH >>>>>>> mathieu >>>>>>> >>>>>>> imho wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> That's strange, because I didn't find the .h files in my vtk >>>>>>>> 4.2 directory. >>>>>>>> I don't have any "includes" directory as I had with vtk 4.0. >>>>>>>> >>>>>>>> De Boer Ingo wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>> I try to replace vtk 4.0 to vtk 4.2, but some files I used >>>>>>>>>> aren't found by the compiler : >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> The files are in 4.2. Your include directories seem to be wrong. >>>>>>>>> I have the .h files in 4.2 >>>>>>>>> greets >>>>>>>>> Ingo >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> _______________________________________________ This is the >>>>>>>> private VTK discussion list. Please keep messages on-topic. >>>>>>>> Check the FAQ at: Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>> >>> >>> >> > > From cnavarro at ncsa.uiuc.edu Wed Apr 16 11:20:47 2003 From: cnavarro at ncsa.uiuc.edu (Christopher M. Navarro) Date: Wed, 16 Apr 2003 10:20:47 -0500 (CDT) Subject: [vtkusers] rectilinear grid problem In-Reply-To: <200304161708.04014.tim.fooy@pandora.be> Message-ID: > package require vtk > package require vtkinteraction > vtkRectilinearGridReader reader > reader SetFileName "the correct filename to the above written file" Did you try reader Update or UpdateWholeExtent? > vtkRectilinearGridGeometryFilter geometry > geometry SetInput [reader GetOutput] > geometry SetExtent 0 6 0 7 0 0 > vtkPolyDataMapper mapper > mapper SetInput [geometry GetOutput] > vtkActor actor > actor SetMapper mapper > # and then the usual rendering stuff. -chris From tim.fooy at pandora.be Wed Apr 16 11:23:07 2003 From: tim.fooy at pandora.be (Tim Fooy) Date: Wed, 16 Apr 2003 17:23:07 +0200 Subject: [vtkusers] rectilinear grid problem In-Reply-To: References: Message-ID: <200304161723.07059.tim.fooy@pandora.be> On Wednesday 16 April 2003 17:20, you wrote: > Did you try reader Update or UpdateWholeExtent? Yep, no effect.. From imho at skynet.be Wed Apr 16 11:25:08 2003 From: imho at skynet.be (imho) Date: Wed, 16 Apr 2003 17:25:08 +0200 Subject: [vtkusers] from VTK 4.0 to 4.2 In-Reply-To: <3E9D7315.3040108@creatis.insa-lyon.fr> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3C2@02polywbr.waldbronn.polytec.de> <3E9D0D69.5020008@skynet.be> <3E9D0EDB.9030904@creatis.insa-lyon.fr> <3E9D1B99.4010407@skynet.be> <3E9D1C59.9010302@creatis.insa-lyon.fr> <3E9D2439.7090509@skynet.be> <3E9D2897.2030401@creatis.insa-lyon.fr> <3E9D2C07.2020804@skynet.be> <3E9D6A8F.8010807@creatis.insa-lyon.fr> <3E9D71C7.5090005@skynet.be> <3E9D7315.3040108@creatis.insa-lyon.fr> Message-ID: <3E9D75D4.6080701@skynet.be> thanks for these precisions, I'll examinate that ;-) Mathieu Malaterre wrote: > Well wxWindow is rather completely different from tk, fltk, Qt ... as > it didn't reinvent the wheel ! > wxWindow will use MFC when started on a windows machine, will use GTK > when started on a Linux box, will use Mac on a mac ... so your app > really look like any other one (thus cut and paste from one app to the > other is better handled). > > for more info: > > http://wxwindows.org/ > > Screenshots: > http://wxwindows.org/screensh.htm > > > I wouldn't say this is better as everybody is claiming they have the > best GUI :) > The main problem of Qt is that only 2.3 is free on Windows (I don't > know if you pay attention on that). > > BTW fltk is extremly stable, did you use the new 2.x branch instead of > the stable 1.1.3 ? It is also extremely fast and light...but on the > other hand quite ugly. > > mathieu > > > imho wrote: > >> Mathieu, >> >> we were looking for something fast, free, cross-plateform and stable. >> We tried FLTK in september-october and it wasn't stable at all. >> I don't know wxWindow, is it better? >> We use Qt just for the main interface. >> >> Mathieu Malaterre wrote: >> >>> imho, >>> Is there any particular reason why you want Qt ? Did you tried >>> FTLK, or wxWindow which has a much better outlooking. >>> >>> mathieu >>> >>> imho wrote: >>> >>>> Hi Mathieu, >>>> >>>> I don't know how to set the instantiator size to 5 :( >>>> I've also tried to make it work on linux, with the vtk 4.0 but >>>> developping my project first on windows I failed to have what I >>>> wanted on linux. (Qt + VTK + ITK... it was compiling, but I had >>>> some mysterious things on the execution) so fort the moment I >>>> focalise on windows. >>>> >>>> thanks >>>> >>>> Mathieu Malaterre wrote: >>>> >>>>> imho, >>>>> Could you try the tricks describe here: >>>>> >>>>> http://public.kitware.com/pipermail/vtkusers/2002-October/014036.html >>>>> and >>>>> http://public.kitware.com/pipermail/vtkusers/2002-May/011228.html >>>>> >>>>> Keep finger cross, >>>>> >>>>> mathieu...definitely convinced of Linux superiority ;) >>>>> BTW: I am sure you could have thought of this solution if you were >>>>> using the search engine from: http://www.kitware.com/search.html >>>>> >>>>> >>>>> >>>>> imho wrote: >>>>> >>>>>> Hi Mathieu, >>>>>> >>>>>> thanks for the link, I didn't know it. >>>>>> I didn't delete yet the vtk 4.0 version and I try the Visual >>>>>> configuration, I didn't do like that for the includes paths. >>>>>> Now I have a c:\program files\microsoft visual >>>>>> studio\vc98\include\ostream(362) compiler limit : internal heap >>>>>> limit reached; use /Zm to specify a higher limit, but I've >>>>>> already put a /Zm with 500, 800, and then 5000! >>>>>> >>>>>> >>>>>> thanks >>>>>> >>>>>> Mathieu Malaterre wrote: >>>>>> >>>>>>> imho, >>>>>>> Did you read: >>>>>>> >>>>>>> http://www.imm.dtu.dk/pubdb/views/edoc_download.php/502/pdf/imm502.pdf >>>>>>> >>>>>>> >>>>>>> If not, you better read it first. >>>>>>> Otherwise, make sure you change the path to vtk in your >>>>>>> newproject/CMakeCache.txt to the correct one: Restart cmake in >>>>>>> your *own* project and make sure nothing is pointing toward your >>>>>>> old VTK 4.0 installation. >>>>>>> >>>>>>> mathieu >>>>>>> >>>>>>> imho wrote: >>>>>>> >>>>>>>> Hi Mathieu, >>>>>>>> I have downloaded the tar gz on the site, and installed it with >>>>>>>> cmake in an other folder than vtk 4.0. >>>>>>>> I'm under windows, so I have changed the VTK environment >>>>>>>> variable to vtk 4.2, but now what else should I change to make >>>>>>>> it work again? >>>>>>>> >>>>>>>> Thanks >>>>>>>> >>>>>>>> Mathieu Malaterre wrote: >>>>>>>> >>>>>>>>> imho, >>>>>>>>> All the major changes in VTK from 4.0 to 4.2 are describe >>>>>>>>> here: >>>>>>>>> >>>>>>>>> http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.008.htp >>>>>>>>> >>>>>>>>> Furthermore you won't have an 'include' directory till you >>>>>>>>> actually build *and* install VTK. Beware that two existing >>>>>>>>> versions are very likely to cause huge problems. Remove one >>>>>>>>> before installing the second one. >>>>>>>>> >>>>>>>>> Finally how did you download VTK 4.2 ? If by cvs make sure >>>>>>>>> to do a 'cvs update'. Also please note that the VTK 4.x branch >>>>>>>>> is in : >>>>>>>>> >>>>>>>>> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/VTK >>>>>>>>> >>>>>>>>> and not >>>>>>>>> >>>>>>>>> cvs -d :pserver:anonymous at public.kitware.com:/cvsroot/vtk >>>>>>>>> >>>>>>>>> >>>>>>>>> HTH >>>>>>>>> mathieu >>>>>>>>> >>>>>>>>> imho wrote: >>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> That's strange, because I didn't find the .h files in my vtk >>>>>>>>>> 4.2 directory. >>>>>>>>>> I don't have any "includes" directory as I had with vtk 4.0. >>>>>>>>>> >>>>>>>>>> De Boer Ingo wrote: >>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> I try to replace vtk 4.0 to vtk 4.2, but some files I used >>>>>>>>>>>> aren't found by the compiler : >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> The files are in 4.2. Your include directories seem to be >>>>>>>>>>> wrong. >>>>>>>>>>> I have the .h files in 4.2 >>>>>>>>>>> greets >>>>>>>>>>> Ingo >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> _______________________________________________ This is the >>>>>>>>>> private VTK discussion list. Please keep messages on-topic. >>>>>>>>>> Check the FAQ at: Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>> >>> >>> >> > > From vanessa.noguesruiz at epfl.ch Wed Apr 16 11:45:50 2003 From: vanessa.noguesruiz at epfl.ch (vanessa.noguesruiz at epfl.ch) Date: Wed, 16 Apr 2003 17:45:50 +0200 (MEST) Subject: [vtkusers] (no subject) Message-ID: <1050507950.3e9d7aaef15d5@imapwww.epfl.ch> Hello. I would like to know how to read points from a polydata vtk file, as I do the following: vtkPolyDataReader *lector = vtkPolyDataReader::New(); lector->SetFileName ("D:/Proyecto/vtk/cube.vtk"); vtkPolyData *info=vtkPolyData::New(); info=lector->GetOutput(); vtkPoints *points=vtkPoints::New(); points=info->GetPoints(); and I don't get any points pointed by "points". Could anyone explainme why I am not getting the data in this way? I've also tried to get polygons cells and verts, but it always results NULL or a exception is launched when running, although it compiles and links perfectly. Thanks in advance. From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Apr 16 11:51:05 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 16 Apr 2003 17:51:05 +0200 Subject: [vtkusers] (no subject) In-Reply-To: <1050507950.3e9d7aaef15d5@imapwww.epfl.ch> References: <1050507950.3e9d7aaef15d5@imapwww.epfl.ch> Message-ID: <3E9D7BE9.4080306@creatis.insa-lyon.fr> http://vtk.org/pipermail/vtkusers/2003-April/017424.html [quoting Christopher] vanessa.noguesruiz at epfl.ch wrote: > Hello. > > I would like to know how to read points from a polydata vtk file, as I do the > following: > > vtkPolyDataReader *lector = vtkPolyDataReader::New(); > lector->SetFileName ("D:/Proyecto/vtk/cube.vtk"); > vtkPolyData *info=vtkPolyData::New(); > info=lector->GetOutput(); > vtkPoints *points=vtkPoints::New(); > points=info->GetPoints(); > > and I don't get any points pointed by "points". > Could anyone explainme why I am not getting the data in this way? I've also > tried to get polygons cells and verts, but it always results NULL or a > exception is launched when running, although it compiles and links perfectly. > > Thanks in advance. > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From philipp.batchelor at kcl.ac.uk Wed Apr 16 13:05:02 2003 From: philipp.batchelor at kcl.ac.uk (philipp.batchelor at kcl.ac.uk) Date: Wed, 16 Apr 2003 18:05:02 +0100 (BST) Subject: [vtkusers] (no subject) In-Reply-To: <1050507950.3e9d7aaef15d5@imapwww.epfl.ch> Message-ID: Maybe I'm saying something stupid, but is the line > vtkPoints *points=vtkPoints::New(); necessary? why allocate it? shouldn't > vtkPoints *points=info->GetPoints(); be enough? Ph On Wed, 16 Apr 2003 vanessa.noguesruiz at epfl.ch wrote: > Hello. > > I would like to know how to read points from a polydata vtk file, as I do the > following: > > vtkPolyDataReader *lector = vtkPolyDataReader::New(); > lector->SetFileName ("D:/Proyecto/vtk/cube.vtk"); > vtkPolyData *info=vtkPolyData::New(); > info=lector->GetOutput(); > vtkPoints *points=vtkPoints::New(); > points=info->GetPoints(); > > and I don't get any points pointed by "points". > Could anyone explainme why I am not getting the data in this way? I've also > tried to get polygons cells and verts, but it always results NULL or a > exception is launched when running, although it compiles and links perfectly. > > Thanks in advance. From will.schroeder at kitware.com Wed Apr 16 13:11:22 2003 From: will.schroeder at kitware.com (Will Schroeder) Date: Wed, 16 Apr 2003 13:11:22 -0400 Subject: [vtkusers] ANNOUNCE: VTK Course July 24,25 in Albany NY, USA Message-ID: <5.1.0.14.0.20030416115557.03643f20@pop.biz.rr.com> Hi Folks- This is an announcement for the 2003 VTK Developer's Course in Albany NY USA on July 24, 25. Details ---------- The VTK Developer's Course will be taught over a 2-day period on July 24,25, 2003 in the Albany NY area. The course covers the inner workings of VTK and will help you learn how to more effectively use, modify, and extend VTK. See http://www.kitware.com/products/proftrain.html for additional information about the course content. The course is taught by VTK experts and includes course notes and the two books "The VTK User's Guide for Version 4.2" and the new "The Visualization Toolkit" third edition textbook. Refreshments, lunches and a Thursday night dinner extravaganza will be provided. Course attendees are expected to have a basic knowledge of C or C++ and the fundamentals of visualization. This year we are requesting that course attendees bring laptops (or other computer), and that VTK version 4.2 and the course exercises are installed prior to the first day of class. (Course attendees will receive the necessary help to get VTK running prior to the start of the course. A limited number of computers can be provided in lieu of a laptop if necessary. Inquire for details.) Course pricing is $1000 if registration and payment is received before June 1. After that date, the course cost is $1200. Register for the course by filling out this form (http://www.kitware.com/products/Course.pdf) or contacting us here at Kitware. Additional information is available from kitware at kitware.com or at 518-371-3971. Thank you for your interest, Will Schroeder From winston at cat.rpi.edu Wed Apr 16 13:36:40 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Wed, 16 Apr 2003 13:36:40 -0400 Subject: [vtkusers] rectilinear grid problem References: <200304161708.04014.tim.fooy@pandora.be> Message-ID: <3E9D94A8.7AE93980@cat.rpi.edu> Tim Fooy wrote: > > I just spent over two hours trying to figure out what is wrong with this > datafile and this code... If someone sees the error, then please let me > know. Have you tried pressing 'u' and using the various objects' Print methods to see where the pipeline has broken? -Jeremy From leonardosoto at ieee.org Mon Apr 14 21:06:20 2003 From: leonardosoto at ieee.org (Leonardo Soto) Date: Mon, 14 Apr 2003 18:06:20 -0700 Subject: [vtkusers] vtkBorlandRenderWindow bug? Message-ID: <002f01c302eb$3a6259c0$1dcb5392@utalca.cl> Hello VTK developers I've been using the vtkBorlandRenderWindow and everything goes fine if I add no object to the renderer of the component, but if I do so then it crashes when I close the application. The exception is raised at: DummyCritSect.Lock(); // vtkPolyData::~vtkPolyData() If I destroy the component before the form is closed (on the OnFormClose event) then there is no exception but there are some resource leaks. What can I do to get it right? Thanks, Leo From byronea at u.washington.edu Wed Apr 16 14:13:37 2003 From: byronea at u.washington.edu (Byron Amerson) Date: Wed, 16 Apr 2003 11:13:37 -0700 (PDT) Subject: [vtkusers] new user attempting install on mac OSX Message-ID: Hello, I am attempting an install of VTK with the goal of then installing mayavi. Im using a mac imac ppc running OSX.2.4 with developer tools installed, all relevant unix apps are installed via fink -- and here is where I think the problem is. The make sequence gets hung up looking for the python2.2 libs and python utils lib (does this mean 'distutils'??). Fink moves things around a bit, here are what I think are the correct paths to the pythons libs: /sw/lib/python2.2/ and /sw/lib/python2.2/distutils/ --Are these correct?? Are there any fink users out there who have install VTK with the python wrappers succesfully? Any help would be greatly appreciated. Thanks! The following errors are returned by make: Building shared module /usr/local/VTK-4.2.2/bin/libvtkCommonPython.so... ld: can't map file: /sw/lib ((os/kern) invalid argument) make[3]: *** [/usr/local/VTK-4.2.2/bin/libvtkCommonPython.so] Error 1 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Common] Error 2 make: *** [default_target] Error 2 Byron Amerson MS student University of Washington Department of Earth and Space Sciences From wangcha at cis.ohio-state.edu Wed Apr 16 14:38:37 2003 From: wangcha at cis.ohio-state.edu (Chaoli Wang) Date: Wed, 16 Apr 2003 14:38:37 -0400 Subject: [vtkusers] how to get the data from vtkPlaneWidget Message-ID: <008901c30447$649659f0$30746ba4@Graphix> I need to get the data slice from a plane widget interacting with a 3D volume and display the slice in a 2D actor. I tried vtkPolyDataMapper2D and vtkActor2D, but it did not work. Anyone know this or any suggestions? Thanks! Chaoli -------------- next part -------------- An HTML attachment was scrubbed... URL: From glehmann at imaging.robarts.ca Wed Apr 16 13:43:29 2003 From: glehmann at imaging.robarts.ca (Glen Lehmann) Date: Wed, 16 Apr 2003 13:43:29 -0400 Subject: [vtkusers] new user attempting install on mac OSX In-Reply-To: References: Message-ID: <3E9D9641.4030804@imaging.robarts.ca> Hi Byron, your CMakeCache.txt should have this line; PYTHON_LIBRARY:FILEPATH=/sw/lib/python2.2/config/libpython2.2.dylib as a general rule if you can't "ld" the filepath in a terminal then cmake will complain on os x. glen Byron Amerson wrote: >Hello, > >I am attempting an install of VTK with the goal of then installing mayavi. >Im using a mac imac ppc running OSX.2.4 with developer tools >installed, all relevant unix apps are installed via fink -- and here is >where I think the problem is. The make sequence gets hung up looking for >the python2.2 libs and python utils lib (does this mean 'distutils'??). > >Fink moves things around a bit, here are what I think are the correct >paths to the pythons libs: /sw/lib/python2.2/ and >/sw/lib/python2.2/distutils/ --Are these correct?? > >Are there any fink users out there who have install VTK with the python >wrappers succesfully? Any help would be greatly appreciated. Thanks! > >The following errors are returned by make: > >Building shared module >/usr/local/VTK-4.2.2/bin/libvtkCommonPython.so... >ld: can't map file: /sw/lib ((os/kern) invalid argument) >make[3]: *** [/usr/local/VTK-4.2.2/bin/libvtkCommonPython.so] Error 1 >make[2]: *** [default_target] Error 2 >make[1]: *** [default_target_Common] Error 2 >make: *** [default_target] Error 2 > > >Byron Amerson >MS student >University of Washington >Department of Earth and Space Sciences > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > From vanessa.noguesruiz at epfl.ch Wed Apr 16 14:49:16 2003 From: vanessa.noguesruiz at epfl.ch (vanessa.noguesruiz at epfl.ch) Date: Wed, 16 Apr 2003 20:49:16 +0200 (MEST) Subject: [vtkusers] (no subject) Message-ID: <1050518956.3e9da5ac1bd2c@imapwww.epfl.ch> Does anybody knows if it's possible to create a project -with cmake under Windows, MVC++ v6 &/or under Linux Red Hat- that incorporates vtk files: .cxx that accesses to vtk libraries and other files .cxx that access to other libraries -I have to incorporate .cxx and .h, they are not precompiled I think- . Is it possible? Because I am doing it with a CMakeLists.txt like the following: PROJECT (Reader) INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake) IF (USE_VTK_FILE) INCLUDE(${USE_VTK_FILE}) ENDIF (USE_VTK_FILE) ADD_EXECUTABLE(Reader Reader.cxx ScalarVolume.cxx) LINK_LIBRARIES( vtkRendering vtkGraphics vtkImaging vtkFiltering vtkCommon vtkIO vtkHybrid vtkParallel ) //Reader.cxx accesses to .vtk library //ScalarVolume.cxx accesses to mip library //Both .cxx in the same directory where CMakeLists.txt is and where source directory CMake points. and the answer is that it can't create a MVC++ workspace. If it works under Linux, please tell me anyway, because I should really work under this one. Thanks in advance, Van From byronea at u.washington.edu Wed Apr 16 14:57:48 2003 From: byronea at u.washington.edu (Byron Amerson) Date: Wed, 16 Apr 2003 11:57:48 -0700 (PDT) Subject: [vtkusers] new user attempting install on mac OSX In-Reply-To: <3E9D9641.4030804@imaging.robarts.ca> Message-ID: thanks Glen, one more related question: what about the //Utility library needed for vtkpython PYTHON_UTIL_LIBRARY:FILEPATH= is this set equal to: /sw/lib/python2.2/distutils ? Byron On Wed, 16 Apr 2003, Glen Lehmann wrote: > Hi Byron, > > your CMakeCache.txt should have this line; > > PYTHON_LIBRARY:FILEPATH=/sw/lib/python2.2/config/libpython2.2.dylib > > as a general rule if you can't "ld" the filepath in a terminal then > cmake will complain on os x. > > glen > > Byron Amerson wrote: > > >Hello, > > > >I am attempting an install of VTK with the goal of then installing mayavi. > >Im using a mac imac ppc running OSX.2.4 with developer tools > >installed, all relevant unix apps are installed via fink -- and here is > >where I think the problem is. The make sequence gets hung up looking for > >the python2.2 libs and python utils lib (does this mean 'distutils'??). > > > >Fink moves things around a bit, here are what I think are the correct > >paths to the pythons libs: /sw/lib/python2.2/ and > >/sw/lib/python2.2/distutils/ --Are these correct?? > > > >Are there any fink users out there who have install VTK with the python > >wrappers succesfully? Any help would be greatly appreciated. Thanks! > > > >The following errors are returned by make: > > > >Building shared module > >/usr/local/VTK-4.2.2/bin/libvtkCommonPython.so... > >ld: can't map file: /sw/lib ((os/kern) invalid argument) > >make[3]: *** [/usr/local/VTK-4.2.2/bin/libvtkCommonPython.so] Error 1 > >make[2]: *** [default_target] Error 2 > >make[1]: *** [default_target_Common] Error 2 > >make: *** [default_target] Error 2 > > > > > >Byron Amerson > >MS student > >University of Washington > >Department of Earth and Space Sciences > > > >_______________________________________________ > >This is the private VTK discussion list. > >Please keep messages on-topic. Check the FAQ at: > >Follow this link to subscribe/unsubscribe: > >http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From glehmann at imaging.robarts.ca Wed Apr 16 15:07:28 2003 From: glehmann at imaging.robarts.ca (Glen Lehmann) Date: Wed, 16 Apr 2003 15:07:28 -0400 Subject: [vtkusers] new user attempting install on mac OSX In-Reply-To: References: Message-ID: <3E9DA9F0.7080801@imaging.robarts.ca> on my linux box it's set to /usr/lib/libutil.so but I've never tried setting it in os x. it's not necessary for the build so you can just leave is as notfound. good luck, glen Byron Amerson wrote: >thanks Glen, > >one more related question: what about the //Utility library needed for >vtkpython PYTHON_UTIL_LIBRARY:FILEPATH= > >is this set equal to: /sw/lib/python2.2/distutils ? > >Byron > >On Wed, 16 Apr 2003, Glen Lehmann wrote: > > > >>Hi Byron, >> >>your CMakeCache.txt should have this line; >> >>PYTHON_LIBRARY:FILEPATH=/sw/lib/python2.2/config/libpython2.2.dylib >> >>as a general rule if you can't "ld" the filepath in a terminal then >>cmake will complain on os x. >> >>glen >> >>Byron Amerson wrote: >> >> >> >>>Hello, >>> >>>I am attempting an install of VTK with the goal of then installing mayavi. >>>Im using a mac imac ppc running OSX.2.4 with developer tools >>>installed, all relevant unix apps are installed via fink -- and here is >>>where I think the problem is. The make sequence gets hung up looking for >>>the python2.2 libs and python utils lib (does this mean 'distutils'??). >>> >>>Fink moves things around a bit, here are what I think are the correct >>>paths to the pythons libs: /sw/lib/python2.2/ and >>>/sw/lib/python2.2/distutils/ --Are these correct?? >>> >>>Are there any fink users out there who have install VTK with the python >>>wrappers succesfully? Any help would be greatly appreciated. Thanks! >>> >>>The following errors are returned by make: >>> >>>Building shared module >>>/usr/local/VTK-4.2.2/bin/libvtkCommonPython.so... >>>ld: can't map file: /sw/lib ((os/kern) invalid argument) >>>make[3]: *** [/usr/local/VTK-4.2.2/bin/libvtkCommonPython.so] Error 1 >>>make[2]: *** [default_target] Error 2 >>>make[1]: *** [default_target_Common] Error 2 >>>make: *** [default_target] Error 2 >>> >>> >>>Byron Amerson >>>MS student >>>University of Washington >>>Department of Earth and Space Sciences >>> >>>_______________________________________________ >>>This is the private VTK discussion list. >>>Please keep messages on-topic. Check the FAQ at: >>>Follow this link to subscribe/unsubscribe: >>>http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> >>> >>_______________________________________________ >>This is the private VTK discussion list. >>Please keep messages on-topic. Check the FAQ at: >>Follow this link to subscribe/unsubscribe: >>http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > > > From Scott.Harris at wpafb.af.mil Wed Apr 16 15:30:58 2003 From: Scott.Harris at wpafb.af.mil (Harris Scott R Civ AFRL/SNJM) Date: Wed, 16 Apr 2003 15:30:58 -0400 Subject: [vtkusers] Strange problem with Python Message-ID: <67348AAF0635D511866A00508BDF0CC805C0A258@fszhtv11.wpafb.af.mil> 1. If I try to import the libs from an interactive session, things work perfectly. 2. I have two different sets of VTK libraries. The 4.2.2 release and the CVS version. I export PYTHONPATH to point to the version I want to use. I keep everything in the VTK directory. 3. I don't think I'm doing anything funny with sys.path. 5. No threads! The strange thing is that both the CVS and 4.2.2 demos work. I can write a short test program and it works. Only my app (which is quite large) has problems with importing the CVS version of VTK. The 4.2.2 version works perfectly with my app. Only the CVS version has problems. If I only import some of the libraries instead of doing 'from vtk import *' I end up causing an similar error to occur in a different import in a different part of the program. I can chase the error around, but I can't eliminate it. Still baffled, -Scott scottrharris at earthlink.net >>>>> "HS" == Harris Scott R Civ writes: HS> I get this error when my program starts: [snip] HS> 7, in ? from libvtkImagingPython import * ImportError: HS> /home/scott/VTK/bin/libvtkImagingPython.so: R_PPC_REL24 HS> relocation at 0x0d9a5d48 for symbol `utterworthHighPassPCc' HS> out of range Hmm, I also dont understand the error. Here are a few thoughts: 1. What happens if you try this on an interactive session? from libvtkImagingPython import * How about ldd on libvtkImagingPython.so? 2. Do you have different versions of the vtk libraries on your system? Or do you have many copies of the libraries, perhaps the linker is confused by some older copies. 3. Are you doing something funny with sys.path in your application? 4. Are you doing something funny with threads? A real shot in the dark! [snip] HS> I don't see the problem with the 4.2.2 relese. I've compiled HS> both 4.2.2 and the CVS version with identical options in HS> ccmake. I assume both crash? Perhaps the presence of both libs is causing the problem? Good luck! cheers, prabhu From Scott.Harris at wpafb.af.mil Wed Apr 16 15:37:39 2003 From: Scott.Harris at wpafb.af.mil (Harris Scott R Civ AFRL/SNJM) Date: Wed, 16 Apr 2003 15:37:39 -0400 Subject: [vtkusers] Using the 3D Widgets with wxPython Message-ID: <67348AAF0635D511866A00508BDF0CC805C0A259@fszhtv11.wpafb.af.mil> Has anyone used the 3D Widgets in VTK with wxPython? Let's say I wanted to use a vtkBoxWidget. What do I pass to the SetInteractor() method since I don't have a vtkRenderWindowInteractor? It won't take a wxVTKRenderWindow (Although I should double check maybe I'm using the one supplied by wxPython instead of the VTK version). Is there a way to make a vtkRenderWindowInteractor that will just pass selected events from wxPython to the 3D Widgets? Maybe somebody has a short example or some ideas on how to get this to work? Thanks, -Scott scottrharris at earthlink.net From mgsassi at criba.edu.ar Wed Apr 16 15:49:50 2003 From: mgsassi at criba.edu.ar (Maximiliano Sassi) Date: Wed, 16 Apr 2003 16:49:50 -0300 Subject: [vtkusers] Structured Grids Message-ID: <5.1.0.14.0.20030416164452.00ba84f0@pop3.criba.edu.ar> Hi, i?m using vtk to do flow visualization in oceanography. I?m using c++ and doing some stuff with structured grids, if someone is doing something similar please write to me. If anybody can provide some examples better, i?ll be gratefull. Thanks. -------------- next part -------------- --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.470 / Virus Database: 268 - Release Date: 08/04/2003 From dean.inglis at on.aibn.com Wed Apr 16 15:56:15 2003 From: dean.inglis at on.aibn.com (Dean Inglis) Date: Wed, 16 Apr 2003 15:56:15 -0400 Subject: [vtkusers] problems using vtkBorlandRenderWindow Message-ID: Hi Leonardo, I have done some minor work on vtkBorlandRenderWindow, it was orginally developed by J Biddiscombe. I have been using it extensively in Borland C++ Builder 5 Professional for several years now without problems, although there is always room for improvement. If you have suggestions/edits I would be happy to assist...BTW, I just compiled the component and ran the vtk borland test app with no problems - Win 2000 Pro, BCB5, latest vtk cvs. Dean From c.p.botha at its.tudelft.nl Wed Apr 16 15:54:27 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Wed, 16 Apr 2003 21:54:27 +0200 Subject: [vtkusers] Using the 3D Widgets with wxPython In-Reply-To: <67348AAF0635D511866A00508BDF0CC805C0A259@fszhtv11.wpafb.af.mil> References: <67348AAF0635D511866A00508BDF0CC805C0A259@fszhtv11.wpafb.af.mil> Message-ID: <20030416195427.GA5790@dutidad.twi.tudelft.nl> On Wed, Apr 16, 2003 at 03:37:39PM -0400, Harris Scott R Civ AFRL/SNJM wrote: > It won't take a wxVTKRenderWindow (Although I should double check maybe I'm using > the one supplied by wxPython instead of the VTK version). Maybe you should look at the wxVTKRenderWindowInteractor.py that's included with VTK. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From clinton at elemtech.com Wed Apr 16 16:09:05 2003 From: clinton at elemtech.com (Clinton Stimpson) Date: Wed, 16 Apr 2003 14:09:05 -0600 Subject: [vtkusers] Using the 3D Widgets with wxPython References: <20030416195502.20890.67453.Mailman@public.kitware.com> Message-ID: <3E9DB861.4030509@elemtech.com> I'd also suggest looking at vtkGenericRenderWindowInteractor. I've successfully used it in creating my own GUI integration (my own event loop) and using 3D widgets. The docs says it also allows scripting languages to use interaction styles and 3D widgets. Clint >--__--__-- > >Message: 14 >Date: Wed, 16 Apr 2003 21:54:27 +0200 >From: "Charl P. Botha" >To: vtkusers at public.kitware.com >Subject: Re: [vtkusers] Using the 3D Widgets with wxPython > >On Wed, Apr 16, 2003 at 03:37:39PM -0400, Harris Scott R Civ AFRL/SNJM wrote: > > >>It won't take a wxVTKRenderWindow (Although I should double check maybe I'm using >>the one supplied by wxPython instead of the VTK version). >> >> > >Maybe you should look at the wxVTKRenderWindowInteractor.py that's included >with VTK. > > > From tdeschamps at lbl.gov Wed Apr 16 18:36:43 2003 From: tdeschamps at lbl.gov (Thomas Deschamps) Date: Wed, 16 Apr 2003 15:36:43 -0700 Subject: [vtkusers] Re: Pb using vtkAppendPolyData & vtkPolyDataConnectivityFilter References: <3E9B4C22.7040103@lbl.gov> Message-ID: <3E9DDAFB.1050707@lbl.gov> Dear vtkUsers, I am still trying to select some 2D contours which are smaller or equal to a given number of lines (not all contours are closed) I've found something that I don't understand using vtkPolyDataConnectivityFilter & vtkAppendPolyData. Using the code mentionned in the previous thread, i've realized that the myPolyData is strangely modified by this routine. If I keep a copy of my object and I compare them after, I can see that: Before: Verts = 0x87bd290 Lines = 0x862cbb0 Polys = 0x862cc58 Strips = 0x8624f80 After Verts = 0x0 Lines = 0x85a3ea8 Polys = 0x0 Strips = 0x0 And I've found another strange behavior: if I rerun the same routine on my new polydata, it takes MUCH longer (x10). All this time is takent by connectivity -> Update(); It is like the polydata created by vtkAppendPolyData takes more time to be accessed by the method SetExtractionModeToSpecifiedRegions(); Anyone has an idea? Thomas Thomas Deschamps wrote: > Hi vtkUsers, > > I am using vtkAppendPolyData for selecting contours which have a > certain length among all the contours I have. > My problem is that it takes a LOT of time. > > The following code remove all the closed contours which have a length > smaller than contourLength > void function( int contourLength, vtkPolyData * myPolyData ) > { > vtkPolyDataConnectivityFilter * connectivity = > vtkPolyDataConnectivityFilter::New (); > connectivity -> SetInput( myPolyData ); > connectivity -> SetExtractionModeToSpecifiedRegions(); > connectivity -> Update(); > > vtkPolyData * localPolyData = vtkPolyData::New(); > int nbRegions = connectivity -> GetNumberOfExtractedRegions(); > for( int i = 0 ; i < nbRegions ; i++ ) { > vtkAppendPolyData * append = vtkAppendPolyData::New(); > connectivity -> AddSpecifiedRegion(i); > connectivity -> Update(); > int nbLines = connectivity -> GetOutput() -> GetNumberOfLines(); > if( nbLines >= contourLength ) > append -> AddInput( connectivity -> GetOutput() ); > append -> AddInput( localPolyData ); > append -> Update(); > localPolyData -> DeepCopy( append -> GetOutput()); > connectivity -> DeleteSpecifiedRegion(i); > append -> Delete(); > } > myPolyData -> DeepCopy( localPolyData ); > localPolyData -> Delete(); > connectivity -> Delete(); > } > > You may ask why I am not using the "append" outside of the loop. > This is because it looks like append -> AddInput() is not making a > copy of the input polydata, but keeps track of the pointer, even if > this pointer is modified in the future. Therefore it was not working > like that. > > When the number of contours is > 1000, and when each contour is > between 4 and 700 lines, it takes 30 minutes... > There is surely something more efficient that what I am doing, but I > don't know what. > Thank you for reading this. > > Thomas (tdeschamps at lbl.gov) > > > From jdhunter at ace.bsd.uchicago.edu Wed Apr 16 18:44:56 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 16 Apr 2003 17:44:56 -0500 Subject: [vtkusers] image viewer in small window Message-ID: I want to display some 3D BMP image data with a vtkImageViewer in a small preview window. The data are 512x512 and the preview window is 256x256. If I don't transform the data, only a quadrant of the image is shown in the preview window. So I am transforming the image data with vtkTransform and vtkImageReslice to get it to fit in the smaller window. outDim = 256 inDim = 512 scale = inDim/outDim transform = vtk.vtkTransform() transform.Scale(scale, scale, scale) reslice = vtk.vtkImageReslice() reslice.SetInput(reader.GetOutput()) reslice.SetResliceTransform(transform) viewer = vtk.vtkImageViewer() viewer.SetInput(reslice.GetOutput()) ...some other viewer commands ... preview = GtkGLExtVTKRenderWindow() preview.set_size_request(outDim, outDim) preview.show() This works, but it seems like a lot of work for an easy task. Is this the right way to do it? Thanks, John Hunter From a.umpleby at imperial.ac.uk Wed Apr 16 18:57:09 2003 From: a.umpleby at imperial.ac.uk (Adrian Umpleby) Date: Wed, 16 Apr 2003 23:57:09 +0100 Subject: VTK on OSX with Mayavi (was: Re: [vtkusers] new user attempting install on mac OSX) In-Reply-To: Message-ID: Hi everyone, > I am attempting an install of VTK with the goal of then installing > mayavi. While this subject is around on-list, I thought it would be worth recounting my own experiences with VTK on OSX. I've been using Mayavi under OSX for a while now, both under X11 and Aqua (by starting from the appropriate python installation, I can actually have both versions running at once, which is quite neat :-) The X11 version compiles and runs without a problem under XDarwin (XFree86 4.1 through latest 4.3) and Apple's X11, once I had compiled and installed tcltk and python (for use with X11, rather than the 'OSX-standard' framework versions). [Except for a weird several minute 'CPU-heavy' problem with Mayavi's VelocityVectors module with hardware GL, which I suspect is actually a bug in Apple's GL implementation in OSX10.2 -it only takes a few seconds with software GL, or OSX10.1 - the problem is also apparent in the 'Aqua' compiled version under OSX10.2.] However, getting the 'Aqua' version of Mayavi running was a totally different matter... I first compiled VTK on OSX nearly a year ago, under OSX 10.1(.3?). There were numerous issues to get it roughly going, not least of which was an Aqua Tkinter. There are still some issues with Tkinter, but they are not serious, and I've largely worked around the more 'annoying' ones. However, there are several problems I found when compiling VTK and using it via Mayavi, so I'll go through those here... 1) Using gcc3.1 (on OSX10.2 -I have 10.2.3 on my Quicksilver G4) appears to compile VTK fine. But the problems appear when actually trying to use VTK. As soon as I try to 'import libvtkCommonPython' in python it hangs. Using gdb, it appears to be getting into some sort of mutex lock whilst loading the dylib. I see the same with 'package require vtk' in tcl. Just running vtk (i.e. simply type 'vtk' in Terminal) also has the same behaviour (i.e. it hangs, and gdb reports it is stuck in a mutex lock during dylib loading). 2) Switching to gcc2.95.2 (using 'gcc_select 2' on OSX10.2, or compiling under OSX10.1 -I have OSX10.1.3 on my TiBook) causes major problems with undefined symbols. Removing all those '#ifdef __APPLE_CC__' sections in the VTK code, and the '-init...' option in the Makefiles, gets further, but there are still many undefined symbols when creating some of the dylibs (libvtkImaging.dylib being the first). I think they are related to the c++ name mangling, and occur from vtkImageIterator and vtkImageProgressIterator. Adding '-undefined suppress' to the appropriate Makefiles allows VTK compilation to successfully finish. This is all with VTK 4.2, and it's probably worth noting that I didn't have any of these issues when I first compiled it for aqua nearly a year ago under OSX10.1 - that was taken from CVS early July last year. Since those symbols are effectively still undefined, does this mean there are some things related to these 'iterators' in my VTK which will fail when something tries to use them? (Does Mayavi make any use of these at any point? How can I test this?) 3) Running Mayavi has to be done interactively through the python command-line - the "open" dialog box does not work. (That's not a VTK issue, though, so I'll say no more - files can be opened using "m=mayavi.mayavi()" to get the mayavi window, followed by "f=m.open_vtk('/path/to/file',0)".) 4) Once a file has opened, Mayavi crashes in vtkOpenGLRenderer::ClearLights (well, when that calls glLightModeli, anyway). I guess this is a VTK problem...? Commenting out the gl calls there allows it to work. Any ideas what's going on here? (Had this problem back in July, too...) 5) There are numerous issues which I presume are to do with tk (or python?), such as errors trying to view the pipeline, problems with titlebar-less windows (such as the streamline controls window, which I presume is 'cos it's kind of 'modal' under X11 - but having no titlebar causes problems once the 'staggering' makes it open partly below the screen level since it can't be moved fully onscreen!), errors trying to configure integration parameters for streamlines/tubes (the configure window fails to appear), etc., etc. I expect these are not to do with VTK at all, but I throw them out in case anyone here has any thoughts... Does anyone else have experience using VTK from Mayavi with Aqua Tkinter under OSX? If you got this far, thanks for your patience! Adrian From Kyle_Roberson at duratekinc.com Wed Apr 16 19:40:33 2003 From: Kyle_Roberson at duratekinc.com (Roberson, Kyle) Date: Wed, 16 Apr 2003 16:40:33 -0700 Subject: [vtkusers] adding cell data directly Message-ID: <4C7EFB6E2A295648AFE702CA96CD482F9593DF@wmns1.duratekinc.com> I'm gradually closing in on the ability to construct an unstructured grid with associated data. I can now make the grid and write it out. What I can't do yet is add data to the cells (or points). I looked at the tutorial presentation referenced earlier, but that syntax doesn't work for me... vtkAddScalars is not defined. Anyway, here I'm creating a hexahedron and adding it to an unstructured grid through a filter. Can I add a scalar value to the cell now? Say an interger v[1]? "C3D8R" is an ABAQUS element name... Cheers, Kyle P.S. sorry if you get an html version of this message. I'm doing this in plain text but when I see it comeback in the digest it is in html... python code follows: elif v[0] == "C3D8R" : thingPoints = vtk.vtkPoints() thingPoints.SetNumberOfPoints(8) thingPoints.InsertPoint(0, node[v[2]][0], node[v[2]][1], node[v[2]][2]) thingPoints.InsertPoint(1, node[v[3]][0], node[v[3]][1], node[v[3]][2]) thingPoints.InsertPoint(2, node[v[4]][0], node[v[4]][1], node[v[4]][2]) thingPoints.InsertPoint(3, node[v[5]][0], node[v[5]][1], node[v[5]][2]) thingPoints.InsertPoint(4, node[v[6]][0], node[v[6]][1], node[v[6]][2]) thingPoints.InsertPoint(5, node[v[7]][0], node[v[7]][1], node[v[7]][2]) thingPoints.InsertPoint(6, node[v[8]][0], node[v[8]][1], node[v[8]][2]) thingPoints.InsertPoint(7, node[v[9]][0], node[v[9]][1], node[v[9]][2]) aThing = vtk.vtkHexahedron() aThing.GetPointIds().SetId(0, 0) aThing.GetPointIds().SetId(1, 1) aThing.GetPointIds().SetId(2, 2) aThing.GetPointIds().SetId(3, 3) aThing.GetPointIds().SetId(4, 4) aThing.GetPointIds().SetId(5, 5) aThing.GetPointIds().SetId(6, 6) aThing.GetPointIds().SetId(7, 7) aThingGrid = vtk.vtkUnstructuredGrid() aThingGrid.Allocate(1, 1) aThingGrid.InsertNextCell(aThing.GetCellType(),\ aThing.GetPointIds()) aThingGrid.SetPoints(thingPoints) pipeline.AddInput(aThingGrid) -------------- next part -------------- An HTML attachment was scrubbed... URL: From byronea at u.washington.edu Wed Apr 16 21:48:36 2003 From: byronea at u.washington.edu (Byron Amerson) Date: Wed, 16 Apr 2003 18:48:36 -0700 (PDT) Subject: [vtkusers] new user attempting install on mac OSX In-Reply-To: <3E9D9641.4030804@imaging.robarts.ca> Message-ID: Glen, Thanks for your comments earlier...things moved along great for two hours or more...and then a make error was returned (see below). I do not know what it is complaining about. you mentioned "ld'ing" a file path - I do not know how it applies here- forgive my ignorance, I am still riding the unix learning curve. Any help in this regard would be appreciated. Thanks. Building shared library /usr/local/VTK-4.2.2/bin/libvtkRendering.dylib... ld: Undefined symbols: _glXChooseVisual _glXCreateContext _glXDestroyContext _glXGetClientString _glXGetConfig _glXGetCurrentContext _glXIsDirect _glXMakeCurrent _glXQueryExtension _glXQueryExtensionsString _glXQueryServerString _glXSwapBuffers /usr/bin/libtool: internal link edit command failed make[3]: *** [/usr/local/VTK-4.2.2/bin/libvtkRendering.dylib] Error 1 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Rendering] Error 2 make: *** [default_target] Error 2 Byron Amerson MS student University of Washington Department of Earth and Space Sciences On Wed, 16 Apr 2003, Glen Lehmann wrote: > Hi Byron, > > your CMakeCache.txt should have this line; > > PYTHON_LIBRARY:FILEPATH=/sw/lib/python2.2/config/libpython2.2.dylib > > as a general rule if you can't "ld" the filepath in a terminal then > cmake will complain on os x. > > glen > > Byron Amerson wrote: > > >Hello, > > > >I am attempting an install of VTK with the goal of then installing mayavi. > >Im using a mac imac ppc running OSX.2.4 with developer tools > >installed, all relevant unix apps are installed via fink -- and here is > >where I think the problem is. The make sequence gets hung up looking for > >the python2.2 libs and python utils lib (does this mean 'distutils'??). > > > >Fink moves things around a bit, here are what I think are the correct > >paths to the pythons libs: /sw/lib/python2.2/ and > >/sw/lib/python2.2/distutils/ --Are these correct?? > > > >Are there any fink users out there who have install VTK with the python > >wrappers succesfully? Any help would be greatly appreciated. Thanks! > > > >The following errors are returned by make: > > > >Building shared module > >/usr/local/VTK-4.2.2/bin/libvtkCommonPython.so... > >ld: can't map file: /sw/lib ((os/kern) invalid argument) > >make[3]: *** [/usr/local/VTK-4.2.2/bin/libvtkCommonPython.so] Error 1 > >make[2]: *** [default_target] Error 2 > >make[1]: *** [default_target_Common] Error 2 > >make: *** [default_target] Error 2 > > > > > >Byron Amerson > >MS student > >University of Washington > >Department of Earth and Space Sciences > > > >_______________________________________________ > >This is the private VTK discussion list. > >Please keep messages on-topic. Check the FAQ at: > >Follow this link to subscribe/unsubscribe: > >http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From shuang112 at 163.com Wed Apr 16 22:14:15 2003 From: shuang112 at 163.com (shuang) Date: Thu, 17 Apr 2003 10:14:15 +0800 (CST) Subject: [vtkusers] =?gb2312?B?cHJvYmxlbSBvZiBidWlsZGluZyB2dGsgcHJvZ3JhbQ==?= Message-ID: <3E9E0DF7.00003B.12052@bj222.163.com> Dear all: I installed vtk under redhat 8 correctly,and I can build and run examples of vtk by using cmake and make.But when I compile and build same example by using g++,I got the error as following: $g++ -L/usr/local/lib/vtk -I/usr/local/include/vtk -I/usr/local/include/vtk -I/usr/include/X11 Cone.cxx -o Cone In file included from /usr/include/c++/3.2/backward/strstream:51, from /usr/local/include/vtk/vtkIOStream.h:35, from /usr/local/include/vtk/vtkSystemIncludes.h:49, from /usr/local/include/vtk/vtkSetGet.h:31, from Cone.cxx:26: /usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. /tmp/ccwds0y0.o: In function `main': /tmp/ccwds0y0.o(.text+0x11): undefined reference to `vtkConeSource::New()' /tmp/ccwds0y0.o(.text+0x6a): undefined reference to `vtkPolyDataMapper::New()' /tmp/ccwds0y0.o(.text+0x7b): undefined reference to `vtkPolyDataSource::GetOutput()' /tmp/ccwds0y0.o(.text+0x87): undefined reference to `vtkPolyDataMapper::SetInput(vtkPolyData*)' /tmp/ccwds0y0.o(.text+0x8f): undefined reference to `vtkActor::New()' /tmp/ccwds0y0.o(.text+0xb1): undefined reference to `vtkRenderer::New()' /tmp/ccwds0y0.o(.text+0xeb): undefined reference to `vtkRenderWindow::New()' /tmp/ccwds0y0.o(.text+0x162): undefined reference to `vtkRenderer::GetActiveCamera()' /tmp/ccwds0y0.o(.text+0x16b): undefined reference to `vtkCamera::Azimuth(double)' /tmp/ccwds0y0.o: In function `vtkRenderer::AddActor(vtkProp*)': /tmp/ccwds0y0.o(.gnu.linkonce.t._ZN11vtkRenderer8AddActorEP7vtkProp+0x10): undefined reference to `vtkViewport::AddProp(vtkProp*)' collect2: ld returned 1 exit status Can anyone tell me what is the reason? thanks in advance! Shuang ============================================================= ????VIP?????????????????????????? http://vip.163.com ???????????????????????????? http://www.nease.net ?????????? - ????????????! http://love.163.com From Mathieu.Malaterre at creatis.insa-lyon.fr Thu Apr 17 02:35:56 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Thu, 17 Apr 2003 08:35:56 +0200 Subject: [vtkusers] Using the 3D Widgets with wxPython In-Reply-To: <67348AAF0635D511866A00508BDF0CC805C0A259@fszhtv11.wpafb.af.mil> References: <67348AAF0635D511866A00508BDF0CC805C0A259@fszhtv11.wpafb.af.mil> Message-ID: <3E9E4B4C.3070203@creatis.insa-lyon.fr> If you used the one shipped with VTK you'll see that the RWinteractor is accessible with: wxVTKRenderWindow._Iren mathieu Harris Scott R Civ AFRL/SNJM wrote: > Has anyone used the 3D Widgets in VTK with wxPython? > > Let's say I wanted to use a vtkBoxWidget. What do I pass to the SetInteractor() method since > I don't have a vtkRenderWindowInteractor? > > It won't take a wxVTKRenderWindow (Although I should double check maybe I'm using > the one supplied by wxPython instead of the VTK version). > > Is there a way to make a vtkRenderWindowInteractor that will just pass selected events from > wxPython to the 3D Widgets? > > Maybe somebody has a short example or some ideas on how to get this to work? > > Thanks, > -Scott > scottrharris at earthlink.net > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From b8903208 at stmail.cgu.edu.tw Thu Apr 17 03:19:58 2003 From: b8903208 at stmail.cgu.edu.tw (b8903208) Date: Thu, 17 Apr 2003 15:19:58 +0800 Subject: [vtkusers] vtk problem Message-ID: <20030417071912.M95890@stmail.cgu.edu.tw> hello!! all VTK user i have some problem: how to change data format to .vtk??? because i have a 3D image 30*128*128, it is a .v file i use matlab to open it and read it(format:"ushort"),then display it but, now i want to change its format to .vtk and show it in VolumeView what should i to do??? thank you very much.... -- Chang Gung University Student Mail Server Web Mail system By >Chang-Gung Campus Computer Communication Consortium (http://stmail.cgu.edu.tw/) From jiang at Telematik-Institut.de Thu Apr 17 03:32:00 2003 From: jiang at Telematik-Institut.de (Chunyan Jiang) Date: Thu, 17 Apr 2003 09:32:00 +0200 Subject: [vtkusers] Is there vtkPanel.java in vtk.jar? Message-ID: Hello, I use vtk4.2 and JBuilder8 in Win2000. Now I want to test a simple example SimpleCone.java. However the vtkPanel.java can not be found in vtk.jar. Does any one use vtkPanel in his application? How can I get it? Thank you very much! Chunyan *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** From jiang at Telematik-Institut.de Thu Apr 17 04:12:33 2003 From: jiang at Telematik-Institut.de (Chunyan Jiang) Date: Thu, 17 Apr 2003 10:12:33 +0200 Subject: [vtkusers] Do you find vtkPanel? Message-ID: Hello Richard, I find your question at vtk-user archive. I have the exactly same problem as yours. Do you solve it now? How? I hope you can share your experience with me. Thank a lot! Chunyan Hi, I have just downloaded 4.2 for use with java but vtkPanel has disappeared, is there a new version available? The vtkPanel shipped with 4.0 does not work with 4.2. I understood that vtkPanel was being integrated into the vtk.jar file to fix the namespace issue under java sdk 1.4? Does anyone know where I can get a vtkPanel that will work with 4.2, or a new version of the jar? On a related matter, is 4.0 still available for download? I don't see a link to it on the site. Thankyou in advance for your help, Richard. *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** From ramakrishna.prakash at quest-global.com Thu Apr 17 04:21:55 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Thu, 17 Apr 2003 13:51:55 +0530 Subject: [vtkusers] Do you find vtkPanel? In-Reply-To: Message-ID: <000d01c304ba$68ddcb60$de0ba8c0@qtwblr01.questglobal.com> Hi, Its available at http://public.kitware.com/cgi-bin/cvsweb.cgi/VTK/Wrapping/Java/vtk/ But i feel you should be using vtkCanvas instead of vtkPanel with VTK4.2. regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Chunyan Jiang Sent: Thursday, April 17, 2003 1:43 PM To: Richard.Bridge at tessella.com Cc: VTK-User Subject: [vtkusers] Do you find vtkPanel? Hello Richard, I find your question at vtk-user archive. I have the exactly same problem as yours. Do you solve it now? How? I hope you can share your experience with me. Thank a lot! Chunyan Hi, I have just downloaded 4.2 for use with java but vtkPanel has disappeared, is there a new version available? The vtkPanel shipped with 4.0 does not work with 4.2. I understood that vtkPanel was being integrated into the vtk.jar file to fix the namespace issue under java sdk 1.4? Does anyone know where I can get a vtkPanel that will work with 4.2, or a new version of the jar? On a related matter, is 4.0 still available for download? I don't see a link to it on the site. Thankyou in advance for your help, Richard. *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From ramakrishna.prakash at quest-global.com Thu Apr 17 04:30:05 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Thu, 17 Apr 2003 14:00:05 +0530 Subject: [vtkusers] Is there vtkPanel.java in vtk.jar? In-Reply-To: Message-ID: <001001c304bb$8d103170$de0ba8c0@qtwblr01.questglobal.com> Hi, Download the classes from the URL I mentioned in the previous mail compile these classes with javac -d . *.java and include vtkCanvas.class and vtkPanel.class in the vtk.jar along with the directory as jar -uvf vtk.jar vtk //vtk is the directory which contains above mentioned class files regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Chunyan Jiang Sent: Thursday, April 17, 2003 1:02 PM To: VTK-User Subject: [vtkusers] Is there vtkPanel.java in vtk.jar? Hello, I use vtk4.2 and JBuilder8 in Win2000. Now I want to test a simple example SimpleCone.java. However the vtkPanel.java can not be found in vtk.jar. Does any one use vtkPanel in his application? How can I get it? Thank you very much! Chunyan *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From tobias.straub at lmu.de Thu Apr 17 05:38:00 2003 From: tobias.straub at lmu.de (Tobias) Date: Thu, 17 Apr 2003 11:38:00 +0200 Subject: [vtkusers] new user attempting install on mac OSX In-Reply-To: Message-ID: <472EB9DF-70B8-11D7-B21D-0003935A86C6@lmu.de> > Thanks for your comments earlier...things moved along great for two > hours > or > more...and then a make error was returned (see below). I do not know > what > it is complaining about. you mentioned "ld'ing" a file path - I do not > know how it applies here- forgive my ignorance, I am still riding the > unix > learning curve. Any help in this regard would be appreciated. Thanks. > > Building shared library > /usr/local/VTK-4.2.2/bin/libvtkRendering.dylib... > ld: Undefined symbols: > _glXChooseVisual > _glXCreateContext > _glXDestroyContext > _glXGetClientString > _glXGetConfig > _glXGetCurrentContext > _glXIsDirect > _glXMakeCurrent > _glXQueryExtension > _glXQueryExtensionsString > _glXQueryServerString > _glXSwapBuffers > /usr/bin/libtool: internal link edit command failed > make[3]: *** [/usr/local/VTK-4.2.2/bin/libvtkRendering.dylib] Error 1 > make[2]: *** [default_target] Error 2 > make[1]: *** [default_target_Rendering] Error 2 > make: *** [default_target] Error 2 Hi Byron Do you have compilation on for X11? i think that this is an issue regarding the X11 gl Libs. I think it once happened to me when wrapping for NONaquaTCL/TK. and maybe i set the camke flag for X11 compilation on. i remember someone posting to the list that cmake tries to link agains the X11 gl libs instead of the openGL framework libs.. and freaks out somehow. my setup is OSX 10.2.5, AquaTCL/TK and python2.2.2 framework intstall from source. compilation for X11 was set off in cmake. BUT: mayavi is so far not working for me. Maybe i should carfully follow Adrains mail. Tobias From a.umpleby at imperial.ac.uk Thu Apr 17 06:19:02 2003 From: a.umpleby at imperial.ac.uk (Adrian Umpleby) Date: Thu, 17 Apr 2003 11:19:02 +0100 Subject: [vtkusers] new user attempting install on mac OSX In-Reply-To: <472EB9DF-70B8-11D7-B21D-0003935A86C6@lmu.de> Message-ID: <02D48E11-70BE-11D7-9439-00039310B652@imperial.ac.uk> >> Building shared library >> /usr/local/VTK-4.2.2/bin/libvtkRendering.dylib... >> ld: Undefined symbols: >> _glXChooseVisual >> _glXCreateContext >> _glXDestroyContext >> _glXGetClientString >> _glXGetConfig >> _glXGetCurrentContext >> _glXIsDirect >> _glXMakeCurrent >> _glXQueryExtension >> _glXQueryExtensionsString >> _glXQueryServerString >> _glXSwapBuffers >> /usr/bin/libtool: internal link edit command failed >> make[3]: *** [/usr/local/VTK-4.2.2/bin/libvtkRendering.dylib] Error 1 >> make[2]: *** [default_target] Error 2 >> make[1]: *** [default_target_Rendering] Error 2 >> make: *** [default_target] Error 2 I assume you are trying to compile it for use with X11 rather than Aqua? > Hi Byron > Do you have compilation on for X11? i think that this is an issue > regarding the X11 gl Libs. I think it once happened to me when wrapping > for NONaquaTCL/TK. and maybe i set the camke flag for X11 compilation > on. i remember someone posting to the list that cmake tries to link > agains the X11 gl libs instead of the openGL framework libs.. and > freaks out somehow. Yes, you need to check the CMakeCache.txt file to ensure it links against X11's GL instead of trying to use the OpenGL framework. I can't remember exactly which ones I set, but here's several relevant looking entries from mine: //X11 extra flags. CMAKE_X_CFLAGS:STRING=-I/usr/X11R6/include //Libraries and options used in X11 programs. CMAKE_X_LIBS:STRING=-lSM;-lICE;/usr/X11R6/lib/libX11.a;/usr/X11R6/lib/libXext. a //What is the path where the file GL/gl.h can be found OPENGL_INCLUDE_DIR:PATH=/usr/X11R6/include //OpenGL lib for OSX OPENGL_gl_LIBRARY:STRING=-lGL //AGL lib for OSX OPENGL_glu_LIBRARY:STRING=-lGLU //What is the path where the file X11/X.h can be found X11_X11_INCLUDE_PATH:PATH=/usr/X11R6/include //Where can the X11 library be found X11_X11_LIB:FILEPATH=/usr/X11R6/lib/libX11.a //Where can the Xext library be found X11_Xext_LIB:FILEPATH=/usr/X11R6/lib/libXext.a //What is the path where the file X11/Xlib.h can be found X11_Xlib_INCLUDE_PATH:PATH=/usr/X11R6/include //What is the path where the file X11/Xutil.h can be found X11_Xutil_INCLUDE_PATH:PATH=/usr/X11R6/include BTW, going back to a previous recent post in this thread, it's probably worth me pointing out that I did not need to set PYTHON_LIBRARY:FILEPATH to get it to compile. I have it blank: PYTHON_LIBRARY:FILEPATH= My compilation of python (and tcltk) was not via fink - it was directly from the downloaded source packages, and I fiddled the Makefiles to get them to compile for X11 rather than creating Python/Tcl/Tk frameworks. -I also found it created a static python lib, rather than dylib. Anyway, it seemed to compile fine with it blank (dunno if it's meant to...) > my setup is OSX 10.2.5, AquaTCL/TK and python2.2.2 framework intstall > from source. compilation for X11 was set off in cmake. > BUT: mayavi is so far not working for me. Maybe i should carfully > follow Adrains mail. At what stage is it going wrong? Did you compile VTK for Carbon or Cocoa? (I've yet to try it for Cocoa - that's one of my next projects...) Did you eradicate all mention of X11 lib and include paths from your CMakeCache.txt? Are you using gcc3 or gcc2? OSX10.1 or 10.2? Have you got Aqua Tkinter in your Python framework? (Try starting python, then type "import Tkinter".) Have you got the Python interpreter application, so the tk windows have a genuine OSX app to work within? Bye! Adrian From tobias.straub at lmu.de Thu Apr 17 07:26:08 2003 From: tobias.straub at lmu.de (Tobias) Date: Thu, 17 Apr 2003 13:26:08 +0200 Subject: [vtkusers] new user attempting install on mac OSX In-Reply-To: <02D48E11-70BE-11D7-9439-00039310B652@imperial.ac.uk> Message-ID: <6283F0C4-70C7-11D7-B21D-0003935A86C6@lmu.de> > > At what stage is it going wrong? Did you compile VTK for Carbon or > Cocoa? (I've yet to try it for Cocoa - that's one of my next > projects...) Did you eradicate all mention of X11 lib and include > paths from your CMakeCache.txt? Are you using gcc3 or gcc2? OSX10.1 or > 10.2? Have you got Aqua Tkinter in your Python framework? (Try > starting python, then type "import Tkinter".) Have you got the Python > interpreter application, so the tk windows have a genuine OSX app to > work within? > > Bye! > so i followed the mayavi build instructions. everything went fine. i tested vtk-usage using mayavi's included python test-script. fine. then when i start mayavi (whatever way) i get a segmentation fault. btw: python is working with vtk quite well (not perfect) esp. the renderinteractor seems to have probs with aqua tkinter. but i'm not so much into python/vtk. prefer tcl. and i also tried cocoa. which works great for me. but i do a separte build with static libraries for cocoa. the other build is for carbon/java/python/tcl with shared libs. in the carbon/python/tcl/java build i have the following settings regarding X11: //X11 extra flags. CMAKE_X_CFLAGS:STRING=-I/usr/X11R6/include //Libraries and options used in X11 programs. CMAKE_X_LIBS:STRING=-lSM;-lICE;/usr/X11R6/lib/libX11.a;/usr/X11R6/lib/ libXext.a //What is the path where the file GL/gl.h can be found OPENGL_INCLUDE_DIR:PATH=/usr/X11R6/include //OpenGL lib for OSX OPENGL_gl_LIBRARY:STRING=-framework OpenGL //AGL lib for OSX OPENGL_glu_LIBRARY:STRING=-framework AGL //Build classes for the X11 window system. VTK_USE_X:BOOL=OFF //What is the path where the file X11/X.h can be found X11_X11_INCLUDE_PATH:PATH=/usr/X11R6/include //Where can the X11 library be found X11_X11_LIB:FILEPATH=/usr/X11R6/lib/libX11.a //Where can the Xext library be found X11_Xext_LIB:FILEPATH=/usr/X11R6/lib/libXext.a //What is the path where the file X11/Xlib.h can be found X11_Xlib_INCLUDE_PATH:PATH=/usr/X11R6/include //What is the path where the file X11/Xutil.h can be found X11_Xutil_INCLUDE_PATH:PATH=/usr/X11R6/include //Dependencies for the target vtkRendering_LIB_DEPENDS:STATIC=vtkGraphics;vtkImaging;vtkftgl;vtkfreety pe;-framework AGL;-framework OpenGL;-lSM;-lICE;-lSM;-lICE;/usr/X11R6/lib/libX11.a;/usr/X11R6/lib/ libXext.a;/usr/X11R6/lib/libX11.a;/usr/X11R6/lib/libXext.a;-framework Carbon; //Dependencies for the target vtkftgl_LIB_DEPENDS:STATIC=-framework AGL;-framework OpenGL;-lSM;-lICE;-lSM;-lICE;-lSM;-lICE;/usr/X11R6/lib/libX11.a;/usr/ X11R6/lib/libXext.a;/usr/X11R6/lib/libX11.a;/usr/X11R6/lib/libXext.a;/ usr/X11R6/lib/libX11.a;/usr/X11R6/lib/libXext.a;vtkfreetype; .. so you see the paths to all the xlibs adn includes is still in the cmake.cache but i guess the point is to set VTK_USE_X:BOOL=OFF in order to link against the framework opengl instead of X11s gl.h. for the rest: i'm using gcc3, osx 10.2.5. i have aqua tkinter in the python framework and that works. and also the python interpreter. basically i's prefer to develop in cocoa environment. but for rapid testing of pipelines etc.. i prefer TCL as the cocoa compilation takes too much time for quickly setting up things. and i'm not expert enough to build something like mayavi in cocoa. Tobias From cbleihol at ix.urz.uni-heidelberg.de Thu Apr 17 07:51:18 2003 From: cbleihol at ix.urz.uni-heidelberg.de (Christian Bleiholder) Date: Thu, 17 Apr 2003 13:51:18 +0200 (METDST) Subject: [vtkusers] Picking objects in VTK and java Message-ID: Dear all, I am new to the VTK; I use the Java wrapper to VTK 4.2 and I cannot solve the following task: I use VTK to render some data structures like Spheres,etc. I then want to be able to pick (by mouse) one of these VTK-spheres and do some tasks with their underlying data structures. Can anyone help me? Regards, Christian From yass at uscx.net Thu Apr 17 07:52:48 2003 From: yass at uscx.net (yasser salman) Date: Thu, 17 Apr 2003 04:52:48 -0700 (PDT) Subject: [vtkusers] 3D MRI Volume. Message-ID: <20030417115248.3B253CF48@sitemail.everyone.net> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jiang at Telematik-Institut.de Thu Apr 17 08:33:34 2003 From: jiang at Telematik-Institut.de (Chunyan Jiang) Date: Thu, 17 Apr 2003 14:33:34 +0200 Subject: AW: [vtkusers] Is there vtkPanel.java in vtk.jar? In-Reply-To: <001001c304bb$8d103170$de0ba8c0@qtwblr01.questglobal.com> Message-ID: Shyam, I perform every step as you said. Download the vtkPanel.java and vtkCanvas.java. Then javac -d them. It generates not only one .class. There are also some other files such as vtkCanvas$1.class, vtkCanvas$DelayAction.class, and so on. I add them all to vtk.jar. However, my compiler still can not find them. I try two compiler: JBuilder8 and JCreator JBuilder8 error message: "SimpleCone.java": Error #: 302 : cannot access class vtk.vtkPanel; java.io.IOException: class not found: class vtk.vtkPanel at line 5, column 12 ..... JCreator error message: C:\jcy\JBapp\VTK test\VTKtest\src\vtktest\SimpleCone.java:5: cannot resolve symbol symbol : class vtkPanel location: package vtk import vtk.vtkPanel; But I can see vtkPanel.class in vtk.jar by winzip. How can I solve this problem? Thank you very much! Chunyan -----Urspr?ngliche Nachricht----- Von: R K Shyamprakash [mailto:ramakrishna.prakash at quest-global.com] Gesendet: Donnerstag, 17. April 2003 10:30 An: 'Chunyan Jiang'; 'VTK-User' Betreff: RE: [vtkusers] Is there vtkPanel.java in vtk.jar? Hi, Download the classes from the URL I mentioned in the previous mail compile these classes with javac -d . *.java and include vtkCanvas.class and vtkPanel.class in the vtk.jar along with the directory as jar -uvf vtk.jar vtk //vtk is the directory which contains above mentioned class files regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Chunyan Jiang Sent: Thursday, April 17, 2003 1:02 PM To: VTK-User Subject: [vtkusers] Is there vtkPanel.java in vtk.jar? Hello, I use vtk4.2 and JBuilder8 in Win2000. Now I want to test a simple example SimpleCone.java. However the vtkPanel.java can not be found in vtk.jar. Does any one use vtkPanel in his application? How can I get it? Thank you very much! Chunyan *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From Rupert.Shute at awe.co.uk Thu Apr 17 04:10:37 2003 From: Rupert.Shute at awe.co.uk (Rupert Shute) Date: Thu, 17 Apr 2003 09:10:37 +0100 Subject: [vtkusers] Chromium Message-ID: Does anyone know if Chromium has been incorporated into VTK? If so where I might be able to get hold of the code? Many thanks Rupert -- _______________________________________________________________________________ The information in this email and in any attachment(s) is commercial in confidence. If you are not the named addressee(s) or if you receive this email in error then any distribution, copying or use of this communication or the information in it is strictly prohibited. Please notify us immediately by email at intadmin at awe.co.uk, and then delete this message from your computer. While attachments are virus checked, AWE plc does not accept any liability in respect of any virus which is not detected. From maurice at akst.tn.tudelft.nl Thu Apr 17 12:25:43 2003 From: maurice at akst.tn.tudelft.nl (Maurice van de Rijzen) Date: Thu, 17 Apr 2003 16:25:43 +0000 Subject: [vtkusers] Multiple interactors in one renderwindow. In-Reply-To: <20030416101801.10306.43177.Mailman@public.kitware.com> References: <20030416101801.10306.43177.Mailman@public.kitware.com> Message-ID: <3E9ED587.5010302@akst.tn.tudelft.nl> Dear all. I've a tkRenderWindow subdivided into four subwindows. To each subwindow I attach a renderer. For one of the subwindows I want to use one of the interactorstyles of vtk and for the rest maybe another interactor-style ( I don't know yet). Now is my problem the following. Afaik, the vtkRenderWindowInteractor is coupled to a renderwindow and not to a single renderer. Is it however somehow possible to select for each renderer another interactor. Is there maybe some (easy) way to determine which rdendeer invoked the interaction. And if so, how can I using this knowledge of the renderer select for each renderer another interactor. Thanks, Maurice From tim.fooy at pandora.be Thu Apr 17 10:40:59 2003 From: tim.fooy at pandora.be (Tim Fooy) Date: Thu, 17 Apr 2003 16:40:59 +0200 Subject: [vtkusers] rectilinear grid problem In-Reply-To: <3E9D94A8.7AE93980@cat.rpi.edu> References: <200304161708.04014.tim.fooy@pandora.be> <3E9D94A8.7AE93980@cat.rpi.edu> Message-ID: <200304171640.59711.tim.fooy@pandora.be> I have just realised what the error was: I defined the grid with values 1 through 8 in one direction, and values 1 through 5000 in the other. The result was that a very long, very small line was drawn, but I never noticed it (I just think it was drawn, i really never saw it). My apologies for bothering you with this mistake. regs, Tim From anast.jm at pg.com Thu Apr 17 11:05:05 2003 From: anast.jm at pg.com (anast.jm at pg.com) Date: Thu, 17 Apr 2003 11:05:05 -0400 Subject: [vtkusers] 3D MRI Volume. Message-ID: Yasser, I think your data spacing needs to be corrected to the actual spacing of the MRI data. I doubt that with 15 slices that the x=y=z spacing. I suspect z is 5-10 times larger Reader->SetDataSpacing(1,1,1); maybe something like Reader->SetDataSpacing(0.8,0.8,4.0); Also where you commented out //volProperty->SetOpacity(oTFun); try volProperty->SetScalarOpacity(oTFun); Finally, I've not seen piecewisefunction used to create the color transfer function....you might want to try something like this from the examples (VTK/Examples/VolumeRendering/Python/SimpleRayCast.py in Python but its easily transfered to C++) # Create transfer mapping scalar value to color colorTransferFunction = vtk.vtkColorTransferFunction() colorTransferFunction.AddRGBPoint(0.0, 0.0, 0.0, 0.0) colorTransferFunction.AddRGBPoint(64.0, 1.0, 0.0, 0.0) colorTransferFunction.AddRGBPoint(128.0, 0.0, 0.0, 1.0) colorTransferFunction.AddRGBPoint(192.0, 0.0, 1.0, 0.0) colorTransferFunction.AddRGBPoint(255.0, 0.0, 0.2, 0.0) ...john Internet Mail Message Received from host: public.kitware.com [24.97.130.19] yasser salman Sent by: vtkusers-admin at public.kitware.com 04/17/2003 07:52 AM Please respond to yass To: vtk users cc: (bcc: John Anast-JM/PGI) Subject: [vtkusers] 3D MRI Volume. hi all.., there is my code to render a 3D Volume of MRI slice., it works good but it displayed in a worng way (contrast is too bad and also it seems not fit in the slice it self like the data was overlaped each other) i think the problem in reading the files(or may be in Opacity..). here is my code:..( i changed the opacity,color but no effect..).. can any one help me to find where is the problem here? vtkRenderer *aRenderer = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(aRenderer); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); vtkTIFFReader *Reader = vtkTIFFReader::New(); Reader->SetFilePrefix ("D:/tiff/TIFF/MRI"); //Location of slices Reader->SetFilePattern("%s%.4d.tif"); Reader->SetDataExtent (0,255,0,255,1,15); //No.of slices Reader->SetDataSpacing(1,1,1); Reader->Update(); vtkPiecewiseFunction *oTFun =vtkPiecewiseFunction::New(); oTFun->AddSegment(80,0.0,255,1.0); vtkPiecewiseFunction *gTFun =vtkPiecewiseFunction::New(); gTFun->AddSegment(0,1.0,255,1.0); vtkVolumeProperty *volProperty = vtkVolumeProperty::New(); volProperty->SetColor(gTFun); //volProperty->SetOpacity(oTFun); volProperty->SetInterpolationTypeToLinear(); volProperty->ShadeOn(); vtkVolumeRayCastCompositeFunction *compositeFunction= vtkVolumeRayCastCompositeFunction::New(); vtkVolumeRayCastMapper *volMapper = vtkVolumeRayCastMapper::New(); volMapper->SetInput(Reader->GetOutput()); volMapper->SetVolumeRayCastFunction(compositeFunction); vtkVolume *vol=vtkVolume::New(); vol->SetMapper(volMapper); vol->SetProperty(volProperty); aRenderer->AddVolume(vol); aRenderer->SetBackground(1,1,1); vtkCamera *aCamera = vtkCamera::New(); aCamera->SetViewUp (0, 0, -1); aCamera->SetPosition (0, 1, 0); aCamera->SetFocalPoint (0, 0, 0); aCamera->ComputeViewPlaneNormal(); aRenderer->SetActiveCamera(aCamera); aRenderer->ResetCamera (); aCamera->Dolly(1.5); renWin->SetSize(640, 480); iren->SetDesiredUpdateRate(3.0); iren->Initialize(); iren->Start(); thanx.. yasser _____________________________________________________________ Your own email, free website, free software and services at http://www.uscomputer.net/portal.htm - courtesy of U.S. Computer Corporation - _____________________________________________________________ Select your own custom email address for FREE! Get you at yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From massimo.ivani at mlsw.com Thu Apr 17 11:58:23 2003 From: massimo.ivani at mlsw.com (Massimo Ivani) Date: Thu, 17 Apr 2003 17:58:23 +0200 Subject: [vtkusers] Cut Polydata Message-ID: <005301c304fa$2d7d5730$f254dfd9@compaq> Hello vtk Users, How can I cut a vtkPolydata with another vtkPolydata and have intersection points?? Thank you. Dr. Massimo Ivani Media Lab Software Tel.: +39 0187 517775 Fax: +39 0187 511833 massimo.ivani at mlsw.com www.mlsw.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lisa.avila at kitware.com Thu Apr 17 12:11:38 2003 From: lisa.avila at kitware.com (Lisa Avila) Date: Thu, 17 Apr 2003 12:11:38 -0400 Subject: [vtkusers] 3D MRI Volume. In-Reply-To: Message-ID: <5.2.0.9.0.20030417121021.03104aa8@pop.biz.rr.com> Hello John, >Finally, I've not seen piecewisefunction used to create the color transfer >function.... It is valid to use a piecewise function - it just defines gray values instead of color. Lisa -------------- next part -------------- An HTML attachment was scrubbed... URL: From pchandra at radonc.unc.edu Thu Apr 17 12:25:00 2003 From: pchandra at radonc.unc.edu (Parag Chandra) Date: Thu, 17 Apr 2003 12:25:00 -0400 Subject: [vtkusers] Templated class members as callbacks for vtkCommand? Message-ID: <000301c304fd$e6988ca0$99221398@radonc.radonc.unc.edu> Hi all, I'm trying to attach a templated member function as the callback for an event in VTK. I searched the mailing list and found that I either had to make the member static, or call the member function indirectly through a plain C function. I chose the second approach because the first won't work for my purposes, so my code looks something like this: static void HistogramInteractorProcessPickEvent(vtkObject *object, unsigned long event, void *clientData, void *callData) { static_cast >*>(object)->ProcessPickEvent(object, event, clientData, callData); } Then inside the class, I do the following: m_PickEventCommand->SetCallback(&HistogramInteractorProcessPickEvent); this->RemoveObservers(vtkCommand::LeftButtonPressEvent); this->AddObserver(vtkCommand::LeftButtonPressEvent, m_PickEventCommand); where m_PickEventCommand is a vtkCallbackCommand. This works fine; however, what I'd really like to do is have the C function above be templated over the type of the itk Image, so something like: template static void HistogramInteractorProcessPickEvent(vtkObject *object, unsigned long event, void *clientData, void *callData) { static_cast*>(object)->ProcessPickEvent (object, event, clientData, callData); } This generates an error during compilation under both MSVC6 and Linux gcc3.2, something akin to: C:\development\aks\Code\Visualization\aksHistogramInteractor.cxx(68) : error C2664: 'SetCallback' : cannot convert parameter 1 from 'void (class vtkObject *,unsigned long,void *,void *)' to 'void (__cdecl *)(class vtkObject *,unsigned long,void *,void *)' Is there any way to make the scenario I described above work? I had a much easier time defining callbacks under ITK, so it seems like there should be some way to do it under VTK as well. Thanks in advance. Best regards, -Parag Chandra -------------- next part -------------- An HTML attachment was scrubbed... URL: From massimo.ivani at mlsw.com Thu Apr 17 12:41:56 2003 From: massimo.ivani at mlsw.com (Massimo Ivani) Date: Thu, 17 Apr 2003 18:41:56 +0200 Subject: [vtkusers] Cut Polydata Message-ID: <006e01c30500$424e9150$f254dfd9@compaq> Hello vtk Users, How can I cut a vtkPolydata with another vtkPolydata and have intersection points?? Thank you. Dr. Massimo Ivani Media Lab Software Tel.: +39 0187 517775 Fax: +39 0187 511833 massimo.ivani at mlsw.com www.mlsw.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From MulhearnJF at Npt.NUWC.Navy.Mil Thu Apr 17 12:45:26 2003 From: MulhearnJF at Npt.NUWC.Navy.Mil (Mulhearn James F NPRI) Date: Thu, 17 Apr 2003 12:45:26 -0400 Subject: [vtkusers] java Message-ID: <3BEEE23D31CAD2118D920008C75D8946044087A4@NPRI54EXC21.NPT.NUWC.NAVY.MIL> Has anyone developed a swing based JPanel ( instead of AWT based Canvas) version of vtkpanel? -------------- next part -------------- An HTML attachment was scrubbed... URL: From prabhu at aero.iitm.ernet.in Thu Apr 17 13:32:09 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Thu, 17 Apr 2003 23:02:09 +0530 Subject: VTK on OSX with Mayavi (was: Re: [vtkusers] new user attempting install on mac OSX) In-Reply-To: References: Message-ID: <16030.58649.58924.66421@monster.linux.in> >>>>> "AU" == Adrian Umpleby writes: >> I am attempting an install of VTK with the goal of then >> installing mayavi. AU> While this subject is around on-list, I thought it would be AU> worth recounting my own experiences with VTK on OSX. I have no clue about Mac's but do have some idea about MayaVi. [snip] AU> 'iterators' in my VTK which will fail when something tries to AU> use them? (Does Mayavi make any use of these at any point? How AU> can I test this?) No, MayaVi does not use the ImageIterators. AU> 3) Running Mayavi has to be done interactively through the AU> python command-line - the "open" dialog box does not AU> work. (That's not a VTK issue, though, so I'll say no more - AU> files can be opened using "m=mayavi.mayavi()" to get the AU> mayavi window, followed by "f=m.open_vtk('/path/to/file',0)".) Ugh, how come? This looks like Tkinter is broken. Can you run this: python /usr/lib/python2.1/lib-tk/tkFileDialog.py i.e. find the appropriate tkFileDialog and try to run the script. You should get a file open and file save dialog. Does that work? If not then Tkinter is somehow badly broken. AU> 4) Once a file has opened, Mayavi crashes in AU> vtkOpenGLRenderer::ClearLights (well, when that calls AU> glLightModeli, anyway). I guess this is a VTK problem...? AU> Commenting out the gl calls there allows it to work. Any ideas AU> what's going on here? (Had this problem back in July, too...) A traceback or more info would help. Of course, if this is not important (since everything works under X11) don't bother. AU> 5) There are numerous issues which I presume are to do with tk AU> (or python?), such as errors trying to view the pipeline, AU> problems with titlebar-less windows (such as the streamline AU> controls window, which I presume is 'cos it's kind of 'modal' AU> under X11 - but having no titlebar causes problems once the AU> 'staggering' makes it open partly below the screen level since AU> it can't be moved fully onscreen!), errors trying to configure AU> integration parameters for streamlines/tubes (the configure AU> window fails to appear), etc., etc. I expect these are not to AU> do with VTK at all, but I throw them out in case anyone here AU> has any thoughts... This all looks like some serious problems with Tkinter under Aqua and I can't help you there since I dont have any Macs I can play with around here. cheers, prabhu From prabhu at aero.iitm.ernet.in Thu Apr 17 13:39:50 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Thu, 17 Apr 2003 23:09:50 +0530 Subject: [vtkusers] Strange problem with Python In-Reply-To: <67348AAF0635D511866A00508BDF0CC805C0A258@fszhtv11.wpafb.af.mil> References: <67348AAF0635D511866A00508BDF0CC805C0A258@fszhtv11.wpafb.af.mil> Message-ID: <16030.59110.121534.119901@monster.linux.in> >>>>> "HS" == Harris Scott R Civ AFRL/SNJM writes: HS> 1. If I try to import the libs from an interactive session, HS> things work perfectly. 2. I have two different sets of VTK HS> libraries. The 4.2.2 release and the CVS version. I export HS> PYTHONPATH to point to the version I want to use. I keep HS> everything in the VTK directory. How about LD_LIBRARY_PATH? The linker caches library accesses so its possible that it is confused between the two libraries. VTK does not version its libaries and this can cause heartaches. HS> The strange thing is that both the CVS and 4.2.2 demos work. I Thats most probably because the demos are simple and aren't exercising the different libs enough. HS> can write a short test program and it works. Only my app HS> (which is quite large) has problems with importing the CVS HS> version of VTK. The 4.2.2 version works perfectly with my HS> app. Only the CVS version has problems. That makes sense. It sounds like the CVS Python modules are getting symbols from the 4.2.2 version and not finding what they need. A simple test to see if this hypothesis is right. Just move out *ALL* the 4.2.2 libraries and libvtk*Python.so's to another directory not in the linkers path or in LD_LIBRARY_PATH. Re-run ldconfig if necessary and now try running your app and see if that works. cheers, prabhu From sxa at fluent.com Thu Apr 17 13:54:00 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Thu, 17 Apr 2003 13:54:00 -0400 Subject: [vtkusers] Removing internal cells ! Message-ID: <032101c3050a$537cb740$8ae4e9c0@sxapc> Greetings ! Is there a filter that would remove the facets inside a solid ? Let say i have a square formed with two triangles. I extrude this square to get a cube. Because ALL edges are extruded to produce facets, the resulting cube will have an unacessary internal diagonal facet. Is there a vtkFilter that could remove those internal topologies ? Thanks ! _____________________________________ Seb -------------- next part -------------- A non-text attachment was scrubbed... Name: cube.jpg Type: image/jpeg Size: 31946 bytes Desc: not available URL: From TDeschamps at lbl.gov Thu Apr 17 14:15:57 2003 From: TDeschamps at lbl.gov (TDeschamps at lbl.gov) Date: Thu, 17 Apr 2003 11:15:57 -0700 Subject: [vtkusers] Re: Pb using vtkAppendPolyData & vtkPolyDataConnectivityFilter - Error in a vtk class? Message-ID: <2b74732b6526.2b65262b7473@lbl.gov> Dear vtkUsers, Trying to find a solution to my problem, I went on studying the vtkPolyDataConnectivityFilter.cxx file, and I've found something which explains why it takes so long, but I am not sure if it is done on purpose or if it is a mistake: If I try to use this filter to get all connected regions: vtkPolyDataConnectivityFilter * connectivity = vtkPolyDataConnectivityFilter::New (); connectivity -> SetInput( myPolyData ); connectivity -> SetExtractionModeToSpecifiedRegions(); connectivity -> Update(); Then the following code returns myPolyData -> GetNumberOfLines(); --> 29552 myPolyData -> GetNumberOfPoints(); --> 29572 connectivity -> GetNumberOfExtractedRegions(); --> 228 connectivity -> AddSpecifiedRegion(10); connectivity -> Update(); connectivity -> GetOutput() -> GetNumberOfLines(); --> 194 connectivity -> GetOutput() -> GetNumberOfPoints(); --> 29572!!! The number of points in one of the regions is exactly the same than the total number of points. If I append all the regions with vtkAppendPolyData the total number of points will therefore be 228 x 29572 > 6.10^6, while it should be 29572 only. Notice that the number of lines is correct. So my question is: is there something I did not catch in the way this filter works, or is it an error? Thomas (tdeschamps at lbl.gov) ----- Original Message ----- From: Thomas Deschamps Date: Wednesday, April 16, 2003 3:36 pm Subject: Re: Pb using vtkAppendPolyData & vtkPolyDataConnectivityFilter > Dear vtkUsers, > > I am still trying to select some 2D contours which are smaller or > equal > to a given number of lines (not all contours are closed) > > I've found something that I don't understand using > vtkPolyDataConnectivityFilter & vtkAppendPolyData. > Using the code mentionned in the previous thread, i've realized > that the > myPolyData is strangely modified by this routine. If I keep a copy > of my > object and I compare them after, I can see that: > > Before: > Verts = 0x87bd290 > Lines = 0x862cbb0 > Polys = 0x862cc58 > Strips = 0x8624f80 > > After > Verts = 0x0 > Lines = 0x85a3ea8 > Polys = 0x0 > Strips = 0x0 > > And I've found another strange behavior: if I rerun the same > routine on > my new polydata, it takes MUCH longer (x10). > All this time is takent by connectivity -> Update(); > It is like the polydata created by vtkAppendPolyData takes more > time to > be accessed by the method SetExtractionModeToSpecifiedRegions(); > Anyone has an idea? > > Thomas > > Thomas Deschamps wrote: > > > Hi vtkUsers, > > > > I am using vtkAppendPolyData for selecting contours which have a > > certain length among all the contours I have. > > My problem is that it takes a LOT of time. > > > > The following code remove all the closed contours which have a > length > > smaller than contourLength > > void function( int contourLength, vtkPolyData * > myPolyData ) > > { > > vtkPolyDataConnectivityFilter * connectivity = > > vtkPolyDataConnectivityFilter::New (); > > connectivity -> SetInput( myPolyData ); > > connectivity -> SetExtractionModeToSpecifiedRegions(); > > connectivity -> Update(); > > > > vtkPolyData * localPolyData = vtkPolyData::New(); > > int nbRegions = connectivity -> GetNumberOfExtractedRegions(); > > for( int i = 0 ; i < nbRegions ; i++ ) { > > vtkAppendPolyData * append = vtkAppendPolyData::New(); > > connectivity -> AddSpecifiedRegion(i); > > connectivity -> Update(); > > int nbLines = connectivity -> GetOutput() -> > GetNumberOfLines();> if( > nbLines >= contourLength ) > > append -> AddInput( connectivity -> GetOutput() ); > > append -> AddInput( localPolyData ); > > append -> Update(); > > localPolyData -> DeepCopy( append -> GetOutput()); > > connectivity -> DeleteSpecifiedRegion(i); > > append -> Delete(); > > } > > myPolyData -> DeepCopy( localPolyData ); > > localPolyData -> Delete(); > > connectivity -> Delete(); > > } > > > > You may ask why I am not using the "append" outside of the loop. > > This is because it looks like append -> AddInput() is not making > a > > copy of the input polydata, but keeps track of the pointer, even > if > > this pointer is modified in the future. Therefore it was not > working > > like that. > > > > When the number of contours is > 1000, and when each contour is > > between 4 and 700 lines, it takes 30 minutes... > > There is surely something more efficient that what I am doing, > but I > > don't know what. > > Thank you for reading this. > > > > Thomas (tdeschamps at lbl.gov) > > > > > > > > > From berklist at nycap.rr.com Thu Apr 17 14:30:34 2003 From: berklist at nycap.rr.com (Berk Geveci) Date: 17 Apr 2003 14:30:34 -0400 Subject: [vtkusers] Removing internal cells ! In-Reply-To: <032101c3050a$537cb740$8ae4e9c0@sxapc> References: <032101c3050a$537cb740$8ae4e9c0@sxapc> Message-ID: <1050604236.15951.66.camel@caemlyn.kitwarein.com> > Let say i have a square formed with two triangles. > I extrude this square to get a cube. Which filter are you using to extrude ? vtkLinearExtrusionFilter should not create internal faces. > Because ALL edges are extruded to produce facets, the resulting cube will > have an unacessary internal diagonal facet. Is the result of the extrusion process an unstructured data with 3D cells (in this example, wedges) or a polygonal data (triangles and quads) ? -Berk From Jonathan.Bailleul at greyc.ismra.fr Thu Apr 17 14:34:31 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Thu, 17 Apr 2003 20:34:31 +0200 Subject: [vtkusers] bug - or misunderstanding - for transformation from world to view coordinates Message-ID: <3E9EF3B7.8E3BBA16@greyc.ismra.fr> Dear all, As explained in a previous post, I created an actor from a polydata object. My purpose is to move the actor with the mouse, and, at a given stage, to retrieve the current 2d coordinates in order to display on the screen a vtkActor2D feeded from a textMapper for annotation purposes. I used the renderer method WorldToView as described here, but I cannot understand the results: before: 200 200 50 after:-5.63508 -3.76998 1.97749 before: 200 200 50 after:0.231182 0.0137224 2.20205 it changes when I move the actor with the mouse (hopefully), but the text remains in the bottom-left corner as the strange values suggest, which is not what I expected since the actor itself is in the middle of my screen! In advance, thanks for your help. /* sets actor position to 2d projection of given 3d point */ void Place2DActor(vtkRenderer *ren, vtkActor2D *act, float* pt) { float x, y, z; x = pt[0]; y = pt[1]; z = pt[2]; cout << "before: "<< x << " " << y << " " << z; ren -> WorldToView(x, y, z); cout << " after:"<< x << " " << y << " " << z << endl; act -> SetPosition(x, y); } -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From vanessa.noguesruiz at epfl.ch Thu Apr 17 14:37:39 2003 From: vanessa.noguesruiz at epfl.ch (vanessa.noguesruiz at epfl.ch) Date: Thu, 17 Apr 2003 20:37:39 +0200 (MEST) Subject: [vtkusers] 2 library paths in CmakeLists.txt for MVisual C++ v6 Message-ID: <1050604659.3e9ef473af535@imapwww.epfl.ch> Hi everybody! Does anybody know how to include 2 libraries in a cmakelists.txt file, I mean, I have already set the path for VTK library because it's already done, but when I want to include the path where I've put GSL library - because I work on Windows and I have to include it for my project- it gives me the error that it's not able to find a gsl_*.h file. I am trying to modify Cmakelists.txt adding a new directory where going to look for the added .h, but it doesn't work. Thanks in advance. Van From sxa at fluent.com Thu Apr 17 16:04:46 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Thu, 17 Apr 2003 16:04:46 -0400 Subject: [vtkusers] Removing internal cells ! References: <032101c3050a$537cb740$8ae4e9c0@sxapc> <1050604236.15951.66.camel@caemlyn.kitwarein.com> Message-ID: <035501c3051c$980edd40$8ae4e9c0@sxapc> Yes i'am using vtkLinearExtrusionFilter. The polygons are complex and often non-convex so before being extruded, they are passed through vtkGLUTesselatorTriangleFilter. When displayed with transparency, we can see the internal facets ! Thanks ! ______________________________________________ Seb ----- Original Message ----- From: "Berk Geveci" To: "Sebastien Auclair" Cc: "vtkusers" Sent: Thursday, April 17, 2003 2:30 PM Subject: Re: [vtkusers] Removing internal cells ! > > Let say i have a square formed with two triangles. > > I extrude this square to get a cube. > > Which filter are you using to extrude ? vtkLinearExtrusionFilter > should not create internal faces. > > > Because ALL edges are extruded to produce facets, the resulting cube will > > have an unacessary internal diagonal facet. > > Is the result of the extrusion > process an unstructured data with 3D cells (in this example, > wedges) or a polygonal data (triangles and quads) ? > > -Berk > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From amy.henderson at kitware.com Thu Apr 17 16:43:29 2003 From: amy.henderson at kitware.com (Amy Henderson) Date: Thu, 17 Apr 2003 16:43:29 -0400 Subject: [vtkusers] Removing internal cells ! In-Reply-To: <032101c3050a$537cb740$8ae4e9c0@sxapc> Message-ID: <5.1.0.14.0.20030417163838.0273cfd8@pop.biz.rr.com> vtkHull should work in this case. - Amy At 01:54 PM 4/17/2003 -0400, Sebastien Auclair wrote: >Greetings ! >Is there a filter that would remove the facets inside a solid ? > >Let say i have a square formed with two triangles. >I extrude this square to get a cube. >Because ALL edges are extruded to produce facets, the resulting cube will >have an unacessary internal diagonal facet. > >Is there a vtkFilter that could remove those internal topologies ? > >Thanks ! >_____________________________________ >Seb From ramakrishna.prakash at quest-global.com Thu Apr 17 21:38:28 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Fri, 18 Apr 2003 07:08:28 +0530 Subject: [vtkusers] Picking objects in VTK and java In-Reply-To: Message-ID: <000001c3054b$3703fc40$de0ba8c0@qtwblr01.questglobal.com> Hi, you can use vtkPicker. following is a code snippet. vtkPropPicker picker = (vtkPropPicker)iren.GetPicker();//iren is vtkRenderWindowInteractor if(picker.Pick(e.getX(),(demo.renWin.getSize().height-e.getY()),0,demo.ren) != 0){ double d1[] = picker.GetPickPosition(); } make sure you apply proper mutex locking around thw Pick methid. regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Christian Bleiholder Sent: Thursday, April 17, 2003 5:21 PM To: vtkusers at public.kitware.com Subject: [vtkusers] Picking objects in VTK and java Dear all, I am new to the VTK; I use the Java wrapper to VTK 4.2 and I cannot solve the following task: I use VTK to render some data structures like Spheres,etc. I then want to be able to pick (by mouse) one of these VTK-spheres and do some tasks with their underlying data structures. Can anyone help me? Regards, Christian _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From cz_lj at yahoo.com.cn Thu Apr 17 22:51:19 2003 From: cz_lj at yahoo.com.cn (=?gb2312?q?Chenzhuo?=) Date: Fri, 18 Apr 2003 10:51:19 +0800 (CST) Subject: [vtkusers] about building the model of a series of particular areas Message-ID: <20030418025119.62997.qmail@web15210.mail.bjs.yahoo.com> Hi,all vtkusers If I want to build a model of a series of particular areas in a series of medical images in BMP or JPEG format,how should I set the pixel scalar in the images? If I only set the scalar of boundary pixels of the particular area a exclusive value which is different with any other pixel in the images, can I only get a 3D model of the particular areas? _________________________________________________________ Do You Yahoo!? ??????CCTV-2??????????????????????? http://rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cctv_wireless_study From ramakrishna.prakash at quest-global.com Fri Apr 18 04:42:19 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Fri, 18 Apr 2003 14:12:19 +0530 Subject: [vtkusers] Changing scalar value of a poly data Message-ID: <000501c30586$6cb08490$de0ba8c0@qtwblr01.questglobal.com> Hi, How do I change the scalar value of a poly data dynamically? Help Thanks Shyam From lzyhm at 263.net Fri Apr 18 05:03:09 2003 From: lzyhm at 263.net (lzy) Date: Fri, 18 Apr 2003 17:03:09 +0800 Subject: [vtkusers] vtkImageViewer2 and SetZSlice Message-ID: <001001c30589$66068e70$0200a8c0@lzy> I try to show a vtkImageData slice by slice as following code: vtkImageReader reader reader SetDataByteOrderToLittleEndian reader SetDataExtent 0 63 0 63 1 64 reader SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/quarter" reader SetDataMask 0x7fff reader SetDataSpacing 1.6 1.6 1.5 vtkImageViewer2 viewer viewer SetInput [reader GetOutput] viewer SetColorWindow 1200 viewer SetColorLevel 1000 viewer SetZSlice 40 viewer Render but I can't get correct result when I change the parameter of SetZSlice vtkImageViewer2 always display the same slice. When i change vtkImageViewer2 to vtkImageViewer, the result is correct. The result is the same for vtk4.0 and vtk4.2. Why? help me, thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From imho at skynet.be Fri Apr 18 06:17:59 2003 From: imho at skynet.be (imho) Date: Fri, 18 Apr 2003 12:17:59 +0200 Subject: [vtkusers] classic heap limit problem Message-ID: <3E9FD0D7.6030604@skynet.be> Hi all, I'd like to use the Procrustes filter so I'm trying to upgrade to 4.2 my windows' VTK 4.0 installation. Compiling my project I have the heap limit problem, and increasing it doesn't change anything. I've saw this (thanks Mathieu) but I don't know what to do... http://public.kitware.com/pipermail/vtkusers/2002-October/014036.html and http://public.kitware.com/pipermail/vtkusers/2002-May/011228.html thanks From mark.asbach at post.rwth-aachen.de Fri Apr 18 08:04:27 2003 From: mark.asbach at post.rwth-aachen.de (Mark Asbach) Date: Fri, 18 Apr 2003 14:04:27 +0200 Subject: [vtkusers] Templated class members as callbacks for vtkCommand? In-Reply-To: <000301c304fd$e6988ca0$99221398@radonc.radonc.unc.edu> Message-ID: Hi Parag, > I?m trying to attach a templated member function as the callback for > an event in VTK. > I chose the second approach because the first won?t work for my > purposes, so my code looks something like this: Both approaches are identical, it's just that you can avoid name clashes if you embed the callback into a class by making it a static member. > static void HistogramInteractorProcessPickEvent > Then inside the class, I do the following: > ??? > m_PickEventCommand->SetCallback(&HistogramInteractorProcessPickEvent); > This works fine; however, what I?d really like to do is have the C > function above be templated over the type of the itk Image, so > something like: > This generates an error during compilation under both MSVC6 and Linux > gcc3.2, something akin to: > :\development\aks\Code\Visualization\aksHistogramInteractor.cxx(68) : > error C2664: 'SetCallback' : cannot convert parameter 1 from 'void > (class vtkObject *,unsigned long,void *,void *)' to 'void (__cdecl > *)(class vtkObject *,unsigned long,void *,void *)? The compiler tells you what's the problem: C calling style is needed, but you did provide something different (namely C++ standard calling style). It's just your luck that the non-templated version works (because your compilers assume it's C linkage, probably because it sits in a different file ending in .c). Just tell the compiler that your template uses C calling style by surrounding declaration and definition with extern "C" { template static void HistogramInteractorProcessPickEvent (class vtkObject *,unsigned long,void *,void *); } See "The C++ Programming Language", second edition, "9.2.5 Linkage and Pointers to Functions" if there're questions left (or ask again here). Yours, Mark From a.umpleby at imperial.ac.uk Fri Apr 18 08:35:21 2003 From: a.umpleby at imperial.ac.uk (Adrian Umpleby) Date: Fri, 18 Apr 2003 13:35:21 +0100 Subject: VTK on OSX with Mayavi (was: Re: [vtkusers] new user attempting install on mac OSX) In-Reply-To: <16030.58649.58924.66421@monster.linux.in> Message-ID: <38E74266-719A-11D7-9001-00039310B652@imperial.ac.uk> Hi again, > AU> While this subject is around on-list, I thought it would be > AU> worth recounting my own experiences with VTK on OSX. > > I have no clue about Mac's but do have some idea about MayaVi. BTW, you've reminded me that I should let you know about the rough-and-ready Hyperstreamlines module I've cobbled together - I think Gerard Gorman (gormo at ic.ac.uk) mentioned it to you a while back on the Mayavi users list... If you're interested let me know (it's basically a rip-off of the streamlines module, but still needs huge work to make it more consistent and remove defunct parts). I've also added a few extra buttons to the bottom row to manipulate the view more easily in small 'jumps', and to snap the it back so the Z axis is oriented upwards (simple stuff, but quite useful...) Actually, while on that subject, and bringing this back on-topic, I was using a package recently which had very similar manipulation controls to VTK - the left mouse button rotates, while the others zoom and drag the view. However, it had an extra feature... The right mouse button for zoom in VTK only increases/decreases the zoom as the cursor is moved up and down, and does nothing side-to-side. This package, though, also *rolled* the view (about an axis from the viewer through the center of the view) as the cursor moved left/right with right-button down. I found this helped a great deal in manipulating an object. Any chance this sort of thing could be added to VTK? (Or does it already allow this somehow?) > AU> 3) Running Mayavi has to be done interactively through the > AU> python command-line... > > Ugh, how come? This looks like Tkinter is broken. That's an understatement... > Can you run this: > python /usr/lib/python2.1/lib-tk/tkFileDialog.py Once I change the paths appropriately, that appears to work fine! Here's what happens in mayavi: Exception in Tkinter callback Traceback (most recent call last): File "Python.framework/Versions/2.2/lib/python2.2/lib-tk/Tkinter.py", line 1292, in __call__ return apply(self.func, args) File "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site-packages/ mayavi/Main.py", line 1074, in open_vtk filetypes=[("VTK files", "*.vtk"), File "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/lib- tk/tkFileDialog.py", line 94, in askopenfilename return Open(**options).show() File "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/lib- tk/tkCommonDialog.py", line 53, in show s = apply(w.tk.call, (self.command,) + w._options(self.options)) TclError: bad directory "" Looks like some silly little error to me, that I could probably fix if I dig around a bit... (Anyway, it's not VTK, so not really relevant to this list...) > AU> 4) Once a file has opened, Mayavi crashes in > AU> vtkOpenGLRenderer::ClearLights (well, when that calls > AU> glLightModeli, anyway). I guess this is a VTK problem...? > AU> Commenting out the gl calls there allows it to work. Any ideas > AU> what's going on here? (Had this problem back in July, too...) > > A traceback or more info would help. Of course, if this is not > important (since everything works under X11) don't bother. This, however, does look like something weird in VTK - perhaps some incompatibility with Apple's OpenGL? - since it obviously works fine with XGL... Program received signal EXC_BAD_ACCESS, Could not access memory. 0x709ca8e8 in glLightModelfv () (gdb) bt #0 0x709ca8e8 in glLightModelfv () #1 0x03beddd4 in ClearLights__17vtkOpenGLRenderer () #2 0x036c420c in PyvtkOpenGLRenderer_ClearLights__FP7_objectn1 () #3 0x00638484 in PyCFunction_Call (func=0x4030bb0, arg=0x2af420, kw=0xbfffe028) at Objects/methodobject.c:101 #4 0x006663cc in eval_frame (f=0x4bbad0) at Python/ceval.c:2004 #5 0x006678ac in PyEval_EvalCodeEx (co=0x3a7abe0, globals=0xbfffe16c, locals=0x3beddd4, args=0x4052ee0, argcount=1, kws=0x4052ee4, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2585 #6 0x00668e94 in fast_function (func=0xb53, pp_stack=0xbfffe41c, n=40, na=1, nk=-1073749976) at Python/ceval.c:3161 #7 0x006664d0 in eval_frame (f=0x4052d80) at Python/ceval.c:2024 #8 0x006678ac in PyEval_EvalCodeEx (co=0x3a7a970, globals=0xbfffe16c, locals=0x3beddd4, args=0x3a7e4e0, argcount=4, kws=0x2c9760, kwcount=1, defs=0x3a7e4dc, defcount=1, closure=0x0) at Python/ceval.c:2585 #9 0x0062a874 in function_call (func=0x3a7e090, arg=0x2b89b0, kw=0x4061490) at Objects/funcobject.c:374 #10 0x00618204 in PyObject_Call (func=0xb53, arg=0xbfffe16c, kw=0xbfffe028) at Objects/abstract.c:1684 #11 0x0061fe08 in instancemethod_call (func=0x3a7e090, arg=0x2b89b0, kw=0x4061490) at Objects/classobject.c:2276 #12 0x00618204 in PyObject_Call (func=0xb53, arg=0xbfffe16c, kw=0xbfffe028) at Objects/abstract.c:1684 #13 0x00668af8 in PyEval_CallObjectWithKeywords (func=0x4061520, arg=0x40306c0, kw=0x4061490) at Python/ceval.c:3049 #14 0x0061b42c in PyInstance_New (klass=0xb53, arg=0x40306c0, kw=0x4061490) at Objects/classobject.c:557 #15 0x00618204 in PyObject_Call (func=0xb53, arg=0xbfffe16c, kw=0xbfffe028) at Objects/abstract.c:1684 #16 0x006692a0 in do_call (func=0x3a7e050, pp_stack=0xbfffe83c, na=3, nk=0) at Python/ceval.c:3262 #17 0x006664e8 in eval_frame (f=0x4028f60) at Python/ceval.c:2027 #18 0x006678ac in PyEval_EvalCodeEx (co=0x3a4ff60, globals=0xbfffe16c, locals=0x3beddd4, args=0x40294bc, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2585 #19 0x0062a874 in function_call (func=0x3a7a1b0, arg=0x40294b0, kw=0x0) at Objects/funcobject.c:374 #20 0x00618204 in PyObject_Call (func=0xb53, arg=0xbfffe16c, kw=0xbfffe028) at Objects/abstract.c:1684 #21 0x0061fe08 in instancemethod_call (func=0x3a7a1b0, arg=0x40294b0, kw=0x0) at Objects/classobject.c:2276 #22 0x00618204 in PyObject_Call (func=0xb53, arg=0xbfffe16c, kw=0xbfffe028) at Objects/abstract.c:1684 #23 0x00668af8 in PyEval_CallObjectWithKeywords (func=0x4029cb0, arg=0x3a1c590, kw=0x0) at Python/ceval.c:3049 #24 0x0061b42c in PyInstance_New (klass=0xb53, arg=0x3a1c590, kw=0x0) at Objects/classobject.c:557 #25 0x00618204 in PyObject_Call (func=0xb53, arg=0xbfffe16c, kw=0xbfffe028) at Objects/abstract.c:1684 #26 0x006692a0 in do_call (func=0x3a74fb0, pp_stack=0xbfffec5c, na=1, nk=0) at Python/ceval.c:3262 #27 0x006664e8 in eval_frame (f=0x40e670) at Python/ceval.c:2027 #28 0x006678ac in PyEval_EvalCodeEx (co=0x3a0e440, globals=0xbfffe16c, locals=0x3beddd4, args=0x402899c, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2585 #29 0x0062a874 in function_call (func=0x3e9d0a0, arg=0x4028990, kw=0x0) at Objects/funcobject.c:374 #30 0x00618204 in PyObject_Call (func=0xb53, arg=0xbfffe16c, kw=0xbfffe028) at Objects/abstract.c:1684 #31 0x0061fe08 in instancemethod_call (func=0x3e9d0a0, arg=0x4028990, kw=0x0) at Objects/classobject.c:2276 #32 0x00618204 in PyObject_Call (func=0xb53, arg=0xbfffe16c, kw=0xbfffe028) at Objects/abstract.c:1684 #33 0x00668af8 in PyEval_CallObjectWithKeywords (func=0x57f1c0, arg=0x2c5a60, kw=0x0) at Python/ceval.c:3049 #34 0x0061b42c in PyInstance_New (klass=0xb53, arg=0x2c5a60, kw=0x0) at Objects/classobject.c:557 #35 0x00618204 in PyObject_Call (func=0xb53, arg=0xbfffe16c, kw=0xbfffe028) at Objects/abstract.c:1684 #36 0x006692a0 in do_call (func=0x3e9e810, pp_stack=0xbffff07c, na=1, nk=0) at Python/ceval.c:3262 #37 0x006664e8 in eval_frame (f=0x2c3710) at Python/ceval.c:2027 #38 0x006678ac in PyEval_EvalCodeEx (co=0x3a1b7c0, globals=0xbfffe16c, locals=0x3beddd4, args=0x43d190, argcount=0, kws=0x43d190, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2585 #39 0x00668e94 in fast_function (func=0xb53, pp_stack=0xbffff21c, n=40, na=0, nk=-1073749976) at Python/ceval.c:3161 #40 0x006664d0 in eval_frame (f=0x43d040) at Python/ceval.c:2024 #41 0x006678ac in PyEval_EvalCodeEx (co=0x39e92e0, globals=0xbfffe16c, locals=0x3beddd4, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2585 #42 0x00662a90 in PyEval_EvalCode (co=0xb53, globals=0xbfffe16c, locals=0xbfffe028) at Python/ceval.c:483 #43 0x0068595c in run_node (n=0x43c950, filename=0xbfffe16c "?\200", globals=0x2c35a0, locals=0x2c35a0, flags=0x40626c0) at Python/pythonrun.c:1079 #44 0x006846c8 in PyRun_InteractiveOneFlags (fp=0x800017a0, filename=0x375c "", flags=0xbffff488) at Python/pythonrun.c:590 #45 0x00684490 in PyRun_InteractiveLoopFlags (fp=0x800017a0, filename=0x375c "", flags=0xbffff488) at Python/pythonrun.c:526 #46 0x00684330 in PyRun_AnyFileExFlags (fp=0x800017a0, filename=0x375c "", closeit=0, flags=0x0) at Python/pythonrun.c:489 #47 0x000031e8 in Py_Main (argc=0, argv=0xbffff67c, filename=0x0) at ../../Mac/Python/macmain.c:667 #48 0x00003058 in main (argc=1, argv=0xbffff678) at ../../Mac/Python/macmain.c:568 #49 0x00002468 in _start () #50 0x00002298 in start () > AU> 5) There are numerous issues which I presume are to do with tk > AU> (or python?), such as errors trying to view the pipeline... > > This all looks like some serious problems with Tkinter under Aqua Certainly does - I expect that's why the standard Python framework did not have Tkinter, and I had to compile it specially. But that was quite while ago, and I really ought to try doing it again on a more recent version. Back to VTK, though, there are a couple of other problems that I forgot to mention (when using mayavi via VTK compiled for Aqua under OSX). The first is with finding libvtkRenderingPythonTkWidgets.dylib. - it has to be in the current directory where I start python (or where the python script is that is run when sent as an argument to the python command) otherwise it stops with an error: dyld: /Applications/Python.app/Contents/MacOS/python can't open library: /Users/adrian/libvtkRenderingPythonTkWidgets.dylib (No such file or directory, errno = 2) Tried setting VTK_TK_WIDGET_PATH and (DY)LD_LIBRARY_PATH etc., but that doesn't help. I just 'cd /usr/local/VTK-aqua/lib' (which contains that lib - or I can make a copy/symlink in the current directory) before I start python. Obviously, I don't have this problem with the X11 version. The second problem was with Vtkrenderingpythontkwidgets_SafeInit. It complains it's undefined when it tries to open the mayavi window: >>> m=mayavi.mayavi() dyld: /Applications/Python.app/Contents/MacOS/python Undefined symbols: _Vtkrenderingpythontkwidgets_SafeInit The way I fixed this was to edit vtkTkWidgetsInit.cxx to create a 'wrapper' for the standard Vtkrenderingpythontkwidgets_Init. i.e. just after these lines... //---------------------------------------------------------------------------- // Vtkrenderingpythontkwidgets_Init // Called upon system startup to create the widget commands. extern "C" {VTK_TK_EXPORT int Vtkrenderingpythontkwidgets_Init(Tcl_Interp *interp);} ...I added the following... extern "C" {VTK_TK_EXPORT int Vtkrenderingpythontkwidgets_SafeInit(Tcl_Interp *interp);} int Vtkrenderingpythontkwidgets_SafeInit(Tcl_Interp *interp) { return Vtkrenderingpythontkwidgets_Init(interp); } Seems like a very simple little bit of code that would not really be overlooked, so I wouldn't be surprised if there's something I'm missing somewhere that's causing this... Anyway, that's enough for now! Adrian From nanditha_thakur at rediffmail.com Fri Apr 18 08:50:44 2003 From: nanditha_thakur at rediffmail.com (Nanditha Thakur) Date: 18 Apr 2003 12:50:44 -0000 Subject: [vtkusers] Setting colors to individual cell Message-ID: <20030418125044.24756.qmail@webmail18.rediffmail.com> Hi Jonathan, I still have not succeeded in my method. I am able to change the scalar value, but the result is far from satisfying. Can you please elborate on your approach. It will be of great help. thanks Nanditha On Thu, 03 Apr 2003 Jonathan Bailleul wrote : >Nanditha Thakur wrote: > > > > Hello Users, > > I have a 3D object. Can I set different color >to > > some of the cells(or points) of this object? This is how my > > requirement is going to be. Say my actor is blue in color.I >will > > pick some of the cells of the object by clicking on it. Now I >want > > to set, say red color, to these picked cells. Is it possible >to do > > so in VTK? Help! > > > > Thanks > > Nanditha > > > > >Dear Nanditha, > >I am just dealing with a similar problem right now! My choice >consisted >in glyphing the points of the selected cell instead, since I just >didn't >figure out how to proceed otherwise. > >I still have problems to solve, but it seems fairly usable. Let >me know >if you need to know more about this, or if you managed to do what >you >planned! > >Best Regards, > > >-- >----------------------------------- >Jonathan BAILLEUL, Doctorant >GREYC Image - Universit? de Caen >http://www.greyc.ismra.fr/~bailleul >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers From a.umpleby at imperial.ac.uk Fri Apr 18 09:00:45 2003 From: a.umpleby at imperial.ac.uk (Adrian Umpleby) Date: Fri, 18 Apr 2003 14:00:45 +0100 Subject: [vtkusers] new user attempting install on mac OSX In-Reply-To: <6283F0C4-70C7-11D7-B21D-0003935A86C6@lmu.de> Message-ID: >> At what stage is it going wrong? Did you compile VTK for Carbon or >> Cocoa? (I've yet to try it for Cocoa - that's one of my next >> projects...) Did you eradicate all mention of X11 lib and include >> paths from your CMakeCache.txt? Are you using gcc3 or gcc2? OSX10.1 >> or 10.2? Have you got Aqua Tkinter in your Python framework? (Try >> starting python, then type "import Tkinter".) Have you got the Python >> interpreter application, so the tk windows have a genuine OSX app to >> work within? > > so i followed the mayavi build instructions. everything went fine. i > tested vtk-usage using mayavi's included python test-script. fine. > then when i start mayavi (whatever way) i get a segmentation fault. Can you 'gdb' that to get a stack trace? > btw: python is working with vtk quite well (not perfect) esp. the > renderinteractor seems to have probs with aqua tkinter. Do you not have any of the other issues I mentioned in my recent posts ("VTK on OSX with Mayavi..." etc.)? > but i'm not so much into python/vtk. prefer tcl. and i also tried > cocoa. which works great for me. but i do a separte build with static > libraries for cocoa. the other build is for carbon/java/python/tcl > with shared libs. That sounds like the closest to mine, except I don't wrap Java. > in the carbon/python/tcl/java build i have the following settings > regarding X11: > > //X11 extra flags. > CMAKE_X_CFLAGS:STRING=-I/usr/X11R6/include > ... OK. I removed all reference to X11 from my CMakeCache.txt, to avoid multiply-defined symbols and conflicts with X11 headers vs some private X11-headers in the Tk framework that I picked up from somewhere (can't remember where now! But the file is called tkIntXlibDecls.h - seems to have stuff for when MAC_TCL and/or MAC_OSX_TK is defined, and these conflict slightly with the definitions in X11/Xlib.h...) > for the rest: i'm using gcc3, osx 10.2.5. So you don't find it hangs when you try to 'import vtk' in python? Or 'package require vtk' in tclsh? > i have aqua tkinter in the python framework and that works. and also > the python interpreter. Where (and when) did you get Tkinter for Aqua? Bye! Adrian From massimo.ivani at mlsw.com Fri Apr 18 09:04:33 2003 From: massimo.ivani at mlsw.com (Massimo Ivani) Date: Fri, 18 Apr 2003 15:04:33 +0200 Subject: [vtkusers] vtkPolyData intersection Message-ID: <002201c305ab$1b39b8a0$f254dfd9@compaq> Hello vtk Users, How can I cut a vtkPolydata with another vtkPolydata and have intersection points?? I cannot use vtkCutter because I cannot convert vtkPolyData in vtkImplicitFunction... Thank you. Dr. Massimo Ivani Media Lab Software Tel.: +39 0187 517775 Fax: +39 0187 511833 massimo.ivani at mlsw.com www.mlsw.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pchandra at radonc.unc.edu Fri Apr 18 10:21:56 2003 From: pchandra at radonc.unc.edu (Parag Chandra) Date: Fri, 18 Apr 2003 10:21:56 -0400 Subject: [vtkusers] Templated class members as callbacks for vtkCommand? In-Reply-To: Message-ID: <001101c305b5$de3d61d0$99221398@radonc.radonc.unc.edu> Thanks Mark. Though after posting the message, I started digging through the code for vtkImageViewer and followed its example of deriving a separate, templated vtkCommand class to encapsulate the callback. This works perfectly, and more closely mimics the ITK style that I am used to. Best regards, Parag Chandra -----Original Message----- From: Mark Asbach [mailto:mark.asbach at post.rwth-aachen.de] Sent: Friday, April 18, 2003 7:04 AM To: Parag Chandra Cc: vtkusers at public.kitware.com Subject: Re: [vtkusers] Templated class members as callbacks for vtkCommand? Hi Parag, > I?m trying to attach a templated member function as the callback for > an event in VTK. > I chose the second approach because the first won?t work for my > purposes, so my code looks something like this: Both approaches are identical, it's just that you can avoid name clashes if you embed the callback into a class by making it a static member. > static void HistogramInteractorProcessPickEvent > Then inside the class, I do the following: > ??? > m_PickEventCommand->SetCallback(&HistogramInteractorProcessPickEvent); > This works fine; however, what I?d really like to do is have the C > function above be templated over the type of the itk Image, so > something like: > This generates an error during compilation under both MSVC6 and Linux > gcc3.2, something akin to: > :\development\aks\Code\Visualization\aksHistogramInteractor.cxx(68) : > error C2664: 'SetCallback' : cannot convert parameter 1 from 'void > (class vtkObject *,unsigned long,void *,void *)' to 'void (__cdecl > *)(class vtkObject *,unsigned long,void *,void *)? The compiler tells you what's the problem: C calling style is needed, but you did provide something different (namely C++ standard calling style). It's just your luck that the non-templated version works (because your compilers assume it's C linkage, probably because it sits in a different file ending in .c). Just tell the compiler that your template uses C calling style by surrounding declaration and definition with extern "C" { template static void HistogramInteractorProcessPickEvent (class vtkObject *,unsigned long,void *,void *); } See "The C++ Programming Language", second edition, "9.2.5 Linkage and Pointers to Functions" if there're questions left (or ask again here). Yours, Mark From sxa at fluent.com Fri Apr 18 10:47:02 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Fri, 18 Apr 2003 10:47:02 -0400 Subject: [vtkusers] vtkPolyData intersection References: <002201c305ab$1b39b8a0$f254dfd9@compaq> Message-ID: <001101c305b9$5fcdfe50$8ae4e9c0@sxapc> This is again related to the need for boolean operations on datasets. ( instead of implicit functions.) >From what i can tell, it can't be done. If someone can contradict this, i would be the first to thank him !! (We also need to do such operations !) ___________________________________________ Seb ----- Original Message ----- From: Massimo Ivani To: vtkusers at public.kitware.com Sent: Friday, April 18, 2003 9:04 AM Subject: [vtkusers] vtkPolyData intersection Hello vtk Users, How can I cut a vtkPolydata with another vtkPolydata and have intersection points?? I cannot use vtkCutter because I cannot convert vtkPolyData in vtkImplicitFunction... Thank you. Dr. Massimo Ivani Media Lab Software Tel.: +39 0187 517775 Fax: +39 0187 511833 massimo.ivani at mlsw.com www.mlsw.com ------------------------------------------------------------------------------ This message has been 'sanitized'. This means that potentially dangerous content has been rewritten or removed. The following log describes which actions were taken. Sanitizer (start="1050671167"): Part (pos="2491"): SanitizeFile (filename="unnamed.txt", mimetype="text/plain"): Match (rule="2"): Enforced policy: accept Part (pos="2950"): SanitizeFile (filename="unnamed.html", mimetype="text/html"): Match (rule="default"): Enforced policy: accept Note: Styles and layers give attackers many tools to fool the user and common browsers interpret Javascript code found within style definitions. References: - http://www.securityfocus.com/bid/630 - http://archives.indenial.com/hypermail/bugtraq/2001/January2001/0512.html Rewrote HTML tag: >>_style_0 _/STYLE_<< as: >>_DEFANGED_style_0 _/STYLE_<< Total modifications so far: 1 Anomy 0.0.0 : Sanitizer.pm $Id: Sanitizer.pm,v 1.62 2002/09/17 17:59:08 bre Exp $ -------------- next part -------------- An HTML attachment was scrubbed... URL: From krs at cs.uncc.edu Fri Apr 18 10:52:32 2003 From: krs at cs.uncc.edu (K.R.Subramanian) Date: Fri, 18 Apr 2003 10:52:32 -0400 Subject: [vtkusers] vtkPolyData intersection References: <002201c305ab$1b39b8a0$f254dfd9@compaq> <001101c305b9$5fcdfe50$8ae4e9c0@sxapc> Message-ID: <3EA0112F.B88B5A0D@cs.uncc.edu> vtkImplicitDataSet can be used to convert any vtk dataset (including PolyData) into an implicit function.. havent used it myself, but that this looks like what the original poster was asking. -- krs Sebastien Auclair wrote: > This is again related to the need for boolean operations on datasets. ( instead of implicit > functions.)From what i can tell, it can't be done.If someone can contradict this, i would be the > first to thank him !! (We also need to do such operations > !) ___________________________________________Seb > > ----- Original Message ----- > From: Massimo Ivani > To: vtkusers at public.kitware.com > Sent: Friday, April 18, 2003 9:04 AM > Subject: [vtkusers] vtkPolyData intersection > Hello vtk Users, How can I cut a vtkPolydata with another vtkPolydata and have > intersection points?? I cannot use vtkCutter because I cannot convert vtkPolyData in > vtkImplicitFunction... > > Thank you. Dr. Massimo Ivani > Media Lab Software > Tel.: +39 0187 517775 > Fax: +39 0187 511833 > massimo.ivani at mlsw.com > www.mlsw.com > > > ----------------------------------------------------------------------------------------- > This message has been 'sanitized'. This means that potentially dangerous content has been rewritten or removed. The following log describes which actions were taken. Sanitizer (start="1050671167"): Part (pos="2491"): SanitizeFile (filename="unnamed.txt", mimetype="text/plain"): Match (rule="2"): Enforced policy: accept Part (pos="2950"): SanitizeFile (filename="unnamed.html", mimetype="text/html"): Match (rule="default"): Enforced policy: accept Note: Styles and layers give attackers many tools to fool the user and common browsers interpret Javascript code found within style definitions. References: - http://www.securityfocus.com/bid/630 - http://archives.indenial.com/hypermail/bugtraq/2001/January2001/0512.html Rewrote HTML tag: >>_style_0 _/STYLE_<< as: >>_DEFANGED_style_0 _/STYLE_<< Total modifications so far: 1 Anomy 0.0.0 : Sanitizer.pm $Id: Sanitizer.pm,v 1.62 2002/09/17 17:59:08 bre Exp $ > -- K.R.Subramanian Phone: (704) 687-4872 Department of Computer Science FAX: (704) 687-4893 UNC Charlotte, CARC 311 Email: krs at cs.uncc.edu Charlotte, NC 28223-0001 Web: http://www.cs.uncc.edu/~krs -------------- next part -------------- An HTML attachment was scrubbed... URL: From massimo.ivani at mlsw.com Fri Apr 18 10:57:15 2003 From: massimo.ivani at mlsw.com (Massimo Ivani) Date: Fri, 18 Apr 2003 16:57:15 +0200 Subject: [vtkusers] vtkPolyData intersection References: <002201c305ab$1b39b8a0$f254dfd9@compaq> <001101c305b9$5fcdfe50$8ae4e9c0@sxapc> <3EA0112F.B88B5A0D@cs.uncc.edu> Message-ID: <004c01c305ba$cd68a8b0$f254dfd9@compaq> I used vtkImplicitDataSet to convert vtkPolydata to vtkImplicitFunction then I used vtkCutter to cut first vtkPolyData using converted vtkImplictFunction but I had no data, it does not work...... Dr. Massimo Ivani Media Lab Software Tel.: +39 0187 517775 Fax: +39 0187 511833 massimo.ivani at mlsw.com www.mlsw.com ----- Original Message ----- From: K.R.Subramanian To: Sebastien Auclair Cc: Massimo Ivani ; vtkusers at public.kitware.com Sent: Friday, April 18, 2003 4:52 PM Subject: Re: [vtkusers] vtkPolyData intersection vtkImplicitDataSet can be used to convert any vtk dataset (including PolyData) into an implicit function.. havent used it myself, but that this looks like what the original poster was asking. -- krs Sebastien Auclair wrote: This is again related to the need for boolean operations on datasets. ( instead of implicit functions.)From what i can tell, it can't be done.If someone can contradict this, i would be the first to thank him !! (We also need to do such operations !) ___________________________________________Seb ----- Original Message ----- From: Massimo Ivani To: vtkusers at public.kitware.com Sent: Friday, April 18, 2003 9:04 AM Subject: [vtkusers] vtkPolyData intersection Hello vtk Users, How can I cut a vtkPolydata with another vtkPolydata and have intersection points?? I cannot use vtkCutter because I cannot convert vtkPolyData in vtkImplicitFunction... Thank you. Dr. Massimo Ivani Media Lab Software Tel.: +39 0187 517775 Fax: +39 0187 511833 massimo.ivani at mlsw.com www.mlsw.com -------------------------------------------------------------------------- This message has been 'sanitized'. This means that potentially dangerous content has been rewritten or removed. The following log describes which actions were taken. Sanitizer (start="1050671167"): Part (pos="2491"): SanitizeFile (filename="unnamed.txt", mimetype="text/plain"): Match (rule="2"): Enforced policy: accept Part (pos="2950"): SanitizeFile (filename="unnamed.html", mimetype="text/html"): Match (rule="default"): Enforced policy: accept Note: Styles and layers give attackers many tools to fool the user and common browsers interpret Javascript code found within style definitions. References: - http://www.securityfocus.com/bid/630 - http://archives.indenial.com/hypermail/bugtraq/2001/January2001/0512.html Rewrote HTML tag: >>_style_0 _/STYLE_<< as: >>_DEFANGED_style_0 _/STYLE_<< Total modifications so far: 1 Anomy 0.0.0 : Sanitizer.pm $Id: Sanitizer.pm,v 1.62 2002/09/17 17:59:08 bre Exp $ -- K.R.Subramanian Phone: (704) 687-4872 Department of Computer Science FAX: (704) 687-4893 UNC Charlotte, CARC 311 Email: krs at cs.uncc.edu Charlotte, NC 28223-0001 Web: http://www.cs.uncc.edu/~krs -------------- next part -------------- An HTML attachment was scrubbed... URL: From sxa at fluent.com Fri Apr 18 11:36:58 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Fri, 18 Apr 2003 11:36:58 -0400 Subject: [vtkusers] Removing internal cells ! References: <032101c3050a$537cb740$8ae4e9c0@sxapc><1050604236.15951.66.camel@caemlyn.kitwarein.com> <035501c3051c$980edd40$8ae4e9c0@sxapc> <1050610272.15939.74.camel@caemlyn.kitwarein.com> Message-ID: <007101c305c0$59751190$8ae4e9c0@sxapc> This is the code : ###################################################################### /* THE CODE USUALLY PRESENT BEFORE THIS LINE IS NOT RELEVANT FOR THIS MAILLED CODE SAMBLE */ int h, i, pointCount, oldPointCount, polylineCount; vtkPolyData* aGrid = vtkPolyData::New(); polylineCount = m_AllPolylines.count(); QDictIterator it( m_AllPolylines ); // See QDictIterator it.toFirst () ; aGrid->Allocate(polylineCount, polylineCount ); oldPointCount = 0; vtkPoints* allPoints = vtkPoints::New(); allPoints = getAllPolylinesPoints(); // This will put in allPoints the following points describing a square: /* (0, 0.0 ,0.0, 0.0); (1, 20.0 ,0.0, 0.0); (2, 20.0 ,20.0, 0.0); (3, 0.0 ,20.0, 0.0); (4, 0.0 ,0.0, 0.0); */ vtkIdList* array = vtkIdList::New(); for (h = 0; h < polylineCount; h++){ pointCount = (it.current())->m_points->GetNumberOfPoints (); array->SetNumberOfIds(pointCount); for (i = 0; i < pointCount; i++){ array->SetId(i, i + oldPointCount); } aGrid->InsertNextCell (VTK_POLYGON, array); array->Reset(); oldPointCount += pointCount; ++it ; } aGrid->SetPoints( allPoints); aGrid->Update(); vtkGLUTesselatorTriangleFilter* tri = vtkGLUTesselatorTriangleFilter::New(); tri->SetInput(aGrid); tri->PassVertsOff (); tri->PassLinesOff (); tri->Update(); vtkReverseSense* reverser = vtkReverseSense::New(); reverser->SetInput(tri->GetOutput()); reverser->ReverseCellsOn (); reverser->ReverseNormalsOff (); reverser->Update(); vtkPolyDataNormals* normalA = vtkPolyDataNormals::New(); normalA->SetInput(reverser->GetOutput()); normalA->Update(); vtkLinearExtrusionFilter* extruder= vtkLinearExtrusionFilter::New(); extruder->SetInput(normalA->GetOutput()); extruder->SetExtrusionTypeToNormalExtrusion (); extruder->CappingOn (); extruder->SetScaleFactor (-m_thickness); extruder->Update(); vtkPolyDataNormals* normal = vtkPolyDataNormals::New(); normal->SetInput(extruder->GetOutput()); normal->Update(); /* THE CODE USUALLY HERE IS NOT RELEVANT FOR THIS MAILLED CODE SAMBLE */ aGrid->Delete(); array->Delete(); tri->Delete(); reverser->Delete(); normalA->Delete(); normal->Delete(); extruder->Delete(); allPoints->Delete(); ##################################################################3 Thanks ! __________________________________ Seb ----- Original Message ----- From: "Berk Geveci" To: "Sebastien Auclair" Sent: Thursday, April 17, 2003 4:11 PM Subject: Re: [vtkusers] Removing internal cells ! > > Yes i'am using vtkLinearExtrusionFilter. > > The polygons are complex and often non-convex so before being extruded, they > > are passed through vtkGLUTesselatorTriangleFilter. > > > > When displayed with transparency, we can see the internal facets ! > > hmm. I wonder if this has something to do with the way > tesselation is done (duplicate points, edges etc.). Can you > reproduce this with one simple polygon (and if you can, > can you write it to a file and send it to me) ? > > -Berk > > -------------- next part -------------- A non-text attachment was scrubbed... Name: RESULT.jpg Type: image/jpeg Size: 65533 bytes Desc: not available URL: From sxa at fluent.com Fri Apr 18 11:52:17 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Fri, 18 Apr 2003 11:52:17 -0400 Subject: [vtkusers] vtkPolyData intersection References: <002201c305ab$1b39b8a0$f254dfd9@compaq> <001101c305b9$5fcdfe50$8ae4e9c0@sxapc> <3EA0112F.B88B5A0D@cs.uncc.edu> Message-ID: <007b01c305c2$7dc14bc0$8ae4e9c0@sxapc> GREAT !! I didn't know about this one !!! (It's not in the books !) Can someone point us to a code example where it would be used ? Thanks ! _____________________________________ Seb ----- Original Message ----- From: K.R.Subramanian To: Sebastien Auclair Cc: Massimo Ivani ; vtkusers at public.kitware.com Sent: Friday, April 18, 2003 10:52 AM Subject: Re: [vtkusers] vtkPolyData intersection vtkImplicitDataSet can be used to convert any vtk dataset (including PolyData) into an implicit function.. havent used it myself, but that this looks like what the original poster was asking. -- krs Sebastien Auclair wrote: This is again related to the need for boolean operations on datasets. ( instead of implicit functions.)From what i can tell, it can't be done.If someone can contradict this, i would be the first to thank him !! (We also need to do such operations !) ___________________________________________Seb ----- Original Message ----- From: Massimo Ivani To: vtkusers at public.kitware.com Sent: Friday, April 18, 2003 9:04 AM Subject: [vtkusers] vtkPolyData intersection Hello vtk Users, How can I cut a vtkPolydata with another vtkPolydata and have intersection points?? I cannot use vtkCutter because I cannot convert vtkPolyData in vtkImplicitFunction... Thank you. Dr. Massimo Ivani Media Lab Software Tel.: +39 0187 517775 Fax: +39 0187 511833 massimo.ivani at mlsw.com www.mlsw.com -------------------------------------------------------------------------- This message has been 'sanitized'. This means that potentially dangerous content has been rewritten or removed. The following log describes which actions were taken. Sanitizer (start="1050671167"): Part (pos="2491"): SanitizeFile (filename="unnamed.txt", mimetype="text/plain"): Match (rule="2"): Enforced policy: accept Part (pos="2950"): SanitizeFile (filename="unnamed.html", mimetype="text/html"): Match (rule="default"): Enforced policy: accept Note: Styles and layers give attackers many tools to fool the user and common browsers interpret Javascript code found within style definitions. References: - http://www.securityfocus.com/bid/630 - http://archives.indenial.com/hypermail/bugtraq/2001/January2001/0512.html Rewrote HTML tag: >>_style_0 _/STYLE_<< as: >>_DEFANGED_style_0 _/STYLE_<< Total modifications so far: 1 Anomy 0.0.0 : Sanitizer.pm $Id: Sanitizer.pm,v 1.62 2002/09/17 17:59:08 bre Exp $ -- K.R.Subramanian Phone: (704) 687-4872 Department of Computer Science FAX: (704) 687-4893 UNC Charlotte, CARC 311 Email: krs at cs.uncc.edu Charlotte, NC 28223-0001 Web: http://www.cs.uncc.edu/~krs ------------------------------------------------------------------------------ This message has been 'sanitized'. This means that potentially dangerous content has been rewritten or removed. The following log describes which actions were taken. Sanitizer (start="1050677565"): Part (pos="1429"): SanitizeFile (filename="unnamed.txt", mimetype="text/plain"): Match (rule="2"): Enforced policy: accept Part (pos="4176"): SanitizeFile (filename="unnamed.html", mimetype="text/html"): Match (rule="default"): Enforced policy: accept Note: Styles and layers give attackers many tools to fool the user and common browsers interpret Javascript code found within style definitions. References: - http://www.securityfocus.com/bid/630 - http://archives.indenial.com/hypermail/bugtraq/2001/January2001/0512.html Rewrote HTML tag: >>_style_0 _/style_<< as: >>_DEFANGED_style_0 _/style_<< Rewrote HTML tag: >>_blockquote style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"_<< as: >>_blockquote DEFANGED_style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"_<< Rewrote HTML tag: >>_table BORDER BGCOLOR="#FFFFFF" _<< as: >>_table DEFANGED_BORDER BGCOLOR="#FFFFFF" _<< Total modifications so far: 3 Anomy 0.0.0 : Sanitizer.pm $Id: Sanitizer.pm,v 1.62 2002/09/17 17:59:08 bre Exp $ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sxa at fluent.com Fri Apr 18 12:12:10 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Fri, 18 Apr 2003 12:12:10 -0400 Subject: [vtkusers] Removing internal cells ! Message-ID: <009b01c305c5$44584e80$8ae4e9c0@sxapc> Interesting note: If we use TwoSidedLightingOn instead of TwoSidedLightingOff, then the internal facet becomes invisible ! The thing is that we are using TwoSidedLightingOff and removnig the internal facets is critical for us since the models we are displaying take all our system memory space. These internal facets are unecessary and take too much space. There are really many of them. Thanks for any help ! ________________________________ Seb ----- Original Message ----- From: "Sebastien Auclair" To: "Berk Geveci" Cc: Sent: Friday, April 18, 2003 11:36 AM Subject: Re: [vtkusers] Removing internal cells ! > This is the code : > > ###################################################################### > /* > THE CODE USUALLY PRESENT BEFORE THIS LINE IS NOT RELEVANT FOR THIS > MAILLED CODE SAMBLE > */ > int h, i, pointCount, oldPointCount, polylineCount; > vtkPolyData* aGrid = vtkPolyData::New(); > > > polylineCount = m_AllPolylines.count(); > > QDictIterator it( m_AllPolylines ); // See QDictIterator > it.toFirst () ; > aGrid->Allocate(polylineCount, polylineCount ); > oldPointCount = 0; > > vtkPoints* allPoints = vtkPoints::New(); > allPoints = getAllPolylinesPoints(); > // This will put in allPoints the following points describing a square: > /* > (0, 0.0 ,0.0, 0.0); > (1, 20.0 ,0.0, 0.0); > (2, 20.0 ,20.0, 0.0); > (3, 0.0 ,20.0, 0.0); > (4, 0.0 ,0.0, 0.0); > > */ > vtkIdList* array = vtkIdList::New(); > > for (h = 0; h < polylineCount; h++){ > pointCount = (it.current())->m_points->GetNumberOfPoints (); > > array->SetNumberOfIds(pointCount); > for (i = 0; i < pointCount; i++){ > array->SetId(i, i + oldPointCount); > } > aGrid->InsertNextCell (VTK_POLYGON, array); > array->Reset(); > oldPointCount += pointCount; > ++it ; > } > > aGrid->SetPoints( allPoints); > aGrid->Update(); > > vtkGLUTesselatorTriangleFilter* tri = > vtkGLUTesselatorTriangleFilter::New(); > tri->SetInput(aGrid); > tri->PassVertsOff (); > tri->PassLinesOff (); > tri->Update(); > > vtkReverseSense* reverser = vtkReverseSense::New(); > reverser->SetInput(tri->GetOutput()); > reverser->ReverseCellsOn (); > reverser->ReverseNormalsOff (); > reverser->Update(); > > vtkPolyDataNormals* normalA = vtkPolyDataNormals::New(); > normalA->SetInput(reverser->GetOutput()); > normalA->Update(); > > > vtkLinearExtrusionFilter* extruder= vtkLinearExtrusionFilter::New(); > extruder->SetInput(normalA->GetOutput()); > extruder->SetExtrusionTypeToNormalExtrusion (); > extruder->CappingOn (); > extruder->SetScaleFactor (-m_thickness); > extruder->Update(); > > vtkPolyDataNormals* normal = vtkPolyDataNormals::New(); > normal->SetInput(extruder->GetOutput()); > normal->Update(); > > /* > THE CODE USUALLY HERE IS NOT RELEVANT FOR THIS MAILLED CODE SAMBLE > */ > > > aGrid->Delete(); > array->Delete(); > tri->Delete(); > reverser->Delete(); > normalA->Delete(); > normal->Delete(); > extruder->Delete(); > allPoints->Delete(); > ##################################################################3 > > > Thanks ! > __________________________________ > Seb > > > > > > ----- Original Message ----- > From: "Berk Geveci" > To: "Sebastien Auclair" > Sent: Thursday, April 17, 2003 4:11 PM > Subject: Re: [vtkusers] Removing internal cells ! > > > > > Yes i'am using vtkLinearExtrusionFilter. > > > The polygons are complex and often non-convex so before being extruded, > they > > > are passed through vtkGLUTesselatorTriangleFilter. > > > > > > When displayed with transparency, we can see the internal facets ! > > > > hmm. I wonder if this has something to do with the way > > tesselation is done (duplicate points, edges etc.). Can you > > reproduce this with one simple polygon (and if you can, > > can you write it to a file and send it to me) ? > > > > -Berk > > > > > From scharver at evl.uic.edu Fri Apr 18 13:11:53 2003 From: scharver at evl.uic.edu (Chris Scharver) Date: Fri, 18 Apr 2003 12:11:53 -0500 Subject: [vtkusers] vtkPolyData intersection In-Reply-To: <004c01c305ba$cd68a8b0$f254dfd9@compaq> References: <002201c305ab$1b39b8a0$f254dfd9@compaq> <001101c305b9$5fcdfe50$8ae4e9c0@sxapc> <3EA0112F.B88B5A0D@cs.uncc.edu> <004c01c305ba$cd68a8b0$f254dfd9@compaq> Message-ID: At 4:57 PM +0200 04/18/2003, Massimo Ivani wrote: >I used vtkImplicitDataSet to convert vtkPolydata to vtkImplicitFunction then I used vtkCutter to cut first vtkPolyData using converted vtkImplictFunction but I had no data, it does not work...... The documentation indicates that scalar data must be associated with the input to vtkImplicitDataSet. Your vtkPolyData may not have any scalar values. Perhaps scalars just need to be assigned to every point or cell in the geometry? I'll have to look into using this if it works. Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 From putanowr at twins.pk.edu.pl Fri Apr 18 13:58:00 2003 From: putanowr at twins.pk.edu.pl (Roman Putanowicz) Date: Fri, 18 Apr 2003 19:58:00 +0200 Subject: [vtkusers] Changes in class hierarchy 4.0 - 4.2 Message-ID: <20030418175800.GA10292@twins.pk.edu.pl> Hi, I tried to compile my old program written for VTK 4.0 and compilation failed. I have found out that this is related to the change in class hierarchy, specifically to the class vtkSampleFunction. In VTK 4.0 vtkSampleFunction is derived from vtkStructuredPointsSource and in VTK4.2 it is derived from vtkImageSource. Because of the above there is a change in the return type of the method GetOutput. In the 4.0 it is vtkStructuredPoints and in 4.2 it is vtkImageData. I looked to the FAQ but did not find the change in the section related the the differences between 4.0 and 4.2. Is this the exceptional change or are more changes of this sort in 4.2? I found some posting related to the change of vtkSampleFunction API http://public.kitware.com/pipermail/vtk-developers/2002-June/001645.html but it does not explain the above. What are the reasons behind that change ? Romek -- _/_/_/ _/ _/ _/_/_/_/_/ Roman Putanowicz _/ _/ _/ _/ Inst.Comp.Meth.Civ.Eng. _/ _/ _/ _/ tel +48 12 628 2569 _/_/_/racow _/_/_/niversity of _/echnology putanowr at twins.pk.edu.pl From imho at skynet.be Fri Apr 18 06:35:04 2003 From: imho at skynet.be (imho) Date: Fri, 18 Apr 2003 12:35:04 +0200 Subject: [vtkusers] classic heap limit problem In-Reply-To: <000001c3059c$f50f17f0$5e294484@lab.csf.technion.ac.il> References: <000001c3059c$f50f17f0$5e294484@lab.csf.technion.ac.il> Message-ID: <3E9FD4D8.5010105@skynet.be> Hi Sagi, I'm compiling on Visual C++ 6.0, but what's strange is it was working with vtk 4.0. I don't think we use complicated templates as you said :( Sagi Schein wrote: >On what platform you are compiling? - I have never seen this problem in >vc but in gcc (under vxworks) we often got this problem when trying to >use complicated templates that were instantiate during compilation. >Usually changing the template from T to T if T is an STL >container circumvented the problem. >Hope it helps > > >-----Original Message----- >From: vtkusers-admin at public.kitware.com >[mailto:vtkusers-admin at public.kitware.com] On Behalf Of imho >Sent: Friday, April 18, 2003 12:18 PM >To: vtk >Subject: [vtkusers] classic heap limit problem > >Hi all, >I'd like to use the Procrustes filter so I'm trying to upgrade to 4.2 my > >windows' VTK 4.0 installation. >Compiling my project I have the heap limit problem, and increasing it >doesn't change anything. >I've saw this (thanks Mathieu) but I don't know what to do... > >http://public.kitware.com/pipermail/vtkusers/2002-October/014036.html >and >http://public.kitware.com/pipermail/vtkusers/2002-May/011228.html > >thanks > > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > > > From sxa at fluent.com Fri Apr 18 15:33:46 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Fri, 18 Apr 2003 15:33:46 -0400 Subject: [vtkusers] Must reduce cell count ! Message-ID: <00cd01c305e1$6e02bec0$8ae4e9c0@sxapc> This is a request for some help related to the filtering\reduction of unnecessary cells in polydata objects. We must find a way to reduce the amount of cell (polygons\triangles) displayed by our application. The common usage of our application is to display extruded models of non-convex polygons. Once the extrusion is done and the full model is displayed, it is composed of at least "10 000 000" triangle cells. Many of these cells are unnecessary. These unnecessary cells belong to two cases : A) The case related to the previous mails posted in this mailing-list. "Removing internal cells". When extruding a triangulated polygon, the interior edges produce interior facets. B) Facets generated by extrusion are triangulated. If you extrude a triangle, (on its normal), you'd get a wedge with 3 walls and a cap. These 3 walls instead of being 3 square are in fact 6 triangle cells EXAMPLE: Let's say we start the process from a square polygon shape. (4 points) We first tessellate to make sure it will be convex. We then extrude on the polygon's normal vector. The end-result is a cube made of "16" cells !!!!! (Way too much !) Our goal is to get a cube made of 8 cells. (Or 6 would be even better) How could we reduce the number of cells ? Thanks for any help ! ___________________________________________________ Seb From smahaade at essence.utsi.edu Fri Apr 18 15:44:27 2003 From: smahaade at essence.utsi.edu (Subha) Date: Fri, 18 Apr 2003 13:44:27 -0600 Subject: [vtkusers] help with contouring selected cells using vtkContourFilter Message-ID: <20030417164137.M47026@mail2.utsi.edu> Hi, I want to contour a huge structured grid. I wanted to speed up the contouring in vtkContourFilter. I already know the cells that I want to contour. They are sporadic and distributed all over the structured grid. So I supplied an additional data member, a vtkIdList, to the vtkContourFilter class that helps to check whether a cell in the grid needs to be contoured or not. Each number contained in the vtkIdList is either a 1 or 0 depending on whether the corresponding cell in the structured grid is a cell that needs to be contoured or not. (if out of 10 cells cells 0,1,5,7 are the only cells that need to be contoured then the vtkIdList will contain the numbers 1,1,0,0,0,1,0,1,0,0 ). class VTK_EXPORT vtkContourFilter : public vtkDataSetToPolyDataFilter { public: ...... vtkIdList *cList; ....... } void vtkContourFilter::SetIdList(vtkIdList *celList) { this->cList = celList; // for use in the Execute function later } void vtkContourFilter::Execute() { ......... for (int j=0; j < numCells && !abortExecute&& this->cList->GetId(j) ==1 ; j++) { /*** cell selection in the for loop condition *********/ for (i=0; i < numContours; i++) { cell->Contour(values[i], cellScalars, this->Locator, newVerts, newLines, newPolys, inPd, outPd, inCd, cellId, outCd); } // for all contour values } // for all cells } //if using scalar tree I thought that this would speed up the contouring process. Instead it slows it down. The result is 2 TIMES slower than contouring all the cells in the entire grid. (even though I am contouring only half the number of cells in the entire grid). I am unable to understand the cause for this. Does anyone know what is going wrong here ? Does anyone know a better way to contour selected cells using ContourFilter ? I have been stuck at this for a long time. Any help is greatly appreciated. Thanks, S. From novalet at yahoo.com.cn Fri Apr 18 23:20:16 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Sat, 19 Apr 2003 11:20:16 +0800 (CST) Subject: [vtkusers] something about image Message-ID: <20030419032016.96747.qmail@web15208.mail.bjs.yahoo.com> Hi! I didn't have the vtk book in hand and not very clear by reading the manual doxygened. So hope somebody could solve my puzzle. What's the difference between vtkImageViewer and vtkImageViewer2? What's the meaning of ColorWindow/ColorLevel? why 255/127.5 pair will show the normal color we see in other software? Is there possible to use imagemagick with vtk to read and write other image format? Thank you!! ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ??????CCTV-2??????????????????????? http://rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cctv_wireless_study From lzyhm at 263.net Sat Apr 19 07:28:17 2003 From: lzyhm at 263.net (lzy) Date: Sat, 19 Apr 2003 19:28:17 +0800 Subject: [vtkusers] link error because of vtkObjectBase Message-ID: <001001c30666$c91a22f0$0200a8c0@lzy> I create my own class from vtkObject (vtk4.2-lastrelease), my class is DLL(msvc6.0). But when create the DLL, link error as following: error LNK2001: unresolved external symbol "public: virtual char const * __thiscall vtkObjectBase::GetClassNameW(void)const " (?GetClassNameW at vtkObjectBase@@UBEPBDXZ) Maybe thre reason is the vtkObjectBase::GetClassName is virual and inline function. How can I do? thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From annainnet at mail.ru Sat Apr 19 13:37:21 2003 From: annainnet at mail.ru (=?koi8-r?Q?=E1=CE=CE=C1=20=EE=C1=CA=CD=C1=CE?=) Date: Sat, 19 Apr 2003 21:37:21 +0400 Subject: [vtkusers] (no subject) Message-ID: Hello. I'm also interested in this question, so I followed the link, you wrote in your answer. And I did't find answer to my question. I have polydata file, ths is not unstructured grid, as it's in FAQ, which you point to. Can you write answer directly in the text of your letter? I would be appreciate to you. Anna Naiman(Russia) >http://vtk.org/pipermail/vtkusers/2003-April/017424.html >[quoting Christopher] >vanessa.noguesruiz at epfl.ch wrote: >> Hello. >> >> I would like to know how to read points from a polydata vtk file, as I do the >> following: >> >> vtkPolyDataReader *lector = vtkPolyDataReader::New(); >> lector->SetFileName ("D:/Proyecto/vtk/cube.vtk"); >> vtkPolyData *info=vtkPolyData::New(); >> info=lector->GetOutput(); >> vtkPoints *points=vtkPoints::New(); >> points=info->GetPoints(); >> >> and I don't get any points pointed by "points". >> Could anyone explainme why I am not getting the data in this way? I've also >> tried to get polygons cells and verts, but it always results NULL or a >> exception is launched when running, although it compiles and links perfectly. >> >> Thanks in advance. From ramakrishna.prakash at quest-global.com Sun Apr 20 05:09:37 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Sun, 20 Apr 2003 14:39:37 +0530 Subject: [vtkusers] Setting colors to individual cell In-Reply-To: <20030418125044.24756.qmail@webmail18.rediffmail.com> Message-ID: <000f01c3071c$91816180$de0ba8c0@qtwblr01.questglobal.com> Hi Nanditha, Following a code snippet which should solve your problem. I am assuming your polydata has some scalar value. The code is in JAVA. double color = 10.0; // different scalar value ((vtkFloatArray)yourPolyData.GetCellData().GetScalars()).SetValue(cellId,col or); //cell Id is picked cell's id yourPolyData.Modified(); regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Nanditha Thakur Sent: Friday, April 18, 2003 6:21 PM To: Jonathan Bailleul Cc: VTK-User Subject: Re: Re: [vtkusers] Setting colors to individual cell Hi Jonathan, I still have not succeeded in my method. I am able to change the scalar value, but the result is far from satisfying. Can you please elborate on your approach. It will be of great help. thanks Nanditha On Thu, 03 Apr 2003 Jonathan Bailleul wrote : >Nanditha Thakur wrote: > > > > Hello Users, > > I have a 3D object. Can I set different color >to > > some of the cells(or points) of this object? This is how my > > requirement is going to be. Say my actor is blue in color.I >will > > pick some of the cells of the object by clicking on it. Now I >want > > to set, say red color, to these picked cells. Is it possible >to do > > so in VTK? Help! > > > > Thanks > > Nanditha > > > > >Dear Nanditha, > >I am just dealing with a similar problem right now! My choice >consisted >in glyphing the points of the selected cell instead, since I just >didn't >figure out how to proceed otherwise. > >I still have problems to solve, but it seems fairly usable. Let >me know >if you need to know more about this, or if you managed to do what >you >planned! > >Best Regards, > > >-- >----------------------------------- >Jonathan BAILLEUL, Doctorant >GREYC Image - Universit? de Caen >http://www.greyc.ismra.fr/~bailleul >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From ramakrishna.prakash at quest-global.com Sun Apr 20 05:18:58 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Sun, 20 Apr 2003 14:48:58 +0530 Subject: [vtkusers] Clipping vtkCell Message-ID: <001001c3071d$e028eb90$de0ba8c0@qtwblr01.questglobal.com> Hi, I have a object represented by vtkPolydata. I mark certain cells by picking. Now I want to clip(cut) these cells from my poly data. I have a gut feeling that I should be using Clip() function in vtkCell but not sure how to use it. Can some body help. Thanks Shyam From imho at skynet.be Sun Apr 20 05:22:47 2003 From: imho at skynet.be (imho) Date: Sun, 20 Apr 2003 11:22:47 +0200 Subject: [vtkusers] vtk linking problem Message-ID: <3EA266E7.2050401@skynet.be> Hi all, now I've clean up a little the code to compile without heap error limit (upgrade vtk 4.0 to 4.2) , and I've link problems from vtk_qt: thanks for any help... Linking... vtk_qt.lib(vtkQGLTexture.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::UnRegister(class vtkObject *)" (?UnRegister at vtkObject@@UAEXPAV1@@Z) vtk_qt.lib(vtkQtOutputWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::UnRegister(class vtkObject *)" (?UnRegister at vtkObject@@UAEXPAV1@@Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::UnRegister(class vtkObject *)" (?UnRegister at vtkObject@@UAEXPAV1@@Z) vtk_qt.lib(vtkQtObjectFactory.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::UnRegister(class vtkObject *)" (?UnRegister at vtkObject@@UAEXPAV1@@Z) vtk_qt.lib(vtkQtOpenGLPolyDataMapper.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::UnRegister(class vtkObject *)" (?UnRegister at vtkObject@@UAEXPAV1@@Z) vtk_qt.lib(vtkQGLLight.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::UnRegister(class vtkObject *)" (?UnRegister at vtkObject@@UAEXPAV1@@Z) vtk_qt.lib(vtkQGLImageMapper.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::UnRegister(class vtkObject *)" (?UnRegister at vtkObject@@UAEXPAV1@@Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintTrailer(class ostream &,class vtkIndent)" (?PrintTrailer at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLTexture.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintTrailer(class ostream &,class vtkIndent)" (?PrintTrailer at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLRenderWindowInteractor.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintTrailer(class ostream &,class vtkIndent)" (?PrintTrailer at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQtOutputWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintTrailer(class ostream &,class vtkIndent)" (?PrintTrailer at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintTrailer(class ostream &,class vtkIndent)" (?PrintTrailer at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQtObjectFactory.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintTrailer(class ostream &,class vtkIndent)" (?PrintTrailer at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQtOpenGLPolyDataMapper.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintTrailer(class ostream &,class vtkIndent)" (?PrintTrailer at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLLight.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintTrailer(class ostream &,class vtkIndent)" (?PrintTrailer at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLImageMapper.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintTrailer(class ostream &,class vtkIndent)" (?PrintTrailer at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintHeader(class ostream &,class vtkIndent)" (?PrintHeader at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLTexture.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintHeader(class ostream &,class vtkIndent)" (?PrintHeader at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLRenderWindowInteractor.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintHeader(class ostream &,class vtkIndent)" (?PrintHeader at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQtOutputWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintHeader(class ostream &,class vtkIndent)" (?PrintHeader at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintHeader(class ostream &,class vtkIndent)" (?PrintHeader at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQtObjectFactory.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintHeader(class ostream &,class vtkIndent)" (?PrintHeader at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQtOpenGLPolyDataMapper.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintHeader(class ostream &,class vtkIndent)" (?PrintHeader at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLLight.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintHeader(class ostream &,class vtkIndent)" (?PrintHeader at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLImageMapper.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::PrintHeader(class ostream &,class vtkIndent)" (?PrintHeader at vtkObject@@UAEXAAVostream@@VvtkIndent@@@Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Delete(void)" (?Delete at vtkObject@@UAEXXZ) vtk_qt.lib(vtkQGLTexture.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Delete(void)" (?Delete at vtkObject@@UAEXXZ) vtk_qt.lib(vtkQGLRenderWindowInteractor.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Delete(void)" (?Delete at vtkObject@@UAEXXZ) vtk_qt.lib(vtkQtOutputWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Delete(void)" (?Delete at vtkObject@@UAEXXZ) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Delete(void)" (?Delete at vtkObject@@UAEXXZ) vtk_qt.lib(vtkQtObjectFactory.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Delete(void)" (?Delete at vtkObject@@UAEXXZ) vtk_qt.lib(vtkQtOpenGLPolyDataMapper.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Delete(void)" (?Delete at vtkObject@@UAEXXZ) vtk_qt.lib(vtkQGLLight.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Delete(void)" (?Delete at vtkObject@@UAEXXZ) vtk_qt.lib(vtkQGLImageMapper.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Delete(void)" (?Delete at vtkObject@@UAEXXZ) vtk_qt.lib(vtkQtOpenGLPolyDataMapper.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkOpenGLPolyDataMapper::Draw(class vtkRenderer *,class vtkActor *)" (?Draw at vtkOpenGLPolyDataMapper@@UAEXPAVvtkRenderer@@PAVvtkAct or@@@Z) vtk_qt.lib(vtkQtOpenGLPolyDataMapper.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkObject::InvokeEvent(unsigned long,void *)" (__imp_?InvokeEvent at vtkObject@@QAEXKPAX at Z) vtk_qt.lib(vtkQGLRenderWindowInteractor.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkObject::InvokeEvent(unsigned long,void *)" (__imp_?InvokeEvent at vtkObject@@QAEXKPAX at Z) vtk_qt.lib(vtkQGLRenderWindowInteractor.obj) : error LNK2001: unresolved external symbol "public: virtual class vtkInteractorStyle * __thiscall vtkRenderWindowInteractor::GetInteractorStyle(void)" (?GetInteractorStyle at vtkRenderWindowInteractor@@UAEP AVvtkInteractorStyle@@XZ) vtk_qt.lib(vtkQGLRenderWindowInteractor.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkRenderWindowInteractor::SetInteractorStyle(class vtkInteractorStyle *)" (?SetInteractorStyle at vtkRenderWindowInteractor@@UAEX PAVvtkInteractorStyle@@@Z) vtk_qt.lib(vtkQGLRenderWindowInteractor.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkRenderWindowInteractor::UnRegister(class vtkObject *)" (?UnRegister at vtkRenderWindowInteractor@@UAEXPAVvtkObject@@@Z) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkRenderWindow::GetEventPending(void)" (?GetEventPending at vtkRenderWindow@@UAEHXZ) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkOpenGLRenderWindow::SetZbufferData(int,int,int,int,float *)" (?SetZbufferData at vtkOpenGLRenderWindow@@UAEXHHHHPAM at Z) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkOpenGLRenderWindow::SetRGBACharPixelData(int,int,int,int,unsigned char *,int,int)" (?SetRGBACharPixelData at vtkOpenGLRenderWindow@@UAEXH HHHPAEHH at Z) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkOpenGLRenderWindow::SetRGBAPixelData(int,int,int,int,float *,int,int)" (?SetRGBAPixelData at vtkOpenGLRenderWindow@@UAEXHHHHPAMHH at Z) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkOpenGLRenderWindow::SetPixelData(int,int,int,int,unsigned char *,int)" (?SetPixelData at vtkOpenGLRenderWindow@@UAEXHHHHPAEH at Z) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkRenderWindow::ShowCursor(void)" (?ShowCursor at vtkRenderWindow@@UAEXXZ) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkRenderWindow::HideCursor(void)" (?HideCursor at vtkRenderWindow@@UAEXXZ) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkWindow::SetWindowName(char *)" (?SetWindowName at vtkWindow@@UAEXPAD at Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkWindow::SetWindowName(char *)" (?SetWindowName at vtkWindow@@UAEXPAD at Z) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkRenderWindow::UnRegister(class vtkObject *)" (?UnRegister at vtkRenderWindow@@UAEXPAVvtkObject@@@Z) vtk_qt.lib(vtkQGLRenderWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class ostream & __cdecl operator<<(class ostream &,class vtkIndent &)" (__imp_??6 at YAAAVostream@@AAV0 at AAVvtkIndent@@@Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class ostream & __cdecl operator<<(class ostream &,class vtkIndent &)" (__imp_??6 at YAAAVostream@@AAV0 at AAVvtkIndent@@@Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual char * __thiscall vtkImageWindow::GetFileName(void)" (?GetFileName at vtkImageWindow@@UAEPADXZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkImageWindow::SetFileName(char const *)" (?SetFileName at vtkImageWindow@@UAEXPBD at Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkImageWindow::ClosePPMImageFile(void)" (?ClosePPMImageFile at vtkImageWindow@@UAEXXZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkImageWindow::WritePPMImageFile(void)" (?WritePPMImageFile at vtkImageWindow@@UAEXXZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkImageWindow::OpenPPMImageFile(void)" (?OpenPPMImageFile at vtkImageWindow@@UAEHXZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkImageWindow::SaveImageAsPPM(void)" (?SaveImageAsPPM at vtkImageWindow@@UAEXXZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkImageWindow::EraseWindow(void)" (?EraseWindow at vtkImageWindow@@UAEXXZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkImageWindow::GrayScaleHintOff(void)" (?GrayScaleHintOff at vtkImageWindow@@UAEXXZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkImageWindow::GrayScaleHintOn(void)" (?GrayScaleHintOn at vtkImageWindow@@UAEXXZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkImageWindow::GetGrayScaleHint(void)" (?GetGrayScaleHint at vtkImageWindow@@UAEHXZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkImageWindow::SetGrayScaleHint(int)" (?SetGrayScaleHint at vtkImageWindow@@UAEXH at Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkImageWindow::SetParentInfo(char *)" (?SetParentInfo at vtkImageWindow@@UAEXPAD at Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkImageWindow::SetWindowInfo(char *)" (?SetWindowInfo at vtkImageWindow@@UAEXPAD at Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall vtkImageWindow::GetGenericDrawable(void)" (?GetGenericDrawable at vtkImageWindow@@UAEPAXXZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual __thiscall vtkImageWindow::~vtkImageWindow(void)" (__imp_??1vtkImageWindow@@MAE at XZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: __thiscall vtkImageWindow::vtkImageWindow(void)" (__imp_??0vtkImageWindow@@IAE at XZ) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl vtkImageWindow::IsTypeOf(char const *)" (__imp_?IsTypeOf at vtkImageWindow@@SAHPBD at Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall vtkImageWindow::GetPosition(int *,int *)" (__imp_?GetPosition at vtkImageWindow@@UAEXPAH0 at Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall vtkImageWindow::GetSize(int *,int *)" (__imp_?GetSize at vtkImageWindow@@UAEXPAH0 at Z) vtk_qt.lib(vtkQGLImageWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall vtkImageWindow::Render(void)" (__imp_?Render at vtkImageWindow@@UAEXXZ) Debug/NewProject.exe : fatal error LNK1120: 39 unresolved externals Error executing link.exe. NewProject.exe - 73 error(s), 0 warning(s) From yass at uscx.net Sun Apr 20 16:48:40 2003 From: yass at uscx.net (yasser salman) Date: Sun, 20 Apr 2003 13:48:40 -0700 (PDT) Subject: [vtkusers] 3D-2D Segmentations... Message-ID: <20030420204840.C08494680@sitemail.everyone.net> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From coopje at chello.nl Sun Apr 20 17:19:48 2003 From: coopje at chello.nl (Eric middelkoop) Date: Sun, 20 Apr 2003 23:19:48 +0200 Subject: [vtkusers] Drawing a 2D line Message-ID: <200304202319.48341.coopje@chello.nl> Hi, I am new to VTK and just wonder how I can draw a simple 2d line-graph, without any specialties. I have searched the internet for examples, browsed the enclosed examples and tried to modify the tutorial examples but I am currently not able to draw a simple line. Can somebody help me out ? Regards, Eric From yass at uscx.net Sun Apr 20 18:19:52 2003 From: yass at uscx.net (yasser salman) Date: Sun, 20 Apr 2003 15:19:52 -0700 (PDT) Subject: [vtkusers] VTK/ITK.. Message-ID: <20030420221952.0A7BA4570@sitemail.everyone.net> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ramakrishna.prakash at quest-global.com Mon Apr 21 02:19:24 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Mon, 21 Apr 2003 11:49:24 +0530 Subject: [vtkusers] vtkPolyData Message-ID: <000201c307cd$f46cd890$de0ba8c0@qtwblr01.questglobal.com> Hi, I know vtkPolyData can not be clipped with another vtkPolyData. But please some body contradict me. Thanks Shyam From lehrig at t-online.de Mon Apr 21 07:02:29 2003 From: lehrig at t-online.de (Rainer Lehrig) Date: Mon, 21 Apr 2003 13:02:29 +0200 Subject: [vtkusers] VTK on SuSE Linux 8.2 Message-ID: <200304211302.29066.lehrig@t-online.de> My project compiled correctly up to SuSE Linux 8.1 But on SuSE Linux 8.2 the file strstream.h is missing !!! So a VTK application can't compile. Does anybody know about this problem ? From yass at uscx.net Mon Apr 21 08:30:29 2003 From: yass at uscx.net (yasser salman) Date: Mon, 21 Apr 2003 05:30:29 -0700 (PDT) Subject: [vtkusers] Plz help!!Tiff so Dark Message-ID: <20030421123029.2D6373D0D@sitemail.everyone.net> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From donna at v1.wustl.edu Mon Apr 21 09:29:43 2003 From: donna at v1.wustl.edu (Donna) Date: Mon, 21 Apr 2003 08:29:43 -0500 Subject: [vtkusers] 3D-2D Segmentations... Message-ID: <3EA3F247.8010705@v1.wustl.edu> yasser wrote: >IS there any VTK examples for 3D brain segmentation ... Have a look at this post, and the links provided therein: http://public.kitware.com/pipermail/vtkusers/2003-March/016557.html From bourrat at merl.com Mon Apr 21 10:18:31 2003 From: bourrat at merl.com (Emmanuelle Bourrat) Date: Mon, 21 Apr 2003 10:18:31 -0400 Subject: [vtkusers] rendering 3ds animations Message-ID: <3EA3FDB7.6094A7E9@merl.com> Hi, I'd like to know if VTK can render a 3ds animation (or an animation made with a similar kind of tool). If VTK can't render such an animation, does anybody know of a c++ librabry that can do it? Thanks, Emmanuelle. From mgsassi at criba.edu.ar Mon Apr 21 10:29:32 2003 From: mgsassi at criba.edu.ar (Maximiliano Sassi) Date: Mon, 21 Apr 2003 11:29:32 -0300 Subject: [vtkusers] BlankPoint Message-ID: <5.1.0.14.0.20030421112827.032ee008@pop3.criba.edu.ar> Has anyone used the method BlankPoint with structured grids? please contact me, thanks, Maxi. -------------- next part -------------- --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.470 / Virus Database: 268 - Release Date: 08/04/2003 From donna at v1.wustl.edu Mon Apr 21 10:28:44 2003 From: donna at v1.wustl.edu (Donna) Date: Mon, 21 Apr 2003 09:28:44 -0500 Subject: [vtkusers] VTK/ITK.. Message-ID: <3EA4001C.1000600@v1.wustl.edu> Hi yasser, If you haven't yet subscribed to the ITK mailing list, then consider doing so (http://www.itk.org/mailman/listinfo/insight-users); it seems pretty responsive to questions like yours. As for a Tiff reader, Luis Ibanez recently replied to a similar question on the ITK users list, but I am unable to find it in the archives, which unfortunately are not searchable (at least not from http://www.itk.org/pipermail/insight-users/). Anyway, I recall his recommending ImageMagick (and perhaps another third-party image conversion package -- netlib?). I was lucky, since my RedHat 7.1 host already had ImageMagick-5.2.7-2 installed; this package included /usr/X11R6/bin/convert, which allowed me to convert my bitmaps to raw, grayscale, byte images, which is exactly what i wanted: #!/bin/sh for file in i*bmp do newfile=`echo $file | sed 's/.bmp/.raw/g'` convert $file GRAY:$newfile done cat i*raw > rat.raw From nick.smethurst at free.fr Mon Apr 21 14:12:17 2003 From: nick.smethurst at free.fr (N Smethurst) Date: Mon, 21 Apr 2003 20:12:17 +0200 Subject: [vtkusers] VTK on SuSE Linux 8.2 In-Reply-To: <200304211302.29066.lehrig@t-online.de> References: <200304211302.29066.lehrig@t-online.de> Message-ID: <200304212012.17100.nick.smethurst@free.fr> VTK uses lots of headers that are deprecated with GCC. Maybe strstream.h is no longer distributed with SUSE ? I run Mandrake 9.1; my strstream.h is just a link to strstream and a few "using" commands: #ifndef _CPP_BACKWARD_STRSTREAM_H #define _CPP_BACKWARD_STRSTREAM_H 1 #include "strstream" using std::strstreambuf; using std::istrstream; using std::ostrstream; using std::strstream; #endif Le Lundi 21 Avril 2003 13:02, Rainer Lehrig a ?crit : > My project compiled correctly up to SuSE Linux 8.1 > But on SuSE Linux 8.2 the file strstream.h is missing !!! > So a VTK application can't compile. > > Does anybody know about this problem ? > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to > subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From Yang at AGIUSA.COM Mon Apr 21 15:02:33 2003 From: Yang at AGIUSA.COM (Xianjin Yang) Date: Mon, 21 Apr 2003 14:02:33 -0500 Subject: [vtkusers] Setting colors to individual cell Message-ID: <6AC51773FA304E469DEE9569AF903E5B1686C1@mail.exchngsvr.agiusa.com> Hi Jonathan and Nanditha, The demo code below renders 8 points at corners of a fictitious cube with 8 different colors. With the help of vtkLookupTable and scalars, you can modify the color of any point or cell. Note that scalars is a 1-D integer array and is served as the index of vtkLookupTable. You should be able to adapt this demo to solve your problem. HTH. Yang ----------------- C++ code ------------------------------- int i; float DataPoints[8][3] = { {0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 1.0}, {1.0, 1.0, 1.0}, {0.0, 1.0, 1.0}}; float colors[8][3] = { {1.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 1.0}, {1.0, 1.0, 1.0}, {0.0, 1.0, 1.0} }; vtkLookupTable *lut = vtkLookupTable::New(); lut->SetNumberOfColors(8); lut->Build(); for (i=0; i<8; ++i) lut->SetTableValue(i, colors[i][0], colors[i][1], colors[i][2], 1.0); vtkPoints * pts = vtkPoints::New(); vtkCellArray * ca = vtkCellArray::New(); vtkPolyData * pd = vtkPolyData::New(); vtkIntArray * scalars = vtkIntArray::New(); for (i=0;i<8;i++) { pts->InsertNextPoint(DataPoints[i][0],DataPoints[i][1],DataPoints[i][2]); ca->InsertNextCell(1); ca->InsertCellPoint(i); scalars->InsertNextTuple1(i); } pd->SetPoints(pts); pd->SetVerts(ca); pd->GetPointData()->SetScalars(scalars); vtkPolyDataMapper * m = vtkPolyDataMapper::New(); m->SetLookupTable(lut); m->SetInput(pd); m->SetScalarRange(0, 7); vtkRenderer* ren = vtkRenderer::New(); vtkActor * a = vtkActor::New(); a->SetMapper(m); a->GetProperty()->SetPointSize(8); ren->AddActor(a); vtkWindow1->GetRenderer()->AddActor(a); scalars->Delete(); ca->Delete(); lut->Delete(); pd->Delete(); m->Delete(); a->Delete(); ren->Delete(); // I am using Borland C++ Builder, and // vtkWindow1 is a TvtkBorlandRenderWindow on my form vtkWindow1->GetRenderer()->ResetCamera(); vtkWindow1->Invalidate(); ------------------------------------- -----Original Message----- From: Nanditha Thakur [mailto:nanditha_thakur at rediffmail.com] Sent: Friday, April 18, 2003 7:51 AM To: Jonathan Bailleul Cc: VTK-User Subject: Re: Re: [vtkusers] Setting colors to individual cell Hi Jonathan, I still have not succeeded in my method. I am able to change the scalar value, but the result is far from satisfying. Can you please elborate on your approach. It will be of great help. thanks Nanditha On Thu, 03 Apr 2003 Jonathan Bailleul wrote : >Nanditha Thakur wrote: > > > > Hello Users, > > I have a 3D object. Can I set different color >to > > some of the cells(or points) of this object? This is how my > > requirement is going to be. Say my actor is blue in color.I >will > > pick some of the cells of the object by clicking on it. Now I >want > > to set, say red color, to these picked cells. Is it possible >to do > > so in VTK? Help! > > > > Thanks > > Nanditha > > > > >Dear Nanditha, > >I am just dealing with a similar problem right now! My choice >consisted >in glyphing the points of the selected cell instead, since I just >didn't >figure out how to proceed otherwise. > >I still have problems to solve, but it seems fairly usable. Let >me know >if you need to know more about this, or if you managed to do what >you >planned! > >Best Regards, > > From Yang at AGIUSA.COM Mon Apr 21 15:16:35 2003 From: Yang at AGIUSA.COM (Xianjin Yang) Date: Mon, 21 Apr 2003 14:16:35 -0500 Subject: [vtkusers] Bounding Box of scattered points Message-ID: <6AC51773FA304E469DEE9569AF903E5B1686C2@mail.exchngsvr.agiusa.com> Hi VTK users, I rendered a list of scattered data points, and I could modify the color of individual points as described in my last email. I also added x, y and z axes with the help of vtkCubeAxesActor2D. However, I really need a bounding box around the points. The bounding box example requires normals which I could not obtain from scattered data points. If the min and max of x, y, z for all points are available, is there any way to draw a rectangular bounding box? Thanks for your help in advance. Yang From cnavarro at ncsa.uiuc.edu Mon Apr 21 16:29:01 2003 From: cnavarro at ncsa.uiuc.edu (Christopher M. Navarro) Date: Mon, 21 Apr 2003 15:29:01 -0500 (CDT) Subject: [vtkusers] Bounding Box of scattered points In-Reply-To: <6AC51773FA304E469DEE9569AF903E5B1686C2@mail.exchngsvr.agiusa.com> Message-ID: On Mon, 21 Apr 2003, Xianjin Yang wrote: > Hi VTK users, > > I rendered a list of scattered data points, and I could modify the color of > individual points as described in my last email. I also added x, y and z axes > with the help of vtkCubeAxesActor2D. However, I really need a bounding box > around the points. The bounding box example requires normals which I could not > obtain from scattered data points. If the min and max of x, y, z for all points > are available, is there any way to draw a rectangular bounding box? vtkCubeSource could do what you want. You can set the bounds to your min and max of (x,y,z) and then set the actor representation to wireframe. vtkActor cubeActor = new vtkActor(); cubeActor.GetProperty().SetRepresentationToWireframe(); -chris From yass at uscx.net Mon Apr 21 17:09:17 2003 From: yass at uscx.net (yasser salman) Date: Mon, 21 Apr 2003 14:09:17 -0700 (PDT) Subject: [vtkusers] Re: vanessa.noguesruiz@epfl.ch Message-ID: <20030421210917.0E6D5D084@sitemail.everyone.net> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From bob at stlcc.org Mon Apr 21 17:30:58 2003 From: bob at stlcc.org (Bob Palank) Date: Mon, 21 Apr 2003 16:30:58 -0500 Subject: [vtkusers] vtk + Java + JBuilder8 Message-ID: >Under NT40 and JB6 I had vtk up and running and did numerous examples. >Under XP Pro and JB8 I cannot get execution even though I do get a clean >compile. >If others using XP, vtk, and JBuilder 80 perhaps they will respond. >I suspect our problems are numerous: >1. setting CLASSPATH >2. positioning dlls >3. positioning vtk.jar >Perhaps a clear step by step set of directions will benefit me and others as well. >Any and all help is appreciated. >BR > Bob Palank From Daniela.GavidiaSimonetti at student.uva.nl Mon Apr 21 19:03:41 2003 From: Daniela.GavidiaSimonetti at student.uva.nl (D.P. Gavidia Simonetti) Date: Tue, 22 Apr 2003 00:03:41 +0100 Subject: [vtkusers] Help with data parallelism! Message-ID: <9f210d9f177a.9f177a9f210d@student.uva.nl> Hi, I've been trying to generate a cutting plane of a volume in parallel using threads. I modified the example ParallelIso.cxx, which generates isosurfaces using data parallelism. In each thread I'm doing the following: thread 1 - numProcs: - read structured points -> subsample -> create cutting plane -> put PolyData ouput in Output port thread 0: - read structured points -> subsample -> create cutting plane -> append own PolyData output and output from other threads (received through InputPort) with AppendPolyData -> map, update and render The problem is that when I run on 3 or more threads, I get the plane that I want plus many random polygons all around it. I don't know where these come from. I put some snapshots and my code online: http://www.geocities.com/dgavidia2003/parallel.html You can try the code with ironProt.vtk Have any of you calculated a cutting plane in parallel? I'm using a computer with 4 processors, so I'd like to parallelize this and get some speed-up. Do any of you know if vtkCutter supports parallel streaming? If any of you know what I'm doing wrong or have any suggestions on parallelizing the cutting plane, please let me know. Thanks in advance. Daniela Gavidia // This will be called by all processes void MyMain( vtkMultiProcessController *controller, void *arg ) { vtkStructuredPointsReader *reader; vtkExtractVOI *voi; vtkPlane *cutPlane = vtkPlane::New(); vtkCutter *planeCut = vtkCutter::New(); float *n; int myid, numProcs; char* fname = reinterpret_cast(arg); // define a normal for the cutting plane n = (float *)malloc(3*sizeof(float)); n[0] = 0.0; n[1] = 0.0; n[2] = 100.0; // Obtain the id of the running process and the total // number of processes myid = controller->GetLocalProcessId(); numProcs = controller->GetNumberOfProcesses(); // Create the reader, the data file name might have // to be changed depending on where the data files are. reader = vtkStructuredPointsReader::New(); reader->SetFileName(fname); reader->Update(); voi = vtkExtractVOI::New(); voi->SetInput(reader->GetOutput()); voi->SetSampleRate(2,2,2); voi->Update(); float *center = (float *)calloc(3, sizeof(float)); center = reader->GetOutput()->GetCenter(); cutPlane->SetOrigin(center); cutPlane->SetNormal(n[0],n[1],n[2]); planeCut->SetCutFunction(cutPlane); planeCut->SetInput(voi->GetOutput()); if ((myid != 0)) { printf("My id = %d\n", myid); // If I am not the root process // Satellite process! Send data through port. vtkOutputPort *upPort = vtkOutputPort::New(); // connect the port to the output of the pipeline upPort->SetInput(planeCut->GetOutput()); // Multiple ports can go through the same connection. // This is used to differentiate ports upPort->SetTag(PORT_TAG); // Loop which processes RMI requests. // Use vtkMultiProcessController::BREAK_RMI_TAG to break it. upPort->WaitForUpdate(); // We are done. Clean up. upPort->Delete(); upPort = NULL; } else { // If I am the root process int i, j; vtkAppendPolyData *app = vtkAppendPolyData::New(); vtkInputPort *downPort; vtkRenderer *ren = vtkRenderer::New(); vtkRenderWindow *renWindow = vtkRenderWindow::New(); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); vtkDataSetMapper *mapper = vtkDataSetMapper::New(); vtkActor *actor = vtkActor::New(); vtkTimerLog *timer = vtkTimerLog::New(); // Add my pipeline's output to the append filter app->AddInput(planeCut->GetOutput()); // ###################### important #################### // # This tells the append filter to request pieces from // # each of its inputs. Since each of its inputs comes from // # a different process, each process generates a separate // # piece of the data (data parallelism). // # If this is not used, all processes will iso-surface // # all the data. app->ParallelStreamingOn(); // This is the main thread: Collect the data and render it. for (i = 1; i < numProcs; ++i) { printf("downPort %d\n",i); downPort = vtkInputPort::New(); downPort->SetRemoteProcessId(i); // Multiple ports can go through the same connection. // This is used to differentiate ports downPort->SetTag(PORT_TAG); //downPort->GetPolyDataOutput()->Update(); app->AddInput(downPort->GetPolyDataOutput()); // Reference already incremented by AddInput(). Delete() // will only decrement the count, not destroy the object. // The ports will be destroyed when the append filter // goes away. downPort->SetDoUpdateInformation(0); downPort->Delete(); downPort = NULL; } // Create the rendering part of the pipeline renWindow->AddRenderer(ren); iren->SetRenderWindow(renWindow); ren->SetBackground(1.0, 0.9, 0.9); renWindow->SetSize( 400, 400); // Create white to black colormap vtkLookupTable *lbw = vtkLookupTable::New(); // white to black lbw->SetHueRange(0.0, 0.0); lbw->SetSaturationRange(0.0, 0.0); lbw->SetValueRange(1.0, 0.0); float *range = (float *)calloc(2, sizeof(float)); reader->GetOutput()->GetPointData()->GetScalars()->GetRange(range); mapper->SetInput(app->GetOutput()); mapper->SetScalarRange(range); mapper->SetLookupTable(lbw); actor->SetMapper(mapper); ren->AddActor(actor); // Time the rendering. Note that the execution on all processes // start only after Update() timer->StartTimer(); app->Update(); timer->StopTimer(); cerr << "Update took " << timer->GetElapsedTime() << " seconds\n"; // now render the results timer->StartTimer(); renWindow->Render(); timer->StopTimer(); cerr << "Render() took " << timer->GetElapsedTime() << " seconds\n"; printf("Before triggerRMI\n"); // Tell the other processors to stop processing RMIs. for (i = 1; i < numProcs; ++i) { controller->TriggerRMI(i, vtkMultiProcessController::BREAK_RMI_TAG); } printf("After triggerRMI\n"); iren->Start(); // Clean up app->Delete(); ren->Delete(); renWindow->Delete(); iren->Delete(); mapper->Delete(); actor->Delete(); timer->Delete(); } printf("Before process cleanup\n"); // clean up objects in all processes. reader->Delete(); } int main( int argc, char* argv[] ) { vtkMultiProcessController *controller; // Note that this will create a vtkMPIController if MPI // is configured, vtkThreadedController otherwise. controller = vtkMultiProcessController::New(); controller->Initialize(&argc, &argv); // Name of StructuredPoints data file char *fname = "/home/dgavidia/threads/obj_394.vtk"; controller->SetSingleMethod(MyMain, reinterpret_cast(fname)); int nprocs = atoi(argv[1]); printf("Number of Proceses: %d\n", nprocs); // When using MPI, the number of processes is determined // by the external program which launches this application. // However, when using threads, we need to set it ourselves. if (controller->IsA("vtkThreadedController")) { // Set the number of processes to 2 for this example. controller->SetNumberOfProcesses(nprocs); } controller->SingleMethodExecute(); printf("Return to main\n"); delete[] fname; controller->Finalize(); controller->Delete(); return 0; } From Mathieu.Malaterre at creatis.insa-lyon.fr Tue Apr 22 03:54:13 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Tue, 22 Apr 2003 09:54:13 +0200 Subject: [vtkusers] VTK/ITK.. In-Reply-To: <3EA4001C.1000600@v1.wustl.edu> References: <3EA4001C.1000600@v1.wustl.edu> Message-ID: <3EA4F525.9030303@creatis.insa-lyon.fr> Yasser, even if you don't have a search engine on the mailing list you can read the ITK FAQ : http://www.itk.org/cgi-bin/InsightFAQ/InsightFAQ?req=show&file=faq01.008.htp mathieu Donna wrote: > Hi yasser, > > If you haven't yet subscribed to the ITK mailing list, then consider > doing so (http://www.itk.org/mailman/listinfo/insight-users); it seems > pretty responsive to questions like yours. > > As for a Tiff reader, Luis Ibanez recently replied to a similar question > on the ITK users list, but I am unable to find it in the archives, which > unfortunately are not searchable (at least not from > http://www.itk.org/pipermail/insight-users/). > > Anyway, I recall his recommending ImageMagick (and perhaps another > third-party image conversion package -- netlib?). I was lucky, since my > RedHat 7.1 host already had ImageMagick-5.2.7-2 installed; this package > included /usr/X11R6/bin/convert, which allowed me to convert my bitmaps > to raw, grayscale, byte images, which is exactly what i wanted: > > #!/bin/sh > for file in i*bmp > do > newfile=`echo $file | sed 's/.bmp/.raw/g'` > convert $file GRAY:$newfile > done > cat i*raw > rat.raw > > > _______________________________________________ > This is the private VTK discussion list. Please keep messages on-topic. > Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From Mathieu.Malaterre at creatis.insa-lyon.fr Tue Apr 22 03:55:38 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Tue, 22 Apr 2003 09:55:38 +0200 Subject: [vtkusers] Drawing a 2D line In-Reply-To: <200304202319.48341.coopje@chello.nl> References: <200304202319.48341.coopje@chello.nl> Message-ID: <3EA4F57A.1010902@creatis.insa-lyon.fr> Eric, Please have a look at: http://www.vtk.org/doc/nightly/html/classvtkImageCanvasSource2D.html#a8 mathieu Eric middelkoop wrote: > Hi, > > I am new to VTK and just wonder how I can draw a simple 2d line-graph, without > any specialties. > > I have searched the internet for examples, browsed the enclosed examples and > tried to modify the tutorial examples but I am currently not able to draw a > simple line. > > Can somebody help me out ? > > Regards, > > > Eric > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From Mathieu.Malaterre at creatis.insa-lyon.fr Tue Apr 22 03:58:44 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Tue, 22 Apr 2003 09:58:44 +0200 Subject: [vtkusers] (no subject) In-Reply-To: References: Message-ID: <3EA4F634.9090208@creatis.insa-lyon.fr> ????, My link was not pointing to the FAQ ?? To be sure I copy/paste the answer from Christopher (hope you don't mind Chris ?) [snip] > Did you try reader Update or UpdateWholeExtent? [snip] Yet Another HTH ;) mathieu Ps: please keep in mind that VTK is command driven, so you won't get anything until you ask for it ! ???? ?????? wrote: > Hello. > I'm also interested in this question, so I followed the link, you wrote in your answer. And I did't find answer to my question. I have polydata file, ths is not unstructured grid, as it's in FAQ, which you point to. Can you write answer directly in the text of your letter? I would be appreciate to you. > > > Anna Naiman(Russia) > > >>http://vtk.org/pipermail/vtkusers/2003-April/017424.html > > >>[quoting Christopher] > > > >>vanessa.noguesruiz at epfl.ch wrote: >> >>>Hello. >>> >>>I would like to know how to read points from a polydata vtk file, as I do the >>>following: >>> >>>vtkPolyDataReader *lector = vtkPolyDataReader::New(); >>> lector->SetFileName ("D:/Proyecto/vtk/cube.vtk"); >>>vtkPolyData *info=vtkPolyData::New(); >>>info=lector->GetOutput(); >>>vtkPoints *points=vtkPoints::New(); >>> points=info->GetPoints(); >>> >>>and I don't get any points pointed by "points". >>>Could anyone explainme why I am not getting the data in this way? I've also >>>tried to get polygons cells and verts, but it always results NULL or a >>>exception is launched when running, although it compiles and links perfectly. >>> >>>Thanks in advance. > > > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From I.deBoer at polytec.de Tue Apr 22 05:13:38 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Tue, 22 Apr 2003 11:13:38 +0200 Subject: [vtkusers] vtkPolyData intersection Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3C4@02polywbr.waldbronn.polytec.de> Hi, I did something in that direction. I think clipping or cutting would have the same results. I clipped polygon data from a plan/texture. But the clipping is bad on the edges :( I haven't found any better solution yet... m_pcPoints holds the 2d positions of my polygon data. m_pElementIndex holds the polygon information (number of points and the neighbours) greets Ingo /****************************************************************/ /** */ void CVtkData::CreateFromColorIndex(BYTE *pBuffer, int iWidth, int iHeight) { ASSERT(m_pcPoints); ASSERT(m_pElementIndex); m_uiWidth = iWidth; m_uiHeight = iHeight; float fAspectRatio = (float)m_uiWidth/(float)m_uiHeight; // Create image data vtkImageData *image = vtkImageData::New(); image->SetExtent(0, iWidth, 0, iHeight, 0, 0); image->SetUpdateExtent(0, iWidth, 0, iHeight, 0, 0); image->SetScalarTypeToUnsignedChar(); for (int j = 0; j < iHeight; j++) for (int i = 0; i < iWidth; i++) *((BYTE*)image->GetScalarPointer(i,j,0)) = *pBuffer++; // Create texture if (m_pvtkTexture) m_pvtkTexture->Delete(); m_pvtkTexture = vtkTexture::New(); m_pvtkTexture->SetInput(image); m_pvtkTexture->InterpolateOn(); // Create a plane source. The vtkPlaneSource generates texture coordinates. vtkPlaneSource *plane = vtkPlaneSource::New(); plane->SetOrigin( 0.0, 0.0, 0.0); plane->SetPoint1( fAspectRatio*1.0, 0.0, 0.0); plane->SetPoint2( 0.0, 1.0, 0.0); plane->SetCenter( fAspectRatio*0.5, 0.5, 0.0); plane->SetXResolution(128); plane->SetYResolution(128); // create clipping region int i; // We'll create the building blocks of polydata including data attributes. vtkPolyData *hole = vtkPolyData::New(); vtkPoints *points = vtkPoints::New(); vtkCellArray *polygons = vtkCellArray::New(); vtkFloatArray *scalars = vtkFloatArray::New(); for (i = 0; i < m_lPoints; i++) { points->InsertPoint(i, m_pcPoints[i].m_tX, m_pcPoints[i].m_tY, 0.0); scalars->InsertTuple1(i, 1); } for (i = 0; i < m_lElements; i++) { int iElements = m_pElementIndex[i].m_iPoints; vtkIdType *polys = new vtkIdType[iElements]; for (int j = 0; j < iElements; j++) polys[j] = m_pElementIndex[i].m_piIndices[j]; polygons->InsertNextCell(iElements, polys); delete polys; } // We now assign the pieces to the vtkPolyData. hole->SetPoints(points); hole->SetPolys(polygons); hole->GetPointData()->SetScalars(scalars); // delete not needed stuff points->Delete(); polygons->Delete(); scalars->Delete(); // create the implicit function from the dataset vtkImplicitDataSet *dataset = vtkImplicitDataSet::New(); dataset->SetDataSet(hole); // create the clipper vtkClipPolyData *clipper = vtkClipPolyData::New(); clipper->SetInput(plane->GetOutput()); clipper->SetClipFunction(dataset); clipper->InsideOutOn(); // Create a plane mapper vtkPolyDataMapper *planeMapper = vtkPolyDataMapper::New(); //#define _SHOW_HOLEOBJECT_ #ifdef _SHOW_HOLEOBJECT_ planeMapper->SetInput(plane->GetOutput()); #else planeMapper->SetInput(clipper->GetOutput()); #endif // Remove old actor m_pvtkRenderer->RemoveActor(m_pvtkActorTexture); // Set the actor for the mapper and the texture m_pvtkActorTexture->SetMapper(planeMapper); m_pvtkActorTexture->SetTexture(m_pvtkTexture); // set transparency m_pvtkActorTexture->GetProperty()->SetOpacity(m_fTransparency); // Add actor to renderer m_pvtkRenderer->AddActor(m_pvtkActorTexture); #ifdef _SHOW_HOLEOBJECT_ // Create a hole mapper and show hole aswell vtkPolyDataMapper *holeMapper = vtkPolyDataMapper::New(); holeMapper->SetInput(hole); vtkActor *holeActor = vtkActor::New(); holeActor->SetMapper(holeMapper); m_pvtkRenderer->AddActor(holeActor); m_pvtkPropCollection->AddItem(holeActor); #endif // update Update(); Render(); // cleanup planeMapper->Delete(); plane->Delete(); image->Delete(); } From I.deBoer at polytec.de Tue Apr 22 05:22:55 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Tue, 22 Apr 2003 11:22:55 +0200 Subject: AW: [vtkusers] rendering 3ds animations Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD93C19BF@02polywbr.waldbronn.polytec.de> Hi, there is a sample that uses plate.tvk called dispplot.tcl In a timer function you can modify the warp vector and you can an animation. An other sample would be modifying the points. You make the Points a member of your class and then call something like for (int i = 0; i < m_lPoints; i++) m_pvtkPoints->SetPoint(i, x_new[i], y_new[i], z_new[i]); m_pvtkPoints->Modified(); in your timer function or animationnextframe function. greets Ingo From imho at skynet.be Tue Apr 22 05:24:27 2003 From: imho at skynet.be (imho) Date: Tue, 22 Apr 2003 11:24:27 +0200 Subject: [vtkusers] problem with vtkProcrustesAlignmentFilter example Message-ID: <3EA50A4B.5080305@skynet.be> Hi all, I try to use this TCL example http://public.kitware.com/cgi-bin/cvsweb.cgi/~checkout~/VTK/Examples/Modelling/Tcl/procrustesAlignment.tcl , converting it to C++. But I have a few errors : this line : map2a->SetInput (procrustes1->GetOutput(0)); where map2a is a vtkPolyDataMapper* and procrustes1 a vtkProcrustesAlignmentFilter* make : error C2664: 'SetInput' : cannot convert parameter 1 from 'class vtkPointSet *' to 'class vtkPolyData *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast What should I do? I have just converted the example. thanks From I.deBoer at polytec.de Tue Apr 22 05:56:28 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Tue, 22 Apr 2003 11:56:28 +0200 Subject: [vtkusers] VTK and DirectX9 ? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3C6@02polywbr.waldbronn.polytec.de> Hi, anyone has any experience with VTK and DirectX 9 ? I want to draw some stuff from VTK into a RGBA Direct3D surface... greets Ingo From zxem at my169.com Tue Apr 22 07:12:43 2003 From: zxem at my169.com (zx) Date: Tue, 22 Apr 2003 11:12:43 +0000 Subject: [vtkusers] choose package? Message-ID: Hi all, I'm trying to decide the tool I'm going to use for my dissertation. And I want to learn people's opinion about OpenDX, VTK, IDL etc. Thanks! X Zhao -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.straub at lmu.de Tue Apr 22 07:21:36 2003 From: tobias.straub at lmu.de (Tobias) Date: Tue, 22 Apr 2003 13:21:36 +0200 Subject: [vtkusers] new user attempting install on mac OSX In-Reply-To: Message-ID: <94C83F60-74B4-11D7-AB10-0003935A86C6@lmu.de> Am Freitag, 18.04.03 um 15:00 Uhr schrieb Adrian Umpleby: >> so i followed the mayavi build instructions. everything went fine. i >> tested vtk-usage using mayavi's included python test-script. fine. >> then when i start mayavi (whatever way) i get a segmentation fault. > > Can you 'gdb' that to get a stack trace? > so this is what gdb tells me when importing mayavi with the python interpreter. (~) % gdb /Applications/Python.app/Contents/MacOS/python GNU gdb 5.3-20021014 (Apple version gdb-250) (Sat Dec 7 02:14:27 GMT 2002) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-macos10". warning: Couldn't find library name in dyld_resolve_load_flag. warning: Couldn't find library name in dyld_resolve_load_flag. Reading symbols for shared libraries .... done (gdb) run Starting program: /Applications/Python.app/Contents/MacOS/python [Switching to process 595 thread 0xb03] ..starting up Reading symbols for shared libraries . done Reading symbols for shared libraries ..................................................... done original argc=1 original argv[0] = "/Applications/Python.app/Contents/MacOS/python" modified argc=1 modified argv[0] = "/Applications/Python.app/Contents/MacOS/python" Python 2.2.2 (#2, Mar 26 2003, 10:45:21) [GCC 3.1 20020420 (prerelease)] on darwin Type "copyright", "credits" or "license" for more information. Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done running sitecustomize.py Reading symbols for shared libraries . done Reading symbols for shared libraries . done >>> import Tkinter Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done >>> import mayavi Reading symbols for shared libraries . done Reading symbols for shared libraries . done Program received signal EXC_BAD_ACCESS, Could not access memory. 0x90004aa4 in szone_malloc () (gdb) bt [...] #4170 0x003d1670 in PyEval_EvalCodeEx (co=0x7a4e40, globals=0x42, locals=0x90004a44, args=0x3, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2595 #4171 0x003d4194 in PyEval_EvalCode (co=0x5e010, globals=0x42, locals=0x28022248) at Python/ceval.c:481 #4172 0x003f28cc in PyImport_ExecCodeModuleEx (name=0x311b68 "Z\035", co=0x7a4e40, pathname=0x8b6f0 "") at Python/import.c:505 #4173 0x003f56a0 in load_source_module (name=0x0, pathname=0xbfffcec0 "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site- packages/mayavi/Common.pyc", fp=0x44dba0) at Python/import.c:787 #4174 0x003f30fc in load_module (name=0xbfffd880 "mayavi.Common", fp=0xa0006ba0, buf=0xbfffd380 "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site- packages/mayavi/Common.py", type=-2139062144) at Python/import.c:1371 #4175 0x003f41bc in import_submodule (mod=0x91820, subname=0x83
, fullname=0xbfffd880 "mayavi.Common") at Python/import.c:1910 #4176 0x003f3c48 in load_next (mod=0x91820, altmod=0x0, p_name=0xbfffd887, buf=0xbfffd880 "mayavi.Common", p_buflen=0xbfffdc90) at Python/import.c:1766 #4177 0x003f5a20 in import_module_ex (name=0x0, globals=0x42, locals=0x28022248, fromlist=0x442794) at Python/import.c:1617 #4178 0x003f4ce8 in PyImport_ImportModuleEx (name=0x30c574 "Common", globals=0x31ef80, locals=0x31ef80, fromlist=0x442794) at Python/import.c:1658 #4179 0x003c8dc0 in builtin___import__ (self=0x5e010, args=0x42) at Python/bltinmodule.c:40 #4180 0x00378ea4 in PyObject_Call (func=0x5e010, arg=0x42, kw=0x28022248) at Objects/abstract.c:1688 #4181 0x003d24dc in PyEval_CallObjectWithKeywords (func=0x8f370, arg=0x2f4640, kw=0x0) at Python/ceval.c:3058 #4182 0x003cfdd8 in eval_frame (f=0x85f750) at Python/ceval.c:1843 #4183 0x003d1670 in PyEval_EvalCodeEx (co=0x2f4640, globals=0x42, locals=0x90004a44, args=0x7540b0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2595 #4184 0x003d4194 in PyEval_EvalCode (co=0x5e010, globals=0x42, locals=0x28022248) at Python/ceval.c:481 #4185 0x003f28cc in PyImport_ExecCodeModuleEx (name=0x7539c0 "Z", co=0x2f4640, pathname=0x8b6f0 "") at Python/import.c:505 #4186 0x003f56a0 in load_source_module (name=0x8f370 "", pathname=0xbfffe080 "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site- packages/mayavi/__init__.pyc", fp=0x44dba0) at Python/import.c:787 #4187 0x003f30fc in load_module (name=0xbfffef10 "mayavi", fp=0xa0006b48, buf=0xbfffe540 "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site- packages/mayavi/__init__.py", type=-2139062144) at Python/import.c:1371 #4188 0x003f5934 in load_package (name=0xbfffef10 "mayavi", pathname=0x765ec0 "") at Python/import.c:844 #4189 0x003f3258 in load_module (name=0xbfffef10 "mayavi", fp=0x0, buf=0xbfffea10 "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site- packages/mayavi", type=-2139062144) at Python/import.c:1394 #4190 0x003f41bc in import_submodule (mod=0x442794, subname=0x6b
, fullname=0xbfffef10 "mayavi") at Python/import.c:1910 #4191 0x003f3c48 in load_next (mod=0x442794, altmod=0x0, p_name=0xbfffef10, buf=0xbfffef10 "mayavi", p_buflen=0xbffff320) at Python/import.c:1766 #4192 0x003f5a20 in import_module_ex (name=0x0, globals=0x42, locals=0x28022248, fromlist=0x442794) at Python/import.c:1617 #4193 0x003f4ce8 in PyImport_ImportModuleEx (name=0x2f99e4 "mayavi", globals=0x9c7e0, locals=0x9c7e0, fromlist=0x442794) at Python/import.c:1658 #4194 0x003c8dc0 in builtin___import__ (self=0x5e010, args=0x42) at Python/bltinmodule.c:40 #4195 0x00378ea4 in PyObject_Call (func=0x5e010, arg=0x42, kw=0x28022248) at Objects/abstract.c:1688 #4196 0x003d24dc in PyEval_CallObjectWithKeywords (func=0x8f370, arg=0x91c20, kw=0x0) at Python/ceval.c:3058 #4197 0x003cfdd8 in eval_frame (f=0x85f750) at Python/ceval.c:1843 #4198 0x003d1670 in PyEval_EvalCodeEx (co=0x91c20, globals=0x42, locals=0x90004a44, args=0x917a0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2595 #4199 0x003d4194 in PyEval_EvalCode (co=0x5e010, globals=0x42, locals=0x28022248) at Python/ceval.c:481 #4200 0x004005f4 in run_node (n=0x917a0, filename=0x42
, globals=0x321860, locals=0x442794, flags=0x0) at Python/pythonrun.c:1079 #4201 0x003ffb70 in PyRun_InteractiveOneFlags (fp=0x91c20, filename=0x8f370 "", flags=0x8b6f0) at Python/pythonrun.c:590 #4202 0x003ff950 in PyRun_InteractiveLoopFlags (fp=0x2ed5d4, filename=0x91810 "", flags=0x42f97c) at Python/pythonrun.c:526 #4203 0x00401054 in PyRun_AnyFile (fp=0xa0000cd4, filename=0x42
) at Python/pythonrun.c:489 #4204 0x00002778 in Py_Main (argc=9748, argv=0x0, filename=0x2614 ".\005") at ../../Mac/Python/macmain.c:667 #4205 0x000025f0 in main (argc=1, argv=0xbffff97c) at ../../Mac/Python/macmain.c:568 #4206 0x0000226c in _start (argc=9748, argv=0xbffff97c, envp=0xbffff984) at /SourceCache/Csu/Csu-45/crt.c:267 #4207 0x000020ec in start () (gdb) > So you don't find it hangs when you try to 'import vtk' in python? Or > 'package require vtk' in tclsh? > no hangs! >> i have aqua tkinter in the python framework and that works. and also >> the python interpreter. > > Where (and when) did you get Tkinter for Aqua? > i mean i have Tcl/TkAqua working with Tkinter. following the instructions found at http://www.astro.washington.edu/owen/InstallingPythonOnJaguar.html bye Tobias From rob.vantol at wtcm.be Tue Apr 22 08:49:37 2003 From: rob.vantol at wtcm.be (Rob van Tol) Date: Tue, 22 Apr 2003 14:49:37 +0200 Subject: [vtkusers] Reading binary data Message-ID: <5.1.0.14.0.20030422140106.00a93c90@server02.site02.wtcm.be> Dear vtk-ers, I wrote a program using vtk, which visualizes trajectories of particles moved by a liquid during the filling of a mould. This program uses ascii-data and works fine. Since the data sets are in the order of several megabytes, I would like to transfer the ascii data to binary data, and this is where the problem starts. To investigate the problem I wrote the test program below, using VC++ 6.0, to create a rectilinear grid with some data. If I view the vtkfile "pipo.vtk" using mayavi, data is shown, but all the data is smaller than 8.04e-041. So it is likely that the binary float data is read in a different way than it was written. Can somebody inform me how to write binary data from VC++ 6.0, in such a way that it is read correctly by vtk ? Thank you in advance, ROB. //-------------------------------------------------------------------------------------- void main() { FILE *out ; float list[8]; int coord[2]; out = fopen("pipo.vtk", "w"); fprintf(out,"# vtk DataFile Version 2.0\n"); fprintf(out,"#My data in binary format\n"); fprintf(out,"BINARY\n "); fprintf(out,"DATASET RECTILINEAR_GRID\n"); fprintf(out,"DIMENSIONS 2 2 2\n"); coord[0]=0;coord[1]=1; fprintf(out,"\nX_COORDINATES 2 int\n"); fwrite( coord, sizeof( int ), 2, out ); fprintf(out,"\nY_COORDINATES 2 int\n"); fwrite( coord, sizeof( int ), 2, out ); fprintf(out,"\nZ_COORDINATES 2 int\n"); fwrite( coord, sizeof( int ), 2, out ); fprintf(out,"\nPOINT_DATA 8\n"); fprintf(out,"SCALARS colors float\n"); fprintf(out,"LOOKUP_TABLE default\n"); list[0]=0.0;list[1]=1.0;list[2]=2.0;list[3]=3.0; list[4]=4.0;list[5]=5.0;list[6]=6.0;list[7]=7.0; fwrite( list, sizeof( float ), 8, out ); } //-------------------------------------------------------------------------------------- dr. R. van Tol WTCM Gieterijcentrum Technologiepark 9 B-9052 Zwijnaarde tel.:0032 (0)9 2645704 fax:0032 (0)9 2645848 mailto:rob.vantol at wtcm.be -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiang at Telematik-Institut.de Tue Apr 22 09:47:12 2003 From: jiang at Telematik-Institut.de (Chunyan Jiang) Date: Tue, 22 Apr 2003 15:47:12 +0200 Subject: [vtkusers] vtk.util.VtkUtil not found in vtk.jar Message-ID: Hi, vtk-user, I try to compile some vtk's examples in java. Many examples have "import vtk.util.VtkUtil;". This line can not pass compile. And I can not find vtkUtil in vtk.jar. How can I solve this problem? Thanks a lot! Chunyan *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** From mgsassi at criba.edu.ar Tue Apr 22 09:54:25 2003 From: mgsassi at criba.edu.ar (Maximiliano Sassi) Date: Tue, 22 Apr 2003 10:54:25 -0300 Subject: [vtkusers] BlankPoint In-Reply-To: <5.1.0.14.0.20030421112827.032ee008@pop3.criba.edu.ar> Message-ID: <5.1.0.14.0.20030422105004.02cec9b0@pop3.criba.edu.ar> Hi, i have a problem with blanking points in structured grids, i?m using vtk 4.0 in MS C++, when i run the program a run time error (memory) arise. Has anyone used the method BlankPoint with structured grids? please contact me thanks a lot Maxi. -------------- next part -------------- --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.470 / Virus Database: 268 - Release Date: 08/04/2003 From galicjan at yahoo.com Tue Apr 22 09:59:02 2003 From: galicjan at yahoo.com (Jarek Sacha) Date: Tue, 22 Apr 2003 06:59:02 -0700 (PDT) Subject: [vtkusers] vtk.util.VtkUtil not found in vtk.jar In-Reply-To: Message-ID: <20030422135902.19749.qmail@web20912.mail.yahoo.com> --- Chunyan Jiang wrote: > Hi, vtk-user, > I try to compile some vtk's examples in java. Many examples have "import > vtk.util.VtkUtil;". This line can not pass compile. And I can not find > vtkUtil in vtk.jar. How can I solve this problem? Thanks a lot! I assume that you refer to Java VTK-Examples that are available from http://ij-plugins.sf.net. vtk.util.VtkUtil if part of the download, located in VTK-Examples/Wrapping/Java/vtk/util. You need to compile it and add it to your classpath. Release 1.0 of VTK-Examples will have and CMake and Ant build scripts, so compiling examples and dependencies will be straightforward, it should be ready before end of May. vtk.util.VtkUtil contains methods to retrieve content of environment variables like VTK_DATA_ROOT, as recent versions of Java no longer support direct access to environment variables. Jarek __________________________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com From Richard.Bridge at tessella.com Tue Apr 22 10:03:24 2003 From: Richard.Bridge at tessella.com (Richard.Bridge at tessella.com) Date: Tue, 22 Apr 2003 15:03:24 +0100 Subject: [vtkusers] vtk.util.VtkUtil not found in vtk.jar Message-ID: Chunyan, I must admit have not seen this line in any of the java examples but I would suggest removing the line and replacing it with a simple "import vtk.*;" and then also doing the library load: "static { System.loadLibrary("vtkCommonJava"); System.loadLibrary("vtkHybridJava"); System.loadLibrary("vtkFilteringJava"); System.loadLibrary("vtkIOJava"); System.loadLibrary("vtkImagingJava"); System.loadLibrary("vtkGraphicsJava"); System.loadLibrary("vtkRenderingJava"); }" which is what I have been doing and it has worked fine. Rich "Chunyan Jiang" Sent by: vtkusers-admin at public.kitware.com 22/04/2003 15:47 ZE2 To: "VTK-User" cc: Subject: [vtkusers] vtk.util.VtkUtil not found in vtk.jar Hi, vtk-user, I try to compile some vtk's examples in java. Many examples have "import vtk.util.VtkUtil;". This line can not pass compile. And I can not find vtkUtil in vtk.jar. How can I solve this problem? Thanks a lot! Chunyan *********************************************************************** Chunyan Jiang, Dipl.-Inform., Institut for Telematic Bahnhofstrasse 30-32, D-54292 Trier, Germany Phone: (+49) (0)651-97551-34 Fax: (+49) (0)651-97551-12 *********************************************************************** _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers This message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this message by anyone else is unauthorized and strictly prohibited. If you have received this message in error, please inform the sender immediately. TESSELLA Richard.Bridge at tessella.com __/__/__/ Tessella Support Services plc __/__/__/ 3 Vineyard Chambers, ABINGDON, OX14 3PX, England __/__/__/ Tel: (44)(0)1235-555511 Fax: (44)(0)1235-553301 www.tessella.com Registered in England No. 1466429 -------------- next part -------------- An HTML attachment was scrubbed... URL: From angela.germana at tiscali.it Tue Apr 22 11:27:17 2003 From: angela.germana at tiscali.it (angela.germana at tiscali.it) Date: Tue, 22 Apr 2003 17:27:17 +0200 Subject: [vtkusers] Reading binary data In-Reply-To: <5.1.0.14.0.20030422140106.00a93c90@server02.site02.wtcm.be> Message-ID: <3E9BA3FB0000DA69@mail-3.tiscali.it> >-- Messaggio Originale -- >To: vtkusers at public.kitware.com >From: Rob van Tol >Subject: [vtkusers] Reading binary data >Date: Tue, 22 Apr 2003 14:49:37 +0200 > > >> >Can somebody inform me how to write binary data from VC++ 6.0, in such a > >way that it is read correctly by vtk ? > >Thank you in advance, > >ROB. > I develope to analyse astrophysical data, and I wrote a class VTK which reads binary data and returns a polydata . If anybody is interested into, I can post it to a private address. By Angela __________________________________________________________________ Tiscali ADSL, fino a 9 MESI GRATIS sull'offerta Tiscali ADSL Light Mega! Tiscali ADSL non teme confronti! Abbonati subito. http://point.tiscali.it/adsl/index.shtml From Mathieu.Malaterre at creatis.insa-lyon.fr Tue Apr 22 12:09:19 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Tue, 22 Apr 2003 18:09:19 +0200 Subject: [vtkusers] Reading binary data In-Reply-To: <3E9BA3FB0000DA69@mail-3.tiscali.it> References: <3E9BA3FB0000DA69@mail-3.tiscali.it> Message-ID: <3EA5692F.5050707@creatis.insa-lyon.fr> What's wrong with: vtkRectilinearGridWriter->SetFileTypeToBinary() http://www.vtk.org/doc/nightly/html/classvtkDataWriter.html#z2337_3 mathieu Ps: why make it simple when you can make it difficult ;) angela.germana at tiscali.it wrote: >>-- Messaggio Originale -- >>To: vtkusers at public.kitware.com >>From: Rob van Tol >>Subject: [vtkusers] Reading binary data >>Date: Tue, 22 Apr 2003 14:49:37 +0200 >> >> >> >>Can somebody inform me how to write binary data from VC++ 6.0, in such > > a > >>way that it is read correctly by vtk ? >> >>Thank you in advance, >> >>ROB. >> > > I develope to analyse astrophysical data, and I wrote a class VTK which > reads binary data and returns a polydata . If anybody is interested into, > I can post it to a private address. > By > Angela > > > __________________________________________________________________ > Tiscali ADSL, fino a 9 MESI GRATIS sull'offerta Tiscali ADSL Light Mega! > Tiscali ADSL non teme confronti! Abbonati subito. > http://point.tiscali.it/adsl/index.shtml > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From Bruce.Lamond at ed.ac.uk Tue Apr 22 13:21:59 2003 From: Bruce.Lamond at ed.ac.uk (Bruce.Lamond at ed.ac.uk) Date: Tue, 22 Apr 2003 18:21:59 +0100 (BST) Subject: [vtkusers] iren->Set*PickMethod() obsoleted? Message-ID: <1051032118.3ea57a3703830@staffmail.ed.ac.uk> Hi there, I'm trying to use VTK to return (x,y,z) coordinate corresponding to the cursor position when 'p' is pressed. I thought this might involve using the iren->Set*PickMethod() but see that this is not to be used in future. Does anyone know how I should go about getting the coordinate corresponding to a pick event? cheers Bruce Lamond ################################################ # Bruce Lamond # # Edinburgh Virtual Environment Centre (EdVEC) # # University of Edinburgh # # JCMB room 2403 # # The King's Buildings # # West Mains Road # # Edinburgh EH9 3JZ # # UK # # www.edvec.ed.ac.uk # # Tel. (00 44 )/(0) 131 650 4981 # ################################################ From sxa at fluent.com Tue Apr 22 13:49:27 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Tue, 22 Apr 2003 13:49:27 -0400 Subject: [vtkusers] Light bug ! Message-ID: <009b01c308f7$85214400$8ae4e9c0@sxapc> Greetings ! I'm looking for clues (not necessarily a bug-fix) related to a bug we have ! Our application has 1 camera with only one light set to follow it. Renderer->LightFollowCameraOn(); ) Moving the camera moves the light fine but changing the coordinates of the points of an object so that it rotates seems to also affect the light !! NOTE: We don't use any WindowInteractor. We've implemented our own based on the code for vtkInteractorStyleTrackballActor\Camera. BUG EXAMPLE: If I have two cubes A and B with their facet 1 facing the camera. Only one light placed at the camera position. For both cubes, the facet 1 receives all the light. I rotate cube A on 90?\Y by modifying the point coordinates directly in the dataset at the beginning of the pipeline. The result is that the cube A is rotated alright but so as the light in relation to cube A. And cube B is still receiving light on his facet 1. !!!! (Like if we now have two lights !) The facet 1 of the rotated cube A still receive light directly. Any clues on this behavior ? Thanks ! __________________________________________________________________ Seb From dshamoni at science.uva.nl Tue Apr 22 13:56:19 2003 From: dshamoni at science.uva.nl (Denis Shamonin) Date: Tue, 22 Apr 2003 19:56:19 +0200 Subject: [vtkusers] iren->Set*PickMethod() obsoleted? In-Reply-To: <1051032118.3ea57a3703830@staffmail.ed.ac.uk> References: <1051032118.3ea57a3703830@staffmail.ed.ac.uk> Message-ID: <3EA58243.8020506@science.uva.nl> Bruce.Lamond at ed.ac.uk wrote: >Hi there, >I'm trying to use VTK to return (x,y,z) coordinate corresponding to the cursor >position when 'p' is pressed. I thought this might involve using the >iren->Set*PickMethod() but see that this is not to be used in future. Does >anyone know how I should go about getting the coordinate corresponding to a pick >event? >cheers >Bruce Lamond > > Depend. If you will make pick operation you will get not a point (xyz) but vector. This vector will start from XY on the X window which should be converted to world coordinats like //--- float* YouClass::ComputeWorldCoordinate(float x,float y,float z) { float *WorldCoordinate; vtkCoordinate *Coordinate = vtkCoordinate::New(); Coordinate->SetCoordinateSystem(VTK_DISPLAY); Coordinate->SetValue(x,y,z); WorldCoordinate = Coordinate->GetComputedWorldValue(ren); return WorldCoordinate; } if you know XY on you X window use it like //--- float *t; t = this->ComputeWorldCoordinate((float)X1,(float)Y1,0.0); Then end will be clipping rage of the camera->GetClippingRange(), or *inf*. You can use this for calculate end point: //--- void YouClass::EndPoint(float Point[3], float EndPoint[3]) { float cameraPos[4], cameraFP[4]; float cameraDOP[3]; float ray[3], rayLength; double *clipRange; float tF, tB; float p2World[4]; int i; vtkCamera *camera = this->ren->GetActiveCamera(); camera->GetPosition((float *)cameraPos); cameraPos[3] = 1.0; camera->GetFocalPoint((float *)cameraFP); cameraFP[3] = 1.0; for (i=0; i<3; i++) { ray[i] = Point[i] - cameraPos[i]; } for (i=0; i<3; i++) { cameraDOP[i] = cameraFP[i] - cameraPos[i]; } vtkMath::Normalize(cameraDOP); if (( rayLength = vtkMath::Dot(cameraDOP,ray)) == 0.0 ) { vtkErrorMacro(<< "Cannot process points"); } clipRange = camera->GetClippingRange(); if ( camera->GetParallelProjection() ) { tF = clipRange[0] - rayLength; tB = clipRange[1] - rayLength; for (i=0; i<3; i++) { p2World[i] = Point[i] + tB*cameraDOP[i]; } } else { tF = clipRange[0] / rayLength; tB = clipRange[1] / rayLength; for (i=0; i<3; i++) { p2World[i] = cameraPos[i] + tB*ray[i]; } } p2World[3] = 1.0; for (i=0; i<3; i++) { EndPoint[i] = p2World[i]; } } Then you can calculate vector. If you know how :) -- Denis Shamonin Address : Section Computational Science University of Amsterdam Kruislaan 403, 1098 SJ Amsterdam the Netherlands E-mail : dshamoni at science.uva.nl URL : http://www.science.uva.nl/~dshamoni/ From nikolas_2004 at hotmail.com Tue Apr 22 14:40:29 2003 From: nikolas_2004 at hotmail.com (Nicolas Fernandez) Date: Tue, 22 Apr 2003 15:40:29 -0300 Subject: [vtkusers] vtk in Delphi :) Message-ID: An HTML attachment was scrubbed... URL: From alan at vuesonix.com Tue Apr 22 16:40:48 2003 From: alan at vuesonix.com (Alan) Date: Tue, 22 Apr 2003 16:40:48 -0400 Subject: [vtkusers] Need help getting vtkCanvas as Image via swing or AWT Message-ID: <3EA5A8D0.4050409@vuesonix.com> Hi, I'm trying to capture the image output of the vtkCanvas component. I've tried // should capture image contents from swing based component RepaintManager rpMgr=RepaintManager.currentManager(panel.getvtkCanvas()); img=rpMgr.getOffscreenBuffer(panel, panel.getWidth(), panel.getHeight()); and also // should capture image contents from awt based component Component c=panel.getvtkCanvas(); img=c.createImage(c.getWidth(), c.getHeight()); Graphics g=img.getGraphics(); c.printAll(g); where panel extends Jpanel and contains a vtkCanvas() object. Although the image size is always correct, the image contents are always empty. This despite the fact that VTK has displayed a pretty picture onscreen, Java just doesn't seem to be able to access it at either the Swing or AWT level. Can anyone help me capture the output of vtkCanvas to an Image()? Is there a reason that this can't be done? Thanks for any insight on this puzzle. --Alan BTW, my workaround has been to capture the component via the Robot() class: Robot r=new Robot(); Rectangle rect=panel.getBounds(); rect.translate(-panel.getInsets().left,-panel.getInsets().top); img=r.createScreenCapture(rect); This works acceptably, but only if the vtkCanvas is not covered by any other windows. From cnavarro at ncsa.uiuc.edu Tue Apr 22 16:59:57 2003 From: cnavarro at ncsa.uiuc.edu (Christopher M. Navarro) Date: Tue, 22 Apr 2003 15:59:57 -0500 (CDT) Subject: [vtkusers] Need help getting vtkCanvas as Image via swing or AWT In-Reply-To: <3EA5A8D0.4050409@vuesonix.com> Message-ID: On Tue, 22 Apr 2003, Alan wrote: > Hi, > I'm trying to capture the image output of the vtkCanvas component. I've > tried > > > // should capture image contents from swing based component > RepaintManager > rpMgr=RepaintManager.currentManager(panel.getvtkCanvas()); > img=rpMgr.getOffscreenBuffer(panel, panel.getWidth(), > panel.getHeight()); > > > and also > > > // should capture image contents from awt based component > Component c=panel.getvtkCanvas(); > img=c.createImage(c.getWidth(), c.getHeight()); > Graphics g=img.getGraphics(); > c.printAll(g); > > > where > panel extends Jpanel and contains a vtkCanvas() object. > > > Although the image size is always correct, the image contents are always > empty. This despite the fact that VTK has displayed a pretty picture > onscreen, Java just doesn't seem to be able to access it at either the > Swing or AWT level. > > Can anyone help me capture the output of vtkCanvas to an Image()? Is > there a reason that this can't be done? > > Thanks for any insight on this puzzle. > --Alan > > > BTW, my workaround has been to capture the component via the Robot() class: > > Robot r=new Robot(); > Rectangle rect=panel.getBounds(); > rect.translate(-panel.getInsets().left,-panel.getInsets().top); > img=r.createScreenCapture(rect); > > > This works acceptably, but only if the vtkCanvas is not covered by any > other windows. If you are using the vtkCanvas supplied with the latest release (which I assume you are), you can do the following: vtkRendererSource renSrc = new vtkRendererSource(); renSrc.SetInput(myVtkCanvas.GetRenderer()); renSrc.WholeWindowOn(); vtkPNGWriter writer = new vtkPNGWriter(); writer.SetInput(renSrc.GetOutput()); writer.SetFileName("test"); writer.Write(); vtkPNGWriter can be replaced by any of the other image writers such as vtkJPEGWriter, etc. HTH, chris From adada_marwan at hotmail.com Tue Apr 22 19:42:05 2003 From: adada_marwan at hotmail.com (Marwan Adada) Date: Tue, 22 Apr 2003 23:42:05 +0000 Subject: [vtkusers] vtkVolume16Reader Message-ID: Hello, I have a raw data file of dimensions 205x233x251, I am trying to cut this file into slices to pass it to vtkVolume16Reader, and the to vtkMarchingCubes; When I make 251 slices each containg 47765(205x233)bytes the vtkVolume16Reader can't read the data. When I double the size of the slice, v16 will read the data, but the output will include 4 objects instead of one. There seems to be something wrong with me trying to divide may data into slices. Any Ideas?? Thanks in advance This is my code for dividing my data(which is in buffer) into slices: for(int k=0;k<251;k++) { sprintf (fname, "slice.%d", k+1); fp = fopen (fname, "wb"); for(int i = 0;i<47765;i++){ fwrite(&(buffer[i+(k*47765)]),1,1,fp); } fclose(fp); } Marc _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From anast.jm at pg.com Tue Apr 22 20:03:38 2003 From: anast.jm at pg.com (anast.jm at pg.com) Date: Tue, 22 Apr 2003 20:03:38 -0400 Subject: [vtkusers] vtkVolume16Reader Message-ID: Marc, first it looks like you have 8bit data so don't use vtkVolume16Reader. Second, if you use vtkImageReader you can read your file as a raw 3D volume and not have to slice it up. Also look into vtkImageImport to get the data directly from your buffer into vtk....john Internet Mail Message Received from host: public.kitware.com [24.97.130.19] "Marwan Adada" Sent by: vtkusers-admin at public.kitware.com 04/22/2003 07:42 PM To: vtkusers at public.kitware.com cc: (bcc: John Anast-JM/PGI) Subject: [vtkusers] vtkVolume16Reader Hello, I have a raw data file of dimensions 205x233x251, I am trying to cut this file into slices to pass it to C, and the to vtkMarchingCubes; When I make 251 slices each containg 47765(205x233)bytes the vtkVolume16Reader can't read the data. When I double the size of the slice, v16 will read the data, but the output will include 4 objects instead of one. There seems to be something wrong with me trying to divide may data into slices. Any Ideas?? Thanks in advance This is my code for dividing my data(which is in buffer) into slices: for(int k=0;k<251;k++) { sprintf (fname, "slice.%d", k+1); fp = fopen (fname, "wb"); for(int i = 0;i<47765;i++){ fwrite(&(buffer[i+(k*47765)]),1,1,fp); } fclose(fp); } Marc _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From kch90 at dvis.cs.ccu.edu.tw Wed Apr 23 01:06:47 2003 From: kch90 at dvis.cs.ccu.edu.tw (Ivan Kuo) Date: Wed, 23 Apr 2003 13:06:47 +0800 Subject: [vtkusers] computational fluid dynamics data set. Message-ID: <000c01c30956$2447ab60$67657b8c@IVAN> Hi, vtkusers, Does anyone know where i can get computational fluid dynamics data set that is spacially partitioned. I need this kind of dataset to test a program in vtk. Any information about this dataset would be highly appreciated. thanks! Ivan Kuo kch90 at cs.ccu.edu.tw -------------- next part -------------- An HTML attachment was scrubbed... URL: From vermaas at astron.nl Wed Apr 23 03:03:57 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Wed, 23 Apr 2003 09:03:57 +0200 Subject: [vtkusers] Update/Whole Extent errors Message-ID: Hi, - I have a datacube (vtkImageData) of which I want to show rectangular slices. - I use vtkExtractVOI and renderer the result This is my clipping function: ----------------------------------------------------------------------------------------- void Inspect3d::ClipImageData(vtkImageData *ImageData, vtkExtractVOI *ClippedImageData, int x1,int x2, int y1, int y2, int z1, int z2) { /*** clip the data ***/ ClippedImageData->SetInput(ImageData); ClippedImageData->SetVOI(x1,x2,y1,y2,z1,z2); } -------------------------------------------------------------------------------------------- And this is how I call it: -------------------------------------------------------------------------------------------- /*** Make the SlicedImageData ***/ ClipImageData(this->ImageData,this->SlicedImageData, config->slice[X1],config->slice[X2], config->slice[Y1],config->slice[Y2], config->slice[Z1],config->slice[Z2]); -------------------------------------------------------------------------------------------- This seems to work, I see the slices that I want, but I do get these errors: ----------------------------------------------------------------------------------------------- ERROR: In /wop14_0/vermaas/cosmo312GTK/vtk_nightly_4.x/VTK/Common/vtkDataObject.cxx, line 555 vtkImageData (0x80957c8): Update extent is: 0, 63, 0, 90, 10, 10 ERROR: In /wop14_0/vermaas/cosmo312GTK/vtk_nightly_4.x/VTK/Common/vtkDataObject.cxx, line 562 vtkImageData (0x80957c8): Whole extent is: 0, 63, 10, 10, 0, 144 ------------------------------------------------------------------------------------------------ Q: How harmfull are these errors? Q: Can I prevent them? Q: Is there a better way to get slices of a datacube of vtkImageData? Greetings, Nico Vermaas From ramakrishna.prakash at quest-global.com Wed Apr 23 05:14:20 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Wed, 23 Apr 2003 14:44:20 +0530 Subject: [vtkusers] iren->Set*PickMethod() obsoleted? In-Reply-To: <1051032118.3ea57a3703830@staffmail.ed.ac.uk> Message-ID: <004301c30978$b97d7bc0$de0ba8c0@qtwblr01.questglobal.com> Bruce, try the following code. The code is in Java. vtkPropPicker picker = new vtkPropPicker(); int pick = picker.Pick(x,y,0,GetRenderer());//x,y is your mouse position //if picked, get the pick position if(pick != 0){ double point[] = picker.GetPickPosition(); //point will give you X,Y,Z coordinate //of the picked point. } Hope this helps. Regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Bruce.Lamond at ed.ac.uk Sent: Tuesday, April 22, 2003 10:52 PM To: vtkusers at public.kitware.com Subject: [vtkusers] iren->Set*PickMethod() obsoleted? Hi there, I'm trying to use VTK to return (x,y,z) coordinate corresponding to the cursor position when 'p' is pressed. I thought this might involve using the iren->Set*PickMethod() but see that this is not to be used in future. Does anyone know how I should go about getting the coordinate corresponding to a pick event? cheers Bruce Lamond ################################################ # Bruce Lamond # # Edinburgh Virtual Environment Centre (EdVEC) # # University of Edinburgh # # JCMB room 2403 # # The King's Buildings # # West Mains Road # # Edinburgh EH9 3JZ # # UK # # www.edvec.ed.ac.uk # # Tel. (00 44 )/(0) 131 650 4981 # ################################################ _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From bryan.cole at teraview.co.uk Wed Apr 23 08:06:51 2003 From: bryan.cole at teraview.co.uk (bryan cole) Date: 23 Apr 2003 13:06:51 +0100 Subject: [vtkusers] Bug in vtkExtractVOI Message-ID: <1051099610.32187.46.camel@bryan.teraviewhq.local> Hi All, I think there's a new bug in vtkExtractVOI in VTK-4.2.2, which was not present in VTK-4.1. The filter seems to screw up the origin of the dataset when using a sample-rate > 1. The attached python script illustrates the problem: On running the script, the Bounds and Origin of the output of vtkExtractVOI() are printed. The dataset origin should coincide with the lower values of the dataset bounds. With VTK-4.2.2, the Origin is clearly incorrect (looks like a sign-problem). Running the script on VTK-4.1 gives the expected, correct result. Can someone else verify this effect. What's the procedure for bug-reporting? Bryan -- Bryan Cole Teraview Ltd., 302-304 Cambridge Science Park, Milton Road, Cambridge CB4 0WG, United Kingdom. tel: +44 (1223) 435380 / 435386 (direct-dial) fax: +44 (1223) 435382 -------------- next part -------------- A non-text attachment was scrubbed... Name: extractVOItest.py Type: text/x-python Size: 436 bytes Desc: not available URL: From I.deBoer at polytec.de Wed Apr 23 07:04:06 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Wed, 23 Apr 2003 13:04:06 +0200 Subject: [vtkusers] Why does this example not work ? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3C8@02polywbr.waldbronn.polytec.de> Hi, I made the code lines below. It should compile and work. Actually, I wanted something like a X,Y,Z and XYZ-View. But all the cubes look the same although I have set the vectors differently. Where is the problem/wrong thinking or .. ? greets Ingo ///////////////////////////////////////////////////////////////////////////// #include "vtkActor.h" #include "vtkCamera.h" #include "vtkCellArray.h" #include "vtkFloatArray.h" #include "vtkPointData.h" #include "vtkPoints.h" #include "vtkPolyData.h" #include "vtkPolyDataMapper.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" #include "vtkWarpVector.h" #include "vtkPolyDataNormals.h" #include "vtkVectorDot.h" #include "vtkDataSetMapper.h" void createobject(vtkFloatArray *vectors, vtkActor *actor) { // We'll create the building blocks of polydata including data attributes. vtkPolyData *cube = vtkPolyData::New(); vtkPoints *points = vtkPoints::New(); vtkCellArray *polys = vtkCellArray::New(); vtkFloatArray *scalars = vtkFloatArray::New(); // Load the point, cell, and data attributes. int i; static float x[8][3]={{0,0,0}, {1,0,0}, {1,1,0}, {0,1,0}, {0,0,1}, {1,0,1}, {1,1,1}, {0,1,1}}; static vtkIdType pts[6][4]={{0,1,2,3}, {4,5,6,7}, {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7}}; for (i=0; i<8; i++) points->InsertPoint(i,x[i]); for (i=0; i<6; i++) polys->InsertNextCell(4,pts[i]); for (i=0; i<8; i++) scalars->InsertTuple1(i,i); // We now assign the pieces to the vtkPolyData. cube->SetPoints(points); points->Delete(); cube->SetPolys(polys); polys->Delete(); cube->GetPointData()->SetScalars(scalars); scalars->Delete(); cube->GetPointData()->SetVectors(vectors); // set warp vector, normals vtkWarpVector *warpvector = vtkWarpVector::New(); warpvector->SetInput(cube); warpvector->SetScaleFactor(1.0); vtkPolyDataNormals *normals = vtkPolyDataNormals::New(); normals->SetInput(warpvector->GetPolyDataOutput()); vtkVectorDot *vectordot = vtkVectorDot::New(); vectordot->SetInput(normals->GetOutput()); normals->Delete(); // Now we'll look at it. vtkDataSetMapper *cubeMapper = vtkDataSetMapper::New(); cubeMapper->SetInput(vectordot->GetOutput()); cubeMapper->SetScalarRange(0,7); actor->SetMapper(cubeMapper); // delete vectordot->Delete(); cube->Delete(); cubeMapper->Delete(); warpvector->Delete(); } int main( int argc, char *argv[] ) { static float v[8][3]={{0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {-6.850900e-04, 1.131900e-01, -4.838000e-04}, {-3.533400e-02, 1.260400e-01, 6.314500e-02}, {-5.096200e-02, 8.419700e-02, 6.382000e-02}, {-1.532600e-03, 2.888500e-01, -7.648200e-04}}; vtkCamera *camera = vtkCamera::New(); camera->SetPosition(1,1,1); camera->SetFocalPoint(0,0,0); vtkRenderer *rendererX = vtkRenderer::New(); vtkRenderer *rendererY = vtkRenderer::New(); vtkRenderer *rendererZ = vtkRenderer::New(); vtkRenderer *rendererXYZ = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(rendererX); renWin->AddRenderer(rendererY); renWin->AddRenderer(rendererZ); renWin->AddRenderer(rendererXYZ); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); vtkActor *actorX = vtkActor::New(); vtkActor *actorY = vtkActor::New(); vtkActor *actorZ = vtkActor::New(); vtkActor *actorXYZ = vtkActor::New(); vtkFloatArray *vectors = vtkFloatArray::New(); vectors->SetNumberOfComponents(3); for (int i=0; i<8; i++) vectors->InsertTuple3(i, v[i][0], 0.0, 0.0); ::createobject(vectors, actorX); for (int i=0; i<8; i++) vectors->InsertTuple3(i, 0.0, v[i][1], 0.0); ::createobject(vectors, actorY); for (int i=0; i<8; i++) vectors->InsertTuple3(i, 0.0, 0.0, v[i][2]); ::createobject(vectors, actorZ); for (int i=0; i<8; i++) vectors->InsertTuple3(i, v[i][0], v[i][1], v[i][2]); ::createobject(vectors, actorXYZ); rendererX->AddActor(actorX); rendererX->SetViewport(0.0, 0.5, 0.5, 1.0); rendererX->SetBackground(1, 0, 0); rendererX->SetActiveCamera(camera); rendererX->ResetCamera(); rendererY->AddActor(actorY); rendererY->SetViewport(0.5, 0.5, 1.0, 1.0); rendererY->SetBackground(0, 1, 0); rendererY->SetActiveCamera(camera); rendererY->ResetCamera(); rendererZ->AddActor(actorZ); rendererZ->SetViewport(0.0, 0.0, 0.5, 0.5); rendererZ->SetBackground(0, 0, 1); rendererZ->SetActiveCamera(camera); rendererZ->ResetCamera(); rendererXYZ->AddActor(actorXYZ); rendererXYZ->SetViewport(0.5, 0.0, 1.0, 0.5); rendererXYZ->SetBackground(0.1, 0.2, 0.4); rendererXYZ->SetActiveCamera(camera); rendererXYZ->ResetCamera(); renWin->SetSize(512, 512); // interact with data renWin->Render(); iren->Start(); // Clean up actorX->Delete(); actorY->Delete(); actorZ->Delete(); actorXYZ->Delete(); vectors->Delete(); camera->Delete(); rendererX->Delete(); rendererY->Delete(); rendererZ->Delete(); rendererXYZ->Delete(); renWin->Delete(); iren->Delete(); return 0; } From mglistmail at totalise.co.uk Wed Apr 23 06:57:09 2003 From: mglistmail at totalise.co.uk (Martin Gardner) Date: Wed, 23 Apr 2003 11:57:09 +0100 Subject: [vtkusers] Update/Whole Extent errors In-Reply-To: References: Message-ID: <3EA67185.1010507@totalise.co.uk> Nico Vermaas wrote: > Hi, > > - I have a datacube (vtkImageData) of which I want to show rectangular slices. > - I use vtkExtractVOI and renderer the result > > Q: Is there a better way to get slices of a datacube of vtkImageData? > Yes try vtkImageReslice instead of extracting a VOI. The reslicer can give you 2d or 3d slices of the data volume quite easily. HTH Cheers Martin -- mglistmail at totalise.co.uk From yass at uscx.net Wed Apr 23 08:00:59 2003 From: yass at uscx.net (yasser salman) Date: Wed, 23 Apr 2003 05:00:59 -0700 (PDT) Subject: [vtkusers] ITK/VC++ Message-ID: <20030423120059.778A84021@sitemail.everyone.net> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From zxem at my169.com Wed Apr 23 09:22:07 2003 From: zxem at my169.com (zx) Date: Wed, 23 Apr 2003 13:22:7 +0000 Subject: [vtkusers] Help! how to connect VTK with Java Message-ID: <20030423113612.6892F9A04E@smtp.my169.com> Hi all, Does anyone give me more information about connecting VTK with Java. Platform: Window XP Java: 1.4.1 Cmake: 1.66 VTK: 4.2 Thanks!! X.Z -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.p.botha at its.tudelft.nl Wed Apr 23 08:48:16 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 23 Apr 2003 14:48:16 +0200 Subject: [vtkusers] Bug in vtkExtractVOI In-Reply-To: <1051099610.32187.46.camel@bryan.teraviewhq.local> References: <1051099610.32187.46.camel@bryan.teraviewhq.local> Message-ID: <1051102096.27906.34.camel@dutidad> On Wed, 2003-04-23 at 14:06, bryan cole wrote: > The attached python script illustrates the problem: On running the > script, the Bounds and Origin of the output of vtkExtractVOI() are > printed. The dataset origin should coincide with the lower values of the > dataset bounds. With VTK-4.2.2, the Origin is clearly incorrect (looks > like a sign-problem). Running the script on VTK-4.1 gives the expected, > correct result. > > Can someone else verify this effect. What's the procedure for > bug-reporting? This is IMHO the best way of reporting strange behaviour: with a small out-of-the-box runnable Python or Tcl script. In anycase, I had a look at current VTK CVS and line 204 in vtkExtractVOI seems dubious: 203 outAR[i] = ar[i] * this->SampleRate[i]; 204 outOrigin[i] = origin[i] + voi[2*i]*ar[i] - outExt[2*i]*outAR[i]; 205 outSize *= outDims[i]; It's of course the outOrigin[i] calculation I'm referring to. The problem is also that there's no clear definition of the output origin. Should the origin be at the "lower" corner of the output bounds, or should the origin remain exactly where it is? Personally I would vote for the output origin to remain in exactly the same spot. This would allow one to position VOIs correctly inside of their super-volumes, which is a highly desirable characteristic. Think for example of extracting an iso-surface from a VOI and then wanting to use this extracted isosurface in the containing volume. This will break if the vtkExtractVOI moves the origin. I would like to change line 204 to: outOrigin[i] = origin[i] along with a fat comment explaining the reasoning behind that. Thoughts? Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From Bruce.Lamond at ed.ac.uk Wed Apr 23 10:09:40 2003 From: Bruce.Lamond at ed.ac.uk (Bruce.Lamond at ed.ac.uk) Date: Wed, 23 Apr 2003 15:09:40 +0100 (BST) Subject: [vtkusers] vtkRenderWindowInteractor event loop In-Reply-To: <004301c30978$b97d7bc0$de0ba8c0@qtwblr01.questglobal.com> References: <004301c30978$b97d7bc0$de0ba8c0@qtwblr01.questglobal.com> Message-ID: <1051106980.3ea69ea415bf6@staffmail.ed.ac.uk> Hi there, In order to interact with vtk in C++ I have to call iren->Start() to start an infinite event loop. The documentation says that you can define your own event loop but does anyone know how to do this? I presume I have to override The Start() method, but in vtkRenderWindowInteractor class it doesn't contain any code, so how do I know what to put in the overridden method? cheers Bruce Lamond From dshamoni at science.uva.nl Wed Apr 23 10:34:43 2003 From: dshamoni at science.uva.nl (Denis Shamonin) Date: Wed, 23 Apr 2003 16:34:43 +0200 Subject: [vtkusers] iren->Set*PickMethod() obsoleted? Message-ID: <3EA6A483.9070701@science.uva.nl> Bruce.Lamond at ed.ac.uk wrote: > Hi there, > I'm trying to use VTK to return (x,y,z) coordinate corresponding to > the cursor > position when 'p' is pressed. I thought this might involve using the > iren->Set*PickMethod() but see that this is not to be used in future. > Does > anyone know how I should go about getting the coordinate corresponding > to a pick > event? > cheers > Bruce Lamond > > Depend. If you will make pick operation you will get not a point (xyz) but vector. This vector will start from XY on the X window which should be converted to world coordinats like //--- float* YouClass::ComputeWorldCoordinate(float x,float y,float z) { float *WorldCoordinate; vtkCoordinate *Coordinate = vtkCoordinate::New(); Coordinate->SetCoordinateSystem(VTK_DISPLAY); Coordinate->SetValue(x,y,z); WorldCoordinate = Coordinate->GetComputedWorldValue(ren); return WorldCoordinate; } if you know XY on you X window use it like //--- float *t; t = this->ComputeWorldCoordinate((float)X1,(float)Y1,0.0); Then end will be clipping rage of the camera->GetClippingRange(), or *inf*. You can use this for calculate end point: //--- void YouClass::EndPoint(float Point[3], float EndPoint[3]) { float cameraPos[4], cameraFP[4]; float cameraDOP[3]; float ray[3], rayLength; double *clipRange; float tF, tB; float p2World[4]; int i; vtkCamera *camera = this->ren->GetActiveCamera(); camera->GetPosition((float *)cameraPos); cameraPos[3] = 1.0; camera->GetFocalPoint((float *)cameraFP); cameraFP[3] = 1.0; for (i=0; i<3; i++) { ray[i] = Point[i] - cameraPos[i]; } for (i=0; i<3; i++) { cameraDOP[i] = cameraFP[i] - cameraPos[i]; } vtkMath::Normalize(cameraDOP); if (( rayLength = vtkMath::Dot(cameraDOP,ray)) == 0.0 ) { vtkErrorMacro(<< "Cannot process points"); } clipRange = camera->GetClippingRange(); if ( camera->GetParallelProjection() ) { tF = clipRange[0] - rayLength; tB = clipRange[1] - rayLength; for (i=0; i<3; i++) { p2World[i] = Point[i] + tB*cameraDOP[i]; } } else { tF = clipRange[0] / rayLength; tB = clipRange[1] / rayLength; for (i=0; i<3; i++) { p2World[i] = cameraPos[i] + tB*ray[i]; } } p2World[3] = 1.0; for (i=0; i<3; i++) { EndPoint[i] = p2World[i]; } } Then you can calculate vector. If you know how -- Denis Shamonin Address : Section Computational Science University of Amsterdam Kruislaan 403, 1098 SJ Amsterdam the Netherlands E-mail : dshamoni at science.uva.nl URL : http://www.science.uva.nl/~dshamoni/ From sxa at fluent.com Wed Apr 23 10:44:04 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Wed, 23 Apr 2003 10:44:04 -0400 Subject: [vtkusers] Light bug ... (Better explained) Message-ID: <007301c309a6$c96de730$8ae4e9c0@sxapc> Looks like my explanation of the problem wasn't really clear. Images worth a 1000 words ! (See attached images) In "before.jpg", we have 2 spheres, 1 camera and 1 light at the camera position and set to follow it. (i.e. Follow the camera !) In the "after.jpg" image, we can see that the red sphere was rotated 90? on its Y axis. This rotation wasn't done on the actor but on the dataset representing the sphere. (At the beginning of the red sphere's VTK pipeline) (i.e. I do this by creating a rotation matrix (vtkMatrix4x4) and applying it to the original points associated with the red sphere !) We do not use any interactor and,...of course, no interactorStyle. As you can see in the "after.jpg" image, the red sphere doesn't seem to update the way its receiving light ! Thanks for any clues or pointers on how i may work to solve this problem ! ________________________________________ Seb ----- Original Message ----- From: "Sebastien Auclair" To: Sent: Tuesday, April 22, 2003 1:49 PM Subject: Light bug ! > Greetings ! > > I'm looking for clues (not necessarily a bug-fix) related to a bug we have ! > Our application has 1 camera with only one light set to follow it. > Renderer->LightFollowCameraOn(); ) > > Moving the camera moves the light fine but changing the coordinates of the > points of an object so that it rotates seems to also affect the light !! > NOTE: We don't use any WindowInteractor. We've implemented our own based on > the code for vtkInteractorStyleTrackballActor\Camera. > > BUG EXAMPLE: > > If I have two cubes A and B with their facet 1 facing the camera. > Only one light placed at the camera position. > For both cubes, the facet 1 receives all the light. > I rotate cube A on 90?\Y by modifying the point coordinates directly in the > dataset at the beginning of the pipeline. > The result is that the cube A is rotated alright but so as the light in > relation to cube A. > And cube B is still receiving light on his facet 1. !!!! (Like if we now > have two lights !) > The facet 1 of the rotated cube A still receive light directly. > > Any clues on this behavior ? > > Thanks ! > __________________________________________________________________ > Seb > > -------------- next part -------------- A non-text attachment was scrubbed... Name: before.jpg Type: image/jpeg Size: 12790 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.jpg Type: image/jpeg Size: 11805 bytes Desc: not available URL: From jcpouce at yahoo.com Wed Apr 23 10:44:35 2003 From: jcpouce at yahoo.com (jean-charles campagne) Date: Wed, 23 Apr 2003 07:44:35 -0700 (PDT) Subject: [vtkusers] vtk books, which one ? Message-ID: <20030423144435.4395.qmail@web41510.mail.yahoo.com> Hello, i'm sure i'm about to ask about an eternal question : i'm looking forward to buy *maybe* a book on vtk... looking at the prices and with limited budget i think i'll limit myself to one... but i can't decide which one... looking at the tables of content of each book available on the web site doesn't help me that much... although i think i'll choose the user's guide book since since i manage to read the api, but sometimes it's obscure... or maybe the "The Visualization Toolkit" volume is a must ? any advice ? thanks. jcc __________________________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com From bryan.cole at teraview.co.uk Wed Apr 23 10:57:47 2003 From: bryan.cole at teraview.co.uk (bryan cole) Date: 23 Apr 2003 15:57:47 +0100 Subject: [vtkusers] Bug in vtkExtractVOI In-Reply-To: <1051102096.27906.34.camel@dutidad> References: <1051099610.32187.46.camel@bryan.teraviewhq.local> <1051102096.27906.34.camel@dutidad> Message-ID: <1051109867.32188.147.camel@bryan.teraviewhq.local> > > 203 outAR[i] = ar[i] * this->SampleRate[i]; > 204 outOrigin[i] = origin[i] + voi[2*i]*ar[i] - outExt[2*i]*outAR[i]; > 205 outSize *= outDims[i]; I've also had a look at the code in CVS. The relevent changes occured between revision 1.30 and 1.30.4.1 of vtkExtractVOI.cxx. Changes to Lines 120-126 also relate to this issue. > Personally I would vote for the output origin to remain in exactly the > same spot. This would allow one to position VOIs correctly inside of > their super-volumes, which is a highly desirable characteristic. Think > for example of extracting an iso-surface from a VOI and then wanting to > use this extracted isosurface in the containing volume. This will break > if the vtkExtractVOI moves the origin. Although (previously) vtkExtractVOI shifted the vtkImageData Origin according to the 0,0,0th corner of the extracted sub-volume, the sub-volume retained the correct position with respect to the parent volume. I.e. the absolute positions of all data-points are/were correctly maintained. > > I would like to change line 204 to: > outOrigin[i] = origin[i] > along with a fat comment explaining the reasoning behind that. > > Thoughts? I think this breaks the VTK data-model (and my application!). In VTK every data-point has a position in 3D space. For unstructured data, these poisitions defined explicitly for each point. For structured points / vtkImageData, the point positions are implicitly given by the dataset Origin and Spacing. Thus the Origin of a vtkImageData dataset is, by definition, the position of the 0,0,0th point. (N.B. the Origin is not defined for unstructured dataset types) I tried setting the origin to be unchanged by vtkExtractVOI (as you suggested), but the vtkVolumeRenderers place the volume in the wrong place, since they don't appear to take into account the offset of the WholeExtent. I have fixed my local copy to recover the "old" behaviour (shifting the origin). I think we need some clarification from the VTK core-developers as to what the "correct" behaviour should be. cheers, Bryan > > Thanks, > Charl -- Bryan Cole Teraview Ltd., 302-304 Cambridge Science Park, Milton Road, Cambridge CB4 0WG, United Kingdom. tel: +44 (1223) 435380 / 435386 (direct-dial) fax: +44 (1223) 435382 From c.p.botha at its.tudelft.nl Wed Apr 23 10:57:07 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: 23 Apr 2003 16:57:07 +0200 Subject: [vtkusers] Bug in vtkExtractVOI In-Reply-To: <1051109867.32188.147.camel@bryan.teraviewhq.local> References: <1051099610.32187.46.camel@bryan.teraviewhq.local> <1051102096.27906.34.camel@dutidad> <1051109867.32188.147.camel@bryan.teraviewhq.local> Message-ID: <1051109827.27812.44.camel@dutidad> On Wed, 2003-04-23 at 16:57, bryan cole wrote: > Although (previously) vtkExtractVOI shifted the vtkImageData Origin > according to the 0,0,0th corner of the extracted sub-volume, the > sub-volume retained the correct position with respect to the parent > volume. I.e. the absolute positions of all data-points are/were > correctly maintained. > > > > > I would like to change line 204 to: > > outOrigin[i] = origin[i] > > along with a fat comment explaining the reasoning behind that. > > > > Thoughts? > > I think this breaks the VTK data-model (and my application!). In VTK > every data-point has a position in 3D space. For unstructured data, > these poisitions defined explicitly for each point. For structured > points / vtkImageData, the point positions are implicitly given by the > dataset Origin and Spacing. Thus the Origin of a vtkImageData dataset > is, by definition, the position of the 0,0,0th point. (N.B. the Origin > is not defined for unstructured dataset types) Maybe I looked to quickly. One could keep the origin where it is, and make sure the extent takes into account the extraction, or "move" the origin so that extracted points are still at their correct positions. It then seems that the previous "working" version of vtkExtractVOI did the latter which is obviously also good. Could you perhaps post your patch? -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From adada_marwan at hotmail.com Wed Apr 23 11:05:26 2003 From: adada_marwan at hotmail.com (Marwan Adada) Date: Wed, 23 Apr 2003 15:05:26 +0000 Subject: [vtkusers] vtkMarchingCubes Message-ID: Hello, I have an 8 bit volume data (205x233x251) that I need to pass to vtkMarchingCubes. I tried using vtkImageReader but it seems not to work with vtkMarchingCubes. I tried vtkImageData and still couldn't pass it to vtkMarchingCubes. I know vtkVolume16Reader works with vtkMarchingCubes, but my data 8bits not 16bits. I am wondering what vtk 8bit Readers does vtkMarchingCubes accepts, Any Ideas?? Thanks in advance... Marc _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail From sxa at fluent.com Wed Apr 23 11:08:29 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Wed, 23 Apr 2003 11:08:29 -0400 Subject: [vtkusers] vtk books, which one ? References: <20030423144435.4395.qmail@web41510.mail.yahoo.com> Message-ID: <00ad01c309aa$32d2ec40$8ae4e9c0@sxapc> "VTK User's guide" is what you probably need ! It is also the less expensive i think ! The other book is more a usecase guide. ----- Original Message ----- From: "jean-charles campagne" To: Sent: Wednesday, April 23, 2003 10:44 AM Subject: [vtkusers] vtk books, which one ? > Hello, > > i'm sure i'm about to ask about an eternal question : > > i'm looking forward to buy *maybe* a book on vtk... > looking at the prices and with limited budget i think > i'll limit myself to one... > > but i can't decide which one... > > looking at the tables of content of each book > available on the web site doesn't help me that much... > although i think i'll choose the user's guide book > since since i manage to read the api, but sometimes > it's obscure... > > or maybe the "The Visualization Toolkit" volume is a > must ? > > any advice ? > > thanks. > jcc > > > __________________________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo > http://search.yahoo.com > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From bryan.cole at teraview.co.uk Wed Apr 23 11:43:22 2003 From: bryan.cole at teraview.co.uk (bryan cole) Date: 23 Apr 2003 16:43:22 +0100 Subject: [vtkusers] Bug in vtkExtractVOI In-Reply-To: <1051109827.27812.44.camel@dutidad> References: <1051099610.32187.46.camel@bryan.teraviewhq.local> <1051102096.27906.34.camel@dutidad> <1051109867.32188.147.camel@bryan.teraviewhq.local> <1051109827.27812.44.camel@dutidad> Message-ID: <1051112602.32187.160.camel@bryan.teraviewhq.local> > Maybe I looked to quickly. One could keep the origin where it is, and > make sure the extent takes into account the extraction, or "move" the > origin so that extracted points are still at their correct positions. > It then seems that the previous "working" version of vtkExtractVOI did > the latter which is obviously also good. > > Could you perhaps post your patch? A patch is attached (the result of 'cvs diff -u4' against todays CVS). It would be good to understand what 'lawcc' was aiming for when the previous changes to this filter were made, before using the patch to restore the old behaviour. Bryan -- Bryan Cole Teraview Ltd., 302-304 Cambridge Science Park, Milton Road, Cambridge CB4 0WG, United Kingdom. tel: +44 (1223) 435380 / 435386 (direct-dial) fax: +44 (1223) 435382 -------------- next part -------------- ? BEC-ExtractVOI.patch Index: Imaging/vtkExtractVOI.cxx =================================================================== RCS file: /cvsroot/VTK/VTK/Imaging/vtkExtractVOI.cxx,v retrieving revision 1.34 diff -u -4 -r1.34 vtkExtractVOI.cxx --- Imaging/vtkExtractVOI.cxx 17 Jan 2003 14:31:08 -0000 1.34 +++ Imaging/vtkExtractVOI.cxx 23 Apr 2003 15:25:52 -0000 @@ -116,15 +116,15 @@ outDims[i] = 1; } } - // This makes sense for sample rates of 1, 1, 1. - wholeExtent[0] = voi[0]; - wholeExtent[1] = voi[0] + outDims[0] - 1; - wholeExtent[2] = voi[2]; - wholeExtent[3] = voi[2] + outDims[1] - 1; - wholeExtent[4] = voi[4]; - wholeExtent[5] = voi[4] + outDims[2] - 1; + // reverting to 'old' behaviour for output extents and origin + wholeExtent[0] = 0; + wholeExtent[1] = outDims[0] - 1; + wholeExtent[2] = 0; + wholeExtent[3] = outDims[1] - 1; + wholeExtent[4] = 0; + wholeExtent[5] = outDims[2] - 1; output->SetWholeExtent( wholeExtent ); } @@ -200,9 +200,9 @@ outDims[i] = 1; } outAR[i] = ar[i] * this->SampleRate[i]; - outOrigin[i] = origin[i] + voi[2*i]*ar[i] - outExt[2*i]*outAR[i]; + outOrigin[i] = origin[i] + voi[2*i]*ar[i]; outSize *= outDims[i]; } output->SetSpacing(outAR); From baghdadi at sickkids.ca Wed Apr 23 11:33:25 2003 From: baghdadi at sickkids.ca (Leila Baghdadi) Date: Wed, 23 Apr 2003 11:33:25 -0400 (EDT) Subject: [vtkusers] computational fluid dynamics data set. In-Reply-To: <000c01c30956$2447ab60$67657b8c@IVAN> Message-ID: Hey Ivan I think if you try the TECPLOT website, they have some samples and datasets posted in there. Hope this helps Leila On Wed, 23 Apr 2003, Ivan Kuo wrote: > Hi, vtkusers, > > Does anyone know where i can get computational fluid dynamics data set that is spacially partitioned. I need this kind of dataset to test a program in vtk. > > Any information about this dataset would be highly appreciated. > > thanks! > > > > Ivan Kuo > kch90 at cs.ccu.edu.tw > From nNunn at ausport.gov.au Wed Apr 23 11:51:56 2003 From: nNunn at ausport.gov.au (Nigel Nunn) Date: Thu, 24 Apr 2003 01:51:56 +1000 Subject: [vtkusers] Light bug ... (Better explained) Message-ID: <7AF3524792FFD511A17A0000F81E965E472DE6@ELMO> Hi Sebastien, > As you can see in the "after.jpg" image, the red sphere > doesn't seem to update the way its receiving light ! Thanks for so neatly illustrating the problem. I feel this may be related to a lighting problem I wrote about earlier: images rendered off-screen are not getting the same user-defined lights currently applied to images rendered on-screen. One of the following may need adjustment: 1. our updating of time-stamps, or 2. the logic used for updating the lights in the low-level Render operations vtkRenderer::Render() makes a fairly complicated test of when and what to "update". If a call to Render() does in fact trigger a call to DeviceRender(), then DeviceRender() tries to get the lighting right. I have not yet stepped through a debug version to work out what needs to happen. Nigel ********************************************************************** This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender. Keep up to date with what's happening in Australian sport. Visit http://www.ausport.gov.au ********************************************************************** From asiram00 at hotmail.com Wed Apr 23 12:39:34 2003 From: asiram00 at hotmail.com (marisa aurelio) Date: Wed, 23 Apr 2003 16:39:34 +0000 Subject: [vtkusers] vtkDelauny3D to vtkDataSetMapper Message-ID: Hi vtkUsers, I have this piece of code: vtkDelaunay3D *del = vtkDelaunay3D::New(); del->SetInput(profile); del->SetTolerance(0.05); del->SetAlpha(0.05); del->BoundingTriangulationOff(); //# Shrink the result to help see it better. vtkShrinkFilter *shrink = vtkShrinkFilter::New(); shrink->SetInput(del->GetOutput()); //1st error shrink->SetShrinkFactor(1); vtkDataSetMapper *map = vtkDataSetMapper::New(); map->SetInput(shrink->GetOutput()); //2nd error vtkActor *triangulation = vtkActor::New(); triangulation->SetMapper(map); (triangulation->GetProperty())->SetColor(1, 0, 0); But I have 2 erros: --- error C2664: 'SetInput' : cannot convert parameter 1 from 'class vtkUnstructuredGrid *' to 'class vtkDataSet *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast --- error C2664: 'SetInput' : cannot convert parameter 1 from 'class vtkUnstructuredGrid *' to 'class vtkDataSet *' What can I do to resolve it??? Thanks in advance. Marisa _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus From alan at vuesonix.com Wed Apr 23 13:12:33 2003 From: alan at vuesonix.com (Alan) Date: Wed, 23 Apr 2003 13:12:33 -0400 Subject: [vtkusers] Need help getting vtkCanvas as Image via swing or AWT In-Reply-To: References: Message-ID: <3EA6C981.3040301@vuesonix.com> Christopher M. Navarro wrote: > >On Tue, 22 Apr 2003, Alan wrote: > > > >>Hi, >>I'm trying to capture the image output of the vtkCanvas component. I've >>tried >> >> >>// should capture image contents from swing based component >> RepaintManager >>rpMgr=RepaintManager.currentManager(panel.getvtkCanvas()); >> img=rpMgr.getOffscreenBuffer(panel, panel.getWidth(), >>panel.getHeight()); >> >> >>and also >> >> >>// should capture image contents from awt based component >> Component c=panel.getvtkCanvas(); >> img=c.createImage(c.getWidth(), c.getHeight()); >> Graphics g=img.getGraphics(); >> c.printAll(g); >> >> >>where >>panel extends Jpanel and contains a vtkCanvas() object. >> >> >>Although the image size is always correct, the image contents are always >>empty. This despite the fact that VTK has displayed a pretty picture >>onscreen, Java just doesn't seem to be able to access it at either the >>Swing or AWT level. >> >>Can anyone help me capture the output of vtkCanvas to an Image()? Is >>there a reason that this can't be done? >> >>Thanks for any insight on this puzzle. >> --Alan >> >> >>BTW, my workaround has been to capture the component via the Robot() class: >> >> Robot r=new Robot(); >> Rectangle rect=panel.getBounds(); >> rect.translate(-panel.getInsets().left,-panel.getInsets().top); >> img=r.createScreenCapture(rect); >> >> >>This works acceptably, but only if the vtkCanvas is not covered by any >>other windows. >> >> > >If you are using the vtkCanvas supplied with the latest release (which I >assume you are), you can do the following: > >vtkRendererSource renSrc = new vtkRendererSource(); >renSrc.SetInput(myVtkCanvas.GetRenderer()); >renSrc.WholeWindowOn(); > >vtkPNGWriter writer = new vtkPNGWriter(); >writer.SetInput(renSrc.GetOutput()); >writer.SetFileName("test"); >writer.Write(); > >vtkPNGWriter can be replaced by any of the other image writers such as >vtkJPEGWriter, etc. > >HTH, > >chris > > > > Hi Chris, Thanks much for your response. I will use the various writers to store my images on disk as you suggest. Unfortunately, I still also need to save my renderings in memory as an Image for other purposes (eg, animation). Any other thoughts? --Alan From nick.smethurst at free.fr Wed Apr 23 13:20:06 2003 From: nick.smethurst at free.fr (N Smethurst) Date: Wed, 23 Apr 2003 19:20:06 +0200 Subject: [vtkusers] vtk books, which one ? In-Reply-To: <00ad01c309aa$32d2ec40$8ae4e9c0@sxapc> References: <20030423144435.4395.qmail@web41510.mail.yahoo.com> <00ad01c309aa$32d2ec40$8ae4e9c0@sxapc> Message-ID: <200304231920.06311.nick.smethurst@free.fr> I have to disagree here. I bought the users guide first thinking it would be sufficient as I am on a budget too. Unfortunately, it was clear that I had made the wrong decision. I later bought the other book and haven't touched the user's guide since. Used in conjunction with the Doxygen api documentation, the "The Visualization Toolkit" book is the one to go for. Le Mercredi 23 Avril 2003 17:08, Sebastien Auclair a ?crit : > "VTK User's guide" is what you probably need ! > It is also the less expensive i think ! > The other book is more a usecase guide. > > > ----- Original Message ----- > From: "jean-charles campagne" > To: > Sent: Wednesday, April 23, 2003 10:44 AM > Subject: [vtkusers] vtk books, which one ? > > > Hello, > > > > i'm sure i'm about to ask about an eternal question : > > > > i'm looking forward to buy *maybe* a book on vtk... > > looking at the prices and with limited budget i think > > i'll limit myself to one... > > > > but i can't decide which one... > > > > looking at the tables of content of each book > > available on the web site doesn't help me that much... > > although i think i'll choose the user's guide book > > since since i manage to read the api, but sometimes > > it's obscure... > > > > or maybe the "The Visualization Toolkit" volume is a > > must ? > > > > any advice ? > > > > thanks. > > jcc > > > > > > __________________________________________________ > > Do you Yahoo!? > > The New Yahoo! Search - Faster. Easier. Bingo > > http://search.yahoo.com > > _______________________________________________ > > This is the private VTK discussion list. > > Please keep messages on-topic. Check the FAQ at: > > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to > subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From james at rogue-research.com Wed Apr 23 13:58:55 2003 From: james at rogue-research.com (James Dessart) Date: Wed, 23 Apr 2003 13:58:55 -0400 (EDT) Subject: [vtkusers] vtkMarchingCubes In-Reply-To: Message-ID: On Wed, 23 Apr 2003, Marwan Adada wrote: > I have an 8 bit volume data (205x233x251) that I need to pass to > vtkMarchingCubes. I tried using vtkImageReader but it seems not to work > with vtkMarchingCubes. I tried vtkImageData and still couldn't pass it to > vtkMarchingCubes. I know vtkVolume16Reader works with vtkMarchingCubes, but > my data 8bits not 16bits. I am wondering what vtk 8bit Readers does > vtkMarchingCubes accepts, Any Ideas?? What you could try would be to read it in as 16-bit values, and run marching cubes on that. The values would be between 0-255, as 8-bit values generally are, but that shouldn't matter, if you specify your threshold for marching cubes properly. hope that helps, James From sxa at fluent.com Wed Apr 23 14:09:59 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Wed, 23 Apr 2003 14:09:59 -0400 Subject: [vtkusers] vtk books, which one ? References: <20030423144435.4395.qmail@web41510.mail.yahoo.com> <00ad01c309aa$32d2ec40$8ae4e9c0@sxapc> <200304231920.06311.nick.smethurst@free.fr> Message-ID: <00cb01c309c3$8ddf4c00$8ae4e9c0@sxapc> We are in fact in agreement. I'd say that even both books aren't detailled enough. But for a first contact, the user guide may be more relevant. (Not necessarely enough) ----- Original Message ----- From: "N Smethurst" To: "jean-charles campagne" ; Sent: Wednesday, April 23, 2003 1:20 PM Subject: Re: [vtkusers] vtk books, which one ? > I have to disagree here. I bought the users guide first thinking it would > be sufficient as I am on a budget too. > > Unfortunately, it was clear that I had made the wrong decision. I later > bought the other book and haven't touched the user's guide since. Used in > conjunction with the Doxygen api documentation, the "The Visualization > Toolkit" book is the one to go for. > > Le Mercredi 23 Avril 2003 17:08, Sebastien Auclair a ?crit : > > "VTK User's guide" is what you probably need ! > > It is also the less expensive i think ! > > The other book is more a usecase guide. > > > > > > ----- Original Message ----- > > From: "jean-charles campagne" > > To: > > Sent: Wednesday, April 23, 2003 10:44 AM > > Subject: [vtkusers] vtk books, which one ? > > > > > Hello, > > > > > > i'm sure i'm about to ask about an eternal question : > > > > > > i'm looking forward to buy *maybe* a book on vtk... > > > looking at the prices and with limited budget i think > > > i'll limit myself to one... > > > > > > but i can't decide which one... > > > > > > looking at the tables of content of each book > > > available on the web site doesn't help me that much... > > > although i think i'll choose the user's guide book > > > since since i manage to read the api, but sometimes > > > it's obscure... > > > > > > or maybe the "The Visualization Toolkit" volume is a > > > must ? > > > > > > any advice ? > > > > > > thanks. > > > jcc > > > > > > > > > __________________________________________________ > > > Do you Yahoo!? > > > The New Yahoo! Search - Faster. Easier. Bingo > > > http://search.yahoo.com > > > _______________________________________________ > > > This is the private VTK discussion list. > > > Please keep messages on-topic. Check the FAQ at: > > > > > > > > > Follow this link to subscribe/unsubscribe: > > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > _______________________________________________ > > This is the private VTK discussion list. > > Please keep messages on-topic. Check the FAQ at: > > Follow this link to > > subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From adada_marwan at hotmail.com Wed Apr 23 14:09:40 2003 From: adada_marwan at hotmail.com (Marwan Adada) Date: Wed, 23 Apr 2003 18:09:40 +0000 Subject: [vtkusers] vtkMarchingCubes Message-ID: Hello, Now I converted my 8bit buffer to a 16bit buffer and sliced it, then passed it to vtkVolume16Reader and then to marching cubes, and I got the volume. But my result is not smooth at all, I set the MarchingCube->ComputeNormalsOn(); and still the result is not smooth. Is there any filter I can use to smooth the resulting output from marching cubes?? Thanks in advance Marc P.S Thanks james; >From: James Dessart >To: Marwan Adada >CC: vtkusers at public.kitware.com >Subject: Re: [vtkusers] vtkMarchingCubes >Date: Wed, 23 Apr 2003 13:58:55 -0400 (EDT) > > > >On Wed, 23 Apr 2003, Marwan Adada wrote: > > > I have an 8 bit volume data (205x233x251) that I need to pass to > > vtkMarchingCubes. I tried using vtkImageReader but it seems not to work > > with vtkMarchingCubes. I tried vtkImageData and still couldn't pass it >to > > vtkMarchingCubes. I know vtkVolume16Reader works with vtkMarchingCubes, >but > > my data 8bits not 16bits. I am wondering what vtk 8bit Readers does > > vtkMarchingCubes accepts, Any Ideas?? > >What you could try would be to read it in as 16-bit values, and run >marching cubes on that. The values would be between 0-255, as 8-bit >values generally are, but that shouldn't matter, if you specify your >threshold for marching cubes properly. > >hope that helps, >James > _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Apr 23 14:08:20 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 23 Apr 2003 20:08:20 +0200 Subject: [vtkusers] vtkMarchingCubes In-Reply-To: References: Message-ID: <3EA6D694.6000307@creatis.insa-lyon.fr> http://www.vtk.org/doc/nightly/html/classvtkSmoothPolyDataFilter.html and http://www.vtk.org/doc/nightly/html/classvtkWindowedSincPolyDataFilter.html the later is not lagrangian -> no shrinkage ! HTH mathieu Marwan Adada wrote: > Hello, > Now I converted my 8bit buffer to a 16bit buffer and sliced it, then > passed it to vtkVolume16Reader and then to marching cubes, and I got the > volume. But my result is not smooth at all, I set the > MarchingCube->ComputeNormalsOn(); and still the result is not smooth. > Is there any filter I can use to smooth the resulting output from > marching cubes?? > Thanks in advance > > Marc > > P.S Thanks james; > >> From: James Dessart >> To: Marwan Adada >> CC: vtkusers at public.kitware.com >> Subject: Re: [vtkusers] vtkMarchingCubes >> Date: Wed, 23 Apr 2003 13:58:55 -0400 (EDT) >> >> >> >> On Wed, 23 Apr 2003, Marwan Adada wrote: >> >> > I have an 8 bit volume data (205x233x251) that I need to pass to >> > vtkMarchingCubes. I tried using vtkImageReader but it seems not to >> work >> > with vtkMarchingCubes. I tried vtkImageData and still couldn't pass >> it to >> > vtkMarchingCubes. I know vtkVolume16Reader works with >> vtkMarchingCubes, but >> > my data 8bits not 16bits. I am wondering what vtk 8bit Readers does >> > vtkMarchingCubes accepts, Any Ideas?? >> >> What you could try would be to read it in as 16-bit values, and run >> marching cubes on that. The values would be between 0-255, as 8-bit >> values generally are, but that shouldn't matter, if you specify your >> threshold for marching cubes properly. >> >> hope that helps, >> James >> > > > _________________________________________________________________ > The new MSN 8: smart spam protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > This is the private VTK discussion list. Please keep messages on-topic. > Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From brownr at ucalgary.ca Wed Apr 23 14:33:44 2003 From: brownr at ucalgary.ca (Robb Brown) Date: Wed, 23 Apr 2003 12:33:44 -0600 Subject: [vtkusers] Get bounding box for vtkPlanes? Message-ID: <1D52278A-75BA-11D7-981B-000393C34B0E@ucalgary.ca> I have a vtkPlanes object and I'd like to pick a point on the surface of the cube that it encloses. First off, is there a standard way of doing this? My instinct was to create a polydata cube from the vtkPlanes and pick on that. vtkCubeSource has a SetBounds() method (as does vtkPlanes), and I notice that vtkPlanes maintains its bounds as a private variable, but there is no vtkPlanes.GetBounds(). So how do I do this? Thanks, Robb _____________________________ Robb Brown Seaman Family MR Center Calgary, AB From adada_marwan at hotmail.com Wed Apr 23 14:40:09 2003 From: adada_marwan at hotmail.com (Marwan Adada) Date: Wed, 23 Apr 2003 18:40:09 +0000 Subject: [vtkusers] vtkMarchingCubes Message-ID: Hello, I tried using these filters but for some reason I am not getting any change in the output, my code is: vtkSmoothPolyDataFilter *Smooth = vtkSmoothPolyDataFilter::New(); Smooth->SetInput(mcubes->GetOutput()); Smooth->SetNumberOfIterations(10); Smooth->SetRelaxationFactor(1); Smooth->SetFeatureAngle(0); Smooth->FeatureEdgeSmoothingOn(); Smooth->BoundarySmoothingOn(); Smooth->SetConvergence(0); Smooth->ReleaseDataFlagOn(); Then I tried : vtkWindowedSincPolyDataFilter *Smooth=vtkWindowedSincPolyDataFilter::New(); Smooth->SetInput(mcubes->GetOutput()); Smooth->GenerateErrorVectorsOn(); Smooth->GenerateErrorScalarsOn(); Smooth->Update(); And still no change, Any Ideas why this is happening?? Thanks in Advance... Marc, P.S Thanks Mathieu >From: Mathieu Malaterre >To: Marwan Adada >CC: vtkusers at public.kitware.com >Subject: Re: [vtkusers] vtkMarchingCubes >Date: Wed, 23 Apr 2003 20:08:20 +0200 > >http://www.vtk.org/doc/nightly/html/classvtkSmoothPolyDataFilter.html > >and >http://www.vtk.org/doc/nightly/html/classvtkWindowedSincPolyDataFilter.html >the later is not lagrangian -> no shrinkage ! > >HTH >mathieu > >Marwan Adada wrote: >>Hello, >>Now I converted my 8bit buffer to a 16bit buffer and sliced it, then >>passed it to vtkVolume16Reader and then to marching cubes, and I got the >>volume. But my result is not smooth at all, I set the >>MarchingCube->ComputeNormalsOn(); and still the result is not smooth. >>Is there any filter I can use to smooth the resulting output from marching >>cubes?? >>Thanks in advance >> >>Marc >> >>P.S Thanks james; >> >>>From: James Dessart >>>To: Marwan Adada >>>CC: vtkusers at public.kitware.com >>>Subject: Re: [vtkusers] vtkMarchingCubes >>>Date: Wed, 23 Apr 2003 13:58:55 -0400 (EDT) >>> >>> >>> >>>On Wed, 23 Apr 2003, Marwan Adada wrote: >>> >>> > I have an 8 bit volume data (205x233x251) that I need to pass to >>> > vtkMarchingCubes. I tried using vtkImageReader but it seems not to >>>work >>> > with vtkMarchingCubes. I tried vtkImageData and still couldn't pass >>>it to >>> > vtkMarchingCubes. I know vtkVolume16Reader works with >>>vtkMarchingCubes, but >>> > my data 8bits not 16bits. I am wondering what vtk 8bit Readers does >>> > vtkMarchingCubes accepts, Any Ideas?? >>> >>>What you could try would be to read it in as 16-bit values, and run >>>marching cubes on that. The values would be between 0-255, as 8-bit >>>values generally are, but that shouldn't matter, if you specify your >>>threshold for marching cubes properly. >>> >>>hope that helps, >>>James >>> >> >> >>_________________________________________________________________ >>The new MSN 8: smart spam protection and 2 months FREE* >>http://join.msn.com/?page=features/junkmail >> >>_______________________________________________ >>This is the private VTK discussion list. Please keep messages on-topic. >>Check the FAQ at: >>Follow this link to subscribe/unsubscribe: >>http://public.kitware.com/mailman/listinfo/vtkusers >> > > >-- >Mathieu Malaterre >CREATIS >28 Avenue du Doyen LEPINE >B.P. Lyon-Montchat >69394 Lyon Cedex 03 >http://www.creatis.insa-lyon.fr/~malaterre/ > _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From dean.inglis at on.aibn.com Wed Apr 23 14:57:42 2003 From: dean.inglis at on.aibn.com (Dean Inglis) Date: Wed, 23 Apr 2003 14:57:42 -0400 Subject: [vtkusers] any tips on volume rendering binary image data? Message-ID: does anyone have any aesthetically pleasing ways of volume rendering binary image data with vtkVolumeTextureMapper2D? I keep getting a displeasing effect showing image voxels stacked like building blocks. Shading is also a no go in terms of appearance. Image data consists of 0's (background) and 1's (foreground). I am currently trying to pass the data through vtkImageGaussianSmooth to blur the edges slightly. Is this the way to go? Dean From sxa at fluent.com Wed Apr 23 15:50:28 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Wed, 23 Apr 2003 15:50:28 -0400 Subject: [vtkusers] Light bug ... (Better explained) References: <7AF3524792FFD511A17A0000F81E965E472DE6@ELMO> Message-ID: <00fd01c309d1$96fd3fa0$8ae4e9c0@sxapc> Humm ! So is this a bug with VTK ? No way to go around this ? We are currently using VTK 4.0. ----- Original Message ----- From: "Nigel Nunn" To: Cc: Sent: Wednesday, April 23, 2003 11:51 AM Subject: RE: [vtkusers] Light bug ... (Better explained) > > Hi Sebastien, > > > As you can see in the "after.jpg" image, the red sphere > > doesn't seem to update the way its receiving light ! > > Thanks for so neatly illustrating the problem. I feel this may > be related to a lighting problem I wrote about earlier: images > rendered off-screen are not getting the same user-defined lights > currently applied to images rendered on-screen. > > One of the following may need adjustment: > > 1. our updating of time-stamps, or > 2. the logic used for updating the lights > in the low-level Render operations > > vtkRenderer::Render() makes a fairly complicated test of > when and what to "update". If a call to Render() does in > fact trigger a call to DeviceRender(), then DeviceRender() > tries to get the lighting right. I have not yet stepped > through a debug version to work out what needs to happen. > > Nigel > > > > ********************************************************************** > This message is intended for the addressee named and may contain > confidential and privileged information. If you are not the intended > recipient please note that any form of distribution, copying or use of > this communication or the information in it is strictly prohibited and > may be unlawful. If you receive this message in error, please delete it > and notify the sender. > > Keep up to date with what's happening in Australian sport. > Visit http://www.ausport.gov.au > ********************************************************************** From bob at stlcc.org Wed Apr 23 19:29:17 2003 From: bob at stlcc.org (Bob Palank) Date: Wed, 23 Apr 2003 18:29:17 -0500 Subject: [vtkusers] RE: VTK In-Reply-To: Message-ID: No, I can't. Are you running XP Pro ? Perhaps others on the list can offer clarification. I have switched to C#.Net using a C# vtk wrapper and am testing that while I wait for clarification on vtk & Java -----Original Message----- From: Xin Zhao [mailto:zxem at my169.com] Sent: Wednesday, April 23, 2003 11:00 AM To: bob at stlcc.org Cc: acp02xz at sheffield.ac.uk Subject: VTK Dear, I use vtk4.2 + Java + JCreator in my computer. I also have some problem when run the Example. Can you tell me how to position dlls and position vtk.jar Thanks! Xin Zhao From zxem at my169.com Wed Apr 23 22:18:18 2003 From: zxem at my169.com (Xin Zhao) Date: Thu, 24 Apr 2003 2:18:18 +0000 Subject: [vtkusers] Error? Try TestVTKCanvas.java Message-ID: Dear all, I tried the TestVTKCanvas.java. When I compiled it, it is ok. But at run time, there is a error message: "Exception in thread "main" java.lang.UnsatisfiedLinkError: E:\vtk422\bin\vtkRend eringJava.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at vtkPanel.(vtkPanel.java:31) at TestVTKCanvas.(TestVTKCanvas.java:11) at TestVTKCanvas.main(TestVTKCanvas.java:29) Press any key to continue..." What is the problem? Thanks! Xin Zhao From s348212 at student.uq.edu.au Wed Apr 23 21:20:13 2003 From: s348212 at student.uq.edu.au (Ben Appleton) Date: Thu, 24 Apr 2003 11:20:13 +1000 Subject: [vtkusers] Re: Linking VTK under Red Hat Message-ID: <008501c309ff$ab3dcb50$c7416682@itee.uq.edu.au> Hi all! First of all I apologise for spamming. Is there a newsgroup I can send this to instead? I'm trying to get into VTK to display 3D medical data for my phd - it looks like a fantastic toolkit. I started by compiling it under windows, since I'm more familiar with windows than with *nix - that worked perfectly. Then I tried downloading the source from http://www.vtk.org/files/release/4.2/VTK-4.2-LatestRelease.tar.gz (the standard download from the VTK webpage) and compiling that. It compiles happily enough, but the linker drops out. The errors I get are all 'undefined reference's to the components of iostream, such as cout, cin, <<, >>, endl, etc. Why wouldn't it automatically link the standard libraries? I've tried numerous configurations via cmake, I've installed the latest version of gcc, but nothing makes the slightest difference. I'd appreciate any assistance you can offer. Regards, Ben Appleton ITEE, The University of Queensland From annainnet at mail.ru Thu Apr 24 00:32:11 2003 From: annainnet at mail.ru (=?koi8-r?Q?=E1=CE=CE=C1=20=EE=C1=CA=CD=C1=CE?=) Date: Thu, 24 Apr 2003 08:32:11 +0400 Subject: [vtkusers] Problems with the lookup table. Message-ID: Hello, can anybody help me? I need to work with colors in vtk. I have a polydata file, and I want to set colors to te poligons in this file. I tryed to execute following simple example, and this example worked perfecly differently, then I expected. In file I have a cube, different scalars correspond to different faces of this cube, and different colors correspond to different scalars. But while executing, I see in my screen the cube, one face of which is red and all another are blue. Setting different colors to the faces of cube, I made sure that actualy mean only first and last colors in the lookup table. What is incorrect in my example? Anna Naiman (Russia) This is my polydata file: # vtk DataFile Version 2.0 Cube example ASCII DATASET POLYDATA POINTS 8 float 0.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 1.0 0.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0 POLYGONS 6 30 4 0 1 2 3 4 4 5 6 7 4 0 1 5 4 4 2 3 7 6 4 0 4 7 3 4 1 2 6 5 CELL_DATA 6 SCALARS cell_scalars int 1 LOOKUP_TABLE lt 0 1 2 3 4 5 LOOKUP_TABLE lt 6 1.0 0.0 0.0 1.0 0.0 1.0 0.0 1.0 1.0 1.0 0.0 1.0 0.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 1.0 This is the code, processing polydata file: import vtk.*; import java.awt.*; import java.awt.event.*; import java.lang.Math; import sun.awt.*; import java.beans.*; public class cubic { static { System.loadLibrary("vtkCommonJava"); System.loadLibrary("vtkFilteringJava"); System.loadLibrary("vtkIOJava"); System.loadLibrary("vtkImagingJava"); System.loadLibrary("vtkGraphicsJava"); System.loadLibrary("vtkRenderingJava"); } public static void main(String args[]) { vtkPolyDataReader reader=new vtkPolyDataReader(); reader.SetFileName("cub.vtk"); vtkPolyDataMapper lineMapper=new vtkPolyDataMapper(); lineMapper.SetInput (reader.GetOutput()); vtkActor lineActor=new vtkActor(); lineActor.SetMapper(lineMapper); vtkRenderer ren1 = new vtkRenderer(); ren1.AddActor( lineActor ); ren1.SetBackground( 0.1, 0.2, 0.4 ); vtkRenderWindow renWin = new vtkRenderWindow(); renWin.AddRenderer( ren1 ); renWin.SetSize( 300, 300 ); int i; for (i = 0; i < 300; ++i) {renWin.Render(); ren1.GetActiveCamera().Azimuth( 1 ); } } From novalet at yahoo.com.cn Thu Apr 24 01:28:44 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Thu, 24 Apr 2003 13:28:44 +0800 (CST) Subject: [vtkusers] How to get a complement image? Message-ID: <20030424052844.27744.qmail@web15210.mail.bjs.yahoo.com> Hi! Is there any filter in vtk for a complement image? i mean turn black to white and white to black. I try to test it by using vtkImageMathematics twice. My tcl code list below: ================================================ package require vtk vtkTIFFReader reader1 reader1 SetFileName d:/chenfu/pearlite.tif vtkImageCast cast cast SetOutputScalarTypeToInt cast SetInput [ reader1 GetOutput] vtkImageMathematics math math SetOperationToAddConstant math SetConstantC -255 math SetInput1 [cast GetOutput] vtkImageMathematics math2 math2 SetOperationToAbsoluteValue math2 SetInput1 [math GetOutput] vtkImageViewer2 viewer viewer SetInput [ math2 GetOutput ] viewer Render wm withdraw . =========================================== The algorithm first substract the original image by 255, then have a abs operation. Is it the right way? Any idea? ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ??????????????????????????????????????~ http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com/ From zxem at my169.com Thu Apr 24 03:32:51 2003 From: zxem at my169.com (Xin Zhao) Date: Thu, 24 Apr 2003 7:32:51 +0000 Subject: [vtkusers] Error? Try TestVTKCanvas.java Message-ID: Dear sir, I downloaded the java file from http://public.kitware.com/cgi-bin/cvsweb.cgi/VTK/Wrapping/Java/vtk/ I did not change anything. Thanks! Xin Zhao >Include all libraries in a static block as > >static{ > System.loadLibrary("libraryname"); > .... > .. >} > > > >-----Original Message----- >From: vtkusers-admin at public.kitware.com >[mailto:vtkusers-admin at public.kitware.com]On Behalf Of Xin Zhao >Sent: Thursday, April 24, 2003 7:48 AM >To: vtkusers at public.kitware.com >Subject: [vtkusers] Error? Try TestVTKCanvas.java > > >Dear all, > > I tried the TestVTKCanvas.java. When I compiled it, it is ok. > But at run time, there is a error message: > > "Exception in thread "main" java.lang.UnsatisfiedLinkError: >E:\vtk422\bin\vtkRend >eringJava.dll: Can't find dependent libraries > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) > at java.lang.Runtime.loadLibrary0(Runtime.java:788) > at java.lang.System.loadLibrary(System.java:832) > at vtkPanel.(vtkPanel.java:31) > at TestVTKCanvas.(TestVTKCanvas.java:11) > at TestVTKCanvas.main(TestVTKCanvas.java:29) >Press any key to continue..." > > What is the problem? > > Thanks! > > Xin Zhao > > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers From Mathieu.Malaterre at creatis.insa-lyon.fr Thu Apr 24 03:38:39 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Thu, 24 Apr 2003 09:38:39 +0200 Subject: [vtkusers] vtkMarchingCubes In-Reply-To: References: Message-ID: <3EA7947F.40502@creatis.insa-lyon.fr> Marwan I don't know what are you looking for. Anyway with vtkWindowSync... you forgot to specify the number of iterations. Try something like: vtkWindowedSincPolyDataFilter smooth smooth SetInput [mcubes GetOutput] smooth SetNumberOfIterations 50 smooth BoundarySmoothingOn smooth SetFeatureAngle 120 smooth SetEdgeAngle 90 smooth SetPassBand 0.1 vtkPolyDataNormals normals normals SetInput [smooth GetOutput] vtkStripper stripper stripper SetInput [normals GetOutput] vtkPolyDataMapper cylMapper cylMapper SetInput [stripper GetOutput] --- Also please note that these filters won't modify the number of edges so if your mesh is poorly define. Make use of any interpolation filters (butterfly etc...) yaHTH mathieu Marwan Adada wrote: > Hello, > I tried using these filters but for some reason I am not getting any > change in the output, my code is: > > vtkSmoothPolyDataFilter *Smooth = vtkSmoothPolyDataFilter::New(); > Smooth->SetInput(mcubes->GetOutput()); > Smooth->SetNumberOfIterations(10); > Smooth->SetRelaxationFactor(1); > Smooth->SetFeatureAngle(0); > Smooth->FeatureEdgeSmoothingOn(); > Smooth->BoundarySmoothingOn(); > Smooth->SetConvergence(0); > Smooth->ReleaseDataFlagOn(); > > Then I tried : > vtkWindowedSincPolyDataFilter *Smooth=vtkWindowedSincPolyDataFilter::New(); > Smooth->SetInput(mcubes->GetOutput()); > Smooth->GenerateErrorVectorsOn(); > Smooth->GenerateErrorScalarsOn(); > Smooth->Update(); > > And still no change, Any Ideas why this is happening?? > Thanks in Advance... > Marc, > > P.S Thanks Mathieu > > >> From: Mathieu Malaterre >> To: Marwan Adada >> CC: vtkusers at public.kitware.com >> Subject: Re: [vtkusers] vtkMarchingCubes >> Date: Wed, 23 Apr 2003 20:08:20 +0200 >> >> http://www.vtk.org/doc/nightly/html/classvtkSmoothPolyDataFilter.html >> >> and >> http://www.vtk.org/doc/nightly/html/classvtkWindowedSincPolyDataFilter.html >> >> the later is not lagrangian -> no shrinkage ! >> >> HTH >> mathieu >> >> Marwan Adada wrote: >> >>> Hello, >>> Now I converted my 8bit buffer to a 16bit buffer and sliced it, then >>> passed it to vtkVolume16Reader and then to marching cubes, and I got >>> the volume. But my result is not smooth at all, I set the >>> MarchingCube->ComputeNormalsOn(); and still the result is not smooth. >>> Is there any filter I can use to smooth the resulting output from >>> marching cubes?? >>> Thanks in advance >>> >>> Marc >>> >>> P.S Thanks james; >>> >>>> From: James Dessart >>>> To: Marwan Adada >>>> CC: vtkusers at public.kitware.com >>>> Subject: Re: [vtkusers] vtkMarchingCubes >>>> Date: Wed, 23 Apr 2003 13:58:55 -0400 (EDT) >>>> >>>> >>>> >>>> On Wed, 23 Apr 2003, Marwan Adada wrote: >>>> >>>> > I have an 8 bit volume data (205x233x251) that I need to pass to >>>> > vtkMarchingCubes. I tried using vtkImageReader but it seems not >>>> to work >>>> > with vtkMarchingCubes. I tried vtkImageData and still couldn't >>>> pass it to >>>> > vtkMarchingCubes. I know vtkVolume16Reader works with >>>> vtkMarchingCubes, but >>>> > my data 8bits not 16bits. I am wondering what vtk 8bit Readers does >>>> > vtkMarchingCubes accepts, Any Ideas?? >>>> >>>> What you could try would be to read it in as 16-bit values, and run >>>> marching cubes on that. The values would be between 0-255, as 8-bit >>>> values generally are, but that shouldn't matter, if you specify your >>>> threshold for marching cubes properly. >>>> >>>> hope that helps, >>>> James >>>> >>> >>> >>> _________________________________________________________________ >>> The new MSN 8: smart spam protection and 2 months FREE* >>> http://join.msn.com/?page=features/junkmail >>> >>> _______________________________________________ >>> This is the private VTK discussion list. Please keep messages >>> on-topic. Check the FAQ at: >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> -- >> Mathieu Malaterre >> CREATIS >> 28 Avenue du Doyen LEPINE >> B.P. Lyon-Montchat >> 69394 Lyon Cedex 03 >> http://www.creatis.insa-lyon.fr/~malaterre/ >> > > > _________________________________________________________________ > Add photos to your e-mail with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From dariooliviero at libero.it Thu Apr 24 05:23:23 2003 From: dariooliviero at libero.it (=?iso-8859-1?Q?dariooliviero@libero.it?=) Date: Thu, 24 Apr 2003 11:23:23 +0200 Subject: [vtkusers] =?iso-8859-1?Q?How_to_have_images_in_16_bit_format=3F?= Message-ID: Dear Users, I have a problem with vtkvolume 16 reader. I would like to know how I can save a generic image file in an image if 16 bit. Look likes that the format of the images that the class is able to read is an 8 bit images with 2 channels. It is true? Moreover I would like to use Adobe photoshop to do this conversion. Somebody can help me??!!! Thanks a lot to all of you! Dario From ramakrishna.prakash at quest-global.com Thu Apr 24 06:56:45 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Thu, 24 Apr 2003 16:26:45 +0530 Subject: [vtkusers] (no subject) Message-ID: <001401c30a50$333971d0$de0ba8c0@qtwblr01.questglobal.com> Hi, Does any body have a java wrapper for vtkImplicitPolyData? I tried building java wrapper for it, but it gives me a error saying Generic Warning: vtkJavautil.cxx GetpointerFromObject : vtk bad argument, type conversion failed Can some body tell me the proper way of building Java wrapper for this C++ class. thanks Shyam From gwenael.guillard at enst-bretagne.fr Thu Apr 24 08:56:32 2003 From: gwenael.guillard at enst-bretagne.fr (=?iso-8859-1?Q?Gwena=EBl?= Guillard) Date: Thu, 24 Apr 2003 14:56:32 +0200 Subject: [vtkusers] about splines Message-ID: <3EA7DF00.6FC59EEC@enst-bretagne.Fr> Hi, I have two questions about splines. One general and one more specific to vtk. 1. It is possible to compute a spline given two points and two vectors such that the curve has the two points for extremities end the two vectors for tangent at these extremities. That is to say it is possible to draw a spline with extremities and tangent line at the extremities given. Is it possible to draw a spline with extremities, tangent lines and tangent PLANES given, ie with two points and four vectors? 2. How to do that with vtk? Thank you for your help, Gwenael From ramakrishna.prakash at quest-global.com Thu Apr 24 09:42:59 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Thu, 24 Apr 2003 19:12:59 +0530 Subject: [vtkusers] VT Java wrapping Message-ID: <001901c30a67$6ba94330$de0ba8c0@qtwblr01.questglobal.com> Hi, Further to my previous mail, I am using vtkImplicitPolyData and I have built a Java wrapper on that. Now do I need to build VTK completely from scratch or can I just create one more library for the above mentioned class? I am getting a error saying Generic Warning: vtkJavautil.cxx GetpointerFromObject : vtk bad argument, type conversion failed Can some body please help me? Thanks Shyam From heiland at ncsa.uiuc.edu Thu Apr 24 10:15:49 2003 From: heiland at ncsa.uiuc.edu (Randy Heiland) Date: Thu, 24 Apr 2003 09:15:49 -0500 Subject: [vtkusers] about splines In-Reply-To: =?iso-8859-1?Q?Gwena=EBl_Guillard_=3Cgwenael=2Eguillard=40ens?= =?iso-8859-1?Q?t-bretagne=2Efr=3E?= =?iso-8859-1?Q?________=22=5Bvtkusers=5D_about_splines=22_=28Apr_24=2C__2?= =?iso-8859-1?Q?=3A56pm=29?= References: <3EA7DF00.6FC59EEC@enst-bretagne.Fr> Message-ID: <1030424091549.ZM9945@pecos.ncsa.uiuc.edu> On Apr 24, 2:56pm, Gwena?l Guillard wrote: > Subject: [vtkusers] about splines > Hi, > > I have two questions about splines. One general and one more specific to > vtk. > 1. It is possible to compute a spline given two points and two vectors > such that the curve has the two points for extremities end the two > vectors for tangent at these extremities. That is to say it is possible > to draw a spline with extremities and tangent line at the extremities > given. Yes. Do a search for 'hermite cubic spline'. >Is it possible to draw a spline with extremities, tangent lines > and tangent PLANES given, ie with two points and four vectors? You're trying to hurt my brain, aren't you? I don't know what you mean by "extremities". Nor do I know how a tangent plane (2 vectors) at an endpoint would be used to uniquely define the spline. Maybe you can clarify. > 2. How to do that with vtk? I believe VTK currently has classes that deal only with *interpolating* splines (search for 'spline' at public.kitware.com/VTK/doc/nightly/html/classes.html), ie, given a set of points, draw a curve through those points. So, in addition to your given endpoints, you'd need to calculate the additional 2 interpolating spline from the Hermite form. The exercise is left to the reader :) --Randy From strelitz at lanl.gov Thu Apr 24 10:20:55 2003 From: strelitz at lanl.gov (Richard Strelitz) Date: Thu, 24 Apr 2003 08:20:55 -0600 Subject: [vtkusers] Bug in vtkStructuredPointsWriter when using Field Data Message-ID: There is a sequencing problem in this routine such that the field data is written after the data set header but before the Dimensions, Spacing, and especially Point Data lines. I have included a program that demonstrates this, plus 2 files: the first has the field data and the incorrect sequencing; the second data file only writes out a single scalar field; the output here is correct. The program attached generated this file. While I understand that the Field Data class is scheduled to be deprecated, I would still like this issue addressed. Thanks, Richard Strelitz Vis. Team, Advanced Computing Lab, CCS-1 LANL ---------------------------------- Program: #include "vtkStructuredPoints.h" #include "vtkStructuredPointsWriter.h" #include "vtkFloatArray.h" #include "vtkFieldData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" void main(int argc, char **argv) { int Nvals= 2*3*4; vtkFloatArray *pQC = vtkFloatArray::New(); pQC-SetName("QC"); pQC->Allocate(Nvals); pQC->SetNumberOfComponents(1); pQC->SetNumberOfValues(Nvals); vtkFloatArray *pQR = vtkFloatArray::New(); pQR->SetName("QR"); pQR->Allocate(Nvals); pQR->SetNumberOfComponents(1); pQR->SetNumberOfValues(Nvals); float dummy[24]={1,2,3,4,5,6,7,8,9,10,11,12, 13,14,15,16,17,18,19,20,21,22,23,24}; vtkFieldData *pField = vtkFieldData::New(); pField->AllocateArrays(2); for(int j=0;jAddArray(pQC); for(int j=0;jGetRange(rangeC);pQR-GetRange(rangeR); printf(" RANGE %8.3f %8.3f \n",rangeC[1],rangeR[1]); vtkStructuredPoints *pGridr = vtkStructuredPoints::New(); pGridr->SetDimensions(2,3,4); pGridr->AllocateScalars(); pGridr->GetPointData()-SetScalars(pQC); // pGridr->SetFieldData(pField); pGridr->Update(); vtkStructuredPointsWriter *pWR = vtkStructuredPointsWriter::New(); pWR->SetFileName("F:/Wilhelmson/Small2.vtk"); pWR->SetInput(pGridr); pWR->SetFileTypeToASCII(); pWR->Write(); } --------------- ---------------Data File 1: Small.vtk [BAD] # vtk DataFile Version 3.0 vtk output ASCII DATASET STRUCTURED_POINTS FIELD FieldData 2 QC 1 24 float 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 QR 1 24 float 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 DIMENSIONS 2 3 4 SPACING 1 1 1 ORIGIN 0 0 0 CELL_DATA 6 POINT_DATA 24 -------------------- --------------------DataFile 2: Small2.vtk # vtk DataFile Version 3.0 vtk output ASCII DATASET STRUCTURED_POINTS DIMENSIONS 2 3 4 SPACING 1 1 1 ORIGIN 0 0 0 CELL_DATA 6 POINT_DATA 24 SCALARS scalars float LOOKUP_TABLE default 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 From jlpina at ivo.cps.unizar.es Thu Apr 24 11:15:50 2003 From: jlpina at ivo.cps.unizar.es (Jose Luis Pina) Date: Thu, 24 Apr 2003 17:15:50 +0200 Subject: [vtkusers] Light without shadows In-Reply-To: <20030416101801.10306.43177.Mailman@public.kitware.com> Message-ID: <5.2.0.9.0.20030424170416.00af9620@ivo.cps.unizar.es> >Hello: I have some glyphs (vtkArrowSource), coloured according the vectors in each point, but the shadows created by the light, change the real color associated with every arrow, I tried with vtkLight and vtkLightKit, TwoSidedLighting with the rendere but I can't do.I wonder if is posible ilumination without shadows or with a minimal shadow that keep the real color. Thanks in advance. Jos? Luis Pina jlpina at ivo.cps.unizar.es From crawfis at cis.ohio-state.edu Thu Apr 24 12:48:46 2003 From: crawfis at cis.ohio-state.edu (Roger Crawfis) Date: Thu, 24 Apr 2003 12:48:46 -0400 Subject: [vtkusers] (no subject) Message-ID: <000201c30a81$627687e0$0100a8c0@pc683a> Does anyone know how to get semi-transparent lines? The vtkProperty works when setting the color of my streamlines, but not the geometry. Giving the same property pointer to other geometry makes it transparent. No effect on the streamlines though. A bug? Also, if I add the SpeedScalarsOn or the OrientationScalarsOn, the streamlines disappear. Note, there is a mismatch on the grid size and the velocity magnitude, hence the very large propagation time. Roger --------code snippit------------- vtkStreamLine *streamLine; vtkPolyDataMapper *streamMapper; vtkActor *streamActor; vtkProperty *lineProps = vtkProperty::New(); lineProps->SetLineWidth( 2.3 ); lineProps->SetColor( 0.9, 0.9, 0.2 ); lineProps->SetInterpolationToFlat(); lineProps->SetOpacity( 0.03 ); float seedPt[3]; for( int is=0; is < 1000; is++ ) { seedPt[0] = 0.2; seedPt[1] = 32.0 * rand()/(float) RAND_MAX; seedPt[2] = 32.0 * rand()/(float) RAND_MAX; streamLine = vtkStreamLine::New(); streamLine->SetInput( sgrid ); streamLine->SetStartPosition( seedPt ); //streamLine->OrientationScalarsOn(); streamLine->SetMaximumPropagationTime( 3000000.0 ); streamLine->SetIntegrationStepLength( 0.7 ); streamLine->SetStepLength( 10000.0 ); streamMapper = vtkPolyDataMapper::New(); streamMapper->SetInput( streamLine->GetOutput() ); streamActor = vtkActor::New(); streamActor->SetMapper( streamMapper ); streamActor->SetProperty( lineProps ); ren1->AddActor( streamActor ); } -------------------------------------- -------------------------------------- Roger A. Crawfis Associate Professor Computer & Information Science The Ohio State University 2015 Neil Ave., Columbus, OH 43210 TEL: (614) 292-2566 FAX: (614) 292-2911 E-Mail: crawfis at cis.ohio-state.edu http://www.cis.ohio-state.edu/~crawfis -------------------------------------- -------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From cnavarro at ncsa.uiuc.edu Thu Apr 24 14:03:01 2003 From: cnavarro at ncsa.uiuc.edu (Christopher M. Navarro) Date: Thu, 24 Apr 2003 13:03:01 -0500 (CDT) Subject: [vtkusers] Light without shadows In-Reply-To: <5.2.0.9.0.20030424170416.00af9620@ivo.cps.unizar.es> Message-ID: On Thu, 24 Apr 2003, Jose Luis Pina wrote: > > >Hello: > I have some glyphs (vtkArrowSource), coloured according the vectors in each > point, but the shadows created by the light, change the real color > associated with every arrow, I tried with vtkLight and vtkLightKit, > TwoSidedLighting with the rendere but I can't do.I wonder if is posible > ilumination without shadows or with a minimal shadow that keep the real color. > Thanks in advance. You could set ambient to 1.0 and diffuse and specular to 0.0 to basically turn off lighting. ie: myActor.GetProperty().SetAmbient(1.0); myActor.GetProperty().SetDiffuse(0.0); myActor.GetProperty().SetSpecular(0.0); (note this is how it would be done in java, change the syntax for whatever language you're using) -chris From nikolas_2004 at hotmail.com Thu Apr 24 17:24:55 2003 From: nikolas_2004 at hotmail.com (Nicolas Fernandez) Date: Thu, 24 Apr 2003 18:24:55 -0300 Subject: [vtkusers] yessss vtk in delphi is comming up :) Message-ID: Hello vtk users: I'm working to use vtk with delphi, at the end of may the proyect must be done, in a few day a web site cam be avaiable to download a beta version. I you have any question please write me, the vtk in delphi is very faster to compile. Sorry but my english its not good. Niko78 from Argentina _________________________________________________________________ Charla con tus amigos en l?nea mediante MSN Messenger: http://messenger.yupimsn.com/ From brownr at ucalgary.ca Thu Apr 24 20:03:15 2003 From: brownr at ucalgary.ca (Robb Brown) Date: Thu, 24 Apr 2003 18:03:15 -0600 Subject: [vtkusers] Picking a point Message-ID: <4FC10E14-76B1-11D7-981B-000393C34B0E@ucalgary.ca> I've got a cube and I want to pick a point on it's surface. vtkPointPicker is kind of slow and when I use vtkPointPicker.GetMapperPosition() it returns the wrong position (I create a sphere centered on the coordinates and it is not under the mouse) vtkPropPicker is a much nicer option -- very fast, and allows you to give it a subset of the props to pick. However, vtkPropPicker.GetPickPosition() does not appear to return world coordinates. To me, these look like view coordinates. I tried multiplying by the camera's ViewTransformMatrix, but this doesn't produce good results. I also asked the renderer to convert from view to world coordinates and this produced completely nonsensical numbers. How can I do this? Thanks, Robb _____________________________ Robb Brown Seaman Family MR Center Calgary, AB From a.maclean at acfr.usyd.edu.au Thu Apr 24 22:53:06 2003 From: a.maclean at acfr.usyd.edu.au (Andrew Maclean) Date: Fri, 25 Apr 2003 12:53:06 +1000 Subject: [vtkusers] Help - Setting multiple views after a user interaction. Message-ID: <1051239186.3ea8a31215c4e@www-mail.usyd.edu.au> Can anyone help me with this? Imagine that you are looking at a cow through several different windows from the side of a building. Then you use the camera in the master window to change the view of the cow. The problem is that the views are all correct when first displayed. However when I interact with the image using the mouse the views (except for the central one) are incorrect. Essentially I have several views of the same object and I want to rotate and zoom and update the views in all the windows that they are correct. So at the beginning of the mouse interaction I transform each actor back to being the same as the master one. Then at the end of the event I transform them back. However they all look the same as the master - so something is clearly incorrect. Any help or comments are appreciated. Here is the sample code: ////////////////////////////////////////////////////////////////////////////// # # Purpose: # Display a cow in a rectangular array of viewports. The central vieport # is perpendicular to the z-axis of the cow and lies on the z-axis. The # other viewports are perpendicular to the z-axis of the cow but are # offset in the x- and y- directions from the central one. Thus these off-axis # viewports show an image of the cow that is translated and rotated. # First we include the VTK Tcl packages which will make available # all of the VTK commands to Tcl. # package require vtk package require vtkinteraction # Get the corrct position of the cow relative to the view window. proc TransformObj { i j cmx sclX xrng cmy sclY yrng cols rows r } { global dx global dy global theta global psi global scale # The coordinates for the viewport global xmin global xmax global ymin global ymax set xmin [expr $j * {1.0 / $cols}] set ymin [expr $i * {1.0 / $rows}] set xmax [expr [expr $j * {1.0 / $cols}] + [expr 1.0 / $cols]] set ymax [expr [expr $i * {1.0 / $rows}] + [expr 1.0 / $rows]] # We need to move the cow backwards along the line of # sight and rotate it so that the correct part is in view. # Firstly find the centre of the viewport. # We can move the centres by scaling them. set cx [expr (($xmax - $xmin) / 2.0 + $xmin)] set cy [expr (($ymax - $ymin) / 2.0 + $ymin)] # Calculate the angle theta corresponding to the angular distance # from the master window in the x-direction and the corresponding # angle psi in the y-direction. (dx,dy) is the position of the centre # of the window relative to the master window # Remember to scale it using xrng, yrng snd sclX, sclY # sclX, sclY move the windows away from the central one by the factor # corresponding to their value. set dx [expr ($cx-$cmx)*$sclX*$xrng] set dy [expr ($cy-$cmy)*$sclY*$yrng] set d [expr sqrt($dx*$dx+$dy*$dy)] set psi [expr atan2($dx,$r)*45/atan(1)] set theta [expr atan2($dy,$r)*45/atan(1)] # Because the viewpoint is a plane perpendicular to the z-axis # the off-centre cows will be slightly further away by an amount dr. set dr [expr $r*(-1+sqrt(1+$d/$r*$d/$r))] # So the scale factor is: set scale [expr $r/($r+$dr)] } # Rendering stuff vtkRenderWindow renWin vtkRenderWindowInteractor iren iren SetRenderWindow renWin iren AddObserver LeftButtonPressEvent BeginCameraEvnt iren AddObserver LeftButtonReleaseEvent EndCameraEvnt iren AddObserver MiddleButtonPressEvent BeginCameraEvnt iren AddObserver MiddleButtonReleaseEvent EndCameraEvnt iren AddObserver RightButtonPressEvent BeginCameraEvnt iren AddObserver RightButtonReleaseEvent EndCameraEvnt iren Initialize # This adds the "u" keypress event...it pops up a Tcl interpreter. # iren AddObserver UserEvent {wm deiconify .vtkInteract} # First start by reading a cow model. We also generate surface normals for # prettier rendering. vtkBYUReader cow cow SetGeometryFileName "$VTK_DATA_ROOT/Data/Viewpoint/cow.g" # Apply a preliminary rotation and/or other transforms to the cow. # We will then use this transformed cow as the basis for the views # of the cow in all the windows. This transformed cow is further # transformed to reflect the different geometry being seen in each # viewport. # Use the variable r (below) to control the distance of the observer # from the cow. This will affect the non-master window views. # The windows set rows 3 set cols 3 # The master window - this controls the rotaton/scaling performed by the camera. set masterWindow [expr int(floor([expr {$rows * $cols} / 2.0]))] # Find the centre of the master window viewport. set i [expr int(floor([expr $rows / 2.0]))] set j [expr int(floor([expr $cols / 2.0]))] set xmin [expr $j * {1.0 / $cols}] set ymin [expr $i * {1.0 / $rows}] set xmax [expr [expr $j * {1.0 / $cols}] + [expr 1.0 / $cols]] set ymax [expr [expr $i * {1.0 / $rows}] + [expr 1.0 / $rows]] # Find the centre of the viewport. set cmx [expr ($xmax - $xmin) / 2.0 + $xmin] set cmy [expr ($ymax - $ymin) / 2.0 + $ymin] # Initial orientations set rotY 0 set rotX 0 # Scaling - if you want it. set scaleX 0.3 set scaleY 0.5 set scaleZ 0.8 vtkTransform transForCow transForCow RotateY $rotY transForCow RotateX $rotX # transForCow Scale $scaleX $scaleY $scaleZ vtkTransformPolyDataFilter pdTransCow pdTransCow SetInput [cow GetOutput] pdTransCow SetTransform transForCow vtkPolyDataMapper cowMapper cowMapper SetInput [pdTransCow GetOutput] set bounds [cowMapper GetBounds] scan $bounds "%f %f %f %f %f %f" minx maxx miny maxy minz maxz set xrng [expr ($maxx-$minx)/2] set yrng [expr ($maxy-$miny)/2] set zrng [expr ($maxz-$minz)/2] # Find the maximum dimension. set mdim [expr ($xrng > $yrng)?$xrng:$yrng ] set mdim [expr ($zrng > $mdim)?$zrng:$mdim ] # The distance of the observer from the central cow. set r [expr $mdim*2 ] # The scale used to set the x-, y-coordinate of the window centre. set sclX 5 set sclY 5 # Build all the objects first. set count 0 while {$count < [expr $rows * $cols]} { if {$count != $masterWindow} { vtkTransform trans($count) vtkTransformPolyDataFilter pdTrans($count) } vtkPolyDataNormals cowNormals($count) vtkPolyDataMapper cowMapper($count) vtkActor cowActor($count) vtkRenderer ren($count) incr count } set i 0 set j 0 set k 0 set count 0 while {$i < $rows} { while {$j < $cols} { TransformObj $i $j $cmx $sclX $xrng $cmy $sclY $yrng $cols $rows $r if {$count != $masterWindow} { cowNormals($count) SetInput [pdTransCow GetOutput] cowMapper($count) SetInput [cowNormals($count) GetOutput] cowActor($count) SetMapper cowMapper($count) # Set the transform directly in the actor. cowActor($count) AddOrientation [expr $theta] [expr -$psi] 0 cowActor($count) AddPosition [expr -$dx] [expr -$dy] 0 cowActor($count) SetScale $scale $scale $scale # A goldenrod cow [cowActor($count) GetProperty] SetColor 0.8549 0.6471 0.1255 # A renderer renders into a viewport within the vtkRenderWindow. # It is part or all of a window on the screen and it is # responsible for drawing the actors it has. We also set # the background color here. ren($count) AddActor cowActor($count) ren($count) SetViewport $xmin $ymin $xmax $ymax renWin AddRenderer ren($count) } else { cowNormals($count) SetInput [pdTransCow GetOutput]; # Comment out for a thin lens. cowMapper($count) SetInput [cowNormals($count) GetOutput] cowActor($count) SetMapper cowMapper($count) # A navajo white 2 cow [cowActor($count) GetProperty] SetColor 0.9333 0.8118 0.6314 ren($count) AddActor cowActor($count) ren($count) SetViewport $xmin $ymin $xmax $ymax renWin AddRenderer ren($count) } incr j incr count } set j 0 incr i } # Make the master window the only one with the active camera. set count 0 while {$count < [expr $rows * $cols]} { if {$count != $masterWindow} { ren($count) SetActiveCamera \ [ren($masterWindow) GetActiveCamera] ren($count) InteractiveOff } incr count } # render the image # renWin Render # renWin SetSize 1000 1000 # prevent the tk window from showing up then start the event loop wm withdraw . # Set all cows to look line the master one. # and then let the camera operate. # To do this you can either invert each user matrix and apply it # or just apply the master cow matrix. proc BeginCameraEvnt { } { global masterWindow global rows global cols # global cmx global cmy global sclX global sclY global xrng global yrng global r # Values obtained from the transform global dx global dy global theta global psi global scale set i 0 set j 0 set count 0 while {$i < $rows} { while {$j < $cols} { TransformObj $i $j $cmx $sclX $xrng $cmy $sclY $yrng $cols $rows $r if {$count != $masterWindow} { #tk_messageBox -message "count: $count\n \ #(dx,dy): ($dx,$dy)\n \ #(theta,psi): ($theta,$psi)\n \ #scale: $scale #" -type ok # Set the transform directly in the actor. # set scale [ expr 1.0 / $scale] set scale 1 cowActor($count) AddOrientation [expr -$theta] [expr $psi] 0 cowActor($count) AddPosition [expr $dx] [expr $dy] 0 cowActor($count) SetScale $scale $scale $scale cowActor($count) Render ren($count) cowMapper($count) } incr j incr count } set j 0 incr i } set i 0 } # Now that the mouse event has ended, re-apply the transforms to each cow # to move them back into position proc EndCameraEvnt { } { global masterWindow global rows global cols # global cmx global cmy global sclX global sclY global xrng global yrng global r # Values obtained from the transform global dx global dy global theta global psi global scale vtkMatrix4x4 objMatrix set i 0 set j 0 set count 0 while {$i < $rows} { while {$j < $cols} { # Calculate the transform for the object. TransformObj $i $j $cmx $sclX $xrng $cmy $sclY $yrng $cols $rows $r if {$count != $masterWindow} { #tk_messageBox -message "count: $count\n \ #(dx,dy): ($dx,$dy)\n \ #(theta,psi): ($theta,$psi)\n \ #scale: $scale #" -type ok # Set the transform directly in the actor. cowActor($count) AddOrientation [expr $theta] [expr -$psi] 0 cowActor($count) AddPosition [expr -$dx] [expr -$dy] 0 cowActor($count) SetScale $scale $scale $scale cowActor($count) Render ren($count) cowMapper($count) set objectMatrix [trans($count) GetMatrix] } incr j incr count } set j 0 incr i } set i 0 objMatrix Delete } # Display the elements of a 4x4 mtrix. proc DisplayMatrix { matrix } { set i 0 set j 0 while {$i < 4} { while {$j < 4} { set m($i$j) [$matrix GetElement $i $j] incr j } set j 0 incr i } set i 0 set lst [array get m] tk_messageBox -message "m: $lst" -type ok } ////////////////////////////////////////////////////////////////////////////// ___________________________________________ Andrew J. P. Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney 2006 NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: http://www.cas.edu.au/ ___________________________________________ ------------------------------------------------- This mail sent through IMP: www-mail.usyd.edu.au From chandranram4u at rediffmail.com Fri Apr 25 00:50:09 2003 From: chandranram4u at rediffmail.com (ramu chandran) Date: 25 Apr 2003 04:50:09 -0000 Subject: [vtkusers] Configuring CVS Message-ID: <20030425045009.8242.qmail@webmail9.rediffmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From vassiliev at getos.belgorod.su Fri Apr 25 00:55:59 2003 From: vassiliev at getos.belgorod.su (Pavel Vassiliev) Date: Fri, 25 Apr 2003 08:55:59 +0400 Subject: Fw: [vtkusers] vtkExtractEdges Message-ID: <000d01c30ae7$79244890$51e33bd5@getosvpv> Hello, I have two meshes for a terrain surface and underground layer and need to create a solid stratum to compute volume. I'm trying to use vtkExtractEdges for the meshes and then generate a side mesh. Is it possible to generate a solid for two or more meshes automatically with using a function of VTK? Thanks in advance. Pavel -------------- next part -------------- An HTML attachment was scrubbed... URL: From tdsternberg at lbl.gov Fri Apr 25 01:05:09 2003 From: tdsternberg at lbl.gov (Theodore D. Sternberg) Date: Thu, 24 Apr 2003 22:05:09 -0700 (PDT) Subject: [vtkusers] Glyphs colored by one scalar, scaled by another? In-Reply-To: <20030425045701.28891.85062.Mailman@public.kitware.com> Message-ID: Is it possible to color glyphs by one scalar, but scale them by another? As the little script below shows, I can scale and color by the *same* scalar. That's nice, but nicer yet would be to use scale and color to display two different sets of scalars. How would that be done? Ted Sternberg Lawrence Berkeley National Laboratory ----------- script begins here -------------- # # Example of glyphs scaled and colored by scalars. # from vtkpython import * points = vtkPoints() points.SetNumberOfPoints( 3 ) points.SetPoint( 0, 0.0, 0.0, 0.0 ) points.SetPoint( 1, 1.0, 1.0, 1.0 ) points.SetPoint( 2, 2.0, 2.0, 2.0 ) scalars = vtkScalars() scalars.InsertScalar(0, 1.0 ) scalars.InsertScalar(1, 1.5 ) scalars.InsertScalar(2, 2.0 ) polydata = vtkPolyData() polydata.SetPoints( points ) polydata.GetPointData().SetScalars( scalars ) sphere = vtkSphereSource() glyph = vtkGlyph3D() glyph.SetSource( sphere.GetOutput() ) glyph.SetInput( polydata ) glyph.Update() mapper = vtkDataSetMapper() mapper.SetInput( glyph.GetOutput() ) mapper.SetScalarRange( glyph.GetOutput().GetScalarRange() ) actor = vtkActor() actor.SetMapper( mapper ) renWin = vtkRenderWindow() iren = vtkRenderWindowInteractor() iren.SetRenderWindow( renWin ) ren = vtkRenderer() renWin.AddRenderer( ren ) ren.AddActor( actor ) iren.Initialize() iren.Start() -------------------- end of script ---------------- From vermaas at astron.nl Fri Apr 25 02:01:33 2003 From: vermaas at astron.nl (Nico Vermaas) Date: Fri, 25 Apr 2003 08:01:33 +0200 Subject: [vtkusers] vtkImageReslice: what do I fill in for SetResliceAxesDirectionCosines.? Message-ID: Hi, I try to get a slice from my vtkImageData cube, but I do not understand the documentation of SetResliceAxesDirectionCosines. Q1: Say, my cube is: 0..100,0..100,0..100 and I want a slice that runs from 10..20,0..100,0.100. So a slice of 10 thick in the Y/Z plane. What must I then fill in in for SetResliceAxesDirectionCosines? Q2: Why is vtkImageReslice better than vtkExtractVOI? Greetings, Nico ==================================================== Nico Vermaas ASTRON - Westerbork Synthesis Radio Telescope Schattenberg 1 - 9433 TA Zwiggelte - The Netherlands tel: +31 593 598710 vermaas at astron.nl ==================================================== From mglistmail at totalise.co.uk Fri Apr 25 05:35:44 2003 From: mglistmail at totalise.co.uk (Martin Gardner) Date: Fri, 25 Apr 2003 10:35:44 +0100 Subject: [vtkusers] vtkImageReslice: what do I fill in for SetResliceAxesDirectionCosines.? In-Reply-To: References: Message-ID: <3EA90170.4000505@totalise.co.uk> Hi Nico Nico Vermaas wrote: > Hi, > > I try to get a slice from my vtkImageData cube, but I do not understand the documentation of SetResliceAxesDirectionCosines. > > Q1: > Say, my cube is: 0..100,0..100,0..100 and I want a slice that runs from 10..20,0..100,0.100. So a slice of 10 thick in the Y/Z plane. Well I would expect vtkExtractVOI to work for this. Perhaps my earlier advice was wrong. > Q2: Why is vtkImageReslice better than vtkExtractVOI? > It can handle 0D, 1D or 2D slices of data better than vtkExtractVOI which in your earlier question vtk was complaining about one of the dimensions being zero i.e. > vtkImageData (0x80957c8): Update extent is: 0, 63, 0, 90, 10, 10 ^^^^^^^ Z dimension is zero > vtkImageData (0x80957c8): Whole extent is: 0, 63, 10, 10, 0, 144 ^^^^^^ Y dimension is zero vtkImageReslice would handle this without an error. I think I assumed that this was what you wanted. However if it is not then something could be messing up vtkExtractVOI so that one if its dimesions is zero. Sorry for my previous advice Martin PS for reference I set it up using SetResliceAxes with a vtkMatrix4x4 In this code snippet I have specified the reslicing axes using two vecotrs v1 and v2 that lie on the reslicing plane, an origin for the plane (bottom left corner) and the normal of the plane. # axesTransform matrix to resample the volume # based on the orientation of the sampling plane # # Homogonous(sic) matrix columns # |x axis vector|y axis vector|z axis vector |origin | #x axis column vtkMatrix4x4 axesTransform #Set inital state of matrix to identity axesTransform Identity #x axis column axesTransform SetElement 0 0 $v1_xn axesTransform SetElement 1 0 $v1_yn axesTransform SetElement 2 0 $v1_zn axesTransform SetElement 3 0 0.0 #y axis column axesTransform SetElement 0 1 $v2_xn axesTransform SetElement 1 1 $v2_yn axesTransform SetElement 2 1 $v2_zn axesTransform SetElement 3 1 0.0 #z axis column axesTransform SetElement 0 2 $norm_x axesTransform SetElement 1 2 $norm_y axesTransform SetElement 2 2 $norm_z axesTransform SetElement 3 2 0.0 #origin column axesTransform SetElement 0 3 $origin_x axesTransform SetElement 1 3 $origin_y axesTransform SetElement 2 3 $origin_z axesTransform SetElement 3 3 1.0 $slicer SetResliceAxes AxesTransform From dariooliviero at libero.it Fri Apr 25 05:36:55 2003 From: dariooliviero at libero.it (=?iso-8859-1?Q?dariooliviero@libero.it?=) Date: Fri, 25 Apr 2003 11:36:55 +0200 Subject: [vtkusers] (no subject) Message-ID: Dear VTK users, how can I transforme an image in bmp format in 16 bit format so that the class volume v16 reader is able to read? Thanks Dario From krishna at lucidindia.net Fri Apr 25 07:22:03 2003 From: krishna at lucidindia.net (KK) Date: Fri, 25 Apr 2003 16:52:03 +0530 Subject: [vtkusers] setting colours to individual cells in the Grid Message-ID: <005d01c30b1c$e5cb94a0$0d01a8c0@c6004> Dear vtk users i'm using vtkStructuredPoints and vtkGeometryFilter to constructuct a grid that contains cells.how can i assign individual properties of the cell(like color and other properties).This may be a simple question question but i'm new to vtk.Could anybody help me? Thanks in advance Rgds krishna -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhou at isg.cs.uni-magdeburg.de Fri Apr 25 08:56:23 2003 From: zhou at isg.cs.uni-magdeburg.de (Jianlong Zhou) Date: Fri, 25 Apr 2003 14:56:23 +0200 Subject: [vtkusers] OpenGl help Message-ID: <3EA94C97.17352.12D3076@localhost> Hi vtk users, I have a maybe stupid probelm but I am not able to solve it. The question is: I have two objects in 3D space, let's say two polygons. These two polygons are overlapping. Let's say the first polygon is red and the other is green. The wished result is to have the overlapping region in brown (that means red+green). How can I do this? I'm able to draw these two polygons at their locations that's no problem - but all I want is to automatically add the color values if they are at the same location! Thanks! Andreas From I.deBoer at polytec.de Fri Apr 25 09:01:54 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Fri, 25 Apr 2003 15:01:54 +0200 Subject: [vtkusers] (no subject) Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3DF@02polywbr.waldbronn.polytec.de> > how can I transforme an image in bmp format in 16 bit format > so that the class volume v16 reader is able to read? ImageMagick can transform almost everything. Maybe it could help you, too. greets Ingo From I.deBoer at polytec.de Fri Apr 25 09:37:19 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Fri, 25 Apr 2003 15:37:19 +0200 Subject: [vtkusers] How do I get with/height from BMPReader? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3E0@02polywbr.waldbronn.polytec.de> Hi, I need the image width and height from my BMPReader object? How can I get it ? I tried the archives and search for Width, Height in the docs, but I didn't find it... GetDataVOI didn't work either. thanks Ingo From Mathieu.Malaterre at creatis.insa-lyon.fr Fri Apr 25 09:39:24 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Fri, 25 Apr 2003 15:39:24 +0200 Subject: [vtkusers] How do I get with/height from BMPReader? In-Reply-To: <1484AEC8AB498A4EB64D4A8137D23FD955F3E0@02polywbr.waldbronn.polytec.de> References: <1484AEC8AB498A4EB64D4A8137D23FD955F3E0@02polywbr.waldbronn.polytec.de> Message-ID: <3EA93A8C.80903@creatis.insa-lyon.fr> Ingo, I don't think you could get a width/height from a bmp file, right ? *BUT* an imagedata has a width/height ! vtkBMPReader->GetOutput()->GetDimensions() mathieu You have just discover the power of vtk and its pipeline filters ! De Boer Ingo wrote: > Hi, > > I need the image width and height from my BMPReader object? > How can I get it ? I tried the archives and search for Width, Height > in the docs, but I didn't find it... GetDataVOI didn't work either. > > thanks > Ingo > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From I.deBoer at polytec.de Fri Apr 25 10:10:07 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Fri, 25 Apr 2003 16:10:07 +0200 Subject: [vtkusers] How do I get with/height from BMPReader? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD93C19C0@02polywbr.waldbronn.polytec.de> Hi, > I don't think you could get a width/height from a bmp > file, right ? > *BUT* an imagedata has a width/height ! Tried that. But idim is {0,0,0} ! greets Ingo // Read bitmap from file vtkBMPReader *pvtkBMPReader = vtkBMPReader::New(); pvtkBMPReader->SetFileName(cStrFilename); int idim[3]; pvtkBMPReader->GetOutput()->GetDimensions(idim); // delete objects pvtkBMPReader->Delete(); From cnavarro at ncsa.uiuc.edu Fri Apr 25 10:22:43 2003 From: cnavarro at ncsa.uiuc.edu (Christopher M. Navarro) Date: Fri, 25 Apr 2003 09:22:43 -0500 (CDT) Subject: [vtkusers] How do I get with/height from BMPReader? In-Reply-To: <1484AEC8AB498A4EB64D4A8137D23FD93C19C0@02polywbr.waldbronn.polytec.de> Message-ID: Hi Ingo, On Fri, 25 Apr 2003, De Boer Ingo wrote: > > Hi, > > > I don't think you could get a width/height from a bmp > > file, right ? > > *BUT* an imagedata has a width/height ! > Tried that. But idim is {0,0,0} ! > > greets > Ingo > > > // Read bitmap from file > vtkBMPReader *pvtkBMPReader = vtkBMPReader::New(); > pvtkBMPReader->SetFileName(cStrFilename); I'd put an update right here because vtk is demand driven: pvtkBMPReader->Update(); > > int idim[3]; > pvtkBMPReader->GetOutput()->GetDimensions(idim); > > // delete objects > pvtkBMPReader->Delete(); > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -chris From winston at cat.rpi.edu Fri Apr 25 10:30:25 2003 From: winston at cat.rpi.edu (Jeremy Winston) Date: Fri, 25 Apr 2003 10:30:25 -0400 Subject: [vtkusers] How do I get with/height from BMPReader? References: <1484AEC8AB498A4EB64D4A8137D23FD93C19C0@02polywbr.waldbronn.polytec.de> Message-ID: <3EA94681.50900@cat.rpi.edu> De Boer Ingo wrote: > > I don't think you could get a width/height from a bmp > > file, right ? *BUT* an imagedata has a width/height ! > > Tried that. But idim is {0,0,0} ! Did you remember to ->Update() your pvtkBMPReader? -Jeremy From I.deBoer at polytec.de Fri Apr 25 10:33:11 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Fri, 25 Apr 2003 16:33:11 +0200 Subject: [vtkusers] How do I get with/height from BMPReader? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD955F3E4@02polywbr.waldbronn.polytec.de> > Did you remember to ->Update() your pvtkBMPReader? With that it works... Thanks to all!! greets Ingo From adada_marwan at hotmail.com Fri Apr 25 10:53:06 2003 From: adada_marwan at hotmail.com (Marwan Adada) Date: Fri, 25 Apr 2003 14:53:06 +0000 Subject: [vtkusers] vtkMarchingCubes Message-ID: Hello, Yes Mathieu you are right I forgot to specify the number of iterations. It's working very well, the volume is smoothed. As for ITK, I am not using it. What's special about it, and how can I get to know more about using it?? Thank you all... Mathiew thanks for forwarding the previous e-mail >From: Mathieu Malaterre >To: Marwan Adada >CC: vtkusers at public.kitware.com >Subject: Re: [vtkusers] vtkMarchingCubes >Date: Thu, 24 Apr 2003 09:38:39 +0200 > >Marwan > I don't know what are you looking for. Anyway with vtkWindowSync... you >forgot to specify the number of iterations. >Try something like: > >vtkWindowedSincPolyDataFilter smooth > smooth SetInput [mcubes GetOutput] > smooth SetNumberOfIterations 50 > smooth BoundarySmoothingOn > smooth SetFeatureAngle 120 > smooth SetEdgeAngle 90 > smooth SetPassBand 0.1 > >vtkPolyDataNormals normals > normals SetInput [smooth GetOutput] > >vtkStripper stripper > stripper SetInput [normals GetOutput] > >vtkPolyDataMapper cylMapper > cylMapper SetInput [stripper GetOutput] > > >--- > Also please note that these filters won't modify the number of edges so if >your mesh is poorly define. Make use of any interpolation filters >(butterfly etc...) > > >yaHTH > >mathieu > >Marwan Adada wrote: >>Hello, >>I tried using these filters but for some reason I am not getting any >>change in the output, my code is: >> >>vtkSmoothPolyDataFilter *Smooth = vtkSmoothPolyDataFilter::New(); >> Smooth->SetInput(mcubes->GetOutput()); >> Smooth->SetNumberOfIterations(10); >> Smooth->SetRelaxationFactor(1); >> Smooth->SetFeatureAngle(0); >> Smooth->FeatureEdgeSmoothingOn(); >> Smooth->BoundarySmoothingOn(); >> Smooth->SetConvergence(0); >> Smooth->ReleaseDataFlagOn(); >> >>Then I tried : >>vtkWindowedSincPolyDataFilter >>*Smooth=vtkWindowedSincPolyDataFilter::New(); >> Smooth->SetInput(mcubes->GetOutput()); >> Smooth->GenerateErrorVectorsOn(); >> Smooth->GenerateErrorScalarsOn(); >> Smooth->Update(); >> >>And still no change, Any Ideas why this is happening?? >>Thanks in Advance... >>Marc, >> >>P.S Thanks Mathieu >> >> >>>From: Mathieu Malaterre >>>To: Marwan Adada >>>CC: vtkusers at public.kitware.com >>>Subject: Re: [vtkusers] vtkMarchingCubes >>>Date: Wed, 23 Apr 2003 20:08:20 +0200 >>> >>>http://www.vtk.org/doc/nightly/html/classvtkSmoothPolyDataFilter.html >>> >>>and >>>http://www.vtk.org/doc/nightly/html/classvtkWindowedSincPolyDataFilter.html >>> >>>the later is not lagrangian -> no shrinkage ! >>> >>>HTH >>>mathieu >>> >>>Marwan Adada wrote: >>> >>>>Hello, >>>>Now I converted my 8bit buffer to a 16bit buffer and sliced it, then >>>>passed it to vtkVolume16Reader and then to marching cubes, and I got the >>>>volume. But my result is not smooth at all, I set the >>>>MarchingCube->ComputeNormalsOn(); and still the result is not smooth. >>>>Is there any filter I can use to smooth the resulting output from >>>>marching cubes?? >>>>Thanks in advance >>>> >>>>Marc >>>> >>>>P.S Thanks james; >>>> >>>>>From: James Dessart >>>>>To: Marwan Adada >>>>>CC: vtkusers at public.kitware.com >>>>>Subject: Re: [vtkusers] vtkMarchingCubes >>>>>Date: Wed, 23 Apr 2003 13:58:55 -0400 (EDT) >>>>> >>>>> >>>>> >>>>>On Wed, 23 Apr 2003, Marwan Adada wrote: >>>>> >>>>> > I have an 8 bit volume data (205x233x251) that I need to pass to >>>>> > vtkMarchingCubes. I tried using vtkImageReader but it seems not to >>>>>work >>>>> > with vtkMarchingCubes. I tried vtkImageData and still couldn't pass >>>>>it to >>>>> > vtkMarchingCubes. I know vtkVolume16Reader works with >>>>>vtkMarchingCubes, but >>>>> > my data 8bits not 16bits. I am wondering what vtk 8bit Readers does >>>>> > vtkMarchingCubes accepts, Any Ideas?? >>>>> >>>>>What you could try would be to read it in as 16-bit values, and run >>>>>marching cubes on that. The values would be between 0-255, as 8-bit >>>>>values generally are, but that shouldn't matter, if you specify your >>>>>threshold for marching cubes properly. >>>>> >>>>>hope that helps, >>>>>James >>>>> >>>> >>>> >>>>_________________________________________________________________ >>>>The new MSN 8: smart spam protection and 2 months FREE* >>>>http://join.msn.com/?page=features/junkmail >>>> >>>>_______________________________________________ >>>>This is the private VTK discussion list. Please keep messages on-topic. >>>>Check the FAQ at: >>>>Follow this link to subscribe/unsubscribe: >>>>http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> >>> >>>-- >>>Mathieu Malaterre >>>CREATIS >>>28 Avenue du Doyen LEPINE >>>B.P. Lyon-Montchat >>>69394 Lyon Cedex 03 >>>http://www.creatis.insa-lyon.fr/~malaterre/ >>> >> >> >>_________________________________________________________________ >>Add photos to your e-mail with MSN 8. Get 2 months FREE*. >>http://join.msn.com/?page=features/featuredemail >> > > >-- >Mathieu Malaterre >CREATIS >28 Avenue du Doyen LEPINE >B.P. Lyon-Montchat >69394 Lyon Cedex 03 >http://www.creatis.insa-lyon.fr/~malaterre/ > _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail From Mathieu.Malaterre at creatis.insa-lyon.fr Fri Apr 25 10:56:35 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Fri, 25 Apr 2003 16:56:35 +0200 Subject: [vtkusers] vtkMarchingCubes In-Reply-To: References: Message-ID: <3EA94CA3.8030508@creatis.insa-lyon.fr> Marwan, I am CCing the vtk list even if I think almost everybody knows about ITK...just in case someone fall asleep ;) The main web site is http://itk.org You'll find there how to download/use/suscribe to mailing list, etc. The main documentation: http://itk.org/ItkSoftwareGuide.pdf Beware: 4517kBytes, more than 300 pages, somewhat the ITK bible. If you are using CVS you'll be able to download the InsightDocuments dir too (lots of very usefull stuff there !). Other than that there are a few applications: http://itk.org/HTML/Applications.htm Which shows -for urged people- what the toolkit can do. ITK was build based on VTK experience, so you won't be in foreign lands. HTH mathieu Marwan Adada wrote: > Hello, > > Yes Mathieu you are right I forgot to specify the number of iterations. > It's working very well, the volume is smoothed. > As for ITK, I am not using it. What's special about it, and how can I > get to know more about using it?? > > Thank you all... > > Mathiew thanks for forwarding the previous e-mail > >> From: Mathieu Malaterre >> To: Marwan Adada >> CC: vtkusers at public.kitware.com >> Subject: Re: [vtkusers] vtkMarchingCubes >> Date: Thu, 24 Apr 2003 09:38:39 +0200 >> >> Marwan >> I don't know what are you looking for. Anyway with >> vtkWindowSync... you forgot to specify the number of iterations. >> Try something like: >> >> vtkWindowedSincPolyDataFilter smooth >> smooth SetInput [mcubes GetOutput] >> smooth SetNumberOfIterations 50 >> smooth BoundarySmoothingOn >> smooth SetFeatureAngle 120 >> smooth SetEdgeAngle 90 >> smooth SetPassBand 0.1 >> >> vtkPolyDataNormals normals >> normals SetInput [smooth GetOutput] >> >> vtkStripper stripper >> stripper SetInput [normals GetOutput] >> >> vtkPolyDataMapper cylMapper >> cylMapper SetInput [stripper GetOutput] >> >> >> --- >> Also please note that these filters won't modify the number of >> edges so if your mesh is poorly define. Make use of any interpolation >> filters (butterfly etc...) >> >> >> yaHTH >> >> mathieu >> >> Marwan Adada wrote: >> >>> Hello, >>> I tried using these filters but for some reason I am not getting any >>> change in the output, my code is: >>> >>> vtkSmoothPolyDataFilter *Smooth = vtkSmoothPolyDataFilter::New(); >>> Smooth->SetInput(mcubes->GetOutput()); >>> Smooth->SetNumberOfIterations(10); >>> Smooth->SetRelaxationFactor(1); >>> Smooth->SetFeatureAngle(0); >>> Smooth->FeatureEdgeSmoothingOn(); >>> Smooth->BoundarySmoothingOn(); >>> Smooth->SetConvergence(0); >>> Smooth->ReleaseDataFlagOn(); >>> >>> Then I tried : >>> vtkWindowedSincPolyDataFilter >>> *Smooth=vtkWindowedSincPolyDataFilter::New(); >>> Smooth->SetInput(mcubes->GetOutput()); >>> Smooth->GenerateErrorVectorsOn(); >>> Smooth->GenerateErrorScalarsOn(); >>> Smooth->Update(); >>> >>> And still no change, Any Ideas why this is happening?? >>> Thanks in Advance... >>> Marc, >>> >>> P.S Thanks Mathieu >>> >>> >>>> From: Mathieu Malaterre >>>> To: Marwan Adada >>>> CC: vtkusers at public.kitware.com >>>> Subject: Re: [vtkusers] vtkMarchingCubes >>>> Date: Wed, 23 Apr 2003 20:08:20 +0200 >>>> >>>> http://www.vtk.org/doc/nightly/html/classvtkSmoothPolyDataFilter.html >>>> >>>> and >>>> http://www.vtk.org/doc/nightly/html/classvtkWindowedSincPolyDataFilter.html >>>> >>>> >>>> the later is not lagrangian -> no shrinkage ! >>>> >>>> HTH >>>> mathieu >>>> >>>> Marwan Adada wrote: >>>> >>>>> Hello, >>>>> Now I converted my 8bit buffer to a 16bit buffer and sliced it, >>>>> then passed it to vtkVolume16Reader and then to marching cubes, and >>>>> I got the volume. But my result is not smooth at all, I set the >>>>> MarchingCube->ComputeNormalsOn(); and still the result is not smooth. >>>>> Is there any filter I can use to smooth the resulting output from >>>>> marching cubes?? >>>>> Thanks in advance >>>>> >>>>> Marc >>>>> >>>>> P.S Thanks james; >>>>> >>>>>> From: James Dessart >>>>>> To: Marwan Adada >>>>>> CC: vtkusers at public.kitware.com >>>>>> Subject: Re: [vtkusers] vtkMarchingCubes >>>>>> Date: Wed, 23 Apr 2003 13:58:55 -0400 (EDT) >>>>>> >>>>>> >>>>>> >>>>>> On Wed, 23 Apr 2003, Marwan Adada wrote: >>>>>> >>>>>> > I have an 8 bit volume data (205x233x251) that I need to pass to >>>>>> > vtkMarchingCubes. I tried using vtkImageReader but it seems not >>>>>> to work >>>>>> > with vtkMarchingCubes. I tried vtkImageData and still couldn't >>>>>> pass it to >>>>>> > vtkMarchingCubes. I know vtkVolume16Reader works with >>>>>> vtkMarchingCubes, but >>>>>> > my data 8bits not 16bits. I am wondering what vtk 8bit Readers >>>>>> does >>>>>> > vtkMarchingCubes accepts, Any Ideas?? >>>>>> >>>>>> What you could try would be to read it in as 16-bit values, and run >>>>>> marching cubes on that. The values would be between 0-255, as 8-bit >>>>>> values generally are, but that shouldn't matter, if you specify your >>>>>> threshold for marching cubes properly. >>>>>> >>>>>> hope that helps, >>>>>> James >>>>>> >>>>> >>>>> >>>>> _________________________________________________________________ >>>>> The new MSN 8: smart spam protection and 2 months FREE* >>>>> http://join.msn.com/?page=features/junkmail >>>>> >>>>> _______________________________________________ >>>>> This is the private VTK discussion list. Please keep messages >>>>> on-topic. Check the FAQ at: >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> >>>> >>>> -- >>>> Mathieu Malaterre >>>> CREATIS >>>> 28 Avenue du Doyen LEPINE >>>> B.P. Lyon-Montchat >>>> 69394 Lyon Cedex 03 >>>> http://www.creatis.insa-lyon.fr/~malaterre/ >>>> >>> >>> >>> _________________________________________________________________ >>> Add photos to your e-mail with MSN 8. Get 2 months FREE*. >>> http://join.msn.com/?page=features/featuredemail >>> >> >> >> -- >> Mathieu Malaterre >> CREATIS >> 28 Avenue du Doyen LEPINE >> B.P. Lyon-Montchat >> 69394 Lyon Cedex 03 >> http://www.creatis.insa-lyon.fr/~malaterre/ >> > > > _________________________________________________________________ > Tired of spam? Get advanced junk mail protection with MSN 8. > http://join.msn.com/?page=features/junkmail > -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From krishna at lucidindia.net Fri Apr 25 11:16:41 2003 From: krishna at lucidindia.net (KK) Date: Fri, 25 Apr 2003 20:46:41 +0530 Subject: [vtkusers] Volume Mapping Message-ID: <003b01c30b3d$ace73510$0d01a8c0@c6004> hi all please colud anybody llok into the following code and tell me where the error exactly is. I took most of the following code from the Python example vtk42\Examples\VolumeRendering\Python\SimpleRayCast.py The only change is instead of vtkStructuredPointsReader i'm using vtkStructuredPoints void VolumeMapper(void) { // Create the standard renderer, render window and interactor vtkRenderer *ren = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); vtkStructuredPoints *sp = vtkStructuredPoints::New(); sp->SetDimensions(5, 5, 5); sp->SetOrigin(0, 0, 0); sp->SetSpacing(2, 2, 2); vtkUnsignedIntArray *scalars = vtkUnsignedIntArray::New(); scalars->SetNumberOfTuples(1); scalars->SetNumberOfValues(64); for (int i=0; i< 64; i++) { scalars->SetValue(i,125); } sp->GetCellData()->SetScalars(scalars); // Create transfer mapping scalar value to opacity vtkPiecewiseFunction *opacityTransferFunction = vtkPiecewiseFunction::New(); opacityTransferFunction->AddPoint(20, 0.0); opacityTransferFunction->AddPoint(255, 0.2); //# Create transfer mapping scalar value to color vtkColorTransferFunction *colorTransferFunction = vtkColorTransferFunction::New(); colorTransferFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(64.0, 1.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(128.0, 0.0, 0.0, 1.0); colorTransferFunction->AddRGBPoint(192.0, 0.0, 1.0, 0.0); colorTransferFunction->AddRGBPoint(255.0, 0.0, 0.2, 0.0); // The property describes how the data will look vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New(); volumeProperty->SetColor(colorTransferFunction); volumeProperty->SetScalarOpacity(opacityTransferFunction); volumeProperty->ShadeOn(); //volumeProperty->SetInterpolationTypeToLinear(); // The mapper / ray cast function know how to render the data vtkVolumeRayCastCompositeFunction *compositeFunction = vtkVolumeRayCastCompositeFunction::New(); vtkVolumeRayCastMapper *volumeMapper = vtkVolumeRayCastMapper::New(); volumeMapper->SetVolumeRayCastFunction(compositeFunction); volumeMapper->SetInput(sp); ----------------------------------->//here is the change from python code // The volume holds the mapper and the property and // can be used to position/orient the volume vtkVolume *volume = vtkVolume::New(); volume->SetMapper(volumeMapper); volume->SetProperty(volumeProperty); ren->AddVolume(volume); ren->SetBackground(1, 1, 1); //renWin->SetSize(600, 600); //renWin->Render(); //renWin.AddObserver("AbortCheckEvent", CheckAbort) //vtkActor *actor2 = vtkActor::New(); //actor2->SetMapper(volumeMapper); //ren->AddActor(actor2); int ipen = renWin->GetEventPending(); iren->Initialize(); renWin->Render(); iren->Start(); ren->Delete(); renWin->Delete(); iren->Delete(); opacityTransferFunction->Delete(); colorTransferFunction->Delete(); volumeProperty->Delete(); compositeFunction->Delete(); volumeMapper->Delete(); volume->Delete(); sp->Delete(); scalars->Delete(); } thanks in advance rgds krishna -------------- next part -------------- An HTML attachment was scrubbed... URL: From ViswanadhaReddy.P at geind.ge.com Fri Apr 25 11:35:27 2003 From: ViswanadhaReddy.P at geind.ge.com (P, ViswanadhaReddy (CORP, GEITC)) Date: Fri, 25 Apr 2003 21:05:27 +0530 Subject: [vtkusers] Large Volume Data Message-ID: <5BE159250B76344B9E60D32AFA6C865B02C015A1@BANMLVEM01.e2k.ad.ge.com> Hi All, I am a beginner in VTK Programming. My data set consists of 1500 Slices of 1024x1024 raw images. I do not intend to visualize such a large volume but a subsampled version of it. I could visualize such only 300 slices at a time of original size. Is there a way to view the subsampled volume in VTK? Thanks in advance. Best, Vishwa -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jonathan.Bailleul at greyc.ismra.fr Fri Apr 25 11:46:07 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Fri, 25 Apr 2003 17:46:07 +0200 Subject: [vtkusers] How to determine wether a given point is visible or not? Message-ID: <3EA9583F.5ECA5E4E@greyc.ismra.fr> Dear all, I am looking for a way to visualize a 3d shape whose vertices would be annotated by their respective number in the vtk file. The way I implemented this feature consisted in retrieving the 3d world coordinates of every point, then their 2d projections, and to finally display 2d actors labels at every location when a key is pressed. There are 2 major drawbacks of this approach: - labels do not move with the object actor: they are not glyphs. But that's ok anyway. - I get the labels of points from the other side of the object, wich tends to make the display hard to read. To overcome the latter drawback, is there a way to determine wether a given point is visible or not? I've looked over the documentation without result until now... Thanks in advance! -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From sakumar79 at hotmail.com Fri Apr 25 13:40:22 2003 From: sakumar79 at hotmail.com (Arun Srinivasan) Date: Fri, 25 Apr 2003 12:40:22 -0500 Subject: [vtkusers] Questions regarding vtkRenderWindow and vtkRenderWindowInteractor Message-ID: Hi, I am learning VTK and I have a couple of questions regarding vtkRenderWindow and vtkRenderWindowInteractor. 1. In vtkRenderWindow, there is a function SetWindowId to set the render window to an existing window. However, the parameter is void *. Glut returns an integer for glutGetWindow(). Can I use the integer to get the render window to use an existing glut window? 2. When I use vtkRenderWindowInteractor, is it possible to force the render window to refresh regularly? There seems to be a function called SetStillUpdateRate, but it appears to be for LODActors. I am using regular actors but I want the window to refresh regularly based on external environmental variables even if it is not in focus or being interacted with... Thanks in advance, Arun _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From zxem at my169.com Fri Apr 25 15:44:08 2003 From: zxem at my169.com (Xin Zhao) Date: Fri, 25 Apr 2003 19:44:8 +0000 Subject: [vtkusers] Help! Set path and classpath? Message-ID: Dear all, I use JCreator 2.5. I set the enviroment parameters in path or classpath for VTK. In JCreator, I choosed Configure -- Options -- JDK profiles -- j2sdk1.4.01 -- Edit -- Classes -- Add Archive -- e:\vtk422\bin\vtk.jar. And I set the e:\vtk422\bin to my system path.(In dos window, "Path" command, I checked it.) But when I run the example TestVTKCanvas.java. When I compiled it, it is ok. At run time, there is a error message: "Exception in thread "main" java.lang.UnsatisfiedLinkError: E:\vtk422\bin\vtkRend eringJava.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:832) at vtkPanel.(vtkPanel.java:31) at TestVTKCanvas.(TestVTKCanvas.java:11) at TestVTKCanvas.main(TestVTKCanvas.java:29) Press any key to continue..." What is the problem? Thanks! Xin Zhao From zsolt at simbiosys.ca Fri Apr 25 15:27:23 2003 From: zsolt at simbiosys.ca (Zsolt Zsoldos) Date: Fri, 25 Apr 2003 15:27:23 -0400 Subject: [vtkusers] How to use internal classes without all the auto-generated code ? Message-ID: <20030425192723.45A591029@saturn.simbiosys.ca> Hi All, I've been using VTK 3.2 for a long while and now trying to upgrade to 4.2. I have a fairly complex extra class added which is a PolyData to PolyData filter. The code of this filter is implemented using several internal classes, because of the complexity of the algorithm. The total code is several thousands of lines, so it would be very impracticle to keep it in a single class or single compilation unit. The internal classes do not inherit from VtkObject, there is no point having them so (extra size and time to construct, destruct it when used many times internally). I have managed to get it compiled and used from Java under 3.2, although I had to "clear" soem auto-generated wrapper files which used to be generated with an error message inside. Now, with 4.2 version, my problem is, that there are other auto-generated references to it, e.g. vtkInstatiator* creates references to *New which then becomes an unresolved reference at link time. Under 3.2 I just added my files into the contrib directory and listed them in the Makefile.in. How can I add my own contributed class in such way that only 1 of them is exposed and "visible" as a proper vtk object, but the other clases (that implement internal implementation details only and should not be visible outside) do not get all the auto-generated wrapper stuff for Java ? Thanks in advance, -- Zsolt Zsoldos, zsolt at simbiosys.ca, http://www.simbiosys.ca/ From malcolm at geovision.co.za Fri Apr 25 15:55:18 2003 From: malcolm at geovision.co.za (Malcolm Drummond) Date: Fri, 25 Apr 2003 21:55:18 +0200 Subject: [vtkusers] How to determine wether a given point is visible or not? References: <3EA9583F.5ECA5E4E@greyc.ismra.fr> Message-ID: <002901c30b65$ccf8dd90$adf4fea9@bart> Hi Jonathan You can use vtkSelectVisiblePoints. There's a labeledMesh example in examples/annotation that does pretty much what you want. HTH Malcolm ----- Original Message ----- From: "Jonathan Bailleul" To: "VTK-User" Sent: Friday, April 25, 2003 5:46 PM Subject: [vtkusers] How to determine wether a given point is visible or not? > Dear all, > > I am looking for a way to visualize a 3d shape whose vertices would be > annotated by their respective number in the vtk file. The way I > implemented this feature consisted in retrieving the 3d world > coordinates of every point, then their 2d projections, and to finally > display 2d actors labels at every location when a key is pressed. > > There are 2 major drawbacks of this approach: > - labels do not move with the object actor: they are not glyphs. But > that's ok anyway. > - I get the labels of points from the other side of the object, wich > tends to make the display hard to read. > > > To overcome the latter drawback, is there a way to determine wether a > given point is visible or not? > I've looked over the documentation without result until now... > > Thanks in advance! > > > -- > ----------------------------------- > Jonathan BAILLEUL, Doctorant > GREYC Image - Universit? de Caen > http://www.greyc.ismra.fr/~bailleul > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From brad.king at kitware.com Fri Apr 25 17:01:34 2003 From: brad.king at kitware.com (Brad King) Date: Fri, 25 Apr 2003 17:01:34 -0400 (EDT) Subject: [vtkusers] How to use internal classes without all the auto-generated code ? In-Reply-To: <20030425192723.45A591029@saturn.simbiosys.ca> Message-ID: > Now, with 4.2 version, my problem is, that there are other > auto-generated references to it, e.g. vtkInstatiator* creates > references to *New which then becomes an unresolved reference at link > time. Add this to your cmake code: SET_SOURCE_FILES_PROPERTIES(vtkMyHelperClass.cxx WRAP_EXCLUDE) -Brad From scharver at evl.uic.edu Fri Apr 25 18:33:16 2003 From: scharver at evl.uic.edu (Chris Scharver) Date: Fri, 25 Apr 2003 17:33:16 -0500 Subject: [vtkusers] Create surface from isolines? Message-ID: Hello, I have applied vtkClipPolyData to perform clipping on a polygonal bone cross-section. I need to figure out a way to cap the edges so that the "interior" is not visible. It's a needed work-around until everything is moved to volumetric data. The approach used for ClipCow.tcl won't work. I have two clipped surfaces (one is the outside surface, the other is the inside surface... but in between is nothing). I have applied a vtkCutter to get the lines defining the clipped edges. After its application, I really just have two isolines between which I need to create a surface band. Given two isolines, is there a pipeline I could use to generate the polygons for the band between them? Basically something like a single band from the bandContourterrain.tcl example. The problem is that I don't have surface polyData with which to start. vtkSurfaceReconstructionFilter won't quite do it since it assumes the generation of a closed solid. I want only that edge band. It also create a very strange surface when passing the lines. Any ideas or suggestions? Thanks, Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 From c.p.botha at its.tudelft.nl Fri Apr 25 19:04:16 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Sat, 26 Apr 2003 01:04:16 +0200 Subject: [vtkusers] Create surface from isolines? In-Reply-To: References: Message-ID: <20030425230416.GA17157@dutidad.twi.tudelft.nl> On Fri, Apr 25, 2003 at 05:33:16PM -0500, Chris Scharver wrote: > get the lines defining the clipped edges. After its application, I really > just have two isolines between which I need to create a surface band. Given > two isolines, is there a pipeline I could use to generate the polygons for vtkRuledSurfaceFilter could do the trick if I understand your explanation correctly. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From scharver at evl.uic.edu Fri Apr 25 20:21:57 2003 From: scharver at evl.uic.edu (Chris Scharver) Date: Fri, 25 Apr 2003 19:21:57 -0500 Subject: [vtkusers] Create surface from isolines? In-Reply-To: <20030425230416.GA17157@dutidad.twi.tudelft.nl> References: <20030425230416.GA17157@dutidad.twi.tudelft.nl> Message-ID: At 1:04 AM +0200 04/26/2003, Charl P. Botha wrote: >vtkRuledSurfaceFilter could do the trick if I understand your explanation >correctly. Aha! Thank you for pointing me in exactly the right direction! This was just where I need to go! I had to fix the ordering, so here's what else I did... I am trying to avoid resampling as much as possible. The lines for vtkRuledSurfaceFilter need to have an equal number of points, so I had to make a concession there. The output from vtkCutter is broken into separate lines, so I added vtkStripper to merge them together. Because the clipped lines were made separately, they are not correctly aligned for use by vtkRuledSurfaceFilter. However, the visual result indicated that I could cheat by flipping the ordering for one of the lines. I had to fudge things by using vtkPolyData::reverseSense(). I have a beautiful, solidly clipped object now! I'll try to clean up my code to contribute in case others may find it to be a useful example. I less kludgy approach would involve sorting the points of the lines so they align properly when applying the filter. I'll have to check to see how well I can manage using vtkDepthSortPolyData to do just that. Thanks tremendously! Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 From krishna at lucidindia.net Sat Apr 26 03:24:24 2003 From: krishna at lucidindia.net (KK) Date: Sat, 26 Apr 2003 12:54:24 +0530 Subject: [vtkusers] Unknown CMake command "VTK_MAKE_INSTANTIATOR2" Message-ID: <001601c30bc4$dd0b32a0$0d01a8c0@c6004> Hi all i have downloaded source code from vtk site and i'm trying to build the library's from the code.While using CMakesetup to create files it's giving the error Unknown CMake command "VTK_MAKE_INSTANTIATOR2" it's coming on all the folders.Could anybody please help me? Thanks in advance Rgds Krishna -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.p.botha at its.tudelft.nl Sat Apr 26 05:42:05 2003 From: c.p.botha at its.tudelft.nl (Charl P. Botha) Date: Sat, 26 Apr 2003 11:42:05 +0200 Subject: [vtkusers] Create surface from isolines? In-Reply-To: References: <20030425230416.GA17157@dutidad.twi.tudelft.nl> Message-ID: <20030426094205.GA18665@dutidad.twi.tudelft.nl> On Fri, Apr 25, 2003 at 07:21:57PM -0500, Chris Scharver wrote: > I am trying to avoid resampling as much as possible. The lines for > vtkRuledSurfaceFilter need to have an equal number of points, so I had to Okay. The ruled surface resampling does yield very attractive results though. > Thanks tremendously! It's a pleasure! Periodically, I go down the whole list of VTK classes in the CVS repository and make sure I have an idea what each one does. One doesn't remember everything, but once a problem presents itself, one has a good idea where to start digging. Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From a.umpleby at imperial.ac.uk Sun Apr 27 10:09:27 2003 From: a.umpleby at imperial.ac.uk (Adrian Umpleby) Date: Sun, 27 Apr 2003 15:09:27 +0100 Subject: [vtkusers] new user attempting install on mac OSX In-Reply-To: <94C83F60-74B4-11D7-AB10-0003935A86C6@lmu.de> Message-ID: Hi again, I've been away for nearly a week, so apologies for the delay... >> Can you 'gdb' that to get a stack trace? > > so this is what gdb tells me when importing mayavi with the python > interpreter. > > (~) % gdb /Applications/Python.app/Contents/MacOS/python > ... > >>> import Tkinter Do you need to import Tkinter before mayavi? -I know I don't (though it does not appear to matter if I do import it first)... > ... > (gdb) bt > > [...] The actual 'crash location' can best be seen from those first lines that you skipped. > #4170 0x003d1670 in PyEval_EvalCodeEx (co=0x7a4e40, globals=0x42, > locals=0x90004a44, args=0x3, argcount=0, kws=0x0, kwcount=0, defs=0x0, > defcount=0, closure=0x0) at Python/ceval.c:2595 > #4171 0x003d4194 in PyEval_EvalCode (co=0x5e010, globals=0x42, > locals=0x28022248) at Python/ceval.c:481 > #4172 0x003f28cc in PyImport_ExecCodeModuleEx (name=0x311b68 "Z\035", > co=0x7a4e40, pathname=0x8b6f0 "") at Python/import.c:505 > #4173 0x003f56a0 in load_source_module (name=0x0, pathname=0xbfffcec0 > "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site- > packages/mayavi/Common.pyc", fp=0x44dba0) at Python/import.c:787 > #4174 0x003f30fc in load_module (name=0xbfffd880 "mayavi.Common", > fp=0xa0006ba0, buf=0xbfffd380 > "/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/site- > packages/mayavi/Common.py", type=-2139062144) at Python/import.c:1371 > #4175 0x003f41bc in import_submodule (mod=0x91820, subname=0x83 >
, fullname=0xbfffd880 "mayavi.Common") at > Python/import.c:1910 > ... Having said that, I'm not sure I really have any idea where to start looking for the problem... Does it give a similar crash if you just import Common from mayavi, instead of importing mayavi as a whole: from mayavi import Common >> So you don't find it hangs when you try to 'import vtk' in python? Or >> 'package require vtk' in tclsh? >> > no hangs! Curious! IIRC, you compiled it all in the same way as myself (Carbon, Python+Tcl wrapping), except for adding the Java wrapping (maybe I'll have to try adding that...) It's looking like the problems you're having are not specifically to do with VTK. >> Where (and when) did you get Tkinter for Aqua? > > i mean i have Tcl/TkAqua working with Tkinter. following the > instructions found at > http://www.astro.washington.edu/owen/InstallingPythonOnJaguar.html I'll check that, thanks! Adrian From a.maclean at cas.edu.au Sun Apr 27 23:20:27 2003 From: a.maclean at cas.edu.au (Andrew J. P. Maclean) Date: Mon, 28 Apr 2003 13:20:27 +1000 Subject: [vtkusers] VTK/TCL and GUI editors Message-ID: <010801c30d35$20b0eec0$a3d24e81@acfr.usyd.edu.au> 1) Has anyone managed to use Visual TCL with VTK? If I source anything with vtk in it seems to be unable to load it. 2) What do people use? I tried ConTEXT - this is just a syntax highlighter, and I have looked at Komodo, but it seems that if you use TCL you have to buy the ActiveState version. ___________________________________________ Andrew J. P. Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney 2006 NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: http://www.cas.edu.au/ ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From siebert at onco.uni-kiel.de Mon Apr 28 02:28:33 2003 From: siebert at onco.uni-kiel.de (=?iso-8859-1?Q?Frank-Andr=E9_Siebert?=) Date: Mon, 28 Apr 2003 08:28:33 +0200 Subject: AW: [vtkusers] VTK/TCL and GUI editors Message-ID: <2A357C816A86D3499AF8236DD7912C4F074F3B@oncomail.onco.uni-kiel.de> Hi, I am using ConTEXT 0.97.2a and it is a nice working with it. You can expand the highlighter to your desires, for example with vtk-classes or -methods. The only thing I am missing is a tcl/tk- + vtk-debugger. So I have to go on with the tk_messageBox -message $myVariable. Bye Frank-Andr? -----Urspr?ngliche Nachricht----- Von: Andrew J. P. Maclean [mailto:a.maclean at cas.edu.au] Gesendet: Montag, 28. April 2003 05:20 An: vtkusers at public.kitware.com Betreff: [vtkusers] VTK/TCL and GUI editors 1) Has anyone managed to use Visual TCL with VTK? If I source anything with vtk in it seems to be unable to load it. 2) What do people use? I tried ConTEXT - this is just a syntax highlighter, and I have looked at Komodo, but it seems that if you use TCL you have to buy the ActiveState version. ___________________________________________ Andrew J. P. Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney 2006 NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: http://www.cas.edu.au/ ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From asiram00 at hotmail.com Mon Apr 28 04:54:31 2003 From: asiram00 at hotmail.com (marisa aurelio) Date: Mon, 28 Apr 2003 08:54:31 +0000 Subject: [vtkusers] urgent doubt!!!!! Message-ID: Hi vtkUsers, I have this piece of code: vtkDelaunay3D *del = vtkDelaunay3D::New(); del->SetInput(profile); del->SetTolerance(0.05); del->SetAlpha(0.05); del->BoundingTriangulationOff(); vtkPolyDataMapper *map = vtkPolyDataMapper::New(); map->SetInput(del->GetOutput());*/ vtkDataSetMapper *map = vtkDataSetMapper::New(); map->SetInput(del->GetOutput()); (here is the error) But I have an error: error C2664: 'SetInput' : cannot convert parameter 1 from 'class vtkUnstructuredGrid *' to 'class vtkDataSet *' How can I do it??? Thanks Marisa _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From ramakrishna.prakash at quest-global.com Mon Apr 28 05:06:50 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Mon, 28 Apr 2003 14:36:50 +0530 Subject: [vtkusers] urgent doubt!!!!! In-Reply-To: Message-ID: <000f01c30d65$81d14760$de0ba8c0@qtwblr01.questglobal.com> you should type cast the data explicitly. vtkDataSet *dataset = (vtkDataSet)del->GetOutput(); vtkDataSetMapper *map = vtkDataSetMapper::New(); map->SetInput(dataset); I think this should work. regards shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of marisa aurelio Sent: Monday, April 28, 2003 2:25 PM To: vtkusers at public.kitware.com Subject: [vtkusers] urgent doubt!!!!! Hi vtkUsers, I have this piece of code: vtkDelaunay3D *del = vtkDelaunay3D::New(); del->SetInput(profile); del->SetTolerance(0.05); del->SetAlpha(0.05); del->BoundingTriangulationOff(); vtkPolyDataMapper *map = vtkPolyDataMapper::New(); map->SetInput(del->GetOutput());*/ vtkDataSetMapper *map = vtkDataSetMapper::New(); map->SetInput(del->GetOutput()); (here is the error) But I have an error: error C2664: 'SetInput' : cannot convert parameter 1 from 'class vtkUnstructuredGrid *' to 'class vtkDataSet *' How can I do it??? Thanks Marisa _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From krishna at lucidindia.net Mon Apr 28 05:13:19 2003 From: krishna at lucidindia.net (KK) Date: Mon, 28 Apr 2003 14:43:19 +0530 Subject: [vtkusers] vtkLookupTable Message-ID: <000a01c30d66$68e50290$0d01a8c0@c6004> hi all how to use vtkLookupTable and vtkScalarBarActor with vtkVolume class? Rgds Krishna From jeff at cdnorthamerica.com Mon Apr 28 06:15:55 2003 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Mon, 28 Apr 2003 06:15:55 -0400 Subject: [vtkusers] Create surface from isolines? In-Reply-To: References: <20030425230416.GA17157@dutidad.twi.tudelft.nl> Message-ID: <3EACFF5B.5010004@cdnorthamerica.com> Are you trying to do contour banding? If so, there is a filter vtkBandedPolyDataContourFilter which does this. -Jeff Chris Scharver wrote: >At 1:04 AM +0200 04/26/2003, Charl P. Botha wrote: > > >>vtkRuledSurfaceFilter could do the trick if I understand your explanation >>correctly. >> >> > >Aha! Thank you for pointing me in exactly the right direction! This was just where I need to go! I had to fix the ordering, so here's what else I did... > >I am trying to avoid resampling as much as possible. The lines for vtkRuledSurfaceFilter need to have an equal number of points, so I had to make a concession there. The output from vtkCutter is broken into separate lines, so I added vtkStripper to merge them together. Because the clipped lines were made separately, they are not correctly aligned for use by vtkRuledSurfaceFilter. However, the visual result indicated that I could cheat by flipping the ordering for one of the lines. I had to fudge things by using vtkPolyData::reverseSense(). I have a beautiful, solidly clipped object now! I'll try to clean up my code to contribute in case others may find it to be a useful example. > >I less kludgy approach would involve sorting the points of the lines so they align properly when applying the filter. I'll have to check to see how well I can manage using vtkDepthSortPolyData to do just that. > >Thanks tremendously! >Chris >-- >Chris Scharver >Electronic Visualization Laboratory >The University of Illinois at Chicago >Ph: 312-996-3002 FAX: 312-413-7585 > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- Jeff Lee Software Engineer Computational Dynamics North America Ltd 21 Lafayette Street, Suite 230 Lebanon NH 03766 USA fax: 603 643 9994 phone: 603 643 9993 x109 http://www.cd-adapco.com From mkon2233 at mail.usyd.edu.au Mon Apr 28 08:33:51 2003 From: mkon2233 at mail.usyd.edu.au (Matthew Kong) Date: Mon, 28 Apr 2003 22:33:51 +1000 Subject: [vtkusers] vtkVRMLimporter Message-ID: <1051533231.3ead1faf8339e@www-mail.usyd.edu.au> Im trying to use the vtkVRMLimporter function. Im using C++ to program it, but im trying to follow the TCL example. Im not sure what the following code in TCL is translated c++. [importer GetRenderer] SetBackground 0.1 0.2 0.4 [importer GetRenderWindow] SetSize 300 300 # the importer created the renderer set renCollection [renWin GetRenderers] $renCollection InitTraversal set ren [$renCollection GetNextItem] $ren ResetCamera [$ren GetActiveCamera] Dolly 1.75 ren1 ResetCameraClippingRange # render the image # iren AddObserver UserEvent {wm deiconify .vtkInteract} iren Initialize wm withdraw . Can anyone help please? Does anyone have any sample code in using the VRMLimporter for C++? Cheers Matt ------------------------------------------------- This mail sent through IMP: www-mail.usyd.edu.au From ramakrishna.prakash at quest-global.com Mon Apr 28 08:50:02 2003 From: ramakrishna.prakash at quest-global.com (R K Shyamprakash) Date: Mon, 28 Apr 2003 18:20:02 +0530 Subject: [vtkusers] vtkVRMLimporter In-Reply-To: <1051533231.3ead1faf8339e@www-mail.usyd.edu.au> Message-ID: <001001c30d84$b02d5170$de0ba8c0@qtwblr01.questglobal.com> vtkVRMLImporter *importer = vtkVRMLImporter::New(); importer->SetRenderWindow(renWin); //renwin is renderer window importer->SetFileName("filename.wrl"); importer->Read(); .... .... ....follow usual graphics stuff I translated my Java program into c++ program. i feel it should work. regards Shyam -----Original Message----- From: vtkusers-admin at public.kitware.com [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Matthew Kong Sent: Monday, April 28, 2003 6:04 PM To: vtkusers at public.kitware.com Subject: [vtkusers] vtkVRMLimporter Im trying to use the vtkVRMLimporter function. Im using C++ to program it, but im trying to follow the TCL example. Im not sure what the following code in TCL is translated c++. [importer GetRenderer] SetBackground 0.1 0.2 0.4 [importer GetRenderWindow] SetSize 300 300 # the importer created the renderer set renCollection [renWin GetRenderers] $renCollection InitTraversal set ren [$renCollection GetNextItem] $ren ResetCamera [$ren GetActiveCamera] Dolly 1.75 ren1 ResetCameraClippingRange # render the image # iren AddObserver UserEvent {wm deiconify .vtkInteract} iren Initialize wm withdraw . Can anyone help please? Does anyone have any sample code in using the VRMLimporter for C++? Cheers Matt ------------------------------------------------- This mail sent through IMP: www-mail.usyd.edu.au _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From jeff at cdnorthamerica.com Mon Apr 28 10:16:38 2003 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Mon, 28 Apr 2003 10:16:38 -0400 Subject: [vtkusers] shrinking an image Message-ID: <3EAD37C6.6040805@cdnorthamerica.com> Hi, What is the best way to shrink an image and not end up with blurry edges? My current pipeline is vtkWindowToImageFilter->vtkImageShrink3D->vtkPNGWriter, from there I get the output bytes and display it in an icon. tia, -Jeff From dariooliviero at libero.it Mon Apr 28 10:25:31 2003 From: dariooliviero at libero.it (=?iso-8859-1?Q?dariooliviero@libero.it?=) Date: Mon, 28 Apr 2003 16:25:31 +0200 Subject: [vtkusers] =?iso-8859-1?Q?16_bit_Images?= Message-ID: Dear VTK User, I'm trying to make function the medical examples, using some slices obtained from CT scanner, I converted the images with Adobe Photoshop, in gray scale and after in 16 bit, and I saved it in raw format. When I make running the program, I can see only a white box, why? Somebody can help me??? Thanks Dario From matei.mancas at tcts.fpms.ac.be Mon Apr 28 10:38:31 2003 From: matei.mancas at tcts.fpms.ac.be (Matei MANCAS) Date: Mon, 28 Apr 2003 16:38:31 +0200 Subject: [vtkusers] 16 bit Images References: Message-ID: <02ee01c30d93$d7384a90$0f0910ac@Surprise> Hi dario!!!! You have now a 16 bits image and you can see only 8 bits.... So you should use vtkImageShiftScale to look to an 8 bits grey window.... you have to use the SetScale method : vtkImageShiftScale* scale = vtkImageShiftScale::New(); scale->SetScale(1/N); N should be 256....else you should try other values (16) if data have in fact 12 bits... But I think it should be 256! Matei ----- Original Message ----- From: To: "vtkusers" Sent: Monday, April 28, 2003 4:25 PM Subject: [vtkusers] 16 bit Images Dear VTK User, I'm trying to make function the medical examples, using some slices obtained from CT scanner, I converted the images with Adobe Photoshop, in gray scale and after in 16 bit, and I saved it in raw format. When I make running the program, I can see only a white box, why? Somebody can help me??? Thanks Dario _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From I.deBoer at polytec.de Mon Apr 28 10:52:55 2003 From: I.deBoer at polytec.de (De Boer Ingo) Date: Mon, 28 Apr 2003 16:52:55 +0200 Subject: [vtkusers] Edges don't get colored ?! Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD93C19C1@02polywbr.waldbronn.polytec.de> Hi, I use the edge extractor filter, but when I set the color of my corresponding actor, the edges don't chance the color? Am I missing something ? greets Ingo // create an EdgeExtractor vtkFeatureEdges *pvtkFeatureEdges = vtkFeatureEdges::New(); pvtkFeatureEdges->SetInput(pvtkPolyData); pvtkFeatureEdges->ColoringOn(); pvtkFeatureEdges->BoundaryEdgesOn(); pvtkFeatureEdges->ManifoldEdgesOn(); pvtkFeatureEdges->NonManifoldEdgesOn(); // create mapper vtkPolyDataMapper *pvtkPolyDataMapper = vtkPolyDataMapper::New(); pvtkPolyDataMapper->SetInput(pvtkFeatureEdges->GetOutput()); pvtkPolyDataMapper->SetResolveCoincidentTopologyToPolygonOffset(); // set actor m_pvtkActorEdges->SetMapper(pvtkPolyDataMapper); m_pvtkActorEdges->GetProperty()->SetColor(0, 0, 0.5); m_pvtkActorEdges->VisibilityOn(); // delete objects pvtkFeatureEdges->Delete(); pvtkPolyDataMapper->Delete(); From TDeschamps at lbl.gov Mon Apr 28 11:03:09 2003 From: TDeschamps at lbl.gov (TDeschamps at lbl.gov) Date: Mon, 28 Apr 2003 08:03:09 -0700 Subject: [vtkusers] VTK & QT Message-ID: <310c9230f417.30f417310c92@lbl.gov> Dear vtkUsers, I would like to combine VTK with QT. I found different versions of vtkqt renderwindow & interactor on the internet, at http://www.matthias-koenig.net/vtkqt/ http://wwwipr.ira.uka.de/~kuebler/vtkqt/ http://www.science.uva.nl/~dshamoni/VtkQt http://www.medres.ch/%7Ejstifter/vtkandqt/index.html http://sourceforge.net/projects/vtkqgl/ I would like to know if some of you are using it and which one is the most up-to-date. Moreover, I would like to know if someone managed to get one of them to work on a linux box. Many thanks. Thomas From anettegj at ifi.uio.no Mon Apr 28 11:18:00 2003 From: anettegj at ifi.uio.no (Anette Gjetnes) Date: Mon, 28 Apr 2003 17:18:00 +0200 (MEST) Subject: [vtkusers] changing resolution in a vtkImageData object Message-ID: Hi, I'm visualizing a 3D scalar field using a vtkImageData object and the values are connected to the cells and not the points in the grid. I want to change the dimensions and spacing of the vtkImageData object dynamically in my application. But when I try this the method vtkImageData::Crop is called and this fails because there are no point-date available. Do anyone have a sugestion on how to solve this problem or maybe an alltogether different way to change resolutions on the fly without creating new ImageData objects. thx, Anette From dulley at lsi.usp.br Mon Apr 28 12:16:30 2003 From: dulley at lsi.usp.br (Lucas Peetz Dulley) Date: Mon, 28 Apr 2003 13:16:30 -0300 Subject: [vtkusers] VTK GRIB READER class Message-ID: <3EAD53DE.7070705@lsi.usp.br> Hi guys! I've been loading my GRIBbed data to VTK using a (my lame) C++ wrapper for wgrib (a C degribbing utility). This is the way I've been able to load my datasets until now.(it's a little buggy but works) Believe it, or not, this is the first time the following thought crossed my mind: "Has any one made a vtkGRIBReader class???????" So I ask: Has anyone??? :) It would be very helpful.. If the answer is negative, I'm considering doing it myself. thanks for your time, Lucas -- Lucas Peetz Dulley Virtual Reality Center - CAVERNA Digital LSI - POLI - USP Tel: +55-11-3091-5374 Av. Prof. Luciano Gualberto, 158 trav. 3 CEP: 05508-900 - Sao Paulo - SP - Brazil From sxa at fluent.com Mon Apr 28 12:19:07 2003 From: sxa at fluent.com (Sebastien Auclair) Date: Mon, 28 Apr 2003 12:19:07 -0400 Subject: [vtkusers] VTK & QT References: <310c9230f417.30f417310c92@lbl.gov> Message-ID: <006801c30da1$e4b5eed0$8ae4e9c0@sxapc> We're using vtkqgl without problems. It works just fine on all platforms. (We develop for NT-2K, Linux, HP-UX, solaris...) ----- Original Message ----- From: To: Sent: Monday, April 28, 2003 11:03 AM Subject: [vtkusers] VTK & QT > Dear vtkUsers, > > I would like to combine VTK with QT. > I found different versions of vtkqt renderwindow & interactor on the > internet, at > > http://www.matthias-koenig.net/vtkqt/ > http://wwwipr.ira.uka.de/~kuebler/vtkqt/ > http://www.science.uva.nl/~dshamoni/VtkQt > http://www.medres.ch/%7Ejstifter/vtkandqt/index.html > http://sourceforge.net/projects/vtkqgl/ > > I would like to know if some of you are using it and which one is the > most up-to-date. > Moreover, I would like to know if someone managed to get one of them to > work on a linux box. > > Many thanks. > > Thomas > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From TDeschamps at lbl.gov Mon Apr 28 12:51:09 2003 From: TDeschamps at lbl.gov (TDeschamps at lbl.gov) Date: Mon, 28 Apr 2003 09:51:09 -0700 Subject: [vtkusers] VTK & QT Message-ID: <30efdb30dee0.30dee030efdb@lbl.gov> Hi Sebastien Which version of VTK & QT are you using? I've installed vtk 4.n and qt 3.0.5-17. With these, I cannot compile vtkQGL. It cannot find the vtkVersion.h file (which can be easily found): > ./configure --with-vtkdir=/usr/local/include/vtk ... configure: error: Could not find vtkVersion.h. Please use --with-vtkdir option or check your VTK installation. > find /usr/local/ -name vtkVersion.h /usr/local/include/vtk/vtkVersion.h /usr/local/usr/local/include/vtk/vtkVersion.h I thought it might be a problem of versions of vtk, or qt since the versions tested in vtkQGL are VTK-3.1.2 & QT-1.44 Thomas ----- Original Message ----- From: "Sebastien Auclair" Date: Monday, April 28, 2003 9:19 am Subject: Re: [vtkusers] VTK & QT > We're using vtkqgl without problems. > It works just fine on all platforms. (We develop for NT-2K, Linux, > HP-UX, > solaris...) > From Bruce.Lamond at ed.ac.uk Mon Apr 28 12:51:21 2003 From: Bruce.Lamond at ed.ac.uk (Bruce.Lamond at ed.ac.uk) Date: Mon, 28 Apr 2003 17:51:21 +0100 (BST) Subject: [vtkusers] unfathomable linker error Message-ID: <1051548681.3ead5c092e0f9@staffmail.ed.ac.uk> Hi there, I'm trying to create a subclass of vtkInteractorStyle to add more keyboard functions to the render window interactor. I've copied the style from sibling subclasses of vtkInteractorStyle and the class compiles correctly. When I try to use the class however, the linker complains about an "undefined reference to 'vtkMyInteractorStyle::New(void)'" If you look at the code in the .cxx file you will see that the New() function most definitely IS defined! Anyone got any ideas on this? cheers Bruce Lamond My new class .cxx file (vtkMyInteractorStyle.cxx): ================================================================================ #include "vtkMyInteractorStyle.h" #include "vtkActor.h" #include "vtkActor2D.h" #include "vtkAssemblyNode.h" #include "vtkAssemblyPath.h" #include "vtkCallbackCommand.h" #include "vtkCellPicker.h" #include "vtkMath.h" #include "vtkObjectFactory.h" #include "vtkOldStyleCallbackCommand.h" #include "vtkOutlineSource.h" #include "vtkPolyDataMapper.h" #include "vtkProperty.h" #include "vtkProperty2D.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" #include "vtkTextProperty.h" #include "vtkPointPicker.h" vtkMyInteractorStyle* vtkMyInteractorStyle::New() { // First try to create the object from the vtkObjectFactory vtkObject* ret = vtkObjectFactory::CreateInstance("vtkMyInteractorStyle"); if(ret) { return (vtkMyInteractorStyle*)ret; } // If the factory was unable to create the object, then create it here. return new vtkMyInteractorStyle; } vtkMyInteractorStyle::vtkMyInteractorStyle() {/* constructor stuff */} vtkMyInteractorStyle::~vtkMyInteractorStyle() {/* destructor stuff */} vtkMyInteractorStyle::OnChar() {/*method to be overridden in subclass*/} vtkMyInteractorStyle::PrintSelf(ostream& os, vtkIndent indent) { this->vtkInteractorStyle::PrintSelf(os,indent); /* other print stuff */ } ================================================================================ My new class .h file (vtkMyInteractorStyle.h): ================================================================================ #ifndef __vtkMyInteractorStyle_h #define __vtkMyInteractorStyle_h #include "vtkmyUnsortedWin32Header.h" #include "vtkInteractorStyle.h" class VTK_MY_UNSORTED_EXPORT vtkMyInteractorStyle : public vtkInteractorStyle { public: static vtkMyInteractorStyle* New(); vtkTypeMacro(vtkMyInteractorStyle, vtkInteractorStyle); void PrintSelf(ostream& os, vtkIndent indent); virtual void OnChar(); protected: vtkMyInteractorStyle(); ~vtkMyInteractorStyle(); private: vtkMyInteractorStyle(const vtkMyInteractorStyle&); // Not implemented. void operator=(const vtkMyInteractorStyle&); // Not implemented. }; #endif ================================================================================ The main method to use the class: ================================================================================ #include #include #include #include "vtkCubeSource.h" #include "vtkPropPicker.h" #include "vtkCommand.h" #include "vtkObject.h" #include "vtkMyInteractorStyle.h" #include "vtkInteractorStyleTrackballActor.h" void main(int argc, char* argv[]) { vtkRenderer *ren = vtkRenderer::New(); ren->SetBackground(1, 1, 1); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren); renWin->SetSize(600, 600); vtkCubeSource *cube=vtkCubeSource::New(); cube->SetXLength(40); cube->SetYLength(40); cube->SetZLength(40); vtkPolyDataMapper *cMapper=vtkPolyDataMapper::New(); cMapper->SetInput(cube->GetOutput()); vtkActor *cubeActor=vtkActor::New(); cubeActor->SetMapper(cMapper); cubeActor->GetProperty()->SetOpacity(0.4); cubeActor->GetProperty()->SetColor(0.3, 0.8, 0.8); vtkMyInteractorStyle* style = new vtkMyInteractorStyle; vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); iren->SetInteractorStyle(style); ren->AddActor(cubeActor); renWin->Render(); iren->Initialize(); iren->Start(); } ================================================================================ From Mathieu.Malaterre at creatis.insa-lyon.fr Mon Apr 28 12:51:50 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Mon, 28 Apr 2003 18:51:50 +0200 Subject: [vtkusers] vtkImageIterator: subregionning Message-ID: <3EAD5C26.6040409@creatis.insa-lyon.fr> Hi all, I wanted to take advantage of the vtkImageIterator but I have had some problems. I hope somebody could help me figure out why these happens. Here is the C++ file I used to understand what I do wrong: int main( int argc, char ** argv ) { int ext[6] = { 0, 100, 0, 100, 0, 100 }; vtkImageData *imagedata = vtkImageData::New(); imagedata->SetExtent( ext ); imagedata->SetScalarTypeToUnsignedShort (); imagedata->AllocateScalars(); imagedata->Update(); //1 vtkImageData *imagedata2 = vtkImageData::New(); imagedata2->SetExtent( ext ); imagedata2->SetScalarTypeToUnsignedShort (); imagedata2->AllocateScalars(); imagedata2->Update(); //1 int region[6]; for(int i=0; i<10; i++) { region[4] = region[2] = region[0] = 10*i; region[5] = region[3] = region[1] = 10*i + 9; imagedata->SetExtent( region ); //2 imagedata2->SetExtent( region ); //2 vtkImageIterator inIt(imagedata, region); vtkImageIterator outIt(imagedata2, region); while (!outIt.IsAtEnd()) { unsigned short* inSI = inIt.BeginSpan(); unsigned short* outSI = outIt.BeginSpan(); unsigned short* outSIEnd = outIt.EndSpan(); while (outSI != outSIEnd) { *outSI = 255; *inSI = 0; ++outSI; ++inSI; } inIt.NextSpan(); outIt.NextSpan(); } } imagedata2->SetExtent( ext ); //3 imagedata2->Print(std::cout); imagedata->Delete(); imagedata2->Delete(); return 0; } You'll see that there are some comments //1,2,3. This corresponds to: 1. If I don't do an Update here the iterator won't get the good extent. (Is this normal to explicitely call Update in a VTK pipeline ?). BTW I thought SetWholeExtent would do the trick: seems to be worse. 2. I wanted to work on subregions. But vtkImageIterator only wants to work on the whole extent. If I don't call SetExtent I obtained a seg fault ! I don't understand why ? 3. Of course by rediffining each time a new SetExtent, the whole extent is lost at the end of the pipeline. So I need to redefine it. I really would like someone to told me how to use vtkImageIterator or answer my questions. This is too bad a templated code is less handy than a good ol' fortran 'for loop'. thanks, mathieu -- Mathieu Malaterre CREATIS 28 Avenue du Doyen LEPINE B.P. Lyon-Montchat 69394 Lyon Cedex 03 http://www.creatis.insa-lyon.fr/~malaterre/ From A.C.J.Usher at damtp.cam.ac.uk Mon Apr 28 13:20:39 2003 From: A.C.J.Usher at damtp.cam.ac.uk (Andrew Usher) Date: Mon, 28 Apr 2003 18:20:39 +0100 (BST) Subject: [vtkusers] Swing+Irix = Problems Message-ID: Hi, I'm currently trying to get Java 1.4.1 on Irix 6.5 to work with VTK 4.2.2 but keep having trouble. When I run the standard examples using Java, all is well but as soon as I run a Java program using VTK + Swing, such SimpleVTK.java, I get the following error: SIGSEGV 11* segmentation violation si_signo [11]: SIGSEGV 11* segmentation violation si_errno [0]: Error 0 si_code [1]: SEGV_MAPERR [addr: 0x1014] User context info: pc = 0xac4a2f0 (SignalError = 0x9f8f4d0) sp = 0x10849ab0, ra = 0xac4a2f0 stackpointer=108495e0 I wondered if anyone else has had these problems when developing with Java and VTK on Irix and if there's any known solution? Thanks very much, Andrew Usher --------------------------------------------------- Andrew Usher Email: a.c.j.usher at damtp.cam.ac.uk Tel: (01223) 765997 --------------------------------------------------- From nick.smethurst at free.fr Mon Apr 28 13:34:25 2003 From: nick.smethurst at free.fr (N Smethurst) Date: Mon, 28 Apr 2003 19:34:25 +0200 Subject: [vtkusers] VTK & QT In-Reply-To: <310c9230f417.30f417310c92@lbl.gov> References: <310c9230f417.30f417310c92@lbl.gov> Message-ID: <200304281934.25598.nick.smethurst@free.fr> Hey there. I'm using Dennis' VtkQt solution with an application I am developing that uses KDE on Linux. They are very clean classes and are very simple to use. The only problem I have found is that when using a slow computer or a complicated scene, something (probably QT) is grabbing the mouse events whilst interacting, and the interaction continues for a period of time after I have released the mouse button. Other than that, I would recommend them as a very good solution for VTK & QT if you are developing a GPL program on Linux. Now, if we can find the root of the interaction problem, they would be the perfect solution! Nick Le Lundi 28 Avril 2003 17:03, TDeschamps at lbl.gov a ?crit : > Dear vtkUsers, > > I would like to combine VTK with QT. > I found different versions of vtkqt renderwindow & interactor on the > internet, at > > http://www.matthias-koenig.net/vtkqt/ > http://wwwipr.ira.uka.de/~kuebler/vtkqt/ > http://www.science.uva.nl/~dshamoni/VtkQt > http://www.medres.ch/%7Ejstifter/vtkandqt/index.html > http://sourceforge.net/projects/vtkqgl/ > > I would like to know if some of you are using it and which one is the > most up-to-date. > Moreover, I would like to know if someone managed to get one of them to > work on a linux box. > From kmorel at sandia.gov Mon Apr 28 14:33:39 2003 From: kmorel at sandia.gov (Moreland, Kenneth) Date: Mon, 28 Apr 2003 12:33:39 -0600 Subject: [vtkusers] urgent doubt!!!!! Message-ID: It sounds like you have not included the vtkUnstructuredGrid.h header file, which defines the full prototype for the class. Once the compiler knows that vtkUnstructuredGrid inherits from vtkDataSet, it should make the cast for you. -Ken **** Kenneth Moreland *** Sandia National Laboratories *********** *** *** *** email: kmorel at sandia.gov ** *** ** phone: (505) 844-8919 *** fax: (505) 844-9297 > -----Original Message----- > From: "marisa aurelio" > To: vtkusers at public.kitware.com > Date: Mon, 28 Apr 2003 08:54:31 +0000 > Subject: [vtkusers] urgent doubt!!!!! > > Hi vtkUsers, > > I have this piece of code: > > vtkDelaunay3D *del = vtkDelaunay3D::New(); > del->SetInput(profile); > del->SetTolerance(0.05); > del->SetAlpha(0.05); > del->BoundingTriangulationOff(); > > vtkPolyDataMapper *map = vtkPolyDataMapper::New(); > map->SetInput(del->GetOutput());*/ > > vtkDataSetMapper *map = vtkDataSetMapper::New(); > map->SetInput(del->GetOutput()); (here is the error) > > But I have an error: > error C2664: 'SetInput' : cannot convert parameter 1 from 'class > vtkUnstructuredGrid *' to 'class vtkDataSet *' > > > How can I do it??? > > Thanks > > Marisa > > > _________________________________________________________________ > MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. > http://join.msn.com/?page=features/virus > From dshamoni at science.uva.nl Mon Apr 28 14:57:22 2003 From: dshamoni at science.uva.nl (Denis Shamonin) Date: Mon, 28 Apr 2003 20:57:22 +0200 Subject: [vtkusers] VTK & QT In-Reply-To: <200304281934.25598.nick.smethurst@free.fr> References: <310c9230f417.30f417310c92@lbl.gov> <200304281934.25598.nick.smethurst@free.fr> Message-ID: <3EAD7992.8010900@science.uva.nl> Hi Smethurst, N Smethurst wrote: >Hey there. > >I'm using Dennis' VtkQt solution with an application I am developing that >uses KDE on Linux. They are very clean classes and are very simple to use. >The only problem I have found is that when using a slow computer or a >complicated scene, something (probably QT) is grabbing the mouse events >whilst interacting, and the interaction continues for a period of time >after I have released the mouse button. > > I know about this problem. Specially when you have really havy data for rendering and you are using the InteractorStyleTrackball. But for this moment I don't see the easy solution to solve it. Qt delays events from a mouse in this case. If I'll found how to solve it. I will add this to new VtkQt. >Other than that, I would recommend them as a very good solution for VTK & >QT if you are developing a GPL program on Linux. Now, if we can find the >root of the interaction problem, they would be the perfect solution! > >Nick > >Le Lundi 28 Avril 2003 17:03, TDeschamps at lbl.gov a ?crit : > > -- Denis Shamonin Address : Section Computational Science University of Amsterdam Kruislaan 403, 1098 SJ Amsterdam the Netherlands E-mail : dshamoni at science.uva.nl URL : http://www.science.uva.nl/~dshamoni/ From a.maclean at cas.edu.au Mon Apr 28 18:55:57 2003 From: a.maclean at cas.edu.au (Andrew J. P. Maclean) Date: Tue, 29 Apr 2003 08:55:57 +1000 Subject: [vtkusers] Getting the transform matrix Message-ID: <000001c30dd9$54a68790$a3d24e81@acfr.usyd.edu.au> After performing a mouse interaction on a scene is it possible to get the transform matrix that is being used to update the actors in the scene? In other words, once I rotate the object using a mouse can I get the matrix representing the transform required to move the actor to the New position? ___________________________________________ Andrew J. P. Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney 2006 NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: http://www.cas.edu.au/ ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From baghdadi at sickkids.ca Mon Apr 28 19:01:23 2003 From: baghdadi at sickkids.ca (Leila Baghdadi) Date: Mon, 28 Apr 2003 19:01:23 -0400 (EDT) Subject: [vtkusers] bug in vtkCamera Message-ID: Hey everyone If you tried to set the Elevation to 90 degrees, the ViewUp vector becomes zero aand hence a segfault occurs so maybe it is better to rotate the viewUp vector as part of the Elevation calculation. Hopefully this will be fixed in the future versions of vtk. Thanks Leila From novalet at yahoo.com.cn Mon Apr 28 23:40:37 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Tue, 29 Apr 2003 11:40:37 +0800 (CST) Subject: [vtkusers] Why GetOutput is not a virtual method? Message-ID: <20030429034037.32650.qmail@web15212.mail.bjs.yahoo.com> Is there any reason make GetOutput is not a virtual method? In my implement i try to use vtkImageSource* to replace his various children class for SetInput and GetOutput. But at last i find it impossible for GetOutput is not a virtual method. Why take such a design? ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ??????????????????????????????????????~ http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com/ From siebert at onco.uni-kiel.de Mon Apr 28 02:28:33 2003 From: siebert at onco.uni-kiel.de (=?ISO-8859-1?Q?Frank-Andr=E9_Siebert?=) Date: Mon, 28 Apr 2003 11:58:33 +0530 Subject: AW: [vtkusers] VTK/TCL and GUI editors Message-ID: <2A357C816A86D3499AF8236DD7912C4F074F3B@oncomail.onco.uni-kiel.de> Hi, I am using ConTEXT 0.97.2a and it is a nice working with it. You can expand the highlighter to your desires, for example with vtk-classes or -methods. The only thing I am missing is a tcl/tk- + vtk-debugger. So I have to go on with the tk_messageBox -message $myVariable. Bye Frank-Andr? -----Urspr?ngliche Nachricht----- Von: Andrew J. P. Maclean [mailto:a.maclean at cas.edu.au] Gesendet: Montag, 28. April 2003 05:20 An: vtkusers at public.kitware.com Betreff: [vtkusers] VTK/TCL and GUI editors 1) Has anyone managed to use Visual TCL with VTK? If I source anything with vtk in it seems to be unable to load it. 2) What do people use? I tried ConTEXT - this is just a syntax highlighter, and I have looked at Komodo, but it seems that if you use TCL you have to buy the ActiveState version. ___________________________________________ Andrew J. P. Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney 2006 NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: http://www.cas.edu.au/ ___________________________________________ "THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are notified that any dissemination, distribution or copy of this communication is strictly Prohibited. If you have received this message by error, please notify us immediately, return the original mail to the sender and delete the message from your system." -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 7387 bytes Desc: not available URL: From krishna at lucidindia.net Tue Apr 29 02:21:08 2003 From: krishna at lucidindia.net (KK) Date: Tue, 29 Apr 2003 11:51:08 +0530 Subject: [vtkusers] Debugging vtk C++ code Message-ID: <004601c30e17$85c56a10$0d01a8c0@c6004> Hi vtk folks! how to debug vtk classes to understand the functionality in VC++6.0? Bye Krishna -------------- next part -------------- An HTML attachment was scrubbed... URL: From zxem at my169.com Tue Apr 29 04:27:21 2003 From: zxem at my169.com (Xin Zhao) Date: Tue, 29 Apr 2003 8:27:21 +0000 Subject: [vtkusers] Why I did not get the past 3 day's Digest? Message-ID: Dear sir, Is there any problem with the maillist? X.Z 2003-04-29 08:27:14 From aai at Cs.Nott.AC.UK Tue Apr 29 04:53:48 2003 From: aai at Cs.Nott.AC.UK (Ainojie Alexander Irune) Date: Tue, 29 Apr 2003 09:53:48 +0100 Subject: [vtkusers] vtk java bindings Message-ID: <3EAE3D9C.8030902@cs.nott.ac.uk> Hi, I am a new vtk user and was wodering if ayone could help me with regards to obtaining some literature on developing applications using vtk and its Java bindings. Thanks. Alex From novalet at yahoo.com.cn Tue Apr 29 07:46:38 2003 From: novalet at yahoo.com.cn (=?gb2312?q?Chen=20Fu?=) Date: Tue, 29 Apr 2003 19:46:38 +0800 (CST) Subject: [vtkusers] extend boundary of image Message-ID: <20030429114638.60156.qmail@web15203.mail.bjs.yahoo.com> Hi! I recently compare the morphology operation in vtk, itk and matlab. To my surprise, vtk and itk is much slower than matlab. I believe the problem is the boundary processing. In vtk and itk code, every pixel must take 8 compares to confirm whether it is inside the image boundary. But in matlab, the boundary is preprocessed by extending the size of image, so get rid of such compares. I will try to do some modify of vtk code to enhance its performance, but i am not very clearly how to do extend the image in vtk's pipeline architecture. Maybe somebody can give me some hints? ===== Remote Scensing Satellite Ground Station Chinese Academy of Science _________________________________________________________ Do You Yahoo!? ??????????????????????????????????????~ http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com/ From tim.fooy at pandora.be Tue Apr 29 08:22:46 2003 From: tim.fooy at pandora.be (Tim Fooy) Date: Tue, 29 Apr 2003 14:22:46 +0200 Subject: [vtkusers] dividing cubes algorithm Message-ID: <200304291422.46686.tim.fooy@pandora.be> Hi all, I have a question about the dividing cubes algorithm, as described in The Visualisation Toolkit book, p. 303. The book states (p. 304) that the recursive variant of the algorithm possibly generates more pixels than the procedural one. Isn't that wrong? Both variants divide voxels to such a depth that a solid surface can be rendered, depending on the screen resolution. So, in the end, the size of the subvoxels they create is equal. But, the recursive variant does not go to this depth everywhere in the original voxel, only in the part where the surface passes through. So as i see it, i am inclined to think that the recursive variant produces less points. Can somebody point out where my thinking goes wrong? Thanks in advance, Tim From Brian.Dotson at netl.doe.gov Tue Apr 29 08:41:41 2003 From: Brian.Dotson at netl.doe.gov (Brian Dotson) Date: Tue, 29 Apr 2003 08:41:41 -0400 Subject: [vtkusers] Problem with Accessing Vertex Normals Message-ID: Hi all, I have created a contour using vtk and I would like to extract the polygons and vertex normals for the contour. I use GetPoints on the polyData to retrieve the polygon verticies. This works fine. Then I use GetCellData->GetNormals to get the pointer to the normals. I extract the normals using normals->GetTuple. I do get normals, and part of them seem correct, but they seem out of order. Let's say I have 2000 verticies and 2000 vertex normals, does vertex normal 500 correspond to vertex 500 in the array? When my contour is a flat plane and all the normal vectors are the same the scene looks correct, but when I have an object say a sphere under the plane, then I get splotches on the plane and the sphere indicating that their normal vectors are wrong. This is why it seems as though the order is different for points and normals. Has anyone else seen this? Thanks in advance, Brian Dotson From amy.henderson at kitware.com Tue Apr 29 09:08:21 2003 From: amy.henderson at kitware.com (Amy Henderson) Date: Tue, 29 Apr 2003 09:08:21 -0400 Subject: [vtkusers] Getting the transform matrix In-Reply-To: <000001c30dd9$54a68790$a3d24e81@acfr.usyd.edu.au> Message-ID: <5.1.0.14.0.20030429090727.00b2a5b8@pop.biz.rr.com> If the actor is a subclass of vtkProp3D, you can call GetMatrix on it. - Amy At 08:55 AM 4/29/2003 +1000, Andrew J. P. Maclean wrote: >After performing a mouse interaction on a scene is it possible to get the >transform matrix that is being used to update the actors in the scene? > >In other words, once I rotate the object using a mouse can I get the >matrix representing the transform required to move the actor to the > >New position? > > > >___________________________________________ > > > >Andrew J. P. Maclean > > > >Centre for Autonomous Systems >The Rose Street Building J04 >The University of Sydney 2006 NSW >AUSTRALIA > > > >Ph: +61 2 9351 3283 > >Fax: +61 2 9351 7474 > > > >URL: http://www.cas.edu.au/ > >___________________________________________ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mgsassi at criba.edu.ar Tue Apr 29 09:32:46 2003 From: mgsassi at criba.edu.ar (Maximiliano Sassi) Date: Tue, 29 Apr 2003 10:32:46 -0300 Subject: [vtkusers] Help with the Blanking Points Message-ID: <5.1.0.14.0.20030429103128.0275cb88@pop3.criba.edu.ar> Hi, i have a problem with the vtkBlankPoint... i have a structured grid and there are some points that i don?t want to be there... when i use it with one point (something very simple): sgrid->BlankingOn(); sgrid->BlankPoint(any point in the grid); the program returns an error (memory error)... so i run the debug.... the problem is in the second line... returns an unhandled exception (vtkCommon.dll) (direction memory):Access Violation... it seems to be a problem out of the program... this is beyond my limits... please, if you can help, thanks, Maxi -------------- next part -------------- --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.470 / Virus Database: 268 - Release Date: 08/04/2003 From nick.smethurst at free.fr Tue Apr 29 14:09:10 2003 From: nick.smethurst at free.fr (N Smethurst) Date: Tue, 29 Apr 2003 20:09:10 +0200 Subject: [vtkusers] VTK & QT In-Reply-To: <3EAD7992.8010900@science.uva.nl> References: <310c9230f417.30f417310c92@lbl.gov> <200304281934.25598.nick.smethurst@free.fr> <3EAD7992.8010900@science.uva.nl> Message-ID: <200304292009.10444.nick.smethurst@free.fr> Hi there. Would it be possible for you to describe the problem in detail? I would like to research this problem but I have no idea where to start! Thanks! Nic Le Lundi 28 Avril 2003 20:57, Denis Shamonin a ?crit : > I know about this problem. Specially when you have really havy data for > rendering and you are using the InteractorStyleTrackball. > But for this moment I don't see the easy solution to solve it. Qt delays > events from a mouse in this case. > If I'll found how to solve it. I will add this to new VtkQt. From dmpd at onetel.net.uk Tue Apr 29 14:22:59 2003 From: dmpd at onetel.net.uk (D.M.P.Davies) Date: Tue, 29 Apr 2003 19:22:59 +0100 Subject: [vtkusers] Getting the transform matrix References: <000001c30dd9$54a68790$a3d24e81@acfr.usyd.edu.au> Message-ID: <3EAEC303.54F7315F@onetel.net.uk> "Andrew J. P. Maclean" wrote: > After performing a mouse interaction on a scene is it possible to get > the transform matrix that is being used to update the actors in the > scene? > In tcl where I want a vtkCutter (vTK_CUTF) to face the camera I do:- vtkMatrix4x4 vTK_Matrix Reset_Matrix [camera GetViewTransformMatrix] vTK_Matrix vtkMatrixToHomogeneousTransform vTK_MHT vTK_MHT SetInput vTK_Matrix vtkTransformPolyDataFilter vTK_PFilter vTK_PFilter SetInput [vTK_CUTF GetOutput] vTK_PFilter SetTransform [vTK_MHT GetInverse] Where the called procedure is : proc Reset_Matrix { mat tempmat} { for {set i 0} {$i < 3} {incr i} { for {set j 0} {$j < 3} {incr j} { eval "$tempmat SetElement $i $j [$mat GetElement $i $j]" } } } It works but you have to fix your own translations (i.e cols and rows 4 in the proc.) Hope This Helps Dave Davies -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jonathan.Bailleul at greyc.ismra.fr Tue Apr 29 14:18:35 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Tue, 29 Apr 2003 20:18:35 +0200 Subject: [vtkusers] vtkNormals bug??? Message-ID: <3EAEC1FB.532A48F8@greyc.ismra.fr> Dear all, I think I've found some inconsistent behaviour in using the vtkNormals filter with the simple program provided below. I just read a vtk file and wnat in output a file with the same polygons plus computed normals. What I get in output is apparently the same, but when I read the files, I can see that a *random* number of points is added to the file! All my input files have exactly 66 vertices, but the resullting output files have between 99 and 123 vertices! Please notice that additional vertices occupy the same coordinates as original vertices, so "there is no obvious difference visually". I might have done something wrong in my program, but in that case, can you tell me what? PS: my vtk version is a nighlty release 4.0x. #include "vtkSphereSource.h" #include "vtkPolyDataMapper.h" #include "vtkActor.h" #include "vtkRenderWindow.h" #include "vtkRenderer.h" #include "vtkRenderWindowInteractor.h" #include "vtkPolyDataNormals.h" #include "vtkPolyDataReader.h" #include "vtkPolyDataWriter.h" #include "vtkProperty.h" #include "vtkCamera.h" #include #include /* GLOS (Graphic Library in Open Source), an ANSI Common Lisp OpenGL subset. Copyright (C) 2000 the GLOS development team (http://glos.sourceforge.net) */ static void usage(int argc, char **argv) { if (argc != 3) { printf("(re)compute normals for .vtk object files\n"); printf("Usage: %s \n", argv[0]); exit(1); } } int main(int argc, char* argv[]) { usage(argc, argv); // create object geometry vtkPolyDataReader *reader = vtkPolyDataReader::New(); reader -> SetFileName(argv[1]); reader -> Update(); vtkPolyDataNormals *normals = vtkPolyDataNormals::New(); normals -> SetInput(reader -> GetOutput()); normals -> Update(); vtkPolyDataWriter *writer = vtkPolyDataWriter::New(); writer -> SetInput(normals -> GetOutput()); writer -> SetFileName(argv[2]); writer -> SetFileTypeToASCII(); writer -> Update(); return EXIT_SUCCESS; } -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From Jonathan.Bailleul at greyc.ismra.fr Tue Apr 29 14:33:06 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Tue, 29 Apr 2003 20:33:06 +0200 Subject: [vtkusers] vtkNormals bug??? References: <3EAEC1FB.532A48F8@greyc.ismra.fr> Message-ID: <3EAEC562.A21E2654@greyc.ismra.fr> Sorry, the involved filter is vtkPolyDataNormals I've recently tried with no success: virtual void vtkPolyDataNormals::ConsistencyOn() Turn on/off the enforcement of consistent polygon ordering Jonathan Bailleul wrote: > > Dear all, > > I think I've found some inconsistent behaviour in using the vtkNormals > filter with the simple program provided below. > I just read a vtk file and wnat in output a file with the same polygons > plus computed normals. What I get in output is apparently the same, but > when I read the files, I can see that a *random* number of points is > added to the file! > > All my input files have exactly 66 vertices, but the resullting output > files have between 99 and 123 vertices! Please notice that additional > vertices occupy the same coordinates as original vertices, so "there is > no obvious difference visually". > > I might have done something wrong in my program, but in that case, can > you tell me what? > > PS: my vtk version is a nighlty release 4.0x. > > #include "vtkSphereSource.h" > #include "vtkPolyDataMapper.h" > #include "vtkActor.h" > #include "vtkRenderWindow.h" > #include "vtkRenderer.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkPolyDataNormals.h" > #include "vtkPolyDataReader.h" > #include "vtkPolyDataWriter.h" > #include "vtkProperty.h" > #include "vtkCamera.h" > > #include > #include > > /* GLOS (Graphic Library in Open Source), an ANSI Common Lisp OpenGL > subset. > Copyright (C) 2000 the GLOS development team > (http://glos.sourceforge.net) */ > > static void > usage(int argc, char **argv) > { > if (argc != 3) > { > printf("(re)compute normals for .vtk object files\n"); > printf("Usage: %s > \n", argv[0]); > exit(1); > } > } > > int > main(int argc, char* argv[]) > { > usage(argc, argv); > > // create object geometry > vtkPolyDataReader *reader = vtkPolyDataReader::New(); > reader -> SetFileName(argv[1]); > reader -> Update(); > > vtkPolyDataNormals *normals = vtkPolyDataNormals::New(); > normals -> SetInput(reader -> GetOutput()); > normals -> Update(); > > vtkPolyDataWriter *writer = vtkPolyDataWriter::New(); > writer -> SetInput(normals -> GetOutput()); > writer -> SetFileName(argv[2]); > writer -> SetFileTypeToASCII(); > writer -> Update(); > > return EXIT_SUCCESS; > } > > -- > ----------------------------------- > Jonathan BAILLEUL, Doctorant > GREYC Image - Universit? de Caen > http://www.greyc.ismra.fr/~bailleul > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From jfd at lanl.gov Tue Apr 29 15:04:26 2003 From: jfd at lanl.gov (John Davis) Date: Tue, 29 Apr 2003 13:04:26 -0600 Subject: [vtkusers] VTK 4.2 upgrade fails on vtkScalarBarActor Message-ID: <5.1.1.5.2.20030429123324.01f3e918@cic-mail.lanl.gov> I have a working code that compiles, links, and runs flawlessly on a Linux PC with VTK 4.0 using either gcc or pgCC (Portland Group). Essentially the same code works on Windows with VC++ 6 or with Intel 7, and on Irix with MIPS 7. I am trying to upgrade to VTK 4.2 on Linux (Red Hat 7.4). Both my copies of VTK, 4.0 and 4.2, came off their respective User's Guide CD. Both versions of VTK seemed to build without error with either compiler on Linux. The full application can be built with 4.2 only if I comment out the source code involving vtkScalarBarActor or vtkTextActor. The problem is shown by a simple example code that fails to link with VTK 4.2 libraries on Linux: #include #include "vtkScalarBarActor.h" int main( int argc, char *argv[] ) { cout << "Hello, world!\n"; vtkScalarBarActor *scalarBar = vtkScalarBarActor::New(); } Here is the resulting of compiling with gcc: g++ -g test.o -L/apps/vtk4.2_gcc/bin -lvtkRendering -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkCommon -lvtkIO -lvtkHybrid -L/apps/netcdf_gcc/src/cxx -lnetcdf_c++ -L/apps/netcdf_gcc/src/libsrc -lnetcdf -L/usr/X11R6/lib -lXext -lXt -lSM -lICE -lX11 -lm -lGL -o test /apps/vtk4.2_gcc/bin/libvtkRendering.a(vtkOpenGLFreeTypeTextMapper.o): In function `vtkOpenGLFreeTypeTextMapper::GetSize(vtkViewport *, int *)': vtkOpenGLFreeTypeTextMapper.o(.text+0x4a1): undefined reference to `FTFont::BBox(char const *, float &, float &, float &, float &, float &, float &)' vtkOpenGLFreeTypeTextMapper.o(.text+0x4bc): undefined reference to `FTFont::Advance(char const *)' /apps/vtk4.2_gcc/bin/libvtkRendering.a(vtkFreeTypeFontCache.o): In function `vtkFreeTypeFontCache::GetFont(vtkTextProperty *, int, unsigned char, unsigned char, unsigned char)': vtkFreeTypeFontCache.o(.text+0x655): undefined reference to `FTGLPixmapFont::FTGLPixmapFont(void)' vtkFreeTypeFontCache.o(.text+0x66c): undefined reference to `FTGLBitmapFont::FTGLBitmapFont(void)' vtkFreeTypeFontCache.o(.text+0x6ac): undefined reference to `FTFont::Open(char const *, char)' vtkFreeTypeFontCache.o(.text+0x90a): undefined reference to `FTFont::Attach(char const *)' vtkFreeTypeFontCache.o(.text+0xcf4): undefined reference to `FTFont::FaceSize(unsigned int, unsigned int)' /apps/vtk4.2_gcc/bin/libvtkRendering.a(vtkFreeTypeFontCache.o): In function `vtkFreeTypeFontCacheCleanup::vtkFreeTypeFontCacheCleanup(void)': vtkFreeTypeFontCache.o(.text+0x23): undefined reference to `FTLibraryCleanup::AddDependency(void (*)(void))' collect2: ld returned 1 exit status gmake: *** [test] Error 1 I haven't seen anything about this in the FAQ or the mailing list. John John F. Davis, Ph.D. Scientific Software Engineering Los Alamos National Laboratory MS B295 Los Alamos, New Mexico 87545 Tel. (505) 667-4793 Fax (505) 665-5402 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jonathan.Bailleul at greyc.ismra.fr Tue Apr 29 15:13:03 2003 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Tue, 29 Apr 2003 21:13:03 +0200 Subject: [vtkusers] vtkNormals bug??? References: <3EAEC1FB.532A48F8@greyc.ismra.fr> <3EAEC562.A21E2654@greyc.ismra.fr> Message-ID: <3EAECEBF.DDE61386@greyc.ismra.fr> Sorry everyone... The solution (that was kindly provided by some of you) was to read the doc of the good class, since by defaults sharp points can be splitted, hence my result. Thank you all! Jonathan Bailleul wrote: > > Sorry, the involved filter is vtkPolyDataNormals > > I've recently tried with no success: > > virtual void vtkPolyDataNormals::ConsistencyOn() > Turn on/off the enforcement of consistent polygon ordering > -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From Olivier.Jock at gmx.de Wed Apr 30 03:44:43 2003 From: Olivier.Jock at gmx.de (Olivier Jock) Date: Wed, 30 Apr 2003 09:44:43 +0200 Subject: [vtkusers] Help: Error running Cone example on Linux, Java Message-ID: <3EAF7EEB.BBBB6CF8@gmx.de> I want use VTK on SuSE Linux 7.3 with Java (Version: jdk 1.4). The compilation of VTK (Version 4.2.1 and Version 4.2.2) seems to be ok (the compiled test examples, e.g. TimeRenderer work fine), but when I try to execute the first java example in the tutorial (Cone.java) I get everytime the same error. The error output is as follows: -------------------------------------- An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C9E0490 Function=AddHashEntry__12vtkHashTablePvT1+0x60 Library=/opt/Jbuilder8/Jbuilder8/jdk1.4/jre/lib/i386/client/libvtkCommonJava.so Current Java thread: at vtk.vtkPolyData.VTKCastInit(Native Method) at vtk.vtkPolyDataSource.GetOutput_2(Native Method) at vtk.vtkPolyDataSource.GetOutput(vtkPolyDataSource.java:20) at Cone.main(Cone.java:46) Dynamic libraries: 08048000-0804e000 r-xp 00000000 03:04 283724 /opt/Jbuilder8/Jbuilder8/jdk1.4/bin/java 0804e000-0804f000 rw-p 00005000 03:04 283724 /opt/Jbuilder8/Jbuilder8/jdk1.4/bin/java 40000000-40014000 r-xp 00000000 03:04 8861 /lib/ld-2.2.4.so 40014000-40015000 rw-p 00013000 03:04 8861 /lib/ld-2.2.4.so ... Local Time = Tue Apr 29 15:39:22 2003 Elapsed Time = 136 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode) # ----------------------------------------------- I don't know what to do. When debugging the source from Cone.java the following line is causing the problem: coneMapper.SetInput( cone.GetOutput() ); I have the impression that something is wrong with cone.GetOutput(). I am glad about any comment regarding this problem. Thanks Olivier From Mathieu.Malaterre at creatis.insa-lyon.fr Wed Apr 30 05:08:12 2003 From: Mathieu.Malaterre at creatis.insa-lyon.fr (Mathieu Malaterre) Date: Wed, 30 Apr 2003 11:08:12 +0200 Subject: [vtkusers] vtkTimerLog: leaks (valgrind) Message-ID: <3EAF927C.1050901@creatis.insa-lyon.fr> Hi all, I have been using valgrind on TimeRenderer and TimeRenderer2 and I always have a leak: ==10958== 5200 bytes in 1 blocks are still reachable in loss record 24 of 44 ==10958== at 0x40166838: __builtin_vec_new (vg_clientfuncs.c:161) ==10958== by 0x41043BB6: vtkTimerLog::AllocateLog(void) (/home/malat/Kitware/VTK/Common/vtkTimerLog.cxx:89) ==10958== by 0x41043CB7: vtkTimerLog::MarkEvent(char const *) (/home/malat/Kitware/VTK/Common/vtkTimerLog.cxx:148) ==10958== by 0x41043E33: vtkTimerLog::MarkStartEvent(char const *) (/home/malat/Kitware/VTK/Common/vtkTimerLog.cxx:232) I am using valgrind with these options: __GL_FORCE_GENERIC_CPU=1 valgrind -v --leak-check=yes --show-reachable=yes --error-limit=no Furthermore I tried also on a simplier example: $ valgrind CommonCxxTests otherTimerLog And this time I get: ==11367== 156 bytes in 1 blocks are still reachable in loss record 1 of 2 ==11367== at 0x40166838: __builtin_vec_new (vg_clientfuncs.c:161) ==11367== by 0x40378AE6: vtkTimerLog::SetMaxEntries(int) (/home/malat/Kitware/VTK/Common/vtkTimerLog.cxx:601) ==11367== by 0x80736F2: otherTimerLogTest(ostream &) (/home/malat/Kitware/VTK/Common/Testing/Cxx/otherTimerLog.cxx:41) ==11367== by 0x80738D3: otherTimerLog(int, char **) (/home/malat/Kitware/VTK/Common/Testing/Cxx/otherTimerLog.cxx:74) ==11367== In vtkTimerLog.h, vtkTimerLogEntry is declared as a struct outside of the class and the allocation is outside of the constructor. So my question is: Does VTK reference counting works also in that case ? Or is this a valgrind problem ? Thanks From philipp.batchelor at kcl.ac.uk Wed Apr 30 08:05:08 2003 From: philipp.batchelor at kcl.ac.uk (philipp.batchelor at kcl.ac.uk) Date: Wed, 30 Apr 2003 13:05:08 +0100 (BST) Subject: [vtkusers] Help: Error running Cone example on Linux, Java In-Reply-To: <3EAF7EEB.BBBB6CF8@gmx.de> Message-ID: Hi, sorry I can't help directly, but some related information. By coincidence, I got a very similar error message today, while running a vtk example in Matlab. This allows me to point out that J. Lee's suggestion worked for this, after recompiling VTK-4.2.2 with the Java coming with Matlab (Java 1.3.1 with Blackdown Java-Linux Team Java HotSpot(TM) Server VM (mixed mode), (but I had to use the jni.h jni_md.h from jdk1.4)), I manage to get vtk code running in Matlab, for example my modified version of SimpleVTK.java. But when I tried to get the coordinates of a point from the ConeSource.GetOutput.GetPoint(...), I got a similar sounding error, see below. Linux is RedHat 7.1, kernel 2.4.2-2. However, note that SimpleVTK.java, and Cone.java <> as standalone program! Error message: ---------------------------------------- An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x50d7683f Function name=_ZN11vtkPointSet8GetPointEi Library=/projects/vtk/linux2.2/vtkNightly/VTK-4.2.2/bin/libvtkCommon.so Current Java thread: at vtk.vtkPointSet.GetPoint_5(Native Method) at vtk.vtkPointSet.GetPoint(vtkPointSet.java:32) .........[~300 lines] Stack Trace: [0] libjvm.so:os::abort(long)~(0x32326469, 0x6c2e3436, 0x4000676f, 0x405cb740) + 29 bytes Ph ------------------------------------------------------------------------- On Wed, 30 Apr 2003, Olivier Jock wrote: > I want use VTK on SuSE Linux 7.3 with Java (Version: jdk 1.4). The > compilation of VTK (Version 4.2.1 and Version 4.2.2) seems to be ok (the > compiled test examples, e.g. TimeRenderer work fine), but when I try to > execute the first java example in the tutorial (Cone.java) I get > everytime the same error. > > The error output is as follows: > > -------------------------------------- > > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C9E0490 > Function=AddHashEntry__12vtkHashTablePvT1+0x60 > Library=/opt/Jbuilder8/Jbuilder8/jdk1.4/jre/lib/i386/client/libvtkCommonJava.so > > Current Java thread: > at vtk.vtkPolyData.VTKCastInit(Native Method) > at vtk.vtkPolyDataSource.GetOutput_2(Native Method) > at vtk.vtkPolyDataSource.GetOutput(vtkPolyDataSource.java:20) > at Cone.main(Cone.java:46) > > Dynamic libraries: > 08048000-0804e000 r-xp 00000000 03:04 283724 > /opt/Jbuilder8/Jbuilder8/jdk1.4/bin/java > 0804e000-0804f000 rw-p 00005000 03:04 283724 > /opt/Jbuilder8/Jbuilder8/jdk1.4/bin/java > 40000000-40014000 r-xp 00000000 03:04 8861 /lib/ld-2.2.4.so > 40014000-40015000 rw-p 00013000 03:04 8861 /lib/ld-2.2.4.so > ... > > Local Time = Tue Apr 29 15:39:22 2003 > Elapsed Time = 136 > # > # The exception above was detected in native code outside the VM > # > # Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode) > # > > ----------------------------------------------- > > I don't know what to do. When debugging the source from Cone.java the > following line is causing the problem: > > coneMapper.SetInput( cone.GetOutput() ); > > I have the impression that something is wrong with cone.GetOutput(). > > I am glad about any comment regarding this problem. > > Thanks > > Olivier > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From jeff at cdnorthamerica.com Wed Apr 30 09:00:31 2003 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Wed, 30 Apr 2003 09:00:31 -0400 Subject: [vtkusers] Help: Error running Cone example on Linux, Java In-Reply-To: References: Message-ID: <3EAFC8EF.2060808@cdnorthamerica.com> philipp.batchelor at kcl.ac.uk wrote: >Hi, >sorry I can't help directly, but some related information. By >coincidence, I got a very similar error message today, >while running a vtk example in Matlab. This allows me to point out that J. >Lee's suggestion worked for this, after recompiling VTK-4.2.2 with the >Java coming with Matlab (Java 1.3.1 with Blackdown Java-Linux Team Java >HotSpot(TM) Server VM (mixed mode), (but I had to use the jni.h jni_md.h from >jdk1.4)), > this is probably the source of your problems - must use jni.h/jni_md.h from the same java distribution as you are compiling against. You might try jdk1.3.1 from sun. -Jeff >I manage to get vtk code running in Matlab, for example my >modified version of SimpleVTK.java. But when I tried to get the >coordinates of a point from the ConeSource.GetOutput.GetPoint(...), I got >a similar sounding error, see below. Linux is RedHat 7.1, kernel 2.4.2-2. >However, note that SimpleVTK.java, and Cone.java <> as standalone >program! > >Error message: >---------------------------------------- >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x50d7683f >Function name=_ZN11vtkPointSet8GetPointEi >Library=/projects/vtk/linux2.2/vtkNightly/VTK-4.2.2/bin/libvtkCommon.so > >Current Java thread: > at vtk.vtkPointSet.GetPoint_5(Native Method) > at vtk.vtkPointSet.GetPoint(vtkPointSet.java:32) >.........[~300 lines] >Stack Trace: > [0] libjvm.so:os::abort(long)~(0x32326469, 0x6c2e3436, 0x4000676f, >0x405cb740) + 29 bytes > >Ph >------------------------------------------------------------------------- >On Wed, 30 Apr 2003, Olivier Jock wrote: > > > >>I want use VTK on SuSE Linux 7.3 with Java (Version: jdk 1.4). The >>compilation of VTK (Version 4.2.1 and Version 4.2.2) seems to be ok (the >>compiled test examples, e.g. TimeRenderer work fine), but when I try to >>execute the first java example in the tutorial (Cone.java) I get >>everytime the same error. >> >>The error output is as follows: >> >>-------------------------------------- >> >> >>An unexpected exception has been detected in native code outside the VM. >>Unexpected Signal : 11 occurred at PC=0x4C9E0490 >>Function=AddHashEntry__12vtkHashTablePvT1+0x60 >>Library=/opt/Jbuilder8/Jbuilder8/jdk1.4/jre/lib/i386/client/libvtkCommonJava.so >> >>Current Java thread: >> at vtk.vtkPolyData.VTKCastInit(Native Method) >> at vtk.vtkPolyDataSource.GetOutput_2(Native Method) >> at vtk.vtkPolyDataSource.GetOutput(vtkPolyDataSource.java:20) >> at Cone.main(Cone.java:46) >> >>Dynamic libraries: >>08048000-0804e000 r-xp 00000000 03:04 283724 >>/opt/Jbuilder8/Jbuilder8/jdk1.4/bin/java >>0804e000-0804f000 rw-p 00005000 03:04 283724 >>/opt/Jbuilder8/Jbuilder8/jdk1.4/bin/java >>40000000-40014000 r-xp 00000000 03:04 8861 /lib/ld-2.2.4.so >>40014000-40015000 rw-p 00013000 03:04 8861 /lib/ld-2.2.4.so >>... >> >>Local Time = Tue Apr 29 15:39:22 2003 >>Elapsed Time = 136 >># >># The exception above was detected in native code outside the VM >># >># Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode) >># >> >>----------------------------------------------- >> >>I don't know what to do. When debugging the source from Cone.java the >>following line is causing the problem: >> >> coneMapper.SetInput( cone.GetOutput() ); >> >>I have the impression that something is wrong with cone.GetOutput(). >> >>I am glad about any comment regarding this problem. >> >> Thanks >> >> Olivier >>_______________________________________________ >>This is the private VTK discussion list. >>Please keep messages on-topic. Check the FAQ at: >>Follow this link to subscribe/unsubscribe: >>http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > > >_______________________________________________ >This is the private VTK discussion list. >Please keep messages on-topic. Check the FAQ at: >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- Jeff Lee Software Engineer Computational Dynamics North America Ltd 21 Lafayette Street, Suite 230 Lebanon NH 03766 USA fax: 603 643 9994 phone: 603 643 9993 x109 http://www.cd-adapco.com From zsolt at simbiosys.ca Wed Apr 30 11:00:50 2003 From: zsolt at simbiosys.ca (Zsolt Zsoldos) Date: Wed, 30 Apr 2003 11:00:50 -0400 Subject: [vtkusers] Lots of crashes when using VTK 4.2.2 from Java 1.3 Message-ID: <20030430150050.9D0ECEB5@saturn.simbiosys.ca> Hi VTK users, I'm wondering if anybody else is using a similar setup as myself and whether you encountered the same problems as me. I've been using VTK3.2 with JDK 1.1.6 on Linux for several years. I have a Java control window and a separate VTK created 3D window where I'm using interactor. With that old setup it all worked fine, although I had to use a lot of "synchronize" statements in Java without those I was experiencing crashes in X refresh calls a lot, due to some code re-entrance problems. Now, I have upgraded to VTK 4.2.2 and JDK 1.3. The problem is that now I keep getting crashes for every refresh calls and many other calls as well if I add/remove actors from Java based on user actions on the Java control window. So, basically the program starts up, 3D window appears, I get the 3D scene rendered OK, I can rotate/zoom the 3D view. But if there is any change orginating from a user action on the Java control window (basically triggered by a Swing event, which then makes some VTK calls), then the whole program crashes. According to the Java runtime output, the problem that occurs is: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4f290bf8 Function name=glXGetCurrentContext Library=/usr/X11R6/lib/libGL.so I am running this on Linux, using the NVidia hardware accelerated OpenGL library, version 1.0-3123, on XFree86 version 4.2.0. It is important to note, that the same program was running OK with VTK3.2 and JDK1.1.6 using the same OpenGL and X version. I'd like to know if anybody has experienced similar problems and what would be the solution or work-around for this. -- Zsolt Zsoldos, zsolt at simbiosys.ca, http://www.simbiosys.ca/ From nick.smethurst at free.fr Wed Apr 30 12:35:58 2003 From: nick.smethurst at free.fr (N Smethurst) Date: Wed, 30 Apr 2003 18:35:58 +0200 Subject: [vtkusers] vtkTimerLog: leaks (valgrind) In-Reply-To: <3EAF927C.1050901@creatis.insa-lyon.fr> References: <3EAF927C.1050901@creatis.insa-lyon.fr> Message-ID: <200304301835.58258.nick.smethurst@free.fr> My 2 centimes : vtkTimerLogEntry isn't a vtkObject so it has no knowledge of reference counting. Shouldn't the destructor contain clean up code for TimerLog ? vtkTimerLog::~vtkTimerLog() { if (vtkTimerLog::TimerLog != NULL) { delete [] vtkTimerLog::TimerLog; } } > In vtkTimerLog.h, vtkTimerLogEntry is declared as a struct outside of > the class and the allocation is outside of the constructor. So my > question is: Does VTK reference counting works also in that case ? Or is > this a valgrind problem ? From cnavarro at ncsa.uiuc.edu Wed Apr 30 15:28:09 2003 From: cnavarro at ncsa.uiuc.edu (Christopher M. Navarro) Date: Wed, 30 Apr 2003 14:28:09 -0500 (CDT) Subject: [vtkusers] 3D version of vtkScalarBarActor? Message-ID: Out of curiosity, has anyone done a 3d version of vtkScalarBarActor so that it could be set within the scene rather than in the image plane? -chris