From hng.email at gmail.com Sun Feb 1 16:49:46 2009 From: hng.email at gmail.com (Hom Nath Gharti) Date: Sun, 1 Feb 2009 16:49:46 -0500 Subject: [vtkusers] Change color space without vtkColorTransferFunction() Message-ID: Dear all, I am a newbie in vtk. I want to visualize a plane from VTK image data with 'Diverging' color space. Is there a way to change the colorspace without using vtkColorTransferFunction(). I have an impression that this class only works for volume rendering. At least I could not change the colorspace with it for my data. I would greatly appreciate your help/suggestions. Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From mhumperdink at yahoo.com Sun Feb 1 23:18:50 2009 From: mhumperdink at yahoo.com (Marty Humperdink) Date: Sun, 1 Feb 2009 20:18:50 -0800 (PST) Subject: [vtkusers] creating empty vtkImageData in Tcl Message-ID: <280883.73967.qm@web112221.mail.gq1.yahoo.com> Hello. I'm trying to roughly simulate resolution effects that might be seen when CT scanning an object. My thought was to do the following: 1. import an STL model of the object 2. create an empty vtkImageDate object (with extents chosen based on bounds of stl) 3. use vtkPolyDataToImageStencil and vtkImageStencil mask the STL onto the empty image data 4. then use vtkImageReslice to transform, change resolution, etc 5. use vtkContourFilter to make a new polydata model with "chunkiness" like from CT slice thickness, etc I'm working in Tcl/Tk. A while back I wrote a similar little program to mask out a CT data with an imported STL. In that case I was reading in Dicom data. Now I seem to be having problems properly creating an empty/blank vtkImageData into which to stencil the STL. vtkSTLReader targetSTL targetSTL SetFileName $filenameTARGET puts [[targetSTL GetOutput] GetBounds #????? what is the correct way to get the model x,y,z bounds? Just getting 1 -1 1 -1 1 -1 here vtkImageDatamodelAsImage modelAsImage SetDimensions 256 256 256 modelAsImage SetOrigin 0.0 0.0 0.0 modelAsImage SetSpacing 1.0 1.0 1.0 modelAsImage SetExtent 0 255 0 255 0 255 modelAsImage SetScalarTypeToUnsignedShort modelAsImage AllocateScalars set numBlanks [modelAsImage GetNumberOfPoints] for {set i 0} {$i<$numBlanks} {incr i} { [[modelAsImage GetPointData] GetScalars] SetTuple1 $i 0.0 } vtkPolyDataToImageStencil stlToStencil stlToStencil SetInput [targetSTL GetOutput] vtkImageStencil stencil stencil SetInput [modelAsImage GetOutput] # ??????? This line gives an error - modelAsImage not established properly? stencil SetStencil [stlToStencil GetOutput] stencil ReverseStencilOn stencil SetBackgroundValue 1000.0 vtkImageReslice reslice1 reslice1 SetInput [stencil GetOutput] reslice1 SetResliceTransform initPoseTransf reslice1 SetInterpolationModeToCubic reslice1 SetInformationInput [modelAsImage GetOutput] # ??????? This line gives an error - modelAsImage not established properly? I'm having two problems. First, how can I get the bounds of the imported STL and set the extent of the vtkImageData to these values? When I try to use the GetBounds method -1 1 -1 1 -1 1 is returned - not correct for the imported model. Second, I keep getting an error at the lines where I call [modelAsImage GetOutput] saying that the GetOutput method doesn't exist or is called with incorrect options. I've been thinking that I must not have created the empty vtkImageData properly. To test this I imported a set of Dicom data instead of trying to create an empty ImageData and it seemed to work (at least ran without errors). I would very much appreciate any suggestions. Thank you in advance. Marty -------------- next part -------------- An HTML attachment was scrubbed... URL: From amozes77 at yahoo.com Sun Feb 1 23:27:41 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Sun, 1 Feb 2009 20:27:41 -0800 (PST) Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: <951585.62280.qm@web31901.mail.mud.yahoo.com> Message-ID: <53396.24908.qm@web51308.mail.re2.yahoo.com> Not sure why I had to disable video for windows.? I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly).? I got rid of that and still have one problem with the MFC lib which I know I need.? Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag?? Is this a problem with my Windows settings somehow?? My Visual Studio settings?? Or VTK? ? Thanks, Alon --- On Thu, 1/29/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" , vtkusers at vtk.org Date: Thursday, January 29, 2009, 8:14 AM I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. ? Alon Mozes wrote: Hi All, I have a great project using VTK/ITK in an older version of Visual Studio.? I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition).? I've found that I must recompile VTK/ITK to properly do so.? I've started from scratch and installed the latest CMake 2.6?which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1.? For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING.? Then I compile the ALL_BUILD in Visual Studio and I get several errors.? I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away.? I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think?is critical for me): ? C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting ? When I dig a little, I'm taken to the following lines of code: ? #if ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) #error _WIN32_WINNT settings conflicts with _WIN32_IE setting #endif ? Its clearly passing this conditional and triggering this error.? The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass.? What's going on here?? Any help would be greatly appreciated. ? Thanks for the help. _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cole at kitware.com Mon Feb 2 07:28:35 2009 From: david.cole at kitware.com (David Cole) Date: Mon, 2 Feb 2009 07:28:35 -0500 Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: <53396.24908.qm@web51308.mail.re2.yahoo.com> References: <951585.62280.qm@web31901.mail.mud.yahoo.com> <53396.24908.qm@web51308.mail.re2.yahoo.com> Message-ID: Did you not see my response to this thread the other day....? The first three lines of vtkMFCWindow.cpp are the culprit. They read: #ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. #define WINVER 0x0400 #endif Remove them or comment them out and it should work ok with VS2008. Sorry for the inconvenience.... HTH, David On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: > Not sure why I had to disable video for windows. I just know that I > compiled and many errors seems to come from a conflict there (with the vtk > rendering lib if I remember correctly). I got rid of that and still have > one problem with the MFC lib which I know I need. Anyone out there compile > VTK with Visual Studio 2008 while keeping the MFC flag? Is this a problem > with my Windows settings somehow? My Visual Studio settings? Or VTK? > > Thanks, > Alon > > --- On *Thu, 1/29/09, Jim * wrote: > > From: Jim > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" , vtkusers at vtk.org > Date: Thursday, January 29, 2009, 8:14 AM > > > I am doing the same thing and got a bunch of errors. I wonder why you > have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. > > > *Alon Mozes * wrote: > > Hi All, > I have a great project using VTK/ITK in an older version of Visual Studio. > I need to upgrade to the latest version of VS (Visual Studio 2008 > Professional Edition). I've found that I must recompile VTK/ITK to properly > do so. I've started from scratch and installed the latest CMake 2.6 which > offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1. For > the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and > VTK_RENDERING. Then I compile the ALL_BUILD in Visual Studio and I get > several errors. I reconfigured CMake to turn off the > VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away. I'm still stuck > with the following failure (which seems to be in the vtkMFC package which I > think is critical for me): > > C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : > fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE > setting > > When I dig a little, I'm taken to the following lines of code: > > #if > ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) > > #error _WIN32_WINNT settings conflicts with _WIN32_IE setting > #endif > > Its clearly passing this conditional and triggering this error. The weird > thing is that the first part of the conditional should be 0 (the values seem > to be 0x0600 < 0x0500) so the whole thing should not pass. What's going on > here? Any help would be greatly appreciated. > > Thanks for the help. > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paulojamorim at gmail.com Mon Feb 2 07:36:46 2009 From: paulojamorim at gmail.com (Paulo Henrique Junqueira Amorim) Date: Mon, 2 Feb 2009 10:36:46 -0200 Subject: [vtkusers] WindowLevel Question In-Reply-To: References: Message-ID: <98e18c70902020436g6b494badu8dc5379452c92b53@mail.gmail.com> I too have the same questions. 2009/1/30 Paul Jhin > Hi, > > I'm using vtkInteractorStyleImage, I know it is possible to change window > and level without changing the data ? > > Code: > > istyle = vtk.vtkInteractorStyleImage() > istyle.AutoAdjustCameraClippingRangeOn() > interactor.SetInteractorStyle(istyle) > > > Regards, > Paul Jhin > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahs at cfdrc.com Mon Feb 2 09:47:09 2009 From: ahs at cfdrc.com (Amy Squillacote) Date: Mon, 02 Feb 2009 08:47:09 -0600 Subject: [vtkusers] Change color space without vtkColorTransferFunction() In-Reply-To: References: Message-ID: <4987076D.4010603@cfdrc.com> vtkColorTransferFunction is used for specifying the mapping between scalar values and colors. It may be used for both surface and volume rendering. To my knowledge, it is the only subclass of vtkScalarsToColors that lets you choose a color space. If you post a code fragment showing what you're doing, maybe someone could help you figure out where the problem is. - Amy Hom Nath Gharti wrote: > Dear all, > > I am a newbie in vtk. I want to visualize a plane from VTK image data > with 'Diverging' color space. Is there a way to change the colorspace > without using vtkColorTransferFunction(). I have an impression that > this class only works for volume rendering. At least I could not > change the colorspace with it for my data. > > I would greatly appreciate your help/suggestions. > > Thanks, > ------------------------------------------------------------------------ > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Amy Squillacote Phone: (256) 726-4839 Sr. Computer Scientist Fax: (256) 726-4806 CFD Research Corporation Web: http://www.cfdrc.com 215 Wynn Drive, Suite 501 Huntsville, AL 35805 From hng.email at gmail.com Mon Feb 2 10:57:04 2009 From: hng.email at gmail.com (Hom Nath Gharti) Date: Mon, 2 Feb 2009 10:57:04 -0500 Subject: [vtkusers] Change color space without vtkColorTransferFunction() In-Reply-To: <4987076D.4010603@cfdrc.com> References: <4987076D.4010603@cfdrc.com> Message-ID: Thanks for the suggestion. I have the python code like this: import vtk # Create rendering window and renderer ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) renWin.SetSize(600, 600) # Interacting window iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # Read VTK image data reader = vtk.vtkXMLImageDataReader() reader.SetFileName("py_3d_strike0_stack_XY.vti") plane=vtk.vtkImageDataGeometryFilter() plane.SetInputConnection(reader.GetOutputPort()) plane.SetExtent(0, 60, 0, 60, 0, 0) #srange = plane.GetOutput().GetPointData().GetScalars().GetRange() warp = vtk.vtkWarpScalar() warp.SetInputConnection(plane.GetOutputPort()) warp.UseNormalOn warp.SetNormal(0.0,0.0,1.0) warp.SetScaleFactor(2.0) # Color map color=vtk.vtkColorTransferFunction() color.SetColorSpaceToDiverging() vprop=vtk.vtkProperty() vprop.SetColor(color) mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(warp.GetOutputPort()) actor = vtk.vtkActor() actor.SetMapper(mapper) actor.SetProperty(vprop) actor.GetProperty().SetRepresentationToWireframe() actor.SetPosition(0.0,0.0,200.0) #Translate # Add the actors to the renderer, set the background ren.AddActor(actor) ren.ResetCamera() ren.GetActiveCamera().Azimuth(0) ren.GetActiveCamera().Elevation(-70) ren.SetBackground(1.0, 1.0, 1.0) ren.ResetCameraClippingRange() #iren.Initialize() renWin.Render() iren.Start() Obviously I get the error in in ' actor.SetProperty(vprop) ' and I cannot implement vtkVolumeProperty() here. Am I missing something? Any help/suggestions will greatly be appreciated. Thanks, Hom Nath -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahs at cfdrc.com Mon Feb 2 11:06:45 2009 From: ahs at cfdrc.com (Amy Squillacote) Date: Mon, 02 Feb 2009 10:06:45 -0600 Subject: [vtkusers] Change color space without vtkColorTransferFunction() In-Reply-To: References: <4987076D.4010603@cfdrc.com> Message-ID: <49871A15.1010205@cfdrc.com> You don't set the vtkColorTransferFunction on a vtkProperty; you set it on a vtkMapper (or vtkPolyDataMapper, in your case). vtkActor's SetProperty method takes a vtkProperty, so that isn't the problem. - Amy Hom Nath Gharti wrote: > Thanks for the suggestion. I have the python code like this: > > import vtk > > # Create rendering window and renderer > ren = vtk.vtkRenderer() > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren) > renWin.SetSize(600, 600) > > # Interacting window > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > > # Read VTK image data > reader = vtk.vtkXMLImageDataReader() > reader.SetFileName("py_3d_strike0_stack_XY.vti") > > plane=vtk.vtkImageDataGeometryFilter() > plane.SetInputConnection(reader.GetOutputPort()) > plane.SetExtent(0, 60, 0, 60, 0, 0) > #srange = plane.GetOutput().GetPointData().GetScalars().GetRange() > > warp = vtk.vtkWarpScalar() > warp.SetInputConnection(plane.GetOutputPort()) > warp.UseNormalOn > warp.SetNormal(0.0,0.0,1.0) > warp.SetScaleFactor(2.0) > > # Color map > color=vtk.vtkColorTransferFunction() > color.SetColorSpaceToDiverging() > > vprop=vtk.vtkProperty() > vprop.SetColor(color) > > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputConnection(warp.GetOutputPort()) > > actor = vtk.vtkActor() > actor.SetMapper(mapper) > actor.SetProperty(vprop) > actor.GetProperty().SetRepresentationToWireframe() > actor.SetPosition(0.0,0.0,200.0) #Translate > > # Add the actors to the renderer, set the background > ren.AddActor(actor) > > ren.ResetCamera() > ren.GetActiveCamera().Azimuth(0) > ren.GetActiveCamera().Elevation(-70) > ren.SetBackground(1.0, 1.0, 1.0) > ren.ResetCameraClippingRange() > > #iren.Initialize() > renWin.Render() > iren.Start() > > > Obviously I get the error in in ' actor.SetProperty(vprop) ' and I > cannot implement vtkVolumeProperty() here. Am I missing something? > > Any help/suggestions will greatly be appreciated. > > Thanks, > Hom Nath > -- Amy Squillacote Phone: (256) 726-4839 Sr. Computer Scientist Fax: (256) 726-4806 CFD Research Corporation Web: http://www.cfdrc.com 215 Wynn Drive, Suite 501 Huntsville, AL 35805 From hng.email at gmail.com Mon Feb 2 11:29:11 2009 From: hng.email at gmail.com (Hom Nath Gharti) Date: Mon, 2 Feb 2009 11:29:11 -0500 Subject: [vtkusers] Change color space without vtkColorTransferFunction() In-Reply-To: <49871A15.1010205@cfdrc.com> References: <4987076D.4010603@cfdrc.com> <49871A15.1010205@cfdrc.com> Message-ID: Many thanks for the help. Unfortunately I could not figure out the appropriate member of vtkPolyDataMapper() to define the vtkColorTransferFunction(). Would you point me further? Thanks On Mon, Feb 2, 2009 at 11:06 AM, Amy Squillacote wrote: > You don't set the vtkColorTransferFunction on a vtkProperty; you set it on > a vtkMapper (or vtkPolyDataMapper, in your case). vtkActor's SetProperty > method takes a vtkProperty, so that isn't the problem. > > - Amy > > Hom Nath Gharti wrote: > >> Thanks for the suggestion. I have the python code like this: >> >> import vtk >> >> # Create rendering window and renderer >> ren = vtk.vtkRenderer() >> renWin = vtk.vtkRenderWindow() >> renWin.AddRenderer(ren) >> renWin.SetSize(600, 600) >> >> # Interacting window >> iren = vtk.vtkRenderWindowInteractor() >> iren.SetRenderWindow(renWin) >> >> # Read VTK image data >> reader = vtk.vtkXMLImageDataReader() >> reader.SetFileName("py_3d_strike0_stack_XY.vti") >> >> plane=vtk.vtkImageDataGeometryFilter() >> plane.SetInputConnection(reader.GetOutputPort()) >> plane.SetExtent(0, 60, 0, 60, 0, 0) >> #srange = plane.GetOutput().GetPointData().GetScalars().GetRange() >> >> warp = vtk.vtkWarpScalar() >> warp.SetInputConnection(plane.GetOutputPort()) >> warp.UseNormalOn >> warp.SetNormal(0.0,0.0,1.0) >> warp.SetScaleFactor(2.0) >> >> # Color map >> color=vtk.vtkColorTransferFunction() >> color.SetColorSpaceToDiverging() >> >> vprop=vtk.vtkProperty() >> vprop.SetColor(color) >> >> mapper = vtk.vtkPolyDataMapper() >> mapper.SetInputConnection(warp.GetOutputPort()) >> >> actor = vtk.vtkActor() >> actor.SetMapper(mapper) >> actor.SetProperty(vprop) >> actor.GetProperty().SetRepresentationToWireframe() >> actor.SetPosition(0.0,0.0,200.0) #Translate >> >> # Add the actors to the renderer, set the background >> ren.AddActor(actor) >> >> ren.ResetCamera() >> ren.GetActiveCamera().Azimuth(0) >> ren.GetActiveCamera().Elevation(-70) >> ren.SetBackground(1.0, 1.0, 1.0) >> ren.ResetCameraClippingRange() >> >> #iren.Initialize() >> renWin.Render() >> iren.Start() >> >> >> Obviously I get the error in in ' actor.SetProperty(vprop) ' and I cannot >> implement vtkVolumeProperty() here. Am I missing something? >> >> Any help/suggestions will greatly be appreciated. >> >> Thanks, >> Hom Nath >> >> > -- > Amy Squillacote Phone: (256) 726-4839 > Sr. Computer Scientist Fax: (256) 726-4806 > CFD Research Corporation Web: http://www.cfdrc.com > 215 Wynn Drive, Suite 501 > Huntsville, AL 35805 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahs at cfdrc.com Mon Feb 2 11:36:25 2009 From: ahs at cfdrc.com (Amy Squillacote) Date: Mon, 02 Feb 2009 10:36:25 -0600 Subject: [vtkusers] Change color space without vtkColorTransferFunction() In-Reply-To: References: <4987076D.4010603@cfdrc.com> <49871A15.1010205@cfdrc.com> Message-ID: <49872109.1030404@cfdrc.com> SetLookupTable It's defined in vtkMapper, the superclass of vtkPolyDataMapper. - Amy Hom Nath Gharti wrote: > Many thanks for the help. > > Unfortunately I could not figure out the appropriate member of > vtkPolyDataMapper() to define the vtkColorTransferFunction(). Would > you point me further? > > Thanks > > On Mon, Feb 2, 2009 at 11:06 AM, Amy Squillacote > wrote: > > You don't set the vtkColorTransferFunction on a vtkProperty; you > set it on a vtkMapper (or vtkPolyDataMapper, in your case). > vtkActor's SetProperty method takes a vtkProperty, so that isn't > the problem. > > > - Amy > > Hom Nath Gharti wrote: > > Thanks for the suggestion. I have the python code like this: > > import vtk > > # Create rendering window and renderer > ren = vtk.vtkRenderer() > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren) > renWin.SetSize(600, 600) > > # Interacting window > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > > # Read VTK image data > reader = vtk.vtkXMLImageDataReader() > reader.SetFileName("py_3d_strike0_stack_XY.vti") > > plane=vtk.vtkImageDataGeometryFilter() > plane.SetInputConnection(reader.GetOutputPort()) > plane.SetExtent(0, 60, 0, 60, 0, 0) > #srange = plane.GetOutput().GetPointData().GetScalars().GetRange() > > warp = vtk.vtkWarpScalar() > warp.SetInputConnection(plane.GetOutputPort()) > warp.UseNormalOn > warp.SetNormal(0.0,0.0,1.0) > warp.SetScaleFactor(2.0) > > # Color map > color=vtk.vtkColorTransferFunction() > color.SetColorSpaceToDiverging() > > vprop=vtk.vtkProperty() > vprop.SetColor(color) > > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputConnection(warp.GetOutputPort()) > > actor = vtk.vtkActor() > actor.SetMapper(mapper) > actor.SetProperty(vprop) > actor.GetProperty().SetRepresentationToWireframe() > actor.SetPosition(0.0,0.0,200.0) #Translate > > # Add the actors to the renderer, set the background > ren.AddActor(actor) > > ren.ResetCamera() > ren.GetActiveCamera().Azimuth(0) > ren.GetActiveCamera().Elevation(-70) > ren.SetBackground(1.0, 1.0, 1.0) > ren.ResetCameraClippingRange() > > #iren.Initialize() > renWin.Render() > iren.Start() > > > Obviously I get the error in in ' actor.SetProperty(vprop) ' > and I cannot implement vtkVolumeProperty() here. Am I missing > something? > > Any help/suggestions will greatly be appreciated. > > Thanks, > Hom Nath > > > -- > Amy Squillacote Phone: (256) 726-4839 > Sr. Computer Scientist Fax: (256) 726-4806 > CFD Research Corporation Web: http://www.cfdrc.com > 215 Wynn Drive, Suite 501 > Huntsville, AL 35805 > > > -- Amy Squillacote Phone: (256) 726-4839 Sr. Computer Scientist Fax: (256) 726-4806 CFD Research Corporation Web: http://www.cfdrc.com 215 Wynn Drive, Suite 501 Huntsville, AL 35805 From hng.email at gmail.com Mon Feb 2 11:42:59 2009 From: hng.email at gmail.com (Hom Nath Gharti) Date: Mon, 2 Feb 2009 11:42:59 -0500 Subject: [vtkusers] Change color space without vtkColorTransferFunction() In-Reply-To: <49872109.1030404@cfdrc.com> References: <4987076D.4010603@cfdrc.com> <49871A15.1010205@cfdrc.com> <49872109.1030404@cfdrc.com> Message-ID: Thank you very much indeed! Hom Nath On Mon, Feb 2, 2009 at 11:36 AM, Amy Squillacote wrote: > SetLookupTable > > It's defined in vtkMapper, the superclass of vtkPolyDataMapper. > > - Amy > > Hom Nath Gharti wrote: > >> Many thanks for the help. >> >> Unfortunately I could not figure out the appropriate member of >> vtkPolyDataMapper() to define the vtkColorTransferFunction(). Would you >> point me further? >> >> Thanks >> >> On Mon, Feb 2, 2009 at 11:06 AM, Amy Squillacote > ahs at cfdrc.com>> wrote: >> >> You don't set the vtkColorTransferFunction on a vtkProperty; you >> set it on a vtkMapper (or vtkPolyDataMapper, in your case). >> vtkActor's SetProperty method takes a vtkProperty, so that isn't >> the problem. >> >> >> - Amy >> >> Hom Nath Gharti wrote: >> >> Thanks for the suggestion. I have the python code like this: >> >> import vtk >> >> # Create rendering window and renderer >> ren = vtk.vtkRenderer() >> renWin = vtk.vtkRenderWindow() >> renWin.AddRenderer(ren) >> renWin.SetSize(600, 600) >> >> # Interacting window >> iren = vtk.vtkRenderWindowInteractor() >> iren.SetRenderWindow(renWin) >> >> # Read VTK image data >> reader = vtk.vtkXMLImageDataReader() >> reader.SetFileName("py_3d_strike0_stack_XY.vti") >> >> plane=vtk.vtkImageDataGeometryFilter() >> plane.SetInputConnection(reader.GetOutputPort()) >> plane.SetExtent(0, 60, 0, 60, 0, 0) >> #srange = plane.GetOutput().GetPointData().GetScalars().GetRange() >> >> warp = vtk.vtkWarpScalar() >> warp.SetInputConnection(plane.GetOutputPort()) >> warp.UseNormalOn >> warp.SetNormal(0.0,0.0,1.0) >> warp.SetScaleFactor(2.0) >> >> # Color map >> color=vtk.vtkColorTransferFunction() >> color.SetColorSpaceToDiverging() >> >> vprop=vtk.vtkProperty() >> vprop.SetColor(color) >> >> mapper = vtk.vtkPolyDataMapper() >> mapper.SetInputConnection(warp.GetOutputPort()) >> >> actor = vtk.vtkActor() >> actor.SetMapper(mapper) >> actor.SetProperty(vprop) >> actor.GetProperty().SetRepresentationToWireframe() >> actor.SetPosition(0.0,0.0,200.0) #Translate >> >> # Add the actors to the renderer, set the background >> ren.AddActor(actor) >> >> ren.ResetCamera() >> ren.GetActiveCamera().Azimuth(0) >> ren.GetActiveCamera().Elevation(-70) >> ren.SetBackground(1.0, 1.0, 1.0) >> ren.ResetCameraClippingRange() >> >> #iren.Initialize() >> renWin.Render() >> iren.Start() >> >> >> Obviously I get the error in in ' actor.SetProperty(vprop) ' >> and I cannot implement vtkVolumeProperty() here. Am I missing >> something? >> >> Any help/suggestions will greatly be appreciated. >> >> Thanks, >> Hom Nath >> >> >> -- Amy Squillacote Phone: (256) 726-4839 >> Sr. Computer Scientist Fax: (256) 726-4806 >> CFD Research Corporation Web: http://www.cfdrc.com >> 215 Wynn Drive, Suite 501 >> Huntsville, AL 35805 >> >> >> >> > -- > Amy Squillacote Phone: (256) 726-4839 > Sr. Computer Scientist Fax: (256) 726-4806 > CFD Research Corporation Web: http://www.cfdrc.com > 215 Wynn Drive, Suite 501 > Huntsville, AL 35805 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nkwmailinglists at gmail.com Mon Feb 2 11:51:37 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Mon, 2 Feb 2009 10:51:37 -0600 Subject: [vtkusers] vtkVoxelContoursToSurfaceFilter's limitations, alternatives? Message-ID: <44f773f50902020851l7ec02c88g41ba7710ae8a638f@mail.gmail.com> In the documentation for vtkVoxelContourToSurfaceFilter: * The contours are input as vtkPolyData, with the contours being polys in the vtkPolyData. * The contours lie on XY planes - each contour has a constant Z * The contours are ordered in the polys of the vtkPolyData such that all contours on the first (lowest) XY plane are first, then continuing in order of increasing Z value. * The X, Y and Z coordinates are all integer values. * The desired sampling of the contour data is 1x1x1 - Aspect can be used to control the aspect ratio in the output polygonal dataset. This means that if you have, as I do, a collection of contours created with vtkContourWidget, to use this filter I'll have to do the following. 1. Create a new vtkPolyData. 2. Add each contour polygon to the PolyData in sort order, lowest Z to highest z. Also, round/truncate all values to integers. 3. use vtkVoxelContourToSurfaceFilter to generate the surface. 4. Before adding to view, transform to identity frame* My questions: Is this an accurate summary of what needs to happen? Is there some huge performance benefit to this filter over other options? *the hardest thing to get one's head around with the vtkContourWidget is that the points it reports are (according to the documentation) in "world coordinates", but in fact they are permuted, based on the viewing plane. This led me to write the function below, which I can use to permute points back into world coordinates, when I'm using the vtkINRIA3D 'vtkViewImage2D class for display and visualization. vtkViewImage2D helpfully will tell you the Z axis for a given view. inline void GetAxesIndices(vtkViewImage *viewImage, int &xAxis, int &yAxis, int &zAxis, bool &negY) { vtkViewImage2D *viewImage2D(vtkViewImage2D::SafeDownCast(viewImage)); negY = false; zAxis = viewImage2D->GetOrthogonalAxis(viewImage2D->GetOrientation()); switch(zAxis) { case 0: xAxis = 1; yAxis = 2; break; case 1: xAxis = 0; yAxis = 2; break; case 2: xAxis = 0; yAxis = 1; negY = true; break; default: std::cerr << "Unknown axis " << zAxis << std::endl << std::flush; throw; } } From varguna at gmail.com Mon Feb 2 14:15:51 2009 From: varguna at gmail.com (Aytekin Vargun) Date: Mon, 2 Feb 2009 14:15:51 -0500 Subject: [vtkusers] Selecting/Updating Vertices and Edges in vtkGraph Message-ID: Hi, I am trying to use a combination of vtkRenderWindow and vtkSelectionList to pick vertices and edges of a vtkGraph I am displaying. I will add/delete vertices/edges after I get the ids of selected components. The first problem is:When I drag the mouse to make selections, only the edge colors change. As a note, the vertices are small spheres. Shouldn't vertex colors change as well? The second problem is if I try to get the ids of objects being selected, I never get any single id for vertices. I suspect that when I click on a sphere, All the points(or maybe small lines) that construct each sphere are being picked. How can I just get the ids of vertices? By the way, picking succeeds only for one vertex. If I do it for several vertices and if there are edges among them, only the edges are picked! What is the best way of extracting vertices and edges from the vtkSelectionLink? I show how I attempt to do this in the following code. Any suggestions? Thanks a lot for your time and help. Aytekin Here is the first part of my code: ... VTK_CREATE(vtkCallbackCommand,isPicked); isPicked->SetCallback(processVertexSelection); VTK_CREATE(vtkSelectionLink,link); VTK_CREATE(vtkSurfaceRepresentation, selections); selections->SetInputConnection(poly->GetOutputPort()); selections->SetSelectionLink(link); view->AddRepresentation(selections); view->Update(); isPicked->SetClientData((void *)static_cast(link)); iren->AddObserver(vtkCommand::LeftButtonReleaseEvent,isPicked); ... And some parts of the the function to be called after picking: void processVertexSelection(vtkObject* caller, unsigned long event, void* clientdata, void* callerdata) { vtkSelection *p = static_cast(clientdata)->GetSelection(); printf("I got %d nodes\n",p->GetNumberOfNodes()); for(int counter=0; counterGetNumberOfNodes(); counter++) { vtkSelectionNode *n = p->GetNode(counter); //n->SetFieldType(vtkSelectionNode::EDGE); //n->SetContentType(vtkSelectionNode::INDICES); printf("FieldType for %d is %d\n",counter,n->GetFieldType()); cout<<"Num of Tuples: "<GetSelectionList()->GetNumberOfTuples(); cout<GetSelectionList(); for (int i=0;iGetSelectionList()->GetNumberOfTuples();i++) { vtkVariant aaa=arra->GetVariantValue(i); cout<<"Type : "<GetContentType()< From Shekhar.Chandra at sci.monash.edu.au Mon Feb 2 19:32:07 2009 From: Shekhar.Chandra at sci.monash.edu.au (shekharc) Date: Tue, 03 Feb 2009 11:32:07 +1100 Subject: [vtkusers] WindowLevel Question In-Reply-To: <98e18c70902020436g6b494badu8dc5379452c92b53@mail.gmail.com> References: <98e18c70902020436g6b494badu8dc5379452c92b53@mail.gmail.com> Message-ID: <49879087.8050207@sci.monash.edu.au> Hi Guys, Have a look at vtkImageMapToWindowLevelColors class. It is automatically used in vtkImageViewer2 class where u just need to call functions SetColorWindow (double s) SetColorLevel (double s) Hope that helps Cheers Shakes Paulo Henrique Junqueira Amorim wrote: > I too have the same questions. > > > > > > 2009/1/30 Paul Jhin > > > Hi, > > I'm using vtkInteractorStyleImage, I know it is possible to change > window and level without changing the data ? > > Code: > > istyle = vtk.vtkInteractorStyleImage() > istyle.AutoAdjustCameraClippingRangeOn() > interactor.SetInteractorStyle(istyle) > > > Regards, > Paul Jhin > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > ------------------------------------------------------------------------ > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From paulojamorim at gmail.com Mon Feb 2 21:08:10 2009 From: paulojamorim at gmail.com (Paulo Henrique Junqueira Amorim) Date: Tue, 3 Feb 2009 00:08:10 -0200 Subject: [vtkusers] WindowLevel Question In-Reply-To: <49879087.8050207@sci.monash.edu.au> References: <98e18c70902020436g6b494badu8dc5379452c92b53@mail.gmail.com> <49879087.8050207@sci.monash.edu.au> Message-ID: <98e18c70902021808y2eace675me9fddc8ed429a0dc@mail.gmail.com> Thank's Shekhar! 2009/2/2 shekharc > Hi Guys, > > Have a look at vtkImageMapToWindowLevelColors class. It is automatically > used in vtkImageViewer2 class where u just need to call functions > > SetColorWindow (double s) > SetColorLevel (double s) > > Hope that helps > Cheers > Shakes > > Paulo Henrique Junqueira Amorim wrote: > >> I too have the same questions. >> >> >> >> >> >> 2009/1/30 Paul Jhin > >> >> >> Hi, >> >> I'm using vtkInteractorStyleImage, I know it is possible to change >> window and level without changing the data ? >> >> Code: >> >> istyle = vtk.vtkInteractorStyleImage() >> istyle.AutoAdjustCameraClippingRangeOn() >> interactor.SetInteractorStyle(istyle) >> >> >> Regards, >> Paul Jhin >> >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amozes77 at yahoo.com Mon Feb 2 22:23:44 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Mon, 2 Feb 2009 19:23:44 -0800 (PST) Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: Message-ID: <703408.60334.qm@web51301.mail.re2.yahoo.com> Sorry, I must have missed that post!? (Maybe a poor choice by my spam filter...) ? This fixes it.? Thanks! --- On Mon, 2/2/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Monday, February 2, 2009, 4:28 AM Did you not see my response to this thread the other day....? ? The first three lines of vtkMFCWindow.cpp are the culprit. They read: ? #ifndef WINVER ? ?// Allow use of features specific to Windows 95 and Windows NT 4 or later. ? #define WINVER 0x0400 ? #endif ? Remove them or comment them out and it should work ok with VS2008. ? Sorry for the inconvenience.... HTH, David On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: Not sure why I had to disable video for windows.? I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly).? I got rid of that and still have one problem with the MFC lib which I know I need.? Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag?? Is this a problem with my Windows settings somehow?? My Visual Studio settings?? Or VTK? ? Thanks, Alon --- On Thu, 1/29/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" , vtkusers at vtk.org Date: Thursday, January 29, 2009, 8:14 AM I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. ? Alon Mozes wrote: Hi All, I have a great project using VTK/ITK in an older version of Visual Studio.? I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition).? I've found that I must recompile VTK/ITK to properly do so.? I've started from scratch and installed the latest CMake 2.6?which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1.? For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING.? Then I compile the ALL_BUILD in Visual Studio and I get several errors.? I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away.? I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think?is critical for me): ? C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting ? When I dig a little, I'm taken to the following lines of code: ? #if((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) #error _WIN32_WINNT settings conflicts with _WIN32_IE setting #endif ? Its clearly passing this conditional and triggering this error.? The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass.? What's going on here?? Any help would be greatly appreciated. ? Thanks for the help. _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From wassim_belhadj at topnet.tn Tue Feb 3 03:33:22 2009 From: wassim_belhadj at topnet.tn (wassim_belhadj at topnet.tn) Date: Tue, 3 Feb 2009 09:33:22 +0100 Subject: [vtkusers] =?utf-8?q?vtkKWEGPUVolumeRayCastMapper=3A_How_to_impro?= =?utf-8?q?ve_the_quality_of_the_volume_Rendering=3F?= Message-ID: <5a13c4930df648ad86866952026595c8@pop.topnet.tn> Dear list, I tested the new vtkKWEGPUVolumeRayCastMapper provided by VTKEdge and I was disappointed by the result obtained. Before the released of VTKEdge, I used the vtkVolumeRayCastMapper provided by Vtk. I had an excellent result (graphics rendering ) but a bad interaction (slow). I hoped to resolve this problem with the use of the new mapper of VTKEdge(vtkKWEGPUVolumeRayCastMapper) but I got a bad volume rendering with a Good interection. I used the example provided with sources of VTKEdge : GPURenderDemo -DICOM "" -CT_Bone How to improve the quality of the volume Rendering using vtkKWEGPUVolumeRayCastMapper? Is there a setting to do? My system configuration: - Windows XP SP3; - Visual Studio 2005 SP1; - CPU: QuadCore Intel Core 2 Extreme QX9550 (2.83 Ghz) - FSB 1600 Mhz; - GPU: NVidia Geforce 9800 GTX+ - RAM: 3 GB THank you in advance Best Regards, BELHADJ wassim From aurora-web at live.jp Tue Feb 3 04:56:00 2009 From: aurora-web at live.jp (Aurora on web) Date: Tue, 3 Feb 2009 18:56:00 +0900 Subject: [vtkusers] Problem to develop vtk-java applet applications. Message-ID: Hi every one. I'm working on a interactive vtk model viewer with java applet. This is the 1st time I tried to develop the vtk-java applet. I already have built vtk-java library and "vtk.jar" and confirmed that stand-alone vtk-java application (not java applet) were able to be compiled and excuted with java command like below successfully. ============================================================ G:\MyProjects\Java\vtkSamples>javac -classpath G:\MyProjects\Java\vtkSample\vtk.jar;G:\MyProjects\Java\vtkSamples Simple.java G:\MyProjects\Java\vtkSamples>java -classpath G:\MyProjects\Java\vtkSample\vtk.jar;G:\MyProjects\Java\vtkSamples Simple ============================================================ The vtk.jar was obtained in C:\MyTemp\Build\Development\vtk-5.2.0\binary\bin where I built vtk 5.2.0 for java. However, I failed to excute very simple vtk-java program which renders the cone object. (In compilation with javac, there were no cautions. but applet on browser displayed nothing and java console output some errors.) I show you the code and what I did on command prompt. Code of "SimpleApplet.java" ------------------------------------------------------------ import java.applet.*; import java.awt.*; import vtk.*; public class SimpleApplet extends Applet{ public void init() { vtkPanel panel = new vtkPanel(); vtkConeSource cs = new vtkConeSource(); cs.SetRadius(2); cs.SetAngle(15); cs.SetHeight(1); vtkPolyDataMapper map = new vtkPolyDataMapper(); vtkActor actor = new vtkActor(); map.SetInput(cs.GetOutput()); actor.SetMapper(map); panel.GetRenderer().AddActor(actor); add(panel, "Center"); } } ------------------------------------------------------------ Compilation of "SimpleApplet.java" and construction of jar ============================================================ G:\MyProjects\Java\vtkSamples>javac -classpath G:\MyProjects\Java\vtkSample\vtk.jar;G:\MyProjects\Java\vtkSamples SimpleApplet.java G:\MyProjects\Java\vtkSamples>jar cvf SimpleApplet.jar SimpleApplet.class vtk.jar ============================================================ And I make a html file which call the applet. Source of "SimpleApplet.html" ------------------------------------------------------------ vtk applet testing ------------------------------------------------------------ I got some error messages on the java console display. ------------------------------------------------------------ java.lang.NoClassDefFoundError: vtk/vtkMapper at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at sun.applet.AppletPanel.createApplet(Unknown Source) at sun.plugin.AppletViewer.createApplet(Unknown Source) at sun.applet.AppletPanel.runLoader(Unknown Source) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: vtk.vtkMapper at sun.applet.AppletClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 10 more ------------------------------------------------------------ I've searched some explanation about java-vtk applet. Some old documents says "vtkdll.dll, vtkjava.dll, and vtk.jar are required" but I can't find vtkdll.dll and vtkjava.dll in the build directory. What's wrong with developing class and jar file and calling it from browser? I would be happy if someone know how to make java-vtk applet properly and answer my questions. Thank you very much. _________________________________________________________________ ????????????????????????????????? http://ch.nicovideo.jp/channel/ch168 From edsb at hotmail.it Tue Feb 3 05:17:54 2009 From: edsb at hotmail.it (EDSB EDSB) Date: Tue, 3 Feb 2009 11:17:54 +0100 Subject: [vtkusers] tubular structure Message-ID: Hi there, I am very new to VTK and I am using it by its Phyton wrapper. I would like to create a tubular structure and I want to put as input the radius and the centroidal axis (that is a spline). Do I have to use the vtkTubeFilter,isn't it? Where can I inupt my spline? Could you help me with an example? Thank a lot for your help! Mary _________________________________________________________________ 25 GB di spazio online per archiviare i tuoi file. Gratis! http://www.messenger.it/skydrive.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From agpxnet at yahoo.it Tue Feb 3 06:49:12 2009 From: agpxnet at yahoo.it (AGPX) Date: Tue, 3 Feb 2009 11:49:12 +0000 (GMT) Subject: [vtkusers] vtkKWEGPUVolumeRayCastMapper: How to improve the quality of the volume Rendering? References: <5a13c4930df648ad86866952026595c8@pop.topnet.tn> Message-ID: <574640.91224.qm@web26604.mail.ukl.yahoo.com> Hi, What did you mean for "bad quality"? I use vtkKWEGPUVolumeRayCastMapper daily and its rendering quality is not inferior to the software ray cast mapper provided by VTK. Actually, I have only discovered some rendering bug (deformation of the volume, look at my previous post for more info and videos) and another potential bug when you set up clipping planes (although I'm pretty sure that this is a bug, I haven't posted this issue yet because I need to do more accurate test). I haven't tested the GPURenderDemo, but there are lots of settings that can influence the rendering quality like the sampling distance. Also a bad color/opacity transfer function can produce bad visual results. Check these parameters. My two cents, - AGPX ________________________________ Da: "wassim_belhadj at topnet.tn" A: vtkedge at vtkedge.org Cc: vtkusers at vtk.org Inviato: Marted? 3 febbraio 2009, 9:33:22 Oggetto: [vtkusers] vtkKWEGPUVolumeRayCastMapper: How to improve the quality of the volume Rendering? Dear list, I tested the new vtkKWEGPUVolumeRayCastMapper provided by VTKEdge and I was disappointed by the result obtained. Before the released of VTKEdge, I used the vtkVolumeRayCastMapper provided by Vtk. I had an excellent result (graphics rendering ) but a bad interaction (slow). I hoped to resolve this problem with the use of the new mapper of VTKEdge(vtkKWEGPUVolumeRayCastMapper) but I got a bad volume rendering with a Good interection. I used the example provided with sources of VTKEdge : GPURenderDemo -DICOM "" -CT_Bone How to improve the quality of the volume Rendering using vtkKWEGPUVolumeRayCastMapper? Is there a setting to do? My system configuration: - Windows XP SP3; - Visual Studio 2005 SP1; - CPU: QuadCore Intel Core 2 Extreme QX9550 (2.83 Ghz) - FSB 1600 Mhz; - GPU: NVidia Geforce 9800 GTX+ - RAM: 3 GB THank you in advance Best Regards, BELHADJ wassim _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From nourmestiri at yahoo.fr Tue Feb 3 09:55:46 2009 From: nourmestiri at yahoo.fr (Nour Mestiri) Date: Tue, 3 Feb 2009 14:55:46 +0000 (GMT) Subject: [vtkusers] Conversion from VRML into VTK format In-Reply-To: <49819E07.2060302@doc.ic.ac.uk> Message-ID: <972029.59651.qm@web28203.mail.ukl.yahoo.com> Thank you Fabian for your help. The code runs perfectly and?i have good results. --- En date de?: Jeu 29.1.09, Fabian Wanner a ?crit?: De: Fabian Wanner Objet: Re: [vtkusers] Conversion from VRML into VTK format ?: nourmestiri at yahoo.fr Date: Jeudi 29 Janvier 2009, 12h16 Hey, I don't have my code on me right now, but I am sure that I am not using a GeometryFilter at all. Instead I am going directly from the vtkDataSet to the vtkPolyData. It should look similar to this. vtkPolyData *polyData = vtkPolyData::SafeDownCast(pDataset); I changed parts in your code, which I think are wrong (written in red). 1. If you set the Header you also have to write it. This has to be done before inserting the line *vtkFile << "DATASET POLYDATA\n"; 2. You problably also want to write the points, so I added that line. vtkVRMLImporter *imp = vtkVRMLImporter::New(); imp->SetFileName(Fichier); imp->Read(); imp->Update(); vtkDataSet *pDataset; vtkActorCollection *actors = imp->GetRenderer()->GetActors(); actors->InitTraversal(); pDataset = actors->GetNextActor()->GetMapper()->GetInput(); ? vtkPolyData *polyData = vtkPolyData::SafeDownCast(pDataset); polyData->Update(); ? vtkPolyDataWriter *writer = vtkPolyDataWriter::New(); strcat(vrmlFileName,".vtk"); writer->SetFileName(vrmlFileName); writer->SetFileTypeToASCII(); ? ostream *vtkFile = writer->OpenVTKFile(); writer->SetHeader("vtkFile"); writer->WriteHeader(vtkFile); *vtkFile << "DATASET POLYDATA\n"; writer->WritePoints(vtkFile, polyData->GetPoints()); writer->WriteCells(vtkFile, polyData->GetPolys(), "POLYGONS"); writer->CloseVTKFile(vtkFile); Hope this works now Fabian Nour Mestiri wrote: Hey Fabian, Thank you one more time for your helpful answer. I did what you told me, but i always have problems. I post you my new code and please try to tell me what is wrong on it. Can you also telle me how to use the "SafeDownCast" method for the "GeometryFilter"? ? vtkVRMLImporter *imp = vtkVRMLImporter::New(); imp->SetFileName(Fichier); imp->Read(); imp->Update(); vtkDataSet *pDataset; vtkActorCollection *actors = imp->GetRenderer()->GetActors(); actors->InitTraversal(); pDataset = actors->GetNextActor()->GetMapper()->GetInput(); ? vtkGeometryFilter *geometryFilter = vtkGeometryFilter::New(); geometryFilter->SetInput(pDataset); ??? vtkPolyData *polyData = vtkPolyData::New(); polyData = geometryFilter->GetOutput(); polyData->Update(); ? vtkPolyDataWriter *writer = vtkPolyDataWriter::New(); strcat(vrmlFileName,".vtk"); writer->SetFileName(vrmlFileName); writer->SetFileTypeToASCII(); ? ostream *vtkFile = writer->OpenVTKFile(); *vtkFile << "DATASET POLYDATA\n"; writer->SetHeader("vtkFile"); writer->WriteCells(vtkFile, polyData->GetPolys(), "POLYGONS"); writer->CloseVTKFile(vtkFile); ? Thank you sooo much --- En date de?: Jeu 22.1.09, Fabian Wanner a ?crit?: De: Fabian Wanner Objet: Re: [vtkusers] Conversion from VRML into VTK format ?: nourmestiri at yahoo.fr Cc: "vtk" Date: Jeudi 22 Janvier 2009, 20h50 Hello Nour, the main part of your code is exactly the same as mine, but there are a few differences. 1. I had problems with the vtkGeometryFilter, so instead of doing that I used the static SafeDownCast method of the vtkPolyData and passed in the vtkDataSet. 2. You are writing the PointData, which is only the texture information. If you want to write the actual coordinates, you should do something like this: writer->WritePoints(vtkFile, polyData1->GetPoints()); For writing the polygon or line information use something similar to this: writer->WriteCells(vtkFile, polyData1->GetPolys(), "POLYGONS"); The label has to be the one mentioned on this website http://www.cacr.caltech.edu/~slombey/asci/vtk/vtk_formats.simple.html under DataSet Format -> Polygonal Data 3. Unfortunately the line "DATASET POLYDATA" is not written by the vtkPolyDataWriter. After writing the header you should add the line (this took me a long time to find out): *vtkFile << "DATASET POLYDATA\n"; This is necessary for the vtkReader to understand what type of data can be found in the file. I didn't test anything I mentioned here, but this is how it works for me, so I hope it does for you as well. Please let me know if there are any problems. Fabian Nour Mestiri wrote: > Hi all vtk users, > I have a VRML file and i want to convert it into VTK files. I found a code but i have some problems with it : > vtkVRMLImporter *imp1 = vtkVRMLImporter::New(); > imp1->SetFileName("C:/vrmlFile"); > imp1->Read(); > imp1->Update(); > vtkDataSet *pDataset1; > vtkActorCollection *actors1 = imp1->GetRenderer()->GetActors(); > actors1->InitTraversal(); > pDataset1 = actors1->GetNextActor()->GetMapper()->GetInput(); > vtkGeometryFilter *geometryFilter1 = vtkGeometryFilter::New(); > geometryFilter1->SetInput(pDataset1); > vtkPolyData *polyData1 = vtkPolyData::New(); > polyData1 = geometryFilter1->GetOutput(); > polyData1->Update(); > vtkDataSetWriter *writer1 = vtkDataSetWriter::New(); > writer1->SetInput(polyData1); > writer1->SetFileName(OutputFile); > writer1->SetFileTypeToASCII(); > ostream *vtkFile1 = writer1->OpenVTKFile(); > writer1->WriteHeader(vtkFile); > writer1->WritePointData(vtkFile, pDataset1); > writer1->CloseVTKFile(vtkFile); > Can you tell me if that code makes the conversion from VRML to VTK format? > If yes, can you specify me the extensions to add for "OutputFile" and "vtkFile"? > Thank you sooooo much for your help. > > > ------------------------------------------------------------------------ > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nourmestiri at yahoo.fr Tue Feb 3 10:01:53 2009 From: nourmestiri at yahoo.fr (Nour Mestiri) Date: Tue, 3 Feb 2009 15:01:53 +0000 (GMT) Subject: [vtkusers] Convert file from VRML to VTP Message-ID: <842031.54706.qm@web28202.mail.ukl.yahoo.com> Hi all vtk users. I need a method which allows me to convert VRML file to VTP file. Can someone help me? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From nkwmailinglists at gmail.com Tue Feb 3 10:02:41 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Tue, 3 Feb 2009 09:02:41 -0600 Subject: [vtkusers] vtkVoxelContoursToSurfaceFilter's limitations, alternatives? In-Reply-To: <44f773f50902020851l7ec02c88g41ba7710ae8a638f@mail.gmail.com> References: <44f773f50902020851l7ec02c88g41ba7710ae8a638f@mail.gmail.com> Message-ID: <44f773f50902030702v48502bf9w69737cb5f04b4fee@mail.gmail.com> NOTE: I posted this yesterday and never saw it show up on the vtkusers list. If you're on the VTK users mailing list and you do see it show up, please hit me back with a private E-Mail. In the documentation for vtkVoxelContourToSurfaceFilter: * The contours are input as vtkPolyData, with the contours being polys in the vtkPolyData. * The contours lie on XY planes - each contour has a constant Z * The contours are ordered in the polys of the vtkPolyData such that all contours on the first (lowest) XY plane are first, then continuing in order of increasing Z value. * The X, Y and Z coordinates are all integer values. * The desired sampling of the contour data is 1x1x1 - Aspect can be used to control the aspect ratio in the output polygonal dataset. This means that if you have, as I do, a collection of contours created with vtkContourWidget, to use this filter I'll have to do the following. 1. Create a new vtkPolyData. 2. Add each contour polygon to the PolyData in sort order, lowest Z to highest z. Also, round/truncate all values to integers. 3. use vtkVoxelContourToSurfaceFilter to generate the surface. 4. Before adding to view, transform to identity frame* My questions: Is this an accurate summary of what needs to happen? Is there some huge performance benefit to this filter over other options? *the hardest thing to get one's head around with the vtkContourWidget is that the points it reports are (according to the documentation) in "world coordinates", but in fact they are permuted, based on the viewing plane. This led me to write the function below, which I can use to permute points back into world coordinates, when I'm using the vtkINRIA3D 'vtkViewImage2D class for display and visualization. vtkViewImage2D helpfully will tell you the Z axis for a given view. inline void GetAxesIndices(vtkViewImage *viewImage, int &xAxis, int &yAxis, int &zAxis, bool &negY) { vtkViewImage2D *viewImage2D(vtkViewImage2D::SafeDownCast(viewImage)); negY = false; zAxis = viewImage2D->GetOrthogonalAxis(viewImage2D->GetOrientation()); switch(zAxis) { case 0: xAxis = 1; yAxis = 2; break; case 1: xAxis = 0; yAxis = 2; break; case 2: xAxis = 0; yAxis = 1; negY = true; break; default: std::cerr << "Unknown axis " << zAxis << std::endl << std::flush; throw; } } From nourmestiri at yahoo.fr Tue Feb 3 10:17:10 2009 From: nourmestiri at yahoo.fr (Nour Mestiri) Date: Tue, 3 Feb 2009 15:17:10 +0000 (GMT) Subject: [vtkusers] Need VRML files Message-ID: <482309.75016.qm@web28204.mail.ukl.yahoo.com> Hi all vtk users. I need skull images in VRML format. Can someone help me or tell me where can i find such files? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From louxkr at gmail.com Tue Feb 3 10:21:45 2009 From: louxkr at gmail.com (Kerry Loux) Date: Tue, 3 Feb 2009 10:21:45 -0500 Subject: [vtkusers] Multiple Y-Axis on 2D Plots Message-ID: <65c344fe0902030721x13106a30k57a94a63e4caf4d1@mail.gmail.com> Hello all, I'm using a class derived from vtkXYPlotActor to plot several series of data on the same set of axis. Some sets of data have very different ranges from other sets and the result is that both data sets appear to be horizontal lines, one at the top of the y-axis, and one at the bottom. Has anyone run into this problem before? Is it possible to create multiple y-axes with different scales so the data sets can use independent ranges? Thanks, Kerry -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.baumes at kitware.com Tue Feb 3 11:04:04 2009 From: jeff.baumes at kitware.com (Jeff Baumes) Date: Tue, 3 Feb 2009 11:04:04 -0500 Subject: [vtkusers] Selecting/Updating Vertices and Edges in vtkGraph In-Reply-To: References: Message-ID: <2137e33e0902030804i329e22feld11462b86e98cac7@mail.gmail.com> > The first problem is:When I drag the mouse to make selections, only the edge > colors change. As a note, the vertices are small spheres. Shouldn't vertex > colors change as well? It looks like you are using two vtkSurfaceRepresentation objects in a vtkRenderView, is this correct? One for the glyphed vertices, and one for the edges. The vertex sphere glyphs likely won't pick like you want them to. The default picker is a hardware cell picker. It should pick some cells on the spheres (try zooming in and selecting part of a sphere), but won't select the vertex as a whole. You can make sure the entire vertex sphere is selected by adding pedigree ids to the vertex and edge data of the original graph (e.g. g->GetEdgeData()->SetPedigreeIds(arr)), filling these arrays with unique integer ids. Then you can call view->SetSelectionType(vtkSelectionNode::PEDIGREEIDS). > What is the best way of extracting vertices and edges from the > vtkSelectionLink? I show how I attempt to do this in the following code. Any > suggestions? Your code for getting the selection seems reasonable. It should have two nodes in the selection, one for vertices and the other for edges. The selection field type of both will be CELL since you converted the graph to polydata before giving it to the view. From agpxnet at yahoo.it Tue Feb 3 11:21:28 2009 From: agpxnet at yahoo.it (AGPX) Date: Tue, 3 Feb 2009 16:21:28 +0000 (GMT) Subject: [vtkusers] Create and place widgets programmatically Message-ID: <700790.67241.qm@web26603.mail.ukl.yahoo.com> Hi, I need to save and load some widgets (distance widget, angle widget, etc...). I cannot find a way to create and place these widgets programmatically. Look at that example (for distance widget): vtkDistanceWidget *widget = vtkDistanceWidget::New(); widget->SetInteractor(Interactor); vtkPointHandleRepresentation2D *handle = vtkPointHandleRepresentation2D::New(); handle->GetProperty()->SetColor(1, 0, 0); vtkDistanceRepresentation2D *rep = vtkDistanceRepresentation2D::New(); rep->SetHandleRepresentation(handle); rep->GetAxis()->SetNumberOfMinorTicks(4); rep->GetAxis()->SetTickLength(9); rep->GetAxis()->SetTitlePosition(0.2); widget->SetRepresentation(rep); widget->On(); I have tried to place the points manually with a code like the following: double pos1[3] = { ......., 0 }, pos2[3] = { ......, 0 }; rep->SetPoint1DisplayPosition(pos1); rep->SetPoint2DisplayPosition(pos2); but nothing happen. What I have to do? Many thanks in advance, - AGPX -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.baumes at kitware.com Tue Feb 3 11:23:27 2009 From: jeff.baumes at kitware.com (Jeff Baumes) Date: Tue, 3 Feb 2009 11:23:27 -0500 Subject: [vtkusers] vtkSelectionNode and Java In-Reply-To: <7b3bdec70901110452k26e9c52by65821da07b2a7655@mail.gmail.com> References: <98F4F34B-E33A-42E9-B1ED-7ECACC8F7A41@ruhr-uni-bochum.de> <7b3bdec70901110452k26e9c52by65821da07b2a7655@mail.gmail.com> Message-ID: <2137e33e0902030823oe9ffaabtccaf9c614896ebd7@mail.gmail.com> > This is a bug in VTK, see http://www.vtk.org/Bug/view.php?id=6723 The following commit fixes the issue, using escapeMethodNameJava-2.patch from the bug report. Thanks to those who reported this and submitted a patch to fix it. /cvsroot/VTK/VTK/Wrapping/vtkWrapJava.c,v <-- Wrapping/vtkWrapJava.c new revision: 1.62; previous revision: 1.61 Jeff From bouzim at gmail.com Tue Feb 3 12:07:22 2009 From: bouzim at gmail.com (Denis Barbier) Date: Tue, 3 Feb 2009 18:07:22 +0100 Subject: [vtkusers] vtkSelectionNode and Java In-Reply-To: <2137e33e0902030823oe9ffaabtccaf9c614896ebd7@mail.gmail.com> References: <98F4F34B-E33A-42E9-B1ED-7ECACC8F7A41@ruhr-uni-bochum.de> <7b3bdec70901110452k26e9c52by65821da07b2a7655@mail.gmail.com> <2137e33e0902030823oe9ffaabtccaf9c614896ebd7@mail.gmail.com> Message-ID: <7b3bdec70902030907ha04fa16sf773f1649e6d9dff@mail.gmail.com> On 2009/2/3, Jeff Baumes wrote: >> This is a bug in VTK, see http://www.vtk.org/Bug/view.php?id=6723 > > The following commit fixes the issue, using > escapeMethodNameJava-2.patch from the bug report. Thanks to those who > reported this and submitted a patch to fix it. > > /cvsroot/VTK/VTK/Wrapping/vtkWrapJava.c,v <-- Wrapping/vtkWrapJava.c > new revision: 1.62; previous revision: 1.61 That's great, thanks for taking care! Denis From arturo_caissut at tiscali.it Tue Feb 3 12:27:00 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Tue, 03 Feb 2009 18:27:00 +0100 Subject: [vtkusers] VTK on Java with Netbeans Message-ID: <49887E64.5050602@tiscali.it> Hi, is there anybody here experienced in using VTK with Netbeans IDE? I have to prepare some java based vtk program, but I cannot figure out how to make Netbeans use my VTK libraries. Thanks, Arturo From daviddoria at gmail.com Tue Feb 3 13:24:49 2009 From: daviddoria at gmail.com (daviddoria) Date: Tue, 3 Feb 2009 10:24:49 -0800 (PST) Subject: [vtkusers] Some things cannot be saved as VTP? Message-ID: <21815835.post@talk.nabble.com> In paraview when I do some operations (ie Delaunay 3D), I cannot save the result as a vtp file. I already have a VTP reader/writer working in c++, so it would just be much simpler if I could export the result as a vtp file instead of the choices it gives me (pvd, vtu, vtk) and then having to get another converter working in c++. Is there a way to do this in paraview? Thanks, Dave -- View this message in context: http://www.nabble.com/Some-things-cannot-be-saved-as-VTP--tp21815835p21815835.html Sent from the VTK - Users mailing list archive at Nabble.com. From ahs at cfdrc.com Tue Feb 3 14:24:16 2009 From: ahs at cfdrc.com (Amy Squillacote) Date: Tue, 03 Feb 2009 13:24:16 -0600 Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <21815835.post@talk.nabble.com> References: <21815835.post@talk.nabble.com> Message-ID: <498899E0.20702@cfdrc.com> Hi Dave, The output of Delaunay 3D is an unstructured grid, not a polygonal dataset. VTP files are for storing polygonal datasets (i.e., vtkPolyData). VTU files are for storing unstructured grids. If you want to store the output of Delaunay 3D in a VTP file, you'll have to convert your vtkUnstructuredGrid to a vtkPolyData. You could do this, for example, with a surface filter (called "Extract Surface") in ParaView. However, this will keep the polygonal outer surface of your unstructured grid, not all the tetrahedra generated by Delaunay 3D. - Amy daviddoria wrote: > In paraview when I do some operations (ie Delaunay 3D), I cannot save the > result as a vtp file. I already have a VTP reader/writer working in c++, so > it would just be much simpler if I could export the result as a vtp file > instead of the choices it gives me (pvd, vtu, vtk) and then having to get > another converter working in c++. > > Is there a way to do this in paraview? > > Thanks, > > Dave > -- Amy Squillacote Phone: (256) 726-4839 Sr. Computer Scientist Fax: (256) 726-4806 CFD Research Corporation Web: http://www.cfdrc.com 215 Wynn Drive, Suite 501 Huntsville, AL 35805 From daviddoria at gmail.com Tue Feb 3 16:01:19 2009 From: daviddoria at gmail.com (daviddoria) Date: Tue, 3 Feb 2009 13:01:19 -0800 (PST) Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <498899E0.20702@cfdrc.com> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> Message-ID: <21818848.post@talk.nabble.com> Awesome - thanks Amy. I extracted the surface, then I was allowed to save it as a vtp (I only wanted the surface anyway!) Now another question - I have a point cloud of a car and I want to make a triangulated model of it. 3D Delaunay did a decent job, but you can see (http://rpi.edu/~doriad/car.jpg) there are some major artifacts, like the side view mirrors are attached to the body of the car by very long triangles. I didn't exactly understand what the few parameters were for in the delaunay filter, but tweaking them didn't seem to change that kind of thing. Is there a better way to get a surface out of these points? Thanks! Dave -- View this message in context: http://www.nabble.com/Some-things-cannot-be-saved-as-VTP--tp21815835p21818848.html Sent from the VTK - Users mailing list archive at Nabble.com. From amozes77 at yahoo.com Tue Feb 3 21:15:35 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Tue, 3 Feb 2009 18:15:35 -0800 (PST) Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: Message-ID: <48481.1426.qm@web51305.mail.re2.yahoo.com> Maybe I spoke too soon... ? I'm able to compile VTK now without complaints about MFC.? However, now I try to compile my application and I get an error: ? 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or directory ? I include vtkMFCWindow.h in one of my own project header files, and that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere (I do find a vtkMFCConfigure.h.in in the vtk source folder).? I am using VTK 5.2.1.? I checked the previous version I was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include vtkMFCConfigure.h.? Instead, it includes vtkConfigure.h, so this seems to be a new change.? Any idea what I'm doing wrong?? I notice there's an MFC?project setting for compiling using Standard Windows, MFC in a shared dll, and MFC in a static library.? This setting is available for both the VTK ALL_BUILD project as well as my own.? I've tried using standard windows and static library with both with no luck.? Maybe this setting matters somehow? ? Any help would be greatly appreciated.? Thanks. --- On Mon, 2/2/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Monday, February 2, 2009, 4:28 AM Did you not see my response to this thread the other day....? ? The first three lines of vtkMFCWindow.cpp are the culprit. They read: ? #ifndef WINVER ? ?// Allow use of features specific to Windows 95 and Windows NT 4 or later. ? #define WINVER 0x0400 ? #endif ? Remove them or comment them out and it should work ok with VS2008. ? Sorry for the inconvenience.... HTH, David On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: Not sure why I had to disable video for windows.? I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly).? I got rid of that and still have one problem with the MFC lib which I know I need.? Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag?? Is this a problem with my Windows settings somehow?? My Visual Studio settings?? Or VTK? ? Thanks, Alon --- On Thu, 1/29/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" , vtkusers at vtk.org Date: Thursday, January 29, 2009, 8:14 AM I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. ? Alon Mozes wrote: Hi All, I have a great project using VTK/ITK in an older version of Visual Studio.? I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition).? I've found that I must recompile VTK/ITK to properly do so.? I've started from scratch and installed the latest CMake 2.6?which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1.? For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING.? Then I compile the ALL_BUILD in Visual Studio and I get several errors.? I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away.? I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think?is critical for me): ? C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting ? When I dig a little, I'm taken to the following lines of code: ? #if((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) #error _WIN32_WINNT settings conflicts with _WIN32_IE setting #endif ? Its clearly passing this conditional and triggering this error.? The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass.? What's going on here?? Any help would be greatly appreciated. ? Thanks for the help. _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From blloyd at vision.ee.ethz.ch Wed Feb 4 03:49:40 2009 From: blloyd at vision.ee.ethz.ch (Bryn Lloyd) Date: Wed, 04 Feb 2009 09:49:40 +0100 Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <21818848.post@talk.nabble.com> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> Message-ID: <498956A4.6070705@vision.ee.ethz.ch> Try using Delaunay with following setting: delaunay->BoundingTriangulationOn(); and play with the alpha parameter: delaunay->SetAlpha(Alpha); you will find that for alpha>0 the result is basically the same as with alpha==0, except that the longer edges (and triangles/tetrahedra with longer edges) have been removed. This allows you to create a mesh for non-convex objects - if the points are dense and evenly distributed. Bryn > > Now another question - I have a point cloud of a car and I want to make a > triangulated model of it. 3D Delaunay did a decent job, but you can see > (http://rpi.edu/~doriad/car.jpg) there are some major artifacts, like the > side view mirrors are attached to the body of the car by very long > triangles. I didn't exactly understand what the few parameters were for in > the delaunay filter, but tweaking them didn't seem to change that kind of > thing. Is there a better way to get a surface out of these points? > > Thanks! > > Dave > -- ------------------------------------------------- Bryn Lloyd Computer Vision Laboratory ETH Z?rich, Sternwartstrasse 7 CH - 8092 Z?rich, Switzerland Tel: +41 44 63 26668 Fax: +41 44 63 21199 ------------------------------------------------- From bouzim at gmail.com Wed Feb 4 05:10:54 2009 From: bouzim at gmail.com (Denis Barbier) Date: Wed, 4 Feb 2009 11:10:54 +0100 Subject: [vtkusers] VTK on Java with Netbeans In-Reply-To: <49887E64.5050602@tiscali.it> References: <49887E64.5050602@tiscali.it> Message-ID: <7b3bdec70902040210r422572bemaffc2ceeb665a131@mail.gmail.com> On 2009/2/3 Arturo Caissut wrote: > Hi, > is there anybody here experienced in using VTK with Netbeans IDE? I have to > prepare some java based vtk program, but I cannot figure out how to make > Netbeans use my VTK libraries. In the Projects tab, right-click on your project, select Properties -> Libraries -> Add Library -> Create, name it VTK for instance, then Add JAR/Folder and tell Netbeans where it can find your vtk.jar Your project should now compile. I do not know how to tell Netbeans where to load VTK dynamic libraries at run-time; on Linux, I set LD_LIBRARY_PATH before launching Netbeans. Denis From quantum.leaf at googlemail.com Wed Feb 4 05:20:06 2009 From: quantum.leaf at googlemail.com (Liam Kurmos) Date: Wed, 4 Feb 2009 10:20:06 +0000 Subject: [vtkusers] VTK on Java with Netbeans In-Reply-To: <7b3bdec70902040210r422572bemaffc2ceeb665a131@mail.gmail.com> References: <49887E64.5050602@tiscali.it> <7b3bdec70902040210r422572bemaffc2ceeb665a131@mail.gmail.com> Message-ID: > > I do not know how to tell Netbeans where to load VTK dynamic libraries > at run-time; > on Linux, I set LD_LIBRARY_PATH before launching Netbeans. > to get around setting LD_LIBRARY_PATH i added a file in the following location and then ran ldconfig. This specifies an additional location for the linker to look for installed libraries. $cat /etc/ld.so.conf.d/zoizoi.conf output: /usr/local/lib/vtk-5.2 Create this file, calling it XXXXX.conf, assuming vtk is installed in /usr/local/lib/vtk-5.2. Liam -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cole at kitware.com Wed Feb 4 06:45:13 2009 From: david.cole at kitware.com (David Cole) Date: Wed, 4 Feb 2009 06:45:13 -0500 Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: <48481.1426.qm@web51305.mail.re2.yahoo.com> References: <48481.1426.qm@web51305.mail.re2.yahoo.com> Message-ID: Are you using CMake to build your project? The file vtkMFCConfigure.h is in your VTK build tree. If you are using CMake to build your project with find_package(VTK) and include(${VTK_USE_FILE}) then it should just work.... If you're not using CMake, I would recommend using it for your VTK dependent projects. It's much easier. It's probably just a matter of adding extra include directories for non-CMake-based projects. HTH, David On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: > Maybe I spoke too soon... > > I'm able to compile VTK now without complaints about MFC. However, now I > try to compile my application and I get an error: > > 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal > error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or > directory > I include vtkMFCWindow.h in one of my own project header files, and that > in turn includes vtkMFCConfigure.h, but I can't find that file anywhere (I > do find a vtkMFCConfigure.h.in in the vtk source folder). I am using VTK > 5.2.1. I checked the previous version I was using - VTK 5.0.3 - and the > vtkMFCWindow.h file doesn't include vtkMFCConfigure.h. Instead, it includes > vtkConfigure.h, so this seems to be a new change. Any idea what I'm doing > wrong? I notice there's an MFC project setting for compiling using Standard > Windows, MFC in a shared dll, and MFC in a static library. This setting is > available for both the VTK ALL_BUILD project as well as my own. I've tried > using standard windows and static library with both with no luck. Maybe > this setting matters somehow? > > Any help would be greatly appreciated. Thanks. > > > --- On *Mon, 2/2/09, David Cole * wrote: > > From: David Cole > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" > Cc: vtkusers at vtk.org, "Jim" > Date: Monday, February 2, 2009, 4:28 AM > > Did you not see my response to this thread the other day....? > > > The first three lines of vtkMFCWindow.cpp are the culprit. They read: > #ifndef WINVER // Allow use of features specific to Windows 95 and > Windows NT 4 or later. > #define WINVER 0x0400 > #endif > > Remove them or comment them out and it should work ok with VS2008. > > Sorry for the inconvenience.... > > > HTH, > David > > > > > On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: > >> Not sure why I had to disable video for windows. I just know that I >> compiled and many errors seems to come from a conflict there (with the vtk >> rendering lib if I remember correctly). I got rid of that and still have >> one problem with the MFC lib which I know I need. Anyone out there compile >> VTK with Visual Studio 2008 while keeping the MFC flag? Is this a problem >> with my Windows settings somehow? My Visual Studio settings? Or VTK? >> >> Thanks, >> Alon >> >> --- On *Thu, 1/29/09, Jim * wrote: >> >> From: Jim >> Subject: Re: [vtkusers] Compile with Visual Studio 2008 >> To: "Alon Mozes" , vtkusers at vtk.org >> Date: Thursday, January 29, 2009, 8:14 AM >> >> >> I am doing the same thing and got a bunch of errors. I wonder why you >> have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. >> >> >> *Alon Mozes * wrote: >> >> Hi All, >> I have a great project using VTK/ITK in an older version of Visual >> Studio. I need to upgrade to the latest version of VS (Visual Studio 2008 >> Professional Edition). I've found that I must recompile VTK/ITK to properly >> do so. I've started from scratch and installed the latest CMake 2.6 which >> offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1. For >> the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and >> VTK_RENDERING. Then I compile the ALL_BUILD in Visual Studio and I get >> several errors. I reconfigured CMake to turn off the >> VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away. I'm still stuck >> with the following failure (which seems to be in the vtkMFC package which I >> think is critical for me): >> >> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : >> fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE >> setting >> >> When I dig a little, I'm taken to the following lines of code: >> >> #if >> ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) >> >> #error _WIN32_WINNT settings conflicts with _WIN32_IE setting >> #endif >> >> Its clearly passing this conditional and triggering this error. The weird >> thing is that the first part of the conditional should be 0 (the values seem >> to be 0x0600 < 0x0500) so the whole thing should not pass. What's going on >> here? Any help would be greatly appreciated. >> >> Thanks for the help. >> >> >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> >> >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Wed Feb 4 08:22:45 2009 From: daviddoria at gmail.com (daviddoria) Date: Wed, 4 Feb 2009 05:22:45 -0800 (PST) Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <498956A4.6070705@vision.ee.ethz.ch> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> <498956A4.6070705@vision.ee.ethz.ch> Message-ID: <21830087.post@talk.nabble.com> Is there anyway to downsample my point cloud first? It takes several minutes to triangulate as it is, so it makes it though to play with the parameters. Thanks, Dave -- View this message in context: http://www.nabble.com/Some-things-cannot-be-saved-as-VTP--tp21815835p21830087.html Sent from the VTK - Users mailing list archive at Nabble.com. From ahs at cfdrc.com Wed Feb 4 09:39:56 2009 From: ahs at cfdrc.com (Amy Squillacote) Date: Wed, 04 Feb 2009 08:39:56 -0600 Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <21830087.post@talk.nabble.com> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> <498956A4.6070705@vision.ee.ethz.ch> <21830087.post@talk.nabble.com> Message-ID: <4989A8BC.3050901@cfdrc.com> Try the "Mask Points" filter in ParaView. - Amy daviddoria wrote: > Is there anyway to downsample my point cloud first? It takes several minutes > to triangulate as it is, so it makes it though to play with the parameters. > > Thanks, > > Dave > -- Amy Squillacote Phone: (256) 726-4839 Sr. Computer Scientist Fax: (256) 726-4806 CFD Research Corporation Web: http://www.cfdrc.com 215 Wynn Drive, Suite 501 Huntsville, AL 35805 From daviddoria at gmail.com Wed Feb 4 10:35:01 2009 From: daviddoria at gmail.com (daviddoria) Date: Wed, 4 Feb 2009 07:35:01 -0800 (PST) Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <4989A8BC.3050901@cfdrc.com> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> <498956A4.6070705@vision.ee.ethz.ch> <21830087.post@talk.nabble.com> <4989A8BC.3050901@cfdrc.com> Message-ID: <21832865.post@talk.nabble.com> Excellent - we're getting close! http://rpi.edu/~doriad/car_holes.jpg With alpha=.1, the side view mirrors looks much better. However, as you can see there are still big holes where the windows are (there were few to no points on the windows, so of course this is the case). Now is there anyway to fill the window holes and keep the mirrors at the same time (remember the windows are covered in this: http://rpi.edu/~doriad/car.jpg). Also, there is no bottom to the car (as again there are no points). I suppose this would close the same way the windows will (if we can do that at all?) Thanks for all the help. Dave -- View this message in context: http://www.nabble.com/Some-things-cannot-be-saved-as-VTP--tp21815835p21832865.html Sent from the VTK - Users mailing list archive at Nabble.com. From amozes77 at yahoo.com Wed Feb 4 10:40:40 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Wed, 4 Feb 2009 07:40:40 -0800 (PST) Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: Message-ID: <184584.52951.qm@web51304.mail.re2.yahoo.com> No, we don't use CMake to build our project (beyond just building VTK/ITK initially).? I am aware that the preferred mode from a VTK/ITK perspective is to use CMake to build everything, but that does not seem ideal for a developer using Visual Studio (VS).? If I understand correctly, that would mean every time we make a change to our project in VS, we'd have to save the file, go to CMake, build, go back to VS to run in the debugger.? VS provides a simple one-press save-build-run environment that prevents lots of annoying little mistakes (like forgetting to save, or re-build, before re-running, let alone not having to switch apps mid-programming).? Perhaps I'm misunderstanding how CMake would have to be used (I've read all the docs and bought and read all the books for VTK/ITK - if there's a simple explanation that will correct me, please provide it).? Perhaps there's a way to reference CMake from within VS? ? We previously had the project running without CMake by painstakingly setting up the VS project settings file to point to all the VTK/ITK files for include/linking.? Once that was done, we were able to program exclusively in VS and create other development?machines simply by installing VTK/ITK and copying the project settings file around.? I'm happy to put in the pain up front as a one-time cost to be able to use only VS as the all-purpose IDE.? Surely there must be a way to get the vtkMFCWindow working with VS again. ? Thanks for all the help. --- On Wed, 2/4/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Wednesday, February 4, 2009, 3:45 AM Are you using CMake to build your project? The file vtkMFCConfigure.h is in your VTK build tree. If you are using CMake to build your project with find_package(VTK) and include(${VTK_USE_FILE}) then it should just work.... If you're not using CMake, I would recommend using it for your VTK dependent projects. It's much easier. It's probably just a matter of adding extra include directories for non-CMake-based projects. HTH, David On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: Maybe I spoke too soon... ? I'm able to compile VTK now without complaints about MFC.? However, now I try to compile my application and I get an error: ? 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or directory ? I include vtkMFCWindow.h in one of my own project header files, and that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere (I do find a vtkMFCConfigure.h.in in the vtk source folder).? I am using VTK 5.2.1.? I checked the previous version I was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include vtkMFCConfigure.h.? Instead, it includes vtkConfigure.h, so this seems to be a new change.? Any idea what I'm doing wrong?? I notice there's an MFC?project setting for compiling using Standard Windows, MFC in a shared dll, and MFC in a static library.? This setting is available for both the VTK ALL_BUILD project as well as my own.? I've tried using standard windows and static library with both with no luck.? Maybe this setting matters somehow? ? Any help would be greatly appreciated.? Thanks. --- On Mon, 2/2/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Monday, February 2, 2009, 4:28 AM Did you not see my response to this thread the other day....? ? The first three lines of vtkMFCWindow.cpp are the culprit. They read: ? #ifndef WINVER ? ?// Allow use of features specific to Windows 95 and Windows NT 4 or later. ? #define WINVER 0x0400 ? #endif ? Remove them or comment them out and it should work ok with VS2008. ? Sorry for the inconvenience.... HTH, David On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: Not sure why I had to disable video for windows.? I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly).? I got rid of that and still have one problem with the MFC lib which I know I need.? Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag?? Is this a problem with my Windows settings somehow?? My Visual Studio settings?? Or VTK? ? Thanks, Alon --- On Thu, 1/29/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" , vtkusers at vtk.org Date: Thursday, January 29, 2009, 8:14 AM I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. ? Alon Mozes wrote: Hi All, I have a great project using VTK/ITK in an older version of Visual Studio.? I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition).? I've found that I must recompile VTK/ITK to properly do so.? I've started from scratch and installed the latest CMake 2.6?which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1.? For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING.? Then I compile the ALL_BUILD in Visual Studio and I get several errors.? I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away.? I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think?is critical for me): ? C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting ? When I dig a little, I'm taken to the following lines of code: ? #if((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) #error _WIN32_WINNT settings conflicts with _WIN32_IE setting #endif ? Its clearly passing this conditional and triggering this error.? The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass.? What's going on here?? Any help would be greatly appreciated. ? Thanks for the help. _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From blloyd at vision.ee.ethz.ch Wed Feb 4 10:47:37 2009 From: blloyd at vision.ee.ethz.ch (Bryn Lloyd) Date: Wed, 04 Feb 2009 16:47:37 +0100 Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <21832865.post@talk.nabble.com> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> <498956A4.6070705@vision.ee.ethz.ch> <21830087.post@talk.nabble.com> <4989A8BC.3050901@cfdrc.com> <21832865.post@talk.nabble.com> Message-ID: <4989B899.9040809@vision.ee.ethz.ch> Try vtkFillHolesFilter ... --Bryn daviddoria wrote: > Excellent - we're getting close! > > http://rpi.edu/~doriad/car_holes.jpg > > With alpha=.1, the side view mirrors looks much better. However, as you can > see there are still big holes where the windows are (there were few to no > points on the windows, so of course this is the case). Now is there anyway > to fill the window holes and keep the mirrors at the same time (remember the > windows are covered in this: http://rpi.edu/~doriad/car.jpg). Also, there > is no bottom to the car (as again there are no points). I suppose this would > close the same way the windows will (if we can do that at all?) > > Thanks for all the help. > > Dave -- ------------------------------------------------- Bryn Lloyd Computer Vision Laboratory ETH Z?rich, Sternwartstrasse 7 CH - 8092 Z?rich, Switzerland Tel: +41 44 63 26668 Fax: +41 44 63 21199 ------------------------------------------------- From mike.jackson at bluequartz.net Wed Feb 4 10:53:54 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Wed, 4 Feb 2009 10:53:54 -0500 Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: <184584.52951.qm@web51304.mail.re2.yahoo.com> References: <184584.52951.qm@web51304.mail.re2.yahoo.com> Message-ID: <7520DE3A-6B01-4CC8-A4A3-14684C9F0A2A@bluequartz.net> I am no VS Expert BUT what David was saying was that maybe you missed an include directory OR maybe the VTK installation does NOT have the vtkMFCConfigure.h installed? Did you build VTK yourself? when do you did the actual "install" of VTK is the vtkMFCConfigure.h file included in the installation? If it is then you need to include that directory in your VS project. If it is NOT installed then 2 things: 1: There is a bug in the vtk installation code 2: copy the vtkMFCConfigure.h file from the build tree into the installation location. Try those items above and let us know what the result is. --- Mike Jackson www.bluequartz.net On Feb 4, 2009, at 10:40 AM, Alon Mozes wrote: > No, we don't use CMake to build our project (beyond just building > VTK/ITK initially). I am aware that the preferred mode from a VTK/ > ITK perspective is to use CMake to build everything, but that does > not seem ideal for a developer using Visual Studio (VS). If I > understand correctly, that would mean every time we make a change to > our project in VS, we'd have to save the file, go to CMake, build, > go back to VS to run in the debugger. VS provides a simple one- > press save-build-run environment that prevents lots of annoying > little mistakes (like forgetting to save, or re-build, before re- > running, let alone not having to switch apps mid-programming). > Perhaps I'm misunderstanding how CMake would have to be used (I've > read all the docs and bought and read all the books for VTK/ITK - if > there's a simple explanation that will correct me, please provide > it). Perhaps there's a way to reference CMake from within VS? > > We previously had the project running without CMake by painstakingly > setting up the VS project settings file to point to all the VTK/ITK > files for include/linking. Once that was done, we were able to > program exclusively in VS and create other development machines > simply by installing VTK/ITK and copying the project settings file > around. I'm happy to put in the pain up front as a one-time cost to > be able to use only VS as the all-purpose IDE. Surely there must be > a way to get the vtkMFCWindow working with VS again. > > Thanks for all the help. > > --- On Wed, 2/4/09, David Cole wrote: > From: David Cole > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" > Cc: vtkusers at vtk.org, "Jim" > Date: Wednesday, February 4, 2009, 3:45 AM > > Are you using CMake to build your project? > > The file vtkMFCConfigure.h is in your VTK build tree. If you are > using CMake to build your project with find_package(VTK) and > include(${VTK_USE_FILE}) then it should just work.... > > If you're not using CMake, I would recommend using it for your VTK > dependent projects. It's much easier. It's probably just a matter of > adding extra include directories for non-CMake-based projects. > > > HTH, > David > > > On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: > Maybe I spoke too soon... > > I'm able to compile VTK now without complaints about MFC. However, > now I try to compile my application and I get an error: > > 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : > fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No > such file or directory > > I include vtkMFCWindow.h in one of my own project header files, and > that in turn includes vtkMFCConfigure.h, but I can't find that file > anywhere (I do find a vtkMFCConfigure.h.in in the vtk source > folder). I am using VTK 5.2.1. I checked the previous version I > was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include > vtkMFCConfigure.h. Instead, it includes vtkConfigure.h, so this > seems to be a new change. Any idea what I'm doing wrong? I notice > there's an MFC project setting for compiling using Standard Windows, > MFC in a shared dll, and MFC in a static library. This setting is > available for both the VTK ALL_BUILD project as well as my own. > I've tried using standard windows and static library with both with > no luck. Maybe this setting matters somehow? > > Any help would be greatly appreciated. Thanks. > > > --- On Mon, 2/2/09, David Cole wrote: > From: David Cole > > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" > Cc: vtkusers at vtk.org, "Jim" > Date: Monday, February 2, 2009, 4:28 AM > > Did you not see my response to this thread the other day....? > > > The first three lines of vtkMFCWindow.cpp are the culprit. They > read: > > #ifndef WINVER // Allow use of features specific to Windows 95 > and Windows NT 4 or later. > #define WINVER 0x0400 > #endif > > Remove them or comment them out and it should work ok with VS2008. > > Sorry for the inconvenience.... > > > HTH, > David > > > > > On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes > wrote: > Not sure why I had to disable video for windows. I just know that I > compiled and many errors seems to come from a conflict there (with > the vtk rendering lib if I remember correctly). I got rid of that > and still have one problem with the MFC lib which I know I need. > Anyone out there compile VTK with Visual Studio 2008 while keeping > the MFC flag? Is this a problem with my Windows settings somehow? > My Visual Studio settings? Or VTK? > > Thanks, > Alon > > --- On Thu, 1/29/09, Jim wrote: > From: Jim > > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" , vtkusers at vtk.org > Date: Thursday, January 29, 2009, 8:14 AM > > > I am doing the same thing and got a bunch of errors. I wonder why > you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. > > > Alon Mozes wrote: > Hi All, > I have a great project using VTK/ITK in an older version of Visual > Studio. I need to upgrade to the latest version of VS (Visual > Studio 2008 Professional Edition). I've found that I must recompile > VTK/ITK to properly do so. I've started from scratch and installed > the latest CMake 2.6 which offers an option to use the Visual Studio > 2008 compiler and VTK 5.2.1. For the configuration, I turn on > VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING. Then I > compile the ALL_BUILD in Visual Studio and I get several errors. I > reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all > but one error goes away. I'm still stuck with the following failure > (which seems to be in the vtkMFC package which I think is critical > for me): > > C:\Program Files\Microsoft SDKs\Windows\v6.0A\include > \sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT > settings conflicts with _WIN32_IE setting > > When I dig a little, I'm taken to the following lines of code: > > #if > ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > > _WIN32_IE_IE60SP1)) > #error _WIN32_WINNT settings conflicts with _WIN32_IE setting > #endif > > Its clearly passing this conditional and triggering this error. The > weird thing is that the first part of the conditional should be 0 > (the values seem to be 0x0600 < 0x0500) so the whole thing should > not pass. What's going on here? Any help would be greatly > appreciated. > > Thanks for the help. > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From arturo_caissut at tiscali.it Wed Feb 4 11:02:41 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Wed, 04 Feb 2009 17:02:41 +0100 Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: <7520DE3A-6B01-4CC8-A4A3-14684C9F0A2A@bluequartz.net> References: <184584.52951.qm@web51304.mail.re2.yahoo.com> <7520DE3A-6B01-4CC8-A4A3-14684C9F0A2A@bluequartz.net> Message-ID: <4989BC21.8070407@tiscali.it> Hi, if I understood your doubt, I can reassure you: you just need to run CMake the first time, in order to prepare VS Solution file. Then you can open this file, modify all your project's files from inside it as you wish, and then use VS building/debugging features without any other use of CMake. Only if you want to compile your sources on another machine (obviously) or if you delete your VS Solution File you'll have to use CMake again for your project. Regards, Arturo > On Feb 4, 2009, at 10:40 AM, Alon Mozes wrote: > >> No, we don't use CMake to build our project (beyond just building >> VTK/ITK initially). I am aware that the preferred mode from a >> VTK/ITK perspective is to use CMake to build everything, but that >> does not seem ideal for a developer using Visual Studio (VS). If I >> understand correctly, that would mean every time we make a change to >> our project in VS, we'd have to save the file, go to CMake, build, go >> back to VS to run in the debugger. VS provides a simple one-press >> save-build-run environment that prevents lots of annoying little >> mistakes (like forgetting to save, or re-build, before re-running, >> let alone not having to switch apps mid-programming). Perhaps I'm >> misunderstanding how CMake would have to be used (I've read all the >> docs and bought and read all the books for VTK/ITK - if there's a >> simple explanation that will correct me, please provide it). Perhaps >> there's a way to reference CMake from within VS? >> >> We previously had the project running without CMake by painstakingly >> setting up the VS project settings file to point to all the VTK/ITK >> files for include/linking. Once that was done, we were able to >> program exclusively in VS and create other development machines >> simply by installing VTK/ITK and copying the project settings file >> around. I'm happy to put in the pain up front as a one-time cost to >> be able to use only VS as the all-purpose IDE. Surely there must be >> a way to get the vtkMFCWindow working with VS again. >> >> Thanks for all the help. >> >> --- On Wed, 2/4/09, David Cole wrote: >> From: David Cole >> Subject: Re: [vtkusers] Compile with Visual Studio 2008 >> To: "Alon Mozes" >> Cc: vtkusers at vtk.org, "Jim" >> Date: Wednesday, February 4, 2009, 3:45 AM >> >> Are you using CMake to build your project? >> >> The file vtkMFCConfigure.h is in your VTK build tree. If you are >> using CMake to build your project with find_package(VTK) and >> include(${VTK_USE_FILE}) then it should just work.... >> >> If you're not using CMake, I would recommend using it for your VTK >> dependent projects. It's much easier. It's probably just a matter of >> adding extra include directories for non-CMake-based projects. >> >> >> HTH, >> David >> >> >> On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: >> Maybe I spoke too soon... >> >> I'm able to compile VTK now without complaints about MFC. However, >> now I try to compile my application and I get an error: >> >> 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : >> fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No >> such file or directory >> >> I include vtkMFCWindow.h in one of my own project header files, and >> that in turn includes vtkMFCConfigure.h, but I can't find that file >> anywhere (I do find a vtkMFCConfigure.h.in in the vtk source >> folder). I am using VTK 5.2.1. I checked the previous version I was >> using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include >> vtkMFCConfigure.h. Instead, it includes vtkConfigure.h, so this >> seems to be a new change. Any idea what I'm doing wrong? I notice >> there's an MFC project setting for compiling using Standard Windows, >> MFC in a shared dll, and MFC in a static library. This setting is >> available for both the VTK ALL_BUILD project as well as my own. I've >> tried using standard windows and static library with both with no >> luck. Maybe this setting matters somehow? >> >> Any help would be greatly appreciated. Thanks. >> >> >> --- On Mon, 2/2/09, David Cole wrote: >> From: David Cole >> >> Subject: Re: [vtkusers] Compile with Visual Studio 2008 >> To: "Alon Mozes" >> Cc: vtkusers at vtk.org, "Jim" >> Date: Monday, February 2, 2009, 4:28 AM >> >> Did you not see my response to this thread the other day....? >> >> >> The first three lines of vtkMFCWindow.cpp are the culprit. They read: >> >> #ifndef WINVER // Allow use of features specific to Windows 95 >> and Windows NT 4 or later. >> #define WINVER 0x0400 >> #endif >> >> Remove them or comment them out and it should work ok with VS2008. >> >> Sorry for the inconvenience.... >> >> >> HTH, >> David >> >> >> >> >> On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: >> Not sure why I had to disable video for windows. I just know that I >> compiled and many errors seems to come from a conflict there (with >> the vtk rendering lib if I remember correctly). I got rid of that >> and still have one problem with the MFC lib which I know I need. >> Anyone out there compile VTK with Visual Studio 2008 while keeping >> the MFC flag? Is this a problem with my Windows settings somehow? >> My Visual Studio settings? Or VTK? >> >> Thanks, >> Alon >> >> --- On Thu, 1/29/09, Jim wrote: >> From: Jim >> >> Subject: Re: [vtkusers] Compile with Visual Studio 2008 >> To: "Alon Mozes" , vtkusers at vtk.org >> Date: Thursday, January 29, 2009, 8:14 AM >> >> >> I am doing the same thing and got a bunch of errors. I wonder why you >> have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. >> >> >> Alon Mozes wrote: >> Hi All, >> I have a great project using VTK/ITK in an older version of Visual >> Studio. I need to upgrade to the latest version of VS (Visual Studio >> 2008 Professional Edition). I've found that I must recompile VTK/ITK >> to properly do so. I've started from scratch and installed the >> latest CMake 2.6 which offers an option to use the Visual Studio 2008 >> compiler and VTK 5.2.1. For the configuration, I turn on VTK_USE_MFC >> (via VTK_USE_GUISUPPORT) and VTK_RENDERING. Then I compile the >> ALL_BUILD in Visual Studio and I get several errors. I reconfigured >> CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error >> goes away. I'm still stuck with the following failure (which seems >> to be in the vtkMFC package which I think is critical for me): >> >> C:\Program Files\Microsoft >> SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: >> #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting >> >> When I dig a little, I'm taken to the following lines of code: >> >> #if >> ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) >> #error _WIN32_WINNT settings conflicts with _WIN32_IE setting >> #endif >> >> Its clearly passing this conditional and triggering this error. The >> weird thing is that the first part of the conditional should be 0 >> (the values seem to be 0x0600 < 0x0500) so the whole thing should not >> pass. What's going on here? Any help would be greatly appreciated. >> >> Thanks for the help. >> >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> >> >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> >> >> >> >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From daviddoria at gmail.com Wed Feb 4 11:06:20 2009 From: daviddoria at gmail.com (daviddoria) Date: Wed, 4 Feb 2009 08:06:20 -0800 (PST) Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <4989B899.9040809@vision.ee.ethz.ch> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> <498956A4.6070705@vision.ee.ethz.ch> <21830087.post@talk.nabble.com> <4989A8BC.3050901@cfdrc.com> <21832865.post@talk.nabble.com> <4989B899.9040809@vision.ee.ethz.ch> Message-ID: <21833537.post@talk.nabble.com> Is that available in paraview? Or I'd have to setup a framework to load the file and run vtkFillHolesFilter in c++? Bryn Lloyd-2 wrote: > > Try vtkFillHolesFilter ... > > > --Bryn > > > > > daviddoria wrote: >> Excellent - we're getting close! >> >> http://rpi.edu/~doriad/car_holes.jpg >> >> With alpha=.1, the side view mirrors looks much better. However, as you >> can >> see there are still big holes where the windows are (there were few to no >> points on the windows, so of course this is the case). Now is there >> anyway >> to fill the window holes and keep the mirrors at the same time (remember >> the >> windows are covered in this: http://rpi.edu/~doriad/car.jpg). Also, >> there >> is no bottom to the car (as again there are no points). I suppose this >> would >> close the same way the windows will (if we can do that at all?) >> >> Thanks for all the help. >> >> Dave > > > -- > ------------------------------------------------- > Bryn Lloyd > Computer Vision Laboratory > ETH Z?rich, Sternwartstrasse 7 > CH - 8092 Z?rich, Switzerland > Tel: +41 44 63 26668 > Fax: +41 44 63 21199 > ------------------------------------------------- > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- View this message in context: http://www.nabble.com/Some-things-cannot-be-saved-as-VTP--tp21815835p21833537.html Sent from the VTK - Users mailing list archive at Nabble.com. From blloyd at vision.ee.ethz.ch Wed Feb 4 11:11:56 2009 From: blloyd at vision.ee.ethz.ch (Bryn Lloyd) Date: Wed, 04 Feb 2009 17:11:56 +0100 Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <21833537.post@talk.nabble.com> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> <498956A4.6070705@vision.ee.ethz.ch> <21830087.post@talk.nabble.com> <4989A8BC.3050901@cfdrc.com> <21832865.post@talk.nabble.com> <4989B899.9040809@vision.ee.ethz.ch> <21833537.post@talk.nabble.com> Message-ID: <4989BE4C.5020109@vision.ee.ethz.ch> You could write your own tool in C++ or python. The main part (in python) is: #!/usr/bin/env python import os,sys,string from libvtkCommonPython import * from libvtkRenderingPython import * from libvtkGraphicsPython import * from libvtkIOPython import * from libvtkFilteringPython import * from libvtkWidgetsPython import * from libvtkImagingPython import * reader = vtkPolyDataReader() reader.SetFileName(fname) fillholes = vtkFillHolesFilter() fillholes.SetInputConnection(reader.GetOutputPort()) fillholes.SetHoleSize(1.e6) writer = vtkPolyDataWriter() writer.SetInputConnection(fillholes.GetOutputPort()) writer.SetFileName(output ) writer.Update() You could, however, use the Python Programmable filter in Paraview. Copy the vtkFillHolesFilter section (python code above) into the text field ... --Bryn daviddoria wrote: > Is that available in paraview? Or I'd have to setup a framework to load the > file and run vtkFillHolesFilter in c++? > > > Bryn Lloyd-2 wrote: >> Try vtkFillHolesFilter ... >> >> >> --Bryn >> >> >> >> >> daviddoria wrote: >>> Excellent - we're getting close! >>> >>> http://rpi.edu/~doriad/car_holes.jpg >>> >>> With alpha=.1, the side view mirrors looks much better. However, as you >>> can >>> see there are still big holes where the windows are (there were few to no >>> points on the windows, so of course this is the case). Now is there >>> anyway >>> to fill the window holes and keep the mirrors at the same time (remember >>> the >>> windows are covered in this: http://rpi.edu/~doriad/car.jpg). Also, >>> there >>> is no bottom to the car (as again there are no points). I suppose this >>> would >>> close the same way the windows will (if we can do that at all?) >>> >>> Thanks for all the help. >>> >>> Dave >> >> -- >> ------------------------------------------------- >> Bryn Lloyd >> Computer Vision Laboratory >> ETH Z?rich, Sternwartstrasse 7 >> CH - 8092 Z?rich, Switzerland >> Tel: +41 44 63 26668 >> Fax: +41 44 63 21199 >> ------------------------------------------------- >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > -- ------------------------------------------------- Bryn Lloyd Computer Vision Laboratory ETH Z?rich, Sternwartstrasse 7 CH - 8092 Z?rich, Switzerland Tel: +41 44 63 26668 Fax: +41 44 63 21199 ------------------------------------------------- From amozes77 at yahoo.com Wed Feb 4 11:26:58 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Wed, 4 Feb 2009 08:26:58 -0800 (PST) Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: Message-ID: <847444.9609.qm@web51305.mail.re2.yahoo.com> I've read a bit more about using CMake, and if I understand correctly, we would have to re-run CMake only when we change our project settings, not every time we build as I mistakenly said before.? This is less painful than what I'd thought, but still more difficult than I'd like as project settings do change from time to time and we're now incorporating an extra application on a semi-regular basis.? I'm very accustomed to dealing with the VS project settings format and am a total newbie to the CMake lists.? If you insist that CMake is required to getting the project to work, I will invest the effort.? Otherwise, I would prefer to simply tweak what was an already perfectly functioning project. ? Thanks for the advice. --- On Wed, 2/4/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Wednesday, February 4, 2009, 3:45 AM Are you using CMake to build your project? The file vtkMFCConfigure.h is in your VTK build tree. If you are using CMake to build your project with find_package(VTK) and include(${VTK_USE_FILE}) then it should just work.... If you're not using CMake, I would recommend using it for your VTK dependent projects. It's much easier. It's probably just a matter of adding extra include directories for non-CMake-based projects. HTH, David On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: Maybe I spoke too soon... ? I'm able to compile VTK now without complaints about MFC.? However, now I try to compile my application and I get an error: ? 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or directory ? I include vtkMFCWindow.h in one of my own project header files, and that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere (I do find a vtkMFCConfigure.h.in in the vtk source folder).? I am using VTK 5.2.1.? I checked the previous version I was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include vtkMFCConfigure.h.? Instead, it includes vtkConfigure.h, so this seems to be a new change.? Any idea what I'm doing wrong?? I notice there's an MFC?project setting for compiling using Standard Windows, MFC in a shared dll, and MFC in a static library.? This setting is available for both the VTK ALL_BUILD project as well as my own.? I've tried using standard windows and static library with both with no luck.? Maybe this setting matters somehow? ? Any help would be greatly appreciated.? Thanks. --- On Mon, 2/2/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Monday, February 2, 2009, 4:28 AM Did you not see my response to this thread the other day....? ? The first three lines of vtkMFCWindow.cpp are the culprit. They read: ? #ifndef WINVER ? ?// Allow use of features specific to Windows 95 and Windows NT 4 or later. ? #define WINVER 0x0400 ? #endif ? Remove them or comment them out and it should work ok with VS2008. ? Sorry for the inconvenience.... HTH, David On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: Not sure why I had to disable video for windows.? I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly).? I got rid of that and still have one problem with the MFC lib which I know I need.? Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag?? Is this a problem with my Windows settings somehow?? My Visual Studio settings?? Or VTK? ? Thanks, Alon --- On Thu, 1/29/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" , vtkusers at vtk.org Date: Thursday, January 29, 2009, 8:14 AM I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. ? Alon Mozes wrote: Hi All, I have a great project using VTK/ITK in an older version of Visual Studio.? I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition).? I've found that I must recompile VTK/ITK to properly do so.? I've started from scratch and installed the latest CMake 2.6?which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1.? For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING.? Then I compile the ALL_BUILD in Visual Studio and I get several errors.? I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away.? I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think?is critical for me): ? C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting ? When I dig a little, I'm taken to the following lines of code: ? #if((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) #error _WIN32_WINNT settings conflicts with _WIN32_IE setting #endif ? Its clearly passing this conditional and triggering this error.? The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass.? What's going on here?? Any help would be greatly appreciated. ? Thanks for the help. _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cole at kitware.com Wed Feb 4 12:15:27 2009 From: david.cole at kitware.com (David Cole) Date: Wed, 4 Feb 2009 12:15:27 -0500 Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: <847444.9609.qm@web51305.mail.re2.yahoo.com> References: <847444.9609.qm@web51305.mail.re2.yahoo.com> Message-ID: Using CMake is not *required*, it is simply strongly recommended because it avoids problems exactly like you are seeing right now. All you need to do is add an include directory so that Visual Studio can find the file it's looking for. As Mike Jackson pointed out, though, if you're using an install tree of VTK and the file is not actually installed, then you've found a bug in VTK's install rules. Please let us know if that's the case, so we can fix it.... Thanks, David Cole On Wed, Feb 4, 2009 at 11:26 AM, Alon Mozes wrote: > I've read a bit more about using CMake, and if I understand correctly, we > would have to re-run CMake only when we change our project settings, not > every time we build as I mistakenly said before. This is less painful than > what I'd thought, but still more difficult than I'd like as project settings > do change from time to time and we're now incorporating an extra application > on a semi-regular basis. I'm very accustomed to dealing with the VS project > settings format and am a total newbie to the CMake lists. If you insist > that CMake is required to getting the project to work, I will invest the > effort. Otherwise, I would prefer to simply tweak what was an already > perfectly functioning project. > > Thanks for the advice. > > --- On *Wed, 2/4/09, David Cole * wrote: > > From: David Cole > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" > Cc: vtkusers at vtk.org, "Jim" > Date: Wednesday, February 4, 2009, 3:45 AM > > Are you using CMake to build your project? > > The file vtkMFCConfigure.h is in your VTK build tree. If you are using > CMake to build your project with find_package(VTK) and > include(${VTK_USE_FILE}) then it should just work.... > > If you're not using CMake, I would recommend using it for your VTK > dependent projects. It's much easier. It's probably just a matter of adding > extra include directories for non-CMake-based projects. > > > HTH, > David > > > On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: > >> Maybe I spoke too soon... >> >> I'm able to compile VTK now without complaints about MFC. However, now I >> try to compile my application and I get an error: >> >> 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal >> error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or >> directory >> I include vtkMFCWindow.h in one of my own project header files, and >> that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere >> (I do find a vtkMFCConfigure.h.in in the >> vtk source folder). I am using VTK 5.2.1. I checked the previous version I >> was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include >> vtkMFCConfigure.h. Instead, it includes vtkConfigure.h, so this seems to be >> a new change. Any idea what I'm doing wrong? I notice there's an >> MFC project setting for compiling using Standard Windows, MFC in a shared >> dll, and MFC in a static library. This setting is available for both the >> VTK ALL_BUILD project as well as my own. I've tried using standard windows >> and static library with both with no luck. Maybe this setting matters >> somehow? >> >> Any help would be greatly appreciated. Thanks. >> >> >> --- On *Mon, 2/2/09, David Cole * wrote: >> >> From: David Cole >> Subject: Re: [vtkusers] Compile with Visual Studio 2008 >> To: "Alon Mozes" >> Cc: vtkusers at vtk.org, "Jim" >> Date: Monday, February 2, 2009, 4:28 AM >> >> Did you not see my response to this thread the other day....? >> >> >> The first three lines of vtkMFCWindow.cpp are the culprit. They read: >> #ifndef WINVER // Allow use of features specific to Windows 95 and >> Windows NT 4 or later. >> #define WINVER 0x0400 >> #endif >> >> Remove them or comment them out and it should work ok with VS2008. >> >> Sorry for the inconvenience.... >> >> >> HTH, >> David >> >> >> >> >> On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: >> >>> Not sure why I had to disable video for windows. I just know that I >>> compiled and many errors seems to come from a conflict there (with the vtk >>> rendering lib if I remember correctly). I got rid of that and still have >>> one problem with the MFC lib which I know I need. Anyone out there compile >>> VTK with Visual Studio 2008 while keeping the MFC flag? Is this a problem >>> with my Windows settings somehow? My Visual Studio settings? Or VTK? >>> >>> Thanks, >>> Alon >>> >>> --- On *Thu, 1/29/09, Jim * wrote: >>> >>> From: Jim >>> Subject: Re: [vtkusers] Compile with Visual Studio 2008 >>> To: "Alon Mozes" , vtkusers at vtk.org >>> Date: Thursday, January 29, 2009, 8:14 AM >>> >>> >>> I am doing the same thing and got a bunch of errors. I wonder why you >>> have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. >>> >>> >>> *Alon Mozes * wrote: >>> >>> Hi All, >>> I have a great project using VTK/ITK in an older version of Visual >>> Studio. I need to upgrade to the latest version of VS (Visual Studio 2008 >>> Professional Edition). I've found that I must recompile VTK/ITK to properly >>> do so. I've started from scratch and installed the latest CMake 2.6 which >>> offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1. For >>> the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and >>> VTK_RENDERING. Then I compile the ALL_BUILD in Visual Studio and I get >>> several errors. I reconfigured CMake to turn off the >>> VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away. I'm still stuck >>> with the following failure (which seems to be in the vtkMFC package which I >>> think is critical for me): >>> >>> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : >>> fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE >>> setting >>> >>> When I dig a little, I'm taken to the following lines of code: >>> >>> #if >>> ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) >>> >>> #error _WIN32_WINNT settings conflicts with _WIN32_IE setting >>> #endif >>> >>> Its clearly passing this conditional and triggering this error. The >>> weird thing is that the first part of the conditional should be 0 (the >>> values seem to be 0x0600 < 0x0500) so the whole thing should not pass. >>> What's going on here? Any help would be greatly appreciated. >>> >>> Thanks for the help. >>> >>> >>> _______________________________________________ >>> This is the private VTK discussion list. >>> Please keep messages on-topic. Check the FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >>> >>> >>> _______________________________________________ >>> This is the private VTK discussion list. >>> Please keep messages on-topic. Check the FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ibr_ex at hotmail.com Wed Feb 4 12:46:59 2009 From: ibr_ex at hotmail.com (Ibraheem Aldhamari) Date: Wed, 4 Feb 2009 20:46:59 +0300 Subject: [vtkusers] VTK installation problem in openSUSE 11.0 Message-ID: hi there , sorry for bothering you with this problem .it looks like many people have the same problem ,although i tried the previous posts but the problem still the same . here is the problem : ================================================================ CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:25 (MESSAGE): The C++ compiler "/usr/bin/gcc" is not able to compile a simple test program. It fails with the following output: Change Dir: /usr/local/VTK/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build gmake[1]: Entering directory `/usr/local/VTK/CMakeFiles/CMakeTmp' ============================================================== since i am very beginner to linux and vtk i don't really know what should i do . thank you for your help in advance. barhoom _________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.kinar at usask.ca Wed Feb 4 13:25:07 2009 From: n.kinar at usask.ca (Nicholas Kinar) Date: Wed, 04 Feb 2009 12:25:07 -0600 Subject: [vtkusers] Plotting raster data with colormap Message-ID: <4989DD83.8060502@usask.ca> Hello-- I am wondering if it would be possible to plot raster data using VTK in a similar fashion to the Matlab imagesc(X) function. Essentially what I have is a (m x n) matrix of doubles, and I would like to display this matrix as a 2D plot with a colormap. The colormap intensity would correspond to the scaled double values. Would it be possible to set this up in the form of an animation, i.e. code that continues to update and display the plot on the screen? Does anyone have some sample code in C/C++? Which functions would I use in VTK to create such a plot? Nicholas From amozes77 at yahoo.com Wed Feb 4 13:51:55 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Wed, 4 Feb 2009 10:51:55 -0800 (PST) Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: Message-ID: <244837.44158.qm@web51310.mail.re2.yahoo.com> Sorry, I think I had missed both Michael's and Arturo's posts (Should I not be expecting an email response or notification of response?? No sign of a reply in any junk folder either or even in the digests.? Maybe I'm doing something stupid with my multiple email addresses...).? I've found the posts?online through markmail and will try to address them... ? Michael, I did build VTK myself.? To be clear: I download the source, use CMake to configure it by pointing to the source folder and creating a new build folder, and then compile in Visual Studio using the solution file I find in that newly?populated?build directory.? I found no sign of vtkMFCConfigure.h anywhere.? From what I understand, I think this is a bug in the vtk installation code. ? The only trick is that I changed one vtk MFC file to get VTK to compile (that winver bug; see the origin of this thread) and then recompiled.? I don't imagine that affected this problem.? I am currently not at my dev machine, but when I get back, I can try from scratch with downloading vtk, configuring in CMake, making the change for that winver bug, and compiling in VS and seeing if that file exists (or?I guess it should?exist immediately after the CMake stage?). ? Arturo, Thanks, that was my original concern.? I'd still like to use VS from start to finish if I can since I'm more familiar with it, but I'm glad to know it should be a minor change if I can't get this working. ? David, Long story short, if I understand right, either that file exists and I'm not properly pointing to it in my project settings, or it doesn't exist and it's?a vtk bug.? I'm pretty sure it doesn't exist (I recall searching my entire hard drive for it and came up with nothing; I can double check tonight). ? Thanks again for all the help. --- On Wed, 2/4/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Wednesday, February 4, 2009, 9:15 AM Using CMake is not *required*, it is simply strongly recommended because it avoids problems exactly like you are seeing right now. All you need to do is add an include directory so that Visual Studio can find the file it's looking for. As Mike Jackson pointed out, though, if you're using an install tree of VTK and the file is not actually installed, then you've found a bug in VTK's install rules. Please let us know if that's the case, so we can fix it.... Thanks, David Cole On Wed, Feb 4, 2009 at 11:26 AM, Alon Mozes wrote: I've read a bit more about using CMake, and if I understand correctly, we would have to re-run CMake only when we change our project settings, not every time we build as I mistakenly said before.? This is less painful than what I'd thought, but still more difficult than I'd like as project settings do change from time to time and we're now incorporating an extra application on a semi-regular basis.? I'm very accustomed to dealing with the VS project settings format and am a total newbie to the CMake lists.? If you insist that CMake is required to getting the project to work, I will invest the effort.? Otherwise, I would prefer to simply tweak what was an already perfectly functioning project. ? Thanks for the advice. --- On Wed, 2/4/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Wednesday, February 4, 2009, 3:45 AM Are you using CMake to build your project? The file vtkMFCConfigure.h is in your VTK build tree. If you are using CMake to build your project with find_package(VTK) and include(${VTK_USE_FILE}) then it should just work.... If you're not using CMake, I would recommend using it for your VTK dependent projects. It's much easier. It's probably just a matter of adding extra include directories for non-CMake-based projects. HTH, David On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: Maybe I spoke too soon... ? I'm able to compile VTK now without complaints about MFC.? However, now I try to compile my application and I get an error: ? 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or directory ? I include vtkMFCWindow.h in one of my own project header files, and that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere (I do find a vtkMFCConfigure.h.in in the vtk source folder).? I am using VTK 5.2.1.? I checked the previous version I was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include vtkMFCConfigure.h.? Instead, it includes vtkConfigure.h, so this seems to be a new change.? Any idea what I'm doing wrong?? I notice there's an MFC?project setting for compiling using Standard Windows, MFC in a shared dll, and MFC in a static library.? This setting is available for both the VTK ALL_BUILD project as well as my own.? I've tried using standard windows and static library with both with no luck.? Maybe this setting matters somehow? ? Any help would be greatly appreciated.? Thanks. --- On Mon, 2/2/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Monday, February 2, 2009, 4:28 AM Did you not see my response to this thread the other day....? ? The first three lines of vtkMFCWindow.cpp are the culprit. They read: ? #ifndef WINVER ? ?// Allow use of features specific to Windows 95 and Windows NT 4 or later. ? #define WINVER 0x0400 ? #endif ? Remove them or comment them out and it should work ok with VS2008. ? Sorry for the inconvenience.... HTH, David On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: Not sure why I had to disable video for windows.? I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly).? I got rid of that and still have one problem with the MFC lib which I know I need.? Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag?? Is this a problem with my Windows settings somehow?? My Visual Studio settings?? Or VTK? ? Thanks, Alon --- On Thu, 1/29/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" , vtkusers at vtk.org Date: Thursday, January 29, 2009, 8:14 AM I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. ? Alon Mozes wrote: Hi All, I have a great project using VTK/ITK in an older version of Visual Studio.? I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition).? I've found that I must recompile VTK/ITK to properly do so.? I've started from scratch and installed the latest CMake 2.6?which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1.? For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING.? Then I compile the ALL_BUILD in Visual Studio and I get several errors.? I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away.? I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think?is critical for me): ? C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting ? When I dig a little, I'm taken to the following lines of code: ? #if((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) #error _WIN32_WINNT settings conflicts with _WIN32_IE setting #endif ? Its clearly passing this conditional and triggering this error.? The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass.? What's going on here?? Any help would be greatly appreciated. ? Thanks for the help. _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Wed Feb 4 13:55:20 2009 From: mike.jackson at bluequartz.net (Mike Jackson) Date: Wed, 04 Feb 2009 13:55:20 -0500 Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: <244837.44158.qm@web51310.mail.re2.yahoo.com> References: <244837.44158.qm@web51310.mail.re2.yahoo.com> Message-ID: <4989E498.4040807@bluequartz.net> Alon, When you build vtk with Visual Studio there should be a project in the VS solution called "INSTALL". Build that and vtk will be installed into the CMAKE_INSTALL_PREFIX location. Then in that installed location look for the missing file. If it can not be found then this must be a bug in the vtk installation code. Mike Alon Mozes wrote: > Sorry, I think I had missed both Michael's and Arturo's posts (Should I not be expecting an email response or notification of response? No sign of a reply in any junk folder either or even in the digests. Maybe I'm doing something stupid with my multiple email addresses...). I've found the posts online through markmail and will try to address them... > > Michael, > I did build VTK myself. To be clear: I download the source, use CMake to configure it by pointing to the source folder and creating a new build folder, and then compile in Visual Studio using the solution file I find in that newly populated build directory. I found no sign of vtkMFCConfigure.h anywhere. From what I understand, I think this is a bug in the vtk installation code. > > The only trick is that I changed one vtk MFC file to get VTK to compile (that winver bug; see the origin of this thread) and then recompiled. I don't imagine that affected this problem. I am currently not at my dev machine, but when I get back, I can try from scratch with downloading vtk, configuring in CMake, making the change for that winver bug, and compiling in VS and seeing if that file exists (or I guess it should exist immediately after the CMake stage?). > > Arturo, > Thanks, that was my original concern. I'd still like to use VS from start to finish if I can since I'm more familiar with it, but I'm glad to know it should be a minor change if I can't get this working. > > David, > Long story short, if I understand right, either that file exists and I'm not properly pointing to it in my project settings, or it doesn't exist and it's a vtk bug. I'm pretty sure it doesn't exist (I recall searching my entire hard drive for it and came up with nothing; I can double check tonight). > > Thanks again for all the help. > > --- On Wed, 2/4/09, David Cole wrote: > > From: David Cole > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" > Cc: vtkusers at vtk.org, "Jim" > Date: Wednesday, February 4, 2009, 9:15 AM > > > Using CMake is not *required*, it is simply strongly recommended because it avoids problems exactly like you are seeing right now. > > > All you need to do is add an include directory so that Visual Studio can find the file it's looking for. > > > > As Mike Jackson pointed out, though, if you're using an install tree of VTK and the file is not actually installed, then you've found a bug in VTK's install rules. Please let us know if that's the case, so we can fix it.... > > > > > Thanks, > David Cole > > > > On Wed, Feb 4, 2009 at 11:26 AM, Alon Mozes wrote: > > > > > > > I've read a bit more about using CMake, and if I understand correctly, we would have to re-run CMake only when we change our project settings, not every time we build as I mistakenly said before. This is less painful than what I'd thought, but still more difficult than I'd like as project settings do change from time to time and we're now incorporating an extra application on a semi-regular basis. I'm very accustomed to dealing with the VS project settings format and am a total newbie to the CMake lists. If you insist that CMake is required to getting the project to work, I will invest the effort. Otherwise, I would prefer to simply tweak what was an already perfectly functioning project. > > Thanks for the advice. > > > --- On Wed, 2/4/09, David Cole wrote: > > > From: David Cole > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" > Cc: vtkusers at vtk.org, "Jim" > > Date: Wednesday, February 4, 2009, 3:45 AM > > > > > > Are you using CMake to build your project? > > The file vtkMFCConfigure.h is in your VTK build tree. If you are using CMake to build your project with find_package(VTK) and include(${VTK_USE_FILE}) then it should just work.... > > If you're not using CMake, I would recommend using it for your VTK dependent projects. It's much easier. It's probably just a matter of adding extra include directories for non-CMake-based projects. > > > HTH, > David > > > > On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: > > > > > > > Maybe I spoke too soon... > > I'm able to compile VTK now without complaints about MFC. However, now I try to compile my application and I get an error: > > 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or directory > > I include vtkMFCWindow.h in one of my own project header files, and that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere (I do find a vtkMFCConfigure.h.in in the vtk source folder). I am using VTK 5.2.1. I checked the previous version I was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include vtkMFCConfigure.h. Instead, it includes vtkConfigure.h, so this seems to be a new change. Any idea what I'm doing wrong? I notice there's an MFC project setting for compiling using Standard Windows, MFC in a shared dll, and MFC in a static library. This setting is available for both the VTK ALL_BUILD project as well as my own. I've tried using standard windows and static library with both with no luck. Maybe this setting matters somehow? > > Any help would be greatly appreciated. Thanks. > > > > --- On Mon, 2/2/09, David Cole wrote: > > From: David Cole > > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" > > Cc: vtkusers at vtk.org, "Jim" > Date: Monday, February 2, 2009, 4:28 AM > > > > > > Did you not see my response to this thread the other day....? > > > The first three lines of vtkMFCWindow.cpp are the culprit. They read: > > > #ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. > #define WINVER 0x0400 > #endif > > > Remove them or comment them out and it should work ok with VS2008. > > > Sorry for the inconvenience.... > > > > > HTH, > David > > > > > > On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: > > > > > > > Not sure why I had to disable video for windows. I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly). I got rid of that and still have one problem with the MFC lib which I know I need. Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag? Is this a problem with my Windows settings somehow? My Visual Studio settings? Or VTK? > > Thanks, > Alon > > --- On Thu, 1/29/09, Jim wrote: > > From: Jim > > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" , vtkusers at vtk.org > Date: Thursday, January 29, 2009, 8:14 AM > > > > > > > I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. > > > Alon Mozes wrote: > > > > > > Hi All, > I have a great project using VTK/ITK in an older version of Visual Studio. I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition). I've found that I must recompile VTK/ITK to properly do so. I've started from scratch and installed the latest CMake 2.6 which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1. For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING. Then I compile the ALL_BUILD in Visual Studio and I get several errors. I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away. I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think is critical for me): > > C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting > > When I dig a little, I'm taken to the following lines of code: > > #if((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) > #error _WIN32_WINNT settings conflicts with _WIN32_IE setting > #endif > > Its clearly passing this conditional and triggering this error. The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass. What's going on here? Any help would be greatly appreciated. > > Thanks for the help. > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From jiksed at yahoo.com Wed Feb 4 14:40:57 2009 From: jiksed at yahoo.com (Jim) Date: Wed, 4 Feb 2009 11:40:57 -0800 (PST) Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: <244837.44158.qm@web51310.mail.re2.yahoo.com> Message-ID: <479861.53211.qm@web32005.mail.mud.yahoo.com> ? I built VTK 5.2.1 from source with VS 2008 Pro Edition and found vtkMFCConfigure.h in the following two folders: ? 1) MyBuildDir\GUISupport\MFC\ 2) CMAKE_INSTALL_PREFIX\include\vtk-5.2\ ? I configured vtk source in CMake 2.6.2 with both VTK_USE_GUISupport and VTK_Use_MFC on. I also had VTK_USE_QT on. I built the binary from VTK.sln by building ALL_BUILD project and then building INSTALL project. It was an error-free process after commenting out a few lines pointed out by David (see below). ? ? --- On Wed, 2/4/09, Alon Mozes wrote: From: Alon Mozes Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "David Cole" Cc: vtkusers at vtk.org Date: Wednesday, February 4, 2009, 11:51 AM Sorry, I think I had missed both Michael's and Arturo's posts (Should I not be expecting an email response or notification of response?? No sign of a reply in any junk folder either or even in the digests.? Maybe I'm doing something stupid with my multiple email addresses...).? I've found the posts?online through markmail and will try to address them... ? Michael, I did build VTK myself.? To be clear: I download the source, use CMake to configure it by pointing to the source folder and creating a new build folder, and then compile in Visual Studio using the solution file I find in that newly?populated?build directory.? I found no sign of vtkMFCConfigure.h anywhere.? From what I understand, I think this is a bug in the vtk installation code. ? The only trick is that I changed one vtk MFC file to get VTK to compile (that winver bug; see the origin of this thread) and then recompiled.? I don't imagine that affected this problem.? I am currently not at my dev machine, but when I get back, I can try from scratch with downloading vtk, configuring in CMake, making the change for that winver bug, and compiling in VS and seeing if that file exists (or?I guess it should?exist immediately after the CMake stage?). ? Arturo, Thanks, that was my original concern.? I'd still like to use VS from start to finish if I can since I'm more familiar with it, but I'm glad to know it should be a minor change if I can't get this working. ? David, Long story short, if I understand right, either that file exists and I'm not properly pointing to it in my project settings, or it doesn't exist and it's?a vtk bug.? I'm pretty sure it doesn't exist (I recall searching my entire hard drive for it and came up with nothing; I can double check tonight). ? Thanks again for all the help. --- On Wed, 2/4/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Wednesday, February 4, 2009, 9:15 AM Using CMake is not *required*, it is simply strongly recommended because it avoids problems exactly like you are seeing right now. All you need to do is add an include directory so that Visual Studio can find the file it's looking for. As Mike Jackson pointed out, though, if you're using an install tree of VTK and the file is not actually installed, then you've found a bug in VTK's install rules. Please let us know if that's the case, so we can fix it.... Thanks, David Cole On Wed, Feb 4, 2009 at 11:26 AM, Alon Mozes wrote: I've read a bit more about using CMake, and if I understand correctly, we would have to re-run CMake only when we change our project settings, not every time we build as I mistakenly said before.? This is less painful than what I'd thought, but still more difficult than I'd like as project settings do change from time to time and we're now incorporating an extra application on a semi-regular basis.? I'm very accustomed to dealing with the VS project settings format and am a total newbie to the CMake lists.? If you insist that CMake is required to getting the project to work, I will invest the effort.? Otherwise, I would prefer to simply tweak what was an already perfectly functioning project. ? Thanks for the advice. --- On Wed, 2/4/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Wednesday, February 4, 2009, 3:45 AM Are you using CMake to build your project? The file vtkMFCConfigure.h is in your VTK build tree. If you are using CMake to build your project with find_package(VTK) and include(${VTK_USE_FILE}) then it should just work.... If you're not using CMake, I would recommend using it for your VTK dependent projects. It's much easier. It's probably just a matter of adding extra include directories for non-CMake-based projects. HTH, David On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: Maybe I spoke too soon... ? I'm able to compile VTK now without complaints about MFC.? However, now I try to compile my application and I get an error: ? 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or directory ? I include vtkMFCWindow.h in one of my own project header files, and that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere (I do find a vtkMFCConfigure.h.in in the vtk source folder).? I am using VTK 5.2.1.? I checked the previous version I was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include vtkMFCConfigure.h.? Instead, it includes vtkConfigure.h, so this seems to be a new change.? Any idea what I'm doing wrong?? I notice there's an MFC?project setting for compiling using Standard Windows, MFC in a shared dll, and MFC in a static library.? This setting is available for both the VTK ALL_BUILD project as well as my own.? I've tried using standard windows and static library with both with no luck.? Maybe this setting matters somehow? ? Any help would be greatly appreciated.? Thanks. --- On Mon, 2/2/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Monday, February 2, 2009, 4:28 AM Did you not see my response to this thread the other day....? ? The first three lines of vtkMFCWindow.cpp are the culprit. They read: ? #ifndef WINVER ? ?// Allow use of features specific to Windows 95 and Windows NT 4 or later. ? #define WINVER 0x0400 ? #endif ? Remove them or comment them out and it should work ok with VS2008. ? Sorry for the inconvenience.... HTH, David On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: Not sure why I had to disable video for windows.? I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly).? I got rid of that and still have one problem with the MFC lib which I know I need.? Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag?? Is this a problem with my Windows settings somehow?? My Visual Studio settings?? Or VTK? ? Thanks, Alon --- On Thu, 1/29/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" , vtkusers at vtk.org Date: Thursday, January 29, 2009, 8:14 AM I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. ? Alon Mozes wrote: Hi All, I have a great project using VTK/ITK in an older version of Visual Studio.? I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition).? I've found that I must recompile VTK/ITK to properly do so.? I've started from scratch and installed the latest CMake 2.6?which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1.? For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING.? Then I compile the ALL_BUILD in Visual Studio and I get several errors.? I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away.? I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think?is critical for me): ? C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting ? When I dig a little, I'm taken to the following lines of code: ? #if((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) #error _WIN32_WINNT settings conflicts with _WIN32_IE setting #endif ? Its clearly passing this conditional and triggering this error.? The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass.? What's going on here?? Any help would be greatly appreciated. ? Thanks for the help. _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Wed Feb 4 14:59:30 2009 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Wed, 4 Feb 2009 14:59:30 -0500 (EST) Subject: [vtkusers] volume rendering of vtkRectilinearGrid In-Reply-To: <45d654b0902041152u541927fbt4535fe34aa00a628@mail.gmail.com> References: <86C07171C28D6645AAA23482506AF8380E11B8@exbe03.intra.dlr.de> <45d654b0902041152u541927fbt4535fe34aa00a628@mail.gmail.com> Message-ID: Hello, Does Paraview or VTK support volume rendering of vtkRectilinearGrid? Thanks. Weiguang From mhumperdink at yahoo.com Wed Feb 4 15:58:36 2009 From: mhumperdink at yahoo.com (Marty Humperdink) Date: Wed, 4 Feb 2009 12:58:36 -0800 (PST) Subject: [vtkusers] How centroid calculated by ICP? Message-ID: <457126.56747.qm@web112209.mail.gq1.yahoo.com> Can anyone tell me how vtkIterativeClosestPoint transform calculates the centroid of target and source polydata objects when StartByMatchingCentroids is set to on? Does it just calculate the centroid of the landmarks chosen? Thanks Marty From daviddoria at gmail.com Wed Feb 4 20:36:36 2009 From: daviddoria at gmail.com (daviddoria) Date: Wed, 4 Feb 2009 17:36:36 -0800 (PST) Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <4989BE4C.5020109@vision.ee.ethz.ch> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> <498956A4.6070705@vision.ee.ethz.ch> <21830087.post@talk.nabble.com> <4989A8BC.3050901@cfdrc.com> <21832865.post@talk.nabble.com> <4989B899.9040809@vision.ee.ethz.ch> <21833537.post@talk.nabble.com> <4989BE4C.5020109@vision.ee.ethz.ch> Message-ID: <21843560.post@talk.nabble.com> Unfortunately I am getting this error: >>> reader = vtkPolyDataReader() Traceback (most recent call last): File "", line 1, in NameError: name 'vtkPolyDataReader' is not defined Any ideas? Dave -- View this message in context: http://www.nabble.com/Some-things-cannot-be-saved-as-VTP--tp21815835p21843560.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Wed Feb 4 21:02:41 2009 From: daviddoria at gmail.com (daviddoria) Date: Wed, 4 Feb 2009 18:02:41 -0800 (PST) Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <21843560.post@talk.nabble.com> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> <498956A4.6070705@vision.ee.ethz.ch> <21830087.post@talk.nabble.com> <4989A8BC.3050901@cfdrc.com> <21832865.post@talk.nabble.com> <4989B899.9040809@vision.ee.ethz.ch> <21833537.post@talk.nabble.com> <4989BE4C.5020109@vision.ee.ethz.ch> <21843560.post@talk.nabble.com> Message-ID: <21843783.post@talk.nabble.com> I went ahead and did it in c++, but the problem is that no matter what hole size I specify, it only fills little tiny holes - nothing even 1/100th the size of the windows of the car. Is there anything else to try? Dave -- View this message in context: http://www.nabble.com/Some-things-cannot-be-saved-as-VTP--tp21815835p21843783.html Sent from the VTK - Users mailing list archive at Nabble.com. From trshash at gmail.com Wed Feb 4 23:38:02 2009 From: trshash at gmail.com (Shashwath T.R.) Date: Thu, 5 Feb 2009 10:08:02 +0530 Subject: [vtkusers] Plotting raster data with colormap In-Reply-To: <4989DD83.8060502@usask.ca> References: <4989DD83.8060502@usask.ca> Message-ID: <2a2a16740902042038g594c2451u582361e5adf98e3e@mail.gmail.com> Hi Nicholas, On Wed, Feb 4, 2009 at 11:55 PM, Nicholas Kinar wrote: > I am wondering if it would be possible to plot raster data using VTK in a > similar fashion to the Matlab imagesc(X) function. Essentially what I have > is a (m x n) matrix of doubles, and I would like to display this matrix as a > 2D plot with a colormap. The colormap intensity would correspond to the > scaled double values. Would it be possible to set this up in the form of an > animation, i.e. code that continues to update and display the plot on the > screen? You'll want to use vtkImageViewer or vtkImageViewer2. Create an image of size MxNx1, fill it with your input data, and set it as input to your image viewer. > Does anyone have some sample code in C/C++? Which functions would I use in > VTK to create such a plot? > Take a look at the image viewer and image data examples in the VTK source code... They may not exactly contain what you want, but it should point you in the right direction. HTH Shash -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.kinar at usask.ca Thu Feb 5 00:16:28 2009 From: n.kinar at usask.ca (Nicholas Kinar) Date: Wed, 04 Feb 2009 23:16:28 -0600 Subject: [vtkusers] Plotting raster data with colormap In-Reply-To: <2a2a16740902042038g594c2451u582361e5adf98e3e@mail.gmail.com> References: <4989DD83.8060502@usask.ca> <2a2a16740902042038g594c2451u582361e5adf98e3e@mail.gmail.com> Message-ID: <498A762C.7040907@usask.ca> Hi T.R.-- Thank you so much for pointing me in the right direction. These classes should perform well for my application. Once again, thank you! Nicholas Shashwath T.R. wrote: > Hi Nicholas, > > On Wed, Feb 4, 2009 at 11:55 PM, Nicholas Kinar > wrote: > > I am wondering if it would be possible to plot raster data using > VTK in a similar fashion to the Matlab imagesc(X) function. > Essentially what I have is a (m x n) matrix of doubles, and I > would like to display this matrix as a 2D plot with a colormap. > The colormap intensity would correspond to the scaled double > values. Would it be possible to set this up in the form of an > animation, i.e. code that continues to update and display the plot > on the screen? > > > You'll want to use vtkImageViewer or vtkImageViewer2. Create an image > of size MxNx1, fill it with your input data, and set it as input to > your image viewer. > > > Does anyone have some sample code in C/C++? Which functions would > I use in VTK to create such a plot? > > > Take a look at the image viewer and image data examples in the VTK > source code... They may not exactly contain what you want, but it > should point you in the right direction. > > HTH > > Shash > ------------------------------------------------------------------------ > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From amozes77 at yahoo.com Thu Feb 5 01:20:56 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Wed, 4 Feb 2009 22:20:56 -0800 (PST) Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: <479861.53211.qm@web32005.mail.mud.yahoo.com> Message-ID: <406259.23152.qm@web51310.mail.re2.yahoo.com> I've rebuilt vtk and also found the vtkMFC Configure.h.? I am able to point to the file properly but I'm still struggling to get this fully running... ? I can compile and link successfully.? When I run, it can't find the vtkMFC.dll.? I change the PATH to point to the build/bin/debug dir (where I verified that the .dll exists)?via Tools->Options->Projects and Solutions->VC++ Directories but it still didn't work.? I'll poke around more for VS help, but if there's an obvious answer, it would be appreciated. ? Again, this is something I had working with 5.0.3 in an older VS.? I dug around to find differences between 5.0.3 and 5.2.1.? One difference is that I never had to play with vtkMFC as a .dll.? The vtkMFC project in 5.0.3 had an interesting setting for "Use of MFC".? Usually, choices are: Standard Windows Libraries, Use MFC as static library, Use MFC as shared library.? For 5.0.3, this setting is "6".? For 5.2.1, it's set as "Use MFC as shared library" (.dll).? This change means I have to change my project also to shared (whereas I previously had it as static) - right?? So now it searches for the .dll and hence my new troubles. (btw, I copied the .dll into my project's debug folder just to see if it works and it finds it but?crashes soon after - I assume this is probably improper anyway). ? Thanks again for the help. --- On Wed, 2/4/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "David Cole" , "Alon Mozes" Cc: vtkusers at vtk.org Date: Wednesday, February 4, 2009, 11:40 AM ? I built VTK 5.2.1 from source with VS 2008 Pro Edition and found vtkMFCConfigure.h in the following two folders: ? 1) MyBuildDir\GUISupport\MFC\ 2) CMAKE_INSTALL_PREFIX\include\vtk-5.2\ ? I configured vtk source in CMake 2.6.2 with both VTK_USE_GUISupport and VTK_Use_MFC on. I also had VTK_USE_QT on. I built the binary from VTK.sln by building ALL_BUILD project and then building INSTALL project. It was an error-free process after commenting out a few lines pointed out by David (see below). ? ? --- On Wed, 2/4/09, Alon Mozes wrote: From: Alon Mozes Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "David Cole" Cc: vtkusers at vtk.org Date: Wednesday, February 4, 2009, 11:51 AM Sorry, I think I had missed both Michael's and Arturo's posts (Should I not be expecting an email response or notification of response?? No sign of a reply in any junk folder either or even in the digests.? Maybe I'm doing something stupid with my multiple email addresses...).? I've found the posts?online through markmail and will try to address them... ? Michael, I did build VTK myself.? To be clear: I download the source, use CMake to configure it by pointing to the source folder and creating a new build folder, and then compile in Visual Studio using the solution file I find in that newly?populated?build directory.? I found no sign of vtkMFCConfigure.h anywhere.? From what I understand, I think this is a bug in the vtk installation code. ? The only trick is that I changed one vtk MFC file to get VTK to compile (that winver bug; see the origin of this thread) and then recompiled.? I don't imagine that affected this problem.? I am currently not at my dev machine, but when I get back, I can try from scratch with downloading vtk, configuring in CMake, making the change for that winver bug, and compiling in VS and seeing if that file exists (or?I guess it should?exist immediately after the CMake stage?). ? Arturo, Thanks, that was my original concern.? I'd still like to use VS from start to finish if I can since I'm more familiar with it, but I'm glad to know it should be a minor change if I can't get this working. ? David, Long story short, if I understand right, either that file exists and I'm not properly pointing to it in my project settings, or it doesn't exist and it's?a vtk bug.? I'm pretty sure it doesn't exist (I recall searching my entire hard drive for it and came up with nothing; I can double check tonight). ? Thanks again for all the help. --- On Wed, 2/4/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Wednesday, February 4, 2009, 9:15 AM Using CMake is not *required*, it is simply strongly recommended because it avoids problems exactly like you are seeing right now. All you need to do is add an include directory so that Visual Studio can find the file it's looking for. As Mike Jackson pointed out, though, if you're using an install tree of VTK and the file is not actually installed, then you've found a bug in VTK's install rules. Please let us know if that's the case, so we can fix it.... Thanks, David Cole On Wed, Feb 4, 2009 at 11:26 AM, Alon Mozes wrote: I've read a bit more about using CMake, and if I understand correctly, we would have to re-run CMake only when we change our project settings, not every time we build as I mistakenly said before.? This is less painful than what I'd thought, but still more difficult than I'd like as project settings do change from time to time and we're now incorporating an extra application on a semi-regular basis.? I'm very accustomed to dealing with the VS project settings format and am a total newbie to the CMake lists.? If you insist that CMake is required to getting the project to work, I will invest the effort.? Otherwise, I would prefer to simply tweak what was an already perfectly functioning project. ? Thanks for the advice. --- On Wed, 2/4/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Wednesday, February 4, 2009, 3:45 AM Are you using CMake to build your project? The file vtkMFCConfigure.h is in your VTK build tree. If you are using CMake to build your project with find_package(VTK) and include(${VTK_USE_FILE}) then it should just work.... If you're not using CMake, I would recommend using it for your VTK dependent projects. It's much easier. It's probably just a matter of adding extra include directories for non-CMake-based projects. HTH, David On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: Maybe I spoke too soon... ? I'm able to compile VTK now without complaints about MFC.? However, now I try to compile my application and I get an error: ? 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or directory ? I include vtkMFCWindow.h in one of my own project header files, and that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere (I do find a vtkMFCConfigure.h.in in the vtk source folder).? I am using VTK 5.2.1.? I checked the previous version I was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include vtkMFCConfigure.h.? Instead, it includes vtkConfigure.h, so this seems to be a new change.? Any idea what I'm doing wrong?? I notice there's an MFC?project setting for compiling using Standard Windows, MFC in a shared dll, and MFC in a static library.? This setting is available for both the VTK ALL_BUILD project as well as my own.? I've tried using standard windows and static library with both with no luck.? Maybe this setting matters somehow? ? Any help would be greatly appreciated.? Thanks. --- On Mon, 2/2/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Monday, February 2, 2009, 4:28 AM Did you not see my response to this thread the other day....? ? The first three lines of vtkMFCWindow.cpp are the culprit. They read: ? #ifndef WINVER ? ?// Allow use of features specific to Windows 95 and Windows NT 4 or later. ? #define WINVER 0x0400 ? #endif ? Remove them or comment them out and it should work ok with VS2008. ? Sorry for the inconvenience.... HTH, David On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: Not sure why I had to disable video for windows.? I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly).? I got rid of that and still have one problem with the MFC lib which I know I need.? Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag?? Is this a problem with my Windows settings somehow?? My Visual Studio settings?? Or VTK? ? Thanks, Alon --- On Thu, 1/29/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" , vtkusers at vtk.org Date: Thursday, January 29, 2009, 8:14 AM I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. ? Alon Mozes wrote: Hi All, I have a great project using VTK/ITK in an older version of Visual Studio.? I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition).? I've found that I must recompile VTK/ITK to properly do so.? I've started from scratch and installed the latest CMake 2.6?which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1.? For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING.? Then I compile the ALL_BUILD in Visual Studio and I get several errors.? I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away.? I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think?is critical for me): ? C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting ? When I dig a little, I'm taken to the following lines of code: ? #if((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) #error _WIN32_WINNT settings conflicts with _WIN32_IE setting #endif ? Its clearly passing this conditional and triggering this error.? The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass.? What's going on here?? Any help would be greatly appreciated. ? Thanks for the help. _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From becker at jkbecker.de Wed Feb 4 08:05:33 2009 From: becker at jkbecker.de (Jens K. Becker) Date: Wed, 04 Feb 2009 14:05:33 +0100 Subject: [vtkusers] "Solid" polyhedron Message-ID: <1233752733.2298.4.camel@model> Hi all, I have a polyhedron that I can display using vtk. The polyhedron is essentially defined by vertices that define triangluar facets which make up the outer shell of it. I use vtk to display the outer shell, the different vertices (as spheres) and edges of facets (as tubes). But it is only the outer shell that is displayed, the polyhedra are hollow. How can I color the whole polyhedron? I dont even know where to start looking to achieve this. Eveything I read about creating volumes does not apply to the kind of data I have (which essentially are the coordinates of vertices in 3D and which vertex belongs to which facet). Any help and hints are welcome! Greetings, Jens -- Dr. J.K. Becker University of Tuebingen - Institute for Geoscience Sigwartst. 10 - 72076 Tuebingen (Germany) Tel.: ++49 7071 29 73139 Fax: +49 7071 5059 Web: http://www.jkbecker.de From mweiss at cbs.mpg.de Thu Feb 5 05:20:05 2009 From: mweiss at cbs.mpg.de (Marcel Weiss) Date: Thu, 5 Feb 2009 11:20:05 +0100 (CET) Subject: [vtkusers] bug in vtkClipPolyData ??? In-Reply-To: <16209402.627481233829162680.JavaMail.root@zimbra> Message-ID: <4116530.627551233829205650.JavaMail.root@zimbra> Hi, I am using vtkStreamLine to trace streams through a 3D data field. The start points are given by a vtkPolyData object in the same space. So the number of streams created is identical to the number of points in the vtkPolyData. Each of the created streams consists of ~30 connected points. Everything fine so far. then I use vtkClipPolyData to clip those streams based on (other) scalar value. therefor I assign a scalar value for each of the points of every single stream and use the following code for clipping vtkClipPolyData* cutter = vtkClipPolyData :: New(); cutter-> SetInput(streams); cutter-> GenerateClipScalarsOff(); cutter-> SetValue(1.0); cutter-> UpdateInformation(); cutter-> Update(); this also works (some how), BUT: although vtkClipPolyData removes many of the streams points (as expected), it seems to create many new cell/lines. (see below) streamlining result has got: 12577845 points, 483730 cells, 0 verts, 483730 lines, 0 polys and 0 strips. cutting result has got: 9753382 points, 9268541 cells, 0 verts, 9268541 lines, 0 polys and 0 strips. even if some of the streams/line are clipped into two or more new lines, which should not happen (due to the way I write the scalars), the number of cells/lines/streams increases in a way I can understand ... Anyone any ideas? thanks Marcel From nourmestiri at yahoo.fr Thu Feb 5 06:13:53 2009 From: nourmestiri at yahoo.fr (Nour Mestiri) Date: Thu, 5 Feb 2009 11:13:53 +0000 (GMT) Subject: [vtkusers] Extract surface of a 3D volume Message-ID: <99495.11963.qm@web28205.mail.ukl.yahoo.com> Hi all vtk users. I?make the reconstruction of a 3D volume model from a sequence of 2D images. Now, i want to save just the surface of this 3D object to convert it in VTP format. How can i do this? Thankl you so much __________________________________________________________________________________________________ Ne pleurez pas si votre Webmail ferme ! R?cup?rez votre historique sur Yahoo! Mail ! http://fr.docs.yahoo.com/mail/transfert_mails.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.spitzlinger at synedra.com Thu Feb 5 07:08:35 2009 From: p.spitzlinger at synedra.com (Philip Spitzlinger) Date: Thu, 05 Feb 2009 13:08:35 +0100 Subject: [vtkusers] Hello Everybody Message-ID: <498AD6C3.3040607@synedra.com> Hello everybody, I am using the vtkImageReslice class to generated slice images out of a volume. Everything works pretty well so far. The only extension that our customer would like to see is that the rotation point ( the reslice axes origin ) is centered in the resulting image. My guess is that I will have to set up the OutputOrigin correctly to get this right. So far I am using the following step to create the slices. reslice->SetResliceAxesOrigin( x, y, z ); reslice->SetResliceAxesDirectionCosine( x1, x2, x3, y1, y2, y3, z1, z2, z3 ); reslice->SetOutputDimensionality( 2 ); vtkImageData* image = reslice->GetOutput(); image->Update(); How can I now have the ResliceAxesOrigin centered within the output image? Can anybody please help me or give me a hint? Thx in advance Philip From p.spitzlinger at synedra.com Thu Feb 5 07:19:33 2009 From: p.spitzlinger at synedra.com (Philip Spitzlinger) Date: Thu, 05 Feb 2009 13:19:33 +0100 Subject: [vtkusers] Center ResliceOrigin in OutputImage In-Reply-To: <498AD6C3.3040607@synedra.com> References: <498AD6C3.3040607@synedra.com> Message-ID: <498AD955.50609@synedra.com> Philip Spitzlinger schrieb: > Hello everybody, > > I am using the vtkImageReslice class to generated slice images out of > a volume. > Everything works pretty well so far. > The only extension that our customer would like to see is that the > rotation point ( the reslice axes origin ) is centered in the > resulting image. > > My guess is that I will have to set up the OutputOrigin correctly to > get this right. > So far I am using the following step to create the slices. > > reslice->SetResliceAxesOrigin( x, y, z ); > reslice->SetResliceAxesDirectionCosine( x1, x2, x3, y1, y2, y3, z1, > z2, z3 ); > reslice->SetOutputDimensionality( 2 ); > vtkImageData* image = reslice->GetOutput(); > image->Update(); > > How can I now have the ResliceAxesOrigin centered within the output > image? > > Can anybody please help me or give me a hint? > > Thx in advance > Philip Changed the subject to something more specific :-) sorry for the spam From skull2crush at hotmail.com Thu Feb 5 07:22:31 2009 From: skull2crush at hotmail.com (NullPointer) Date: Thu, 5 Feb 2009 04:22:31 -0800 (PST) Subject: [vtkusers] Pointer to VTK Volume Message-ID: <21848802.post@talk.nabble.com> Hi all, I'd like to obtain a "raw" pointer (to be used in a native OpenGL application) from a VTK volume WITHOUT allocating memory (therefore doubling the space needed). The goal is to implement a texture shader... I checked vtkImageExport but always get an application crash when used (even when setting an already allocated buffer). ... vtkImageExport * exporter16Bit = vtkImageExport::New(); exporter16Bit->SetInput( (*start).second.SeriesMetaObject_.VtkSigned16BitVolume ); (*start).second.SeriesMetaObject_.RawSigned16BitVolume = (void*)malloc(exporter16Bit->GetDataMemorySize()/sizeof(short)); exporter16Bit->SetExportVoidPointer( (*start).second.SeriesMetaObject_.RawSigned16BitVolume ); //exporter16Bit->Export(); // -> CRASH ... Is there a better way to obtain something similar as I try to do with the code snippet above? Thank you very much for hints & tips. Best Regards, Peter -- View this message in context: http://www.nabble.com/Pointer-to-VTK-Volume-tp21848802p21848802.html Sent from the VTK - Users mailing list archive at Nabble.com. From kamran.iranpour at gmail.com Thu Feb 5 07:27:09 2009 From: kamran.iranpour at gmail.com (Kamran Iranpour) Date: Thu, 5 Feb 2009 13:27:09 +0100 Subject: [vtkusers] help needed with vtkprobefilter Message-ID: Hi, Let me first confess to lack of experience in and knowledge of vtk. Still, having failed to find any answer to my problem after browsing the archive and extensive search in the documentation I allow myself to seek your help: I have a cube that needs resampling and I thought vtkprobefilter would offer the solution I was looking for. Here is the piece of code I struggle with: -------------------------------------------------------------------- ... ... for (int i = 0; i < znodes; i ++) for (int j = 0; j < ynodes; j ++) for (int k = 0; k < xnodes; k ++) { zValues->InsertValue(nPoints, cubeData[cubeindex]); cubeindex++; } vtkImageData* imageData = vtkImageData::New(); vtkImageData* mapData = vtkImageData::New(); vtkProbeFilter* probeFilter = vtkProbeFilter::New(); imageData->SetDimensions(xnodes, ynodes, znodes); imageData->SetOrigin(xo, yo, zo); imageData->SetSpacing(xIncrement, yIncrement, zIncrement); imageData->GetPointData()->SetScalars(zValues); mapData->SetDimensions(xnodes, ynodes, znodes); mapData->SetOrigin(xo, yo, zo); mapData->SetSpacing(xIncrement, yIncrement, zIncrement); probeFilter->SetSource(imageData); probeFilter->SetInput(mapData); probeFilter->Update(); mapData->GetPointData()->SetScalars(probeFilter->GetOutput()->GetPointData()->GetScalars()); ... ... ----------------------------------------------------------------------------- As you see I am using the same cube geometry for input as well as the output to see if it works in the simplest case. The problem is when I make the call to "Update()". The program crashes. The strange thing is that it occasonally works for small cubes (around 100x100x100) making me wonder if there is a limit to the number of smaples since memory should not be the problem as I have enough memory to make every programmer green with envy. Or am I way of the mark in the above code ? Any help would be greatly appreciated, Kamran From T.Lim at hw.ac.uk Thu Feb 5 07:47:28 2009 From: T.Lim at hw.ac.uk (Lim, Theodore) Date: Thu, 5 Feb 2009 12:47:28 -0000 Subject: [vtkusers] Call for contributions ISAGA2009 - International Simulation and Gaming Conference References: <498AD6C3.3040607@synedra.com> Message-ID: <4F6F33D7A78FCD48BE50C4D7C1688F37EDA73A@ex6.mail.win.hw.ac.uk> Dear colleagues, Apologies for cross posting... I would like to draw your attention to the a very special conference - the 40th Anniversary and 1st S.E.Asian Conference of ISAGA (http://www.isaga2009.ssagsg.org/index.html), in Singapore, on the theme of Learn to game, Game to learn. The conference comprises several tracks, one of which is "Engineering" (http://www.isaga2009.ssagsg.org/tracknotes.html#Engineering). For those who have implement VTK with game/physics engines and/or VR, haptics, etc. to teach, create engineering applications, visualise and simulate engineering processes, use game methodoliges in engineering processes, etc, we hope that you would consider showcasing your work at this conference. Submissions are welcomed, but not limited to the following areas: gaming and simulation methodologies for engineering applications, the application and evaluation of virtual environments which engage participants in engineering problem solving, gaming-engineering diversity awareness, behavioural pattern recognition in engineering and gaming, machine learning, cognitive engineering in product design, analysis and manufacturing. A full description is available here: http://www.isaga2009.ssagsg.org/download/TrackEngineering_Desc.pdf The deadline is tight but we hope that you will consider submitting a paper to this conference. Here are the important deadlines: 01 March 2009: 400 word proposal submission. 01 April 2009: Notification about acceptance of proposals. 25 April 2009: Last day for early bird registration. 01 June 2009: Final submission of 4000 word paper. The session types and submission details are listed here; http://www.isaga2009.ssagsg.org/sessionsprog.html. For final paper submission, please use the paper template which can be downloaded here: http://www.isaga2009.ssagsg.org/registration.html Please send this onto anyone else whom you think may be interested in coming along and submitting a paper. Unfortunately, we are only able to publish your work if you can present, or have a representative present your work. Many thanks in advance for your time and patience in reading through this e-mail and we look forward to meeting you in Singapore in June/July. Best wishes, Theo Lim (Engineering Track Chair) -- Heriot-Watt University is a Scottish charity registered under charity number SC000278. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Feb 5 09:45:47 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 5 Feb 2009 09:45:47 -0500 Subject: [vtkusers] "Solid" polyhedron In-Reply-To: <1233752733.2298.4.camel@model> References: <1233752733.2298.4.camel@model> Message-ID: vtkPolyData can only represent the external surfaces, because it can only contain 2D cell types, such as triangle. vtkUnstructuredGrid can represent the internal volume as well, because it can contain 3D cell types, such a tetrahedra. You can use the Delauney filters to create 2D or 3D cells out of a set of points. On Wed, Feb 4, 2009 at 8:05 AM, Jens K. Becker wrote: > Hi all, > > I have a polyhedron that I can display using vtk. The polyhedron is > essentially defined by vertices that define triangluar facets which make > up the outer shell of it. I use vtk to display the outer shell, the > different vertices (as spheres) and edges of facets (as tubes). But it > is only the outer shell that is displayed, the polyhedra are hollow. How > can I color the whole polyhedron? I dont even know where to start > looking to achieve this. Eveything I read about creating volumes does > not apply to the kind of data I have (which essentially are the > coordinates of vertices in 3D and which vertex belongs to which facet). > Any help and hints are welcome! > > Greetings, > Jens > > -- > Dr. J.K. Becker > University of Tuebingen - Institute for Geoscience > Sigwartst. 10 - 72076 Tuebingen (Germany) > Tel.: ++49 7071 29 73139 Fax: +49 7071 5059 > Web: http://www.jkbecker.de > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From david.cole at kitware.com Thu Feb 5 11:16:30 2009 From: david.cole at kitware.com (David Cole) Date: Thu, 5 Feb 2009 11:16:30 -0500 Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: <406259.23152.qm@web51310.mail.re2.yahoo.com> References: <479861.53211.qm@web32005.mail.mud.yahoo.com> <406259.23152.qm@web51310.mail.re2.yahoo.com> Message-ID: The shared/static library choice is very inflexible when using MFC... For an MFC program to function as expected, you have to use shared or static MFC libraries, and based on that choice, you must link to the *corresponding* version of the C runtime libraries. If you use shared MFC dlls, you must link to the shared dll version of the C runtime libraries. If you use static MFC, then static C runtime libs... The same principle then extends to libraries that add to MFC (like VTK does when you turn on VTK_USE_MFC). Therefore, if you build VTK with BUILD_SHARED_LIBS ON, you must use shared MFC libs and link to the shared C runtime libs. (All dlls...) If you build VTK with BUILD_SHARED_LIBS OFF, you must use static MFC libs and link to static C runtime libs. (No dlls...) Additionally, you should use delay loading for all VTK dlls when building an MFC program that uses VTK dlls so that you do not get false mem leak reporting at MFC program shutdown time. If you do not use DLL delay loading and the VTK dlls load first, then their memory allocated at that load time gets reported as a leak by MFC leak checks, when in fact, the VTK memory is not leaking, it is just deallocated after the MFC report takes place. So. VTK 5.2.1 is more flexible and tries to guarantee the correctness of the result better than 5.0 did... If you want the old static linking to MFC behavior, just do a full rebuild of VTK with BUILD_SHARED_LIBS OFF and it should just work. If you must deal with DLL's, though, I'd recommend copying the VTK dlls into the same directory with your executable. Mucking around with the PATH is *always* problematic, no matter how you do it. HTH, David On Thu, Feb 5, 2009 at 1:20 AM, Alon Mozes wrote: > I've rebuilt vtk and also found the vtkMFC Configure.h. I am able to point > to the file properly but I'm still struggling to get this fully running... > > I can compile and link successfully. When I run, it can't find the > vtkMFC.dll. I change the PATH to point to the build/bin/debug dir (where I > verified that the .dll exists) via Tools->Options->Projects and > Solutions->VC++ Directories but it still didn't work. I'll poke around more > for VS help, but if there's an obvious answer, it would be appreciated. > > Again, this is something I had working with 5.0.3 in an older VS. I dug > around to find differences between 5.0.3 and 5.2.1. One difference is that > I never had to play with vtkMFC as a .dll. The vtkMFC project in 5.0.3 had > an interesting setting for "Use of MFC". Usually, choices are: Standard > Windows Libraries, Use MFC as static library, Use MFC as shared library. > For 5.0.3, this setting is "6". For 5.2.1, it's set as "Use MFC as shared > library" (.dll). This change means I have to change my project also to > shared (whereas I previously had it as static) - right? So now it searches > for the .dll and hence my new troubles. (btw, I copied the .dll into my > project's debug folder just to see if it works and it finds it but crashes > soon after - I assume this is probably improper anyway). > > Thanks again for the help. > > --- On *Wed, 2/4/09, Jim * wrote: > > From: Jim > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "David Cole" , "Alon Mozes" < > amozes77 at yahoo.com> > Cc: vtkusers at vtk.org > Date: Wednesday, February 4, 2009, 11:40 AM > > > > I built VTK 5.2.1 from source with VS 2008 Pro Edition and found > vtkMFCConfigure.h in the following two folders: > > 1) MyBuildDir\GUISupport\MFC\ > 2) CMAKE_INSTALL_PREFIX\include\vtk-5.2\ > > I configured vtk source in CMake 2.6.2 with both VTK_USE_GUISupport and > VTK_Use_MFC on. I also had VTK_USE_QT on. I built the binary from VTK.sln by > building ALL_BUILD project and then building INSTALL project. It was an > error-free process after commenting out a few lines pointed out by David > (see below). > > > --- On *Wed, 2/4/09, Alon Mozes * wrote: > > From: Alon Mozes > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "David Cole" > Cc: vtkusers at vtk.org > Date: Wednesday, February 4, 2009, 11:51 AM > > Sorry, I think I had missed both Michael's and Arturo's posts (Should I > not be expecting an email response or notification of response? No sign of > a reply in any junk folder either or even in the digests. Maybe I'm doing > something stupid with my multiple email addresses...). I've found the > posts online through markmail and will try to address them... > > Michael, > I did build VTK myself. To be clear: I download the source, use CMake to > configure it by pointing to the source folder and creating a new build > folder, and then compile in Visual Studio using the solution file I find in > that newly populated build directory. I found no sign of vtkMFCConfigure.h > anywhere. From what I understand, I think this is a bug in the vtk > installation code. > > The only trick is that I changed one vtk MFC file to get VTK to compile > (that winver bug; see the origin of this thread) and then recompiled. I > don't imagine that affected this problem. I am currently not at my dev > machine, but when I get back, I can try from scratch with downloading vtk, > configuring in CMake, making the change for that winver bug, and compiling > in VS and seeing if that file exists (or I guess it should exist immediately > after the CMake stage?). > > Arturo, > Thanks, that was my original concern. I'd still like to use VS from start > to finish if I can since I'm more familiar with it, but I'm glad to know it > should be a minor change if I can't get this working. > > David, > Long story short, if I understand right, either that file exists and I'm > not properly pointing to it in my project settings, or it doesn't exist and > it's a vtk bug. I'm pretty sure it doesn't exist (I recall searching my > entire hard drive for it and came up with nothing; I can double check > tonight). > > Thanks again for all the help. > > --- On *Wed, 2/4/09, David Cole * wrote: > > From: David Cole > Subject: Re: [vtkusers] Compile with Visual Studio 2008 > To: "Alon Mozes" > Cc: vtkusers at vtk.org, "Jim" > Date: Wednesday, February 4, 2009, 9:15 AM > > Using CMake is not *required*, it is simply strongly recommended because it > avoids problems exactly like you are seeing right now. > All you need to do is add an include directory so that Visual Studio can > find the file it's looking for. > > As Mike Jackson pointed out, though, if you're using an install tree of VTK > and the file is not actually installed, then you've found a bug in VTK's > install rules. Please let us know if that's the case, so we can fix it.... > > > Thanks, > David Cole > > > On Wed, Feb 4, 2009 at 11:26 AM, Alon Mozes wrote: > >> I've read a bit more about using CMake, and if I understand correctly, >> we would have to re-run CMake only when we change our project settings, not >> every time we build as I mistakenly said before. This is less painful than >> what I'd thought, but still more difficult than I'd like as project settings >> do change from time to time and we're now incorporating an extra application >> on a semi-regular basis. I'm very accustomed to dealing with the VS project >> settings format and am a total newbie to the CMake lists. If you insist >> that CMake is required to getting the project to work, I will invest the >> effort. Otherwise, I would prefer to simply tweak what was an already >> perfectly functioning project. >> >> Thanks for the advice. >> >> --- On *Wed, 2/4/09, David Cole * wrote: >> >> From: David Cole >> Subject: Re: [vtkusers] Compile with Visual Studio 2008 >> To: "Alon Mozes" >> Cc: vtkusers at vtk.org, "Jim" >> Date: Wednesday, February 4, 2009, 3:45 AM >> >> Are you using CMake to build your project? >> >> The file vtkMFCConfigure.h is in your VTK build tree. If you are using >> CMake to build your project with find_package(VTK) and >> include(${VTK_USE_FILE}) then it should just work.... >> >> If you're not using CMake, I would recommend using it for your VTK >> dependent projects. It's much easier. It's probably just a matter of adding >> extra include directories for non-CMake-based projects. >> >> >> HTH, >> David >> >> >> On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: >> >>> Maybe I spoke too soon... >>> >>> I'm able to compile VTK now without complaints about MFC. However, now I >>> try to compile my application and I get an error: >>> >>> 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : >>> fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such >>> file or directory >>> I include vtkMFCWindow.h in one of my own project header files, and >>> that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere >>> (I do find a vtkMFCConfigure.h.in in the >>> vtk source folder). I am using VTK 5.2.1. I checked the previous version I >>> was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include >>> vtkMFCConfigure.h. Instead, it includes vtkConfigure.h, so this seems to be >>> a new change. Any idea what I'm doing wrong? I notice there's an >>> MFC project setting for compiling using Standard Windows, MFC in a shared >>> dll, and MFC in a static library. This setting is available for both the >>> VTK ALL_BUILD project as well as my own. I've tried using standard windows >>> and static library with both with no luck. Maybe this setting matters >>> somehow? >>> >>> Any help would be greatly appreciated. Thanks. >>> >>> >>> --- On *Mon, 2/2/09, David Cole * wrote: >>> >>> From: David Cole >>> Subject: Re: [vtkusers] Compile with Visual Studio 2008 >>> To: "Alon Mozes" >>> Cc: vtkusers at vtk.org, "Jim" >>> Date: Monday, February 2, 2009, 4:28 AM >>> >>> Did you not see my response to this thread the other day....? >>> >>> >>> The first three lines of vtkMFCWindow.cpp are the culprit. They read: >>> #ifndef WINVER // Allow use of features specific to Windows 95 and >>> Windows NT 4 or later. >>> #define WINVER 0x0400 >>> #endif >>> >>> Remove them or comment them out and it should work ok with VS2008. >>> >>> Sorry for the inconvenience.... >>> >>> >>> HTH, >>> David >>> >>> >>> >>> >>> On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: >>> >>>> Not sure why I had to disable video for windows. I just know that I >>>> compiled and many errors seems to come from a conflict there (with the vtk >>>> rendering lib if I remember correctly). I got rid of that and still have >>>> one problem with the MFC lib which I know I need. Anyone out there compile >>>> VTK with Visual Studio 2008 while keeping the MFC flag? Is this a problem >>>> with my Windows settings somehow? My Visual Studio settings? Or VTK? >>>> >>>> Thanks, >>>> Alon >>>> >>>> --- On *Thu, 1/29/09, Jim * wrote: >>>> >>>> From: Jim >>>> Subject: Re: [vtkusers] Compile with Visual Studio 2008 >>>> To: "Alon Mozes" , vtkusers at vtk.org >>>> Date: Thursday, January 29, 2009, 8:14 AM >>>> >>>> >>>> I am doing the same thing and got a bunch of errors. I wonder why you >>>> have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. >>>> >>>> >>>> *Alon Mozes * wrote: >>>> >>>> Hi All, >>>> I have a great project using VTK/ITK in an older version of Visual >>>> Studio. I need to upgrade to the latest version of VS (Visual Studio 2008 >>>> Professional Edition). I've found that I must recompile VTK/ITK to properly >>>> do so. I've started from scratch and installed the latest CMake 2.6 which >>>> offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1. For >>>> the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and >>>> VTK_RENDERING. Then I compile the ALL_BUILD in Visual Studio and I get >>>> several errors. I reconfigured CMake to turn off the >>>> VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away. I'm still stuck >>>> with the following failure (which seems to be in the vtkMFC package which I >>>> think is critical for me): >>>> >>>> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : >>>> fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE >>>> setting >>>> >>>> When I dig a little, I'm taken to the following lines of code: >>>> >>>> #if >>>> ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) >>>> >>>> #error _WIN32_WINNT settings conflicts with _WIN32_IE setting >>>> #endif >>>> >>>> Its clearly passing this conditional and triggering this error. The >>>> weird thing is that the first part of the conditional should be 0 (the >>>> values seem to be 0x0600 < 0x0500) so the whole thing should not pass. >>>> What's going on here? Any help would be greatly appreciated. >>>> >>>> Thanks for the help. >>>> >>>> >>>> _______________________________________________ >>>> This is the private VTK discussion list. >>>> Please keep messages on-topic. Check the FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> Follow this link to subscribe/unsubscribe: >>>> http://www.vtk.org/mailman/listinfo/vtkusers >>>> >>>> >>>> >>>> _______________________________________________ >>>> This is the private VTK discussion list. >>>> Please keep messages on-topic. Check the FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> Follow this link to subscribe/unsubscribe: >>>> http://www.vtk.org/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >> >> > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at:http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe:http://www.vtk.org/mailman/listinfo/vtkusers > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Thu Feb 5 11:31:15 2009 From: daviddoria at gmail.com (David Doria) Date: Thu, 5 Feb 2009 11:31:15 -0500 Subject: [vtkusers] How to color CellData? Message-ID: To color points, I can do this: vtkSmartPointer Colors = vtkSmartPointer::New(); // ... fill Colors ... pdata->GetPointData()->AddArray(Colors); But what if I want to color a set of lines. vtkSmartPointer lines = vtkSmartPointer::New(); // ... fill lines ... pdata->SetLines(lines); Now how do I add the color array? -- Thanks, David From ahs at cfdrc.com Thu Feb 5 11:40:22 2009 From: ahs at cfdrc.com (Amy Squillacote) Date: Thu, 05 Feb 2009 10:40:22 -0600 Subject: [vtkusers] How to color CellData? In-Reply-To: References: Message-ID: <498B1676.1010806@cfdrc.com> pdata->GetCellData()->AddArray(...) David Doria wrote: > To color points, I can do this: > > vtkSmartPointer Colors = > vtkSmartPointer::New(); > // ... fill Colors ... > pdata->GetPointData()->AddArray(Colors); > > But what if I want to color a set of lines. > > vtkSmartPointer lines = vtkSmartPointer::New(); > // ... fill lines ... > pdata->SetLines(lines); > > Now how do I add the color array? > > -- Amy Squillacote Phone: (256) 726-4839 Sr. Computer Scientist Fax: (256) 726-4806 CFD Research Corporation Web: http://www.cfdrc.com 215 Wynn Drive, Suite 501 Huntsville, AL 35805 From amozes77 at yahoo.com Thu Feb 5 11:42:49 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Thu, 5 Feb 2009 08:42:49 -0800 (PST) Subject: [vtkusers] vtkMFC as .dll vs static library In-Reply-To: <479861.53211.qm@web32005.mail.mud.yahoo.com> Message-ID: <982743.95970.qm@web51307.mail.re2.yahoo.com> Hi All, This had followed a thread ("Compile with Visual Studio 2008") but I think has become different enough... ? I have an MFC?project that I'm trying to upgrade in Visual Studio (from .NET 2003 to 2008) that uses vtk (used to be 5.0.3, now upgrading to 5.2.1).? The default use of MFC in the project is as a .dll but I'm having trouble with that.? In addition, I'd prefer to have it as a static library so the entire .exe is self-contained (no need to install additional dependencies).? Either path, I've run into difficulty. ? Path 1: as a .dll I build vtk 5.2.1 using CMake and everything is ok.? I find the vtkMFC.dll as expected in the build/debug/bin dir.? In visual studio, I can compile and link successfully, but when I run, it can't find the .dll.? I've added a dir in the Tools->Options->Projects and Solutions->VC++ Dirs as I've seen on some help pages, but it didn't seem to have any effect.? I've copied the .dll directly into my project's debug folder so it's guaranteed to find it, and it does, but the app crashes (and I'm sure this is not the proper way to have it find the .dll - I'd just like to see the app working).? This seems to be unique to the change of vtkMFC as a .dll as I've had the project running with other include/library files just fine.? Any suggestions? ? Path 2: as a statically linked library (This is more desirable) I change CMake settings so it should build vtk as a statically linked library, rather than .dll.? By that I mean, I change all "MD" and "MDd" references to "MT" and "MTd".? The "Use of MFC" setting offers 3 options: "Standard Windows Library", "Use MFC as shared .dll", and "Use MFC as static library".? I verify that in the vtkMFC project the "Use of MFC" setting is "Use MFC as static library" as well as in my project.? vtkMFC seems to successfully build as a .lib.? (Interseting note: in 5.0.3, the "Use of MFC" setting is "6" and I haven't been able to find anywhere what that means).? In my project, I remove any setting of _AFXDLL (and verify it's not set in the vtkMFC project).? The project compiles but has errors when linking.? Seems to be a conflict between libcmt.lib and msvcrt.lib.? It suggests setting /nodefaultlib - which I've tried - but that results in other linker errors saying it can't find the most basic functions.? I'm guessing I can't just sweepingly use the /nodefaultlib switch.? Does anyone know which .libs I have to ignore to get vtkMFC to work as a static library in my project?? Has anyone used vtkMFC as a static library? ? Thanks for all the help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From luisrpp at gmail.com Thu Feb 5 11:53:31 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Thu, 5 Feb 2009 14:53:31 -0200 Subject: [vtkusers] Update pixel value and display the changes in a widget Message-ID: Hi All, I have developed a callback to update the pixel value of an image being displayed in a widget. The idea is to set the pixels to zero in the points where the mouse is over and the left button is pressed. The problem is that I can't see any changes in the image, even after calling the Render method. This is the code: class vtkImageInteractionCallback : public vtkCommand { public: static vtkImageInteractionCallback *New() { return new vtkImageInteractionCallback; }; vtkImageInteractionCallback() { this->Slicing = 0; }; void SetInteractor(vtkRenderWindowInteractor *interactor) { this->Interactor = interactor; }; void SetImageViewer(vtkImageViewer2* viewer) { this->viewer = viewer; }; void SetPicker(vtkPointPicker* picker) { this->picker = picker; }; void performAction() { if (!picker->Pick(this->Interactor->GetEventPosition()[0], this->Interactor->GetEventPosition()[1], 0, viewer->GetRenderer())) { return; } double ptMapped[3]; picker->GetMapperPosition(ptMapped); double dSpacing[3]; viewer->GetInput()->GetSpacing(dSpacing); ptMapped[2] = viewer->GetSlice() * dSpacing[2]; printf("x=%d : y=%d\n", (int)ptMapped[0], (int)ptMapped[1]); // Update the image vtkImageData* image = viewer->GetInput(); // It is a 2D image. image->AllocateScalars(); image->SetScalarComponentFromDouble(ptMapped[0], ptMapped[1], 0, 0, image->GetScalarTypeMin()); image->Update(); viewer->SetInput(image); printf("GetScalarTypeMin: %f\n", image->GetScalarTypeMin()); viewer->Render(); }; virtual void Execute(vtkObject *, unsigned long event, void *) { if (event == vtkCommand::LeftButtonPressEvent) { this->Slicing = 1; performAction(); } else if (event == vtkCommand::LeftButtonReleaseEvent) { this->Slicing = 0; performAction(); } else if (event == vtkCommand::MouseMoveEvent) { if (this->Slicing) { performAction(); } } }; private: int Slicing; vtkRenderWindowInteractor* Interactor; vtkPointPicker* picker; vtkImageViewer2* viewer; }; Thanks in advance, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Thu Feb 5 11:49:32 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 5 Feb 2009 11:49:32 -0500 Subject: [vtkusers] vtkMFC as .dll vs static library In-Reply-To: <982743.95970.qm@web51307.mail.re2.yahoo.com> References: <982743.95970.qm@web51307.mail.re2.yahoo.com> Message-ID: <60DFB4CA-2C47-4EF8-8F8E-9458A05DE208@bluequartz.net> I have gotten that error before when I was trying to link libraries that were not the same from a "Threading" perspective, ie, one library was linked as a single threaded library to the single threaded c/c++ runtime while the another library was linked to a MultiThreaded c/c++ runtime. You must ensure _every_ library that you use are all built the _exact_ same way with respect to the following: MultiThreaded/Single Threaded C/C++ Static/Dynamic Link Check your settings carefully. That one is tough to track down sometimes. I think VS2003.Net was single threaded by default where VS2008 may be multi-threaded by default. HTH _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 5, 2009, at 11:42 AM, Alon Mozes wrote: > It suggests setting /nodefaultlib - which I've tried - but that > results in other linker errors saying it can't find the most basic > functions. I'm guessing I can't just sweepingly use the / > nodefaultlib switch. Does anyone know which .libs I have to ignore > to get vtkMFC to work as a static library in my project? Has anyone > used vtkMFC as a static library? From amozes77 at yahoo.com Thu Feb 5 11:56:55 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Thu, 5 Feb 2009 08:56:55 -0800 (PST) Subject: [vtkusers] Compile with Visual Studio 2008 In-Reply-To: Message-ID: <653672.208.qm@web51307.mail.re2.yahoo.com> Unfortunately, I just spawned a new thread before I got this post ("vtkMFC as .dll vs static library"), and it has very relevent info, but I'll respond here. ? Basically, I do want to use MFC statically (no .dlls).? I think the "Path 2" in my other post explains what I've done and follows your suggestions but still fails with linker errors.? I do leave BUILD_SHARED_LIBS as "OFF" (I think I did this in both static and .dll cases, so this could explain why the .dll fails).? Also, I didn't use any delay loading, so there's another reason the .dll path may be failing.? However, my statically linked path seems to be in line with everything you've said and it still wasn't working.?Do I need any /nodefaultlib parameters to get my project to use the vtkMFC lib? ? Thanks for the info.? At least I'm learning a lot as we go... --- On Thu, 2/5/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: jiksed at yahoo.com, vtkusers at vtk.org Date: Thursday, February 5, 2009, 8:16 AM The shared/static library choice is very inflexible when using MFC... For an MFC program to function as expected, you have to use shared or static MFC libraries, and based on that choice, you must link to the *corresponding* version of the C runtime libraries. If you use shared MFC dlls, you must link to the shared dll version of the C runtime libraries. If you use static MFC, then static C runtime libs... The same principle then extends to libraries that add to MFC (like VTK does when you turn on VTK_USE_MFC). Therefore, if you build VTK with BUILD_SHARED_LIBS ON, you must use shared MFC libs and link to the shared C runtime libs. (All dlls...) If you build VTK with BUILD_SHARED_LIBS OFF, you must use static MFC libs and link to static C runtime libs. (No dlls...) Additionally, you should use delay loading for all VTK dlls when building an MFC program that uses VTK dlls so that you do not get false mem leak reporting at MFC program shutdown time. If you do not use DLL delay loading and the VTK dlls load first, then their memory allocated at that load time gets reported as a leak by MFC leak checks, when in fact, the VTK memory is not leaking, it is just deallocated after the MFC report takes place. So. VTK 5.2.1 is more flexible and tries to guarantee the correctness of the result better than 5.0 did... If you want the old static linking to MFC behavior, just do a full rebuild of VTK with BUILD_SHARED_LIBS OFF and it should just work. If you must deal with DLL's, though, I'd recommend copying the VTK dlls into the same directory with your executable. Mucking around with the PATH is *always* problematic, no matter how you do it. HTH, David On Thu, Feb 5, 2009 at 1:20 AM, Alon Mozes wrote: I've rebuilt vtk and also found the vtkMFC Configure.h.? I am able to point to the file properly but I'm still struggling to get this fully running... ? I can compile and link successfully.? When I run, it can't find the vtkMFC.dll.? I change the PATH to point to the build/bin/debug dir (where I verified that the .dll exists)?via Tools->Options->Projects and Solutions->VC++ Directories but it still didn't work.? I'll poke around more for VS help, but if there's an obvious answer, it would be appreciated. ? Again, this is something I had working with 5.0.3 in an older VS.? I dug around to find differences between 5.0.3 and 5.2.1.? One difference is that I never had to play with vtkMFC as a .dll.? The vtkMFC project in 5.0.3 had an interesting setting for "Use of MFC".? Usually, choices are: Standard Windows Libraries, Use MFC as static library, Use MFC as shared library.? For 5.0.3, this setting is "6".? For 5.2.1, it's set as "Use MFC as shared library" (.dll).? This change means I have to change my project also to shared (whereas I previously had it as static) - right?? So now it searches for the .dll and hence my new troubles. (btw, I copied the .dll into my project's debug folder just to see if it works and it finds it but?crashes soon after - I assume this is probably improper anyway). ? Thanks again for the help. --- On Wed, 2/4/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "David Cole" , "Alon Mozes" Cc: vtkusers at vtk.org Date: Wednesday, February 4, 2009, 11:40 AM ? I built VTK 5.2.1 from source with VS 2008 Pro Edition and found vtkMFCConfigure.h in the following two folders: ? 1) MyBuildDir\GUISupport\MFC\ 2) CMAKE_INSTALL_PREFIX\include\vtk-5.2\ ? I configured vtk source in CMake 2.6.2 with both VTK_USE_GUISupport and VTK_Use_MFC on. I also had VTK_USE_QT on. I built the binary from VTK.sln by building ALL_BUILD project and then building INSTALL project. It was an error-free process after commenting out a few lines pointed out by David (see below). ? ? --- On Wed, 2/4/09, Alon Mozes wrote: From: Alon Mozes Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "David Cole" Cc: vtkusers at vtk.org Date: Wednesday, February 4, 2009, 11:51 AM Sorry, I think I had missed both Michael's and Arturo's posts (Should I not be expecting an email response or notification of response?? No sign of a reply in any junk folder either or even in the digests.? Maybe I'm doing something stupid with my multiple email addresses...).? I've found the posts?online through markmail and will try to address them... ? Michael, I did build VTK myself.? To be clear: I download the source, use CMake to configure it by pointing to the source folder and creating a new build folder, and then compile in Visual Studio using the solution file I find in that newly?populated?build directory.? I found no sign of vtkMFCConfigure.h anywhere.? From what I understand, I think this is a bug in the vtk installation code. ? The only trick is that I changed one vtk MFC file to get VTK to compile (that winver bug; see the origin of this thread) and then recompiled.? I don't imagine that affected this problem.? I am currently not at my dev machine, but when I get back, I can try from scratch with downloading vtk, configuring in CMake, making the change for that winver bug, and compiling in VS and seeing if that file exists (or?I guess it should?exist immediately after the CMake stage?). ? Arturo, Thanks, that was my original concern.? I'd still like to use VS from start to finish if I can since I'm more familiar with it, but I'm glad to know it should be a minor change if I can't get this working. ? David, Long story short, if I understand right, either that file exists and I'm not properly pointing to it in my project settings, or it doesn't exist and it's?a vtk bug.? I'm pretty sure it doesn't exist (I recall searching my entire hard drive for it and came up with nothing; I can double check tonight). ? Thanks again for all the help. --- On Wed, 2/4/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Wednesday, February 4, 2009, 9:15 AM Using CMake is not *required*, it is simply strongly recommended because it avoids problems exactly like you are seeing right now. All you need to do is add an include directory so that Visual Studio can find the file it's looking for. As Mike Jackson pointed out, though, if you're using an install tree of VTK and the file is not actually installed, then you've found a bug in VTK's install rules. Please let us know if that's the case, so we can fix it.... Thanks, David Cole On Wed, Feb 4, 2009 at 11:26 AM, Alon Mozes wrote: I've read a bit more about using CMake, and if I understand correctly, we would have to re-run CMake only when we change our project settings, not every time we build as I mistakenly said before.? This is less painful than what I'd thought, but still more difficult than I'd like as project settings do change from time to time and we're now incorporating an extra application on a semi-regular basis.? I'm very accustomed to dealing with the VS project settings format and am a total newbie to the CMake lists.? If you insist that CMake is required to getting the project to work, I will invest the effort.? Otherwise, I would prefer to simply tweak what was an already perfectly functioning project. ? Thanks for the advice. --- On Wed, 2/4/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Wednesday, February 4, 2009, 3:45 AM Are you using CMake to build your project? The file vtkMFCConfigure.h is in your VTK build tree. If you are using CMake to build your project with find_package(VTK) and include(${VTK_USE_FILE}) then it should just work.... If you're not using CMake, I would recommend using it for your VTK dependent projects. It's much easier. It's probably just a matter of adding extra include directories for non-CMake-based projects. HTH, David On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes wrote: Maybe I spoke too soon... ? I'm able to compile VTK now without complaints about MFC.? However, now I try to compile my application and I get an error: ? 1>C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or directory ? I include vtkMFCWindow.h in one of my own project header files, and that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere (I do find a vtkMFCConfigure.h.in in the vtk source folder).? I am using VTK 5.2.1.? I checked the previous version I was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include vtkMFCConfigure.h.? Instead, it includes vtkConfigure.h, so this seems to be a new change.? Any idea what I'm doing wrong?? I notice there's an MFC?project setting for compiling using Standard Windows, MFC in a shared dll, and MFC in a static library.? This setting is available for both the VTK ALL_BUILD project as well as my own.? I've tried using standard windows and static library with both with no luck.? Maybe this setting matters somehow? ? Any help would be greatly appreciated.? Thanks. --- On Mon, 2/2/09, David Cole wrote: From: David Cole Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" Cc: vtkusers at vtk.org, "Jim" Date: Monday, February 2, 2009, 4:28 AM Did you not see my response to this thread the other day....? ? The first three lines of vtkMFCWindow.cpp are the culprit. They read: ? #ifndef WINVER ? ?// Allow use of features specific to Windows 95 and Windows NT 4 or later. ? #define WINVER 0x0400 ? #endif ? Remove them or comment them out and it should work ok with VS2008. ? Sorry for the inconvenience.... HTH, David On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes wrote: Not sure why I had to disable video for windows.? I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly).? I got rid of that and still have one problem with the MFC lib which I know I need.? Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag?? Is this a problem with my Windows settings somehow?? My Visual Studio settings?? Or VTK? ? Thanks, Alon --- On Thu, 1/29/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Compile with Visual Studio 2008 To: "Alon Mozes" , vtkusers at vtk.org Date: Thursday, January 29, 2009, 8:14 AM I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you. ? Alon Mozes wrote: Hi All, I have a great project using VTK/ITK in an older version of Visual Studio.? I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition).? I've found that I must recompile VTK/ITK to properly do so.? I've started from scratch and installed the latest CMake 2.6?which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1.? For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING.? Then I compile the ALL_BUILD in Visual Studio and I get several errors.? I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away.? I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think?is critical for me): ? C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting ? When I dig a little, I'm taken to the following lines of code: ? #if((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1)) #error _WIN32_WINNT settings conflicts with _WIN32_IE setting #endif ? Its clearly passing this conditional and triggering this error.? The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass.? What's going on here?? Any help would be greatly appreciated. ? Thanks for the help. _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From welucarell at equityeng.com Thu Feb 5 12:06:03 2009 From: welucarell at equityeng.com (William E. Lucarell) Date: Thu, 5 Feb 2009 12:06:03 -0500 Subject: [vtkusers] Disabling key presses in a VTK window Message-ID: Is there a way to disable selected key presses (for example 'e' and 'q') in a VTK render window? We have a program with a popup window, but the keys are used for functions that are not VTK-related. Thanks in advance! William E. Lucarell -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiksed at yahoo.com Thu Feb 5 12:21:09 2009 From: jiksed at yahoo.com (Jim) Date: Thu, 5 Feb 2009 09:21:09 -0800 (PST) Subject: [vtkusers] Cross-complile 64-bit vtk with VS2008 In-Reply-To: Message-ID: <653534.39845.qm@web32007.mail.mud.yahoo.com> Dear vtkusers, ? I tried cross-compiling vtk-5.2.1 for 64-bit vtk binaries on my Win32 XP with VS 2008, but I got tons of errors without any?DLLs or LIBs generated. ? In CMake-2.6.2, I chose Build For "Visual Studio 9 2008 Win64". I am wondering if I should set any of the following 32/64-bit options in CMake: ? Cmake_CXX_Standard_Libaries Cmake_C_Standard_Libaries OPENGL_gl_LIBRARIES OPENGL_glu_LIBRARIES CMAKE_USE_WIN32_THREADS ? Any special handling?for 64-bit Tcl/Tk and 64-bit Qt? I am using Tcl/Tk 8.3.2. ? Thank you. ? Jim ? ? ? ? ? ? ? ? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cole at kitware.com Thu Feb 5 12:45:05 2009 From: david.cole at kitware.com (David Cole) Date: Thu, 5 Feb 2009 12:45:05 -0500 Subject: [vtkusers] vtkMFC as .dll vs static library In-Reply-To: <982743.95970.qm@web51307.mail.re2.yahoo.com> References: <479861.53211.qm@web32005.mail.mud.yahoo.com> <982743.95970.qm@web51307.mail.re2.yahoo.com> Message-ID: The link errors you are seeing may be because there is an old .obj file still around that references the prior setting. Please do a clean build of *everything* in your whole project with all "MT" flags and static libs. The fact that you are getting a link error referring to msvcrt.lib means there is still something around that was compiled with /MD. You can use the dumpbin tool from a Visual Studio command prompt: dumpbin /directives *.lib to find which .lib files you have built that contain references to msvcrt.lib -- those are the ones that need to be rebuilt with /MT flags to prevent the errors you're seeing. HTH, David On Thu, Feb 5, 2009 at 11:42 AM, Alon Mozes wrote: > Hi All, > This had followed a thread ("Compile with Visual Studio 2008") but I think > has become different enough... > > I have an MFC project that I'm trying to upgrade in Visual Studio (from > .NET 2003 to 2008) that uses vtk (used to be 5.0.3, now upgrading to > 5.2.1). The default use of MFC in the project is as a .dll but I'm having > trouble with that. In addition, I'd prefer to have it as a static library > so the entire .exe is self-contained (no need to install additional > dependencies). Either path, I've run into difficulty. > > Path 1: as a .dll > I build vtk 5.2.1 using CMake and everything is ok. I find the vtkMFC.dll > as expected in the build/debug/bin dir. In visual studio, I can compile and > link successfully, but when I run, it can't find the .dll. I've added a dir > in the Tools->Options->Projects and Solutions->VC++ Dirs as I've seen on > some help pages, but it didn't seem to have any effect. I've copied the > .dll directly into my project's debug folder so it's guaranteed to find it, > and it does, but the app crashes (and I'm sure this is not the proper way to > have it find the .dll - I'd just like to see the app working). This seems > to be unique to the change of vtkMFC as a .dll as I've had the project > running with other include/library files just fine. Any suggestions? > > Path 2: as a statically linked library (This is more desirable) > I change CMake settings so it should build vtk as a statically linked > library, rather than .dll. By that I mean, I change all "MD" and "MDd" > references to "MT" and "MTd". The "Use of MFC" setting offers 3 options: > "Standard Windows Library", "Use MFC as shared .dll", and "Use MFC as static > library". I verify that in the vtkMFC project the "Use of MFC" setting is > "Use MFC as static library" as well as in my project. vtkMFC seems to > successfully build as a .lib. (Interseting note: in 5.0.3, the "Use of MFC" > setting is "6" and I haven't been able to find anywhere what that means). > In my project, I remove any setting of _AFXDLL (and verify it's not set in > the vtkMFC project). The project compiles but has errors when linking. > Seems to be a conflict between libcmt.lib and msvcrt.lib. It suggests > setting /nodefaultlib - which I've tried - but that results in other linker > errors saying it can't find the most basic functions. I'm guessing I can't > just sweepingly use the /nodefaultlib switch. Does anyone know which .libs > I have to ignore to get vtkMFC to work as a static library in my project? > Has anyone used vtkMFC as a static library? > > Thanks for all the help. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hobbsk at ohiou.edu Thu Feb 5 13:21:20 2009 From: hobbsk at ohiou.edu (Kevin H. Hobbs) Date: Thu, 05 Feb 2009 13:21:20 -0500 Subject: [vtkusers] Extract surface of a 3D volume In-Reply-To: <99495.11963.qm@web28205.mail.ukl.yahoo.com> References: <99495.11963.qm@web28205.mail.ukl.yahoo.com> Message-ID: <498B2E20.1020701@ohiou.edu> Nour Mestiri wrote: > Hi all vtk users. > I make the reconstruction of a 3D volume model from a sequence of 2D > images. > Now, i want to save just the surface of this 3D object to convert it > in VTP format. > How can i do this? > Thankl you so much > > > ------------------------------------------------------------------------ > Ne pleurez pas si votre Webmail ferme. R?cup?rez votre historique sur > Yahoo! Mail > > > ------------------------------------------------------------------------ > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > Try vtkGeometryFilter or vtkDataSetSurfaceFilter. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature URL: From ahs at cfdrc.com Thu Feb 5 13:48:28 2009 From: ahs at cfdrc.com (Amy Squillacote) Date: Thu, 05 Feb 2009 12:48:28 -0600 Subject: [vtkusers] Extract surface of a 3D volume In-Reply-To: <498B2E20.1020701@ohiou.edu> References: <99495.11963.qm@web28205.mail.ukl.yahoo.com> <498B2E20.1020701@ohiou.edu> Message-ID: <498B347C.8090305@cfdrc.com> Kevin H. Hobbs wrote: > Nour Mestiri wrote: >> Hi all vtk users. >> I make the reconstruction of a 3D volume model from a sequence of 2D >> images. >> Now, i want to save just the surface of this 3D object to convert it >> in VTP format. >> How can i do this? >> Thankl you so much >> >> >> ------------------------------------------------------------------------ >> Ne pleurez pas si votre Webmail ferme. R?cup?rez votre historique sur >> Yahoo! Mail >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > > Try vtkGeometryFilter or vtkDataSetSurfaceFilter. > > Or vtkContourFilter. -- Amy Squillacote Phone: (256) 726-4839 Sr. Computer Scientist Fax: (256) 726-4806 CFD Research Corporation Web: http://www.cfdrc.com 215 Wynn Drive, Suite 501 Huntsville, AL 35805 From jtgiles at gmail.com Thu Feb 5 14:51:46 2009 From: jtgiles at gmail.com (Justin Giles) Date: Thu, 5 Feb 2009 13:51:46 -0600 Subject: [vtkusers] VTK + gtkmm + vtkmm (mac osX) Message-ID: I'm new to VTK. I've been working on an interface using the GTK/gtkmm toolkit and have recently started trying to add a graphing element to it. I have installed VTK 5.3 and it compiles fine and the examples work fine. In an attempt to test adding a vtk view into my application, I installed vtkmm. Compiling all went fine. However, when I run the application it seg faults when trying to add in the renderer. This happens in both the vtkmm examples as well as my gtkmm application. I realize that this could be due to the merging of the gtk & vtk environments and not related to vtk at all, but I'm just looking for a little direction. See gdb output below: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x79546587 0x91019688 in objc_msgSend () (gdb) backtrace #0 0x91019688 in objc_msgSend () #1 0x931e3306 in CFRetain () #2 0x931b2a54 in CFDictionarySetValue () #3 0x92b32efe in -[NSCFDictionary setObject:forKey:] () #4 0x01fb86b8 in vtkCocoaRenderWindow::SetWindowId () #5 0x0023fab6 in Gtk::Vtk::RenderingArea::on_realize (this=0xbfffeb80) at renderingarea.cc:34 #6 0x023243d2 in Gtk::Widget_Class::realize_callback () Thanks for any and all help! Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Thu Feb 5 14:56:52 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 5 Feb 2009 14:56:52 -0500 Subject: [vtkusers] VTK + gtkmm + vtkmm (mac osX) In-Reply-To: References: Message-ID: <51FC9904-6118-4452-A8CA-BA1ACA1C0627@bluequartz.net> is gtkmm based on Cocoa or Carbon? (C++ or Objective-C). If it is purely C++ then you probably need to build VTK with CARBON=ON and COCOA=OFF. HTH _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 5, 2009, at 2:51 PM, Justin Giles wrote: > I'm new to VTK. I've been working on an interface using the GTK/ > gtkmm toolkit and have recently started trying to add a graphing > element to it. I have installed VTK 5.3 and it compiles fine and > the examples work fine. In an attempt to test adding a vtk view > into my application, I installed vtkmm. Compiling all went fine. > However, when I run the application it seg faults when trying to add > in the renderer. This happens in both the vtkmm examples as well as > my gtkmm application. I realize that this could be due to the > merging of the gtk & vtk environments and not related to vtk at all, > but I'm just looking for a little direction. > > See gdb output below: > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_INVALID_ADDRESS at address: 0x79546587 > 0x91019688 in objc_msgSend () > (gdb) backtrace > #0 0x91019688 in objc_msgSend () > #1 0x931e3306 in CFRetain () > #2 0x931b2a54 in CFDictionarySetValue () > #3 0x92b32efe in -[NSCFDictionary setObject:forKey:] () > #4 0x01fb86b8 in vtkCocoaRenderWindow::SetWindowId () > #5 0x0023fab6 in Gtk::Vtk::RenderingArea::on_realize > (this=0xbfffeb80) at renderingarea.cc:34 > #6 0x023243d2 in Gtk::Widget_Class::realize_callback () > > > Thanks for any and all help! > > Justin > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From sean at rogue-research.com Thu Feb 5 15:12:55 2009 From: sean at rogue-research.com (Sean McBride) Date: Thu, 5 Feb 2009 15:12:55 -0500 Subject: [vtkusers] VTK + gtkmm + vtkmm (mac osX) In-Reply-To: References: Message-ID: <20090205201255.1123416121@kingu.local> On 2/5/09 1:51 PM, Justin Giles said: >Program received signal EXC_BAD_ACCESS, Could not access memory. >Reason: KERN_INVALID_ADDRESS at address: 0x79546587 >0x91019688 in objc_msgSend () >(gdb) backtrace >#0 0x91019688 in objc_msgSend () >#1 0x931e3306 in CFRetain () >#2 0x931b2a54 in CFDictionarySetValue () >#3 0x92b32efe in -[NSCFDictionary setObject:forKey:] () >#4 0x01fb86b8 in vtkCocoaRenderWindow::SetWindowId () >#5 0x0023fab6 in Gtk::Vtk::RenderingArea::on_realize (this=0xbfffeb80) at >renderingarea.cc:34 >#6 0x023243d2 in Gtk::Widget_Class::realize_callback () This looks like it could be: -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From jtgiles at gmail.com Thu Feb 5 15:21:44 2009 From: jtgiles at gmail.com (Justin Giles) Date: Thu, 5 Feb 2009 14:21:44 -0600 Subject: [vtkusers] VTK + gtkmm + vtkmm (mac osX) In-Reply-To: <51FC9904-6118-4452-A8CA-BA1ACA1C0627@bluequartz.net> References: <51FC9904-6118-4452-A8CA-BA1ACA1C0627@bluequartz.net> Message-ID: gtkmm is strictly c++. Making the change to Carbon instead of Cocoa got rid of the seg fault. Now I just need to figure out how to get my test image to show up properly. Thanks for the help! Justin On Thu, Feb 5, 2009 at 1:56 PM, Michael Jackson wrote: > is gtkmm based on Cocoa or Carbon? (C++ or Objective-C). If it is purely > C++ then you probably need to build VTK with CARBON=ON and COCOA=OFF. > > HTH > _________________________________________________________ > Mike Jackson mike.jackson at bluequartz.net > BlueQuartz Software www.bluequartz.net > Principal Software Engineer Dayton, Ohio > > > > > On Feb 5, 2009, at 2:51 PM, Justin Giles wrote: > > I'm new to VTK. I've been working on an interface using the GTK/gtkmm >> toolkit and have recently started trying to add a graphing element to it. I >> have installed VTK 5.3 and it compiles fine and the examples work fine. In >> an attempt to test adding a vtk view into my application, I installed vtkmm. >> Compiling all went fine. However, when I run the application it seg faults >> when trying to add in the renderer. This happens in both the vtkmm examples >> as well as my gtkmm application. I realize that this could be due to the >> merging of the gtk & vtk environments and not related to vtk at all, but I'm >> just looking for a little direction. >> >> See gdb output below: >> >> Program received signal EXC_BAD_ACCESS, Could not access memory. >> Reason: KERN_INVALID_ADDRESS at address: 0x79546587 >> 0x91019688 in objc_msgSend () >> (gdb) backtrace >> #0 0x91019688 in objc_msgSend () >> #1 0x931e3306 in CFRetain () >> #2 0x931b2a54 in CFDictionarySetValue () >> #3 0x92b32efe in -[NSCFDictionary setObject:forKey:] () >> #4 0x01fb86b8 in vtkCocoaRenderWindow::SetWindowId () >> #5 0x0023fab6 in Gtk::Vtk::RenderingArea::on_realize (this=0xbfffeb80) at >> renderingarea.cc:34 >> #6 0x023243d2 in Gtk::Widget_Class::realize_callback () >> >> >> Thanks for any and all help! >> >> Justin >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiksed at yahoo.com Thu Feb 5 15:46:09 2009 From: jiksed at yahoo.com (Jim) Date: Thu, 5 Feb 2009 12:46:09 -0800 (PST) Subject: [vtkusers] Cross-complile 64-bit vtk with VS2008 In-Reply-To: <653534.39845.qm@web32007.mail.mud.yahoo.com> Message-ID: <136710.25508.qm@web32006.mail.mud.yahoo.com> ? I used all default CMAKE settings but set BUILD_TESTING=OFF because it caused many errors. I also set VTK_WRAP_TCL=OFF. This time I got "Build: 27 succeeded, 6 failed". Here are my error messages: ? vtksysEncodeExecutable.exe is not a valid Win32 application vtkParseOGLExt.exe is not a valid Win32 application vtkEncodeString.exe is not a valid Win32 application error PRJ0019: A tool returned an error code from "Generating vtksysProcessFwd9xEnc.c" >LINK : fatal error LNK1104: cannot open file '..\..\bin\Debug\vtksys.lib' > Project : error PRJ0019: A tool returned an error code from "Generating vtkMaterialXMLLibrary.h" > Project : error PRJ0019: A tool returned an error code from "Generating vtkVolumeTextureMapper3D_TwoDependentShadeFP.cxx, vtkVolumeTextureMapper3D_TwoDependentShadeFP.h" Will any of you please point out what is wrong here? ? Thank you. ? --- On Thu, 2/5/09, Jim wrote: From: Jim Subject: [vtkusers] Cross-complile 64-bit vtk with VS2008 To: vtkusers at vtk.org Date: Thursday, February 5, 2009, 10:21 AM Dear vtkusers, ? I tried cross-compiling vtk-5.2.1 for 64-bit vtk binaries on my Win32 XP with VS 2008, but I got tons of errors without any?DLLs or LIBs generated. ? In CMake-2.6.2, I chose Build For "Visual Studio 9 2008 Win64". I am wondering if I should set any of the following 32/64-bit options in CMake: ? Cmake_CXX_Standard_Libaries Cmake_C_Standard_Libaries OPENGL_gl_LIBRARIES OPENGL_glu_LIBRARIES CMAKE_USE_WIN32_THREADS ? Any special handling?for 64-bit Tcl/Tk and 64-bit Qt? I am using Tcl/Tk 8.3.2. ? Thank you. ? Jim ? ? ? ? ? ? ? ? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cole at kitware.com Thu Feb 5 16:13:50 2009 From: david.cole at kitware.com (David Cole) Date: Thu, 5 Feb 2009 16:13:50 -0500 Subject: [vtkusers] Cross-complile 64-bit vtk with VS2008 In-Reply-To: <136710.25508.qm@web32006.mail.mud.yahoo.com> References: <653534.39845.qm@web32007.mail.mud.yahoo.com> <136710.25508.qm@web32006.mail.mud.yahoo.com> Message-ID: I'm afraid the executables mentioned here are custom built tools in the VTK build tree that are being built as 64-bit exes... but you are only on a 32-bit machine, and so the custom build steps that use those tools cannot run properly. If you want to use the Visual Studio "Win64" generators, then you will have to build VTK on a Win64 box. Sorry for the inconvenience, David On Thu, Feb 5, 2009 at 3:46 PM, Jim wrote: > > I used all default CMAKE settings but set BUILD_TESTING=OFF because it > caused many errors. I also set VTK_WRAP_TCL=OFF. This time I got "Build: 27 > succeeded, 6 failed". Here are my error messages: > > vtksysEncodeExecutable.exe is not a valid Win32 application > vtkParseOGLExt.exe is not a valid Win32 application > vtkEncodeString.exe is not a valid Win32 application > error PRJ0019: A tool returned an error code from "Generating > vtksysProcessFwd9xEnc.c" > >LINK : fatal error LNK1104: cannot open file '..\..\bin\Debug\vtksys.lib' > > Project : error PRJ0019: A tool returned an error code from "Generating > vtkMaterialXMLLibrary.h" > > Project : error PRJ0019: A tool returned an error code from "Generating > vtkVolumeTextureMapper3D_TwoDependentShadeFP.cxx, > vtkVolumeTextureMapper3D_TwoDependentShadeFP.h" > Will any of you please point out what is wrong here? > > Thank you. > > > --- On *Thu, 2/5/09, Jim * wrote: > > From: Jim > Subject: [vtkusers] Cross-complile 64-bit vtk with VS2008 > To: vtkusers at vtk.org > Date: Thursday, February 5, 2009, 10:21 AM > > > Dear vtkusers, > > I tried cross-compiling vtk-5.2.1 for 64-bit vtk binaries on my Win32 XP > with VS 2008, but I got tons of errors without any DLLs or LIBs generated. > > In CMake-2.6.2, I chose Build For "Visual Studio 9 2008 Win64". I am > wondering if I should set any of the following 32/64-bit options in CMake: > > Cmake_CXX_Standard_Libaries > Cmake_C_Standard_Libaries > OPENGL_gl_LIBRARIES > OPENGL_glu_LIBRARIES > CMAKE_USE_WIN32_THREADS > > Any special handling for 64-bit Tcl/Tk and 64-bit Qt? I am using Tcl/Tk > 8.3.2. > > Thank you. > > Jim > > > > > > > > > > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From welucarell at equityeng.com Thu Feb 5 17:02:03 2009 From: welucarell at equityeng.com (William E. Lucarell) Date: Thu, 5 Feb 2009 17:02:03 -0500 Subject: [vtkusers] Disabling key presses in a VTK window In-Reply-To: References: Message-ID: If overriding the vtkRenderWindowInteractor works, how would the key methods be overridden in Visual C# .NET? From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of William E. Lucarell Sent: Thursday, February 05, 2009 12:06 PM To: vtkusers at vtk.org Subject: [vtkusers] Disabling key presses in a VTK window Is there a way to disable selected key presses (for example 'e' and 'q') in a VTK render window? We have a program with a popup window, but the keys are used for functions that are not VTK-related. Thanks in advance! William E. Lucarell -------------- next part -------------- An HTML attachment was scrubbed... URL: From planck at netspeed.com.au Thu Feb 5 17:17:05 2009 From: planck at netspeed.com.au (Kevin Osborn) Date: Fri, 06 Feb 2009 09:17:05 +1100 Subject: [vtkusers] vtkMFC as .dll vs static library In-Reply-To: <982743.95970.qm@web51307.mail.re2.yahoo.com> References: <982743.95970.qm@web51307.mail.re2.yahoo.com> Message-ID: <498B6561.1040305@netspeed.com.au> I don't have an answer to the basic problem that you have but when building a VTK project to debug with Visual Studio 2008 I routinely see warnings about conflicts between msvcrt and other libraries. These are warnings, not errors. When I build a release build, no warnings are present. Alon Mozes wrote: > Hi All, > This had followed a thread ("Compile with Visual Studio 2008") but I > think has become different enough... > > I have an MFC project that I'm trying to upgrade in Visual Studio > (from .NET 2003 to 2008) that uses vtk (used to be 5.0.3, now > upgrading to 5.2.1). The default use of MFC in the project is as a > .dll but I'm having trouble with that. In addition, I'd prefer to > have it as a static library so the entire .exe is self-contained (no > need to install additional dependencies). Either path, I've run into > difficulty. > > Path 1: as a .dll > I build vtk 5.2.1 using CMake and everything is ok. I find the > vtkMFC.dll as expected in the build/debug/bin dir. In visual studio, > I can compile and link successfully, but when I run, it can't find the > .dll. I've added a dir in the Tools->Options->Projects and > Solutions->VC++ Dirs as I've seen on some help pages, but it didn't > seem to have any effect. I've copied the .dll directly into my > project's debug folder so it's guaranteed to find it, and it does, but > the app crashes (and I'm sure this is not the proper way to have it > find the .dll - I'd just like to see the app working). This seems to > be unique to the change of vtkMFC as a .dll as I've had the project > running with other include/library files just fine. Any suggestions? > > Path 2: as a statically linked library (This is more desirable) > I change CMake settings so it should build vtk as a statically linked > library, rather than .dll. By that I mean, I change all "MD" and > "MDd" references to "MT" and "MTd". The "Use of MFC" setting offers 3 > options: "Standard Windows Library", "Use MFC as shared .dll", and > "Use MFC as static library". I verify that in the vtkMFC project the > "Use of MFC" setting is "Use MFC as static library" as well as in my > project. vtkMFC seems to successfully build as a .lib. (Interseting > note: in 5.0.3, the "Use of MFC" setting is "6" and I haven't been > able to find anywhere what that means). In my project, I remove any > setting of _AFXDLL (and verify it's not set in the vtkMFC project). > The project compiles but has errors when linking. Seems to be a > conflict between libcmt.lib and msvcrt.lib. It suggests setting > /nodefaultlib - which I've tried - but that results in other linker > errors saying it can't find the most basic functions. I'm guessing I > can't just sweepingly use the /nodefaultlib switch. Does anyone know > which .libs I have to ignore to get vtkMFC to work as a static library > in my project? Has anyone used vtkMFC as a static library? > > Thanks for all the help. > > > ------------------------------------------------------------------------ > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From daviddoria at gmail.com Thu Feb 5 17:50:57 2009 From: daviddoria at gmail.com (David Doria) Date: Thu, 5 Feb 2009 17:50:57 -0500 Subject: [vtkusers] How to color CellData? In-Reply-To: <498B1676.1010806@cfdrc.com> References: <498B1676.1010806@cfdrc.com> Message-ID: Ah ok, I hadn't included vtkCellData.h so I was getting some super cryptic error about invalid use of CellData. I haven't check to make sure the colors work in the morning, but at least it compiles now! Thanks again Amy! On Thu, Feb 5, 2009 at 11:40 AM, Amy Squillacote wrote: > pdata->GetCellData()->AddArray(...) > > David Doria wrote: >> >> To color points, I can do this: >> >> vtkSmartPointer Colors = >> vtkSmartPointer::New(); >> // ... fill Colors ... >> pdata->GetPointData()->AddArray(Colors); >> >> But what if I want to color a set of lines. >> >> vtkSmartPointer lines = >> vtkSmartPointer::New(); >> // ... fill lines ... >> pdata->SetLines(lines); >> >> Now how do I add the color array? >> >> > > -- > Amy Squillacote Phone: (256) 726-4839 > Sr. Computer Scientist Fax: (256) 726-4806 > CFD Research Corporation Web: http://www.cfdrc.com > 215 Wynn Drive, Suite 501 > Huntsville, AL 35805 > > > -- Thanks, David From arturo_caissut at tiscali.it Thu Feb 5 19:03:25 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Fri, 06 Feb 2009 01:03:25 +0100 Subject: [vtkusers] Copy PolyData Points into a C++ list Message-ID: <498B7E4D.7060107@tiscali.it> Hi everyone, I need to take coordinates of some points stored into a PolyData, and put these coordinates on a list I created. I think I should use C++ STLibrary push_back($AN_ELEMENT_OF_CORRECT_TYPE) function to store points on my list, but I don't know how to get them one by one out of my PolyData file in order to do that. Hints? Best regards, Arturo From berk.geveci at kitware.com Thu Feb 5 22:48:55 2009 From: berk.geveci at kitware.com (Berk Geveci) Date: Thu, 5 Feb 2009 22:48:55 -0500 Subject: [vtkusers] [Paraview] volume rendering of vtkRectilinearGrid In-Reply-To: References: <86C07171C28D6645AAA23482506AF8380E11B8@exbe03.intra.dlr.de> <45d654b0902041152u541927fbt4535fe34aa00a628@mail.gmail.com> Message-ID: <45d654b0902051948y430cf176sd14b17c7c810530a@mail.gmail.com> I am afraid not. You can convert it to unstructured grid using tetrahedralization and volume render that. Alternatively you can resample it to a uniform rectilinear grid (image data). I can explain how to do that if you want. -berk On Wed, Feb 4, 2009 at 2:59 PM, Weiguang Guan wrote: > Hello, > > Does Paraview or VTK support volume rendering of vtkRectilinearGrid? Thanks. > > Weiguang > > _______________________________________________ > ParaView mailing list > ParaView at paraview.org > http://www.paraview.org/mailman/listinfo/paraview > From amozes77 at yahoo.com Thu Feb 5 23:33:58 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Thu, 5 Feb 2009 20:33:58 -0800 (PST) Subject: [vtkusers] vtkMFC as .dll vs static library In-Reply-To: Message-ID: <233791.62567.qm@web51302.mail.re2.yahoo.com> I have carefully cleaned, rebuilt and compiled vtk, itk, and my project using only "MT(d)" references.? I can now compile and link with no errors.? But when I launch the app, it seems to load for a bit and then crashes after complaining of memory leaks.? As it runs through the .dlls its loading, one sticks out as not in the normal system32, but instead is loaded from the side-by-side folder - not sure if this is relevant at all: ? .exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc\comctl32.dll' Whereas all the other load lines look like: ? .exe': Loaded 'C:\Windows\System32\usp10.dll' ? Following the loading, it displays: ? Detected memory leaks! Dumping objects -> {37972} normal block at 0x03268BB8, 32 bytes long. Data: < Failed t> 13 00 00 00 13 00 00 00 46 61 69 6C 65 64 20 74 {37969} normal block at 0x03268A88, 68 bytes long. . . . {213} normal block at 0x027CB818, 200 bytes long. Data: < z | > D8 7A 09 03 CD CD CD CD 80 B9 7C 02 D8 80 09 03 .\.cpp(54) : {212} normal block at 0x027CB6B0, 296 bytes long. Data: < g& > CD CD CD CD 00 00 00 00 C0 67 26 03 CD CD CD CD Object dump complete. The program '[85320] .exe: Native' has exited with code 1 (0x1). ? Is this still related to a linker error?? Does delay loading play a role even though I'm statically linking?? Any tips on figuring it out from here?? For now, I'll try to analyze the examples to see if I can find a difference... ? Thanks for the help.? One step at a time... ? --- On Thu, 2/5/09, David Cole wrote: From: David Cole Subject: Re: vtkMFC as .dll vs static library To: "Alon Mozes" Cc: vtkusers at vtk.org Date: Thursday, February 5, 2009, 9:45 AM The link errors you are seeing may be because there is an old .obj file still around that references the prior setting. Please do a clean build of *everything* in your whole project with all "MT" flags and static libs. The fact that you are getting a link error referring to msvcrt.lib means there is still something around that was compiled with /MD. You can use the dumpbin tool from a Visual Studio command prompt: dumpbin /directives *.lib to find which .lib files you have built that contain references to msvcrt.lib -- those are the ones that need to be rebuilt with /MT flags to prevent the errors you're seeing. HTH, David On Thu, Feb 5, 2009 at 11:42 AM, Alon Mozes wrote: Hi All, This had followed a thread ("Compile with Visual Studio 2008") but I think has become different enough... ? I have an MFC?project that I'm trying to upgrade in Visual Studio (from .NET 2003 to 2008) that uses vtk (used to be 5.0.3, now upgrading to 5.2.1).? The default use of MFC in the project is as a .dll but I'm having trouble with that.? In addition, I'd prefer to have it as a static library so the entire .exe is self-contained (no need to install additional dependencies).? Either path, I've run into difficulty. ? Path 1: as a .dll I build vtk 5.2.1 using CMake and everything is ok.? I find the vtkMFC.dll as expected in the build/debug/bin dir.? In visual studio, I can compile and link successfully, but when I run, it can't find the .dll.? I've added a dir in the Tools->Options->Projects and Solutions->VC++ Dirs as I've seen on some help pages, but it didn't seem to have any effect.? I've copied the .dll directly into my project's debug folder so it's guaranteed to find it, and it does, but the app crashes (and I'm sure this is not the proper way to have it find the .dll - I'd just like to see the app working).? This seems to be unique to the change of vtkMFC as a .dll as I've had the project running with other include/library files just fine.? Any suggestions? ? Path 2: as a statically linked library (This is more desirable) I change CMake settings so it should build vtk as a statically linked library, rather than .dll.? By that I mean, I change all "MD" and "MDd" references to "MT" and "MTd".? The "Use of MFC" setting offers 3 options: "Standard Windows Library", "Use MFC as shared .dll", and "Use MFC as static library".? I verify that in the vtkMFC project the "Use of MFC" setting is "Use MFC as static library" as well as in my project.? vtkMFC seems to successfully build as a .lib.? (Interseting note: in 5.0.3, the "Use of MFC" setting is "6" and I haven't been able to find anywhere what that means).? In my project, I remove any setting of _AFXDLL (and verify it's not set in the vtkMFC project).? The project compiles but has errors when linking.? Seems to be a conflict between libcmt.lib and msvcrt.lib.? It suggests setting /nodefaultlib - which I've tried - but that results in other linker errors saying it can't find the most basic functions.? I'm guessing I can't just sweepingly use the /nodefaultlib switch.? Does anyone know which .libs I have to ignore to get vtkMFC to work as a static library in my project?? Has anyone used vtkMFC as a static library? ? Thanks for all the help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marf at itccanarias.org Fri Feb 6 05:20:30 2009 From: marf at itccanarias.org (Miguel Angel Rodriguez Florido) Date: Fri, 06 Feb 2009 10:20:30 +0000 Subject: [vtkusers] Disabling key presses in a VTK window In-Reply-To: References: Message-ID: <498C0EEE.2090100@itccanarias.org> See the example: VTK/Examples/GUI/Tcl/CustomInteraction.tcl This is under Tcl, but the idea is that. Hth. William E. Lucarell wrote: > If overriding the vtkRenderWindowInteractor works, how would the key > methods be overridden in Visual C# .NET? > > > > *From:* vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] *On > Behalf Of *William E. Lucarell > *Sent:* Thursday, February 05, 2009 12:06 PM > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] Disabling key presses in a VTK window > > > > Is there a way to disable selected key presses (for example ?e? and ?q?) > in a VTK render window? We have a program with a popup window, but the > keys are used for functions that are not VTK-related. Thanks in advance! > > > > */William E. Lucarell/* > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers -- Miguel Angel Rodr?guez Florido Departamento de Ingenier?a del Software Divisi?n de Investigaci?n y Desarrollo Tecnol?gico INSTITUTO TECNOLOGICO DE CANARIAS, S.A. - GOBIERNO DE CANARIAS URL: www.itccanarias.org Tlfno: +34 928 727548, Fax: +34 928 727517 -------------------------------------------------------------------------- AVISO LEGAL: Este mensaje y los ficheros adjuntos si los hubiere, se dirigen exclusivamente a su destinatario y puede contener informaci?n privilegiada o confidencial. La transmisi?n err?nea del presente mensaje en ning?n momento supone renuncia a su confidencialidad. Si no es vd. el destinatario indicado, queda notificado de que la utilizaci?n, divulgaci?n y/o copia sin autorizaci?n est? prohibida en virtud de la legislaci?n vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma v?a y proceda a su destrucci?n. LEGAL WARNING: This message and the files attached if there were any, are intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by professional privilege. A wrong transmission to this message don't suppose we relinquished to It's confidential. If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3262 bytes Desc: S/MIME Cryptographic Signature URL: From mweiss at cbs.mpg.de Fri Feb 6 05:49:33 2009 From: mweiss at cbs.mpg.de (Marcel Weiss) Date: Fri, 6 Feb 2009 11:49:33 +0100 (CET) Subject: [vtkusers] bug in vtkClipPolyData ??? In-Reply-To: <4116530.627551233829205650.JavaMail.root@zimbra> Message-ID: <8507596.664861233917373007.JavaMail.root@zimbra> Hi again, I am using vtkStreamLine to trace streams through a 3D data field. The start points are given by a vtkPolyData object in the same space. So the number of streams created is identical to the number of points in the vtkPolyData. Each of the created streams consists of ~30 connected points. Everything fine so far. then I use vtkClipPolyData to clip those streams based on (other) scalar value. therefor I assign a scalar value for each of the points of every single stream and use the following code for clipping vtkClipPolyData* cutter = vtkClipPolyData :: New(); cutter-> SetInput(streams); cutter-> GenerateClipScalarsOff(); cutter-> SetValue(1.0); cutter-> UpdateInformation(); cutter-> Update(); this also works (some how), BUT: although vtkClipPolyData removes many of the streams points (as expected), it seems to create many new cell/lines. (see below) streamlining result has got: 12577845 points, 483730 cells, 0 verts, 483730 lines, 0 polys and 0 strips. cutting result has got: 9753382 points, 9268541 cells, 0 verts, 9268541 lines, 0 polys and 0 strips. even if some of the streams/line are clipped into two or more new lines, which should not happen (due to the way I write the scalars), the number of cells/lines/streams increases in a way I can?t understand ... Anyone any ideas? thanks Marcel _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From m.engel at dkfz-heidelberg.de Fri Feb 6 06:58:21 2009 From: m.engel at dkfz-heidelberg.de (Engel Markus) Date: Fri, 6 Feb 2009 12:58:21 +0100 Subject: [vtkusers] (no subject) Message-ID: Hi all!! I am looking for a possibility to append a vtkCellArray to another vtkCellArray. Is there a convenience-method to accomplish that or will I have to use InsertNextCell() for each Cell in the second CellArray? Thanks for answering!! Greetings Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.engel at dkfz-heidelberg.de Fri Feb 6 07:00:37 2009 From: m.engel at dkfz-heidelberg.de (Engel Markus) Date: Fri, 6 Feb 2009 13:00:37 +0100 Subject: [vtkusers] Appending vtkCellArray Message-ID: Hi all!! I am looking for a possibility to append a vtkCellArray to another vtkCellArray. Is there a convenience-method to accomplish that or will I have to use InsertNextCell() for each Cell in the second CellArray? Thanks for answering!! Greetings Markus PS: sorry, forgot subject -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Fri Feb 6 07:57:29 2009 From: daviddoria at gmail.com (David Doria) Date: Fri, 6 Feb 2009 07:57:29 -0500 Subject: [vtkusers] Fill giant holes in a mesh Message-ID: I have a mesh like this: http://rpi.edu/~doriad/car_holes.jpg I tried using the vtkFillHolesFilter, but no matter what value of distance I passed it, it would only fill tiny holes ( << than the size of the windows which I am trying to fill). Is there any other way I can do this? -- Thanks, David From welucarell at equityeng.com Fri Feb 6 08:23:44 2009 From: welucarell at equityeng.com (William E. Lucarell) Date: Fri, 6 Feb 2009 08:23:44 -0500 Subject: [vtkusers] Disabling key presses in a VTK window In-Reply-To: <498C0EEE.2090100@itccanarias.org> References: <498C0EEE.2090100@itccanarias.org> Message-ID: Thanks, Miguel! I actually learned to do basic VTK meshes with Tcl examples and I was programming it in Java. William E. Lucarell -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Miguel Angel Rodriguez Florido Sent: Friday, February 06, 2009 5:21 AM Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Disabling key presses in a VTK window See the example: VTK/Examples/GUI/Tcl/CustomInteraction.tcl This is under Tcl, but the idea is that. Hth. William E. Lucarell wrote: > If overriding the vtkRenderWindowInteractor works, how would the key > methods be overridden in Visual C# .NET? > > > > *From:* vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] *On > Behalf Of *William E. Lucarell > *Sent:* Thursday, February 05, 2009 12:06 PM > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] Disabling key presses in a VTK window > > > > Is there a way to disable selected key presses (for example ?e? and > ?q?) in a VTK render window? We have a program with a popup window, > but the keys are used for functions that are not VTK-related. Thanks in advance! > > > > */William E. Lucarell/* > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers -- Miguel Angel Rodr?guez Florido Departamento de Ingenier?a del Software Divisi?n de Investigaci?n y Desarrollo Tecnol?gico INSTITUTO TECNOLOGICO DE CANARIAS, S.A. - GOBIERNO DE CANARIAS URL: www.itccanarias.org Tlfno: +34 928 727548, Fax: +34 928 727517 -------------------------------------------------------------------------- AVISO LEGAL: Este mensaje y los ficheros adjuntos si los hubiere, se dirigen exclusivamente a su destinatario y puede contener informaci?n privilegiada o confidencial. La transmisi?n err?nea del presente mensaje en ning?n momento supone renuncia a su confidencialidad. Si no es vd. el destinatario indicado, queda notificado de que la utilizaci?n, divulgaci?n y/o copia sin autorizaci?n est? prohibida en virtud de la legislaci?n vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma v?a y proceda a su destrucci?n. LEGAL WARNING: This message and the files attached if there were any, are intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by professional privilege. A wrong transmission to this message don't suppose we relinquished to It's confidential. If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it. From frederic.danesi at dinccs.com Fri Feb 6 08:28:29 2009 From: frederic.danesi at dinccs.com (Frederic Danesi) Date: Fri, 6 Feb 2009 14:28:29 +0100 Subject: [vtkusers] Fill giant holes in a mesh In-Reply-To: References: Message-ID: <003501c9885e$ced2e1c0$6c78a540$@danesi@dinccs.com> Maybe you should try that : - extract the features edges of the car, - build closed contours (by extracting regions or using vtkStripper) - and use these contours as input for vtkDelaunay or vtkTriangleFilter just like in the CutCow example from the book (great example BTW). Provide me with an export of your model (or a only a subpart of it with a hole if it is confidential) in a VTK compliant format and I will give it a try ... HTH Fred. -- Responsable D?veloppement Informatique et Travail Collaboratif D?partement DINCCS (D?partement Ing?nierie Num?rique, Conception Collaborative et Simulation) MICADO / DINCCS P?le de Haute Technologie, BP 90005 08005 Charleville-M?zi?res Cedex Tel. : +33 (0) 3.24.41.69.55 / +33 (0) 6.62.76.13.32 Email : frederic.danesi at dinccs.com Web : www.afmicado.com / www.dinccs.com -----Message d'origine----- De?: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] De la part de David Doria Envoy??: vendredi 6 f?vrier 2009 13:57 ??: vtkusers at vtk.org Objet?: [vtkusers] Fill giant holes in a mesh I have a mesh like this: http://rpi.edu/~doriad/car_holes.jpg I tried using the vtkFillHolesFilter, but no matter what value of distance I passed it, it would only fill tiny holes ( << than the size of the windows which I am trying to fill). Is there any other way I can do this? -- Thanks, David _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers Ce message entrant est certifi? sans virus connu. Analyse effectu?e par AVG - www.avg.fr Version: 8.0.233 / Base de donn?es virale: 270.10.18/1936 - Date: 02/05/09 11:34:00 From stas-fomin at yandex.ru Fri Feb 6 10:12:57 2009 From: stas-fomin at yandex.ru (Stas Fomin) Date: Fri, 06 Feb 2009 18:12:57 +0300 Subject: [vtkusers] Building VTK with GL2PS Message-ID: <383081233933177@webmail43.yandex.ru> An HTML attachment was scrubbed... URL: From francois.bertel at kitware.com Fri Feb 6 10:23:39 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Fri, 6 Feb 2009 10:23:39 -0500 Subject: [vtkusers] Building VTK with GL2PS In-Reply-To: <383081233933177@webmail43.yandex.ru> References: <383081233933177@webmail43.yandex.ru> Message-ID: Hello, Just turn CMake flag VTK_USE_GL2PS to ON. Regards. On Fri, Feb 6, 2009 at 10:12 AM, Stas Fomin wrote: > Hello all. > > I wish to bild VTK with GL2PS support, > but I found no information how to do it. > > http://www.geuz.org/gl2ps/ miss any makefiles > http://www.vtk.org/doc/nightly/html/classvtkGL2PSExporter.html has no > instruction how to build VTK with GL2PS > http://mayavi.sourceforge.net/cgi-bin/moin.cgi/BuildingVTKOnWin32 is dead > now, > http://web.archive.org/web/20070715105700/http://mayavi.sourceforge.net/mwiki/BuildingVTKOnWin32 > contains some information, but CMakeLists.txt for GL2PS is unavailable. > > So what is to be done? > > Thank all in advance, > Sincerely, Stas Fomin > > P.S. > I just want to export PDFs from Mayavi2? > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From jtgiles at gmail.com Fri Feb 6 10:31:14 2009 From: jtgiles at gmail.com (Justin Giles) Date: Fri, 6 Feb 2009 09:31:14 -0600 Subject: [vtkusers] VTK + gtkmm Message-ID: For all of you who have successfully added VTK into a gtkmm gui/widget, I need some help. I'm using gtkmm, vtk, vtkmm. It was my understanding based on examples, all I had to do was add my vtkmm object to a gtkmm widget and everything would just work. However, when I do this, after I call Render() on the vtk window object, it always pops out a new window displaying the image. It doesn't stay within the gtk widget context. Any thoughts on this? I can provide code if needed. Thanks, Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjoern.zehner at ufz.de Fri Feb 6 10:37:16 2009 From: bjoern.zehner at ufz.de (=?iso-8859-1?Q?=22Bj=F6rn_Zehner=22?=) Date: Fri, 06 Feb 2009 16:37:16 +0100 Subject: [vtkusers] Class documentation In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From frederic.danesi at dinccs.com Fri Feb 6 10:39:17 2009 From: frederic.danesi at dinccs.com (Frederic Danesi) Date: Fri, 6 Feb 2009 16:39:17 +0100 Subject: [vtkusers] Class documentation In-Reply-To: References: Message-ID: <006b01c98871$12743f20$375cbd60$@danesi@dinccs.com> http://www.vtk.org/VTK/help/documentation.html Fred Cordialement, F.Danesi -- Responsable D?veloppement Informatique et Travail Collaboratif D?partement DINCCS (D?partement Ing?nierie Num?rique, Conception Collaborative et Simulation) MICADO / DINCCS P?le de Haute Technologie, BP 90005 08005 Charleville-M?zi?res Cedex Tel. : +33 (0) 3.24.41.69.55 / +33 (0) 6.62.76.13.32 Email : frederic.danesi at dinccs.com Web : www.afmicado.com / www.dinccs.com De : vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] De la part de "Bj?rn Zehner" Envoy? : vendredi 6 f?vrier 2009 16:37 ? : vtkusers at vtk.org Objet : [vtkusers] Class documentation Hello there, I usually used www.vtk.org as an entry point to go to the class documentation. I just realized that the homepage changed and my entry point seems not to be available any more. Can somebody give me a hint where I can find the documentation (on the WWW) now? Kind regards, Bjoern Zehner ------------------------------------------------------------------------- Dr. Bjoern Zehner UFZ Centre for Environmental Research Leipzig-Halle Permoserstrasse 15 04318 Leipzig Germany http://www.ufz.de/index.php?en=5673 Tel: ++49 (341) 235 1979 Fax: ++49 (341) 235 1939 Ce message entrant est certifi? sans virus connu. Analyse effectu?e par AVG - www.avg.fr Version: 8.0.233 / Base de donn?es virale: 270.10.18/1936 - Date: 02/05/09 11:34:00 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjoern.zehner at ufz.de Fri Feb 6 10:40:26 2009 From: bjoern.zehner at ufz.de (=?iso-8859-1?Q?=22Bj=F6rn_Zehner=22?=) Date: Fri, 06 Feb 2009 16:40:26 +0100 Subject: [vtkusers] Class documentation In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From nkwmailinglists at gmail.com Fri Feb 6 10:53:57 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Fri, 6 Feb 2009 09:53:57 -0600 Subject: [vtkusers] Class documentation In-Reply-To: References: Message-ID: <44f773f50902060753l3838799u40ba04c5161ef523@mail.gmail.com> You found it ;-) -- note to Kitware people: Some subdomains would streamline this for me, and perhaps others -- say docs.vtk.org and/or nightlydocs.vtk.org. Just a suggestion. When I need to look at the Doxygen pages, my first impulse is to google the name of the class i'm interested in, but google doesn't always return vtk.org 'official' pages first, and the doxygen pages are mirrored hundreds of places, sometimes with very old versions. On Fri, Feb 6, 2009 at 9:37 AM, "Bj?rn Zehner" wrote: > Hello there, > > I usually used www.vtk.org as an entry point to go to the class > documentation. I just realized that the homepage changed and my entry point > seems not to be available any more. Can somebody give me a hint where I can > find the documentation (on the WWW) now? From Mathias.Franzius at web.de Fri Feb 6 10:54:25 2009 From: Mathias.Franzius at web.de (Mathias Franzius) Date: Fri, 06 Feb 2009 16:54:25 +0100 Subject: [vtkusers] Newbie: Howto load and display textured meshes (vrml or 3ds)? Message-ID: <921204974@web.de> Dear group, I try to load a vrml or 3ds file and display it with its textures. So far I succeeded in displaying the mesh but cannot figure out how to enable textures. vtkVRMLImporter and vtk3DSImporter do support textures, don't they? The 3ds and wrl files contain textures that are correctly displayed in different viewers. My code snippet in python looks like this: import vtk importer = vtk.vtkVRMLImporter() importer.SetFileName('duck.wrl') importer.Read() renWin = importer.GetRenderWindow() iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) renWin.SetSize(300, 300) iren.Initialize() renWin.Render() iren.Start() Any help appreciated! Mathias ____________________________________________________________________ Psssst! Schon vom neuen WEB.DE MultiMessenger geh?rt? Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123 From drescherjm at gmail.com Fri Feb 6 10:57:05 2009 From: drescherjm at gmail.com (John Drescher) Date: Fri, 6 Feb 2009 10:57:05 -0500 Subject: [vtkusers] Class documentation In-Reply-To: <44f773f50902060753l3838799u40ba04c5161ef523@mail.gmail.com> References: <44f773f50902060753l3838799u40ba04c5161ef523@mail.gmail.com> Message-ID: <387ee2020902060757x7f53727fr69769120e96033d5@mail.gmail.com> > but > google doesn't always return vtk.org 'official' pages first, and the > doxygen pages are mirrored hundreds of places, sometimes with very old > versions. > I too find that frustrating. I would like to rephrase that as google rarely puts vtk.org first.. John From syrkinae at ethz.ch Fri Feb 6 11:19:46 2009 From: syrkinae at ethz.ch (Syrkina Ekaterina) Date: Fri, 6 Feb 2009 17:19:46 +0100 Subject: [vtkusers] principal directions of curvature Message-ID: <2DDC0446EF4690489771E0A9491C6305028AFE45@EX3.d.ethz.ch> Hello, what is the easiest way to access curvature tensor for 3d triangular mesh surface? I need principal directions and curvatures plus normal calculated for every point. I found some old message about vtkCurvatureTensor class: http://www.vtk.org/pipermail/vtkusers/2005-July/080632.html -- is it maybe already available in VTK as a part of some other class? vtkCurvatures doesn't seem to provide this functionality. Thanks. Best, Katya From blloyd at vision.ee.ethz.ch Fri Feb 6 11:45:53 2009 From: blloyd at vision.ee.ethz.ch (Bryn Lloyd) Date: Fri, 06 Feb 2009 17:45:53 +0100 Subject: [vtkusers] principal directions of curvature In-Reply-To: <2DDC0446EF4690489771E0A9491C6305028AFE45@EX3.d.ethz.ch> References: <2DDC0446EF4690489771E0A9491C6305028AFE45@EX3.d.ethz.ch> Message-ID: <498C6941.8050300@vision.ee.ethz.ch> Hi Katya, It looks like you can copy the vtkCurvatureTensor code from the bottom of the message you cited. Only the header is missing, but you could write that yourself... Cheers Bryn Syrkina Ekaterina wrote: > Hello, > > what is the easiest way to access curvature tensor for 3d triangular > mesh surface? I need principal directions and curvatures plus normal > calculated for every point. I found some old message about > vtkCurvatureTensor class: > http://www.vtk.org/pipermail/vtkusers/2005-July/080632.html -- is it > maybe already available in VTK as a part of some other class? > vtkCurvatures doesn't seem to provide this functionality. > > Thanks. Best, > Katya > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- ------------------------------------------------- Bryn Lloyd Computer Vision Laboratory ETH Z?rich, Sternwartstrasse 7 CH - 8092 Z?rich, Switzerland Tel: +41 44 63 26668 Fax: +41 44 63 21199 ------------------------------------------------- From david.cole at kitware.com Fri Feb 6 12:08:22 2009 From: david.cole at kitware.com (David Cole) Date: Fri, 6 Feb 2009 12:08:22 -0500 Subject: [vtkusers] Class documentation In-Reply-To: <387ee2020902060757x7f53727fr69769120e96033d5@mail.gmail.com> References: <44f773f50902060753l3838799u40ba04c5161ef523@mail.gmail.com> <387ee2020902060757x7f53727fr69769120e96033d5@mail.gmail.com> Message-ID: And even if you google with:vtkPolyData site:vtk.org It comes up with v4.0 as the first hit.... A bit outdated. On Fri, Feb 6, 2009 at 10:57 AM, John Drescher wrote: > > but > > google doesn't always return vtk.org 'official' pages first, and the > > doxygen pages are mirrored hundreds of places, sometimes with very old > > versions. > > > I too find that frustrating. I would like to rephrase that as google > rarely puts vtk.org first.. > > John > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cole at kitware.com Fri Feb 6 13:00:25 2009 From: david.cole at kitware.com (David Cole) Date: Fri, 6 Feb 2009 13:00:25 -0500 Subject: [vtkusers] vtkMFC as .dll vs static library In-Reply-To: <233791.62567.qm@web51302.mail.re2.yahoo.com> References: <233791.62567.qm@web51302.mail.re2.yahoo.com> Message-ID: On Thu, Feb 5, 2009 at 11:33 PM, Alon Mozes wrote: > I have carefully cleaned, rebuilt and compiled vtk, itk, and my project > using only "MT(d)" references. I can now compile and link with no errors. > Excellent... > But when I launch the app............. 0x027CB6B0, 296 bytes long. > Data: < g& > CD CD CD CD 00 00 00 00 C0 67 26 03 CD CD CD CD > Object dump complete. > The program '[85320] .exe: Native' has exited with code 1 (0x1). > > Is this still related to a linker error? > No, probably not. (Since you do not have the linker error anymore, but this is still happening...) > Does delay loading play a role even though I'm statically linking? > No, it shouldn't -- if you are statically linking everything, then there is nothing to delay load... > Any tips on figuring it out from here? > Two things to try: (1) Choose "Debug > Exceptions" from the Visual Studio menu bar and check all the boxes to break when an exception is thrown. If one is thrown, copy and paste the call stack and send it to the mailing list. (2) Step into your program with the debugger ("Debug > Step Into" in the menu) and single step to see who is returning the "1" exit code. (Or just run, and set a breakpoint in the MFC leak reporting code and see how it's being called...) HTH, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl at skytopsoftware.com Fri Feb 6 14:02:18 2009 From: carl at skytopsoftware.com (Carl Trapani) Date: Fri, 06 Feb 2009 14:02:18 -0500 Subject: [vtkusers] Error Generating vtkGLSLShaderLibrary.h Message-ID: <498C893A.4090300@skytopsoftware.com> Hi All, I'm stumped and hoping someone can help me out. I'm trying to compile vtk-5.2.1 (out-of-source build) using: -Eclipse CDT 5 (NOT 4) -MinGW 5.1.3 ( gcc (GCC) 3.4.5 (mingw-vista special r3) ) -MSYS 1.0.10 (GNU Make version 3.79.1, ...) -cmake-gui(beta) 2.6.1 -Win32 (Vista + SP1) Here is what I do: 1) open a command prompt and set path to include C:\MinGW\bin (for gcc) and C:\msys\1.0\bin (for make) 2) run cmake-gui.exe from command prompt with path set from 1). I set the src and build dirs as: C:/projects/vtk/vtk-5.2.1/vtk-src C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4 I set the Generator to "Eclipse CDT4 - Unix Makefiles" (IS THIS THE RIGHT CHOICE?). Configure and set VTK_INSTALL_PREFIX and VTK_DATA_ROOT. Configure again accepting defaults for BUILD_TESTING, VTK_USE_INFOVIS, VTK_USE_RENDERING, VTK_USE_VIEWS. Generate (no problems). 3) Open Eclipse and import existing project at C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4 NOTE: path alterations made in 1) are NOT in effect now. C:\MinGW\bin and C:\msys\1.0\bin are NOT on the path. 4) Then I get this error after some compilation: --------------------------- ProcessShader.exe - Unable To Locate Component --------------------------- This application has failed to start because mingwm10.dll was not found. Re-installing the application may fix this problem. --------------------------- OK --------------------------- But, mingwm10.dll is at C:\MinGW\bin ?? Below is the Eclipse console output for the error: ------ console output----------- [ 9%] Generating vtkGLSLShaderLibrary.h cd C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4/Utilities/MaterialLibrary && ../../bin/ProcessShader.exe C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4/Utilities/MaterialLibrary/vtkGLSLShaderLibrary.h vtkShaderGLSL Code GetCode C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestAppVarFrag.glsl C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestVertex.glsl C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestVtkPropertyFrag.glsl C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestMatrixFrag.glsl C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestScalarVectorFrag.glsl C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/Twisted.glsl make[2]: *** [Utilities/MaterialLibrary/vtkGLSLShaderLibrary.h] Error 53 make[2]: Leaving directory `/c/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4' make[1]: *** [Utilities/MaterialLibrary/CMakeFiles/vtkMaterialLibraryConfiguredFiles.dir/all] Error 2 make[1]: Leaving directory `/c/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4' make: *** [all] Error 2 ------------------------------- Any suggestions would be greatly appreciated. I think I'll try rolling back to Eclipse CDT4 and see if that makes a difference. Thanks, Carl Trapani PS - Yes, I've tried this twice, cleaning out the build directory before CMake re-generation. I have not tried using latest vtk source from CVS. From daviddoria at gmail.com Fri Feb 6 16:09:00 2009 From: daviddoria at gmail.com (daviddoria) Date: Fri, 6 Feb 2009 13:09:00 -0800 (PST) Subject: [vtkusers] Fill giant holes in a mesh In-Reply-To: <003501c9885e$ced2e1c0$6c78a540$@danesi@dinccs.com> References: <003501c9885e$ced2e1c0$6c78a540$@danesi@dinccs.com> Message-ID: <21880690.post@talk.nabble.com> Hi Fred- thanks for the offer! I'll take you up on it only because I've been trying to do this off and on for a couple of months now haha. Here is a link to the model http://rpi.edu/~doriad/Car.vtp I would like to get a watertight, non-convex (ie still looks very much like the car) mesh from this. I tried to follow your instructions: I used the "extract edges filter" and it seemed to work. Then I tried to do "Extract cells by region" but I didn't know what I was doing so I just left it default. Then I did "Extract surface" but nothing happened. Any tips would be great! Thanks, Dave -- View this message in context: http://www.nabble.com/Fill-giant-holes-in-a-mesh-tp21871947p21880690.html Sent from the VTK - Users mailing list archive at Nabble.com. From carl at skytopsoftware.com Fri Feb 6 18:10:30 2009 From: carl at skytopsoftware.com (Carl Trapani) Date: Fri, 06 Feb 2009 18:10:30 -0500 Subject: [vtkusers] Error Generating vtkGLSLShaderLibrary.h In-Reply-To: <498C893A.4090300@skytopsoftware.com> References: <498C893A.4090300@skytopsoftware.com> Message-ID: <498CC366.7030306@skytopsoftware.com> Hello again, I've tried the following configuration tweaks and combinations, but no luck yet. Anyone got any advice? Reverted to Eclipse CDT4, same error. Tried using Eclipse CDT4 - MinGW Makefile generator, got error: can't have sh.exe on path. Ran cmake-gui.exe without MinGW or MSYS on path ( + CDT4 MinGW Makefile generator), but got CMAKE_MAKE_PROGRAM not found error. Upgraded to MinGW 5.1.4. but now CMAKE_CXX_NOT_FOUND (where did g++.exe go? Not in C:\MinGW\bin). If anyone has successfully used Eclipse CDT + MinGW to compile vtk 5.2.1, I'd love to know what versions and tricks you've used. Thanks, Carl Carl Trapani wrote: > Hi All, > > I'm stumped and hoping someone can help me out. I'm trying to compile > vtk-5.2.1 (out-of-source build) using: > -Eclipse CDT 5 (NOT 4) > -MinGW 5.1.3 ( gcc (GCC) 3.4.5 (mingw-vista special r3) ) > -MSYS 1.0.10 (GNU Make version 3.79.1, ...) > -cmake-gui(beta) 2.6.1 > -Win32 (Vista + SP1) > > Here is what I do: > 1) open a command prompt and set path to include C:\MinGW\bin (for > gcc) and C:\msys\1.0\bin (for make) > 2) run cmake-gui.exe from command prompt with path set from 1). I set > the src and build dirs as: > C:/projects/vtk/vtk-5.2.1/vtk-src > C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4 > I set the Generator to "Eclipse CDT4 - Unix Makefiles" (IS THIS THE > RIGHT CHOICE?). > Configure and set VTK_INSTALL_PREFIX and VTK_DATA_ROOT. > Configure again accepting defaults for BUILD_TESTING, VTK_USE_INFOVIS, > VTK_USE_RENDERING, VTK_USE_VIEWS. > Generate (no problems). > 3) Open Eclipse and import existing project at > C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4 > NOTE: path alterations made in 1) are NOT in effect now. C:\MinGW\bin > and C:\msys\1.0\bin are NOT on the path. > 4) Then I get this error after some compilation: > --------------------------- > ProcessShader.exe - Unable To Locate Component > --------------------------- > This application has failed to start because mingwm10.dll was not > found. Re-installing the application may fix this problem. > --------------------------- > OK --------------------------- > > But, mingwm10.dll is at C:\MinGW\bin ?? > > Below is the Eclipse console output for the error: > ------ console output----------- > [ 9%] Generating vtkGLSLShaderLibrary.h > cd > C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4/Utilities/MaterialLibrary > && ../../bin/ProcessShader.exe > C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4/Utilities/MaterialLibrary/vtkGLSLShaderLibrary.h > vtkShaderGLSL Code GetCode > C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestAppVarFrag.glsl > C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestVertex.glsl > C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestVtkPropertyFrag.glsl > C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestMatrixFrag.glsl > C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestScalarVectorFrag.glsl > C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/Twisted.glsl > > make[2]: *** [Utilities/MaterialLibrary/vtkGLSLShaderLibrary.h] Error 53 > make[2]: Leaving directory > `/c/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4' > make[1]: *** > [Utilities/MaterialLibrary/CMakeFiles/vtkMaterialLibraryConfiguredFiles.dir/all] > Error 2 > make[1]: Leaving directory > `/c/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4' > make: *** [all] Error 2 > ------------------------------- > > Any suggestions would be greatly appreciated. I think I'll try rolling > back to Eclipse CDT4 and see if that makes a difference. > > Thanks, > Carl Trapani > > PS - Yes, I've tried this twice, cleaning out the build directory > before CMake re-generation. I have not tried using latest vtk source > from CVS. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From daviddoria at gmail.com Fri Feb 6 18:12:26 2009 From: daviddoria at gmail.com (daviddoria) Date: Fri, 6 Feb 2009 15:12:26 -0800 (PST) Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <21843783.post@talk.nabble.com> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> <498956A4.6070705@vision.ee.ethz.ch> <21830087.post@talk.nabble.com> <4989A8BC.3050901@cfdrc.com> <21832865.post@talk.nabble.com> <4989B899.9040809@vision.ee.ethz.ch> <21833537.post@talk.nabble.com> <4989BE4C.5020109@vision.ee.ethz.ch> <21843560.post@talk.nabble.com> <21843783.post@talk.nabble.com> Message-ID: <21882627.post@talk.nabble.com> The first time I ran the "Mask Points" filter it worked as expected. Now I am trying to run it, and it is resulting in the correct number of points, but only from a small piece of the model rather than kind of uniform sampling across the entire model. Have you ever seen this behavior? Dave -- View this message in context: http://www.nabble.com/Some-things-cannot-be-saved-as-VTP--tp21815835p21882627.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Fri Feb 6 18:32:33 2009 From: daviddoria at gmail.com (daviddoria) Date: Fri, 6 Feb 2009 15:32:33 -0800 (PST) Subject: [vtkusers] Some things cannot be saved as VTP? In-Reply-To: <21882627.post@talk.nabble.com> References: <21815835.post@talk.nabble.com> <498899E0.20702@cfdrc.com> <21818848.post@talk.nabble.com> <498956A4.6070705@vision.ee.ethz.ch> <21830087.post@talk.nabble.com> <4989A8BC.3050901@cfdrc.com> <21832865.post@talk.nabble.com> <4989B899.9040809@vision.ee.ethz.ch> <21833537.post@talk.nabble.com> <4989BE4C.5020109@vision.ee.ethz.ch> <21843560.post@talk.nabble.com> <21843783.post@talk.nabble.com> <21882627.post@talk.nabble.com> Message-ID: <21882933.post@talk.nabble.com> Haha sorry, I forgot to check "random" so I guess it started at one side of the model and stopped when it got the required number of points. -- View this message in context: http://www.nabble.com/Some-things-cannot-be-saved-as-VTP--tp21815835p21882933.html Sent from the VTK - Users mailing list archive at Nabble.com. From luisrpp at gmail.com Fri Feb 6 22:27:59 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Sat, 7 Feb 2009 01:27:59 -0200 Subject: [vtkusers] Draw a line in a image Message-ID: Hi All, How can I draw a line in a vtkImageData object? It is a 2D image. Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From hng.email at gmail.com Fri Feb 6 22:33:07 2009 From: hng.email at gmail.com (Hom Nath Gharti) Date: Fri, 6 Feb 2009 22:33:07 -0500 Subject: [vtkusers] Draw a line in a image In-Reply-To: References: Message-ID: I would use vtkLineSource() -------------- next part -------------- An HTML attachment was scrubbed... URL: From luisrpp at gmail.com Fri Feb 6 22:44:13 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Sat, 7 Feb 2009 01:44:13 -0200 Subject: [vtkusers] Draw a line in a image In-Reply-To: References: Message-ID: But how can I use vtkLineSource to draw a line in a existent image? I don't wanna draw the line over the image using a different actor. I was expecting a way to set the line changing the scalar values of a vtkImageData object. Do I need to do it pixel by pixel using the method SetScalarComponentFromDouble? Thanks, Luis On Sat, Feb 7, 2009 at 1:33 AM, Hom Nath Gharti wrote: > I would use vtkLineSource() > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Fri Feb 6 23:43:46 2009 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Fri, 6 Feb 2009 23:43:46 -0500 (EST) Subject: [vtkusers] How to read multiple image attributes Message-ID: Hi, I'm working on a project that requires loading multiple attributes (including scalar like density and vector like velocity) from a file. I want to write a reader that can be plugged into paraview so that a user can read the file and select attributes to display... Is there a vtk reader that I can take an example? Is it possible that I create multiple readers for each of the attributes, then merge their outputs together and how (does vtkImageAppendComponents do the job?)? Thanks, Weiguang From nourmestiri at yahoo.fr Sat Feb 7 06:16:30 2009 From: nourmestiri at yahoo.fr (Nour Mestiri) Date: Sat, 7 Feb 2009 11:16:30 +0000 (GMT) Subject: [vtkusers] Change the color of a polydata Message-ID: <206921.55311.qm@web28206.mail.ukl.yahoo.com> Hi all vtk users. I have many polydata saved as VTP files. When i display any one of those images, i always have a 'blue' data. I want to know haow to modify the color of a VTP image? Thank you so much __________________________________________________________________________________________________ Ne pleurez pas si votre Webmail ferme ! R?cup?rez votre historique sur Yahoo! Mail ! http://fr.docs.yahoo.com/mail/transfert_mails.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Sat Feb 7 09:31:06 2009 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Sat, 7 Feb 2009 09:31:06 -0500 Subject: [vtkusers] Error Generating vtkGLSLShaderLibrary.h In-Reply-To: <498CC366.7030306@skytopsoftware.com> References: <498C893A.4090300@skytopsoftware.com> <498CC366.7030306@skytopsoftware.com> Message-ID: <7ba9d6a30902070631w1708974ci6e3a8bb135dc8ab9@mail.gmail.com> You may need to set the windows PATH to include C:\MinGW\bin and C:\msys\1.0\bin. I am not too familiar with eclipse but it may have some way of specifying environment variables for building. Alternatively, try firing off eclipse from a shell where the PATH is set to include the two dirs. Utkarsh On Fri, Feb 6, 2009 at 6:10 PM, Carl Trapani wrote: > Hello again, > > I've tried the following configuration tweaks and combinations, but no luck > yet. Anyone got any advice? > > Reverted to Eclipse CDT4, same error. > Tried using Eclipse CDT4 - MinGW Makefile generator, got error: can't have > sh.exe on path. > Ran cmake-gui.exe without MinGW or MSYS on path ( + CDT4 MinGW Makefile > generator), but got CMAKE_MAKE_PROGRAM not found error. > Upgraded to MinGW 5.1.4. but now CMAKE_CXX_NOT_FOUND (where did g++.exe go? > Not in C:\MinGW\bin). > > If anyone has successfully used Eclipse CDT + MinGW to compile vtk 5.2.1, > I'd love to know what versions and tricks you've used. > Thanks, > Carl > > Carl Trapani wrote: >> >> Hi All, >> >> I'm stumped and hoping someone can help me out. I'm trying to compile >> vtk-5.2.1 (out-of-source build) using: >> -Eclipse CDT 5 (NOT 4) >> -MinGW 5.1.3 ( gcc (GCC) 3.4.5 (mingw-vista special r3) ) >> -MSYS 1.0.10 (GNU Make version 3.79.1, ...) >> -cmake-gui(beta) 2.6.1 >> -Win32 (Vista + SP1) >> >> Here is what I do: >> 1) open a command prompt and set path to include C:\MinGW\bin (for gcc) >> and C:\msys\1.0\bin (for make) >> 2) run cmake-gui.exe from command prompt with path set from 1). I set the >> src and build dirs as: >> C:/projects/vtk/vtk-5.2.1/vtk-src >> C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4 >> I set the Generator to "Eclipse CDT4 - Unix Makefiles" (IS THIS THE RIGHT >> CHOICE?). >> Configure and set VTK_INSTALL_PREFIX and VTK_DATA_ROOT. >> Configure again accepting defaults for BUILD_TESTING, VTK_USE_INFOVIS, >> VTK_USE_RENDERING, VTK_USE_VIEWS. >> Generate (no problems). >> 3) Open Eclipse and import existing project at >> C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4 >> NOTE: path alterations made in 1) are NOT in effect now. C:\MinGW\bin and >> C:\msys\1.0\bin are NOT on the path. >> 4) Then I get this error after some compilation: >> --------------------------- >> ProcessShader.exe - Unable To Locate Component >> --------------------------- >> This application has failed to start because mingwm10.dll was not found. >> Re-installing the application may fix this problem. >> --------------------------- >> OK --------------------------- >> >> But, mingwm10.dll is at C:\MinGW\bin ?? >> >> Below is the Eclipse console output for the error: >> ------ console output----------- >> [ 9%] [34m [1mGenerating vtkGLSLShaderLibrary.h >> [0mcd >> C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4/Utilities/MaterialLibrary && >> ../../bin/ProcessShader.exe >> C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4/Utilities/MaterialLibrary/vtkGLSLShaderLibrary.h >> vtkShaderGLSL Code GetCode >> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestAppVarFrag.glsl >> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestVertex.glsl >> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestVtkPropertyFrag.glsl >> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestMatrixFrag.glsl >> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestScalarVectorFrag.glsl >> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/Twisted.glsl >> make[2]: *** [Utilities/MaterialLibrary/vtkGLSLShaderLibrary.h] Error 53 >> make[2]: Leaving directory >> `/c/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4' >> make[1]: *** >> [Utilities/MaterialLibrary/CMakeFiles/vtkMaterialLibraryConfiguredFiles.dir/all] >> Error 2 >> make[1]: Leaving directory >> `/c/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4' >> make: *** [all] Error 2 >> ------------------------------- >> >> Any suggestions would be greatly appreciated. I think I'll try rolling >> back to Eclipse CDT4 and see if that makes a difference. >> >> Thanks, >> Carl Trapani >> >> PS - Yes, I've tried this twice, cleaning out the build directory before >> CMake re-generation. I have not tried using latest vtk source from CVS. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From ikostop.dev at gmail.com Sat Feb 7 11:01:59 2009 From: ikostop.dev at gmail.com (Irene Kostopoulou) Date: Sat, 7 Feb 2009 18:01:59 +0200 Subject: [vtkusers] [Newbie] How to open a .vtk file? Message-ID: <45c0a1270902070801w5fbf5f13p8b29ac9e00c1d5de@mail.gmail.com> Hello all, I have a polygon data .vtk file, as a result of model making (marching cubes) of 3d slicer joint apllied to a segmentation of blood vessels of mra images. As I'm not familiar with the vtk program nor the vtk file format, I need some suggestions. How can I open this vtk file and take the polygon points? I'm not interested only in visualization of the vtk file, but I also need to process the data in it, but unfortunately I don't even know how to open it. I have the binary 5.2 version of vtk installed in my pc. Thanks and sorry for my newbie questions. I appreciate any help, Irene -------------- next part -------------- An HTML attachment was scrubbed... URL: From amozes77 at yahoo.com Sat Feb 7 12:08:09 2009 From: amozes77 at yahoo.com (Alon Mozes) Date: Sat, 7 Feb 2009 09:08:09 -0800 (PST) Subject: [vtkusers] vtkMFC as .dll vs static library In-Reply-To: Message-ID: <91660.16270.qm@web51304.mail.re2.yahoo.com> I'm happy to say it's finally working.? I stepped through the debugger and this time found a problem in my application that I had previously fixed on a local copy, but with all the fresh checkouts to compare old vs. new, I neglected to checkin or re-implement my fix.? So now I have my old app fully working on VS 2008 with vtk 5.2.1 and all static links.? Thanks for all the help!!? It is greatly appreciated. --- On Fri, 2/6/09, David Cole wrote: From: David Cole Subject: Re: vtkMFC as .dll vs static library To: "Alon Mozes" Cc: vtkusers at vtk.org Date: Friday, February 6, 2009, 10:00 AM On Thu, Feb 5, 2009 at 11:33 PM, Alon Mozes wrote: I have carefully cleaned, rebuilt and compiled vtk, itk, and my project using only "MT(d)" references.? I can now compile and link with no errors. Excellent... ? But when I launch the app.............?0x027CB6B0, 296 bytes long. Data: < g& > CD CD CD CD 00 00 00 00 C0 67 26 03 CD CD CD CD Object dump complete. The program '[85320] .exe: Native' has exited with code 1 (0x1). ? Is this still related to a linker error? No, probably not. (Since you do not have the linker error anymore, but this is still happening...) ? ? Does delay loading play a role even though I'm statically linking? No, it shouldn't -- if you are statically linking everything, then there is nothing to delay load... ? ? Any tips on figuring it out from here? Two things to try: (1) Choose "Debug > Exceptions" from the Visual Studio menu bar and check all the boxes to break when an exception is thrown. If one is thrown, copy and paste the call stack and send it to the mailing list. (2) Step into your program with the debugger ("Debug > Step Into" in the menu) and single step to see who is returning the "1" exit code. (Or just run, and set a breakpoint in the MFC leak reporting code and see how it's being called...) HTH, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cole at kitware.com Sat Feb 7 12:14:08 2009 From: david.cole at kitware.com (David Cole) Date: Sat, 7 Feb 2009 12:14:08 -0500 Subject: [vtkusers] vtkMFC as .dll vs static library In-Reply-To: <91660.16270.qm@web51304.mail.re2.yahoo.com> References: <91660.16270.qm@web51304.mail.re2.yahoo.com> Message-ID: On Sat, Feb 7, 2009 at 12:08 PM, Alon Mozes wrote: > I'm happy to say it's finally working. I stepped through the debugger and > this time found a problem in my application that I had previously fixed on a > local copy, but with all the fresh checkouts to compare old vs. new, I > neglected to checkin or re-implement my fix. So now I have my old app fully > working on VS 2008 with vtk 5.2.1 and all static links. Thanks for all the > help!! It is greatly appreciated. You're welcome.... Glad to hear it's working as expected again. :-) David -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Sat Feb 7 14:06:18 2009 From: daviddoria at gmail.com (David Doria) Date: Sat, 7 Feb 2009 14:06:18 -0500 Subject: [vtkusers] Where Do I Put c++ Examples? Message-ID: I enjoy the VTK project, but I found it pretty tough to get the hang of as a beginning c++ programmer. I have complied a bunch of examples (using readers/writers, transforms, ICP, Surface reconstruction type stuff), is there anywhere I can put them that they would be easily found by a new VTK user? I have seen many many many questions on message boards like "I just want an example of X in c++", and these would be the answer! -- Thanks, David From daviddoria at gmail.com Sat Feb 7 14:22:46 2009 From: daviddoria at gmail.com (David Doria) Date: Sat, 7 Feb 2009 14:22:46 -0500 Subject: [vtkusers] Intersect a ray with a model Message-ID: The only thing I could find online is this: vtkCellLocator::IntersectWithLine But I have some questions: 1) It says it intersects with a vtkPolyData surface. I have a vtp file of triangles that I wrote using ->SetPolys(...). Is that a "vtkPolyData surface"? 2) What is this vtkCellLocator business? ie. how do I actually call this function IntersectWithLine? -- Thanks, David From vv_rahul97 at yahoo.com Sat Feb 7 18:12:17 2009 From: vv_rahul97 at yahoo.com (rahul kumar) Date: Sat, 7 Feb 2009 15:12:17 -0800 (PST) Subject: [vtkusers] vtkWidgets or QGraphicsItem In-Reply-To: Message-ID: <480029.60895.qm@web36502.mail.mud.yahoo.com> Hi all, we are developing one application using VTK, QT in which widgets need to be provided following features 1. Selection by mouse button down 2. cut, copy and paste 3. selected by rubber band rectangle 4. dragged and dropped 5. get selected widgets We are in confuse whether to use QGrahicsItems ( with QGraphcsScene QGraphicsView) or vtkWidgets. though recently in vtkcontourWidgets translation and scaling features are added but still lacks many features. can anybody suggest? thanks and regards rahul From trshash at gmail.com Sun Feb 8 15:47:21 2009 From: trshash at gmail.com (T.R.Shashwath) Date: Mon, 9 Feb 2009 02:17:21 +0530 Subject: [vtkusers] Intersect a ray with a model In-Reply-To: References: Message-ID: <200902090217.21838.trshash84@gmail.com> Hi David, On Sunday 08 Feb 2009 12:52:46 am David Doria wrote: > The only thing I could find online is this: > > vtkCellLocator::IntersectWithLine > > But I have some questions: > > 1) It says it intersects with a vtkPolyData surface. I have a vtp file > of triangles that I wrote using ->SetPolys(...). Is that a > "vtkPolyData surface"? Read the vtp file into a vtkPolyData object using the appropriate reader. That will give you the right object to do this with. > 2) What is this vtkCellLocator business? ie. how do I actually call > this function IntersectWithLine? vtkCellLocator and vtkOBBTree will help you with this... Both do the same job, but OBBTree is a whole lot faster, except that it works only with polydata. Use it like this: 1) Create a cell locator (or OBB tree) object 2) Set your model as the input using SetDataSet(...) 3) Call BuildLocator() to initialize the object. 4) Use IntersectWithLine. In OBBTree, the syntax is int IntersectWithLine (const double a0[3], const double a1[3], vtkPoints *points, vtkIdList *cellIds); The values a0 and a1 are the endpoints of the line, and points and cellIds are the outputs containing the points and cells that the line intersects with. You should create them (using vtkPoints::New() and vtkIdList::New()) before sending them in. The locator will fill them for you. The return value indicates whether the line intersected or not (0), and whether the point is inside or outside the surface (-1, 1). I haven't used vtkCellLocator much in this context, so I don't know how to do that. OBBTree serves my purpose, anyway. HTH Shash From L.J.vanRuijven at amc.uva.nl Mon Feb 9 03:18:58 2009 From: L.J.vanRuijven at amc.uva.nl (L.J. van Ruijven) Date: Mon, 09 Feb 2009 09:18:58 +0100 Subject: [vtkusers] Update pixel value and display the changes in a widget Message-ID: Hi Luis, Maybe it helps if you insert: image->Modified(); before the statement image->Update(); If the method Modified() is not called, objects can neglect the Update() method. Leo. -------------- next part -------------- A non-text attachment was scrubbed... Name: L.J.vanRuijven.vcf Type: text/x-vcard Size: 261 bytes Desc: Card for "L.J. van Ruijven" URL: From seb.belese at laposte.net Mon Feb 9 03:57:33 2009 From: seb.belese at laposte.net (=?ISO-8859-1?Q?S=E9bastien_Blaise?=) Date: Mon, 09 Feb 2009 09:57:33 +0100 Subject: [vtkusers] VTK and zlib Message-ID: <498FEFFD.9060304@laposte.net> Hi, I try to write a VTK compressed file (uncompressed works fine), but I have the following error when I open it in Paraview: ERROR: In /build/buildd/paraview-3.2.2/VTK/IO/vtkXMLDataParser.cxx, line 434 vtkXMLDataParser (0xa02c998): Error reading beginning of compression header. Read 0 of 12 bytes. ERROR: In /build/buildd/paraview-3.2.2/VTK/IO/vtkXMLUnstructuredDataReader.cxx, line 515 vtkXMLUnstructuredGridReader (0xa030228): Cannot read points array from Points in piece 0. The data array in the element may be too short. I don't understand what is wrong. I followed instructions from (http://www.vtkedge.org/Wiki/VTK_XML_Formats), using only one block et the moment. I read the header with GHex and it seems OK. The critical part of the code is (zlib_compress is a function I implemented to compress the buffer). : #ifdef HAVE_ZLIB if (compression_level!=0){ unsigned int header[4]; header[0]=1; header[1]=data_size; header[2]=0; header[3]=zlib_compress((unsigned char*)buffer_sol.str().c_str(),&compressed_sol,data_size,compression_level); fstream_sol.write((char *)header,4*sizeof(unsigned int)); fstream_sol.write(compressed_sol.str().c_str(),header[3]); fstream_sol.flush(); }else #endif { fstream_sol.write((char *)(&data_size),sizeof(unsigned int)); fstream_sol.write(buffer_sol.str().c_str(),data_size); } Do you have any idea of what can be wrong? Thanks for any help, S?bastien From frederic.danesi at dinccs.com Mon Feb 9 05:22:21 2009 From: frederic.danesi at dinccs.com (Frederic Danesi) Date: Mon, 9 Feb 2009 11:22:21 +0100 Subject: [vtkusers] Car Model In-Reply-To: References: <31055489.117281233930008162.JavaMail.nabble@isper.nabble.com> <-1711671675207175601@unknownmsgid> Message-ID: <001b01c98aa0$4bb62b00$e3228100$@danesi@dinccs.com> Hi David, I used Paraview to produce this first image but it was a trick: I applied something I use as a basis for CAD/CAE conversion and automatic meshing. Here is the procedure you should follow: - open your VTU - extract the surface - ?clean? the surface (I used a 0.005 tolerance) - extract the feature edges (only boundary edges) You should get something like this: Now, with Paraview, you can select some contours and use vtkDelaunay to fill them It will gave you a first result. What I was suggesting instead is the use vtkStripper, to rebuild clean contours from this, and then to use vtkTriangleFilter vtkStripper holeStrips = new vtkStripper(); holeStrips.SetInput(featuresEdges.GetOutput()); holeStrips.Update(); vtkPolyData holePoly = new vtkPolyData(); holePoly.SetPoints(holeStrips.GetOutput().GetPoints()); holePoly.SetPolys(holeStrips.GetOutput().GetLines()); vtkTriangleFilter missingTriangles = new vtkTriangleFilter(); missingTriangles.SetInput(holePoly); My guess is that you?ll have to do that more than one to fill every hole. If it fills too much holes, maybe you should subset featuresEdges by region with a connectivity filter before ?stripping? the whole set. BTW, you could use that to remove the inner point instead of a convex hull / threshold Try it with the ?connectivity? tool in paraview FYI : We used to drop a bag of flour or talcum powder on the object before laser scanning. It helps the laser to detect the actual surface and to not mess anymore with shiny or translucent surface ... Cordialement, F.Danesi -- Responsable D?veloppement Informatique et Travail Collaboratif D?partement DINCCS (D?partement Ing?nierie Num?rique, Conception Collaborative et Simulation) MICADO / DINCCS P?le de Haute Technologie, BP 90005 08005 Charleville-M?zi?res Cedex Tel. : +33 (0) 3.24.41.69.55 / +33 (0) 6.62.76.13.32 Email : frederic.danesi at dinccs.com Web : www.afmicado.com / www.dinccs.com -----Message d'origine----- De : David Doria [mailto:daviddoria at gmail.com] Envoy? : samedi 7 f?vrier 2009 15:21 ? : Frederic Danesi Objet : Re: Car Model Fred - I have several LiDAR scans from different angles of the same car that have been registered to give the full surface rather than just 2.5D (a scan from one position). The problem is that the laser goes through the windows, so it's been tough to make a water tight model from the resulting point cloud. I would like to know the idea/procedure so I can create this type of mesh from other scans in the future as well. I can use any combination of c++, paraview, and VTK. It may be easiest to learn the steps if they can all be done in Paraview, because as far as I know paraview completely uses VTK, so I can always go back and figure out how to do whatever we do in Paraview in VTK. Here are the raw points: http://www.rpi.edu/~doriad/CarPoints.vtp Another problem is that there are points inside the volume (the headrests etc). I used a convex hull to threshold points that fell only within some distance of the hull before I started trying to create the mesh. Sound reasonable? What was that "automatic filling procedure" that you used to produce the image you sent me? It is very close to what I'm looking for - there seem to still be some holes between the tires and the body of the car - maybe they can be filled in the same way you filled in the windows? How did you do that? Thanks for all the help Fred! David On Fri, Feb 6, 2009 at 10:05 AM, Frederic Danesi wrote: > Hi Dave, > > Using automatic filling method produce the following result. It does not > sound really good to me but it is a first step. > > What exactly are you looking for ? > > Is this a model you got by scanning a vehicle ? if so, maybe I can do better > with the points cloud or the STL directly. > > > > You are working with paraview or VTK ? Do you just want to correct this > model, or you're tried to write an application to do so ? > > Fred. > > > > > > > > > > Cordialement, > > F.Danesi > > -- > > Responsable D?veloppement Informatique et Travail Collaboratif > > D?partement DINCCS (D?partement Ing?nierie Num?rique, Conception > Collaborative et Simulation) > > MICADO / DINCCS > > P?le de Haute Technologie, BP 90005 > > 08005 Charleville-M?zi?res Cedex > > Tel. : +33 (0) 3.24.41.69.55 / +33 (0) 6.62.76.13.32 > > Email : frederic.danesi at dinccs.com > > Web : www.afmicado.com / www.dinccs.com > > > > > > -----Message d'origine----- > De : daviddoria at gmail.com [mailto:daviddoria at gmail.com] > Envoy? : vendredi 6 f?vrier 2009 15:20 > ? : frederic.danesi at dinccs.com > Objet : Car Model > > > > Hi Fred- thanks for the offer! I'll take you up on it only because I've been > trying to do this off and on for a couple of months now haha. > > Here is a link to the model > > http://rpi.edu/~doriad/Car.vtp > > > > I would like to get a watertight, non-convex (ie still looks very much like > the car) mesh from this. I tried to follow your instructions: I used the > "extract edges filter" and it seemed to work. Then I tried to do "Extract > cells by region" but I didn't know what I was doing so I just left it > default. Then I did "Extract surface" but nothing happened. > > > > Any tips would be great! > > > > Thanks, > > > > Dave > > Ce message entrant est certifi? sans virus connu. > > Analyse effectu?e par AVG - www.avg.fr > > Version: 8.0.233 / Base de donn?es virale: 270.10.18/1936 - Date: 02/05/09 > 11:34:00 -- Thanks, David Ce message entrant est certifi? sans virus connu. Analyse effectu?e par AVG - www.avg.fr Version: 8.0.233 / Base de donn?es virale: 270.10.19/1939 - Date: 02/06/09 11:31:00 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 9948 bytes Desc: not available URL: From arturo_caissut at tiscali.it Mon Feb 9 06:20:04 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Mon, 09 Feb 2009 12:20:04 +0100 Subject: [vtkusers] vtkGenericPointIterator Message-ID: <49901164.8000609@tiscali.it> Hi, is someonw here skilled in vtkGenericPointIterator use? I cannot figure out how to exactly use it... From mweiss at cbs.mpg.de Mon Feb 9 07:09:54 2009 From: mweiss at cbs.mpg.de (Marcel Weiss) Date: Mon, 9 Feb 2009 13:09:54 +0100 (CET) Subject: [vtkusers] strange behavior of vtkClipPolyData ??? In-Reply-To: <18914898.711471234179058217.JavaMail.root@zimbra> Message-ID: <10741365.712921234181393960.JavaMail.root@zimbra> Hi again?, I?m still facing my clipping problem and would be deeply grateful for any hints or remarks! I am using vtkStreamLine to trace streams through a 3D data field. The start points are given by a vtkPolyData object in the same space. So the number of streams created is identical to the number of points in the vtkPolyData. Each of the created streams consists of ~30 connected points. Everything fine so far. then I use vtkClipPolyData to clip those streams based on (other) scalar value. therefor I assign a scalar value for each of the points of every single stream and use the following code for clipping vtkClipPolyData* cutter = vtkClipPolyData :: New(); cutter-> SetInput(streams); cutter-> GenerateClipScalarsOff(); cutter-> SetValue(1.0); cutter-> UpdateInformation(); cutter-> Update(); this also works (some how), BUT: although vtkClipPolyData removes many of the streams points (as expected), it seems to create many new cell/lines. (see below) streamlining result has got: 12577845 points, 483730 cells, 0 verts, 483730 lines, 0 polys and 0 strips. cutting result has got: 9753382 points, 9268541 cells, 0 verts, 9268541 lines, 0 polys and 0 strips. even if some of the streams/line are clipped into two or more new lines, which should not happen (due to the way I write the scalars), the number of cells/lines/streams increases in a way I can?t understand ... Anyone any ideas? thanks Marcel Weiss PhD student Department of Neurophysics Max Planck Institute for Human Cognitive and Brain Sciences From luisrpp at gmail.com Mon Feb 9 08:28:09 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Mon, 9 Feb 2009 11:28:09 -0200 Subject: [vtkusers] Update pixel value and display the changes in a widget In-Reply-To: References: Message-ID: Thanks Leo!! It worked!! 2009/2/9 L.J. van Ruijven > Hi Luis, > > Maybe it helps if you insert: image->Modified(); before the statement > image->Update(); If the method Modified() is not called, objects can neglect > the Update() method. > > Leo. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at science.uva.nl Mon Feb 9 08:45:44 2009 From: paul at science.uva.nl (Paul Melis) Date: Mon, 09 Feb 2009 14:45:44 +0100 Subject: [vtkusers] Volume rendering anomalies (looks like a bug) Message-ID: <49903388.6050602@science.uva.nl> Hello, With data file [1] and the attached Python script I get some really strange volume rendering results with vtk 5.2, using the volume ray caster (see the attached screenshots). The vtk file renders correctly in Paraview 3.4.0 and I have no volume rendering problems with vtk on other datasets. The dataset is a simple structured points file consisting of 323 unsigned shorts (although the original dataset I had the same problem with was 1283). It was converted from a floating-point structured points set using vtkImageShiftScale, but that's about the only exotic thing about it. Thanks in advance for any help, Paul [1] http://www.science.uva.nl/~paul/flaky2.vtk.bz2 -------------- next part -------------- A non-text attachment was scrubbed... Name: flaky1.png Type: image/png Size: 23549 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: flaky2.png Type: image/png Size: 18637 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: voltest.py Type: text/x-python Size: 4217 bytes Desc: not available URL: From carl at skytopsoftware.com Mon Feb 9 09:46:24 2009 From: carl at skytopsoftware.com (Carl Trapani) Date: Mon, 09 Feb 2009 09:46:24 -0500 Subject: [vtkusers] Error Generating vtkGLSLShaderLibrary.h In-Reply-To: <7ba9d6a30902070631w1708974ci6e3a8bb135dc8ab9@mail.gmail.com> References: <498C893A.4090300@skytopsoftware.com> <498CC366.7030306@skytopsoftware.com> <7ba9d6a30902070631w1708974ci6e3a8bb135dc8ab9@mail.gmail.com> Message-ID: <499041C0.40802@skytopsoftware.com> Hi Utkarsh, THANKS! Adding MinGW and MSYS bin dirs to my system path solved my problem (duh ... of course, the Eclipse launched ProcessShader couldn't find the MinGW dll ... so add it to the path!). For others attempting to use Eclipse CDT4 + MinGW 5.1.4 on Win32 (Vista) to compile VTK 5.2.1, here is what worked for me: OS: Vista SP1 (32 bit) Compiler/Toolchain: --MinGW 5.1.4 (make sure to install g++ as well as base components. DON'T install MinGW make.exe, use MSYS make instead.) --MSYS 1.0.10 (for make.exe) ----Put the bin directories for both of these tools on your system path (Computer ->Properties->Advanced->Environment Variables->System Vars) IDE: Eclipse Europa C++ (Eclipse 3.3 + CDT 4) Build Generator: CMake 2.6.1 --out-of-source build --Select the "Eclipse CDT 4 - Unix Makefiles" generator --accept all defaults, although I had to set/change VTK_DATA_ROOT and CMAKE_INSTALL_PREFIX I'm testing CDT5 out now. I'll let you know how it turns out. Cheers, Carl Utkarsh Ayachit wrote: > You may need to set the windows PATH to include C:\MinGW\bin and > C:\msys\1.0\bin. I am not too familiar with eclipse but it may have > some way of specifying environment variables for building. > Alternatively, try firing off eclipse from a shell where the PATH is > set to include the two dirs. > > Utkarsh > > On Fri, Feb 6, 2009 at 6:10 PM, Carl Trapani wrote: > >> Hello again, >> >> I've tried the following configuration tweaks and combinations, but no luck >> yet. Anyone got any advice? >> >> Reverted to Eclipse CDT4, same error. >> Tried using Eclipse CDT4 - MinGW Makefile generator, got error: can't have >> sh.exe on path. >> Ran cmake-gui.exe without MinGW or MSYS on path ( + CDT4 MinGW Makefile >> generator), but got CMAKE_MAKE_PROGRAM not found error. >> Upgraded to MinGW 5.1.4. but now CMAKE_CXX_NOT_FOUND (where did g++.exe go? >> Not in C:\MinGW\bin). >> >> If anyone has successfully used Eclipse CDT + MinGW to compile vtk 5.2.1, >> I'd love to know what versions and tricks you've used. >> Thanks, >> Carl >> >> Carl Trapani wrote: >> >>> Hi All, >>> >>> I'm stumped and hoping someone can help me out. I'm trying to compile >>> vtk-5.2.1 (out-of-source build) using: >>> -Eclipse CDT 5 (NOT 4) >>> -MinGW 5.1.3 ( gcc (GCC) 3.4.5 (mingw-vista special r3) ) >>> -MSYS 1.0.10 (GNU Make version 3.79.1, ...) >>> -cmake-gui(beta) 2.6.1 >>> -Win32 (Vista + SP1) >>> >>> Here is what I do: >>> 1) open a command prompt and set path to include C:\MinGW\bin (for gcc) >>> and C:\msys\1.0\bin (for make) >>> 2) run cmake-gui.exe from command prompt with path set from 1). I set the >>> src and build dirs as: >>> C:/projects/vtk/vtk-5.2.1/vtk-src >>> C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4 >>> I set the Generator to "Eclipse CDT4 - Unix Makefiles" (IS THIS THE RIGHT >>> CHOICE?). >>> Configure and set VTK_INSTALL_PREFIX and VTK_DATA_ROOT. >>> Configure again accepting defaults for BUILD_TESTING, VTK_USE_INFOVIS, >>> VTK_USE_RENDERING, VTK_USE_VIEWS. >>> Generate (no problems). >>> 3) Open Eclipse and import existing project at >>> C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4 >>> NOTE: path alterations made in 1) are NOT in effect now. C:\MinGW\bin and >>> C:\msys\1.0\bin are NOT on the path. >>> 4) Then I get this error after some compilation: >>> --------------------------- >>> ProcessShader.exe - Unable To Locate Component >>> --------------------------- >>> This application has failed to start because mingwm10.dll was not found. >>> Re-installing the application may fix this problem. >>> --------------------------- >>> OK --------------------------- >>> >>> But, mingwm10.dll is at C:\MinGW\bin ?? >>> >>> Below is the Eclipse console output for the error: >>> ------ console output----------- >>> [ 9%] [34m [1mGenerating vtkGLSLShaderLibrary.h >>> [0mcd >>> C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4/Utilities/MaterialLibrary && >>> ../../bin/ProcessShader.exe >>> C:/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4/Utilities/MaterialLibrary/vtkGLSLShaderLibrary.h >>> vtkShaderGLSL Code GetCode >>> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestAppVarFrag.glsl >>> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestVertex.glsl >>> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestVtkPropertyFrag.glsl >>> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestMatrixFrag.glsl >>> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/TestScalarVectorFrag.glsl >>> C:/projects/vtk/vtk-5.2.1/vtk-src/Utilities/MaterialLibrary/GLSLShaders/Twisted.glsl >>> make[2]: *** [Utilities/MaterialLibrary/vtkGLSLShaderLibrary.h] Error 53 >>> make[2]: Leaving directory >>> `/c/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4' >>> make[1]: *** >>> [Utilities/MaterialLibrary/CMakeFiles/vtkMaterialLibraryConfiguredFiles.dir/all] >>> Error 2 >>> make[1]: Leaving directory >>> `/c/projects/vtk/vtk-5.2.1/vtk-build-static-cdt4' >>> make: *** [all] Error 2 >>> ------------------------------- >>> >>> Any suggestions would be greatly appreciated. I think I'll try rolling >>> back to Eclipse CDT4 and see if that makes a difference. >>> >>> Thanks, >>> Carl Trapani >>> >>> PS - Yes, I've tried this twice, cleaning out the build directory before >>> CMake re-generation. I have not tried using latest vtk source from CVS. >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> From varguna at gmail.com Mon Feb 9 11:11:12 2009 From: varguna at gmail.com (Aytekin Vargun) Date: Mon, 9 Feb 2009 11:11:12 -0500 Subject: [vtkusers] Event Handling with SelectionChangedEvent Message-ID: Hi, I am currently having problems with my event handler and would appreciate if anybody suggests me a solution. The ProcessVertexSelection (user defined) method is activated when some selections are made (based on SelectionChangeEvent). Everything is good upto this point. Here is the code for this: edgePicked->SetCallback(network->ProcessVertexSelection); edgePicked->SetClientData((void *)static_cast(edgeLink)); selections->AddObserver(vtkCommand::SelectionChangedEvent, edgePicked); This part works and I can get the selections. Now I want to add another functionality: The user may want to delete the current selections by using key 'd' or "delete" whichever is simple to implement. I know that GetKeySym can be used to get key symbol. However, if I add the following code to activate another method to do deletions, the event handler ignores it. It never activates the method which is named as EVTDelete (in my code) where I plan to check which key is used. delPicked->SetCallback(network->EVTDelete); delPicked->SetClientData((void *)static_cast(edgeLink)); selections->AddObserver(vtkCommand::KeyPressEvent, delPicked); Why doesn't my event handler listen do the keypresses other than the default ones? Thanks a lot. Aytekin -- My web page: http://www.cs.rpi.edu/~vargua -------------- next part -------------- An HTML attachment was scrubbed... URL: From nourmestiri at yahoo.fr Mon Feb 9 11:18:31 2009 From: nourmestiri at yahoo.fr (Nour Mestiri) Date: Mon, 9 Feb 2009 16:18:31 +0000 (GMT) Subject: [vtkusers] Wrong result with VTP files Message-ID: <358559.96862.qm@web28207.mail.ukl.yahoo.com> Hi all vtk users. I have many VRML images. When i save one of those images?as a VTP file and i display it, i always have a 'blue' data (i join here the code i use) I want to know if thers is a wrong thing which gives me such output. Thank you so much ? ? vtkVRMLImporter *vrml = vtkVRMLImporter::New(); vrml->SetRenderWindow(myRenderWindow); vrml->SetFileName(fileName.wrl); vrml->Update(); myRenderWindow->Render(); ? vtkDataSet *object; vtkActorCollection *actor = Afficher->GetActors(); actor->InitTraversal(); object = actor->GetNextActor()->GetMapper()->GetInput(); ? //?Save the data as a VTP file vtkXMLPolyDataWriter *vtpObject = vtkXMLPolyDataWriter::New(); vtpObject->SetInput(object); vtpObject->SetFileName(vtpFile); vtpObject->SetDataModeToAscii(); vtpObject->Write(); vtpObject->Delete(); __________________________________________________________________________________________________ Ne pleurez pas si votre Webmail ferme ! R?cup?rez votre historique sur Yahoo! Mail ! http://fr.docs.yahoo.com/mail/transfert_mails.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.giunchi at scsolutions.it Mon Feb 9 11:43:50 2009 From: d.giunchi at scsolutions.it (Daniele Giunchi) Date: Mon, 9 Feb 2009 17:43:50 +0100 Subject: [vtkusers] vtkDataSetWriter problem Message-ID: <8d2888170902090843g10bfaf1ak91ca8a5a0734b6e9@mail.gmail.com> Hi All, I've a problem with a test I performed with vtkDataSetWriter. I create a class that have two APIs for read or write as binary input string a vtkDataset (I use vtkDataSetReader and Writer inside it), and I made a first test in which I call this class, and set the input in order to return me the string. The problem is that if I create an instance of vtkDataSetWriter inside my class, it returns me an error : vtkErrorMacro("Input for connection index " << index << " on input port index " << port << " for algorithm " << this->Algorithm->GetClassName() << "(" << this->Algorithm << ") is NULL, but a " << info->Get(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), 0) << " is required."); that is in vtkDemandDrivenPipeline.cxx If the vtkDataSetWriter is created inside my test class, it's all ok. I don't understand why there is a different behaviour. I debug the code and I discover that the problem is here: vtkObjectBase* vtkInformation::GetAsObjectBase(vtkInformationKey* key) In this function, in the erroneous case the key array and values array are different from the correct case, and also the hash index is wrong I suppose, because in the correct case I've always the same entry (10) that correspond to a polydata, while in the second case I've 19, that doesn't correspond to anything. The version I use is vtk 5.2.1. Any advice? Thank you very much best regards, Daniele ---------------------------------------- Dott. Daniele Giunchi Software Developer BioComputing Competence Centre Super Computing Solutions s.r.l. , CINECA Via Magnanelli 6/3, 40033 Casalecchio di Reno BO, Italy http://tinyurl.com/z24zv http://www.scsolutions.it mailto:d.giunchi at scsolutions.it ------------------------------------------- The information transmitted is intended for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Mon Feb 9 12:17:03 2009 From: daviddoria at gmail.com (daviddoria) Date: Mon, 9 Feb 2009 09:17:03 -0800 (PST) Subject: [vtkusers] Fill giant holes in a mesh In-Reply-To: References: Message-ID: <21917423.post@talk.nabble.com> I saw this: vtkDataSetSurfaceFilter. The description reads like it is exactly what I want. I give it a point cloud and it seems to produce exactly the same point cloud (ie no surface). This is what I tried: vtkXMLPolyDataReader* reader = vtkXMLPolyDataReader::New(); reader->SetFileName(InputFile.c_str()); reader->Update(); vtkDataSetSurfaceFilter* DSSF = vtkDataSetSurfaceFilter::New(); DSSF->SetInputConnection(reader->GetOutputPort()); //cout << DSSF->GetUseStrips() << endl; DSSF->UseStripsOn(); DSSF->Update(); vtkXMLPolyDataWriter* writer = vtkXMLPolyDataWriter::New(); writer->SetInputConnection(DSSF->GetOutputPort()); writer->SetFileName(OutputFile.c_str()); writer->Update(); -- View this message in context: http://www.nabble.com/Fill-giant-holes-in-a-mesh-tp21871947p21917423.html Sent from the VTK - Users mailing list archive at Nabble.com. From daviddoria at gmail.com Mon Feb 9 12:18:01 2009 From: daviddoria at gmail.com (daviddoria) Date: Mon, 9 Feb 2009 09:18:01 -0800 (PST) Subject: [vtkusers] Fill giant holes in a mesh In-Reply-To: References: Message-ID: <21917424.post@talk.nabble.com> I saw this: vtkDataSetSurfaceFilter. The description reads like it is exactly what I want. I give it a point cloud and it seems to produce exactly the same point cloud (ie no surface). This is what I tried: vtkXMLPolyDataReader* reader = vtkXMLPolyDataReader::New(); reader->SetFileName(InputFile.c_str()); reader->Update(); vtkDataSetSurfaceFilter* DSSF = vtkDataSetSurfaceFilter::New(); DSSF->SetInputConnection(reader->GetOutputPort()); //cout << DSSF->GetUseStrips() << endl; DSSF->UseStripsOn(); DSSF->Update(); vtkXMLPolyDataWriter* writer = vtkXMLPolyDataWriter::New(); writer->SetInputConnection(DSSF->GetOutputPort()); writer->SetFileName(OutputFile.c_str()); writer->Update(); -- View this message in context: http://www.nabble.com/Fill-giant-holes-in-a-mesh-tp21871947p21917424.html Sent from the VTK - Users mailing list archive at Nabble.com. From jiksed at yahoo.com Mon Feb 9 12:44:45 2009 From: jiksed at yahoo.com (Jim) Date: Mon, 9 Feb 2009 09:44:45 -0800 (PST) Subject: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox In-Reply-To: <8d2888170902090843g10bfaf1ak91ca8a5a0734b6e9@mail.gmail.com> Message-ID: <367585.18548.qm@web32001.mail.mud.yahoo.com> Dear vtkusers, ? I installed Qt 4.4.3? and built VTK 5.2.1 from source with Qt support in VS2008 with BUILD_SHARED_LIB=OFF. I also built and executed?those Qt examples (SimpleView and ImageViewer) successfully. However, I could not find QVTKWidget in Qt Designer/Toolbox after copying QVTKWidgetPlugin.dll and QVTKWidgetPlugin.lib to this folder: \Qt\4.4.3\plugins\designer. These two files are also very small (3 KB lib and 26 KB dll). My questions are ? 1)? Do I have to have a shared build of VTK for this to work? 2) Where to look for QVTKWidget in Qt Toolbox? What will be the name of QVTKWidget in Qt Toolbox? 3) Please let me know the right way to install QVTKWidget?into Qt Designer/Toolbox. ? Thank you. Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From luisrpp at gmail.com Mon Feb 9 13:01:46 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Mon, 9 Feb 2009 16:01:46 -0200 Subject: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox In-Reply-To: <367585.18548.qm@web32001.mail.mud.yahoo.com> References: <8d2888170902090843g10bfaf1ak91ca8a5a0734b6e9@mail.gmail.com> <367585.18548.qm@web32001.mail.mud.yahoo.com> Message-ID: Hi Jim, I'm sure this is not the right way, but it worked for me. Open in Qtdesigner the .ui file provided in one of the VTK examples and copy and paste the widget to your project. Hope this helps! Regards, Luis On Mon, Feb 9, 2009 at 3:44 PM, Jim wrote: > Dear vtkusers, > > I installed Qt 4.4.3 and built VTK 5.2.1 from source with Qt support in > VS2008 with BUILD_SHARED_LIB=OFF. I also built and executed those Qt > examples (SimpleView and ImageViewer) successfully. However, I could not > find QVTKWidget in Qt Designer/Toolbox after copying QVTKWidgetPlugin.dll > and QVTKWidgetPlugin.lib to this folder: \Qt\4.4.3\plugins\designer. These > two files are also very small (3 KB lib and 26 KB dll). My questions are > > 1) Do I have to have a shared build of VTK for this to work? > 2) Where to look for QVTKWidget in Qt Toolbox? What will be the name of > QVTKWidget in Qt Toolbox? > 3) Please let me know the right way to install QVTKWidget into Qt > Designer/Toolbox. > > Thank you. > Jim > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From clinton at elemtech.com Mon Feb 9 13:26:17 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 09 Feb 2009 11:26:17 -0700 Subject: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox In-Reply-To: <367585.18548.qm@web32001.mail.mud.yahoo.com> References: <367585.18548.qm@web32001.mail.mud.yahoo.com> Message-ID: <49907549.3070805@elemtech.com> Is this a release build? Clint Jim wrote: > Dear vtkusers, > > I installed Qt 4.4.3 and built VTK 5.2.1 from source with Qt support > in VS2008 with BUILD_SHARED_LIB=OFF. I also built and executed those > Qt examples (SimpleView and ImageViewer) successfully. However, I > could not find QVTKWidget in Qt Designer/Toolbox after copying > QVTKWidgetPlugin.dll and QVTKWidgetPlugin.lib to this folder: > \Qt\4.4.3\plugins\designer. These two files are also very small (3 KB > lib and 26 KB dll). My questions are > > 1) Do I have to have a shared build of VTK for this to work? > 2) Where to look for QVTKWidget in Qt Toolbox? What will be the name > of QVTKWidget in Qt Toolbox? > 3) Please let me know the right way to install QVTKWidget into Qt > Designer/Toolbox. > > Thank you. > Jim > > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From dcthomp at sandia.gov Mon Feb 9 13:33:35 2009 From: dcthomp at sandia.gov (David Thompson) Date: Mon, 09 Feb 2009 10:33:35 -0800 Subject: [vtkusers] vtkGenericPointIterator In-Reply-To: <49901164.8000609@tiscali.it> References: <49901164.8000609@tiscali.it> Message-ID: <1234204415.14043.524.camel@gonzo> > is someonw here skilled in vtkGenericPointIterator use? I cannot figure > out how to exactly use it... The vtkGenericPointIterator is only designed to work with the vtkGenericDataSet class. Does your dataset inherit vtkGenericDataSet? If so, call your dataset's NewPointIterator() method (or a vtkGenericAdaptorCell's GetPointIterator() method). Then call Begin(), followed by Next() until IsAtEnd() returns true. David From jiksed at yahoo.com Mon Feb 9 13:41:17 2009 From: jiksed at yahoo.com (Jim) Date: Mon, 9 Feb 2009 10:41:17 -0800 (PST) Subject: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox In-Reply-To: Message-ID: <846445.41084.qm@web32007.mail.mud.yahoo.com> Luis, ? Thank you for offering me a solution. I used to use Borland C++ Builder and could install a vtkBorlandRenderWindow component into VCL. I am sure there is a similar solution to install QVTKWidget into Qt Designer/Toolbox for easy drag and drop GUI design. ? Thank you. Jim --- On Mon, 2/9/09, Luis Roberto P. Paula wrote: From: Luis Roberto P. Paula Subject: Re: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox To: jiksed at yahoo.com Cc: vtkusers at vtk.org Date: Monday, February 9, 2009, 11:01 AM Hi Jim, I'm sure this is not the right way, but it worked for me. Open in Qtdesigner the .ui file provided in one of the VTK examples and copy and paste the widget to your project. Hope this helps! Regards, Luis On Mon, Feb 9, 2009 at 3:44 PM, Jim wrote: Dear vtkusers, ? I installed Qt 4.4.3? and built VTK 5.2.1 from source with Qt support in VS2008 with BUILD_SHARED_LIB=OFF. I also built and executed?those Qt examples (SimpleView and ImageViewer) successfully. However, I could not find QVTKWidget in Qt Designer/Toolbox after copying QVTKWidgetPlugin.dll and QVTKWidgetPlugin.lib to this folder: \Qt\4.4.3\plugins\designer. These two files are also very small (3 KB lib and 26 KB dll). My questions are ? 1)? Do I have to have a shared build of VTK for this to work? 2) Where to look for QVTKWidget in Qt Toolbox? What will be the name of QVTKWidget in Qt Toolbox? 3) Please let me know the right way to install QVTKWidget?into Qt Designer/Toolbox. ? Thank you. Jim _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From clinton at elemtech.com Mon Feb 9 13:49:04 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 9 Feb 2009 11:49:04 -0700 Subject: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox In-Reply-To: <170795.19182.qm@web32007.mail.mud.yahoo.com> References: <170795.19182.qm@web32007.mail.mud.yahoo.com> Message-ID: <55705AA8-E9D8-4574-87BF-DAF334A305A6@elemtech.com> It needs to match the build type of the designer, which is typically release. Have you tried the Help -> About Plugins dialog in the Designer to check for errors? If its not in the list, you didn't put the dll in the right place. If there is an error loading it, it gives you the error. Also, it doesn't matter if VTK is shared libs or not. Only the .dll needs to be copied to the plugins/designer directory. It shows up in the toolbox under "QVTK" Clint On Feb 9, 2009, at 11:38 AM, Jim wrote: > Yes it is a release build. Do I need a debug or release build? > > Thank you. > > --- On Mon, 2/9/09, Clinton Stimpson wrote: > From: Clinton Stimpson > Subject: Re: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox > To: jiksed at yahoo.com > Cc: vtkusers at vtk.org > Date: Monday, February 9, 2009, 11:26 AM > > Is this a release build? > Clint > > Jim wrote: > > Dear vtkusers, > > I installed Qt 4.4.3 and built VTK 5.2.1 from source with Qt > support in > VS2008 with BUILD_SHARED_LIB=OFF. I also built and executed those Qt > examples > (SimpleView and ImageViewer) successfully. However, I could not find > QVTKWidget > in Qt Designer/Toolbox after copying QVTKWidgetPlugin.dll and > QVTKWidgetPlugin.lib to this folder: \Qt\4.4.3\plugins\designer. > These two files are also very small (3 KB lib and 26 KB dll). My > questions are > > 1) Do I have to have a shared build of VTK for this to work? > > 2) Where to look for QVTKWidget in Qt Toolbox? What will be the > name of > QVTKWidget in Qt Toolbox? > > 3) Please let me know the right way to install QVTKWidget into Qt > Designer/Toolbox. > > Thank you. > > Jim > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jtgiles at gmail.com Mon Feb 9 14:54:29 2009 From: jtgiles at gmail.com (Justin Giles) Date: Mon, 9 Feb 2009 13:54:29 -0600 Subject: [vtkusers] Help with menu Message-ID: This may be the wrong place to ask this question, but here goes... I'm attempting to use KWWidgets and I am not able to see any menus at the top of my windows. I look at the screen shots of examples and they appear to have menus. None of the examples that came with the library are showing with windows either. Setup: Mac OSX, VTK with Carbon and Tcl compiled in (based off Tcl osX framework version), KWWidgets I suspect it is something to do with the fact that I have Carbon and/or using the built-in Tcl version. However, when I try to compile VTK with a X11 version of Tcl (from macports), I get a bunch of warnings when generating the Makefile about vtk*TCL trying to link to a directory instead of a library. Thoughts? Thanks, Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiksed at yahoo.com Mon Feb 9 15:43:18 2009 From: jiksed at yahoo.com (Jim) Date: Mon, 9 Feb 2009 12:43:18 -0800 (PST) Subject: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox In-Reply-To: <55705AA8-E9D8-4574-87BF-DAF334A305A6@elemtech.com> Message-ID: <505465.64190.qm@web32002.mail.mud.yahoo.com> Hi Clinton, ? Thank you for your help. I actually saw QVTKWidget in Qt Widget Box of Qt Designer, but?NOT in the Qt Toolbox of Visual Studio 2008. Do I have to reinstall Qt to add?QVTKWidget into Qt Toolbox of VS 2008? Is there any quick fix for this such as copying and pasting a few files? I tried both shared and static builds of VTK but did not make any difference. I built VTK in release mode and installed Qt release version. ? Thank you. Jim --- On Mon, 2/9/09, Clinton Stimpson wrote: From: Clinton Stimpson Subject: Re: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox To: jiksed at yahoo.com Cc: vtkusers at vtk.org Date: Monday, February 9, 2009, 11:49 AM It needs to match the build type of the designer, which is typically release. Have you tried the Help -> About Plugins dialog in the Designer to check for errors? If its not in the list, you didn't put the dll in the right place. ?If there is an error loading it, it gives you the error. Also, it doesn't matter if VTK is shared libs or not. ?Only the .dll needs to be copied to the plugins/designer directory. It shows up in the toolbox under "QVTK" Clint On Feb 9, 2009, at 11:38 AM, Jim wrote: Yes it is a release build. Do I need a debug or release build? ? Thank you. --- On Mon, 2/9/09, Clinton Stimpson wrote: From: Clinton Stimpson Subject: Re: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox To: jiksed at yahoo.com Cc: vtkusers at vtk.org Date: Monday, February 9, 2009, 11:26 AM Is this a release build? Clint Jim wrote: > Dear vtkusers, > I installed Qt 4.4.3 and built VTK 5.2.1 from source with Qt support in VS2008 with BUILD_SHARED_LIB=OFF. I also built and executed those Qt examples (SimpleView and ImageViewer) successfully. However, I could not find QVTKWidget in Qt Designer/Toolbox after copying QVTKWidgetPlugin.dll and QVTKWidgetPlugin.lib to this folder: \Qt\4.4.3\plugins\designer. These two files are also very small (3 KB lib and 26 KB dll). My questions are > 1) Do I have to have a shared build of VTK for this to work? > 2) Where to look for QVTKWidget in Qt Toolbox? What will be the name of QVTKWidget in Qt Toolbox? > 3) Please let me know the right way to install QVTKWidget into Qt Designer/Toolbox. > Thank you. > Jim > > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From clinton at elemtech.com Mon Feb 9 15:51:36 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 09 Feb 2009 13:51:36 -0700 Subject: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox In-Reply-To: <505465.64190.qm@web32002.mail.mud.yahoo.com> References: <505465.64190.qm@web32002.mail.mud.yahoo.com> Message-ID: <49909758.3060204@elemtech.com> Does this answer your question? http://lists.trolltech.com/qt-interest/2008-04/thread00068-0.html If not, you should check the qt list and post there. Clint Jim wrote: > Hi Clinton, > > Thank you for your help. I actually saw QVTKWidget in Qt Widget Box of > Qt Designer, but NOT in the Qt Toolbox of Visual Studio 2008. Do I > have to reinstall Qt to add QVTKWidget into Qt Toolbox of VS 2008? Is > there any quick fix for this such as copying and pasting a few files? > I tried both shared and static builds of VTK but did not make any > difference. I built VTK in release mode and installed Qt release version. > > > > Thank you. > > Jim > > > --- On *Mon, 2/9/09, Clinton Stimpson //* wrote: > > From: Clinton Stimpson > Subject: Re: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox > To: jiksed at yahoo.com > Cc: vtkusers at vtk.org > Date: Monday, February 9, 2009, 11:49 AM > > > It needs to match the build type of the designer, which is > typically release. > Have you tried the Help -> About Plugins dialog in the Designer to > check for errors? > If its not in the list, you didn't put the dll in the right place. > If there is an error loading it, it gives you the error. > > Also, it doesn't matter if VTK is shared libs or not. Only the > .dll needs to be copied to the plugins/designer directory. > It shows up in the toolbox under "QVTK" > > Clint > > > On Feb 9, 2009, at 11:38 AM, Jim wrote: > >> Yes it is a release build. Do I need a debug or release build? >> >> Thank you. >> >> --- On *Mon, 2/9/09, Clinton Stimpson /> >/* wrote: >> >> From: Clinton Stimpson > > >> Subject: Re: [vtkusers] Install QVTKWidget into Qt >> Designer/Toolbox >> To: jiksed at yahoo.com >> Cc: vtkusers at vtk.org >> Date: Monday, February 9, 2009, 11:26 AM >> >> Is this a release build? >> Clint >> >> Jim wrote: >> > Dear vtkusers, >> > I installed Qt 4.4.3 and built VTK 5.2.1 from source with Qt support in >> VS2008 with BUILD_SHARED_LIB=OFF. I also built and executed those Qt examples >> (SimpleView and ImageViewer) successfully. However, I could not find QVTKWidget >> in Qt Designer/Toolbox after copying QVTKWidgetPlugin.dll and >> QVTKWidgetPlugin.lib to this folder: \Qt\4.4.3\plugins\designer. >> These two files are also very small (3 KB lib and 26 KB dll). My questions are >> > 1) Do I have to have a shared build of VTK for this to work? >> > 2) Where to look for QVTKWidget in Qt Toolbox? What will be the name of >> QVTKWidget in Qt Toolbox? >> > 3) Please let me know the right way to install QVTKWidget into Qt >> Designer/Toolbox. >> > Thank you. >> > Jim >> > >> > >> > ------------------------------------------------------------------------ >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://www.vtk.org/mailman/listinfo/vtkusers >> > >> >> >> >> > > From jiksed at yahoo.com Mon Feb 9 16:46:53 2009 From: jiksed at yahoo.com (Jim) Date: Mon, 9 Feb 2009 13:46:53 -0800 (PST) Subject: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox In-Reply-To: <49909758.3060204@elemtech.com> Message-ID: <669342.68486.qm@web32002.mail.mud.yahoo.com> Clinton: Thank you for this?helpful link. Copy QVTKWidgetPlugin.dll?to the following folder solved the problem. ? C:\Program Files\Trolltech\Qt VS Integration\plugins\designer ? Now I can see QVTKWidget in both Qt Designer Widget box and VS 2008 Qt Toolbox. FYI, here is my system info: ? WinXP Pro (32 bit) VS 2008 Pro Qt 4.4.3 VTK 5.2.1 (worked for both static and dynamic builds) --- On Mon, 2/9/09, Clinton Stimpson wrote: From: Clinton Stimpson Subject: Re: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox To: jiksed at yahoo.com Cc: vtkusers at vtk.org Date: Monday, February 9, 2009, 1:51 PM Does this answer your question? http://lists.trolltech.com/qt-interest/2008-04/thread00068-0.html If not, you should check the qt list and post there. Clint Jim wrote: > Hi Clinton, > Thank you for your help. I actually saw QVTKWidget in Qt Widget Box of Qt Designer, but NOT in the Qt Toolbox of Visual Studio 2008. Do I have to reinstall Qt to add QVTKWidget into Qt Toolbox of VS 2008? Is there any quick fix for this such as copying and pasting a few files? I tried both shared and static builds of VTK but did not make any difference. I built VTK in release mode and installed Qt release version. > > > Thank you. > > Jim > > > --- On *Mon, 2/9/09, Clinton Stimpson //* wrote: > > From: Clinton Stimpson > Subject: Re: [vtkusers] Install QVTKWidget into Qt Designer/Toolbox > To: jiksed at yahoo.com > Cc: vtkusers at vtk.org > Date: Monday, February 9, 2009, 11:49 AM > > > It needs to match the build type of the designer, which is > typically release. > Have you tried the Help -> About Plugins dialog in the Designer to > check for errors? > If its not in the list, you didn't put the dll in the right place. > If there is an error loading it, it gives you the error. > > Also, it doesn't matter if VTK is shared libs or not. Only the > .dll needs to be copied to the plugins/designer directory. > It shows up in the toolbox under "QVTK" > > Clint > > > On Feb 9, 2009, at 11:38 AM, Jim wrote: > >> Yes it is a release build. Do I need a debug or release build? >> Thank you. >> >> --- On *Mon, 2/9/09, Clinton Stimpson /> >/* wrote: >> >> From: Clinton Stimpson > > >> Subject: Re: [vtkusers] Install QVTKWidget into Qt >> Designer/Toolbox >> To: jiksed at yahoo.com >> Cc: vtkusers at vtk.org >> Date: Monday, February 9, 2009, 11:26 AM >> >> Is this a release build? >> Clint >> >> Jim wrote: >> > Dear vtkusers, >> > I installed Qt 4.4.3 and built VTK 5.2.1 from source with Qt support in >> VS2008 with BUILD_SHARED_LIB=OFF. I also built and executed those Qt examples >> (SimpleView and ImageViewer) successfully. However, I could not find QVTKWidget >> in Qt Designer/Toolbox after copying QVTKWidgetPlugin.dll and >> QVTKWidgetPlugin.lib to this folder: \Qt\4.4.3\plugins\designer. >> These two files are also very small (3 KB lib and 26 KB dll). My questions are >> > 1) Do I have to have a shared build of VTK for this to work? >> > 2) Where to look for QVTKWidget in Qt Toolbox? What will be the name of >> QVTKWidget in Qt Toolbox? >> > 3) Please let me know the right way to install QVTKWidget into Qt >> Designer/Toolbox. >> > Thank you. >> > Jim >> > > > ------------------------------------------------------------------------ >> > > _______________________________________________ >> > Powered by www.kitware.com >> > > Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> > > Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> > > Follow this link to subscribe/unsubscribe: >> > http://www.vtk.org/mailman/listinfo/vtkusers >> > >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luisrpp at gmail.com Mon Feb 9 22:04:16 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Tue, 10 Feb 2009 01:04:16 -0200 Subject: [vtkusers] QVTKInteractor problem Message-ID: Hi All, Since QVTKInteractor cannot control the event loop, how do I start a second window after the click of a button and make this new window to have its own event loop? When the button is clicked, this action is performed: MyWidget* widget = new MyWidget(); widget->show(); The new window appears, but to make the interactor to work, there should be a command like: qApp->exec(); but QT does not allow me to start a new GUI event loop. Does anybody can help me? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From jordigh at gmail.com Mon Feb 9 22:17:15 2009 From: jordigh at gmail.com (=?UTF-8?Q?Jordi_Guti=C3=A9rrez_Hermoso?=) Date: Mon, 9 Feb 2009 21:17:15 -0600 Subject: [vtkusers] Changing the orientation of the Terrain interactor style Message-ID: <9543b3a40902091917l4e6bb26fs20bf19c4ca1e5073@mail.gmail.com> I want to visualise surfaces of the the form z=f(x,y), so the Terrain interactor seems to be the best suited for it. However, how can I specify what the "top" of the surface is? Right now the side ends up being the top, so it doesn't work as you would expect. Thanks, - Jordi G. H. From arturo_caissut at tiscali.it Tue Feb 10 03:13:49 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Tue, 10 Feb 2009 09:13:49 +0100 Subject: [vtkusers] vtkGenericPointIterator In-Reply-To: <1234204415.14043.524.camel@gonzo> References: <49901164.8000609@tiscali.it> <1234204415.14043.524.camel@gonzo> Message-ID: <4991373D.20100@tiscali.it> Hi, thank you for your interest, I found the error in my pipeline and it was not related to vtkGenericPointIterator as I thought. Thank you for your time, Arturo David Thompson ha scritto: >> is someonw here skilled in vtkGenericPointIterator use? I cannot figure >> out how to exactly use it... >> > The vtkGenericPointIterator is only designed to work with the > vtkGenericDataSet class. Does your dataset inherit vtkGenericDataSet? If > so, call your dataset's NewPointIterator() method (or a > vtkGenericAdaptorCell's GetPointIterator() method). Then call Begin(), > followed by Next() until IsAtEnd() returns true. > > David > > > > From arturo_caissut at tiscali.it Tue Feb 10 03:28:10 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Tue, 10 Feb 2009 09:28:10 +0100 Subject: [vtkusers] Where Do I Put c++ Examples? In-Reply-To: References: Message-ID: <49913A9A.3070104@tiscali.it> Hi David, I think you should talk about your examples to the members of the vtk developers mailing list: maybe this would lead to an inclusion of your code into vtk package as a "power up" for the already existing Examples section. By the way, I think this wouldn't resolve beginners' problem in finding (and using) them... It's not an easy problem to handle, I think: my first answer would be "Create your own vtk examples website", but this would not represent a good interaction with vtk community in my thought, also because as an user pointed in a mail some days ago there's already a problem with vtk website, that is not the first page showed when one searches for vtk classes on the Internet (another vtk related big size website would make this even better, wouldn't it?). Maybe the better way would be to ask for the inclusion of your code on the package, and to suggest developers to make clearer to find Examples on vtk directory tree. Regards, Arturo David Doria wrote: > I enjoy the VTK project, but I found it pretty tough to get the hang > of as a beginning c++ programmer. I have complied a bunch of examples > (using readers/writers, transforms, ICP, Surface reconstruction type > stuff), is there anywhere I can put them that they would be easily > found by a new VTK user? I have seen many many many questions on > message boards like "I just want an example of X in c++", and these > would be the answer! > > From imacia at vicomtech.org Tue Feb 10 03:33:38 2009 From: imacia at vicomtech.org (=?iso-8859-1?B?SXbhbiBNYWPtYQ==?=) Date: Tue, 10 Feb 2009 09:33:38 +0100 Subject: [vtkusers] Where Do I Put c++ Examples? In-Reply-To: References: Message-ID: <004901c98b5a$466dfaa0$d349efe0$@org> Hi David, There is also this page, it seems you can put your examples there. Maybe you can contact the maintainer Mark Wyszomierski http://devsample.org/ Regards Iv?n -----Mensaje original----- De: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] En nombre de David Doria Enviado el: s?bado, 07 de febrero de 2009 20:06 Para: vtkusers at vtk.org Asunto: [vtkusers] Where Do I Put c++ Examples? I enjoy the VTK project, but I found it pretty tough to get the hang of as a beginning c++ programmer. I have complied a bunch of examples (using readers/writers, transforms, ICP, Surface reconstruction type stuff), is there anywhere I can put them that they would be easily found by a new VTK user? I have seen many many many questions on message boards like "I just want an example of X in c++", and these would be the answer! -- Thanks, David _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From arturo_caissut at tiscali.it Tue Feb 10 04:21:07 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Tue, 10 Feb 2009 10:21:07 +0100 Subject: [vtkusers] [Newbie] How to open a .vtk file? In-Reply-To: <45c0a1270902070801w5fbf5f13p8b29ac9e00c1d5de@mail.gmail.com> References: <45c0a1270902070801w5fbf5f13p8b29ac9e00c1d5de@mail.gmail.com> Message-ID: <49914703.4040601@tiscali.it> Hi Irene, I suppose you're talking about writing a vtk based program. In order to read a PolyData file you should begin whit a vtkPolyDataReader object If you're working with C++ (i.e.) you should write something like #include int main (){ vtkPolyDataReader *p_reader = vtkPolyDataReader::New(); p_reader->SetFileName("PATH_TO_YOUR_FILE/yourfile.vtk"); p_reader->Update(); /*SOMETHING ELSE*/ p_reader->Delete(); } Now you can set your filter to redirect its output to a vtkPolyData object or to any other appropriated "step". If you read class references here http://www.vtk.org/doc/nightly/html/classvtkPolyDataReader-members.html you'll easily figure out how to do many interesting things, but of course for any request I'll (better say "we'll", I'm sure) be glad to help you. Have a good day, Arturo Irene Kostopoulou ha scritto: > Hello all, > > I have a polygon data .vtk file, as a result of model making (marching > cubes) of 3d slicer joint apllied to a segmentation of blood vessels > of mra images. As I'm not familiar with the vtk program nor the vtk > file format, I need some suggestions. > How can I open this vtk file and take the polygon points? I'm not > interested only in visualization of the vtk file, but I also need to > process the data in it, but unfortunately I don't even know how to > open it. I have the binary 5.2 version of vtk installed in my pc. > > > Thanks and sorry for my newbie questions. > > I appreciate any help, > Irene > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arturo_caissut at tiscali.it Tue Feb 10 06:54:03 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Tue, 10 Feb 2009 12:54:03 +0100 Subject: [vtkusers] [Newbie] How to open a .vtk file? In-Reply-To: <49914703.4040601@tiscali.it> References: <45c0a1270902070801w5fbf5f13p8b29ac9e00c1d5de@mail.gmail.com> <49914703.4040601@tiscali.it> Message-ID: <49916ADB.4060600@tiscali.it> Sorry, I forgot something: if you don't want to write any program and you prefer to use something already existing instead, let us know which kind of manipulation you need to do on your PolyData files. There are lots of programs, suites, tools, pieces of code already prepared by someone else and freely available on the Internet, so if you just need to handle some data maybe it's possible to find something for you. Regards, Arturo Arturo Caissut ha scritto: > Hi Irene, > > I suppose you're talking about writing a vtk based program. > In order to read a PolyData file you should begin whit a > vtkPolyDataReader object > > If you're working with C++ (i.e.) you should write something like > > > #include > > int main (){ > > vtkPolyDataReader *p_reader = vtkPolyDataReader::New(); > p_reader->SetFileName("PATH_TO_YOUR_FILE/yourfile.vtk"); > p_reader->Update(); > > /*SOMETHING ELSE*/ > > p_reader->Delete(); > > } > > Now you can set your filter to redirect its output to a vtkPolyData > object or to any other appropriated "step". > If you read class references here > http://www.vtk.org/doc/nightly/html/classvtkPolyDataReader-members.html > you'll easily figure out how to do many interesting things, but of > course for any request I'll (better say "we'll", I'm sure) be glad to > help you. > > > Have a good day, > Arturo > > > > > > > Irene Kostopoulou ha scritto: >> Hello all, >> >> I have a polygon data .vtk file, as a result of model making >> (marching cubes) of 3d slicer joint apllied to a segmentation of >> blood vessels of mra images. As I'm not familiar with the vtk program >> nor the vtk file format, I need some suggestions. >> How can I open this vtk file and take the polygon points? I'm not >> interested only in visualization of the vtk file, but I also need to >> process the data in it, but unfortunately I don't even know how to >> open it. I have the binary 5.2 version of vtk installed in my pc. >> >> >> Thanks and sorry for my newbie questions. >> >> I appreciate any help, >> Irene >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From arturo_caissut at tiscali.it Tue Feb 10 06:57:47 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Tue, 10 Feb 2009 12:57:47 +0100 Subject: [vtkusers] Where Do I Put c++ Examples? In-Reply-To: <004901c98b5a$466dfaa0$d349efe0$@org> References: <004901c98b5a$466dfaa0$d349efe0$@org> Message-ID: <49916BBB.1050807@tiscali.it> That seems to be very interesting, nice add to my bookmark. Thank you Iv?n. Iv?n Mac?a ha scritto: > Hi David, > > There is also this page, it seems you can put your examples there. Maybe you > can contact the maintainer Mark Wyszomierski > http://devsample.org/ > > Regards > > Iv?n > > > -----Mensaje original----- > De: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] En nombre de > David Doria > Enviado el: s?bado, 07 de febrero de 2009 20:06 > Para: vtkusers at vtk.org > Asunto: [vtkusers] Where Do I Put c++ Examples? > > I enjoy the VTK project, but I found it pretty tough to get the hang > of as a beginning c++ programmer. I have complied a bunch of examples > (using readers/writers, transforms, ICP, Surface reconstruction type > stuff), is there anywhere I can put them that they would be easily > found by a new VTK user? I have seen many many many questions on > message boards like "I just want an example of X in c++", and these > would be the answer! > > From jeff.baumes at kitware.com Tue Feb 10 08:38:04 2009 From: jeff.baumes at kitware.com (Jeff Baumes) Date: Tue, 10 Feb 2009 08:38:04 -0500 Subject: [vtkusers] Event Handling with SelectionChangedEvent In-Reply-To: References: Message-ID: <2137e33e0902100538k3f7c45e6q49ea9645edd94aba@mail.gmail.com> Hi Aytekin, Based on previous emails, I believe your "selections" object is a vtkDataRepresentation, which does not emit any key press events (or mouse events). These events are emitted by the interactor style. So you'd do something like win->GetInteractor()->GetInteractorStyle()->AddObserver(vtkCommand::KeyPressEvent, callback); where "win" is your vtkRenderWindow instance. This should be done after the SetupRenderWindow call. Jeff On Mon, Feb 9, 2009 at 11:11 AM, Aytekin Vargun wrote: > Hi, > I am currently having problems with my event handler and would appreciate if > anybody suggests me a solution. > > The ProcessVertexSelection (user defined) method is activated when some > selections are made (based on SelectionChangeEvent). Everything is good upto > this point. Here is the code for this: > > edgePicked->SetCallback(network->ProcessVertexSelection); > edgePicked->SetClientData((void *)static_cast(edgeLink)); > selections->AddObserver(vtkCommand::SelectionChangedEvent, edgePicked); > > This part works and I can get the selections. Now I want to add another > functionality: The user may want to delete the current selections by using > key 'd' or "delete" whichever is simple to implement. I know that GetKeySym > can be used to get key symbol. However, if I add the following code to > activate another method to do deletions, the event handler ignores it. It > never activates the method which is named as EVTDelete (in my code) where I > plan to check which key is used. > > delPicked->SetCallback(network->EVTDelete); > delPicked->SetClientData((void *)static_cast(edgeLink)); > selections->AddObserver(vtkCommand::KeyPressEvent, delPicked); > > Why doesn't my event handler listen do the keypresses other than the default > ones? > Thanks a lot. > Aytekin > > -- > My web page: http://www.cs.rpi.edu/~vargua > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Jeff Baumes, Ph.D. R&D Engineer, Kitware Inc. (518) 371-3971 x132 jeff.baumes at kitware.com From luniya at nanotechsys.com Tue Feb 10 09:02:25 2009 From: luniya at nanotechsys.com (Suneet Luniya) Date: Tue, 10 Feb 2009 09:02:25 -0500 Subject: [vtkusers] Where Do I Put c++ Examples? In-Reply-To: <49916BBB.1050807@tiscali.it> References: <004901c98b5a$466dfaa0$d349efe0$@org> <49916BBB.1050807@tiscali.it> Message-ID: <00965941B13C4D0BBD7869A365B34D8E@nanotechnology.local> Check with the author of this blog. This is also a good collection of VTK samples and tips and tricks http://vtkblog.blogspot.com/ HTH -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Arturo Caissut Sent: Tuesday, February 10, 2009 6:58 AM To: vtkusers at vtk.org Subject: Re: [vtkusers] Where Do I Put c++ Examples? That seems to be very interesting, nice add to my bookmark. Thank you Iv?n. Iv?n Mac?a ha scritto: > Hi David, > > There is also this page, it seems you can put your examples there. Maybe you > can contact the maintainer Mark Wyszomierski > http://devsample.org/ > > Regards > > Iv?n > > > -----Mensaje original----- > De: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] En nombre de > David Doria > Enviado el: s?bado, 07 de febrero de 2009 20:06 > Para: vtkusers at vtk.org > Asunto: [vtkusers] Where Do I Put c++ Examples? > > I enjoy the VTK project, but I found it pretty tough to get the hang > of as a beginning c++ programmer. I have complied a bunch of examples > (using readers/writers, transforms, ICP, Surface reconstruction type > stuff), is there anywhere I can put them that they would be easily > found by a new VTK user? I have seen many many many questions on > message boards like "I just want an example of X in c++", and these > would be the answer! > > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From luisrpp at gmail.com Tue Feb 10 09:10:04 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Tue, 10 Feb 2009 12:10:04 -0200 Subject: [vtkusers] QVTKInteractor problem In-Reply-To: References: Message-ID: I have set the second window as a Dialog window and open it as modal. For some reason, the callback for this new window are not being observed. On Tue, Feb 10, 2009 at 1:04 AM, Luis Roberto P. Paula wrote: > Hi All, > > Since QVTKInteractor cannot control the event loop, how do I start a second > window after the click of a button and make this new window to have its own > event loop? > > When the button is clicked, this action is performed: > > MyWidget* widget = new MyWidget(); > widget->show(); > > The new window appears, but to make the interactor to work, there should be > a command like: > > qApp->exec(); > > but QT does not allow me to start a new GUI event loop. > > Does anybody can help me? > > Thanks, > Luis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amylists at gmail.com Tue Feb 10 09:42:47 2009 From: amylists at gmail.com (Amy Squillacote) Date: Tue, 10 Feb 2009 08:42:47 -0600 Subject: [vtkusers] vtkDataSetWriter problem In-Reply-To: <8d2888170902090843g10bfaf1ak91ca8a5a0734b6e9@mail.gmail.com> References: <8d2888170902090843g10bfaf1ak91ca8a5a0734b6e9@mail.gmail.com> Message-ID: <3b626dd90902100642h6626125r9661607ec373b3c1@mail.gmail.com> Hi Daniele, This error means that you are calling Write() or Update() on the vtkDataSetWriter without setting an input to it (i.e., without giving it a dataset to write). - Amy On Mon, Feb 9, 2009 at 10:43 AM, Daniele Giunchi wrote: > Hi All, > I've a problem with a test I performed with vtkDataSetWriter. I create a > class that have two APIs for read or write as binary input string a > vtkDataset (I use vtkDataSetReader and Writer inside it), and I made a > first test in which I call this class, and set the input in order to return > me the string. > The problem is that if I create an instance of vtkDataSetWriter inside my > class, it returns me an error : > > vtkErrorMacro("Input for connection index " << index > << " on input port index " << port > << " for algorithm " << this->Algorithm->GetClassName() > << "(" << this->Algorithm << ") is NULL, but a " > << info->Get(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), > 0) > << " is required."); > > that is in vtkDemandDrivenPipeline.cxx > If the vtkDataSetWriter is created inside my test class, it's all ok. I > don't understand why there is a different behaviour. > I debug the code and I discover that the problem is here: > > vtkObjectBase* vtkInformation::GetAsObjectBase(vtkInformationKey* key) > > In this function, in the erroneous case the key array and values array are > different from the correct case, and also the hash index > is wrong I suppose, because in the correct case I've always the same entry > (10) that correspond to a polydata, while in the second > case I've 19, that doesn't correspond to anything. > > The version I use is vtk 5.2.1. > > Any advice? > Thank you very much > best regards, > > Daniele > > > ---------------------------------------- > Dott. Daniele Giunchi > Software Developer > BioComputing Competence Centre > Super Computing Solutions s.r.l. , CINECA > Via Magnanelli 6/3, 40033 Casalecchio di Reno BO, Italy > http://tinyurl.com/z24zv > http://www.scsolutions.it > mailto:d.giunchi at scsolutions.it > ------------------------------------------- > > The information transmitted is intended for the person or entity to which > it is addressed and may contain confidential and/or privileged material. Any > review, retransmission, dissemination or other use of, or taking of any > action in reliance upon, this information by persons or entities other than > the intended recipient is prohibited. If you received this in error, please > contact the sender and delete the material from any computer. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From edsb at hotmail.it Tue Feb 10 10:06:56 2009 From: edsb at hotmail.it (EDSB EDSB) Date: Tue, 10 Feb 2009 16:06:56 +0100 Subject: [vtkusers] pixel cordinates Message-ID: Hello all, I have a binary volume image (that is available both in dicom and in metaimage format)where there are some non-zero pixel representing a line in the 3D space. I need their cordinates (to put as input in a vtkPoints class) in order to interpolate them by a spline. I have no idea how to achieve this goal. I try to use vtkThresholdTextureCoords but I was not able to extract the infomation I need. could anyone give me some suggestion? Thanks in advance and sorry for my beginner question. I appreciate any help, Mary _________________________________________________________________ 25 GB di spazio online per archiviare i tuoi file. Gratis! http://www.messenger.it/skydrive.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Tue Feb 10 10:36:28 2009 From: daviddoria at gmail.com (David Doria) Date: Tue, 10 Feb 2009 10:36:28 -0500 Subject: [vtkusers] Using an octree Message-ID: If I include #include I get a whole bunch of these errors. /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: error: expected type-specifier before 'vtkstd' /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: error: expected '>' before 'vtkstd' /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: error: ISO C++ forbids declaration of 'octree_node' with no type /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: error: expected ';' before '<' token Any reason why I can't use the octree class? -- Thanks, David From hobbsk at ohiou.edu Tue Feb 10 10:26:56 2009 From: hobbsk at ohiou.edu (Kevin H. Hobbs) Date: Tue, 10 Feb 2009 10:26:56 -0500 Subject: [vtkusers] Volume rendering anomalies (looks like a bug) In-Reply-To: <49903388.6050602@science.uva.nl> References: <49903388.6050602@science.uva.nl> Message-ID: <49919CC0.1000607@ohiou.edu> Paul Melis wrote: > The vtk file renders correctly in Paraview 3.4.0 and I have no volume > rendering problems with vtk on other datasets. Use vtkVolumeRayCastMapper::SetSampleDistance( double ) It took me forever to realize I needed to use this. I set it to the pixel diagonal or smaller, if I can wait that long for my output. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature URL: From david.cole at kitware.com Tue Feb 10 11:43:23 2009 From: david.cole at kitware.com (David Cole) Date: Tue, 10 Feb 2009 11:43:23 -0500 Subject: [vtkusers] Using an octree In-Reply-To: References: Message-ID: No technical reason. (But as a best-practice convention, it's good not to depend on the API of a VTK Utilities library remaining constant from release to release. These classes are typically used exclusively within VTK *.cxx files and not included by any VTK header files.) In the VTK source tree, the only files that presently include (note: there is no .h at the end) are Rendering/vtkLabelHierarchy.cxx and Rendering/vtkLabelHierarchyPrivate.h. If a file is include only by a VTK .cxx file or a header file clearly labelled "private" then it's probably best not to rely on it from release to release. Perhaps you should just remove the ".h" and try again.... HTH, David On Tue, Feb 10, 2009 at 10:36 AM, David Doria wrote: > If I include > #include > > I get a whole bunch of these errors. > > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: error: > expected type-specifier before 'vtkstd' > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: error: > expected '>' before 'vtkstd' > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: error: > ISO C++ forbids declaration of 'octree_node' with no type > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: error: > expected ';' before '<' token > > Any reason why I can't use the octree class? > > -- > Thanks, > > David > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcthomp at sandia.gov Tue Feb 10 12:16:04 2009 From: dcthomp at sandia.gov (David Thompson) Date: Tue, 10 Feb 2009 09:16:04 -0800 Subject: [vtkusers] Using an octree In-Reply-To: References: Message-ID: <1234286164.3796.36.camel@gonzo> > If I include > #include > > I get a whole bunch of these errors. You need to include vtkObjectBase.h before octree/octree.h so that vtkstd will be defined (or #define vtkstd std). David > > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: error: > expected type-specifier before 'vtkstd' > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: error: > expected '>' before 'vtkstd' > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: error: > ISO C++ forbids declaration of 'octree_node' with no type > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: error: > expected ';' before '<' token > > Any reason why I can't use the octree class? > From dcthomp at sandia.gov Tue Feb 10 12:21:40 2009 From: dcthomp at sandia.gov (David Thompson) Date: Tue, 10 Feb 2009 09:21:40 -0800 Subject: [vtkusers] Using an octree In-Reply-To: References: Message-ID: <1234286500.3796.41.camel@gonzo> I should add that VTK provides the vtkHyperOctree class (see http://www.vtk.org/doc/nightly/html/classvtkHyperOctree.html ) which provides a similar type of storage. The difference is that the octree templates in the Utilities directory allow an arbitrary structure to be stored at every node instead of the usual scalar/vector data. David > No technical reason. (But as a best-practice convention, it's good > not to depend on the API of a VTK Utilities library remaining constant > from release to release. These classes are typically used exclusively > within VTK *.cxx files and not included by any VTK header files.) > > > In the VTK source tree, the only files that presently include > (note: there is no .h at the end) > are Rendering/vtkLabelHierarchy.cxx > and Rendering/vtkLabelHierarchyPrivate.h. If a file is include only by > a VTK .cxx file or a header file clearly labelled "private" then it's > probably best not to rely on it from release to release. > > > > Perhaps you should just remove the ".h" and try again.... > > > > > HTH, > David > > > On Tue, Feb 10, 2009 at 10:36 AM, David Doria > wrote: > If I include > #include > > I get a whole bunch of these errors. > > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: > error: > expected type-specifier before 'vtkstd' > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: > error: > expected '>' before 'vtkstd' > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: > error: > ISO C++ forbids declaration of 'octree_node' with no type > /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: > error: > expected ';' before '<' token > > Any reason why I can't use the octree class? > > -- > Thanks, > > David > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > From francois.bertel at kitware.com Tue Feb 10 12:27:30 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Tue, 10 Feb 2009 12:27:30 -0500 Subject: [vtkusers] Using an octree In-Reply-To: <1234286500.3796.41.camel@gonzo> References: <1234286500.3796.41.camel@gonzo> Message-ID: Also, if you are looking for an octree as a spatial search object, don't use vtkHyperOctree, it's a dataset, use vtkCellLocator instead. On Tue, Feb 10, 2009 at 12:21 PM, David Thompson wrote: > I should add that VTK provides the vtkHyperOctree class (see > http://www.vtk.org/doc/nightly/html/classvtkHyperOctree.html ) which > provides a similar type of storage. The difference is that the octree > templates in the Utilities directory allow an arbitrary structure to be > stored at every node instead of the usual scalar/vector data. > > David > >> No technical reason. (But as a best-practice convention, it's good >> not to depend on the API of a VTK Utilities library remaining constant >> from release to release. These classes are typically used exclusively >> within VTK *.cxx files and not included by any VTK header files.) >> >> >> In the VTK source tree, the only files that presently include >> (note: there is no .h at the end) >> are Rendering/vtkLabelHierarchy.cxx >> and Rendering/vtkLabelHierarchyPrivate.h. If a file is include only by >> a VTK .cxx file or a header file clearly labelled "private" then it's >> probably best not to rely on it from release to release. >> >> >> >> Perhaps you should just remove the ".h" and try again.... >> >> >> >> >> HTH, >> David >> >> >> On Tue, Feb 10, 2009 at 10:36 AM, David Doria >> wrote: >> If I include >> #include >> >> I get a whole bunch of these errors. >> >> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: >> error: >> expected type-specifier before 'vtkstd' >> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: >> error: >> expected '>' before 'vtkstd' >> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: >> error: >> ISO C++ forbids declaration of 'octree_node' with no type >> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: >> error: >> expected ';' before '<' token >> >> Any reason why I can't use the octree class? >> >> -- >> Thanks, >> >> David >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From daviddoria at gmail.com Tue Feb 10 12:29:50 2009 From: daviddoria at gmail.com (David Doria) Date: Tue, 10 Feb 2009 12:29:50 -0500 Subject: [vtkusers] Using an octree In-Reply-To: References: <1234286500.3796.41.camel@gonzo> Message-ID: What I'm trying to do is find all the points in a dataset that are within some epsilon of a line. Is this a good data structure for this problem? Dave On Tue, Feb 10, 2009 at 12:27 PM, Francois Bertel wrote: > Also, if you are looking for an octree as a spatial search object, > don't use vtkHyperOctree, it's a dataset, use vtkCellLocator instead. > > On Tue, Feb 10, 2009 at 12:21 PM, David Thompson wrote: >> I should add that VTK provides the vtkHyperOctree class (see >> http://www.vtk.org/doc/nightly/html/classvtkHyperOctree.html ) which >> provides a similar type of storage. The difference is that the octree >> templates in the Utilities directory allow an arbitrary structure to be >> stored at every node instead of the usual scalar/vector data. >> >> David >> >>> No technical reason. (But as a best-practice convention, it's good >>> not to depend on the API of a VTK Utilities library remaining constant >>> from release to release. These classes are typically used exclusively >>> within VTK *.cxx files and not included by any VTK header files.) >>> >>> >>> In the VTK source tree, the only files that presently include >>> (note: there is no .h at the end) >>> are Rendering/vtkLabelHierarchy.cxx >>> and Rendering/vtkLabelHierarchyPrivate.h. If a file is include only by >>> a VTK .cxx file or a header file clearly labelled "private" then it's >>> probably best not to rely on it from release to release. >>> >>> >>> >>> Perhaps you should just remove the ".h" and try again.... >>> >>> >>> >>> >>> HTH, >>> David >>> >>> >>> On Tue, Feb 10, 2009 at 10:36 AM, David Doria >>> wrote: >>> If I include >>> #include >>> >>> I get a whole bunch of these errors. >>> >>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: >>> error: >>> expected type-specifier before 'vtkstd' >>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: >>> error: >>> expected '>' before 'vtkstd' >>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: >>> error: >>> ISO C++ forbids declaration of 'octree_node' with no type >>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: >>> error: >>> expected ';' before '<' token >>> >>> Any reason why I can't use the octree class? >>> >>> -- >>> Thanks, >>> >>> David >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > > > -- > Fran?ois Bertel, PhD | Kitware Inc. Suite 204 > 1 (518) 371 3971 x113 | 28 Corporate Drive > | Clifton Park NY 12065, USA > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Thanks, David From francois.bertel at kitware.com Tue Feb 10 12:38:39 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Tue, 10 Feb 2009 12:38:39 -0500 Subject: [vtkusers] Using an octree In-Reply-To: References: <1234286500.3796.41.camel@gonzo> Message-ID: Probably pick one of the subclasses of vtkLocator then: http://www.vtk.org/doc/nightly/html/classvtkLocator.html Most of them have methods to query the points closest to a given position and a radius. I didn't find anything for a line. One of the subclasses of vtkLocator (vtkKdTree) has a method FindPointsInArea that might be closer to what you are looking for. http://www.vtk.org/doc/nightly/html/classvtkKdTree.html On Tue, Feb 10, 2009 at 12:29 PM, David Doria wrote: > What I'm trying to do is find all the points in a dataset that are > within some epsilon of a line. Is this a good data structure for this > problem? > > Dave > > On Tue, Feb 10, 2009 at 12:27 PM, Francois Bertel > wrote: >> Also, if you are looking for an octree as a spatial search object, >> don't use vtkHyperOctree, it's a dataset, use vtkCellLocator instead. >> >> On Tue, Feb 10, 2009 at 12:21 PM, David Thompson wrote: >>> I should add that VTK provides the vtkHyperOctree class (see >>> http://www.vtk.org/doc/nightly/html/classvtkHyperOctree.html ) which >>> provides a similar type of storage. The difference is that the octree >>> templates in the Utilities directory allow an arbitrary structure to be >>> stored at every node instead of the usual scalar/vector data. >>> >>> David >>> >>>> No technical reason. (But as a best-practice convention, it's good >>>> not to depend on the API of a VTK Utilities library remaining constant >>>> from release to release. These classes are typically used exclusively >>>> within VTK *.cxx files and not included by any VTK header files.) >>>> >>>> >>>> In the VTK source tree, the only files that presently include >>>> (note: there is no .h at the end) >>>> are Rendering/vtkLabelHierarchy.cxx >>>> and Rendering/vtkLabelHierarchyPrivate.h. If a file is include only by >>>> a VTK .cxx file or a header file clearly labelled "private" then it's >>>> probably best not to rely on it from release to release. >>>> >>>> >>>> >>>> Perhaps you should just remove the ".h" and try again.... >>>> >>>> >>>> >>>> >>>> HTH, >>>> David >>>> >>>> >>>> On Tue, Feb 10, 2009 at 10:36 AM, David Doria >>>> wrote: >>>> If I include >>>> #include >>>> >>>> I get a whole bunch of these errors. >>>> >>>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: >>>> error: >>>> expected type-specifier before 'vtkstd' >>>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: >>>> error: >>>> expected '>' before 'vtkstd' >>>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: >>>> error: >>>> ISO C++ forbids declaration of 'octree_node' with no type >>>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: >>>> error: >>>> expected ';' before '<' token >>>> >>>> Any reason why I can't use the octree class? >>>> >>>> -- >>>> Thanks, >>>> >>>> David >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://www.vtk.org/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> Fran?ois Bertel, PhD | Kitware Inc. Suite 204 >> 1 (518) 371 3971 x113 | 28 Corporate Drive >> | Clifton Park NY 12065, USA >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > > > -- > Thanks, > > David > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From daviddoria at gmail.com Tue Feb 10 12:40:46 2009 From: daviddoria at gmail.com (David Doria) Date: Tue, 10 Feb 2009 12:40:46 -0500 Subject: [vtkusers] Registration code example In-Reply-To: <511361.77136.qm@web28206.mail.ukl.yahoo.com> References: <511361.77136.qm@web28206.mail.ukl.yahoo.com> Message-ID: I think you just need to call Update() ... reca->SetMaximumNumberOfIterations(50); reca->Modified(); reca->Update(); vtkTransformPolyDataFilter *treca = vtkTransformPolyDataFilter ::New(); ... On Fri, Jan 30, 2009 at 6:55 AM, Nour Mestiri wrote: > Hi all vtk users. > I have a code sample whish is supposed to do the registration of 2 objects > and display the result. > When i run it, i have only the second object chosen which is displayed.. > Can you tell me where exactly is the default in this code? > Thank you sooo much > > > vtkXMLPolyDataReader *object1 = vtkXMLPolyDataReader::New(); > object1->SetFileName(File1); > object1->Update(); > > vtkXMLPolyDataReader *object2 = vtkXMLPolyDataReader::New(); > object2->SetFileName(File2); > objetc2->Update(); > > //Registration > vtkIterativeClosestPointTransform *reca = > vtkIterativeClosestPointTransform::New(); > reca->SetSource(object1->GetOutput()); > reca->SetTarget(object2->GetOutput()); > reca->SetMaximumNumberOfIterations(50); > > vtkTransformPolyDataFilter *treca = vtkTransformPolyDataFilter ::New(); > treca->SetInput(object1->GetOutput()); > treca->SetTransform(reca); > > > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Thanks, David From daviddoria at gmail.com Tue Feb 10 13:30:44 2009 From: daviddoria at gmail.com (David Doria) Date: Tue, 10 Feb 2009 13:30:44 -0500 Subject: [vtkusers] Create Cells from Points Message-ID: If I create points one at a time, I have to add them to a CellArray one at a time too, like this vtkPoints* points3D = vtkPoints::New(); vtkCellArray* Vertices = vtkCellArray::New(); for ( unsigned int i = 0; i < NumPoints(); ++i ) { vtkIdType pid[1]; vgl_point_3d Point = getPoint(i); pid[0] = points3D->InsertNextPoint(Point.x(), Point.y(), Point.z()); Vertices->InsertNextCell(1,pid); } Is there a better way to do this? Also, what is the idea of having to use cells for everything rather than operating on the array of points directly? -- Thanks, David From daviddoria at gmail.com Tue Feb 10 13:34:26 2009 From: daviddoria at gmail.com (David Doria) Date: Tue, 10 Feb 2009 13:34:26 -0500 Subject: [vtkusers] KdTree Problem - must build locator first Message-ID: I am trying to put points into a KdTree... ------------------------------ vtkSmartPointer Points3d = vtkSmartPointer::New(); vtkSmartPointer polydata = vtkSmartPointer::New(); vtkSmartPointer Vertices = vtkSmartPointer::New(); vtkIdType pid[1]; for(int i = 0; i < Model.NumPoints(); i++) { vgl_point_3d Point = Model.getPoint(i); pid[0] = Points3d->InsertNextPoint(Point.x(), Point.y(), Point.z()); Vertices->InsertNextCell(1,pid); } polydata->SetPoints(Points3d); polydata->SetVerts(Vertices); vtkSmartPointer PointTree = vtkSmartPointer::New(); PointTree->SetDataSet(polydata); double TestPoint[3] = {1,2,3}; vtkSmartPointer Result = vtkSmartPointer::New(); PointTree->BuildLocator(); int N = 5; PointTree->FindClosestNPoints(N, TestPoint, Result); ------------------------------ But I get this error: vtkKdTree (0x9f38408): vtkKdTree::FindClosestNPoints - must build locator first As you can see I have called BuildLocator prior to calling FindClosestNPoints. What else is wrong? -- Thanks, David From hobbsk at ohiou.edu Tue Feb 10 13:41:50 2009 From: hobbsk at ohiou.edu (Kevin H. Hobbs) Date: Tue, 10 Feb 2009 13:41:50 -0500 Subject: [vtkusers] KdTree Problem - must build locator first In-Reply-To: References: Message-ID: <4991CA6E.2050706@ohiou.edu> David Doria wrote: > > PointTree->BuildLocator(); > > > > As you can see I have called BuildLocator prior to calling > FindClosestNPoints. What else is wrong? > Use BuildLocatorFromPoints ( vtkPointSet * /pointset/ ) if you want to use points and not cells. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature URL: From daviddoria at gmail.com Tue Feb 10 13:48:30 2009 From: daviddoria at gmail.com (David Doria) Date: Tue, 10 Feb 2009 13:48:30 -0500 Subject: [vtkusers] KdTree Problem - must build locator first In-Reply-To: <4991CA6E.2050706@ohiou.edu> References: <4991CA6E.2050706@ohiou.edu> Message-ID: That worked, thanks. But why didn't it work the first way I did it? On Tue, Feb 10, 2009 at 1:41 PM, Kevin H. Hobbs wrote: > David Doria wrote: >> >> >> PointTree->BuildLocator(); >> >> >> >> As you can see I have called BuildLocator prior to calling >> FindClosestNPoints. What else is wrong? >> > > Use BuildLocatorFromPoints ( vtkPointSet > * /pointset/ ) > if you want to use points and not cells. > > > > -- Thanks, David From hobbsk at ohiou.edu Tue Feb 10 14:14:19 2009 From: hobbsk at ohiou.edu (Kevin H. Hobbs) Date: Tue, 10 Feb 2009 14:14:19 -0500 Subject: [vtkusers] KdTree Problem - must build locator first In-Reply-To: References: <4991CA6E.2050706@ohiou.edu> Message-ID: <4991D20B.3080800@ohiou.edu> David Doria wrote: > That worked, thanks. But why didn't it work the first way I did it? > > Oh I see, you were adding vertex cells. I don't know why it didn't work. So the question becomes: does vtkKdTree work as a cell locator for all types of cells? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature URL: From daviddoria at gmail.com Tue Feb 10 19:04:18 2009 From: daviddoria at gmail.com (David Doria) Date: Tue, 10 Feb 2009 19:04:18 -0500 Subject: [vtkusers] Using an octree In-Reply-To: References: <1234286500.3796.41.camel@gonzo> Message-ID: Yea the FindPoitnsInArea in vtkKdTree is getting close... it seems to require a rectangular, axis aligned volume to search though. Is there a way to search, say, an arbitrarily oriented cylinder (ie a "fat" line")? Dave On Tue, Feb 10, 2009 at 12:38 PM, Francois Bertel wrote: > Probably pick one of the subclasses of vtkLocator then: > > http://www.vtk.org/doc/nightly/html/classvtkLocator.html > > Most of them have methods to query the points closest to a given > position and a radius. I didn't find anything for a line. > > One of the subclasses of vtkLocator (vtkKdTree) has a method > FindPointsInArea that might be closer to what you are looking for. > > http://www.vtk.org/doc/nightly/html/classvtkKdTree.html > > > On Tue, Feb 10, 2009 at 12:29 PM, David Doria wrote: >> What I'm trying to do is find all the points in a dataset that are >> within some epsilon of a line. Is this a good data structure for this >> problem? >> >> Dave >> >> On Tue, Feb 10, 2009 at 12:27 PM, Francois Bertel >> wrote: >>> Also, if you are looking for an octree as a spatial search object, >>> don't use vtkHyperOctree, it's a dataset, use vtkCellLocator instead. >>> >>> On Tue, Feb 10, 2009 at 12:21 PM, David Thompson wrote: >>>> I should add that VTK provides the vtkHyperOctree class (see >>>> http://www.vtk.org/doc/nightly/html/classvtkHyperOctree.html ) which >>>> provides a similar type of storage. The difference is that the octree >>>> templates in the Utilities directory allow an arbitrary structure to be >>>> stored at every node instead of the usual scalar/vector data. >>>> >>>> David >>>> >>>>> No technical reason. (But as a best-practice convention, it's good >>>>> not to depend on the API of a VTK Utilities library remaining constant >>>>> from release to release. These classes are typically used exclusively >>>>> within VTK *.cxx files and not included by any VTK header files.) >>>>> >>>>> >>>>> In the VTK source tree, the only files that presently include >>>>> (note: there is no .h at the end) >>>>> are Rendering/vtkLabelHierarchy.cxx >>>>> and Rendering/vtkLabelHierarchyPrivate.h. If a file is include only by >>>>> a VTK .cxx file or a header file clearly labelled "private" then it's >>>>> probably best not to rely on it from release to release. >>>>> >>>>> >>>>> >>>>> Perhaps you should just remove the ".h" and try again.... >>>>> >>>>> >>>>> >>>>> >>>>> HTH, >>>>> David >>>>> >>>>> >>>>> On Tue, Feb 10, 2009 at 10:36 AM, David Doria >>>>> wrote: >>>>> If I include >>>>> #include >>>>> >>>>> I get a whole bunch of these errors. >>>>> >>>>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: >>>>> error: >>>>> expected type-specifier before 'vtkstd' >>>>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9: >>>>> error: >>>>> expected '>' before 'vtkstd' >>>>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: >>>>> error: >>>>> ISO C++ forbids declaration of 'octree_node' with no type >>>>> /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23: >>>>> error: >>>>> expected ';' before '<' token >>>>> >>>>> Any reason why I can't use the octree class? >>>>> >>>>> -- >>>>> Thanks, >>>>> >>>>> David >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://www.vtk.org/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://www.vtk.org/mailman/listinfo/vtkusers >>>> >>> >>> >>> >>> -- >>> Fran?ois Bertel, PhD | Kitware Inc. Suite 204 >>> 1 (518) 371 3971 x113 | 28 Corporate Drive >>> | Clifton Park NY 12065, USA >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> Thanks, >> >> David >> > > > > -- > Fran?ois Bertel, PhD | Kitware Inc. Suite 204 > 1 (518) 371 3971 x113 | 28 Corporate Drive > | Clifton Park NY 12065, USA > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Thanks, David From clinton at elemtech.com Tue Feb 10 23:15:46 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Tue, 10 Feb 2009 21:15:46 -0700 Subject: [vtkusers] QVTKInteractor problem In-Reply-To: References: Message-ID: <499250F2.6050109@elemtech.com> So which callbacks aren't working? I don't see how trying to make another event loop would solve a callback problem. If its a dialog, why not call exec() on it instead of show() ? exec() will create a temporary local event loop (see QEventLoop). Also, each thread can only have one event loop active at a time, and all Qt widgets are on the same thread. Clint Luis Roberto P. Paula wrote: > I have set the second window as a Dialog window and open it as modal. > For some reason, the callback for this new window are not being observed. > > On Tue, Feb 10, 2009 at 1:04 AM, Luis Roberto P. Paula > > wrote: > > Hi All, > > Since QVTKInteractor cannot control the event loop, how do I start > a second window after the click of a button and make this new > window to have its own event loop? > > When the button is clicked, this action is performed: > > MyWidget* widget = new MyWidget(); > widget->show(); > > The new window appears, but to make the interactor to work, there > should be a command like: > > qApp->exec(); > > but QT does not allow me to start a new GUI event loop. > > Does anybody can help me? > > Thanks, > Luis > > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From luisrpp at gmail.com Tue Feb 10 23:55:46 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Wed, 11 Feb 2009 02:55:46 -0200 Subject: [vtkusers] QVTKInteractor problem In-Reply-To: <499250F2.6050109@elemtech.com> References: <499250F2.6050109@elemtech.com> Message-ID: Hi Clint, In the main window of my application I have a QVTKWidget. I have set some callbacks to detect mouse events and in this window everything is working fine. Then I tried to open a second window (QDialog for example) by clicking on a button of the main window. In this second window I have also a QVTKWidget object. I'm displaying an 2D image on it with the vtkImageViewer2 and the zoom control with the mouse wheel is working fine (default action). The problem is with the callback that I have created. In the constructor of my QDialog class it is set like this: vtkImageInteractionCallback* callback = vtkImageInteractionCallback::New(); imageStyle->AddObserver(vtkCommand::MouseMoveEvent, callback); imageStyle->AddObserver(vtkCommand::LeftButtonPressEvent, callback); imageStyle->AddObserver(vtkCommand::LeftButtonReleaseEvent, callback); vtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(imageStyle); None of this events are being captured. I thought it could be something wrong in the code, but when I tried to load this second window as the main window, everything worked. int main(int argc, char *argv[]) { QApplication app(argc, argv); /*MyGui* mainWindow = new MyGui; mainWindow->show();*/ MyDialog* dialog = new MyDialog; // HERE IT WORKS, BUT THE DIALOG SHOULD BE PART OF THE MAIN WINDOW. dialog>show(); return app.exec(); } Do you know why this is happening? Thanks, Luis On Wed, Feb 11, 2009 at 2:15 AM, Clinton Stimpson wrote: > > So which callbacks aren't working? I don't see how trying to make another > event loop would solve a callback problem. > If its a dialog, why not call exec() on it instead of show() ? exec() will > create a temporary local event loop (see QEventLoop). > Also, each thread can only have one event loop active at a time, and all Qt > widgets are on the same thread. > > Clint > > Luis Roberto P. Paula wrote: > >> I have set the second window as a Dialog window and open it as modal. For >> some reason, the callback for this new window are not being observed. >> >> On Tue, Feb 10, 2009 at 1:04 AM, Luis Roberto P. Paula > luisrpp at gmail.com>> wrote: >> >> Hi All, >> >> Since QVTKInteractor cannot control the event loop, how do I start >> a second window after the click of a button and make this new >> window to have its own event loop? >> >> When the button is clicked, this action is performed: >> >> MyWidget* widget = new MyWidget(); >> widget->show(); >> >> The new window appears, but to make the interactor to work, there >> should be a command like: >> >> qApp->exec(); >> >> but QT does not allow me to start a new GUI event loop. >> >> Does anybody can help me? >> >> Thanks, >> Luis >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luisrpp at gmail.com Wed Feb 11 00:12:44 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Wed, 11 Feb 2009 03:12:44 -0200 Subject: [vtkusers] QVTKInteractor problem In-Reply-To: References: <499250F2.6050109@elemtech.com> Message-ID: I was hoping that calling the Start method of the interactor would help, but in the source file of the QVTKInteractor I found this: 00267 // Description: 00268 // Overloaded start method does nothing. 00269 // Use qApp->exec() instead. That is why I think it only works in the main function. I can not call the qApp->exec in the constructor of my Dialog class. Luis On Wed, Feb 11, 2009 at 2:55 AM, Luis Roberto P. Paula wrote: > Hi Clint, > > In the main window of my application I have a QVTKWidget. I have set some > callbacks to detect mouse events and in this window everything is working > fine. > > Then I tried to open a second window (QDialog for example) by clicking on a > button of the main window. In this second window I have also a QVTKWidget > object. I'm displaying an 2D image on it with the vtkImageViewer2 and the > zoom control with the mouse wheel is working fine (default action). The > problem is with the callback that I have created. In the constructor of my > QDialog class it is set like this: > > vtkImageInteractionCallback* callback = > vtkImageInteractionCallback::New(); > imageStyle->AddObserver(vtkCommand::MouseMoveEvent, callback); > imageStyle->AddObserver(vtkCommand::LeftButtonPressEvent, callback); > imageStyle->AddObserver(vtkCommand::LeftButtonReleaseEvent, callback); > > > vtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(imageStyle); > > None of this events are being captured. > > I thought it could be something wrong in the code, but when I tried to load > this second window as the main window, everything worked. > > int main(int argc, char *argv[]) > { > QApplication app(argc, argv); > > /*MyGui* mainWindow = new MyGui; > mainWindow->show();*/ > > MyDialog* dialog = new MyDialog; // HERE IT WORKS, BUT THE DIALOG > SHOULD BE PART OF THE MAIN WINDOW. > dialog>show(); > > return app.exec(); > } > > Do you know why this is happening? > > Thanks, > Luis > > > On Wed, Feb 11, 2009 at 2:15 AM, Clinton Stimpson wrote: > >> >> So which callbacks aren't working? I don't see how trying to make another >> event loop would solve a callback problem. >> If its a dialog, why not call exec() on it instead of show() ? exec() >> will create a temporary local event loop (see QEventLoop). >> Also, each thread can only have one event loop active at a time, and all >> Qt widgets are on the same thread. >> >> Clint >> >> Luis Roberto P. Paula wrote: >> >>> I have set the second window as a Dialog window and open it as modal. For >>> some reason, the callback for this new window are not being observed. >>> >>> On Tue, Feb 10, 2009 at 1:04 AM, Luis Roberto P. Paula < >>> luisrpp at gmail.com > wrote: >>> >>> Hi All, >>> >>> Since QVTKInteractor cannot control the event loop, how do I start >>> a second window after the click of a button and make this new >>> window to have its own event loop? >>> >>> When the button is clicked, this action is performed: >>> >>> MyWidget* widget = new MyWidget(); >>> widget->show(); >>> >>> The new window appears, but to make the interactor to work, there >>> should be a command like: >>> >>> qApp->exec(); >>> >>> but QT does not allow me to start a new GUI event loop. >>> >>> Does anybody can help me? >>> >>> Thanks, >>> Luis >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >>> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ssshayagriva at gmail.com Wed Feb 11 01:57:58 2009 From: ssshayagriva at gmail.com (Madhu Saravana Sibi Govindan) Date: Wed, 11 Feb 2009 00:57:58 -0600 Subject: [vtkusers] Volume Rendering Message-ID: <513a5e60902102257u7c314528l6dbad611cc6d4d11@mail.gmail.com> Dear All, My name is Sibi Govindan and I'm a Phd student at the University of Texas at Austin. For a parallel systems course at UT, we are trying to design a programming assignment with Volume Rendering. In this assignment, the task of the students will be to parallelize volume rendering code. Specifically, they'll be using the ray tracing algorithms presented in Marc Levoy's classic paper. For this assignment, we are in need of a simple, sequential implementation of volume rendering (in c or c++), which I can use as a starting point for creating the assignment framework. The idea is that I'll strip off the rendering code from the sequential implementation and provide the framework to students, who will parallelize the algorithm using pthreads or MPI. I was searching for various implementations of Volume Rendering, and I hit upon VTK. I would be very thankful if you could answer these questions for me: 1) We need to run this framework on the Linux/Unit platform. Skimming through the VTK pages, it looks like VTK should build and run on Linux. Is this right? 2) Does VTK need any graphics card support via OpenGL? Or is it purely based on C++ and other languages/libraries? 3) Would it be easy for me to string off the rendering code from VTK and provide VTK as a framework to the students? (easy == complete within 5 or 6 days ) Your time and reply are much appreciated - in advance. Thanks, G.Sibi From pierre.juillard at gmail.com Wed Feb 11 05:49:22 2009 From: pierre.juillard at gmail.com (Pierre JUILLARD) Date: Wed, 11 Feb 2009 11:49:22 +0100 Subject: [vtkusers] any help to understand the normalized shape index definition? Message-ID: Dear all, Does anyone have some knowledge about the meaning of the normalized shape index, which can be computed thanks to the class: http://www.vtk.org/doc/nightly/html/classvtkMassProperties.html using vtkMassProperties::GetNormalizedShapeIndex ( ) I would like to know if there is some documentation on this function, maybe a little bit more detailed than the doxygen one. I thank you in advance for your help. Regards, Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: From edsb at hotmail.it Wed Feb 11 09:24:25 2009 From: edsb at hotmail.it (EDSB EDSB) Date: Wed, 11 Feb 2009 15:24:25 +0100 Subject: [vtkusers] help please!!!!!get coordinates Message-ID: Hello all, I apologize for annoying you again with my question but I need some help. How can I extract the 3D coordinates of some non-zero voxel in a binary metaimage? I 'm sorry for my insistence, but I couldn't find any example on this topic. Thanks a lot for your help! Mary _________________________________________________________________ 25 GB di spazio online per archiviare i tuoi file. Gratis! http://www.messenger.it/skydrive.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: From eugen.wintersberger at jku.at Wed Feb 11 09:33:43 2009 From: eugen.wintersberger at jku.at (Eugen Wintersberger) Date: Wed, 11 Feb 2009 15:33:43 +0100 Subject: [vtkusers] unstructured grid to rectilinear grid Message-ID: <1234362823.17853.4.camel@wheeler.hlphys.uni-linz.ac.at> Hi there I have a stupid problem. I need to extract data from an unstructured grid (from FEM calculations) on coordinates on a rectilinear grid. Is there a filter for this purpose or a simple procedure how to do this? Thanks in advance. regards Eugen -- -------------------------------------------- | | | Dipl. Ing. Eugen Wintersberger | | Department of semicondutor physics | | University of Linz | | Altenbergerstrasse 69 | | A-4040 Linz | | Austria | | | | Mobile.: +43 664 3112861 | | Tel.: +43 732 2468 9605 | | E-Mail.: eugen.wintersberger at jku.at | | Skype: eugen20056221 | | ICQ: 214418739, nickname: thot | | | -------------------------------------------- From emonson at cs.duke.edu Wed Feb 11 10:00:57 2009 From: emonson at cs.duke.edu (Eric E. Monson) Date: Wed, 11 Feb 2009 10:00:57 -0500 Subject: [vtkusers] unstructured grid to rectilinear grid In-Reply-To: <1234362823.17853.4.camel@wheeler.hlphys.uni-linz.ac.at> References: <1234362823.17853.4.camel@wheeler.hlphys.uni-linz.ac.at> Message-ID: Hello Eugen, It sounds like you should be able to use the vtkProbeFilter: http://www.vtk.org/doc/nightly/html/classvtkProbeFilter.html Which can take in your Unstructured Grid (as "input") and probe it at the points of an ImageData (as "source"). Sorry I don't have a simple example handy, but there are some linked from the Doxygen page. -Eric ------------------------------------------------------ Eric E Monson Duke Visualization Technology Group On Feb 11, 2009, at 9:33 AM, Eugen Wintersberger wrote: > Hi there > I have a stupid problem. I need to extract data from an unstructured > grid (from FEM calculations) on coordinates on a rectilinear grid. Is > there a filter for this purpose or a simple procedure how to do this? > Thanks in advance. > > regards > Eugen > -- > -------------------------------------------- > | | > | Dipl. Ing. Eugen Wintersberger | > | Department of semicondutor physics | > | University of Linz | > | Altenbergerstrasse 69 | > | A-4040 Linz | > | Austria | > | | > | Mobile.: +43 664 3112861 | > | Tel.: +43 732 2468 9605 | > | E-Mail.: eugen.wintersberger at jku.at | > | Skype: eugen20056221 | > | ICQ: 214418739, nickname: thot | > | | > -------------------------------------------- > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From clinton at elemtech.com Wed Feb 11 10:51:49 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Wed, 11 Feb 2009 08:51:49 -0700 Subject: [vtkusers] QVTKInteractor problem In-Reply-To: References: <499250F2.6050109@elemtech.com> Message-ID: <4992F415.30304@elemtech.com> From what you've given, I can't tell what your problem is. Forget the second event loop idea, its impossible and wouldn't solve anything. You've already got one running, and that's good enough. How about using a debugger and following where the execution goes from QVTKWidget::mousePressEvent. Clint Luis Roberto P. Paula wrote: > Hi Clint, > > In the main window of my application I have a QVTKWidget. I have set > some callbacks to detect mouse events and in this window everything is > working fine. > > Then I tried to open a second window (QDialog for example) by clicking > on a button of the main window. In this second window I have also a > QVTKWidget object. I'm displaying an 2D image on it with the > vtkImageViewer2 and the zoom control with the mouse wheel is working > fine (default action). The problem is with the callback that I have > created. In the constructor of my QDialog class it is set like this: > > vtkImageInteractionCallback* callback = > vtkImageInteractionCallback::New(); > imageStyle->AddObserver(vtkCommand::MouseMoveEvent, callback); > imageStyle->AddObserver(vtkCommand::LeftButtonPressEvent, callback); > imageStyle->AddObserver(vtkCommand::LeftButtonReleaseEvent, callback); > > > vtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(imageStyle); > > None of this events are being captured. > > I thought it could be something wrong in the code, but when I tried to > load this second window as the main window, everything worked. > > int main(int argc, char *argv[]) > { > QApplication app(argc, argv); > > /*MyGui* mainWindow = new MyGui; > mainWindow->show();*/ > > MyDialog* dialog = new MyDialog; // HERE IT WORKS, BUT THE > DIALOG SHOULD BE PART OF THE MAIN WINDOW. > dialog>show(); > > return app.exec(); > } > > Do you know why this is happening? > > Thanks, > Luis > > On Wed, Feb 11, 2009 at 2:15 AM, Clinton Stimpson > > wrote: > > > So which callbacks aren't working? I don't see how trying to make > another event loop would solve a callback problem. > If its a dialog, why not call exec() on it instead of show() ? > exec() will create a temporary local event loop (see QEventLoop). > Also, each thread can only have one event loop active at a time, > and all Qt widgets are on the same thread. > > Clint > > Luis Roberto P. Paula wrote: > > I have set the second window as a Dialog window and open it as > modal. For some reason, the callback for this new window are > not being observed. > > On Tue, Feb 10, 2009 at 1:04 AM, Luis Roberto P. Paula > > >> wrote: > > Hi All, > > Since QVTKInteractor cannot control the event loop, how do > I start > a second window after the click of a button and make this new > window to have its own event loop? > > When the button is clicked, this action is performed: > > MyWidget* widget = new MyWidget(); > widget->show(); > > The new window appears, but to make the interactor to work, > there > should be a command like: > > qApp->exec(); > > but QT does not allow me to start a new GUI event loop. > > Does anybody can help me? > > Thanks, > Luis > > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > From clinton at elemtech.com Wed Feb 11 11:01:38 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Wed, 11 Feb 2009 09:01:38 -0700 Subject: [vtkusers] QVTKInteractor problem In-Reply-To: <4992F415.30304@elemtech.com> References: <499250F2.6050109@elemtech.com> <4992F415.30304@elemtech.com> Message-ID: <4992F662.1050500@elemtech.com> Are you showing this dialog on another thread? Clint Clinton Stimpson wrote: > > From what you've given, I can't tell what your problem is. Forget the > second event loop idea, its impossible and wouldn't solve anything. > You've already got one running, and that's good enough. > How about using a debugger and following where the execution goes from > QVTKWidget::mousePressEvent. > > Clint > > Luis Roberto P. Paula wrote: >> Hi Clint, >> >> In the main window of my application I have a QVTKWidget. I have set >> some callbacks to detect mouse events and in this window everything >> is working fine. >> >> Then I tried to open a second window (QDialog for example) by >> clicking on a button of the main window. In this second window I have >> also a QVTKWidget object. I'm displaying an 2D image on it with the >> vtkImageViewer2 and the zoom control with the mouse wheel is working >> fine (default action). The problem is with the callback that I have >> created. In the constructor of my QDialog class it is set like this: >> >> vtkImageInteractionCallback* callback = >> vtkImageInteractionCallback::New(); >> imageStyle->AddObserver(vtkCommand::MouseMoveEvent, callback); >> imageStyle->AddObserver(vtkCommand::LeftButtonPressEvent, callback); >> imageStyle->AddObserver(vtkCommand::LeftButtonReleaseEvent, >> callback); >> >> >> vtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(imageStyle); >> >> >> None of this events are being captured. >> >> I thought it could be something wrong in the code, but when I tried >> to load this second window as the main window, everything worked. >> >> int main(int argc, char *argv[]) >> { >> QApplication app(argc, argv); >> >> /*MyGui* mainWindow = new MyGui; >> mainWindow->show();*/ >> >> MyDialog* dialog = new MyDialog; // HERE IT WORKS, BUT THE >> DIALOG SHOULD BE PART OF THE MAIN WINDOW. >> dialog>show(); >> >> return app.exec(); >> } >> >> Do you know why this is happening? >> >> Thanks, >> Luis >> >> On Wed, Feb 11, 2009 at 2:15 AM, Clinton Stimpson >> > wrote: >> >> >> So which callbacks aren't working? I don't see how trying to make >> another event loop would solve a callback problem. >> If its a dialog, why not call exec() on it instead of show() ? >> exec() will create a temporary local event loop (see QEventLoop). >> Also, each thread can only have one event loop active at a time, >> and all Qt widgets are on the same thread. >> >> Clint >> >> Luis Roberto P. Paula wrote: >> >> I have set the second window as a Dialog window and open it as >> modal. For some reason, the callback for this new window are >> not being observed. >> >> On Tue, Feb 10, 2009 at 1:04 AM, Luis Roberto P. Paula >> >> >> wrote: >> >> Hi All, >> >> Since QVTKInteractor cannot control the event loop, how do >> I start >> a second window after the click of a button and make this new >> window to have its own event loop? >> >> When the button is clicked, this action is performed: >> >> MyWidget* widget = new MyWidget(); >> widget->show(); >> >> The new window appears, but to make the interactor to work, >> there >> should be a command like: >> >> qApp->exec(); >> >> but QT does not allow me to start a new GUI event loop. >> >> Does anybody can help me? >> >> Thanks, >> Luis >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> >> >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From gordon.stevenson at lmh.ox.ac.uk Wed Feb 11 10:59:05 2009 From: gordon.stevenson at lmh.ox.ac.uk (Gordon Stevenson) Date: Wed, 11 Feb 2009 15:59:05 +0000 Subject: [vtkusers] help please!!!!!get coordinates In-Reply-To: References: Message-ID: Have you tried Mark Wyszomierski's example code on picking co-ordinates from a 2d image view? Sure you could maybe use the basis to get it working with voxels in a binary meta image.. http://devsample.org/index.php?option=com_content&task=view&id=48&Itemid=27 On Wed, Feb 11, 2009 at 2:24 PM, EDSB EDSB wrote: > Hello all, > I apologize for annoying you again with my question but I need some help. > How can I extract the 3D coordinates of some non-zero voxel in a binary metaimage? > I 'm sorry for my insistence, but I couldn't find any example on this topic. > Thanks a lot for your help! > > Mary > > > ------------------------------ > Scopri le novit?! La tua vita, i tuoi interessi, tutto insieme su Windows > Live. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luisrpp at gmail.com Wed Feb 11 11:27:28 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Wed, 11 Feb 2009 14:27:28 -0200 Subject: [vtkusers] VTKPointPicker getting negative values for y-axis Message-ID: Hi All, I'm using the VTKPointPicker to get the coords of the mouse over a widget displaying a vtkImageData object. To display this image, I'm using the vtkImageViewer2. The coords are get correctly when I use a blank image like this: vtlImageData* image = vtlImageData::New(); image->SetSize(200, 200); image->AllocateScalars(); image->Update(); When I use an image that was extracted from a 3D volume, the x-axis is correct, but the y-axis is getting negative values. Does anybody knows why this is happening? Is it an orientation problem? How can I fix that? This is the code to get the coords: if (!picker->Pick(this->Interactor->GetEventPosition()[0], this->Interactor->GetEventPosition()[1], 0, viewer->GetRenderer())) { return; } double ptMapped[3]; picker->GetMapperPosition(ptMapped); double dSpacing[3]; viewer->GetInput()->GetSpacing(dSpacing); ptMapped[2] = viewer->GetSlice() * dSpacing[2]; // Update Image vtkImageData* image = vtkImageData::New(); image->DeepCopy(this->editorGui->getImageMarker()); int nVolIdx = viewer->GetInput()->FindPoint(ptMapped); unsigned short* pPix = (unsigned short*)viewer->GetInput()->GetScalarPointer(); int usPix = (int)pPix[nVolIdx]; printf("Coords: x %f y %f\n", ptMapped[0], ptMapped[1]); Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From luisrpp at gmail.com Wed Feb 11 12:12:01 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Wed, 11 Feb 2009 15:12:01 -0200 Subject: [vtkusers] QVTKInteractor problem In-Reply-To: <4992F662.1050500@elemtech.com> References: <499250F2.6050109@elemtech.com> <4992F415.30304@elemtech.com> <4992F662.1050500@elemtech.com> Message-ID: Hi Clint, It is working now. I just added this at the end of the constructor: QDialog::exec(); I was calling exec outside the class and It wasn't the exec implemented by QDialog. Thanks for your help! Luis On Wed, Feb 11, 2009 at 2:01 PM, Clinton Stimpson wrote: > > Are you showing this dialog on another thread? > > Clint > > Clinton Stimpson wrote: > >> >> From what you've given, I can't tell what your problem is. Forget the >> second event loop idea, its impossible and wouldn't solve anything. You've >> already got one running, and that's good enough. >> How about using a debugger and following where the execution goes from >> QVTKWidget::mousePressEvent. >> >> Clint >> >> Luis Roberto P. Paula wrote: >> >>> Hi Clint, >>> >>> In the main window of my application I have a QVTKWidget. I have set some >>> callbacks to detect mouse events and in this window everything is working >>> fine. >>> >>> Then I tried to open a second window (QDialog for example) by clicking on >>> a button of the main window. In this second window I have also a QVTKWidget >>> object. I'm displaying an 2D image on it with the vtkImageViewer2 and the >>> zoom control with the mouse wheel is working fine (default action). The >>> problem is with the callback that I have created. In the constructor of my >>> QDialog class it is set like this: >>> >>> vtkImageInteractionCallback* callback = >>> vtkImageInteractionCallback::New(); >>> imageStyle->AddObserver(vtkCommand::MouseMoveEvent, callback); >>> imageStyle->AddObserver(vtkCommand::LeftButtonPressEvent, callback); >>> imageStyle->AddObserver(vtkCommand::LeftButtonReleaseEvent, callback); >>> >>> >>> vtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(imageStyle); >>> >>> >>> None of this events are being captured. >>> >>> I thought it could be something wrong in the code, but when I tried to >>> load this second window as the main window, everything worked. >>> >>> int main(int argc, char *argv[]) >>> { >>> QApplication app(argc, argv); >>> >>> /*MyGui* mainWindow = new MyGui; >>> mainWindow->show();*/ >>> >>> MyDialog* dialog = new MyDialog; // HERE IT WORKS, BUT THE DIALOG >>> SHOULD BE PART OF THE MAIN WINDOW. >>> dialog>show(); >>> >>> return app.exec(); >>> } >>> >>> Do you know why this is happening? >>> >>> Thanks, >>> Luis >>> >>> On Wed, Feb 11, 2009 at 2:15 AM, Clinton Stimpson >> clinton at elemtech.com>> wrote: >>> >>> >>> So which callbacks aren't working? I don't see how trying to make >>> another event loop would solve a callback problem. >>> If its a dialog, why not call exec() on it instead of show() ? >>> exec() will create a temporary local event loop (see QEventLoop). >>> Also, each thread can only have one event loop active at a time, >>> and all Qt widgets are on the same thread. >>> >>> Clint >>> >>> Luis Roberto P. Paula wrote: >>> >>> I have set the second window as a Dialog window and open it as >>> modal. For some reason, the callback for this new window are >>> not being observed. >>> >>> On Tue, Feb 10, 2009 at 1:04 AM, Luis Roberto P. Paula >>> >>> >> wrote: >>> >>> Hi All, >>> >>> Since QVTKInteractor cannot control the event loop, how do >>> I start >>> a second window after the click of a button and make this new >>> window to have its own event loop? >>> >>> When the button is clicked, this action is performed: >>> >>> MyWidget* widget = new MyWidget(); >>> widget->show(); >>> >>> The new window appears, but to make the interactor to work, >>> there >>> should be a command like: >>> >>> qApp->exec(); >>> >>> but QT does not allow me to start a new GUI event loop. >>> >>> Does anybody can help me? >>> >>> Thanks, >>> Luis >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >>> >>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Wed Feb 11 15:33:40 2009 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Wed, 11 Feb 2009 15:33:40 -0500 (EST) Subject: [vtkusers] Crashed on vtkDataArray::SetName(...) Message-ID: Can anyone tell me what's wrong with the following code section: // allocate the new scalars vtkDataArray* scalars = vtkDataArray::CreateDataArray(dataType); scalars->SetNumberOfComponents(numComponents); // allocate enough memory scalars->SetNumberOfTuples(numTuples); scalars->SetName("first"); I got "Segmentation fault" when it executes scalars->SetName("first"). dataType is VTK_FLOAT, numComponents = 1, numTuples = 6000000. Thanks. Weiguang From guanw at rhpcs.mcmaster.ca Wed Feb 11 15:45:26 2009 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Wed, 11 Feb 2009 15:45:26 -0500 (EST) Subject: [vtkusers] Crashed on vtkDataArray::SetName(...) In-Reply-To: References: Message-ID: I used vtk 5.0.4. I've found that in vtkDataArray.h virtual void SetNumberOfTuples (vtkIdType number)=0 But this pure virtual function is never defined in vtkFloatArray.h. How could that be possbile!!! Why doesn't c++ compiler complain about this? I'm confused! Weiguang On Wed, 11 Feb 2009, Weiguang Guan wrote: > Can anyone tell me what's wrong with the following code section: > > // allocate the new scalars > vtkDataArray* scalars = vtkDataArray::CreateDataArray(dataType); > scalars->SetNumberOfComponents(numComponents); > > // allocate enough memory > scalars->SetNumberOfTuples(numTuples); > scalars->SetName("first"); > > I got "Segmentation fault" when it executes scalars->SetName("first"). > dataType is VTK_FLOAT, numComponents = 1, numTuples = 6000000. > > Thanks. > > Weiguang > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From arturo_caissut at tiscali.it Wed Feb 11 18:46:46 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Thu, 12 Feb 2009 00:46:46 +0100 Subject: [vtkusers] Suggestions on extracting certain pixels by color In-Reply-To: References: <4970E67F.8040508@tiscali.it> Message-ID: <49936366.3040200@tiscali.it> Hi, I thought about a different method, and I'd like to know what do you think about it: as I say my aim is to get areas of pixel colored with a certain RGB value from a vtkImage. What about vtkExtractComponents to obtain three different images (one for each component) and then three vtkImageThreshold? Something like: | threshold0->SetInput($FIRST_COMPONENT); ||threshold0->ThresholdBetween(rgb[0], rgb[0]); threshold1->SetInput($SECOND_COMPONENT); ||threshold1->ThresholdBetween(rgb[1], rgb[1]); threshold2->SetInputConnection($THIRD_COMPONENT);| |threshold2->ThresholdBetween(rgb[2], rgb[2]);| Then I could "merge" the three threshold filters' output with a kind of "double &&" operation on their pixels, I think. Do you see any weak points in such an approach? Arturo Francois Bertel wrote: > First the first part, If your OpenGL colorbuffer comes from a > vtkRenderWindow, use GetPixelData() or GetRGBAPixelData() methods of > this class instead. They actually use glReadPixels(). > > http://www.vtk.org/doc/nightly/html/classvtkRenderWindow.html > > > On Fri, Jan 16, 2009 at 2:56 PM, Arturo Caissut > wrote: > >> Hi everyone, >> >> I need to extract a certain region from an OpenGL buffer of pixels. As >> certain people suggests on the Internet, first of all I used OpenGL's >> glReadPixels function to copy all of the interesting area's pixels to a >> buffer, and then I used vtkImageImport. Now I'd like to separate all the red >> pixels (by "red" I mean their RGB value to be 1, 0, 0) and put them on some >> vtkObject (later I'll have to get contour of the red area of the image I'm >> working on). >> How can I separate red pixels from the rest of the buffer? >> Have I got to use something similar to a threshold filter? >> Perhaps there is some vtkImageImport method to do that from the beginning of >> my vtk pipeline? >> >> Thank you, best regards >> >> Arturo Caissut >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > > > > From sercanimailgroups at gmail.com Wed Feb 11 19:18:49 2009 From: sercanimailgroups at gmail.com (Sercani) Date: Thu, 12 Feb 2009 02:18:49 +0200 Subject: [vtkusers] help please!!!!!get coordinates In-Reply-To: References: Message-ID: <011e01c98ca7$7c199c10$744cd430$@com> Here is a sample that gets mouse position on a volume (or another imagedata prop) and gets the world and structured coordinates. vtkPointPicker picker = new vtkPointPicker(); picker.Pick(mouseX,mouseY, 0, renderer); double[] pos = new double[3]; pos = picker.GetMapperPosition(); int volIndex = imageData.FindPoint(pos); //voxel Id double[] worldPos = new double[3]; worldPos = imageData.GetPoint(volIndex); //world coordinates of the voxel int ijk[] = new int[3]; double pcoords[] = new double[3]; imageData.ComputeStructuredCoordinates(pos, ijk, pcoords); //ijk is structured coordinates of the voxel Yours sincerely, Sercani... From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of EDSB EDSB Sent: Wednesday, February 11, 2009 4:24 PM To: vtk mailing list Subject: [vtkusers] help please!!!!!get coordinates Hello all, I apologize for annoying you again with my question but I need some help. How can I extract the 3D coordinates of some non-zero voxel in a binary metaimage? I 'm sorry for my insistence, but I couldn't find any example on this topic. Thanks a lot for your help! Mary _____ Scopri le novit?! La tua vita, i tuoi interessi, tutto insieme su Windows Live. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Feb 12 01:07:31 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 12 Feb 2009 01:07:31 -0500 Subject: [vtkusers] Create Cells from Points In-Reply-To: References: Message-ID: On Tue, Feb 10, 2009 at 1:30 PM, David Doria wrote: > If I create points one at a time, I have to add them to a CellArray > one at a time too, like this > > vtkPoints* points3D = vtkPoints::New(); > vtkCellArray* Vertices = vtkCellArray::New(); > > for ( unsigned int i = 0; i < NumPoints(); ++i ) > { > vtkIdType pid[1]; > vgl_point_3d Point = getPoint(i); > pid[0] = points3D->InsertNextPoint(Point.x(), Point.y(), Point.z()); > Vertices->InsertNextCell(1,pid); > } > > Is there a better way to do this? You can apply a glyph filter with a single cell glyph. But that internally will do the above. Also, what is the idea of having to > use cells for everything rather than operating on the array of points > directly? True it is odd to have to create cells when you are working with pure point location data, but in the majoritiy of cases people deal with higher dimensional cells. Because of that you don't want to assume that all points are cells. Otherwise defining a triangle would implicitly define 4 cells instead of one. > > > -- > Thanks, > > David > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From leser21 at gmail.com Thu Feb 12 03:01:16 2009 From: leser21 at gmail.com (Renan Leser) Date: Thu, 12 Feb 2009 06:01:16 -0200 Subject: [vtkusers] Program to write .VTK Message-ID: <704f8f370902120001x4447490bh4c76839de5dd8bce@mail.gmail.com> Hello everybody, I'm searching for a program to write some .DAT files in .VTK format. These .DATs contains grid structure, scalars and vectors. I'm writing them * manually* in .VTK, like these: # vtk DataFile Version 3.0 vtk output ASCII DATASET STRUCTURED_POINTS *DIMENSIONS 387 312 1 * SPACING 1 1 1 ORIGIN 0 0 0 *POINT_DATA 120744 * SCALARS batimetria float *LOOKUP_TABLE default 0.0000000e+000 0.0000000e+000 0.0000000e+000 0.0000000e+000 0.0000000e+000... 0.0000000e+000 0.0000000e+000 0.0000000e+000 0.0000000e+000 0.0000000e+000...* ... The DAT files holds the grid, then I spent lots of time copying and pasting the grid form .DAT to *LOOKUP_TABLE default*, and writing the *dimensions and point data*. Since I'm working with large time data-steps files, I would like to known if anybody use or recommend a program to speed up this process. Thanks a lot, Renan. -- Renan Leser de Medeiros Laboratory of Computational Methods in Engineering Federal University of Rio de Janeiro - COPPE P.O.Box 68552 - ZIP 21949-900 Rio de Janeiro, RJ, Brasil -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Thu Feb 12 08:39:30 2009 From: berk.geveci at kitware.com (Berk Geveci) Date: Thu, 12 Feb 2009 08:39:30 -0500 Subject: [vtkusers] Program to write .VTK In-Reply-To: <704f8f370902120001x4447490bh4c76839de5dd8bce@mail.gmail.com> References: <704f8f370902120001x4447490bh4c76839de5dd8bce@mail.gmail.com> Message-ID: <45d654b0902120539n38261bf7m5a9cf5813d675608@mail.gmail.com> Can you describe in detail what the .dat format looks like? -berk On Thu, Feb 12, 2009 at 3:01 AM, Renan Leser wrote: > Hello everybody, > > I'm searching for a program to write some .DAT files in .VTK format. > > These .DATs contains grid structure, scalars and vectors. I'm writing them > manually in .VTK, like these: > > # vtk DataFile Version 3.0 > vtk output > ASCII > DATASET STRUCTURED_POINTS > DIMENSIONS 387 312 1 > SPACING 1 1 1 > ORIGIN 0 0 0 > POINT_DATA 120744 > SCALARS batimetria float > LOOKUP_TABLE default > 0.0000000e+000 0.0000000e+000 0.0000000e+000 0.0000000e+000 > 0.0000000e+000... > 0.0000000e+000 0.0000000e+000 0.0000000e+000 0.0000000e+000 > 0.0000000e+000... > ... > > > The DAT files holds the grid, then I spent lots of time copying and pasting > the grid form .DAT to LOOKUP_TABLE default, and writing the dimensions and > point data. > > Since I'm working with large time data-steps files, I would like to known if > anybody use or recommend a program to speed up this process. > > Thanks a lot, > > Renan. > > > > -- > Renan Leser de Medeiros > Laboratory of Computational Methods in Engineering > Federal University of Rio de Janeiro - COPPE > P.O.Box 68552 - ZIP 21949-900 > Rio de Janeiro, RJ, Brasil > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > From ilferraresebono at hotmail.it Thu Feb 12 10:15:37 2009 From: ilferraresebono at hotmail.it (Giancarlo Amati) Date: Thu, 12 Feb 2009 16:15:37 +0100 Subject: [vtkusers] bump mapping Message-ID: Hello everybody, HOw's it possible to make a bump mapping with VTK? Kind Regards. Giancarlo _________________________________________________________________ Party? con Eventi! http://events.live.com/?showunauth=1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilferraresebono at hotmail.it Thu Feb 12 11:06:31 2009 From: ilferraresebono at hotmail.it (Giancarlo Amati) Date: Thu, 12 Feb 2009 17:06:31 +0100 Subject: [vtkusers] vtkEdge missing files: vtkFrameObject.h vtkTextureObject.h.... In-Reply-To: References: Message-ID: Good afternoon everybody, I've downloaded the vtkedge suite and I'm compiling it. Now for some of the classes I'm getting back an error saying that some .h files are not found: vtkFrameObject.h, vtkTextureObject.h and vtkShaderProgram2.h now...where are they? i've searched in the VTK 5.2 sources unseccessfully. Can anybody illuminate me? Many thanks Giancarlo Scopri le novit? di Spaces! Blog, foto, amici? e molto altro! _________________________________________________________________ Quali sono le pi? cliccate della settimana? http://livesearch.it.msn.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.bertel at kitware.com Thu Feb 12 11:10:29 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Thu, 12 Feb 2009 11:10:29 -0500 Subject: [vtkusers] vtkEdge missing files: vtkFrameObject.h vtkTextureObject.h.... In-Reply-To: References: Message-ID: Hello, VTKEdge svn compiles against VTK CVS. Please, read the VTKEdge FAQ: http://vtkedge.org/Wiki/VTKEdge:FAQ Also, this is the wrong mailing list to post this kind of questions. VTKEdge has its own mailing list: http://vtkedge.org/vtkedge/help/mailing.html Regards. On Thu, Feb 12, 2009 at 11:06 AM, Giancarlo Amati wrote: > Good afternoon everybody, > > I've downloaded the vtkedge suite and I'm compiling it. > Now for some of the classes I'm getting back an error saying that some .h > files are not found: > > vtkFrameObject.h, vtkTextureObject.h and vtkShaderProgram2.h > > now...where are they? i've searched in the VTK 5.2 sources unseccessfully. > > Can anybody illuminate me? > > Many thanks > Giancarlo > > ________________________________ > Scopri le novit? di Spaces! Blog, foto, amici? e molto altro! > ________________________________ > Scoprilo insieme ai nuovi servizi Windows Live! Messenger 9: oltre le > parole. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From leser21 at gmail.com Thu Feb 12 11:36:50 2009 From: leser21 at gmail.com (Renan Leser) Date: Thu, 12 Feb 2009 13:36:50 -0300 Subject: [vtkusers] Fwd: Program to write .VTK In-Reply-To: <704f8f370902120828g21cb616bqc3670cac3da82de3@mail.gmail.com> References: <704f8f370902120001x4447490bh4c76839de5dd8bce@mail.gmail.com> <45d654b0902120539n38261bf7m5a9cf5813d675608@mail.gmail.com> <704f8f370902120828g21cb616bqc3670cac3da82de3@mail.gmail.com> Message-ID: <704f8f370902120836u1f32849bw9fb931449bf27271@mail.gmail.com> Sending the message without the attached files... ---------- Forwarded message ---------- From: Renan Leser Date: 2009/2/12 Subject: Re: [vtkusers] Program to write .VTK To: Renato Elias Cc: Berk Geveci , vtkusers at vtk.org Berk, I'm sending the .DAT file attached, with latitude, longitude and the final .VTK file I wrote(rectilinear grid.vtk) . There's no big deal. It's a normal grid, with x and y dimensions (lines and columns). The data goes in the middle. When I have a different time step, the data in the middle changes. The team here can write these data time steps in various ways, together in the same file, each time step separated, etc. *I found that the only way to animate them is to write several .VTK files and read a Legacy .VTK in Paraview*, but takes too long to use the filters in each time step... https://visualization.hpc.mil/wiki/Paraview_Animating_Legacy_VTK_Files Renato, This is the first approach we tried last year, remember? When I asked you to show me the basics of paraview? You created a little code that translated the .DAT in a Binary file and opened in paraview using .RAW importer. But the problem came when they asked me to do animation... As I said above, I searched the web and discovered that paraview can read several .VTK files. He stores each of them in the memory and you just have to press "play" to see the animation. Of course, there's a glitche. You have to use filters in each file, that corresponds to each time-step of the animation. So you have to use threshold, extract surface and warp scalar in each time-step. Nowadays, we're using 50-60 time-steps for simulations here, so, it's not hat hard... I searched for a way to apply a filter to a legacy vtk file(with all time steps), but there's nothing on the web. If any of you know how, please tell me, will buy a lot of time. I'm at COPPE right now, If you want I can go to NACAD so we can chat about this. Thanks a lot, Renan. 2009/2/12 Renato Elias Renan, > > I'll suggest you a very naive approach: > > 1). Translate your ASCII/DAT files into binary > 2). Use the RAW Binary format in ParaView to load your files > > now the question is: How can you animate several RAW binary files? Berk can > answer you better than me, but, I'd try to use a python script in ParaView > to create the animation or something like that. > > Regards > > Renato. > > ps.: Answering the portuguese email you sent to me. No, I don't have any > program that could help you in this task, but, you could easily do it in > Fortran or using a script-based language like Python. > > > > On Thu, Feb 12, 2009 at 10:39 AM, Berk Geveci wrote: > >> Can you describe in detail what the .dat format looks like? >> >> -berk >> >> On Thu, Feb 12, 2009 at 3:01 AM, Renan Leser wrote: >> > Hello everybody, >> > >> > I'm searching for a program to write some .DAT files in .VTK format. >> > >> > These .DATs contains grid structure, scalars and vectors. I'm writing >> them >> > manually in .VTK, like these: >> > >> > # vtk DataFile Version 3.0 >> > vtk output >> > ASCII >> > DATASET STRUCTURED_POINTS >> > DIMENSIONS 387 312 1 >> > SPACING 1 1 1 >> > ORIGIN 0 0 0 >> > POINT_DATA 120744 >> > SCALARS batimetria float >> > LOOKUP_TABLE default >> > 0.0000000e+000 0.0000000e+000 0.0000000e+000 0.0000000e+000 >> > 0.0000000e+000... >> > 0.0000000e+000 0.0000000e+000 0.0000000e+000 0.0000000e+000 >> > 0.0000000e+000... >> > ... >> > >> > >> > The DAT files holds the grid, then I spent lots of time copying and >> pasting >> > the grid form .DAT to LOOKUP_TABLE default, and writing the dimensions >> and >> > point data. >> > >> > Since I'm working with large time data-steps files, I would like to >> known if >> > anybody use or recommend a program to speed up this process. >> > >> > Thanks a lot, >> > >> > Renan. >> > >> > >> > >> > -- >> > Renan Leser de Medeiros >> > Laboratory of Computational Methods in Engineering >> > Federal University of Rio de Janeiro - COPPE >> > P.O.Box 68552 - ZIP 21949-900 >> > Rio de Janeiro, RJ, Brasil >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://www.vtk.org/mailman/listinfo/vtkusers >> > >> > >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > -- Renan Leser de Medeiros Laboratory of Computational Methods in Engineering Federal University of Rio de Janeiro - COPPE P.O.Box 68552 - ZIP 21949-900 Rio de Janeiro, RJ, Brasil -- "Comece com as coisas que voc? sabe e as coisas que voc? n?o sabe lhe ser?o reveladas." - Rembrandt, 1606-1669 Renan Leser de Medeiros - Designer - UFRJ Mestrando em Computa??o de Alto Desempenho - COPPE/UFRJ -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Thu Feb 12 11:59:16 2009 From: daviddoria at gmail.com (David Doria) Date: Thu, 12 Feb 2009 11:59:16 -0500 Subject: [vtkusers] OBJ Writer? Message-ID: There is an OBJ Reader class, but I don't see an OBJ Writer? Am I missing it or is there not one? -- Thanks, David From luisrpp at gmail.com Thu Feb 12 12:01:31 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Thu, 12 Feb 2009 15:01:31 -0200 Subject: [vtkusers] vtkImagePlaneWidget with QT Message-ID: Hi All, How can I create an application using vtkImagePlaneWidget with QT, since we need to use the QVTKWidget to connect VTK and QT? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.bertel at kitware.com Thu Feb 12 12:02:09 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Thu, 12 Feb 2009 12:02:09 -0500 Subject: [vtkusers] OBJ Writer? In-Reply-To: References: Message-ID: There is an OBJ "exporter": VTK/Rendering/vtkOBJExporter.* On Thu, Feb 12, 2009 at 11:59 AM, David Doria wrote: > There is an OBJ Reader class, but I don't see an OBJ Writer? Am I > missing it or is there not one? > > -- > Thanks, > > David > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From francois.bertel at kitware.com Thu Feb 12 12:11:44 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Thu, 12 Feb 2009 12:11:44 -0500 Subject: [vtkusers] OBJ Writer? In-Reply-To: References: Message-ID: Keep the message on the list, please. Exporters save a whole 3D scene, whereas writers save a dataset. Importers load a whole 3D scene, whereas readers load a dataset. On Thu, Feb 12, 2009 at 12:03 PM, David Doria wrote: > Ah, I didn't see it because I was looking in IO and I was searching > for Writer! Why the different naming? > > On Thu, Feb 12, 2009 at 12:02 PM, Francois Bertel > wrote: >> There is an OBJ "exporter": VTK/Rendering/vtkOBJExporter.* >> >> On Thu, Feb 12, 2009 at 11:59 AM, David Doria wrote: >>> There is an OBJ Reader class, but I don't see an OBJ Writer? Am I >>> missing it or is there not one? >>> >>> -- >>> Thanks, >>> >>> David >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> Fran?ois Bertel, PhD | Kitware Inc. Suite 204 >> 1 (518) 371 3971 x113 | 28 Corporate Drive >> | Clifton Park NY 12065, USA >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > > > -- > Thanks, > > David > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From varguna at gmail.com Thu Feb 12 12:28:14 2009 From: varguna at gmail.com (Aytekin Vargun) Date: Thu, 12 Feb 2009 12:28:14 -0500 Subject: [vtkusers] Event Handling with SelectionChangedEvent In-Reply-To: <2137e33e0902100538k3f7c45e6q49ea9645edd94aba@mail.gmail.com> References: <2137e33e0902100538k3f7c45e6q49ea9645edd94aba@mail.gmail.com> Message-ID: Thanks a lot Jeff. This really worked. PS: I hope this message won't create a new thread. I apologize if it happens. Aytekin On Tue, Feb 10, 2009 at 8:38 AM, Jeff Baumes wrote: > Hi Aytekin, > > Based on previous emails, I believe your "selections" object is a > vtkDataRepresentation, which does not emit any key press events (or > mouse events). These events are emitted by the interactor style. So > you'd do something like > > > win->GetInteractor()->GetInteractorStyle()->AddObserver(vtkCommand::KeyPressEvent, > callback); > > where "win" is your vtkRenderWindow instance. This should be done > after the SetupRenderWindow call. > > Jeff > > On Mon, Feb 9, 2009 at 11:11 AM, Aytekin Vargun wrote: > > Hi, > > I am currently having problems with my event handler and would appreciate > if > > anybody suggests me a solution. > > > > The ProcessVertexSelection (user defined) method is activated when some > > selections are made (based on SelectionChangeEvent). Everything is good > upto > > this point. Here is the code for this: > > > > edgePicked->SetCallback(network->ProcessVertexSelection); > > edgePicked->SetClientData((void > *)static_cast(edgeLink)); > > selections->AddObserver(vtkCommand::SelectionChangedEvent, edgePicked); > > > > This part works and I can get the selections. Now I want to add another > > functionality: The user may want to delete the current selections by > using > > key 'd' or "delete" whichever is simple to implement. I know that > GetKeySym > > can be used to get key symbol. However, if I add the following code to > > activate another method to do deletions, the event handler ignores it. It > > never activates the method which is named as EVTDelete (in my code) where > I > > plan to check which key is used. > > > > delPicked->SetCallback(network->EVTDelete); > > delPicked->SetClientData((void > *)static_cast(edgeLink)); > > selections->AddObserver(vtkCommand::KeyPressEvent, delPicked); > > > > Why doesn't my event handler listen do the keypresses other than the > default > > ones? > > Thanks a lot. > > Aytekin > > > > -- > > My web page: http://www.cs.rpi.edu/~vargua > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > > -- > Jeff Baumes, Ph.D. > R&D Engineer, Kitware Inc. > (518) 371-3971 x132 > jeff.baumes at kitware.com > -- My web page: http://www.cs.rpi.edu/~vargua -------------- next part -------------- An HTML attachment was scrubbed... URL: From William.T.Bridgman at nasa.gov Thu Feb 12 15:28:41 2009 From: William.T.Bridgman at nasa.gov (Bridgman, William T.) Date: Thu, 12 Feb 2009 15:28:41 -0500 Subject: [vtkusers] Odd behavior in vtkStreamTracer? Message-ID: <8B78E721-3B03-4919-BB55-8D5FB5233D15@nasa.gov> Hello, I've been generating some field lines using vtkStreamTracer. The domain of the field has a hole in the center and I am interested in the flow into and out of the hole. I've defined my points just outside the spherical hole. The northern region has outbound field lines and those are easy. The southern region has inbound field lines so I set StreamTracer to reverse the direction of propagation. In the southern case, the lines seem to generate okay but are actually *two* nearly perfectly overlaid lines with an outbound and inbound components that seem to have a common node at a position far from the hole. I've not yet identified a clear pattern in when it does this. It does not happen to every field line in the region. I'm using a CVS repository around version 5.2, Linux on 64-bit. Any thoughts? Thanks, Tom -- Dr. William T."Tom" Bridgman Scientific Visualization Studio Global Science & Technology, Inc. NASA/Goddard Space Flight Center Email: William.T.Bridgman at nasa.gov Code 610.3 Phone: 301-286-1346 Greenbelt, MD 20771 FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ From sercanimailgroups at gmail.com Thu Feb 12 16:33:04 2009 From: sercanimailgroups at gmail.com (Sercani) Date: Thu, 12 Feb 2009 23:33:04 +0200 Subject: [vtkusers] ROI using vtkImageTracerWidget Message-ID: <007f01c98d59$81324190$8396c4b0$@com> Hi everyone; I am using vtkImageTracerWidget to draw freehand drawings on a vtkImageActor (input of this actor is output of the vtkDICOMImageReader). I want to use this closed spline for calculating the region area(using the spacing of dataset too) and clip this region from image. I have looked at and tested this example http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/GUI/Tcl/Im ageTracerWidget.tcl?root=VTK &content-type=text/plain but couldn't get things clear. How can i get the region boundaries and use it for area calculating and clipping image? Yours sincerely; Sercani.. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Werner.Willems at web.de Thu Feb 12 16:36:52 2009 From: Werner.Willems at web.de (Werner.Willems at web.de) Date: Thu, 12 Feb 2009 22:36:52 +0100 Subject: [vtkusers] Fieldview <--> Vtk-Format Message-ID: <854342461@web.de> Does anybody know of a Fieldview to Vtk-Format converter? Thanks, Werner From istmal at yahoo.com Thu Feb 12 20:46:53 2009 From: istmal at yahoo.com (Igor Mal) Date: Thu, 12 Feb 2009 17:46:53 -0800 (PST) Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? Message-ID: <359422.99375.qm@web51706.mail.re2.yahoo.com> I've read the VTK FAQ. ? It says that "vtk codebase are not 64 bit clean and so runtime problems are likely if that code is used." ? But it looks a bit outdated, since it does not ention any VTK 5.*.* version. Is anybody?using x64 version of VTK on Windows 64 bit, or can make any comments on this? ? Thanks in advance, ?? Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Thu Feb 12 20:56:16 2009 From: sean at rogue-research.com (Sean McBride) Date: Thu, 12 Feb 2009 20:56:16 -0500 Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? In-Reply-To: <359422.99375.qm@web51706.mail.re2.yahoo.com> References: <359422.99375.qm@web51706.mail.re2.yahoo.com> Message-ID: <20090213015616.1769857463@kingu.local> On 2/12/09 5:46 PM, Igor Mal said: >I've read the VTK FAQ. >? >It says that "vtk codebase are not 64 bit clean and so runtime problems >are likely if that code is used." It says: "... _parts_ of the vtk codebase are not 64 bit clean...". >But it looks a bit outdated, since it does not ention any VTK 5.*.* version. The statement is still true. You can prove it to yourself by turning on a compiler warning that warns about size truncation, like converting size_t to int. >Is anybody?using x64 version of VTK on Windows 64 bit, or can make any >comments on this? I'm using VTK on 64 bit Mac OS X. It mostly works well. Are you having problems? -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From Shekhar.Chandra at sci.monash.edu.au Thu Feb 12 20:58:57 2009 From: Shekhar.Chandra at sci.monash.edu.au (shekharc) Date: Fri, 13 Feb 2009 12:58:57 +1100 Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? In-Reply-To: <20090213015616.1769857463@kingu.local> References: <359422.99375.qm@web51706.mail.re2.yahoo.com> <20090213015616.1769857463@kingu.local> Message-ID: <4994D3E1.1050507@sci.monash.edu.au> Hi Alex, Works fine on Windows Vista/XP x64 and Linux x64 fine for me so far. Cheers Shakes Sean McBride wrote: > On 2/12/09 5:46 PM, Igor Mal said: > >> I've read the VTK FAQ. >> >> It says that "vtk codebase are not 64 bit clean and so runtime problems >> are likely if that code is used." > > It says: "... _parts_ of the vtk codebase are not 64 bit clean...". > >> But it looks a bit outdated, since it does not ention any VTK 5.*.* version. > > The statement is still true. You can prove it to yourself by turning on > a compiler warning that warns about size truncation, like converting > size_t to int. > >> Is anybody using x64 version of VTK on Windows 64 bit, or can make any >> comments on this? > > I'm using VTK on 64 bit Mac OS X. It mostly works well. > > Are you having problems? > From sean at rogue-research.com Thu Feb 12 21:02:04 2009 From: sean at rogue-research.com (Sean McBride) Date: Thu, 12 Feb 2009 21:02:04 -0500 Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? In-Reply-To: <4994D3E1.1050507@sci.monash.edu.au> References: <359422.99375.qm@web51706.mail.re2.yahoo.com> <20090213015616.1769857463@kingu.local> <4994D3E1.1050507@sci.monash.edu.au> Message-ID: <20090213020204.2120989307@kingu.local> On 2/13/09 12:58 PM, shekharc said: >Works fine on Windows Vista/XP x64 and Linux x64 fine for me so far. Out of curiosity, are you using datasets > 4 GiB? -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From berk.geveci at kitware.com Thu Feb 12 22:30:26 2009 From: berk.geveci at kitware.com (Berk Geveci) Date: Thu, 12 Feb 2009 22:30:26 -0500 Subject: [vtkusers] Odd behavior in vtkStreamTracer? In-Reply-To: <8B78E721-3B03-4919-BB55-8D5FB5233D15@nasa.gov> References: <8B78E721-3B03-4919-BB55-8D5FB5233D15@nasa.gov> Message-ID: <45d654b0902121930p3fcbc31cmf2bfb01f551e57ca@mail.gmail.com> Hi Tom, Can you share data and maybe a script that demonstrate the problem? -berk On Thu, Feb 12, 2009 at 3:28 PM, Bridgman, William T. wrote: > Hello, > > I've been generating some field lines using vtkStreamTracer. The domain of > the field has a hole in the center and I am interested in the flow into and > out of the hole. > > I've defined my points just outside the spherical hole. The northern region > has outbound field lines and those are easy. The southern region has > inbound field lines so I set StreamTracer to reverse the direction of > propagation. In the southern case, the lines seem to generate okay but are > actually *two* nearly perfectly overlaid lines with an outbound and inbound > components that seem to have a common node at a position far from the hole. > > I've not yet identified a clear pattern in when it does this. It does not > happen to every field line in the region. > > I'm using a CVS repository around version 5.2, Linux on 64-bit. > > Any thoughts? > > Thanks, > Tom > -- > Dr. William T."Tom" Bridgman Scientific Visualization Studio > Global Science & Technology, Inc. NASA/Goddard Space Flight Center > Email: William.T.Bridgman at nasa.gov Code 610.3 > Phone: 301-286-1346 Greenbelt, MD 20771 > FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From Aurelie.Larcher at imag.fr Fri Feb 13 03:16:15 2009 From: Aurelie.Larcher at imag.fr (=?ISO-8859-1?Q?Aur=E9lie_Larcher?=) Date: Fri, 13 Feb 2009 09:16:15 +0100 Subject: [vtkusers] vtkImagePlaneWidget with QT In-Reply-To: References: Message-ID: <49952C4F.9010204@imag.fr> Hi Luis, In the same way as usually. All you construct in your vtkRenderWindow will be restored in your QVTKWidget, even your vtkImagePlaneWidget. (...) my_interactor->SetRenderWindow(my_vtkRenderWindow); my_imagePlaneWidget->SetInteractor(my_interactor); my_QVTKWidget->GetRenderWindow()->AddRenderer(my_vtkRenderer); my_QVTKWidget->SetRenderWindow(my_vtkRenderWindow); (...) Aur?lie Luis Roberto P. Paula a ?crit : > Hi All, > > How can I create an application using vtkImagePlaneWidget with QT, > since we need to use the QVTKWidget to connect VTK and QT? > > Thanks, > Luis > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From wassim_belhadj at topnet.tn Fri Feb 13 04:39:10 2009 From: wassim_belhadj at topnet.tn (wassim_belhadj at topnet.tn) Date: Fri, 13 Feb 2009 10:39:10 +0100 Subject: [vtkusers] Remove parts of the volume displayed Message-ID: <21c650e95915a4ed3d57b809bb5721e7@pop.topnet.tn> Hi, I'am using vtk for Volume Rendering and Qt4. I want to remove parts of the volume displayed (unnecessary parts). Is there a VTK tool (an eraser) which provides this functionality. I tried to use vtkBoxWidget but I have not been able to delineate the parts that are between the two perpendicular planes of the BOx Attached a screenshot that illustrates the problem. Can someone help me... Best Regards, BELHADJ Wassim -------------- next part -------------- A non-text attachment was scrubbed... Name: ScreenShot.jpg Type: image/jpeg Size: 3131 bytes Desc: not available URL: From ilferraresebono at hotmail.it Fri Feb 13 07:08:12 2009 From: ilferraresebono at hotmail.it (Giancarlo Amati) Date: Fri, 13 Feb 2009 13:08:12 +0100 Subject: [vtkusers] QVTK weird linking problem In-Reply-To: <21c650e95915a4ed3d57b809bb5721e7@pop.topnet.tn> References: <21c650e95915a4ed3d57b809bb5721e7@pop.topnet.tn> Message-ID: Good morning, sorry for sending this mail twice but not sure which group is better. Anyway compiled the VTK with the option for QT enabled producing the QVTK.lib that I link in my program where I insert a QVTKWidget. So, as I'm programming in Visual Studio 2005 I added that LIB file in the sequece of LIBs in the linking properties. So, this problem remarks that It cant link SetRenderWindow.....and I can't understand why, any suggestions is really appreciated! 1>------ Build started: Project: dioramaQT, Configuration: Debug Win32 ------ 1>Linking... 1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall QVTKWidget::SetRenderWindow(class vtkRenderWindow *)" (?SetRenderWindow at QVTKWidget@@QAEXPAVvtkRenderWindow@@@Z) referenced in function _main 1>C:\KCLSoftware\DIORAMAQT\dioramaQT\Debug\dioramaQT.exe : fatal error LNK1120: 1 unresolved externals 1>Build log was saved at "file://c:\KCLSoftware\DIORAMAQT\dioramaQT\Debug\BuildLog.htm" 1>dioramaQT - 2 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Many Thanks Giancarlo _________________________________________________________________ Vai oltre le parole, scarica Messenger 2009! http://www.messenger.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From William.T.Bridgman at nasa.gov Fri Feb 13 11:31:52 2009 From: William.T.Bridgman at nasa.gov (Bridgman, William T.) Date: Fri, 13 Feb 2009 11:31:52 -0500 Subject: [vtkusers] Odd behavior in vtkStreamTracer? In-Reply-To: <45d654b0902121930p3fcbc31cmf2bfb01f551e57ca@mail.gmail.com> References: <8B78E721-3B03-4919-BB55-8D5FB5233D15@nasa.gov> <45d654b0902121930p3fcbc31cmf2bfb01f551e57ca@mail.gmail.com> Message-ID: I wish I could isolate the problem for reliable reproduction. As it is, it appears to affect only some of the lines I generate and the criteria I have found are not 100% reliable. One thing that seems to reduce the problem is if I reduce the maximum number of steps allowed. I was using 2500 but the problem is significantly reduced when I limit to 1300. I'll probably try dropping it below 1000 to see if that helps also. Could there be a hard limit on the maximum number of points in vtkStreamTracer? I tried examining some of the vtk code but don't see an obvious connection. Tom On Feb 12, 2009, at 10:30 PM, Berk Geveci wrote: > Hi Tom, > > Can you share data and maybe a script that demonstrate the problem? > > -berk > > On Thu, Feb 12, 2009 at 3:28 PM, Bridgman, William T. > wrote: >> Hello, >> >> I've been generating some field lines using vtkStreamTracer. The >> domain of >> the field has a hole in the center and I am interested in the flow >> into and >> out of the hole. >> >> I've defined my points just outside the spherical hole. The >> northern region >> has outbound field lines and those are easy. The southern region has >> inbound field lines so I set StreamTracer to reverse the direction of >> propagation. In the southern case, the lines seem to generate okay >> but are >> actually *two* nearly perfectly overlaid lines with an outbound and >> inbound >> components that seem to have a common node at a position far from >> the hole. >> >> I've not yet identified a clear pattern in when it does this. It >> does not >> happen to every field line in the region. >> >> I'm using a CVS repository around version 5.2, Linux on 64-bit. >> >> Any thoughts? >> >> Thanks, >> Tom >> -- >> Dr. William T."Tom" Bridgman Scientific Visualization >> Studio >> Global Science & Technology, Inc. NASA/Goddard Space >> Flight Center >> Email: William.T.Bridgman at nasa.gov Code 610.3 >> Phone: 301-286-1346 Greenbelt, MD 20771 >> FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> -- Dr. William T."Tom" Bridgman Scientific Visualization Studio Global Science & Technology, Inc. NASA/Goddard Space Flight Center Email: William.T.Bridgman at nasa.gov Code 610.3 Phone: 301-286-1346 Greenbelt, MD 20771 FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ From dave.demarle at kitware.com Fri Feb 13 12:11:40 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 13 Feb 2009 12:11:40 -0500 Subject: [vtkusers] tubular structure In-Reply-To: References: Message-ID: The tube filter takes in a set of points in space and a data array which contains values for each point (defined as either a scalar or vector) that determine the radius at each point. You define that structure be creating a vtk_polydata, filling in the points via SetPoints, and filling in the values via GetPointData->SetScalars() or GetPointData->SetVectors(). Set that polydata as input to the tubefilter and call the filter's SetVaryRadius*() method to choose either the scalar array or vector array. If you define your vector array to be orthogonal to the centroidal axis and have a magnitude corresponding to your radius, your should be able to do what you want. On Tue, Feb 3, 2009 at 5:17 AM, EDSB EDSB wrote: > Hi there, > I am very new to VTK and I am using it by its Phyton wrapper. I would like > to create a tubular structure and I want to put as input > the radius and the centroidal axis (that is a spline). > Do I have to use the vtkTubeFilter,isn't it? Where can I inupt my spline? > Could you help me with an example? > Thank a lot for your help! > Mary > > ________________________________ > Scopri le novit?! La tua vita, i tuoi interessi, tutto insieme su Windows > Live. > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From syrkinae at ethz.ch Fri Feb 13 12:20:22 2009 From: syrkinae at ethz.ch (Syrkina Ekaterina) Date: Fri, 13 Feb 2009 18:20:22 +0100 Subject: [vtkusers] selective mesh subdivision Message-ID: <2DDC0446EF4690489771E0A9491C6305028AFFEA@EX3.d.ethz.ch> Hallo, I have a triangulated mesh and am able to estimate Taubin curvature tensor at every point (thanks to filter vtkCurvatureTensor found in the mailing list). The problem is that for cylindric parts of the shape where triangles are very elongated, I find the curvature estimation not very good (estimated maximum curvature direction is parallel to the cylinder axis which is not true in my case). Otherwise it works fine. I'm looking for the following: (1) filter which would subdivide those (and only those) elongated triangles to make them more regular -- I hope this solves the problem...; (2) some method to keep/return original structure of the mesh (points and connections) after I calculate curvature on the refined/regularized mesh; To solve problem (1) I tried vtkButterflySubdivisionFilter which subdivides each triangles into 4 on one iteration, but it makes "normal" triangles I had very small but elongated triangles still remain (only scale changes). I need some simple and fast solution and would appreciate any ideas! Thanks. Best, Katya From dave.demarle at kitware.com Fri Feb 13 13:00:51 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 13 Feb 2009 13:00:51 -0500 Subject: [vtkusers] VTK installation problem in openSUSE 11.0 In-Reply-To: References: Message-ID: Cmake is trying to make sure that you have a working compiler at this point. Do you have gcc and g++ packages installed? On Wed, Feb 4, 2009 at 12:46 PM, Ibraheem Aldhamari wrote: > hi there , > sorry for bothering you with this problem .it looks like many people have > the same problem ,although i tried the previous posts but the problem still > the same . > here is the problem : > > ================================================================ > CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:25 > (MESSAGE): > The C++ compiler "/usr/bin/gcc" is not able to compile a simple test > program. > > It fails with the following output: > > Change Dir: /usr/local/VTK/CMakeFiles/CMakeTmp > > > > Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast" > > /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > > gmake[1]: Entering directory `/usr/local/VTK/CMakeFiles/CMakeTmp' > ============================================================== > > s ince i am very beginner to linux and vtk i don't really know what should i > do . > > thank you for your help in advance. > > barhoom > > > > > ________________________________ > Explore the seven wonders of the world Learn more! > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From dave.demarle at kitware.com Fri Feb 13 14:00:47 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 13 Feb 2009 14:00:47 -0500 Subject: [vtkusers] Change the color of a polydata In-Reply-To: <206921.55311.qm@web28206.mail.ukl.yahoo.com> References: <206921.55311.qm@web28206.mail.ukl.yahoo.com> Message-ID: VTK can color things in a variety of ways, by default it tries to color things to show data values associated with each point or cell. vtkActor->GetMapper() returns a vtkMapper vtkMapper has a rich set of controls over exactly which and how values are converted to colors through the Mapper's lookup table. Alternatively, if you call vtkMapper->SetScalarVisibilityOff() the values and lookuptable are ignored. Then you use: vtkActor->GetProperty() to get a vtkProperty() and then call vtkProperty()->SetColor(R,G,B) to set the color of the entire object. On Sat, Feb 7, 2009 at 6:16 AM, Nour Mestiri wrote: > Hi all vtk users. > I have many polydata saved as VTP files. When i display any one of those > images, i always have a 'blue' data. > I want to know haow to modify the color of a VTP image? > Thank you so much > ________________________________ > Ne pleurez pas si votre Webmail ferme. R?cup?rez votre historique sur Yahoo! > Mail > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From dave.demarle at kitware.com Fri Feb 13 14:22:11 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 13 Feb 2009 14:22:11 -0500 Subject: [vtkusers] Volume Rendering In-Reply-To: <513a5e60902102257u7c314528l6dbad611cc6d4d11@mail.gmail.com> References: <513a5e60902102257u7c314528l6dbad611cc6d4d11@mail.gmail.com> Message-ID: On Wed, Feb 11, 2009 at 1:57 AM, Madhu Saravana Sibi Govindan wrote: > Dear All, > > My name is Sibi Govindan and I'm a Phd student at the University of > Texas at Austin. For a parallel systems course at UT, we are trying to > design a programming assignment with Volume Rendering. In this > assignment, the task of the students will be to parallelize volume > rendering code. Specifically, they'll be using the ray tracing > algorithms presented in Marc Levoy's classic paper. > > For this assignment, we are in need of a simple, sequential > implementation of volume rendering (in c or c++), which I can use as a > starting point for creating the assignment framework. The idea is that > I'll strip off the rendering code from the sequential implementation > and provide the framework to students, who will parallelize the > algorithm using pthreads or MPI. > > I was searching for various implementations of Volume Rendering, and I > hit upon VTK. I would be very thankful if you could answer these > questions for me: > > 1) We need to run this framework on the Linux/Unit platform. Skimming > through the VTK pages, it looks like VTK should build and run on > Linux. Is this right? Yes. > > 2) Does VTK need any graphics card support via OpenGL? Or is it purely > based on C++ and other languages/libraries? > It requires OpenGL. Mesa is a software only implementation of OpenGL. When you configure and compile VTK to use the Mesa it therefore does not need a Graphics Card. > 3) Would it be easy for me to string off the rendering code from VTK > and provide VTK as a framework to the students? (easy == complete > within 5 or 6 days ) Hard to say. It estimate it would take longer than that to strip the related volume rendering code _out_ of VTK. But it would not be hard to use VTK to do volume rendering in a small application and then give that to the students to parallelize. However, VTK has a steep learning curve for most people so you and your students may have difficult climbing to do. > > Your time and reply are much appreciated - in advance. > > Thanks, > G.Sibi > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From edsb at hotmail.it Sat Feb 14 10:02:55 2009 From: edsb at hotmail.it (EDSB EDSB) Date: Sat, 14 Feb 2009 16:02:55 +0100 Subject: [vtkusers] help please!!!!!get coordinates In-Reply-To: <011e01c98ca7$7c199c10$744cd430$@com> References: <011e01c98ca7$7c199c10$744cd430$@com> Message-ID: Hi Sercani, thanks a lot for your kind answer, I was able to solve my problem by converting my image in a vtkUnsignedCharArray scalars = vtk.vtkUnsignedCharArray() scalars.DeepCopy(image.GetPointData().GetScalars()) and then by using scalars.GetValue(i) Yours sincerely, Mary From: sercanimailgroups at gmail.com To: edsb at hotmail.it; vtkusers at vtk.org Subject: RE: [vtkusers] help please!!!!!get coordinates Date: Thu, 12 Feb 2009 02:18:49 +0200 Here is a sample that gets mouse position on a volume (or another imagedata prop) and gets the world and structured coordinates? vtkPointPicker picker = new vtkPointPicker(); picker.Pick(mouseX,mouseY, 0, renderer); double[] pos = new double[3]; pos = picker.GetMapperPosition(); int volIndex = imageData.FindPoint(pos); //voxel Id double[] worldPos = new double[3]; worldPos = imageData.GetPoint(volIndex); //world coordinates of the voxel int ijk[] = new int[3]; double pcoords[] = new double[3]; imageData.ComputeStructuredCoordinates(pos, ijk, pcoords); //ijk is structured coordinates of the voxel Yours sincerely, Sercani?.. From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of EDSB EDSB Sent: Wednesday, February 11, 2009 4:24 PM To: vtk mailing list Subject: [vtkusers] help please!!!!!get coordinates Hello all, I apologize for annoying you again with my question but I need some help. How can I extract the 3D coordinates of some non-zero voxel in a binary metaimage? I 'm sorry for my insistence, but I couldn't find any example on this topic. Thanks a lot for your help! Mary Scopri le novit?! La tua vita, i tuoi interessi, tutto insieme su Windows Live. _________________________________________________________________ Quante ne sai? Gioca con i 50 nuovi schemi di CrossWire! http://livesearch.games.msn.com/crosswire/play_it/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bellina at illinois.edu Sat Feb 14 10:32:31 2009 From: bellina at illinois.edu (Alessandro A. Bellina) Date: Sat, 14 Feb 2009 09:32:31 -0600 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... Message-ID: Hello All, First let me start by giving you my system info: -- MacOS Intel Based VTK 5.0.3 I don't have 5.2 because I get endianness errors while trying to compile. -- I need the ability to probe spatial points a time-dependent dataset and output a scalar value as an array to be later analyzed in Matlab. My data is originally stored as an XMLUnstructuredGrid. I start by loading the data using vtkXMLUnstructredGridReader I do this in a function that looks like this: //int i: the current time step to load. Files are named: "sph_1.vtu, sph_2.vtu, ..." void LoadFile (vtkXMLUnstructuredGridReader*, int i){ vtkXMLUnstructuredGridReader *dataSet= vtkXMLUnstructuredGridReader::New(); std::ostringstream ostr; ostr<SetFileName (ansysFilename.c_str()); dataSet->Update(); return dataSet; } I call this function in a loop that goes from time step = 0 to time_step = N, where N is a number on the order of 1,000. I also pass it through a probeFilter with a vtkFloatArray that has the coordinates of the spatial points I am interested in. About half way through, I get a vtk malloc error. Could it be because I am reading each one of these files and not clearing them? I am just loading the next file that comes along (not knowing how VTK is handling this under the hood). Any help would be greatly appreciated, Alessandro -- Alessandro A. Bellina Graduate Student Bioacoustics Research Laboratory Electrical and Computer Engineering University of Illinois at Urbana-Champaign From edsb at hotmail.it Sat Feb 14 10:54:02 2009 From: edsb at hotmail.it (EDSB EDSB) Date: Sat, 14 Feb 2009 16:54:02 +0100 Subject: [vtkusers] tubular structure In-Reply-To: References: Message-ID: David, thank you very much for your kind answer! I was able to do what I want. Hoping that I'm not bothering you too much, could I ask you another question? I have a volumetric image (in dicom or in metaimage) made of zero voxels and some non-zero voxels, representing a 3D geometry (a cube). I would like to subtract from this volume the tube that I have create by vtktubefilter, but I have some problems: 1) I have two different classes: the image is a VtkImageData, the tube is a VtkPolyData (isn't it?); how can I get the same format, how can I subtract them? 2)the tube is empty inside. I need a volume, not a surface. I know that these question can seem quite banal, but I couldn't find any good tutorial about VTK classes on the web. I rely on buying VTK user's guide as soon as possible! Thanks in advance for you kindness and for your help! Mary > Date: Fri, 13 Feb 2009 12:11:40 -0500 > Subject: Re: [vtkusers] tubular structure > From: dave.demarle at kitware.com > To: edsb at hotmail.it > CC: vtkusers at vtk.org > > The tube filter takes in a set of points in space and a data array > which contains values for each point (defined as either a scalar or > vector) that determine the radius at each point. > > You define that structure be creating a vtk_polydata, filling in the > points via SetPoints, and filling in the values via > GetPointData->SetScalars() or GetPointData->SetVectors(). > > Set that polydata as input to the tubefilter and call the filter's > SetVaryRadius*() method to choose either the scalar array or vector > array. > > If you define your vector array to be orthogonal to the centroidal > axis and have a magnitude corresponding to your radius, your should be > able to do what you want. > > On Tue, Feb 3, 2009 at 5:17 AM, EDSB EDSB wrote: > > Hi there, > > I am very new to VTK and I am using it by its Phyton wrapper. I would like > > to create a tubular structure and I want to put as input > > the radius and the centroidal axis (that is a spline). > > Do I have to use the vtkTubeFilter,isn't it? Where can I inupt my spline? > > Could you help me with an example? > > Thank a lot for your help! > > Mary > > > > ________________________________ > > Scopri le novit?! La tua vita, i tuoi interessi, tutto insieme su Windows > > Live. > > _______________________________________________ > > This is the private VTK discussion list. > > Please keep messages on-topic. Check the FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > > -- > David E DeMarle > Kitware, Inc. > R&D Engineer > 28 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-371-3971 x109 _________________________________________________________________ Quante ne sai? Gioca con i 50 nuovi schemi di CrossWire! http://livesearch.games.msn.com/crosswire/play_it/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hobbsk at ohiou.edu Sat Feb 14 11:03:16 2009 From: hobbsk at ohiou.edu (Kevin H. Hobbs) Date: Sat, 14 Feb 2009 11:03:16 -0500 Subject: [vtkusers] tubular structure In-Reply-To: References: Message-ID: <4996EB44.5020609@ohiou.edu> EDSB EDSB wrote: > > I would like to subtract from this volume the tube that I have create > by vtktubefilter, but I have some problems: > 1) I have two different classes: the image is a VtkImageData, the tube > is a VtkPolyData (isn't it?); how can I get the same format, how can I > subtract them? The attached program will set all of the pixels inside (or optionally outside) of the tube to the value of your choice. -------------- next part -------------- A non-text attachment was scrubbed... Name: RemoveObject.cxx Type: text/x-c++src Size: 4569 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature URL: From jd379252 at gmail.com Sat Feb 14 11:06:32 2009 From: jd379252 at gmail.com (pof) Date: Sat, 14 Feb 2009 17:06:32 +0100 Subject: [vtkusers] Problem with display accuracy for actors having large bounding box coordinates Message-ID: <4996EC08.5050303@gmail.com> Hi, I'm facing a problem with the display accuracy of actors that have large bounding box coordinates. For instance : - when I display a scene having a bounding box (0;1000;0;1000;0;100) everything is fine, that is all the actors look pretty nice (see http://www.imageshare.web.id/images/h1e5ufe0j33il4vykltr.png); - when the same scene is just translated by a vector (1e6,1e6,0), i.e. its actual bounding box is (1e6;1e6+1000;1e6;1e6+1000;0;100), there are pretty much overlapping between actors (see http://www.imageshare.web.id/images/3a7eeujdvo9zntwngoz5.png). In both case, I use vtkRenderer::ResetCamera() to fit the cam view to the real bbox view, but the result is not that good. I tried playing with SetResolveCoincidentTopology, but did not found a good solution. An obvious workaround would be to ensure that the coord of the vtkpolydata behind the actors are close to the origin, but its is precisely what I want to avoid as the original data comes from GIS (Geographical Information Systems) and it is usually far from beeing close to the (0,0,0) point, and I would like to avoid duplicating it for memory efficiency. Does anybody has an idea to overcome this problem ? JD From post at rocco-gasteiger.de Sat Feb 14 11:40:26 2009 From: post at rocco-gasteiger.de (Rocco Gasteiger) Date: Sat, 14 Feb 2009 17:40:26 +0100 Subject: [vtkusers] Problems with vtk and python wrapping under vista 64 Message-ID: <822E1759A4814FB8A2B6572CC892AF07@Schleppi> Dear list members, I have some problems during compilation vtk (cvs head) with python wrapping on my windows vista 64 bit system. On windows xp 32 bit with the same python 2.5. version, all works fine. During the compilation in visual studio 8 (64 bit), I got many linker errors for all the python projects like vtkpython or vtktcltest2py_pyc and many others. Here is one error output for the vtkpython project (sorry for the german language, it means ?not resolved external symbol?) 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol "__imp_PyList_Insert" in Funktion ""void __cdecl vtkPythonAppInitPrependPythonPath(char const *)" (?vtkPythonAppInitPrependPythonPath@@YAXPEBD at Z)". 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol "__imp_PyString_FromString" in Funktion ""void __cdecl vtkPythonAppInitPrependPythonPath(char const *)" (?vtkPythonAppInitPrependPythonPath@@YAXPEBD at Z)". 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol "__imp_PySys_GetObject" in Funktion ""void __cdecl vtkPythonAppInitPrependPythonPath(char const *)" (?vtkPythonAppInitPrependPythonPath@@YAXPEBD at Z)". 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol "__imp_Py_Main" in Funktion "main". 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol "__imp_PyString_AsString" in Funktion "main". 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol "__imp_PyEval_InitThreads" in Funktion "main". 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol "__imp_Py_Initialize" in Funktion "main". 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol "__imp_Py_SetProgramName" in Funktion "main". 2>D:\Arbeit\Programmierung\Bibliotheken\VTKSource\bin\Release\vtkpython.exe : fatal error LNK1120: 8 nicht aufgel?ste externe Verweise. Has anybody an idea what the reasons for these errors are? Thanks in advanced, Rocco -- Dipl.-Ing. Rocco Gasteiger Department of Simulation and Graphics, School of Computer Science Otto-von-Guericke-University Magdeburg Universit?tsplatz 2, 39106 Magdeburg GERMANY Phone: (+49-391) 67-1 27 59 Fax: (+49 391) 67-1 11 64 Email: gasteiger at isg.cs.uni-magdeburg.de Web: http://wwwisg.cs.uni-magdeburg.de/cv/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From gbook at gbook.org Sat Feb 14 12:14:24 2009 From: gbook at gbook.org (Greg Book) Date: Sat, 14 Feb 2009 12:14:24 -0500 Subject: [vtkusers] wxVTKRenderWindowInteractor compile error Message-ID: <4996FBF0.7030308@gbook.org> An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Sat Feb 14 14:23:57 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Sat, 14 Feb 2009 14:23:57 -0500 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: Message-ID: <8FD0A71B-3BE7-430E-B2FE-612C39B8E32D@bluequartz.net> You need to clean up your memory allocations. Basically the simple rule is this: EVERY time you use the static ::New() method to create a vtk object, when you are finished with the object you need to call the ::Delete() method on the object to release the memory. In your case I would try something like the following: int totalTimeSteps = 100; for (int t = 0; t < totalTimeSteps; ++t) { vtkXMLUnstructuredGridReader* reader = vtkXMLUnstructuredGridReader::New(); std::ostringstream ostr; ostr<SetFileName (ansysFilename.c_str()); reader->Update(); vtkUnstructuredGrid* grid = reader->getOutput(); // Process the unstructured grid data // Clean up the memory grid::Delete(); reader::Delete(); } There is also the vtkSmartPointer<> template class that you can use. This offers the ability to clean itself up when it goes out of scope. The above will not leak memory in the loop. _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 14, 2009, at 10:32 AM, Alessandro A. Bellina wrote: > Hello All, > > First let me start by giving you my system info: > -- > MacOS Intel Based > VTK 5.0.3 > I don't have 5.2 because I get endianness errors while trying to > compile. > -- > > I need the ability to probe spatial points a time-dependent dataset > and output a scalar value as an array to be later analyzed in Matlab. > > My data is originally stored as an XMLUnstructuredGrid. > > I start by loading the data using vtkXMLUnstructredGridReader I do > this in a function that looks like this: > > //int i: the current time step to load. Files are named: "sph_1.vtu, > sph_2.vtu, ..." > void LoadFile (vtkXMLUnstructuredGridReader*, int i){ > vtkXMLUnstructuredGridReader *dataSet= > vtkXMLUnstructuredGridReader::New(); > std::ostringstream ostr; > ostr< std::string s = ostr.str(); > > std::string ansysFilename = "sph_"+s+".vtu"; > > //vtkUnstructuredGridReader for data (src) > dataSet->SetFileName (ansysFilename.c_str()); > dataSet->Update(); > > return dataSet; > } > > I call this function in a loop that goes from time step = 0 to > time_step = N, where N is a number on the order of 1,000. I also pass > it through a probeFilter with a vtkFloatArray that has the coordinates > of the spatial points I am interested in. > > About half way through, I get a vtk malloc error. Could it be because > I am reading each one of these files and not clearing them? I am just > loading the next file that comes along (not knowing how VTK is > handling this under the hood). > > Any help would be greatly appreciated, > > Alessandro > > -- > Alessandro A. Bellina > > Graduate Student > Bioacoustics Research Laboratory > Electrical and Computer Engineering > University of Illinois at Urbana-Champaign > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From mike.jackson at bluequartz.net Sat Feb 14 14:26:07 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Sat, 14 Feb 2009 14:26:07 -0500 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: Message-ID: <2FCB7105-3864-40FD-A2D9-12CB9F6F545B@bluequartz.net> A bit off topic for the subject but what are the compile errors that you are getting when trying to compile vtk 5.2? Last I checked all those issues were already worked out... I think.. _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 14, 2009, at 10:32 AM, Alessandro A. Bellina wrote: > First let me start by giving you my system info: > -- > MacOS Intel Based > VTK 5.0.3 > I don't have 5.2 because I get endianness errors while trying to > compile. From sean at rogue-research.com Sat Feb 14 15:34:58 2009 From: sean at rogue-research.com (Sean McBride) Date: Sat, 14 Feb 2009 15:34:58 -0500 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: Message-ID: <20090214203458.965444501@kingu.local> On 2/14/09 9:32 AM, Alessandro A. Bellina said: >MacOS Intel Based >VTK 5.0.3 >I don't have 5.2 because I get endianness errors while trying to compile. I agree with Mike, you should figure this out. There were several Mac- related improvements between 5.0 and 5.2, I would definitely recommend using the newest version. -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From bellina at illinois.edu Sat Feb 14 16:44:04 2009 From: bellina at illinois.edu (Alessandro A. Bellina) Date: Sat, 14 Feb 2009 15:44:04 -0600 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: <20090214203458.965444501@kingu.local> References: <20090214203458.965444501@kingu.local> Message-ID: Thanks. I did find that using Delete worked. I was missing one delete for the probeFilter.... I tried installing 5.2 a little while back and I kept on getting a cmake endinanness error. I will try again when I get a chance and let you know what I find. I would like to use temporal datasets (something I understand now comes in 5.2). Thanks, Alessandro On Sat, Feb 14, 2009 at 2:34 PM, Sean McBride wrote: > On 2/14/09 9:32 AM, Alessandro A. Bellina said: > >>MacOS Intel Based >>VTK 5.0.3 >>I don't have 5.2 because I get endianness errors while trying to compile. > > I agree with Mike, you should figure this out. There were several Mac- > related improvements between 5.0 and 5.2, I would definitely recommend > using the newest version. > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > -- Alessandro A. Bellina Graduate Student Bioacoustics Research Laboratory Electrical and Computer Engineering University of Illinois at Urbana-Champaign From Shekhar.Chandra at sci.monash.edu.au Sat Feb 14 20:37:26 2009 From: Shekhar.Chandra at sci.monash.edu.au (shekharc) Date: Sun, 15 Feb 2009 12:37:26 +1100 Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? In-Reply-To: <20090213020204.2120989307@kingu.local> References: <359422.99375.qm@web51706.mail.re2.yahoo.com> <20090213015616.1769857463@kingu.local> <4994D3E1.1050507@sci.monash.edu.au> <20090213020204.2120989307@kingu.local> Message-ID: <499771D6.3010000@sci.monash.edu.au> No, not atm. Perhaps that's why it works for me so far. Is it fair to say that 64-bit issues would crop up when say the array lengths are like 2^32 or bigger (because of ints)? Other libraries (like Blitz++) tend to have this issue too I believe. Cheers Shakes Sean McBride wrote: > On 2/13/09 12:58 PM, shekharc said: > >> Works fine on Windows Vista/XP x64 and Linux x64 fine for me so far. > > Out of curiosity, are you using datasets > 4 GiB? > From mike.jackson at bluequartz.net Sat Feb 14 23:16:58 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Sat, 14 Feb 2009 23:16:58 -0500 Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? In-Reply-To: <499771D6.3010000@sci.monash.edu.au> References: <359422.99375.qm@web51706.mail.re2.yahoo.com> <20090213015616.1769857463@kingu.local> <4994D3E1.1050507@sci.monash.edu.au> <20090213020204.2120989307@kingu.local> <499771D6.3010000@sci.monash.edu.au> Message-ID: <02247ABB-506F-4894-9C12-A6C4404E57B2@bluequartz.net> There are those issues and possible issues with 32 bit math results being placed into a 64 bit value such as the following: int x, y, z; int64 total = x * y * z; on the surface that looks fine, but what happens when x * y * z goes beyond the max signed int value? It rolls over and you get all sorts of weird errors. I found and fixed a few of these last year and others have gone on the "64 bit hunt" before but no one really sure just where the rest of the bugs are at. Thorough testing of your extremely large data sets is well warranted. I'm not trying to take anything away from VTK. I think it is a wonderful toolkit that has allowed me to help people solve real problems. Just a word of caution that if your data sets start getting large (into 64 bit territory) be ready to possibly hunt down some bugs in the VTK code. --- Mike Jackson www.bluequartz.net On Feb 14, 2009, at 8:37 PM, shekharc wrote: > No, not atm. Perhaps that's why it works for me so far. > > Is it fair to say that 64-bit issues would crop up when say the > array lengths are like 2^32 or bigger (because of ints)? Other > libraries (like Blitz++) tend to have this issue too I believe. > > Cheers > Shakes > > Sean McBride wrote: >> On 2/13/09 12:58 PM, shekharc said: >>> Works fine on Windows Vista/XP x64 and Linux x64 fine for me so far. >> Out of curiosity, are you using datasets > 4 GiB? From gbook at gbook.org Sun Feb 15 09:52:50 2009 From: gbook at gbook.org (Greg Book) Date: Sun, 15 Feb 2009 09:52:50 -0500 Subject: [vtkusers] wxVTKRenderWindowInteractor compile error In-Reply-To: <4996FBF0.7030308@gbook.org> References: <4996FBF0.7030308@gbook.org> Message-ID: <49982C42.1060102@gbook.org> An HTML attachment was scrubbed... URL: From david.cole at kitware.com Sun Feb 15 11:03:42 2009 From: david.cole at kitware.com (David Cole) Date: Sun, 15 Feb 2009 11:03:42 -0500 Subject: [vtkusers] Problems with vtk and python wrapping under vista 64 In-Reply-To: <822E1759A4814FB8A2B6572CC892AF07@Schleppi> References: <822E1759A4814FB8A2B6572CC892AF07@Schleppi> Message-ID: Do you have 64-bit python libraries? On Sat, Feb 14, 2009 at 11:40 AM, Rocco Gasteiger wrote: > Dear list members, > > > > I have some problems during compilation vtk (cvs head) with python wrapping > on my windows vista 64 bit system. On windows xp 32 bit with the same python > 2.5. version, all works fine. During the compilation in visual studio 8 (64 > bit), I got many linker errors for all the python projects like vtkpython or > vtktcltest2py_pyc and many others. > > > > Here is one error output for the vtkpython project (sorry for the german > language, it means "not resolved external symbol") > > > > > > 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes > externes Symbol "__imp_PyList_Insert" in Funktion ""void __cdecl > vtkPythonAppInitPrependPythonPath(char const *)" > (?vtkPythonAppInitPrependPythonPath@@YAXPEBD at Z)". > > 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes > externes Symbol "__imp_PyString_FromString" in Funktion ""void __cdecl > vtkPythonAppInitPrependPythonPath(char const *)" > (?vtkPythonAppInitPrependPythonPath@@YAXPEBD at Z)". > > 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes > externes Symbol "__imp_PySys_GetObject" in Funktion ""void __cdecl > vtkPythonAppInitPrependPythonPath(char const *)" > (?vtkPythonAppInitPrependPythonPath@@YAXPEBD at Z)". > > 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes > externes Symbol "__imp_Py_Main" in Funktion "main". > > 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes > externes Symbol "__imp_PyString_AsString" in Funktion "main". > > 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes > externes Symbol "__imp_PyEval_InitThreads" in Funktion "main". > > 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes > externes Symbol "__imp_Py_Initialize" in Funktion "main". > > 2>vtkPythonAppInit.obj : error LNK2019: Verweis auf nicht aufgel?stes > externes Symbol "__imp_Py_SetProgramName" in Funktion "main". > > 2>D:\Arbeit\Programmierung\Bibliotheken\VTKSource\bin\Release\vtkpython.exe > : fatal error LNK1120: 8 nicht aufgel?ste externe Verweise. > > > > Has anybody an idea what the reasons for these errors are? > > > > Thanks in advanced, Rocco > > > > -- > > Dipl.-Ing. Rocco Gasteiger > > Department of Simulation and Graphics, School of Computer Science > Otto-von-Guericke-University Magdeburg > > > > Universit?tsplatz 2, 39106 Magdeburg > > GERMANY > > > > Phone: (+49-391) 67-1 27 59 > > Fax: (+49 391) 67-1 11 64 > > Email: gasteiger at isg.cs.uni-magdeburg.de > > Web: http://wwwisg.cs.uni-magdeburg.de/cv/ > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Sun Feb 15 16:48:53 2009 From: daviddoria at gmail.com (David Doria) Date: Sun, 15 Feb 2009 16:48:53 -0500 Subject: [vtkusers] Casting vtkDataArray to vtkUnsignedCharArray Message-ID: Currently I'm doing this: vtkSmartPointer ColorsData = polydata->GetPointData()->GetArray("Colors"); vtkSmartPointer ColorsChar = dynamic_cast< vtkUnsignedCharArray * >(ColorsData); It seems like this should be able to be done without the dynamic_cast, but I can't get it to work. Any suggestions? Also, is there a more standard way to store colors associated with points? If I save them to this "Colors" array, if I gave the file to someone they'd have to write a writer to extract the data from "Colors". It seems like colors would be a very standard thing to want to store/extract? Thanks, David From daviddoria at gmail.com Sun Feb 15 17:03:03 2009 From: daviddoria at gmail.com (David Doria) Date: Sun, 15 Feb 2009 17:03:03 -0500 Subject: [vtkusers] int instead of vtkIdType Message-ID: It seems that vtkIdType is the expected type for indices. ie void GetTupleValue (vtkIdType i, unsigned char *tuple) I usually do unsigned char *tuple; for(int i = 0; i < something; i++ GetTupleValue (i, tuple); Is this a bad idea? Thanks, David From daviddoria at gmail.com Sun Feb 15 17:46:15 2009 From: daviddoria at gmail.com (David Doria) Date: Sun, 15 Feb 2009 17:46:15 -0500 Subject: [vtkusers] vtkPolyData vs vtkUnstructuredGrid Message-ID: I want to store triangulated models (ie a list of triangles). However, I would like to be able to use as many filters as possible. Which format should I use? It seems that more filters are available in ParaView for the file that I write as vtp, but I thought vtu was supposed to be the most general? Thanks, David From mhumperdink at yahoo.com Sun Feb 15 18:29:44 2009 From: mhumperdink at yahoo.com (Marty Humperdink) Date: Sun, 15 Feb 2009 15:29:44 -0800 (PST) Subject: [vtkusers] vtkProbe or vtkShepard? Message-ID: <507061.73079.qm@web112212.mail.gq1.yahoo.com> Hello. I am trying to resample 3D ultrasound data into an image volume. The original data is in spherical coordinates and I have loaded it into a structured grid. What is the best way to resample this into vtkImageData for display and export? If I'm not mistaken it looks like this should be possible with vtkProbe or with vtkShepard. Can anyone suggest which is better or more efficient? thanks MH -------------- next part -------------- An HTML attachment was scrubbed... URL: From mhumperdink at yahoo.com Mon Feb 16 00:32:38 2009 From: mhumperdink at yahoo.com (Marty Humperdink) Date: Sun, 15 Feb 2009 21:32:38 -0800 (PST) Subject: [vtkusers] Help, please. vtkStreamingDemandDrivenPipeline Update extent error Message-ID: <510628.90464.qm@web112210.mail.gq1.yahoo.com> Hi all. I'm working on two separate projects using Tcl/Tk and VTK5.2 and have been stymied by the same error in each. I would be enormously appreciative if anyone could provide some feedback. In one project I'm creating an empty image data set then using vtkStencil to create a voxelized version of a polydata model in it. In the other project I'm loading in some 3D ultrasound data in spherical coordinates, putting it into a vtkStructuredGrid, then trying to probe this using a vtkImageData object in order to resample the unstructured grid into image data. In both projects I'm stuck getting an error that looks like this: vtkStreamingDemandDrivenPipeline (061A8E28): The update extent specified in the information for output port 0 on algorithm .... Unfortunately the error disappears from the vtkOutput window when Windows tosses up one of those 'VTK.exe had to close do you want to send a report' messages so I'm not sure what the entire message reads. I've been trying a wide range of things to work around this error but the fact that has come up in two separate projects leads me to believe that I may not understand the pipeline correctly. In both cases I create an empty vtkImageData, so I've been focusing on this. I've wondered if I need to force and Update (or not), set extents differently or ... If anyone is familiar with this error and could make suggestions (even if they are elementary) it would be a huge help. I've invested a lot of time into this and am now far behind. Thank you very much MH -------------- next part -------------- An HTML attachment was scrubbed... URL: From L.J.vanRuijven at amc.uva.nl Mon Feb 16 02:22:37 2009 From: L.J.vanRuijven at amc.uva.nl (L.J. van Ruijven) Date: Mon, 16 Feb 2009 08:22:37 +0100 Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? In-Reply-To: References: Message-ID: Hi, I have compiled VTK x64 version on XP x64 with Visual Studio 2005. I also combine VTK with 64 bit version of TCL and (since recently) Python. Most of the time my programs use more than 4 GB (once even 12 GB) of RAM. The last time I encountered a problem was about two years ago. If I am correct, this bug has been fixed in V5.0.2. regards, Leo. ----- Original Message ----- From: vtkusers-request at vtk.org Date: Friday, February 13, 2009 6:00 pm Subject: vtkusers Digest, Vol 58, Issue 14 To: vtkusers at vtk.org > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://www.vtk.org/mailman/listinfo/vtkusers > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. vtkImagePlaneWidget with QT (Luis Roberto P. Paula) > 2. Re: OBJ Writer? (Francois Bertel) > 3. Re: OBJ Writer? (Francois Bertel) > 4. Re: Event Handling with SelectionChangedEvent (Aytekin Vargun) > 5. Odd behavior in vtkStreamTracer? (Bridgman, William T.) > 6. ROI using vtkImageTracerWidget (Sercani) > 7. Fieldview <--> Vtk-Format (Werner.Willems at web.de) > 8. is Vtk 5.2.1 64 bit clean? (Igor Mal) > 9. Re: is Vtk 5.2.1 64 bit clean? (Sean McBride) > 10. Re: is Vtk 5.2.1 64 bit clean? (shekharc) > 11. Re: is Vtk 5.2.1 64 bit clean? (Sean McBride) > 12. Re: Odd behavior in vtkStreamTracer? (Berk Geveci) > 13. Re: vtkImagePlaneWidget with QT (Aur?lie Larcher) > 14. Remove parts of the volume displayed (wassim_belhadj at topnet.tn) > 15. QVTK weird linking problem (Giancarlo Amati) > 16. Re: Odd behavior in vtkStreamTracer? (Bridgman, William T.) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 12 Feb 2009 15:01:31 -0200 > From: "Luis Roberto P. Paula" > Subject: [vtkusers] vtkImagePlaneWidget with QT > To: vtkusers > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi All, > > How can I create an application using vtkImagePlaneWidget with QT, > since we > need to use the QVTKWidget to connect VTK and QT? > > Thanks, > Luis > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > > ------------------------------ > > Message: 2 > Date: Thu, 12 Feb 2009 12:02:09 -0500 > From: Francois Bertel > Subject: Re: [vtkusers] OBJ Writer? > To: "vtkusers at vtk.org" > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > There is an OBJ "exporter": VTK/Rendering/vtkOBJExporter.* > > On Thu, Feb 12, 2009 at 11:59 AM, David Doria > wrote: > > There is an OBJ Reader class, but I don't see an OBJ Writer? Am I > > missing it or is there not one? > > > > -- > > Thanks, > > > > David > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > -- > Fran?ois Bertel, PhD | Kitware Inc. Suite 204 > 1 (518) 371 3971 x113 | 28 Corporate Drive > | Clifton Park NY 12065, USA > > > ------------------------------ > > Message: 3 > Date: Thu, 12 Feb 2009 12:11:44 -0500 > From: Francois Bertel > Subject: Re: [vtkusers] OBJ Writer? > To: vtkusers at public.kitware.com > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > Keep the message on the list, please. > > Exporters save a whole 3D scene, whereas writers save a dataset. > Importers load a whole 3D scene, whereas readers load a dataset. > > On Thu, Feb 12, 2009 at 12:03 PM, David Doria > wrote: > > Ah, I didn't see it because I was looking in IO and I was searching > > for Writer! Why the different naming? > > > > On Thu, Feb 12, 2009 at 12:02 PM, Francois Bertel > > wrote: > >> There is an OBJ "exporter": VTK/Rendering/vtkOBJExporter.* > >> > >> On Thu, Feb 12, 2009 at 11:59 AM, David Doria > wrote: > >>> There is an OBJ Reader class, but I don't see an OBJ Writer? Am I > >>> missing it or is there not one? > >>> > >>> -- > >>> Thanks, > >>> > >>> David > >>> _______________________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > >>> > >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://www.vtk.org/mailman/listinfo/vtkusers > >>> > >> > >> > >> > >> -- > >> Fran?ois Bertel, PhD | Kitware Inc. Suite 204 > >> 1 (518) 371 3971 x113 | 28 Corporate Drive > >> | Clifton Park NY 12065, USA > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://www.vtk.org/mailman/listinfo/vtkusers > >> > > > > > > > > -- > > Thanks, > > > > David > > > > > > -- > Fran?ois Bertel, PhD | Kitware Inc. Suite 204 > 1 (518) 371 3971 x113 | 28 Corporate Drive > | Clifton Park NY 12065, USA > > > ------------------------------ > > Message: 4 > Date: Thu, 12 Feb 2009 12:28:14 -0500 > From: Aytekin Vargun > Subject: Re: [vtkusers] Event Handling with SelectionChangedEvent > To: vtkusers at vtk.org > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Thanks a lot Jeff. > This really worked. > > PS: I hope this message won't create a new thread. I apologize if it > happens. > Aytekin > > On Tue, Feb 10, 2009 at 8:38 AM, Jeff Baumes wrote: > > > Hi Aytekin, > > > > Based on previous emails, I believe your "selections" object is a > > vtkDataRepresentation, which does not emit any key press events (or > > mouse events). These events are emitted by the interactor style. So > > you'd do something like > > > > > > win->GetInteractor()->GetInteractorStyle()->AddObserver(vtkCommand::KeyPressEvent, > > callback); > > > > where "win" is your vtkRenderWindow instance. This should be done > > after the SetupRenderWindow call. > > > > Jeff > > > > On Mon, Feb 9, 2009 at 11:11 AM, Aytekin Vargun > wrote: > > > Hi, > > > I am currently having problems with my event handler and would appreciate > > if > > > anybody suggests me a solution. > > > > > > The ProcessVertexSelection (user defined) method is activated > when some > > > selections are made (based on SelectionChangeEvent). Everything > is good > > upto > > > this point. Here is the code for this: > > > > > > edgePicked->SetCallback(network->ProcessVertexSelection); > > > edgePicked->SetClientData((void > > *)static_cast(edgeLink)); > > > selections->AddObserver(vtkCommand::SelectionChangedEvent, edgePicked); > > > > > > This part works and I can get the selections. Now I want to add another > > > functionality: The user may want to delete the current selections > by > > using > > > key 'd' or "delete" whichever is simple to implement. I know that > > GetKeySym > > > can be used to get key symbol. However, if I add the following > code to > > > activate another method to do deletions, the event handler > ignores it. It > > > never activates the method which is named as EVTDelete (in my > code) where > > I > > > plan to check which key is used. > > > > > > delPicked->SetCallback(network->EVTDelete); > > > delPicked->SetClientData((void > > *)static_cast(edgeLink)); > > > selections->AddObserver(vtkCommand::KeyPressEvent, delPicked); > > > > > > Why doesn't my event handler listen do the keypresses other than > the > > default > > > ones? > > > Thanks a lot. > > > Aytekin > > > > > > -- > > > My web page: > > > > > > _______________________________________________ > > > Powered by www.kitware.com > > > > > > Visit other Kitware open-source projects at > > > http://www.kitware.com/opensource/opensource.html > > > > > > Please keep messages on-topic and check the VTK FAQ at: > > > http://www.vtk.org/Wiki/VTK_FAQ > > > > > > Follow this link to subscribe/unsubscribe: > > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > > > > > > > > -- > > Jeff Baumes, Ph.D. > > R&D Engineer, Kitware Inc. > > (518) 371-3971 x132 > > jeff.baumes at kitware.com > > > > > > -- > My web page: http://www.cs.rpi.edu/~vargua > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > > ------------------------------ > > Message: 5 > Date: Thu, 12 Feb 2009 15:28:41 -0500 > From: "Bridgman, William T." > Subject: [vtkusers] Odd behavior in vtkStreamTracer? > To: vtkusers at vtk.org > Message-ID: <8B78E721-3B03-4919-BB55-8D5FB5233D15 at nasa.gov> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > Hello, > > I've been generating some field lines using vtkStreamTracer. The > domain of the field has a hole in the center and I am interested in > > the flow into and out of the hole. > > I've defined my points just outside the spherical hole. The northern > > region has outbound field lines and those are easy. The southern > region has inbound field lines so I set StreamTracer to reverse the > > direction of propagation. In the southern case, the lines seem to > generate okay but are actually *two* nearly perfectly overlaid lines > > with an outbound and inbound components that seem to have a common > node at a position far from the hole. > > I've not yet identified a clear pattern in when it does this. It > does > not happen to every field line in the region. > > I'm using a CVS repository around version 5.2, Linux on 64-bit. > > Any thoughts? > > Thanks, > Tom > -- > Dr. William T."Tom" Bridgman Scientific Visualization > > Studio > Global Science & Technology, Inc. NASA/Goddard Space Flight > > Center > Email: William.T.Bridgman at nasa.gov Code 610.3 > Phone: 301-286-1346 Greenbelt, MD 20771 > FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ > > > > > > > ------------------------------ > > Message: 6 > Date: Thu, 12 Feb 2009 23:33:04 +0200 > From: "Sercani" > Subject: [vtkusers] ROI using vtkImageTracerWidget > To: > Message-ID: <007f01c98d59$81324190$8396c4b0$@com> > Content-Type: text/plain; charset="iso-8859-9" > > Hi everyone; > > I am using vtkImageTracerWidget to draw freehand drawings on a vtkImageActor > (input of this actor is output of the vtkDICOMImageReader). I want to > use > this closed spline for calculating the region area(using the spacing > of > dataset too) and clip this region from image. I have looked at and tested > this example > http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/GUI/Tcl/Im > ageTracerWidget.tcl?root=VTK > mageTracerWidget.tcl?root=VTK&content-type=text/plain> > &content-type=text/plain but couldn't get things clear. How can i get > the > region boundaries and use it for area calculating and clipping image? > > Yours sincerely; > > Sercani.. > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > > ------------------------------ > > Message: 7 > Date: Thu, 12 Feb 2009 22:36:52 +0100 > From: Werner.Willems at web.de > Subject: [vtkusers] Fieldview <--> Vtk-Format > To: vtkusers at vtk.org > Message-ID: <854342461 at web.de> > Content-Type: text/plain; charset=iso-8859-15 > > Does anybody know of a Fieldview to Vtk-Format converter? > > Thanks, > > Werner > > > > > ------------------------------ > > Message: 8 > Date: Thu, 12 Feb 2009 17:46:53 -0800 (PST) > From: Igor Mal > Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? > To: vtkusers at vtk.org > Message-ID: <359422.99375.qm at web51706.mail.re2.yahoo.com> > Content-Type: text/plain; charset="iso-8859-1" > > I've read the VTK FAQ. > ? > It says that "vtk codebase are not 64 bit clean and so runtime > problems are likely if that code is used." > ? > But it looks a bit outdated, since it does not ention any VTK 5.*.* version. > Is anybody?using x64 version of VTK on Windows 64 bit, or can make > any comments on this? > ? > Thanks in advance, > ?? Alex > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > > ------------------------------ > > Message: 9 > Date: Thu, 12 Feb 2009 20:56:16 -0500 > From: "Sean McBride" > Subject: Re: [vtkusers] is Vtk 5.2.1 64 bit clean? > To: , > Message-ID: <20090213015616.1769857463 at kingu.local> > Content-Type: text/plain; charset=ISO-8859-1 > > On 2/12/09 5:46 PM, Igor Mal said: > > >I've read the VTK FAQ. > >? > >It says that "vtk codebase are not 64 bit clean and so runtime problems > >are likely if that code is used." > > It says: "... _parts_ of the vtk codebase are not 64 bit clean...". > > >But it looks a bit outdated, since it does not ention any VTK 5.*.* > version. > > The statement is still true. You can prove it to yourself by turning > on > a compiler warning that warns about size truncation, like converting > size_t to int. > > >Is anybody?using x64 version of VTK on Windows 64 bit, or can make any > >comments on this? > > I'm using VTK on 64 bit Mac OS X. It mostly works well. > > Are you having problems? > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > > > ------------------------------ > > Message: 10 > Date: Fri, 13 Feb 2009 12:58:57 +1100 > From: shekharc > Subject: Re: [vtkusers] is Vtk 5.2.1 64 bit clean? > To: Sean McBride > Cc: vtkusers at vtk.org, istmal at yahoo.com > Message-ID: <4994D3E1.1050507 at sci.monash.edu.au> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Alex, > > Works fine on Windows Vista/XP x64 and Linux x64 fine for me so far. > > Cheers > Shakes > > Sean McBride wrote: > > On 2/12/09 5:46 PM, Igor Mal said: > > > >> I've read the VTK FAQ. > >> > >> It says that "vtk codebase are not 64 bit clean and so runtime problems > >> are likely if that code is used." > > > > It says: "... _parts_ of the vtk codebase are not 64 bit clean...". > > > >> But it looks a bit outdated, since it does not ention any VTK > 5.*.* version. > > > > The statement is still true. You can prove it to yourself by > turning on > > a compiler warning that warns about size truncation, like converting > > size_t to int. > > > >> Is anybody using x64 version of VTK on Windows 64 bit, or can make > any > >> comments on this? > > > > I'm using VTK on 64 bit Mac OS X. It mostly works well. > > > > Are you having problems? > > > > > ------------------------------ > > Message: 11 > Date: Thu, 12 Feb 2009 21:02:04 -0500 > From: "Sean McBride" > Subject: Re: [vtkusers] is Vtk 5.2.1 64 bit clean? > To: shekharc > Cc: vtkusers at vtk.org, istmal at yahoo.com > Message-ID: <20090213020204.2120989307 at kingu.local> > Content-Type: text/plain; charset=ISO-8859-1 > > On 2/13/09 12:58 PM, shekharc said: > > >Works fine on Windows Vista/XP x64 and Linux x64 fine for me so far. > > Out of curiosity, are you using datasets > 4 GiB? > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > > > ------------------------------ > > Message: 12 > Date: Thu, 12 Feb 2009 22:30:26 -0500 > From: Berk Geveci > Subject: Re: [vtkusers] Odd behavior in vtkStreamTracer? > To: "Bridgman, William T." > Cc: vtkusers at vtk.org > Message-ID: > <45d654b0902121930p3fcbc31cmf2bfb01f551e57ca at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi Tom, > > Can you share data and maybe a script that demonstrate the problem? > > -berk > > On Thu, Feb 12, 2009 at 3:28 PM, Bridgman, William T. > wrote: > > Hello, > > > > I've been generating some field lines using vtkStreamTracer. The > domain of > > the field has a hole in the center and I am interested in the flow > into and > > out of the hole. > > > > I've defined my points just outside the spherical hole. The > northern region > > has outbound field lines and those are easy. The southern region has > > inbound field lines so I set StreamTracer to reverse the direction > of > > propagation. In the southern case, the lines seem to generate okay > but are > > actually *two* nearly perfectly overlaid lines with an outbound and > inbound > > components that seem to have a common node at a position far from > the hole. > > > > I've not yet identified a clear pattern in when it does this. It > does not > > happen to every field line in the region. > > > > I'm using a CVS repository around version 5.2, Linux on 64-bit. > > > > Any thoughts? > > > > Thanks, > > Tom > > -- > > Dr. William T."Tom" Bridgman Scientific Visualization > Studio > > Global Science & Technology, Inc. NASA/Goddard Space > Flight Center > > Email: William.T.Bridgman at nasa.gov Code 610.3 > > Phone: 301-286-1346 Greenbelt, MD 20771 > > FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ > > > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > ------------------------------ > > Message: 13 > Date: Fri, 13 Feb 2009 09:16:15 +0100 > From: Aur?lie Larcher > Subject: Re: [vtkusers] vtkImagePlaneWidget with QT > To: "Luis Roberto P. Paula" , vtkusers at vtk.org > Message-ID: <49952C4F.9010204 at imag.fr> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Luis, > In the same way as usually. > All you construct in your vtkRenderWindow will be restored in your > QVTKWidget, even your vtkImagePlaneWidget. > > (...) > my_interactor->SetRenderWindow(my_vtkRenderWindow); > my_imagePlaneWidget->SetInteractor(my_interactor); > my_QVTKWidget->GetRenderWindow()->AddRenderer(my_vtkRenderer); > my_QVTKWidget->SetRenderWindow(my_vtkRenderWindow); > (...) > > Aur?lie > > Luis Roberto P. Paula a ?crit : > > Hi All, > > > > How can I create an application using vtkImagePlaneWidget with QT, > > > since we need to use the QVTKWidget to connect VTK and QT? > > > > Thanks, > > Luis > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > ------------------------------ > > Message: 14 > Date: Fri, 13 Feb 2009 10:39:10 +0100 > From: > Subject: [vtkusers] Remove parts of the volume displayed > To: vtkusers at vtk.org > Message-ID: <21c650e95915a4ed3d57b809bb5721e7 at pop.topnet.tn> > Content-Type: text/plain; charset="utf-8" > > Hi, > > I'am using vtk for Volume Rendering and Qt4. > > I want to remove parts of the volume displayed (unnecessary parts). > > Is there a VTK tool (an eraser) which provides this functionality. > > I tried to use vtkBoxWidget but I have not been able to delineate the > parts > that are between the two perpendicular planes of the BOx > > Attached a screenshot that illustrates the problem. > > Can someone help me... > > Best Regards, > BELHADJ Wassim > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: ScreenShot.jpg > Type: image/jpeg > Size: 3131 bytes > Desc: not available > URL: < > > ------------------------------ > > Message: 15 > Date: Fri, 13 Feb 2009 13:08:12 +0100 > From: Giancarlo Amati > Subject: [vtkusers] QVTK weird linking problem > To: , > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > > > Good morning, > sorry for sending this mail twice but not sure which group is better. > Anyway compiled the VTK with the option for QT enabled producing the > QVTK.lib that I link in my program where I > insert a QVTKWidget. > So, as I'm programming in Visual Studio 2005 I added that LIB file in > the sequece of LIBs in the linking properties. > So, this problem remarks that It cant link SetRenderWindow.....and I > can't understand why, any suggestions is really appreciated! > > 1>------ Build started: Project: dioramaQT, Configuration: Debug > Win32 ------ > 1>Linking... > > 1>main.obj : error LNK2019: unresolved external symbol "public: void > __thiscall QVTKWidget::SetRenderWindow(class vtkRenderWindow *)" > (?SetRenderWindow at QVTKWidget@@QAEXPAVvtkRenderWindow@@@Z) referenced > in function _main > > 1>C:\KCLSoftware\DIORAMAQT\dioramaQT\Debug\dioramaQT.exe : fatal > error LNK1120: 1 unresolved externals > 1>Build log was saved at "file://c:\KCLSoftware\DIORAMAQT\dioramaQT\Debug\BuildLog.htm" > 1>dioramaQT - 2 error(s), 0 warning(s) > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== > > > Many Thanks > Giancarlo > > _________________________________________________________________ > Vai oltre le parole, scarica Messenger 2009! > http://www.messenger.it > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > > ------------------------------ > > Message: 16 > Date: Fri, 13 Feb 2009 11:31:52 -0500 > From: "Bridgman, William T." > Subject: Re: [vtkusers] Odd behavior in vtkStreamTracer? > To: vtkusers at vtk.org > Cc: Berk Geveci > Message-ID: > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > I wish I could isolate the problem for reliable reproduction. As it > > is, it appears to affect only some of the lines I generate and the > criteria I have found are not 100% reliable. > > One thing that seems to reduce the problem is if I reduce the maximum > > number of steps allowed. I was using 2500 but the problem is > significantly reduced when I limit to 1300. I'll probably try > dropping it below 1000 to see if that helps also. > > Could there be a hard limit on the maximum number of points in > vtkStreamTracer? I tried examining some of the vtk code but don't > see > an obvious connection. > > Tom > On Feb 12, 2009, at 10:30 PM, Berk Geveci wrote: > > > Hi Tom, > > > > Can you share data and maybe a script that demonstrate the problem? > > > > -berk > > > > On Thu, Feb 12, 2009 at 3:28 PM, Bridgman, William T. > > wrote: > >> Hello, > >> > >> I've been generating some field lines using vtkStreamTracer. The > > >> domain of > >> the field has a hole in the center and I am interested in the flow > > >> into and > >> out of the hole. > >> > >> I've defined my points just outside the spherical hole. The > >> northern region > >> has outbound field lines and those are easy. The southern region > has > >> inbound field lines so I set StreamTracer to reverse the direction > of > >> propagation. In the southern case, the lines seem to generate > okay > >> but are > >> actually *two* nearly perfectly overlaid lines with an outbound > and > >> inbound > >> components that seem to have a common node at a position far from > > >> the hole. > >> > >> I've not yet identified a clear pattern in when it does this. It > > >> does not > >> happen to every field line in the region. > >> > >> I'm using a CVS repository around version 5.2, Linux on 64-bit. > >> > >> Any thoughts? > >> > >> Thanks, > >> Tom > >> -- > >> Dr. William T."Tom" Bridgman Scientific > Visualization > >> Studio > >> Global Science & Technology, Inc. NASA/Goddard Space > >> Flight Center > >> Email: William.T.Bridgman at nasa.gov Code 610.3 > >> Phone: 301-286-1346 Greenbelt, MD 20771 > >> FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ > >> > >> > >> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://www.vtk.org/mailman/listinfo/vtkusers > >> > > -- > Dr. William T."Tom" Bridgman Scientific Visualization > > Studio > Global Science & Technology, Inc. NASA/Goddard Space Flight > > Center > Email: William.T.Bridgman at nasa.gov Code 610.3 > Phone: 301-286-1346 Greenbelt, MD 20771 > FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ > > > > > > > ------------------------------ > > _______________________________________________ > vtkusers mailing list > vtkusers at vtk.org > http://www.vtk.org/mailman/listinfo/vtkusers > > > End of vtkusers Digest, Vol 58, Issue 14 > **************************************** > -------------- next part -------------- A non-text attachment was scrubbed... Name: L.J.vanRuijven.vcf Type: text/x-vcard Size: 261 bytes Desc: Card for "L.J. van Ruijven" URL: From L.J.vanRuijven at amc.uva.nl Mon Feb 16 02:49:34 2009 From: L.J.vanRuijven at amc.uva.nl (L.J. van Ruijven) Date: Mon, 16 Feb 2009 08:49:34 +0100 Subject: [vtkusers] Problems with vtk and python wrapping under vista 64 Message-ID: Hi Rocco, It means that the linker has encountered a reference to "__imp_PyList_Insert", but did not find a definition of it. So you must help the linker to find the definition. You might have omitted source files, or libraries, or did not give the correct search path to the compiler. It helps if you first find out where "__imp_PyList_Insert" is defined? I also had trouble compiling Python. But now the 'Windows AMD64 installer' is availble (http://www.python.org/download/). I installed it on my XP x64, and after that VTK also compiled with Python enabled. regards, Leo. -------------- next part -------------- A non-text attachment was scrubbed... Name: L.J.vanRuijven.vcf Type: text/x-vcard Size: 261 bytes Desc: Card for "L.J. van Ruijven" URL: From post at rocco-gasteiger.de Mon Feb 16 04:40:45 2009 From: post at rocco-gasteiger.de (Rocco Gasteiger) Date: Mon, 16 Feb 2009 10:40:45 +0100 Subject: [vtkusers] Problems with vtk and python wrapping under vista 64 In-Reply-To: References: Message-ID: <001501c9901a$a42298d0$ec67ca70$@de> Hi all, my problem is solved. Indeed, it was the wrong python version for my vista 64. After I installed the Windows AMD64 installer, VTK with Python wrapping compiled without errors only some. Much thanks to Leo and David for your help! Now, I have only one error left. I get some strange linking errors for the project vtkRenderingPythonTkWidgets. Something with my Tcl/Tk installation must be wrong. I use the ActiveStateTcl version 8.4.14. I found no 64 bit installer. Anyway, this is not so important for me. I'm just deactivate this project in my VTK solution. Best regards, Rocco Gasteiger Dipl.-Ing. Rocco Gasteiger Department of Simulation and Graphics, School of Computer Science Otto-von-Guericke-University Magdeburg Universit?tsplatz 2, 39106 Magdeburg GERMANY Phone: (+49-391) 67-1 27 59 Fax: (+49 391) 67-1 11 64 Email: gasteiger at isg.cs.uni-magdeburg.de Web: http://wwwisg.cs.uni-magdeburg.de/cv/ From msvinod+vtk at gmail.com Mon Feb 16 04:45:08 2009 From: msvinod+vtk at gmail.com (NIPL) Date: Mon, 16 Feb 2009 01:45:08 -0800 (PST) Subject: [vtkusers] Draw 2D Ellipse annotation/overlay over a 2D graphics object Message-ID: <22034221.post@talk.nabble.com> Hi all, I want to draw a 2D ellipse annotation over a DICOM image loaded in a 2D View. There is no builtin function/class for ellipse. But there is a vtkSphereSource and it is 3D. Can I derive a 2D ellipse from it by using vtkPolyDataMapper2D? I tried using the vtkPoints first and have some issues. I am using the vtkDotnet wrapper for c#. I have done like this: Method 1: vtk.vtkPoints ellipsePoints = new vtk.vtkPoints(); double angle = 0; double r1, r2; int id = 0; int CenterX = 0, CenterY = 0; CenterX = 100; CenterY = 100; r1 = 40; r2 = 20; while (angle <= 2F * Math.PI + (Math.PI / 30F)) { ellipsePoints.InsertPoint(id, r1 * Math.Cos(angle) + CenterX, r2 * Math.Sin(angle) + CenterY, 0); angle = angle + (Math.PI / 30F); id++; } vtk.vtkPolyLine ellipse = new vtk.vtkPolyLine(); ellipse.GetPointIds().SetNumberOfIds(id); for (int i = 0; i < id; i++) { ellipse.GetPointIds().SetId(i, i); } vtk.vtkUnstructuredGrid grid = new vtk.vtkUnstructuredGrid(); grid.Allocate(1, 1); grid.InsertNextCell(ellipse.GetCellType(), ellipse.GetPointIds()); grid.SetPoints(ellipsePoints); grid.Update(); vtk.vtkDataSetMapper m = new vtk.vtkDataSetMapper(); m.SetInput(grid); m.SetColorModeToMapScalars(); vtk.vtkActor aSphere = new vtk.vtkActor(); aSphere.SetMapper(m); aSphere.GetProperty().SetColor(0, 0, 1); // color blue aSphere.GetProperty().SetInterpolationToFlat(); aSphere.VisibilityOn(); // a renderer for the data //vtk.vtkRenderer ren1 = new vtk.vtkRenderer(); irenderer.AddActor(aSphere); iwindow.Render(); But the ellipse is no visible while i draw. Method 2: vtk.vtkSphereSource vtkEllipse = new vtk.vtkSphereSource(); vtkEllipse.SetRadius(100); vtkEllipse.SetCenter(100, 100, 0); vtkEllipse.SetThetaResolution(360); vtkEllipse.SetPhiResolution(90); vtkEllipse.SetEndPhi(90); vtkEllipse.SetStartPhi(70); vtk.vtkTransformPolyDataFilter tf = new vtk.vtkTransformPolyDataFilter(); vtk.vtkTransform tr = new vtk.vtkTransform(); tr.Identity(); tf.SetInput(vtkEllipse.GetOutput()); tf.SetTransform(tr); tf.Update(); vtk.vtkPolyDataMapper2D m = new vtk.vtkPolyDataMapper2D(); vtk.vtkActor2D vtkActor = new vtk.vtkActor2D(); m.SetInput(tf.GetOutput()); vtkActor.SetMapper(m); vtkActor.VisibilityOn(); vtkActor.GetProperty().SetColor(1, .5, 0); irenderer.AddViewProp(vtkActor); iwindow.Render(); But this is not what i want. the line width is not correct. Method 3: double angle = 0; double r1, r2; int id = 0; int CenterX , CenterY; CenterX = 100; CenterY = 100; r1 = 40; r2 = 20; vtk.vtkPoints ellipsePoints = new vtk.vtkPoints(); ellipsePoints.SetNumberOfPoints(31); while (angle <= 2F * Math.PI + (Math.PI / 30F)) { ellipsePoints.SetPoint(id, r1 * Math.Cos(angle) + CenterX, r2 * Math.Sin(angle) + CenterY, 0); angle = angle + (Math.PI / 30F); id++; } //id = ellipsePoints.GetNumberOfPoints(); vtk.vtkCellArray c_lines = new vtk.vtkCellArray(); c_lines.Allocate(1, 1); c_lines.InsertNextCell(id); c_lines.SetNumberOfCells(id); for (int k = 0; k < id; ++k) c_lines.InsertCellPoint(k); vtk.vtkPolyData c_polyData = new vtk.vtkPolyData(); c_polyData.ReleaseDataFlagOn(); c_polyData.Allocate(1, 1); c_polyData.SetPoints(ellipsePoints); c_polyData.SetLines(c_lines); vtk.vtkPolyDataMapper2D c_polyDataMapper = new vtk.vtkPolyDataMapper2D(); c_polyDataMapper.SetInput(c_polyData); vtk.vtkActor2D c_actor = new vtk.vtkActor2D(); //c_actor.GetProperty().SetOpacity(.50); //c_actor.GetProperty().SetLineWidth(2.0f); c_actor.SetMapper(c_polyDataMapper); c_actor.VisibilityOn(); c_actor.GetProperty().SetColor(1, .5, 0); irenderer.AddViewProp(c_actor); iwindow.Render(); c_polyData.Dispose(); c_lines.Dispose(); ellipsePoints.Dispose(); This one is working fine. I can see the ellipse and it looks great. But when I draw a second ellipse on same image, it crashes. The constructor returns null pointer. Is my logic correct or am I missing something? The Method 1 is not crashing but it is is not visible. Can anyone please help me fixing it? Thanks in advance. -- View this message in context: http://www.nabble.com/Draw-2D-Ellipse-annotation-overlay-over-a-2D-graphics-object-tp22034221p22034221.html Sent from the VTK - Users mailing list archive at Nabble.com. From post at rocco-gasteiger.de Mon Feb 16 04:52:05 2009 From: post at rocco-gasteiger.de (Rocco Gasteiger) Date: Mon, 16 Feb 2009 10:52:05 +0100 Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? In-Reply-To: References: Message-ID: <001601c9901c$39d0a970$ad71fc50$@de> Hi Leo, You mentioned that you have an 64 bit version of TCL/Tk? I've searched for such an version but without success. Where have you found it or do you build your own 64 bit version from the sources? Thanks in advanced, Rocco -------------------------------------------------- Dipl.-Ing. Rocco Gasteiger Otto-von-Guericke University Faculty of Computer Science Department of Simulation and Graphics Universit?tsplatz 2, 39106 Magdeburg, Germany Office: G29-223 Phone: +49 391 67 127 59 Fax:?? +49 391 67 111 64 Website: http://wwwisg.cs.uni-magdeburg.de/cvcms/ -------------------------------------------------- -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of L.J. van Ruijven Sent: Monday, February 16, 2009 8:23 AM To: vtkusers at vtk.org Cc: vtkusers at vtk.org; istmal at yahoo.com Subject: Re: [vtkusers] is Vtk 5.2.1 64 bit clean? Hi, I have compiled VTK x64 version on XP x64 with Visual Studio 2005. I also combine VTK with 64 bit version of TCL and (since recently) Python. Most of the time my programs use more than 4 GB (once even 12 GB) of RAM. The last time I encountered a problem was about two years ago. If I am correct, this bug has been fixed in V5.0.2. regards, Leo. ----- Original Message ----- From: vtkusers-request at vtk.org Date: Friday, February 13, 2009 6:00 pm Subject: vtkusers Digest, Vol 58, Issue 14 To: vtkusers at vtk.org > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://www.vtk.org/mailman/listinfo/vtkusers > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. vtkImagePlaneWidget with QT (Luis Roberto P. Paula) > 2. Re: OBJ Writer? (Francois Bertel) > 3. Re: OBJ Writer? (Francois Bertel) > 4. Re: Event Handling with SelectionChangedEvent (Aytekin Vargun) > 5. Odd behavior in vtkStreamTracer? (Bridgman, William T.) > 6. ROI using vtkImageTracerWidget (Sercani) > 7. Fieldview <--> Vtk-Format (Werner.Willems at web.de) > 8. is Vtk 5.2.1 64 bit clean? (Igor Mal) > 9. Re: is Vtk 5.2.1 64 bit clean? (Sean McBride) > 10. Re: is Vtk 5.2.1 64 bit clean? (shekharc) > 11. Re: is Vtk 5.2.1 64 bit clean? (Sean McBride) > 12. Re: Odd behavior in vtkStreamTracer? (Berk Geveci) > 13. Re: vtkImagePlaneWidget with QT (Aur?lie Larcher) > 14. Remove parts of the volume displayed (wassim_belhadj at topnet.tn) > 15. QVTK weird linking problem (Giancarlo Amati) > 16. Re: Odd behavior in vtkStreamTracer? (Bridgman, William T.) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 12 Feb 2009 15:01:31 -0200 > From: "Luis Roberto P. Paula" > Subject: [vtkusers] vtkImagePlaneWidget with QT > To: vtkusers > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi All, > > How can I create an application using vtkImagePlaneWidget with QT, > since we > need to use the QVTKWidget to connect VTK and QT? > > Thanks, > Luis > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > > ------------------------------ > > Message: 2 > Date: Thu, 12 Feb 2009 12:02:09 -0500 > From: Francois Bertel > Subject: Re: [vtkusers] OBJ Writer? > To: "vtkusers at vtk.org" > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > There is an OBJ "exporter": VTK/Rendering/vtkOBJExporter.* > > On Thu, Feb 12, 2009 at 11:59 AM, David Doria > wrote: > > There is an OBJ Reader class, but I don't see an OBJ Writer? Am I > > missing it or is there not one? > > > > -- > > Thanks, > > > > David > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > -- > Fran?ois Bertel, PhD | Kitware Inc. Suite 204 > 1 (518) 371 3971 x113 | 28 Corporate Drive > | Clifton Park NY 12065, USA > > > ------------------------------ > > Message: 3 > Date: Thu, 12 Feb 2009 12:11:44 -0500 > From: Francois Bertel > Subject: Re: [vtkusers] OBJ Writer? > To: vtkusers at public.kitware.com > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > Keep the message on the list, please. > > Exporters save a whole 3D scene, whereas writers save a dataset. > Importers load a whole 3D scene, whereas readers load a dataset. > > On Thu, Feb 12, 2009 at 12:03 PM, David Doria > wrote: > > Ah, I didn't see it because I was looking in IO and I was searching > > for Writer! Why the different naming? > > > > On Thu, Feb 12, 2009 at 12:02 PM, Francois Bertel > > wrote: > >> There is an OBJ "exporter": VTK/Rendering/vtkOBJExporter.* > >> > >> On Thu, Feb 12, 2009 at 11:59 AM, David Doria > wrote: > >>> There is an OBJ Reader class, but I don't see an OBJ Writer? Am I > >>> missing it or is there not one? > >>> > >>> -- > >>> Thanks, > >>> > >>> David > >>> _______________________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > >>> > >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://www.vtk.org/mailman/listinfo/vtkusers > >>> > >> > >> > >> > >> -- > >> Fran?ois Bertel, PhD | Kitware Inc. Suite 204 > >> 1 (518) 371 3971 x113 | 28 Corporate Drive > >> | Clifton Park NY 12065, USA > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://www.vtk.org/mailman/listinfo/vtkusers > >> > > > > > > > > -- > > Thanks, > > > > David > > > > > > -- > Fran?ois Bertel, PhD | Kitware Inc. Suite 204 > 1 (518) 371 3971 x113 | 28 Corporate Drive > | Clifton Park NY 12065, USA > > > ------------------------------ > > Message: 4 > Date: Thu, 12 Feb 2009 12:28:14 -0500 > From: Aytekin Vargun > Subject: Re: [vtkusers] Event Handling with SelectionChangedEvent > To: vtkusers at vtk.org > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Thanks a lot Jeff. > This really worked. > > PS: I hope this message won't create a new thread. I apologize if it > happens. > Aytekin > > On Tue, Feb 10, 2009 at 8:38 AM, Jeff Baumes wrote: > > > Hi Aytekin, > > > > Based on previous emails, I believe your "selections" object is a > > vtkDataRepresentation, which does not emit any key press events (or > > mouse events). These events are emitted by the interactor style. So > > you'd do something like > > > > > > win->GetInteractor()->GetInteractorStyle()->AddObserver(vtkCommand::KeyPress Event, > > callback); > > > > where "win" is your vtkRenderWindow instance. This should be done > > after the SetupRenderWindow call. > > > > Jeff > > > > On Mon, Feb 9, 2009 at 11:11 AM, Aytekin Vargun > wrote: > > > Hi, > > > I am currently having problems with my event handler and would appreciate > > if > > > anybody suggests me a solution. > > > > > > The ProcessVertexSelection (user defined) method is activated > when some > > > selections are made (based on SelectionChangeEvent). Everything > is good > > upto > > > this point. Here is the code for this: > > > > > > edgePicked->SetCallback(network->ProcessVertexSelection); > > > edgePicked->SetClientData((void > > *)static_cast(edgeLink)); > > > selections->AddObserver(vtkCommand::SelectionChangedEvent, edgePicked); > > > > > > This part works and I can get the selections. Now I want to add another > > > functionality: The user may want to delete the current selections > by > > using > > > key 'd' or "delete" whichever is simple to implement. I know that > > GetKeySym > > > can be used to get key symbol. However, if I add the following > code to > > > activate another method to do deletions, the event handler > ignores it. It > > > never activates the method which is named as EVTDelete (in my > code) where > > I > > > plan to check which key is used. > > > > > > delPicked->SetCallback(network->EVTDelete); > > > delPicked->SetClientData((void > > *)static_cast(edgeLink)); > > > selections->AddObserver(vtkCommand::KeyPressEvent, delPicked); > > > > > > Why doesn't my event handler listen do the keypresses other than > the > > default > > > ones? > > > Thanks a lot. > > > Aytekin > > > > > > -- > > > My web page: > > > > > > _______________________________________________ > > > Powered by www.kitware.com > > > > > > Visit other Kitware open-source projects at > > > http://www.kitware.com/opensource/opensource.html > > > > > > Please keep messages on-topic and check the VTK FAQ at: > > > http://www.vtk.org/Wiki/VTK_FAQ > > > > > > Follow this link to subscribe/unsubscribe: > > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > > > > > > > > -- > > Jeff Baumes, Ph.D. > > R&D Engineer, Kitware Inc. > > (518) 371-3971 x132 > > jeff.baumes at kitware.com > > > > > > -- > My web page: http://www.cs.rpi.edu/~vargua > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > > ------------------------------ > > Message: 5 > Date: Thu, 12 Feb 2009 15:28:41 -0500 > From: "Bridgman, William T." > Subject: [vtkusers] Odd behavior in vtkStreamTracer? > To: vtkusers at vtk.org > Message-ID: <8B78E721-3B03-4919-BB55-8D5FB5233D15 at nasa.gov> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > Hello, > > I've been generating some field lines using vtkStreamTracer. The > domain of the field has a hole in the center and I am interested in > > the flow into and out of the hole. > > I've defined my points just outside the spherical hole. The northern > > region has outbound field lines and those are easy. The southern > region has inbound field lines so I set StreamTracer to reverse the > > direction of propagation. In the southern case, the lines seem to > generate okay but are actually *two* nearly perfectly overlaid lines > > with an outbound and inbound components that seem to have a common > node at a position far from the hole. > > I've not yet identified a clear pattern in when it does this. It > does > not happen to every field line in the region. > > I'm using a CVS repository around version 5.2, Linux on 64-bit. > > Any thoughts? > > Thanks, > Tom > -- > Dr. William T."Tom" Bridgman Scientific Visualization > > Studio > Global Science & Technology, Inc. NASA/Goddard Space Flight > > Center > Email: William.T.Bridgman at nasa.gov Code 610.3 > Phone: 301-286-1346 Greenbelt, MD 20771 > FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ > > > > > > > ------------------------------ > > Message: 6 > Date: Thu, 12 Feb 2009 23:33:04 +0200 > From: "Sercani" > Subject: [vtkusers] ROI using vtkImageTracerWidget > To: > Message-ID: <007f01c98d59$81324190$8396c4b0$@com> > Content-Type: text/plain; charset="iso-8859-9" > > Hi everyone; > > I am using vtkImageTracerWidget to draw freehand drawings on a vtkImageActor > (input of this actor is output of the vtkDICOMImageReader). I want to > use > this closed spline for calculating the region area(using the spacing > of > dataset too) and clip this region from image. I have looked at and tested > this example > http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/GUI/Tcl/Im > ageTracerWidget.tcl?root=VTK > mageTracerWidget.tcl?root=VTK&content-type=text/plain> > &content-type=text/plain but couldn't get things clear. How can i get > the > region boundaries and use it for area calculating and clipping image? > > Yours sincerely; > > Sercani.. > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > > ------------------------------ > > Message: 7 > Date: Thu, 12 Feb 2009 22:36:52 +0100 > From: Werner.Willems at web.de > Subject: [vtkusers] Fieldview <--> Vtk-Format > To: vtkusers at vtk.org > Message-ID: <854342461 at web.de> > Content-Type: text/plain; charset=iso-8859-15 > > Does anybody know of a Fieldview to Vtk-Format converter? > > Thanks, > > Werner > > > > > ------------------------------ > > Message: 8 > Date: Thu, 12 Feb 2009 17:46:53 -0800 (PST) > From: Igor Mal > Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? > To: vtkusers at vtk.org > Message-ID: <359422.99375.qm at web51706.mail.re2.yahoo.com> > Content-Type: text/plain; charset="iso-8859-1" > > I've read the VTK FAQ. > ? > It says that "vtk codebase are not 64 bit clean and so runtime > problems are likely if that code is used." > ? > But it looks a bit outdated, since it does not ention any VTK 5.*.* version. > Is anybody?using x64 version of VTK on Windows 64 bit, or can make > any comments on this? > ? > Thanks in advance, > ?? Alex > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > > ------------------------------ > > Message: 9 > Date: Thu, 12 Feb 2009 20:56:16 -0500 > From: "Sean McBride" > Subject: Re: [vtkusers] is Vtk 5.2.1 64 bit clean? > To: , > Message-ID: <20090213015616.1769857463 at kingu.local> > Content-Type: text/plain; charset=ISO-8859-1 > > On 2/12/09 5:46 PM, Igor Mal said: > > >I've read the VTK FAQ. > >? > >It says that "vtk codebase are not 64 bit clean and so runtime problems > >are likely if that code is used." > > It says: "... _parts_ of the vtk codebase are not 64 bit clean...". > > >But it looks a bit outdated, since it does not ention any VTK 5.*.* > version. > > The statement is still true. You can prove it to yourself by turning > on > a compiler warning that warns about size truncation, like converting > size_t to int. > > >Is anybody?using x64 version of VTK on Windows 64 bit, or can make any > >comments on this? > > I'm using VTK on 64 bit Mac OS X. It mostly works well. > > Are you having problems? > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > > > ------------------------------ > > Message: 10 > Date: Fri, 13 Feb 2009 12:58:57 +1100 > From: shekharc > Subject: Re: [vtkusers] is Vtk 5.2.1 64 bit clean? > To: Sean McBride > Cc: vtkusers at vtk.org, istmal at yahoo.com > Message-ID: <4994D3E1.1050507 at sci.monash.edu.au> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Alex, > > Works fine on Windows Vista/XP x64 and Linux x64 fine for me so far. > > Cheers > Shakes > > Sean McBride wrote: > > On 2/12/09 5:46 PM, Igor Mal said: > > > >> I've read the VTK FAQ. > >> > >> It says that "vtk codebase are not 64 bit clean and so runtime problems > >> are likely if that code is used." > > > > It says: "... _parts_ of the vtk codebase are not 64 bit clean...". > > > >> But it looks a bit outdated, since it does not ention any VTK > 5.*.* version. > > > > The statement is still true. You can prove it to yourself by > turning on > > a compiler warning that warns about size truncation, like converting > > size_t to int. > > > >> Is anybody using x64 version of VTK on Windows 64 bit, or can make > any > >> comments on this? > > > > I'm using VTK on 64 bit Mac OS X. It mostly works well. > > > > Are you having problems? > > > > > ------------------------------ > > Message: 11 > Date: Thu, 12 Feb 2009 21:02:04 -0500 > From: "Sean McBride" > Subject: Re: [vtkusers] is Vtk 5.2.1 64 bit clean? > To: shekharc > Cc: vtkusers at vtk.org, istmal at yahoo.com > Message-ID: <20090213020204.2120989307 at kingu.local> > Content-Type: text/plain; charset=ISO-8859-1 > > On 2/13/09 12:58 PM, shekharc said: > > >Works fine on Windows Vista/XP x64 and Linux x64 fine for me so far. > > Out of curiosity, are you using datasets > 4 GiB? > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > > > ------------------------------ > > Message: 12 > Date: Thu, 12 Feb 2009 22:30:26 -0500 > From: Berk Geveci > Subject: Re: [vtkusers] Odd behavior in vtkStreamTracer? > To: "Bridgman, William T." > Cc: vtkusers at vtk.org > Message-ID: > <45d654b0902121930p3fcbc31cmf2bfb01f551e57ca at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi Tom, > > Can you share data and maybe a script that demonstrate the problem? > > -berk > > On Thu, Feb 12, 2009 at 3:28 PM, Bridgman, William T. > wrote: > > Hello, > > > > I've been generating some field lines using vtkStreamTracer. The > domain of > > the field has a hole in the center and I am interested in the flow > into and > > out of the hole. > > > > I've defined my points just outside the spherical hole. The > northern region > > has outbound field lines and those are easy. The southern region has > > inbound field lines so I set StreamTracer to reverse the direction > of > > propagation. In the southern case, the lines seem to generate okay > but are > > actually *two* nearly perfectly overlaid lines with an outbound and > inbound > > components that seem to have a common node at a position far from > the hole. > > > > I've not yet identified a clear pattern in when it does this. It > does not > > happen to every field line in the region. > > > > I'm using a CVS repository around version 5.2, Linux on 64-bit. > > > > Any thoughts? > > > > Thanks, > > Tom > > -- > > Dr. William T."Tom" Bridgman Scientific Visualization > Studio > > Global Science & Technology, Inc. NASA/Goddard Space > Flight Center > > Email: William.T.Bridgman at nasa.gov Code 610.3 > > Phone: 301-286-1346 Greenbelt, MD 20771 > > FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ > > > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > ------------------------------ > > Message: 13 > Date: Fri, 13 Feb 2009 09:16:15 +0100 > From: Aur?lie Larcher > Subject: Re: [vtkusers] vtkImagePlaneWidget with QT > To: "Luis Roberto P. Paula" , vtkusers at vtk.org > Message-ID: <49952C4F.9010204 at imag.fr> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Luis, > In the same way as usually. > All you construct in your vtkRenderWindow will be restored in your > QVTKWidget, even your vtkImagePlaneWidget. > > (...) > my_interactor->SetRenderWindow(my_vtkRenderWindow); > my_imagePlaneWidget->SetInteractor(my_interactor); > my_QVTKWidget->GetRenderWindow()->AddRenderer(my_vtkRenderer); > my_QVTKWidget->SetRenderWindow(my_vtkRenderWindow); > (...) > > Aur?lie > > Luis Roberto P. Paula a ?crit : > > Hi All, > > > > How can I create an application using vtkImagePlaneWidget with QT, > > > since we need to use the QVTKWidget to connect VTK and QT? > > > > Thanks, > > Luis > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > ------------------------------ > > Message: 14 > Date: Fri, 13 Feb 2009 10:39:10 +0100 > From: > Subject: [vtkusers] Remove parts of the volume displayed > To: vtkusers at vtk.org > Message-ID: <21c650e95915a4ed3d57b809bb5721e7 at pop.topnet.tn> > Content-Type: text/plain; charset="utf-8" > > Hi, > > I'am using vtk for Volume Rendering and Qt4. > > I want to remove parts of the volume displayed (unnecessary parts). > > Is there a VTK tool (an eraser) which provides this functionality. > > I tried to use vtkBoxWidget but I have not been able to delineate the > parts > that are between the two perpendicular planes of the BOx > > Attached a screenshot that illustrates the problem. > > Can someone help me... > > Best Regards, > BELHADJ Wassim > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: ScreenShot.jpg > Type: image/jpeg > Size: 3131 bytes > Desc: not available > URL: < > > ------------------------------ > > Message: 15 > Date: Fri, 13 Feb 2009 13:08:12 +0100 > From: Giancarlo Amati > Subject: [vtkusers] QVTK weird linking problem > To: , > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > > > Good morning, > sorry for sending this mail twice but not sure which group is better. > Anyway compiled the VTK with the option for QT enabled producing the > QVTK.lib that I link in my program where I > insert a QVTKWidget. > So, as I'm programming in Visual Studio 2005 I added that LIB file in > the sequece of LIBs in the linking properties. > So, this problem remarks that It cant link SetRenderWindow.....and I > can't understand why, any suggestions is really appreciated! > > 1>------ Build started: Project: dioramaQT, Configuration: Debug > Win32 ------ > 1>Linking... > > 1>main.obj : error LNK2019: unresolved external symbol "public: void > __thiscall QVTKWidget::SetRenderWindow(class vtkRenderWindow *)" > (?SetRenderWindow at QVTKWidget@@QAEXPAVvtkRenderWindow@@@Z) referenced > in function _main > > 1>C:\KCLSoftware\DIORAMAQT\dioramaQT\Debug\dioramaQT.exe : fatal > error LNK1120: 1 unresolved externals > 1>Build log was saved at "file://c:\KCLSoftware\DIORAMAQT\dioramaQT\Debug\BuildLog.htm" > 1>dioramaQT - 2 error(s), 0 warning(s) > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== > > > Many Thanks > Giancarlo > > _________________________________________________________________ > Vai oltre le parole, scarica Messenger 2009! > http://www.messenger.it > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > > ------------------------------ > > Message: 16 > Date: Fri, 13 Feb 2009 11:31:52 -0500 > From: "Bridgman, William T." > Subject: Re: [vtkusers] Odd behavior in vtkStreamTracer? > To: vtkusers at vtk.org > Cc: Berk Geveci > Message-ID: > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > I wish I could isolate the problem for reliable reproduction. As it > > is, it appears to affect only some of the lines I generate and the > criteria I have found are not 100% reliable. > > One thing that seems to reduce the problem is if I reduce the maximum > > number of steps allowed. I was using 2500 but the problem is > significantly reduced when I limit to 1300. I'll probably try > dropping it below 1000 to see if that helps also. > > Could there be a hard limit on the maximum number of points in > vtkStreamTracer? I tried examining some of the vtk code but don't > see > an obvious connection. > > Tom > On Feb 12, 2009, at 10:30 PM, Berk Geveci wrote: > > > Hi Tom, > > > > Can you share data and maybe a script that demonstrate the problem? > > > > -berk > > > > On Thu, Feb 12, 2009 at 3:28 PM, Bridgman, William T. > > wrote: > >> Hello, > >> > >> I've been generating some field lines using vtkStreamTracer. The > > >> domain of > >> the field has a hole in the center and I am interested in the flow > > >> into and > >> out of the hole. > >> > >> I've defined my points just outside the spherical hole. The > >> northern region > >> has outbound field lines and those are easy. The southern region > has > >> inbound field lines so I set StreamTracer to reverse the direction > of > >> propagation. In the southern case, the lines seem to generate > okay > >> but are > >> actually *two* nearly perfectly overlaid lines with an outbound > and > >> inbound > >> components that seem to have a common node at a position far from > > >> the hole. > >> > >> I've not yet identified a clear pattern in when it does this. It > > >> does not > >> happen to every field line in the region. > >> > >> I'm using a CVS repository around version 5.2, Linux on 64-bit. > >> > >> Any thoughts? > >> > >> Thanks, > >> Tom > >> -- > >> Dr. William T."Tom" Bridgman Scientific > Visualization > >> Studio > >> Global Science & Technology, Inc. NASA/Goddard Space > >> Flight Center > >> Email: William.T.Bridgman at nasa.gov Code 610.3 > >> Phone: 301-286-1346 Greenbelt, MD 20771 > >> FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ > >> > >> > >> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://www.vtk.org/mailman/listinfo/vtkusers > >> > > -- > Dr. William T."Tom" Bridgman Scientific Visualization > > Studio > Global Science & Technology, Inc. NASA/Goddard Space Flight > > Center > Email: William.T.Bridgman at nasa.gov Code 610.3 > Phone: 301-286-1346 Greenbelt, MD 20771 > FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ > > > > > > > ------------------------------ > > _______________________________________________ > vtkusers mailing list > vtkusers at vtk.org > http://www.vtk.org/mailman/listinfo/vtkusers > > > End of vtkusers Digest, Vol 58, Issue 14 > **************************************** > From L.J.vanRuijven at amc.uva.nl Mon Feb 16 05:30:34 2009 From: L.J.vanRuijven at amc.uva.nl (L.J. van Ruijven) Date: Mon, 16 Feb 2009 11:30:34 +0100 Subject: [vtkusers] Problems with vtk and python wrapping under vista 64 In-Reply-To: <001501c9901a$a42298d0$ec67ca70$@de> References: <001501c9901a$a42298d0$ec67ca70$@de> Message-ID: <9d6d008e599cc480.49994e5a@amc.uva.nl> Hi Rocco, I also did not find a 64 bit installer for TCL/TK. But compiling v8.6b was relatively easy if you follow the instructions in the file makefile.vc in the win directory. If I remember well, there were only a few incompatibilty with the function Tcl_interp. But those program fragments were only used to display runtime error mesages. So I commented them out and now everything works OK. I did not report the error/fix, because I could not figure out where to report them. success, Leo. ----- Original Message ----- From: Rocco Gasteiger Date: Monday, February 16, 2009 10:41 am Subject: RE: [vtkusers] Problems with vtk and python wrapping under vista 64 To: vtkusers at vtk.org Cc: "'L.J. van Ruijven'" > Hi all, > > my problem is solved. Indeed, it was the wrong python version for my > vista > 64. After I installed the Windows AMD64 installer, VTK with Python wrapping > compiled without errors only some. Much thanks to Leo and David for your > help! > > Now, I have only one error left. I get some strange linking errors > for the > project vtkRenderingPythonTkWidgets. Something with my Tcl/Tk installation > must be wrong. I use the ActiveStateTcl version 8.4.14. I found no 64 > bit > installer. Anyway, this is not so important for me. I'm just > deactivate this > project in my VTK solution. > > Best regards, > Rocco Gasteiger > > Dipl.-Ing. Rocco Gasteiger > Department of Simulation and Graphics, School of Computer Science > Otto-von-Guericke-University Magdeburg > > Universit?tsplatz 2, 39106 Magdeburg > GERMANY > > Phone: (+49-391) 67-1 27 59 > Fax: (+49 391) 67-1 11 64 > Email: gasteiger at isg.cs.uni-magdeburg.de > Web: http://wwwisg.cs.uni-magdeburg.de/cv/ > > -------------- next part -------------- A non-text attachment was scrubbed... Name: L.J.vanRuijven.vcf Type: text/x-vcard Size: 261 bytes Desc: Card for "L.J. van Ruijven" URL: From sercanimailgroups at gmail.com Mon Feb 16 07:59:00 2009 From: sercanimailgroups at gmail.com (Sercani) Date: Mon, 16 Feb 2009 14:59:00 +0200 Subject: [vtkusers] ROI using vtkImageTracerWidget Message-ID: <00a901c99036$58747270$095d5750$@com> Isn't there anyone who did this before? I have implemented vtkImageTracerWidget example code to my project but i couldn't get the image region inside this closed spline. Thanks already, yours sincerely. Sercani. From: Sercani [mailto:sercanimailgroups at gmail.com] Sent: Thursday, February 12, 2009 11:33 PM To: vtkusers at vtk.org Subject: ROI using vtkImageTracerWidget Hi everyone; I am using vtkImageTracerWidget to draw freehand drawings on a vtkImageActor (input of this actor is output of the vtkDICOMImageReader). I want to use this closed spline for calculating the region area(using the spacing of dataset too) and clip this region from image. I have looked at and tested this example http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/GUI/Tcl/Im ageTracerWidget.tcl?root=VTK &content-type=text/plain but couldn't get things clear. How can i get the region boundaries and use it for area calculating and clipping image? Yours sincerely; Sercani.. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hobbsk at ohiou.edu Mon Feb 16 08:10:18 2009 From: hobbsk at ohiou.edu (Kevin H. Hobbs) Date: Mon, 16 Feb 2009 08:10:18 -0500 Subject: [vtkusers] int instead of vtkIdType In-Reply-To: References: Message-ID: <499965BA.1090603@ohiou.edu> David Doria wrote: > It seems that vtkIdType is the expected type for indices. ie > void GetTupleValue (vtkIdType i, unsigned char *tuple) > > I usually do > > unsigned char *tuple; > > for(int i = 0; i < something; i++ > GetTupleValue (i, tuple); > > Is this a bad idea? > Use vtkIdType so that your code will automatically switch to 64 bit IDs when VTK is configured to use them. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature URL: From kurakurara at gmail.com Mon Feb 16 08:54:19 2009 From: kurakurara at gmail.com (Takayoshi Kurachi) Date: Mon, 16 Feb 2009 22:54:19 +0900 Subject: [vtkusers] How do I interpolate scalars along the geometric surface? Message-ID: <4999700B.9070900@gmail.com> Hello All, I'm trying to interpolate scalar values along the geometric surface and having a very difficult time. I have a geometric data of a brain in 3DS file and want to set scalar value (of electroencephalogram) in its 21 locations of the surface points, and interpolate for the rest of the points along the surface to show the scalar values in color. With the code below, I could get the vtkPointData and set scalar values on some of the points as the dataset attribute, but it seems that the value is shown in color only within the cell that contains the point with the attribute value I set. I want to interpolate the scalar along the entire surface by the 21 given values. How can I interpolate scalar values along the surface? Many thanks in advance. Taka // Read geometric data from 3DS file vtk3DSImporter* importer = vtk3DSImporter::New(); importer->ComputeNormalsOff(); importer->SetFileName("data/brain.3ds"); importer->Read(); // create lookup table (white <-> red) vtkLookupTable *lut = vtkLookupTable::New(); lut->SetTableRange (0, 1); lut->SetHueRange (1, 1); lut->SetSaturationRange (0, 1); lut->SetValueRange (1, 1); lut->Build(); // create render window and interactor vtkRenderWindow* renWin = vtkRenderWindow::New(); vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); // get data from the importer as vtkDataSet vtkActorCollection* actors = importer->GetRenderer()->GetActors(); actors->InitTraversal(); vtkActor* actor = actors->GetLastActor(); vtkMapper* mapper = actor->GetMapper(); vtkDataSet* data = mapper->GetInput(); vtkPointData* ptData = data->GetPointData(); data->Update(); // get point ids of 4 points for testing (actually i will set 21 points) double bounds[6]; data->GetBounds(bounds); vtkIdType id1 = data->FindPoint(0, 0, bounds[5]); vtkIdType id2 = data->FindPoint(0, 0, bounds[6]); vtkIdType id3 = data->FindPoint(bounds[0], 0, 0); vtkIdType id4 = data->FindPoint(bounds[1], 0, 0); // create array of scalars in vtkFloatArray vtkFloatArray *scalars = vtkFloatArray::New(); scalars->InsertTuple1(id1, 1.0); // set the value 1.0 for testing scalars->InsertTuple1(id2, 1.0); scalars->InsertTuple1(id3, 1.0); scalars->InsertTuple1(id4, 1.0); scalars->SetLookupTable(lut); // set the scalars to the vtkPointData as the dataset attribute ptData->Initialize(); ptData->SetScalars(scalars); // ... setting up mapper, actor, camera, etc. From guetat at dpt-info.u-strasbg.fr Mon Feb 16 09:52:05 2009 From: guetat at dpt-info.u-strasbg.fr (Amel Guetat) Date: Mon, 16 Feb 2009 15:52:05 +0100 Subject: [vtkusers] /usr/bin/ld: cannot find -lvtkRendering Message-ID: <49997D95.6080902@dpt-info.u-strasbg.fr> When trying to execute the make command, I got this error. Someone knows from where it comes from? thx From mweiss at cbs.mpg.de Mon Feb 16 09:52:49 2009 From: mweiss at cbs.mpg.de (Marcel Weiss) Date: Mon, 16 Feb 2009 15:52:49 +0100 (CET) Subject: [vtkusers] How do I interpolate scalars along the geometric surface? In-Reply-To: <20358180.904491234795736938.JavaMail.root@zimbra> Message-ID: <30522938.904591234795969835.JavaMail.root@zimbra> using the geodesic distances (along the brain surface mesh) to points with given scalar (source points) vectors should enable to do some kind of weighted averaging for mesh points without scalars using the n closest source points ... Marcel Weiss PhD student Department of Neurophysics Max Planck Institute for Human Cognitive and Brain Sciences ----- Original Message ----- From: "Takayoshi Kurachi" To: vtkusers at vtk.org Sent: Monday, February 16, 2009 2:54:19 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [vtkusers] How do I interpolate scalars along the geometric surface? Hello All, I'm trying to interpolate scalar values along the geometric surface and having a very difficult time. I have a geometric data of a brain in 3DS file and want to set scalar value (of electroencephalogram) in its 21 locations of the surface points, and interpolate for the rest of the points along the surface to show the scalar values in color. With the code below, I could get the vtkPointData and set scalar values on some of the points as the dataset attribute, but it seems that the value is shown in color only within the cell that contains the point with the attribute value I set. I want to interpolate the scalar along the entire surface by the 21 given values. How can I interpolate scalar values along the surface? Many thanks in advance. Taka // Read geometric data from 3DS file vtk3DSImporter* importer = vtk3DSImporter::New(); importer->ComputeNormalsOff(); importer->SetFileName("data/brain.3ds"); importer->Read(); // create lookup table (white <-> red) vtkLookupTable *lut = vtkLookupTable::New(); lut->SetTableRange (0, 1); lut->SetHueRange (1, 1); lut->SetSaturationRange (0, 1); lut->SetValueRange (1, 1); lut->Build(); // create render window and interactor vtkRenderWindow* renWin = vtkRenderWindow::New(); vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); // get data from the importer as vtkDataSet vtkActorCollection* actors = importer->GetRenderer()->GetActors(); actors->InitTraversal(); vtkActor* actor = actors->GetLastActor(); vtkMapper* mapper = actor->GetMapper(); vtkDataSet* data = mapper->GetInput(); vtkPointData* ptData = data->GetPointData(); data->Update(); // get point ids of 4 points for testing (actually i will set 21 points) double bounds[6]; data->GetBounds(bounds); vtkIdType id1 = data->FindPoint(0, 0, bounds[5]); vtkIdType id2 = data->FindPoint(0, 0, bounds[6]); vtkIdType id3 = data->FindPoint(bounds[0], 0, 0); vtkIdType id4 = data->FindPoint(bounds[1], 0, 0); // create array of scalars in vtkFloatArray vtkFloatArray *scalars = vtkFloatArray::New(); scalars->InsertTuple1(id1, 1.0); // set the value 1.0 for testing scalars->InsertTuple1(id2, 1.0); scalars->InsertTuple1(id3, 1.0); scalars->InsertTuple1(id4, 1.0); scalars->SetLookupTable(lut); // set the scalars to the vtkPointData as the dataset attribute ptData->Initialize(); ptData->SetScalars(scalars); // ... setting up mapper, actor, camera, etc. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From kurakurara at gmail.com Mon Feb 16 10:11:23 2009 From: kurakurara at gmail.com (Takayoshi Kurachi) Date: Tue, 17 Feb 2009 00:11:23 +0900 Subject: [vtkusers] How do I interpolate scalars along the geometric surface? In-Reply-To: <30522938.904591234795969835.JavaMail.root@zimbra> References: <30522938.904591234795969835.JavaMail.root@zimbra> Message-ID: <4999821B.1040004@gmail.com> Hell Marcel, Thank you for your reply. That's exactly what I want to do. The question is how do I calculate the weighted averaging using the geodesic distances for the interpolation? Is there any class for this purpose? I've been trying to use vtkInterpolateDataSetAttributes and vtkTupleInterpolator, but neither do not work well so far... :( Or do I need to write the filter by myself?? Thank you. Taka Marcel Weiss wrote: > using the geodesic distances (along the brain surface mesh) to points with given scalar (source points) vectors should enable to do some kind of weighted averaging for mesh points without scalars using the n closest source points ... > > Marcel Weiss > PhD student > Department of Neurophysics > Max Planck Institute for Human Cognitive and Brain Sciences > > ----- Original Message ----- > From: "Takayoshi Kurachi" > To: vtkusers at vtk.org > Sent: Monday, February 16, 2009 2:54:19 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna > Subject: [vtkusers] How do I interpolate scalars along the geometric surface? > > Hello All, > > I'm trying to interpolate scalar values along the geometric > surface and having a very difficult time. > > I have a geometric data of a brain in 3DS file and want to set > scalar value (of electroencephalogram) in its 21 locations of > the surface points, and interpolate for the rest of the points > along the surface to show the scalar values in color. > > With the code below, I could get the vtkPointData and set > scalar values on some of the points as the dataset attribute, > but it seems that the value is shown in color only within the > cell that contains the point with the attribute value I set. > I want to interpolate the scalar along the entire surface by > the 21 given values. > > How can I interpolate scalar values along the surface? > > Many thanks in advance. > > Taka > > > // Read geometric data from 3DS file > vtk3DSImporter* importer = vtk3DSImporter::New(); > importer->ComputeNormalsOff(); > importer->SetFileName("data/brain.3ds"); > importer->Read(); > > // create lookup table (white <-> red) > vtkLookupTable *lut = vtkLookupTable::New(); > lut->SetTableRange (0, 1); > lut->SetHueRange (1, 1); > lut->SetSaturationRange (0, 1); > lut->SetValueRange (1, 1); > lut->Build(); > > // create render window and interactor > vtkRenderWindow* renWin = vtkRenderWindow::New(); > vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); > > // get data from the importer as vtkDataSet > vtkActorCollection* actors = importer->GetRenderer()->GetActors(); > actors->InitTraversal(); > vtkActor* actor = actors->GetLastActor(); > vtkMapper* mapper = actor->GetMapper(); > vtkDataSet* data = mapper->GetInput(); > vtkPointData* ptData = data->GetPointData(); > > data->Update(); > > // get point ids of 4 points for testing (actually i will set 21 points) > double bounds[6]; > data->GetBounds(bounds); > vtkIdType id1 = data->FindPoint(0, 0, bounds[5]); > vtkIdType id2 = data->FindPoint(0, 0, bounds[6]); > vtkIdType id3 = data->FindPoint(bounds[0], 0, 0); > vtkIdType id4 = data->FindPoint(bounds[1], 0, 0); > > // create array of scalars in vtkFloatArray > vtkFloatArray *scalars = vtkFloatArray::New(); > scalars->InsertTuple1(id1, 1.0); // set the value 1.0 for testing > scalars->InsertTuple1(id2, 1.0); > scalars->InsertTuple1(id3, 1.0); > scalars->InsertTuple1(id4, 1.0); > scalars->SetLookupTable(lut); > > // set the scalars to the vtkPointData as the dataset attribute > ptData->Initialize(); > ptData->SetScalars(scalars); > > // ... setting up mapper, actor, camera, etc. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From wassim_belhadj at topnet.tn Mon Feb 16 10:38:59 2009 From: wassim_belhadj at topnet.tn (wassim_belhadj at topnet.tn) Date: Mon, 16 Feb 2009 16:38:59 +0100 Subject: [vtkusers] Hounsfield Units : strange result (Volume rendering) Message-ID: <354089231d3a49f7751b019847c5088d@pop.topnet.tn> Hi, I'am using VTK/VTKEdge and QT4 for volume rendering. I 'am using a CT Datasets of a young person ( 35 years old) I'm trying to define values of pixel that define lungs. I assigned opacity to each pixel by checking its intensity value with Hounsfield Units values. Bone +400 -----------> +1000 Soft tissue +40 -----------> +80 Fat -80 -----------> -100 Lung -400 -----------> -600 I got a strange result !! The volume obtained contains the lungs and skin According Hounsfield Units, the pixel values that form the skin and lungs are not in the same interval. I varied the opacity values to eliminate the skin that surrounds the lungs but I have not succeeded. Attached a screenshot that illustrates the problem. Can someone help me ? Best Regards, BEHADJ wassim -------------- next part -------------- A non-text attachment was scrubbed... Name: lungs_Skin.JPG Type: image/jpeg Size: 42387 bytes Desc: not available URL: From hobbsk at ohiou.edu Mon Feb 16 10:46:58 2009 From: hobbsk at ohiou.edu (Kevin H. Hobbs) Date: Mon, 16 Feb 2009 10:46:58 -0500 Subject: [vtkusers] Help, please. vtkStreamingDemandDrivenPipeline Update extent error In-Reply-To: <510628.90464.qm@web112210.mail.gq1.yahoo.com> References: <510628.90464.qm@web112210.mail.gq1.yahoo.com> Message-ID: <49998A72.3000506@ohiou.edu> Marty Humperdink wrote: > > In both projects I'm stuck getting an error that looks like this: > vtkStreamingDemandDrivenPipeline (061A8E28): The update extent specified > in the information for output port 0 on algorithm .... > Unfortunately the error disappears from the vtkOutput window when Windows tosses up one of those 'VTK.exe had to close do you want to send a report' messages so > Are you running the program from the command line, or just clicking on the icon? Are you able to share the tcl code to the program you are writing? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 259 bytes Desc: OpenPGP digital signature URL: From mweiss at cbs.mpg.de Mon Feb 16 10:51:42 2009 From: mweiss at cbs.mpg.de (Marcel Weiss) Date: Mon, 16 Feb 2009 16:51:42 +0100 (CET) Subject: [vtkusers] How do I interpolate scalars along the geometric surface? In-Reply-To: <11774795.906761234798246080.JavaMail.root@zimbra> Message-ID: <4264850.907581234799502189.JavaMail.root@zimbra> > Hell Marcel, how could you know? ... ]:-}> > The question is how do I calculate the weighted averaging using > the geodesic distances for the interpolation? > Is there any class for this purpose? I've been trying to use > vtkInterpolateDataSetAttributes and vtkTupleInterpolator, but > neither do not work well so far... :( > Or do I need to write the filter by myself?? At least I don?t see any filter in VTK being able to solve this task. but I assume there might be some code available online ... especially for the distance problem ... Marcel Weiss PhD student Department of Neurophysics Max Planck Institute for Human Cognitive and Brain Sciences Marcel Weiss wrote: > using the geodesic distances (along the brain surface mesh) to points with given scalar (source points) vectors should enable to do some kind of weighted averaging for mesh points without scalars using the n closest source points ... > > Marcel Weiss > PhD student > Department of Neurophysics > Max Planck Institute for Human Cognitive and Brain Sciences > > ----- Original Message ----- > From: "Takayoshi Kurachi" > To: vtkusers at vtk.org > Sent: Monday, February 16, 2009 2:54:19 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna > Subject: [vtkusers] How do I interpolate scalars along the geometric surface? > > Hello All, > > I'm trying to interpolate scalar values along the geometric > surface and having a very difficult time. > > I have a geometric data of a brain in 3DS file and want to set > scalar value (of electroencephalogram) in its 21 locations of > the surface points, and interpolate for the rest of the points > along the surface to show the scalar values in color. > > With the code below, I could get the vtkPointData and set > scalar values on some of the points as the dataset attribute, > but it seems that the value is shown in color only within the > cell that contains the point with the attribute value I set. > I want to interpolate the scalar along the entire surface by > the 21 given values. > > How can I interpolate scalar values along the surface? > > Many thanks in advance. > > Taka > > > // Read geometric data from 3DS file > vtk3DSImporter* importer = vtk3DSImporter::New(); > importer->ComputeNormalsOff(); > importer->SetFileName("data/brain.3ds"); > importer->Read(); > > // create lookup table (white <-> red) > vtkLookupTable *lut = vtkLookupTable::New(); > lut->SetTableRange (0, 1); > lut->SetHueRange (1, 1); > lut->SetSaturationRange (0, 1); > lut->SetValueRange (1, 1); > lut->Build(); > > // create render window and interactor > vtkRenderWindow* renWin = vtkRenderWindow::New(); > vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); > > // get data from the importer as vtkDataSet > vtkActorCollection* actors = importer->GetRenderer()->GetActors(); > actors->InitTraversal(); > vtkActor* actor = actors->GetLastActor(); > vtkMapper* mapper = actor->GetMapper(); > vtkDataSet* data = mapper->GetInput(); > vtkPointData* ptData = data->GetPointData(); > > data->Update(); > > // get point ids of 4 points for testing (actually i will set 21 points) > double bounds[6]; > data->GetBounds(bounds); > vtkIdType id1 = data->FindPoint(0, 0, bounds[5]); > vtkIdType id2 = data->FindPoint(0, 0, bounds[6]); > vtkIdType id3 = data->FindPoint(bounds[0], 0, 0); > vtkIdType id4 = data->FindPoint(bounds[1], 0, 0); > > // create array of scalars in vtkFloatArray > vtkFloatArray *scalars = vtkFloatArray::New(); > scalars->InsertTuple1(id1, 1.0); // set the value 1.0 for testing > scalars->InsertTuple1(id2, 1.0); > scalars->InsertTuple1(id3, 1.0); > scalars->InsertTuple1(id4, 1.0); > scalars->SetLookupTable(lut); > > // set the scalars to the vtkPointData as the dataset attribute > ptData->Initialize(); > ptData->SetScalars(scalars); > > // ... setting up mapper, actor, camera, etc. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From kurakurara at gmail.com Mon Feb 16 11:03:01 2009 From: kurakurara at gmail.com (Takayoshi Kurachi) Date: Tue, 17 Feb 2009 01:03:01 +0900 Subject: [vtkusers] How do I interpolate scalars along the geometric surface? In-Reply-To: <11774795.906761234798246080.JavaMail.root@zimbra> References: <11774795.906761234798246080.JavaMail.root@zimbra> Message-ID: <49998E35.5060500@gmail.com> Hi Marcel, Thanks for your quick reply. I still want to believe that VTK has a class to solve this task... It can interpolate between multiple points with colors very well, even in the simple example code of "Cube" (Cube.cxx)... Reading the class description, "vtkInterpolateDataSetAttributes" seems to be the one I need, but haven't figured out how to use. :( Does anyone know how to use this class? >> Hell Marcel, > how could you know? ... ]:-}> Well, of course I know your name. I even know you are a PhD student at the Department of Neurophysics Max Planck Institute for Human Cognitive and Brain Sciences. :) Taka Marcel Weiss wrote: >> Hell Marcel, > how could you know? ... ]:-}> > >> The question is how do I calculate the weighted averaging using >> the geodesic distances for the interpolation? >> Is there any class for this purpose? I've been trying to use >> vtkInterpolateDataSetAttributes and vtkTupleInterpolator, but >> neither do not work well so far... :( >> Or do I need to write the filter by myself?? > > At least I don?t see any filter in VTK being able to solve this task. > but I assume there might be some code available online ... especially for the distance problem ... > > Marcel Weiss > PhD student > Department of Neurophysics > Max Planck Institute for Human Cognitive and Brain Sciences > > > Marcel Weiss wrote: >> using the geodesic distances (along the brain surface mesh) to points with given scalar (source points) vectors should enable to do some kind of weighted averaging for mesh points without scalars using the n closest source points ... >> >> Marcel Weiss >> PhD student >> Department of Neurophysics >> Max Planck Institute for Human Cognitive and Brain Sciences >> >> ----- Original Message ----- >> From: "Takayoshi Kurachi" >> To: vtkusers at vtk.org >> Sent: Monday, February 16, 2009 2:54:19 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna >> Subject: [vtkusers] How do I interpolate scalars along the geometric surface? >> >> Hello All, >> >> I'm trying to interpolate scalar values along the geometric >> surface and having a very difficult time. >> >> I have a geometric data of a brain in 3DS file and want to set >> scalar value (of electroencephalogram) in its 21 locations of >> the surface points, and interpolate for the rest of the points >> along the surface to show the scalar values in color. >> >> With the code below, I could get the vtkPointData and set >> scalar values on some of the points as the dataset attribute, >> but it seems that the value is shown in color only within the >> cell that contains the point with the attribute value I set. >> I want to interpolate the scalar along the entire surface by >> the 21 given values. >> >> How can I interpolate scalar values along the surface? >> >> Many thanks in advance. >> >> Taka >> >> >> // Read geometric data from 3DS file >> vtk3DSImporter* importer = vtk3DSImporter::New(); >> importer->ComputeNormalsOff(); >> importer->SetFileName("data/brain.3ds"); >> importer->Read(); >> >> // create lookup table (white <-> red) >> vtkLookupTable *lut = vtkLookupTable::New(); >> lut->SetTableRange (0, 1); >> lut->SetHueRange (1, 1); >> lut->SetSaturationRange (0, 1); >> lut->SetValueRange (1, 1); >> lut->Build(); >> >> // create render window and interactor >> vtkRenderWindow* renWin = vtkRenderWindow::New(); >> vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); >> >> // get data from the importer as vtkDataSet >> vtkActorCollection* actors = importer->GetRenderer()->GetActors(); >> actors->InitTraversal(); >> vtkActor* actor = actors->GetLastActor(); >> vtkMapper* mapper = actor->GetMapper(); >> vtkDataSet* data = mapper->GetInput(); >> vtkPointData* ptData = data->GetPointData(); >> >> data->Update(); >> >> // get point ids of 4 points for testing (actually i will set 21 points) >> double bounds[6]; >> data->GetBounds(bounds); >> vtkIdType id1 = data->FindPoint(0, 0, bounds[5]); >> vtkIdType id2 = data->FindPoint(0, 0, bounds[6]); >> vtkIdType id3 = data->FindPoint(bounds[0], 0, 0); >> vtkIdType id4 = data->FindPoint(bounds[1], 0, 0); >> >> // create array of scalars in vtkFloatArray >> vtkFloatArray *scalars = vtkFloatArray::New(); >> scalars->InsertTuple1(id1, 1.0); // set the value 1.0 for testing >> scalars->InsertTuple1(id2, 1.0); >> scalars->InsertTuple1(id3, 1.0); >> scalars->InsertTuple1(id4, 1.0); >> scalars->SetLookupTable(lut); >> >> // set the scalars to the vtkPointData as the dataset attribute >> ptData->Initialize(); >> ptData->SetScalars(scalars); >> >> // ... setting up mapper, actor, camera, etc. >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > From sachinjam at gmail.com Mon Feb 16 12:57:32 2009 From: sachinjam at gmail.com (Sachin Jambawalikar) Date: Mon, 16 Feb 2009 12:57:32 -0500 Subject: [vtkusers] How to crop a rectangular volume of interest from an image when your roi is defined as polydata? In-Reply-To: <6735efef0902150755r335b2b03wd8d6c739bdac18b6@mail.gmail.com> References: <6735efef0902150755r335b2b03wd8d6c739bdac18b6@mail.gmail.com> Message-ID: <6735efef0902160957r17ee923cw1ac0f4a95fb77785@mail.gmail.com> Hi all, I generated a vtkcube source and then used vtktransform to scale translate and rotate the cube so that it become a rectangular voi . I use the vtkTransformPolydataFilter to apply the transform to the cube data. This polydata is then mapped into a vtkactor and added along with exisitng volume data to vtksliceviewer2. This works well and I see a rectangular voi shifted , scaled and translated from center of my volume data. However what I'm trying to develop is a vtk slice viewer which will show the region of intersection of the volume of interest and the image data in each slice (like an alpha-blended overlay rather than a polygon actor which occlude the slice). I need to generate a subvolume of the Original data from this transformed rectangular voi. I have seen people using vtkextractvoi by first using vtkoutlinefilter to generate a bounding box. However bounding box limits are not the same as the polydata (because when I display an actor from vtkoutlinefilter it is bigger and doesnot show angulation as shown by the trinangulated polydata actor) What I need to do is extract a subvolume form Image data corresponding to the rectangular voi. Create a composite volume (or overlay the voi volume )and then hopefully be able to show the voi volume transparent overlayed on Image data so as I move through the slices Ican see the structure of the original data inside the voi. I have attached the code as to how i generate my rectangular voi and it seems to work. Thanks for all your help Regards --Sachin vtkImagedata=reader.GetOutput() (xMin, xMax, yMin, yMax, zMin, zMax) = reader.GetOutput().GetWholeExtent() (sx, sy, sz) = reader.GetOutput().GetSpacing() print sz (ox, oy, oz) = reader.GetOutput().GetOrigin() #print (x0, y0, z0) center = [ox + sx * 0.5 * (xMin + xMax), oy + sy * 0.5 * (yMin + yMax), oz + sz * 0.5 * (zMin + zMax)] # An outline is shown for context. outline = vtk.vtkOutlineFilter() outline.SetInputConnection(reader.GetOutputPort()) outlineMapper = vtk.vtkPolyDataMapper() outlineMapper.SetInputConnection(outline.GetOutputPort()) outlineActor = vtk.vtkActor() outlineActor.SetMapper(outlineMapper) ####roi cube = vtk.vtkCubeSource() cube.SetXLength(1); cube.SetYLength(1); cube.SetZLength(1); vtkmath=vtk.vtkMath() transP1 = vtk.vtkTransform() transP1.Identity() transP1.PostMultiply() transP1.Scale(10, 27.5,9.942770958) transP1.RotateX(22.90897369) transP1.RotateY(0.1529316902) #transP1.RotateX(0) transP1.RotateZ(0.7547413111) transP1.Translate(center[0]-22, center[1]-17, center[2]+11) tpd1 = vtk.vtkTransformPolyDataFilter() tpd1.SetInputConnection(cube.GetOutputPort()) tpd1.SetTransform(transP1) #triangulate points triangle=vtk.vtkTriangleFilter() triangle.SetInputConnection(tpd1.GetOutputPort()) #outTpd1 = vtk.vtkOutlineFilter() #outTpd1.SetInputConnection(triangle.GetOutputPort()) #mapper mapTpd1 = vtk.vtkPolyDataMapper() #mapTpd1.SetInputConnection(outTpd1.GetOutputPort()) mapTpd1.SetInputConnection(triangle.GetOutputPort()) #Actor roiActor = vtk.vtkActor() roiActor.SetMapper(mapTpd1) roiActor.GetProperty().SetColor(1, 0, 0) From robert_remke at starkey.com Mon Feb 16 13:27:26 2009 From: robert_remke at starkey.com (Rob Remke) Date: Mon, 16 Feb 2009 12:27:26 -0600 Subject: [vtkusers] Help with drawing lines In-Reply-To: References: <959181.85359.qm@web24702.mail.ird.yahoo.com> Message-ID: Michael, I would like to see some example code if it is not too hard to dig up. Thanks, Rob -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Michael Jackson Sent: Tuesday, January 20, 2009 9:52 AM To: VTK Users Subject: Re: [vtkusers] Help with drawing lines You probably want to create a vtkPolyData set that contains just lines. You should be able to do this quite easily by creating the vtkPolyData object then inserting a new cell of type VTK_POLY_LINE and 2 points. When you are complete with that then use 1 actor to visualize the ployData. I can possibly dig up some code if needed. _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Jan 20, 2009, at 10:44 AM, Konstantinos Kelg wrote: > Actually, the lines I have to draw are too many (more than 100.000). > So I don't think drawing each line with a different actor would be a > good idea. Isn't there any way to define all the lines in a single > object and then render them with one actor ? > > I thought that "vtkCellArray" would do the job, but I guess I was > wrong. Perhaps I'm missing sth... > > > --- ???? ????., 19/01/09, ?/? Andre Gouws > ??????: > ???: Andre Gouws > ????: Re: [vtkusers] vtkAVIWriter problem. > ????: kkelgeor at yahoo.gr > ????.: vtkusers at vtk.org > ??????????: ???????, 19 ?????????? 2009, > 9:44 > > I usually > just use vtkLineSource (has SetPoint1 and SetPoint2 calls once you > have calculated the positions) .. example from the vtk source > (Python sorry) > > rake = vtk.vtkLineSource() > rake.SetPoint1(15, -5, 32) > rake.SetPoint2(15, 5, 32) > rake.SetResolution(21) > > ..... addmapper ... > > ..... addactor ... etc. > > > > This is the private VTK discussion list. > > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > i think vtkLineRepresentation (or vtkLinewidget) is a better way to > draw lines in a scene?you must set the properties of the line the > way you like, add it to the renderer and simply set the > coordinates(in world coordinates) of two end points of the line ? > > ==================================================== > > Hi. I need to render some vectors in 3D space and I've decided to > draw them as lines. However my code doesn't seem to work (I see > nothing). Does anyone know why ? > > > vtkCellArray *cellArrayNorm = vtkCellArray::New(); > vtkPoints *points2 = vtkPoints::New(); > points2->Allocate(2*m_NumOfVertices*3*sizeof(float)); > > > for(int k=0; k { > float* fp = VerticesP[k].coords; // Get vertex coords. > > float* fpN = NormP[k].coords; // Get vertex normal. > points2->SetPoint(k, fp); // Set 1st point > points2->SetPoint(m_NumOfVertices + k, // Set 2nd point. > > fp[0]+fpN[0], // x+dx > fp[1]+fpN[1], // y+dy > fp[2]+fpN[2]);// z+dz > // Set up new (line) cell and insert. > int pts[2] = {k, m_NumOfVertices+k}; > cellArrayNorm->InsertNextCell(2, pts); > } > > > > vtkPolyData *polyDataNorm = vtkPolyData::New(); > polyDataNorm->SetPoints(points2); > polyDataNorm->SetPolys(cellArrayNorm); > > vtkPolyDataMapper *polyDataMapperNorm = vtkPolyDataMapper::New(); > polyDataMapperNorm->SetInput(polyDataNorm); > > ActorNorm->SetMapper(polyDataMapperNorm); > ren1->AddActor(ActorNorm); > > vtkProperty *prop = vtkProperty::New(); > prop->SetColor(1.0, 0.0, 0.0); > ActorNorm->SetProperty(prop); > > points2->Delete(); > cellArrayNorm->Delete(); > polyDataNorm->Delete(); > polyDataMapperNorm->Delete(); > prop->Delete(); > > Thanks. > > > ?????????????? Yahoo! > ?????????? ?? ?????????? ???? ???? > (spam); ?? Yahoo! Mail ???????? ??? ???????? > ?????? ????????? ???? ??? > ??????????? ????????? > http://login.yahoo.com/config/mail?.intl=gr > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From robert_remke at starkey.com Mon Feb 16 16:09:35 2009 From: robert_remke at starkey.com (Rob Remke) Date: Mon, 16 Feb 2009 15:09:35 -0600 Subject: [vtkusers] Help with drawing lines In-Reply-To: References: <959181.85359.qm@web24702.mail.ird.yahoo.com> Message-ID: Michael, Please disregard my posting below. I figured it out. I asked for help to quickly. Sorry for any inconvenience Rob -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Rob Remke Sent: Monday, February 16, 2009 12:27 PM To: Michael Jackson; VTK Users Subject: Re: [vtkusers] Help with drawing lines Michael, I would like to see some example code if it is not too hard to dig up. Thanks, Rob -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Michael Jackson Sent: Tuesday, January 20, 2009 9:52 AM To: VTK Users Subject: Re: [vtkusers] Help with drawing lines You probably want to create a vtkPolyData set that contains just lines. You should be able to do this quite easily by creating the vtkPolyData object then inserting a new cell of type VTK_POLY_LINE and 2 points. When you are complete with that then use 1 actor to visualize the ployData. I can possibly dig up some code if needed. _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Jan 20, 2009, at 10:44 AM, Konstantinos Kelg wrote: > Actually, the lines I have to draw are too many (more than 100.000). > So I don't think drawing each line with a different actor would be a > good idea. Isn't there any way to define all the lines in a single > object and then render them with one actor ? > > I thought that "vtkCellArray" would do the job, but I guess I was > wrong. Perhaps I'm missing sth... > > > --- ???? ????., 19/01/09, ?/? Andre Gouws > ??????: > ???: Andre Gouws > ????: Re: [vtkusers] vtkAVIWriter problem. > ????: kkelgeor at yahoo.gr > ????.: vtkusers at vtk.org > ??????????: ???????, 19 ?????????? 2009, > 9:44 > > I usually > just use vtkLineSource (has SetPoint1 and SetPoint2 calls once you > have calculated the positions) .. example from the vtk source > (Python sorry) > > rake = vtk.vtkLineSource() > rake.SetPoint1(15, -5, 32) > rake.SetPoint2(15, 5, 32) > rake.SetResolution(21) > > ..... addmapper ... > > ..... addactor ... etc. > > > > This is the private VTK discussion list. > > Please keep messages on-topic. Check the FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > i think vtkLineRepresentation (or vtkLinewidget) is a better way to > draw lines in a scene?you must set the properties of the line the > way you like, add it to the renderer and simply set the > coordinates(in world coordinates) of two end points of the line ? > > ==================================================== > > Hi. I need to render some vectors in 3D space and I've decided to > draw them as lines. However my code doesn't seem to work (I see > nothing). Does anyone know why ? > > > vtkCellArray *cellArrayNorm = vtkCellArray::New(); > vtkPoints *points2 = vtkPoints::New(); > points2->Allocate(2*m_NumOfVertices*3*sizeof(float)); > > > for(int k=0; k { > float* fp = VerticesP[k].coords; // Get vertex coords. > > float* fpN = NormP[k].coords; // Get vertex normal. > points2->SetPoint(k, fp); // Set 1st point > points2->SetPoint(m_NumOfVertices + k, // Set 2nd point. > > fp[0]+fpN[0], // x+dx > fp[1]+fpN[1], // y+dy > fp[2]+fpN[2]);// z+dz > // Set up new (line) cell and insert. > int pts[2] = {k, m_NumOfVertices+k}; > cellArrayNorm->InsertNextCell(2, pts); > } > > > > vtkPolyData *polyDataNorm = vtkPolyData::New(); > polyDataNorm->SetPoints(points2); > polyDataNorm->SetPolys(cellArrayNorm); > > vtkPolyDataMapper *polyDataMapperNorm = vtkPolyDataMapper::New(); > polyDataMapperNorm->SetInput(polyDataNorm); > > ActorNorm->SetMapper(polyDataMapperNorm); > ren1->AddActor(ActorNorm); > > vtkProperty *prop = vtkProperty::New(); > prop->SetColor(1.0, 0.0, 0.0); > ActorNorm->SetProperty(prop); > > points2->Delete(); > cellArrayNorm->Delete(); > polyDataNorm->Delete(); > polyDataMapperNorm->Delete(); > prop->Delete(); > > Thanks. > > > ?????????????? Yahoo! > ?????????? ?? ?????????? ???? ???? > (spam); ?? Yahoo! Mail ???????? ??? ???????? > ?????? ????????? ???? ??? > ??????????? ????????? > http://login.yahoo.com/config/mail?.intl=gr > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From bellina at illinois.edu Mon Feb 16 16:36:43 2009 From: bellina at illinois.edu (Alessandro A. Bellina) Date: Mon, 16 Feb 2009 15:36:43 -0600 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: <20090214203458.965444501@kingu.local> Message-ID: Hi, I tried installing VTK 5.2 but I got this error (same error I got before) I checked it out from CVS CMake Error at /Applications/CMake 2.6-2.app/Contents/share/cmake-2.6/Modules/TestBigEndian.cmake:31 (MESSAGE): no suitable type found Call Stack (most recent call first): CMake/CMakeBackwardCompatibilityC.cmake:31 (TEST_BIG_ENDIAN) CMakeLists.txt:365 (INCLUDE) Any ideas? Thanks, Alessandro On Sat, Feb 14, 2009 at 3:44 PM, Alessandro A. Bellina wrote: > Thanks. I did find that using Delete worked. I was missing one delete > for the probeFilter.... > > I tried installing 5.2 a little while back and I kept on getting a > cmake endinanness error. I will try again when I get a chance and let > you know what I find. I would like to use temporal datasets (something > I understand now comes in 5.2). > > Thanks, > > Alessandro > > On Sat, Feb 14, 2009 at 2:34 PM, Sean McBride wrote: >> On 2/14/09 9:32 AM, Alessandro A. Bellina said: >> >>>MacOS Intel Based >>>VTK 5.0.3 >>>I don't have 5.2 because I get endianness errors while trying to compile. >> >> I agree with Mike, you should figure this out. There were several Mac- >> related improvements between 5.0 and 5.2, I would definitely recommend >> using the newest version. >> >> -- >> ____________________________________________________________ >> Sean McBride, B. Eng sean at rogue-research.com >> Rogue Research www.rogue-research.com >> Mac Software Developer Montr?al, Qu?bec, Canada >> >> >> > > > > -- > Alessandro A. Bellina > > Graduate Student > Bioacoustics Research Laboratory > Electrical and Computer Engineering > University of Illinois at Urbana-Champaign > -- Alessandro A. Bellina Graduate Student Bioacoustics Research Laboratory Electrical and Computer Engineering University of Illinois at Urbana-Champaign From lisa.avila at kitware.com Mon Feb 16 17:37:59 2009 From: lisa.avila at kitware.com (Lisa Avila) Date: Mon, 16 Feb 2009 17:37:59 -0500 Subject: [vtkusers] DirectX rendering for VTK Message-ID: <4999EAC7.4020809@kitware.com> Kitware may have the opportunity to create a DirectX interface for VTK (to mirror the OpenGL interface). I am sending this email to the VTK community in order to gather "support" stories that would justify this effort. If you are a long-time VTK user / developer, then you are probably aware that VTK has an abstraction layer on top of the underlying graphics language in order to support cross-platform operation. In the early days, VTK supported not only OpenGL, but also Starbase (for use on HP computers) and XGL (for use on Sun computers). In time, HP and Sun switched to OpenGL, and support for Starbase and XGL were dropped from VTK. Even though VTK now only supports OpenGL, the abstraction layer has been maintained to allow us to add another graphics language should the need arise. DirectX has been on our radar screen for years; however it has been low on our priority list since it would not expand the cross-platform reach of VTK. I'd like to see DirectX support added to VTK because I believe this would help us re-validate our "graphics language independent" abstraction layer which may have been breached in the years of having only OpenGL support. But I'm not sure if that is enough of a reason to pursue this effort :-) so I am looking to the user / developer community to see if there are additional reasons why DirectX support in VTK would be valuable. If you have any supporting arguments for this work, please send them directly to me at lisa.avila at kitware.com. If I do receive any, I'll be sure to summarize the responses back to this list. Thank you, Lisa From nkwmailinglists at gmail.com Mon Feb 16 18:04:39 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Mon, 16 Feb 2009 17:04:39 -0600 Subject: [vtkusers] HOWTO: pick points on 2D Plane & show points? Message-ID: <44f773f50902161504y6e7a4402hdd46dcda77550390@mail.gmail.com> I've been looking through the mailing list archive and VTK examples for some time and not come up with any good way to what I need to do, so I'm asking you-all. We want to be able to pick points on a 2D view plane, display some sort of geometry (a circle?) where a point has been placed, and be able to move points around after the fact. In other words the use case would be this. 1. User clicks 'add point' button to go into point-choosing mode. 2. User clicks in 2D view, and the point clicked is marked with some geometry -- e.g. a white circle. 3. After a point has been placed, the user can pick and drag the point. Actually, what would be great would be for there to be a widget that acts like the vtkContourWidget handles. You click, it drops a white dot, and once the Contour is closed, you can pick and drag the points. Suggestions? From karthik.krishnan at kitware.com Mon Feb 16 20:38:24 2009 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Mon, 16 Feb 2009 20:38:24 -0500 Subject: [vtkusers] HOWTO: pick points on 2D Plane & show points? In-Reply-To: <44f773f50902161504y6e7a4402hdd46dcda77550390@mail.gmail.com> References: <44f773f50902161504y6e7a4402hdd46dcda77550390@mail.gmail.com> Message-ID: <499A1510.7000302@kitware.com> vtkSeedWidget does precisely this. A few tips follow. - Play around with TestSeedWidget2.cxx. You may need to uncomment the test from Widgets/Testing/Cxx/CMakeLists.txt, so that it gets compiled. - The default handle representation is rendered as 2D crosshairs. You can change this to any arbitrary shape. The seed representation allows you to set any vtkHandleRepresentation. So you can use a vtkPolygonalHandleRepresentation3D which allows the handles (seeds) to be representated with a user specified geometry. Check out TestPolygonalRepresentationHandleWidget.cxx to see how handles can be represented as arbitrary geometries. Hope this helps. -- karthik kent williams wrote: > I've been looking through the mailing list archive and VTK examples > for some time and not come up with any good way to what I need to do, > so I'm asking you-all. > > We want to be able to pick points on a 2D view plane, display some > sort of geometry (a circle?) where a point has been placed, and be > able to move points around after the fact. > > In other words the use case would be this. > > 1. User clicks 'add point' button to go into point-choosing mode. > 2. User clicks in 2D view, and the point clicked is marked with some > geometry -- e.g. a white circle. > 3. After a point has been placed, the user can pick and drag the point. > > Actually, what would be great would be for there to be a widget that > acts like the vtkContourWidget handles. You click, it drops a white > dot, and once the Contour is closed, you can pick and drag the points. > > Suggestions? > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Karthik Krishnan R & D Engineer, Kitware Inc, Ph: 518 371 3971 x119 Fax: 518 371 3971 From mike.jackson at bluequartz.net Mon Feb 16 20:56:11 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Mon, 16 Feb 2009 20:56:11 -0500 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: <20090214203458.965444501@kingu.local> Message-ID: I would say post the CMakeError.log to the list to see what may be going wrong. Or just look through that log file and see if something odd pops out at you. Lots and Lots of people compile VTK CVS nightly on OS X 10.5. Intel 32 bit systems and are not having any issues. Are you starting from a clean build directory each time? Do you have any environment variables that are automatically set that might be interfering with the compilation? _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 16, 2009, at 4:36 PM, Alessandro A. Bellina wrote: > Hi, > I tried installing VTK 5.2 but I got this error (same error I got > before) > > I checked it out from CVS > > > CMake Error at /Applications/CMake > 2.6-2.app/Contents/share/cmake-2.6/Modules/TestBigEndian.cmake:31 > (MESSAGE): > no suitable type found > Call Stack (most recent call first): > CMake/CMakeBackwardCompatibilityC.cmake:31 (TEST_BIG_ENDIAN) > CMakeLists.txt:365 (INCLUDE) > > > Any ideas? > > Thanks, > > Alessandro > > > On Sat, Feb 14, 2009 at 3:44 PM, Alessandro A. Bellina > wrote: >> Thanks. I did find that using Delete worked. I was missing one delete >> for the probeFilter.... >> >> I tried installing 5.2 a little while back and I kept on getting a >> cmake endinanness error. I will try again when I get a chance and let >> you know what I find. I would like to use temporal datasets >> (something >> I understand now comes in 5.2). >> >> Thanks, >> >> Alessandro >> >> On Sat, Feb 14, 2009 at 2:34 PM, Sean McBride > > wrote: >>> On 2/14/09 9:32 AM, Alessandro A. Bellina said: >>> >>>> MacOS Intel Based >>>> VTK 5.0.3 >>>> I don't have 5.2 because I get endianness errors while trying to >>>> compile. >>> >>> I agree with Mike, you should figure this out. There were several >>> Mac- >>> related improvements between 5.0 and 5.2, I would definitely >>> recommend >>> using the newest version. >>> >>> -- >>> ____________________________________________________________ >>> Sean McBride, B. Eng sean at rogue-research.com >>> Rogue Research www.rogue-research.com >>> Mac Software Developer Montr?al, Qu?bec, Canada >>> >>> >>> >> >> >> >> -- >> Alessandro A. Bellina >> >> Graduate Student >> Bioacoustics Research Laboratory >> Electrical and Computer Engineering >> University of Illinois at Urbana-Champaign >> > > > > -- > Alessandro A. Bellina > > Graduate Student > Bioacoustics Research Laboratory > Electrical and Computer Engineering > University of Illinois at Urbana-Champaign > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From luisrpp at gmail.com Mon Feb 16 21:31:02 2009 From: luisrpp at gmail.com (Luis Roberto P. Paula) Date: Mon, 16 Feb 2009 23:31:02 -0300 Subject: [vtkusers] Change image color using a lookup table Message-ID: Hi All, After creating the lookup table, how can I set the output color of a grey level image to be red, for example, if the level is in a range? I think I have to use the vtkImageMapToColors class, but I couldn't find an example on how to do this. Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From planck at netspeed.com.au Tue Feb 17 02:06:18 2009 From: planck at netspeed.com.au (Kevin Osborn) Date: Tue, 17 Feb 2009 18:06:18 +1100 Subject: [vtkusers] Hounsfield Units : strange result (Volume rendering) In-Reply-To: <354089231d3a49f7751b019847c5088d@pop.topnet.tn> References: <354089231d3a49f7751b019847c5088d@pop.topnet.tn> Message-ID: <499A61EA.3030608@netspeed.com.au> Don't forget air surrounds the patient. What your image shows is the air/skin interface, not the skin itself. As the lung is mostly air, your Hounsfield range between -600 and -400 not only gives lung but also includes air around the patient. wassim_belhadj at topnet.tn wrote: > Hi, > > I'am using VTK/VTKEdge and QT4 for volume rendering. > > I 'am using a CT Datasets of a young person ( 35 years old) > > I'm trying to define values of pixel that define lungs. > > I assigned opacity to each pixel by checking its intensity value with > Hounsfield Units values. > > Bone +400 -----------> +1000 > > Soft tissue +40 -----------> +80 > > Fat -80 -----------> -100 > > Lung -400 -----------> -600 > > > I got a strange result !! The volume obtained contains the lungs and skin > > > According Hounsfield Units, the pixel values that form the skin and lungs > are not in the same interval. > > I varied the opacity values to eliminate the skin that surrounds the lungs > but I have not succeeded. > > Attached a screenshot that illustrates the problem. > > Can someone help me ? > > Best Regards, > BEHADJ wassim From wassim_belhadj at topnet.tn Tue Feb 17 03:45:55 2009 From: wassim_belhadj at topnet.tn (wassim_belhadj at topnet.tn) Date: Tue, 17 Feb 2009 09:45:55 +0100 Subject: [vtkusers] Hounsfield Units : strange result (Volume rendering) In-Reply-To: <499A61EA.3030608@netspeed.com.au> References: <354089231d3a49f7751b019847c5088d@pop.topnet.tn> <499A61EA.3030608@netspeed.com.au> Message-ID: Hi, Thank you for your reply. According to Hounsfield Units, the pixel values that form the air is between -1000 <--------> -995. I want to display ONLY the lungs (not skin ...) so I set my function transfer like this: opacityFun->AddPoint(-3024, 0.0); opacityFun->AddPoint(-878.674, 0.0); opacityFun->AddPoint(-864.466, 1.0); opacityFun->AddPoint(-594.524, 1.0); opacityFun->AddPoint(-395.62, 1.0); opacityFun->AddPoint(3071, 0.0); Hounsfield Units for lungs are -950 <--------> -550 I Attached a NEW screenshot that illustrates the problem. I vary the values of the transfer function but no result.I did not manage to remove the part that surrounds the lungs. Best regards, BELHADJ wassim On Tue, 17 Feb 2009 18:06:18 +1100, Kevin Osborn wrote: > Don't forget air surrounds the patient. What your image shows is the > air/skin interface, not the skin itself. As the lung is mostly air, your > Hounsfield range between -600 and -400 not only gives lung but also > includes air around the patient. > > > wassim_belhadj at topnet.tn wrote: >> Hi, >> >> I'am using VTK/VTKEdge and QT4 for volume rendering. >> >> I 'am using a CT Datasets of a young person ( 35 years old) >> >> I'm trying to define values of pixel that define lungs. >> >> I assigned opacity to each pixel by checking its intensity value with >> Hounsfield Units values. >> >> Bone +400 -----------> +1000 >> >> Soft tissue +40 -----------> +80 >> >> Fat -80 -----------> -100 >> >> Lung -400 -----------> -600 >> >> >> I got a strange result !! The volume obtained contains the lungs and >> skin >> >> >> According Hounsfield Units, the pixel values that form the skin and lungs >> are not in the same interval. >> >> I varied the opacity values to eliminate the skin that surrounds the >> lungs >> but I have not succeeded. >> >> Attached a screenshot that illustrates the problem. >> >> Can someone help me ? >> >> Best Regards, >> BEHADJ wassim -------------- next part -------------- A non-text attachment was scrubbed... Name: lungs2.JPG Type: image/jpeg Size: 71407 bytes Desc: not available URL: From fredericpcx at gmail.com Tue Feb 17 04:17:23 2009 From: fredericpcx at gmail.com (Frederic Perez) Date: Tue, 17 Feb 2009 10:17:23 +0100 Subject: [vtkusers] Hounsfield Units : strange result (Volume rendering) In-Reply-To: References: <354089231d3a49f7751b019847c5088d@pop.topnet.tn> <499A61EA.3030608@netspeed.com.au> Message-ID: <696562640902170117xf1af963j658e31ae9e0c70ca@mail.gmail.com> Hello BELHADJ wassim, a region growing algorithm (probably using ITK) starting from the corners of your data to get rid of the "unwanted air" might prove useful to tackle your problem. Regards, Frederic Perez On Tue, Feb 17, 2009 at 9:45 AM, wrote: > Hi, > > Thank you for your reply. > > According to Hounsfield Units, the pixel values that form the air is > between -1000 <--------> -995. > > I want to display ONLY the lungs (not skin ...) so I set my function > transfer like this: > > opacityFun->AddPoint(-3024, 0.0); > opacityFun->AddPoint(-878.674, 0.0); > opacityFun->AddPoint(-864.466, 1.0); > opacityFun->AddPoint(-594.524, 1.0); > opacityFun->AddPoint(-395.62, 1.0); > opacityFun->AddPoint(3071, 0.0); > > Hounsfield Units for lungs are -950 <--------> -550 > > I Attached a NEW screenshot that illustrates the problem. > > I vary the values of the transfer function but no result.I did not manage > to remove the part that surrounds the lungs. > > Best regards, > BELHADJ wassim > > > > > > On Tue, 17 Feb 2009 18:06:18 +1100, Kevin Osborn > wrote: > > Don't forget air surrounds the patient. What your image shows is the > > air/skin interface, not the skin itself. As the lung is mostly air, your > > Hounsfield range between -600 and -400 not only gives lung but also > > includes air around the patient. > > > > > > wassim_belhadj at topnet.tn wrote: > >> Hi, > >> > >> I'am using VTK/VTKEdge and QT4 for volume rendering. > >> > >> I 'am using a CT Datasets of a young person ( 35 years old) > >> > >> I'm trying to define values of pixel that define lungs. > >> > >> I assigned opacity to each pixel by checking its intensity value with > >> Hounsfield Units values. > >> > >> Bone +400 -----------> +1000 > >> > >> Soft tissue +40 -----------> +80 > >> > >> Fat -80 -----------> -100 > >> > >> Lung -400 -----------> -600 > >> > >> > >> I got a strange result !! The volume obtained contains the lungs and > >> skin > >> > >> > >> According Hounsfield Units, the pixel values that form the skin and > lungs > >> are not in the same interval. > >> > >> I varied the opacity values to eliminate the skin that surrounds the > >> lungs > >> but I have not succeeded. > >> > >> Attached a screenshot that illustrates the problem. > >> > >> Can someone help me ? > >> > >> Best Regards, > >> BEHADJ wassim > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From prabhat246 at yahoo.com Tue Feb 17 05:19:08 2009 From: prabhat246 at yahoo.com (prabhat246) Date: Tue, 17 Feb 2009 02:19:08 -0800 (PST) Subject: [vtkusers] Assigning Colors in Volume Rendering Message-ID: <22054285.post@talk.nabble.com> Hi, I am using following code for volume rendering of Binary Image which has only two scalar values -3024 and -3023. But the output In am getting is black and gray color. How can I get black and white only?? vtkColorTransferFunction *cTFun = vtkColorTransferFunction::New(); cTFun->SetVectorModeToMagnitude(); cTFun->AddRGBPoint( -3024.0, 0.0, 0.0, 0.0 ); cTFun->AddRGBPoint( -3023.0, 1.0, 1.0, 1.0 ); vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New(); volumeProperty->SetColor(cTFun); //volumeProperty->SetGradientOpacity(goTFun); volumeProperty->SetScalarOpacity(oTFun); volumeProperty->ShadeOn(); Thanks, Regards Prabhat -- View this message in context: http://www.nabble.com/Assigning-Colors-in-Volume-Rendering-tp22054285p22054285.html Sent from the VTK - Users mailing list archive at Nabble.com. From rim.ayari at gmail.com Tue Feb 17 05:30:10 2009 From: rim.ayari at gmail.com (RimAY) Date: Tue, 17 Feb 2009 02:30:10 -0800 (PST) Subject: [vtkusers] how to read dicom file using python? Message-ID: <22054451.post@talk.nabble.com> Hi all, I'm trying to read a Dicom file using python. I have successfully built VTK_5.2.1 in python 2.4, but I failed to use vtkDICOMImageReader(). I got many errors . Please, can someone give me the right method to use in order to read a Dicom file using vtk and python. Thanks a lot Best Regards -- View this message in context: http://www.nabble.com/how-to-read-dicom-file-using-python--tp22054451p22054451.html Sent from the VTK - Users mailing list archive at Nabble.com. From mathieu.malaterre at gmail.com Tue Feb 17 05:43:50 2009 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Tue, 17 Feb 2009 11:43:50 +0100 Subject: [vtkusers] how to read dicom file using python? In-Reply-To: <22054451.post@talk.nabble.com> References: <22054451.post@talk.nabble.com> Message-ID: On Tue, Feb 17, 2009 at 11:30 AM, RimAY wrote: > > Hi all, > I'm trying to read a Dicom file using python. I have successfully built > VTK_5.2.1 in python 2.4, but I failed to use vtkDICOMImageReader(). I got > many errors . Do you really expect anyone to help you out without: 1. Sending the actual error 2. Sending the actual code you were using -- Mathieu From rim.ayari at gmail.com Tue Feb 17 06:23:14 2009 From: rim.ayari at gmail.com (RimAY) Date: Tue, 17 Feb 2009 03:23:14 -0800 (PST) Subject: [vtkusers] how to read dicom file using python? In-Reply-To: References: <22054451.post@talk.nabble.com> Message-ID: <22055230.post@talk.nabble.com> I'm sorry, Thanks for your reply, Here is my code: import vtk reader = vtk.vtkDICOMImageReader() reader.SetDirectoryName('the root of my dicom files') win = 400000 lev = 400000 viewer = vtk.vtkImageViewer() viewer.SetInputConnection( reader.GetOutputPort() ) viewer.SetColorWindow(win) viewer.SetColorLevel(lev) viewer.Render() viewer2 = vtk.vtkImageViewer2() viewer2.SetInputConnection( reader.GetOutputPort() ) viewer2.SetColorWindow(win) viewer2.SetColorLevel(lev) viewer2.Render() iren = vtk.vtkRenderWindowInteractor() viewer2.SetupInteractor(iren) iren.Initialize() and I got the following error:: vtkDICOMImageReader[015579F0]: Couldn't get stored files. Please could someone help me to resolve it Thanks a lot malat wrote: > > On Tue, Feb 17, 2009 at 11:30 AM, RimAY wrote: >> >> Hi all, >> I'm trying to read a Dicom file using python. I have successfully built >> VTK_5.2.1 in python 2.4, but I failed to use vtkDICOMImageReader(). I got >> many errors . > > Do you really expect anyone to help you out without: > 1. Sending the actual error > 2. Sending the actual code you were using > > > > -- > Mathieu > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- View this message in context: http://www.nabble.com/how-to-read-dicom-file-using-python--tp22054451p22055230.html Sent from the VTK - Users mailing list archive at Nabble.com. From planck at netspeed.com.au Tue Feb 17 06:36:32 2009 From: planck at netspeed.com.au (Kevin Osborn) Date: Tue, 17 Feb 2009 22:36:32 +1100 Subject: [vtkusers] Hounsfield Units : strange result (Volume rendering) In-Reply-To: References: <354089231d3a49f7751b019847c5088d@pop.topnet.tn> <499A61EA.3030608@netspeed.com.au> Message-ID: <499AA140.6060609@netspeed.com.au> By definition the Hounsfield value of air is -1000. Water has a value of 0 HU and all other CT densities (or strictly speaking electron densities) represent a linear scale around these two values. In practice the densities don't fit into a narrow Hounsfield range due to variations in calibration of the xray detectors, noise within CT systems and so called partial volume artefact where some image voxels contain both air and soft tissue and therefore have a density intermediate between air (-1000 HU) and soft tissue (approx 40 HU). To set an appropriate range to render lung, you will always therefore render the air/skin interface (and also stomach and bowel gas if the scan includes the upper abdomen). As Frederic Perez said, a region growing algorithm is your best bet. Regards, Kevin wassim_belhadj at topnet.tn wrote: > Hi, > > Thank you for your reply. > > According to Hounsfield Units, the pixel values that form the air is > between -1000 <--------> -995. > > I want to display ONLY the lungs (not skin ...) so I set my function > transfer like this: > > opacityFun->AddPoint(-3024, 0.0); > opacityFun->AddPoint(-878.674, 0.0); > opacityFun->AddPoint(-864.466, 1.0); > opacityFun->AddPoint(-594.524, 1.0); > opacityFun->AddPoint(-395.62, 1.0); > opacityFun->AddPoint(3071, 0.0); > > Hounsfield Units for lungs are -950 <--------> -550 > > I Attached a NEW screenshot that illustrates the problem. > > I vary the values of the transfer function but no result.I did not manage > to remove the part that surrounds the lungs. > > Best regards, > BELHADJ wassim > > > > > > On Tue, 17 Feb 2009 18:06:18 +1100, Kevin Osborn > wrote: > >> Don't forget air surrounds the patient. What your image shows is the >> air/skin interface, not the skin itself. As the lung is mostly air, your >> Hounsfield range between -600 and -400 not only gives lung but also >> includes air around the patient. >> >> >> wassim_belhadj at topnet.tn wrote: >> From post at rocco-gasteiger.de Tue Feb 17 07:27:30 2009 From: post at rocco-gasteiger.de (Rocco Gasteiger) Date: Tue, 17 Feb 2009 13:27:30 +0100 Subject: [vtkusers] [VtkEdge] trying vtkKWEStructuredGridLIC2D In-Reply-To: <972d6afe0902170338v7f50bf7bm239fb43634e8a215@mail.gmail.com> References: <972d6afe0902170149i4203ede8hc62596c81d37a6d2@mail.gmail.com> <972d6afe0902170302u5883e846h4a4ad5bdfd1a9a34@mail.gmail.com> <972d6afe0902170338v7f50bf7bm239fb43634e8a215@mail.gmail.com> Message-ID: <000001c990fb$1a48f5f0$4edae1d0$@de> Hi Fabio, I've tried vtkKWEStructuredGridLIC2D class by my own and find no bug. Errors occur only as I give wrong input to this class. I attached my example to this mail, so you can follow the right connections. The code is not commented and some lines are not necessary but the rest is quite simple to understand. You can ignore the code snippets for reading a structured grid. I generate an example structured grid and add a computed vector field to it. By the way...the output of vtkKWEStructuredGridLIC2D is a structured grid. Hope this is helpful for you. Best regards, Rocco It's a little bit tricky to find the correct input an -----Original Message----- From: vtkedge-bounces at vtkedge.org [mailto:vtkedge-bounces at vtkedge.org] On Behalf Of Fabio Meneghini Sent: Tuesday, February 17, 2009 12:39 PM To: vtkedge at vtkedge.org Subject: Re: [VtkEdge] trying vtkKWEStructuredGridLIC2D HI, It becomes to seem there's a bug in the vtkKWEStructuredGridLIC2D class. In the manual it is written that "The input on port 0 is an vtkImageData with extents of a 2D image." But on runtime, I get this error: "Input for connection index 0 on input port index 0 for algorithm vtkKWEStructuredGridLIC2D(0x1162290) is of type vtkImageData, but a vtkStructuredGrid is required." Furthermore, I still can't understand which output type is returned by this class, and how to visualize it. Thanks for the help Fabio 2009/2/17 Fabio Meneghini : > Please, correct me if I am wrong, but it seems to me that > vtkKWEStructuredGridLIC2D gives a vtkStructuredGrid as outputs?? > If this is the case, how am I supposed to render it? > thanks > > Fabio > > > ---------- Forwarded message ---------- > From: Fabio Meneghini > Date: 2009/2/17 > Subject: trying vtkKWEStructuredGridLIC2D > To: vtkedge at vtkedge.org > > > Hi, I'm trying to work with the vtkKWEStructuredGridLIC2D class, but I > got no results. I feel like I screw up something about the > vtkImageViewer2....Actually I don't know if the following code is > "conceptually" valid: > > Note that piano->GetOutput() is a vtkImageData (since "piano" is an > instance of the vtkImageReslice class...) > > vtkKWEStructuredGridLIC2D *lic = vtkKWEStructuredGridLIC2D::New(); > lic->SetInput(piano->GetOutput()); > lic->SetSteps(40)); > lic->SetStepSize(0.4)); > lic->SetMagnification(1)); > > vtkImageViewer2 *viewer = vtkImageViewer2::New(); > viewer->SetInputConnection(lic->GetOutputPort()); > > vtkRenderWindowInteractor *rwi = vtkRenderWindowInteractor::New(); > viewer->SetupInteractor(rwi); > viewer->Render(); > > The program execution gives me no errors at all, but no Render window > is neither opened... > Is there something wrong? > Any hint will be very appreciated, thanks > > Fabio > _______________________________________________ VtkEdge mailing list VtkEdge at vtkedge.org http://public.kitware.com/cgi-bin/mailman/listinfo/vtkedge -------------- next part -------------- A non-text attachment was scrubbed... Name: LICStructuredVTKEdge.zip Type: application/x-zip-compressed Size: 3054 bytes Desc: not available URL: From oliverkania at googlemail.com Tue Feb 17 08:19:07 2009 From: oliverkania at googlemail.com (Oliver Kania) Date: Tue, 17 Feb 2009 14:19:07 +0100 Subject: [vtkusers] [vtk-users] How to get dotted contour lines Message-ID: <200e07ca0902170519l1ecdd8ebpffeca5399afa282d@mail.gmail.com> ... if the resolution of underlying image is very high. Subsampling is not an option. Is there a way to "splice" the single tiny lines and get longer ones which can be properly stippled ? oliver -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.malaterre at gmail.com Tue Feb 17 08:35:20 2009 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Tue, 17 Feb 2009 14:35:20 +0100 Subject: [vtkusers] how to read dicom file using python? In-Reply-To: <22055230.post@talk.nabble.com> References: <22054451.post@talk.nabble.com> <22055230.post@talk.nabble.com> Message-ID: On Tue, Feb 17, 2009 at 12:23 PM, RimAY wrote: > > I'm sorry, > Thanks for your reply, > > Here is my code: > > import vtk > > reader = vtk.vtkDICOMImageReader() > reader.SetDirectoryName('the root of my dicom files') Works for me. > > and I got the following error:: vtkDICOMImageReader[015579F0]: Couldn't get > stored files. http://en.wikipedia.org/wiki/Dyslexia :) Did you mean 'sorted' ? > Please could someone help me to resolve it Implicitely vtkDICOMImageReader will only works with MR Image Storage or CT Image Storage, as it requires Image Orientation (Patient) and Image Position (Patient) attribute to order slices. You could use vtkGDCMImageReader as it does not have such restriction. http://gdcm.sourceforge.net/html/classvtkGDCMImageReader.html 2cts -- Mathieu From fab.meneghini at gmail.com Tue Feb 17 08:46:57 2009 From: fab.meneghini at gmail.com (Fabio Meneghini) Date: Tue, 17 Feb 2009 14:46:57 +0100 Subject: [vtkusers] [VtkEdge] trying vtkKWEStructuredGridLIC2D In-Reply-To: <000001c990fb$1a48f5f0$4edae1d0$@de> References: <972d6afe0902170149i4203ede8hc62596c81d37a6d2@mail.gmail.com> <972d6afe0902170302u5883e846h4a4ad5bdfd1a9a34@mail.gmail.com> <972d6afe0902170338v7f50bf7bm239fb43634e8a215@mail.gmail.com> <000001c990fb$1a48f5f0$4edae1d0$@de> Message-ID: <972d6afe0902170546h17f3b8f7h5fefd0bf283cdd6f@mail.gmail.com> ok, thanks. So, in the end, the input for the vtkKWEStructuredGridLIC2D must be a vtkStructuredGrid object... I hope this will soon be fixed on the related manual page. I will look at it, thank you very much again. Fabio 2009/2/17 Rocco Gasteiger : > Hi Fabio, > > I've tried vtkKWEStructuredGridLIC2D class by my own and find no bug. Errors > occur only as I give wrong input to this class. I attached my example to > this mail, so you can follow the right connections. The code is not > commented and some lines are not necessary but the rest is quite simple to > understand. You can ignore the code snippets for reading a structured grid. > I generate an example structured grid and add a computed vector field to it. > > > By the way...the output of vtkKWEStructuredGridLIC2D is a structured grid. > > Hope this is helpful for you. > > Best regards, Rocco > > It's a little bit tricky to find the correct input an > -----Original Message----- > From: vtkedge-bounces at vtkedge.org [mailto:vtkedge-bounces at vtkedge.org] On > Behalf Of Fabio Meneghini > Sent: Tuesday, February 17, 2009 12:39 PM > To: vtkedge at vtkedge.org > Subject: Re: [VtkEdge] trying vtkKWEStructuredGridLIC2D > > HI, > It becomes to seem there's a bug in the vtkKWEStructuredGridLIC2D class. > In the manual it is written that "The input on port 0 is an > vtkImageData with extents of a 2D image." > But on runtime, I get this error: > "Input for connection index 0 on input port index 0 for algorithm > vtkKWEStructuredGridLIC2D(0x1162290) is of type vtkImageData, but a > vtkStructuredGrid is required." > Furthermore, I still can't understand which output type is returned by > this class, and how to visualize it. > Thanks for the help > > Fabio > > 2009/2/17 Fabio Meneghini : >> Please, correct me if I am wrong, but it seems to me that >> vtkKWEStructuredGridLIC2D gives a vtkStructuredGrid as outputs?? >> If this is the case, how am I supposed to render it? >> thanks >> >> Fabio >> >> >> ---------- Forwarded message ---------- >> From: Fabio Meneghini >> Date: 2009/2/17 >> Subject: trying vtkKWEStructuredGridLIC2D >> To: vtkedge at vtkedge.org >> >> >> Hi, I'm trying to work with the vtkKWEStructuredGridLIC2D class, but I >> got no results. I feel like I screw up something about the >> vtkImageViewer2....Actually I don't know if the following code is >> "conceptually" valid: >> >> Note that piano->GetOutput() is a vtkImageData (since "piano" is an >> instance of the vtkImageReslice class...) >> >> vtkKWEStructuredGridLIC2D *lic = vtkKWEStructuredGridLIC2D::New(); >> lic->SetInput(piano->GetOutput()); >> lic->SetSteps(40)); >> lic->SetStepSize(0.4)); >> lic->SetMagnification(1)); >> >> vtkImageViewer2 *viewer = vtkImageViewer2::New(); >> viewer->SetInputConnection(lic->GetOutputPort()); >> >> vtkRenderWindowInteractor *rwi = vtkRenderWindowInteractor::New(); >> viewer->SetupInteractor(rwi); >> viewer->Render(); >> >> The program execution gives me no errors at all, but no Render window >> is neither opened... >> Is there something wrong? >> Any hint will be very appreciated, thanks >> >> Fabio >> > _______________________________________________ > VtkEdge mailing list > VtkEdge at vtkedge.org > http://public.kitware.com/cgi-bin/mailman/listinfo/vtkedge > From berk.geveci at kitware.com Tue Feb 17 09:10:24 2009 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 17 Feb 2009 09:10:24 -0500 Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? In-Reply-To: <02247ABB-506F-4894-9C12-A6C4404E57B2@bluequartz.net> References: <359422.99375.qm@web51706.mail.re2.yahoo.com> <20090213015616.1769857463@kingu.local> <4994D3E1.1050507@sci.monash.edu.au> <20090213020204.2120989307@kingu.local> <499771D6.3010000@sci.monash.edu.au> <02247ABB-506F-4894-9C12-A6C4404E57B2@bluequartz.net> Message-ID: <45d654b0902170610t75930c74yc61852f7b0e176bd@mail.gmail.com> > Thorough testing of your extremely large data sets is well warranted. I'm > not trying to take anything away from VTK. I think it is a wonderful toolkit > that has allowed me to help people solve real problems. Just a word of > caution that if your data sets start getting large (into 64 bit territory) > be ready to possibly hunt down some bugs in the VTK code. I would strongly encourage developers and users to report any issues they find related to 64 bit issues when processing large datasets. We are actively hunting such bugs. I want to clarify a few things: * You will be in the "64 bit territory" when the number of points or cells in your datasets is bigger than 2^31 (we use signed ints). It is totally possible to have datasets much larger than 4 GiB without exceeding 2^31 points/cells. * Make sure to turn on VTK_USE_64BIT_IDS before compiling. This is OFF by default. Without setting VTK_USE_64BIT_IDS to on, you cannot process datasets that have more than 2^31 points/cells even on a 64 bit machine. When VTK_USE_64BIT_IDS is on, VTK will use a 64 bit integer for indexing. Otherwise, it will use a 32 bit integer. -berk On Sat, Feb 14, 2009 at 11:16 PM, Michael Jackson wrote: > There are those issues and possible issues with 32 bit math results being > placed into a 64 bit value such as the following: > > int x, y, z; > > int64 total = x * y * z; > > on the surface that looks fine, but what happens when x * y * z goes beyond > the max signed int value? It rolls over and you get all sorts of weird > errors. > > I found and fixed a few of these last year and others have gone on the "64 > bit hunt" before but no one really sure just where the rest of the bugs are > at. > > Thorough testing of your extremely large data sets is well warranted. I'm > not trying to take anything away from VTK. I think it is a wonderful toolkit > that has allowed me to help people solve real problems. Just a word of > caution that if your data sets start getting large (into 64 bit territory) > be ready to possibly hunt down some bugs in the VTK code. > > --- > Mike Jackson www.bluequartz.net > > > > On Feb 14, 2009, at 8:37 PM, shekharc wrote: > >> No, not atm. Perhaps that's why it works for me so far. >> >> Is it fair to say that 64-bit issues would crop up when say the array >> lengths are like 2^32 or bigger (because of ints)? Other libraries (like >> Blitz++) tend to have this issue too I believe. >> >> Cheers >> Shakes >> >> Sean McBride wrote: >>> >>> On 2/13/09 12:58 PM, shekharc said: >>>> >>>> Works fine on Windows Vista/XP x64 and Linux x64 fine for me so far. >>> >>> Out of curiosity, are you using datasets > 4 GiB? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From nkwmailinglists at gmail.com Tue Feb 17 09:11:28 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Tue, 17 Feb 2009 08:11:28 -0600 Subject: [vtkusers] HOWTO: pick points on 2D Plane & show points? In-Reply-To: <499A1510.7000302@kitware.com> References: <44f773f50902161504y6e7a4402hdd46dcda77550390@mail.gmail.com> <499A1510.7000302@kitware.com> Message-ID: <44f773f50902170611l272640fbxe5d44b134897b960@mail.gmail.com> That helps a lot. Sometimes just a pointer into the ocean of VTK classes can save you a lot of time. I was actually considering just hacking vtkContourWidget into my own version -- make a degenerate representation with just one point, trim out the spline curve calculation and display. The rest of the event handling and representation are fine. Though the Seed Widget sounds like a more straightforward solution. On Mon, Feb 16, 2009 at 7:38 PM, Karthik Krishnan wrote: > vtkSeedWidget does precisely this. A few tips follow. > > - Play around with TestSeedWidget2.cxx. You may need to uncomment the test > from Widgets/Testing/Cxx/CMakeLists.txt, so that it gets compiled. > > - The default handle representation is rendered as 2D crosshairs. You can > change this to any arbitrary shape. The seed representation allows you to > set any vtkHandleRepresentation. So you can use a > vtkPolygonalHandleRepresentation3D which allows the handles (seeds) to be > representated with a user specified geometry. Check out > TestPolygonalRepresentationHandleWidget.cxx to see how handles can be > represented as arbitrary geometries. > > Hope this helps. > > -- > karthik > > kent williams wrote: >> >> I've been looking through the mailing list archive and VTK examples >> for some time and not come up with any good way to what I need to do, >> so I'm asking you-all. >> >> We want to be able to pick points on a 2D view plane, display some >> sort of geometry (a circle?) where a point has been placed, and be >> able to move points around after the fact. >> >> In other words the use case would be this. >> >> 1. User clicks 'add point' button to go into point-choosing mode. >> 2. User clicks in 2D view, and the point clicked is marked with some >> geometry -- e.g. a white circle. >> 3. After a point has been placed, the user can pick and drag the point. >> >> Actually, what would be great would be for there to be a widget that >> acts like the vtkContourWidget handles. You click, it drops a white >> dot, and once the Contour is closed, you can pick and drag the points. >> >> Suggestions? >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > -- > Karthik Krishnan > R & D Engineer, > Kitware Inc, > Ph: 518 371 3971 x119 > Fax: 518 371 3971 > > From utkarsh.ayachit at kitware.com Tue Feb 17 09:26:19 2009 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 17 Feb 2009 09:26:19 -0500 Subject: [vtkusers] [VtkEdge] trying vtkKWEStructuredGridLIC2D In-Reply-To: <972d6afe0902170546h17f3b8f7h5fefd0bf283cdd6f@mail.gmail.com> References: <972d6afe0902170149i4203ede8hc62596c81d37a6d2@mail.gmail.com> <972d6afe0902170302u5883e846h4a4ad5bdfd1a9a34@mail.gmail.com> <972d6afe0902170338v7f50bf7bm239fb43634e8a215@mail.gmail.com> <000001c990fb$1a48f5f0$4edae1d0$@de> <972d6afe0902170546h17f3b8f7h5fefd0bf283cdd6f@mail.gmail.com> Message-ID: <7ba9d6a30902170626o1a31cc3bp9e546ae2772bc06a@mail.gmail.com> Thanks Fabio, I've updated the documentation. On Tue, Feb 17, 2009 at 8:46 AM, Fabio Meneghini wrote: > ok, thanks. > So, in the end, the input for the vtkKWEStructuredGridLIC2D must be a > vtkStructuredGrid object... I hope this will soon be fixed on the > related manual page. > I will look at it, thank you very much again. > Fabio > > 2009/2/17 Rocco Gasteiger : >> Hi Fabio, >> >> I've tried vtkKWEStructuredGridLIC2D class by my own and find no bug. Errors >> occur only as I give wrong input to this class. I attached my example to >> this mail, so you can follow the right connections. The code is not >> commented and some lines are not necessary but the rest is quite simple to >> understand. You can ignore the code snippets for reading a structured grid. >> I generate an example structured grid and add a computed vector field to it. >> >> >> By the way...the output of vtkKWEStructuredGridLIC2D is a structured grid. >> >> Hope this is helpful for you. >> >> Best regards, Rocco >> >> It's a little bit tricky to find the correct input an >> -----Original Message----- >> From: vtkedge-bounces at vtkedge.org [mailto:vtkedge-bounces at vtkedge.org] On >> Behalf Of Fabio Meneghini >> Sent: Tuesday, February 17, 2009 12:39 PM >> To: vtkedge at vtkedge.org >> Subject: Re: [VtkEdge] trying vtkKWEStructuredGridLIC2D >> >> HI, >> It becomes to seem there's a bug in the vtkKWEStructuredGridLIC2D class. >> In the manual it is written that "The input on port 0 is an >> vtkImageData with extents of a 2D image." >> But on runtime, I get this error: >> "Input for connection index 0 on input port index 0 for algorithm >> vtkKWEStructuredGridLIC2D(0x1162290) is of type vtkImageData, but a >> vtkStructuredGrid is required." >> Furthermore, I still can't understand which output type is returned by >> this class, and how to visualize it. >> Thanks for the help >> >> Fabio >> >> 2009/2/17 Fabio Meneghini : >>> Please, correct me if I am wrong, but it seems to me that >>> vtkKWEStructuredGridLIC2D gives a vtkStructuredGrid as outputs?? >>> If this is the case, how am I supposed to render it? >>> thanks >>> >>> Fabio >>> >>> >>> ---------- Forwarded message ---------- >>> From: Fabio Meneghini >>> Date: 2009/2/17 >>> Subject: trying vtkKWEStructuredGridLIC2D >>> To: vtkedge at vtkedge.org >>> >>> >>> Hi, I'm trying to work with the vtkKWEStructuredGridLIC2D class, but I >>> got no results. I feel like I screw up something about the >>> vtkImageViewer2....Actually I don't know if the following code is >>> "conceptually" valid: >>> >>> Note that piano->GetOutput() is a vtkImageData (since "piano" is an >>> instance of the vtkImageReslice class...) >>> >>> vtkKWEStructuredGridLIC2D *lic = vtkKWEStructuredGridLIC2D::New(); >>> lic->SetInput(piano->GetOutput()); >>> lic->SetSteps(40)); >>> lic->SetStepSize(0.4)); >>> lic->SetMagnification(1)); >>> >>> vtkImageViewer2 *viewer = vtkImageViewer2::New(); >>> viewer->SetInputConnection(lic->GetOutputPort()); >>> >>> vtkRenderWindowInteractor *rwi = vtkRenderWindowInteractor::New(); >>> viewer->SetupInteractor(rwi); >>> viewer->Render(); >>> >>> The program execution gives me no errors at all, but no Render window >>> is neither opened... >>> Is there something wrong? >>> Any hint will be very appreciated, thanks >>> >>> Fabio >>> >> _______________________________________________ >> VtkEdge mailing list >> VtkEdge at vtkedge.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/vtkedge >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From david.cole at kitware.com Tue Feb 17 10:01:52 2009 From: david.cole at kitware.com (David Cole) Date: Tue, 17 Feb 2009 10:01:52 -0500 Subject: [vtkusers] is Vtk 5.2.1 64 bit clean? In-Reply-To: <45d654b0902170610t75930c74yc61852f7b0e176bd@mail.gmail.com> References: <359422.99375.qm@web51706.mail.re2.yahoo.com> <20090213015616.1769857463@kingu.local> <4994D3E1.1050507@sci.monash.edu.au> <20090213020204.2120989307@kingu.local> <499771D6.3010000@sci.monash.edu.au> <02247ABB-506F-4894-9C12-A6C4404E57B2@bluequartz.net> <45d654b0902170610t75930c74yc61852f7b0e176bd@mail.gmail.com> Message-ID: Just a small clarification. The default value for VTK_USE_64BIT_IDS depends on the type of binary you are building. For 32-bit binaries, it is OFF, for 64-bit binaries it is ON by default. from VTK's CMakeLists.txt: ================================= IF("${CMAKE_SIZEOF_VOID_P}" GREATER 4) SET(VTK_USE_64BIT_IDS_DEFAULT ON) ELSE("${CMAKE_SIZEOF_VOID_P}" GREATER 4) SET(VTK_USE_64BIT_IDS_DEFAULT OFF) ENDIF("${CMAKE_SIZEOF_VOID_P}" GREATER 4) On Tue, Feb 17, 2009 at 9:10 AM, Berk Geveci wrote: > > Thorough testing of your extremely large data sets is well warranted. > I'm > > not trying to take anything away from VTK. I think it is a wonderful > toolkit > > that has allowed me to help people solve real problems. Just a word of > > caution that if your data sets start getting large (into 64 bit > territory) > > be ready to possibly hunt down some bugs in the VTK code. > > I would strongly encourage developers and users to report any issues > they find related to 64 bit issues when processing large datasets. We > are actively hunting such bugs. I want to clarify a few things: > > * You will be in the "64 bit territory" when the number of points or > cells in your datasets is bigger than 2^31 (we use signed ints). It is > totally possible to have datasets much larger than 4 GiB without > exceeding 2^31 points/cells. > > * Make sure to turn on VTK_USE_64BIT_IDS before compiling. This is OFF > by default. Without setting VTK_USE_64BIT_IDS to on, you cannot > process datasets that have more than 2^31 points/cells even on a 64 > bit machine. When VTK_USE_64BIT_IDS is on, VTK will use a 64 bit > integer for indexing. Otherwise, it will use a 32 bit integer. > > -berk > > > On Sat, Feb 14, 2009 at 11:16 PM, Michael Jackson > wrote: > > There are those issues and possible issues with 32 bit math results being > > placed into a 64 bit value such as the following: > > > > int x, y, z; > > > > int64 total = x * y * z; > > > > on the surface that looks fine, but what happens when x * y * z goes > beyond > > the max signed int value? It rolls over and you get all sorts of weird > > errors. > > > > I found and fixed a few of these last year and others have gone on the > "64 > > bit hunt" before but no one really sure just where the rest of the bugs > are > > at. > > > > Thorough testing of your extremely large data sets is well warranted. > I'm > > not trying to take anything away from VTK. I think it is a wonderful > toolkit > > that has allowed me to help people solve real problems. Just a word of > > caution that if your data sets start getting large (into 64 bit > territory) > > be ready to possibly hunt down some bugs in the VTK code. > > > > --- > > Mike Jackson www.bluequartz.net > > > > > > > > On Feb 14, 2009, at 8:37 PM, shekharc wrote: > > > >> No, not atm. Perhaps that's why it works for me so far. > >> > >> Is it fair to say that 64-bit issues would crop up when say the array > >> lengths are like 2^32 or bigger (because of ints)? Other libraries (like > >> Blitz++) tend to have this issue too I believe. > >> > >> Cheers > >> Shakes > >> > >> Sean McBride wrote: > >>> > >>> On 2/13/09 12:58 PM, shekharc said: > >>>> > >>>> Works fine on Windows Vista/XP x64 and Linux x64 fine for me so far. > >>> > >>> Out of curiosity, are you using datasets > 4 GiB? > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From becker at jkbecker.de Tue Feb 17 10:02:09 2009 From: becker at jkbecker.de (Jens K. Becker) Date: Tue, 17 Feb 2009 16:02:09 +0100 Subject: [vtkusers] "Solid" polyhedron In-Reply-To: References: <1233752733.2298.4.camel@model> Message-ID: <1234882929.3246.17.camel@model> Hi all, I have tried using the approach with a 3D delaunay tirangulation, and I can now display polyhedra as a volume. But I can not clip it. I have copied together a small program (see below) that shows how I tried to do it. I have no idea why I can not clip it using the box-widget, could somebody let me know where I am going wrong (or what I am missing)? That would be super! Thanks in advance, Jens CODE: import vtk points = vtk.vtkPoints() points.InsertPoint(0,0,0,0) points.InsertPoint(1,1000,0,0) points.InsertPoint(2,0,1000,0) points.InsertPoint(3,1000,1000,0) points.InsertPoint(4,0,0,1000) points.InsertPoint(5,1000,0,1000) points.InsertPoint(6,0,1000,1000) points.InsertPoint(7,1000,1000,1000) profile = vtk.vtkPolyData() profile.SetPoints(points) FacetID = vtk.vtkIntArray() for x in range(0,160): FacetID.InsertNextValue(x) profile.GetCellData().SetScalars(FacetID) profile.GetPointData().SetScalars(FacetID) # Delaunay3D is used to triangulate the points. The Tolerance is the # distance that nearly coincident points are merged # together. (Delaunay does better if points are well spaced.) The # alpha value is the radius of circumcircles, circumspheres. Any mesh # entity whose circumcircle is smaller than this value is output. delny = vtk.vtkDelaunay3D() delny.SetInput(profile) delny.SetTolerance(0.01) #delny.SetAlpha(0.2) #delny.BoundingTriangulationOff() # Create transfer mapping scalar value to opacity opacityTransferFunction=vtk.vtkPiecewiseFunction() opacityTransferFunction.AddPoint(0,0.0) opacityTransferFunction.AddPoint(160,255.0) # Create transfer mapping scalar value to color colorTransferFunction=vtk.vtkColorTransferFunction() colorTransferFunction.AddRGBPoint(0.0,0.0,0.0,0.0) colorTransferFunction.AddRGBPoint(1.0,0.0,0.0,1.0) colorTransferFunction.AddRGBPoint(160.0,1.0,1.0,1.0) volumeProperty=vtk.vtkVolumeProperty() volumeProperty.SetColor(colorTransferFunction) volumeProperty.SetScalarOpacity(opacityTransferFunction) volumeProperty.ShadeOff() volumeProperty.SetInterpolationTypeToLinear() volumeMapper=vtk.vtkUnstructuredGridVolumeRayCastMapper() volumeMapper.SetInputConnection(delny.GetOutputPort()) # The volume holds the mapper and the property and # can be used to position/orient the volume volume=vtk.vtkVolume() volume.SetMapper(volumeMapper) volume.SetProperty(volumeProperty) # Create the RenderWindow, Renderer and both Actors ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # When interaction starts, the requested frame rate is increased. def StartInteraction(obj, event): global renWin renWin.SetDesiredUpdateRate(10) # When interaction ends, the requested frame rate is decreased to # normal levels. This causes a full resolution render to occur. def EndInteraction(obj, event): global renWin renWin.SetDesiredUpdateRate(0.001) # The implicit function vtkPlanes is used in conjunction with the # volume ray cast mapper to limit which portion of the volume is # volume rendered. planes = vtk.vtkPlanes() def ClipVolumeRender(obj, event): global planes, volumeMapper obj.GetPlanes(planes) volumeMapper.SetClippingPlanes(planes) # The SetInteractor method is how 3D widgets are associated with the # render window interactor. Internally, SetInteractor sets up a bunch # of callbacks using the Command/Observer mechanism (AddObserver()). boxWidget = vtk.vtkBoxWidget() boxWidget.SetInteractor(iren) boxWidget.SetInput(delny.GetOutput()) boxWidget.SetPlaceFactor(2.0) boxWidget.PlaceWidget() boxWidget.InsideOutOn() boxWidget.AddObserver("StartInteractionEvent", StartInteraction) boxWidget.AddObserver("InteractionEvent", ClipVolumeRender) boxWidget.AddObserver("EndInteractionEvent", EndInteraction) outlineProperty = boxWidget.GetOutlineProperty() outlineProperty.SetRepresentationToWireframe() outlineProperty.SetColor(0,0,0) outlineProperty.SetLineWidth(5) # Add the actors to the renderer, set the background and size ren.AddVolume(volume) renWin.AddRenderer(ren) ren.SetBackground(1, 1, 1) renWin.SetSize(400, 400) iren.Initialize() renWin.Render() iren.Start() On Thu, 2009-02-05 at 09:45 -0500, David E DeMarle wrote: > vtkPolyData can only represent the external surfaces, because it can > only contain 2D cell types, such as triangle. > > vtkUnstructuredGrid can represent the internal volume as well, because > it can contain 3D cell types, such a tetrahedra. > > You can use the Delauney filters to create 2D or 3D cells out of a set > of points. > > > On Wed, Feb 4, 2009 at 8:05 AM, Jens K. Becker wrote: > > Hi all, > > > > I have a polyhedron that I can display using vtk. The polyhedron is > > essentially defined by vertices that define triangluar facets which make > > up the outer shell of it. I use vtk to display the outer shell, the > > different vertices (as spheres) and edges of facets (as tubes). But it > > is only the outer shell that is displayed, the polyhedra are hollow. How > > can I color the whole polyhedron? I dont even know where to start > > looking to achieve this. Eveything I read about creating volumes does > > not apply to the kind of data I have (which essentially are the > > coordinates of vertices in 3D and which vertex belongs to which facet). > > Any help and hints are welcome! > > > > Greetings, > > Jens > > > > -- > > Dr. J.K. Becker > > University of Tuebingen - Institute for Geoscience > > Sigwartst. 10 - 72076 Tuebingen (Germany) > > Tel.: ++49 7071 29 73139 Fax: +49 7071 5059 > > Web: http://www.jkbecker.de > > > > _______________________________________________ > > This is the private VTK discussion list. > > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > -- Dr. J.K. Becker University of Tuebingen - Institute for Geoscience Sigwartst. 10 - 72076 Tuebingen (Germany) Tel.: ++49 7071 29 73139 Fax: +49 7071 5059 Web: http://www.jkbecker.de From bellina at illinois.edu Tue Feb 17 10:37:35 2009 From: bellina at illinois.edu (Alessandro A. Bellina) Date: Tue, 17 Feb 2009 09:37:35 -0600 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: <20090214203458.965444501@kingu.local> Message-ID: OK, nothing truly jumps out at me so I am posting the whole message. Could it be something wrong with the CMake I have installed? Thanks for the help Alessandro CMakeError.log starts: Determining if the include file sys/types.h exists failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckIncludeFile.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 Determining if the include file stdint.h exists failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckIncludeFile.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 Determining if the include file stddef.h exists failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckIncludeFile.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 Determining size of int failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckTypeSizeC.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CheckTypeSizeC.c: #define CHECK_TYPE_SIZE_TYPE int #ifdef CHECK_TYPE_SIZE_TYPE #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_STDINT_H # include #endif /* HAVE_STDINT_H */ #ifdef HAVE_STDDEF_H # include #endif /* HAVE_STDDEF_H */ #ifdef __CLASSIC_C__ # define const #endif #define SIZE (sizeof(int)) const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']','\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_sizeof[argc]; (void)argv; return require; } #else /* CHECK_TYPE_SIZE_TYPE */ # error "CHECK_TYPE_SIZE_TYPE has to specify the type" #endif /* CHECK_TYPE_SIZE_TYPE */ Determining size of long failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckTypeSizeC.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CheckTypeSizeC.c: #define CHECK_TYPE_SIZE_TYPE long #ifdef CHECK_TYPE_SIZE_TYPE #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_STDINT_H # include #endif /* HAVE_STDINT_H */ #ifdef HAVE_STDDEF_H # include #endif /* HAVE_STDDEF_H */ #ifdef __CLASSIC_C__ # define const #endif #define SIZE (sizeof(long)) const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']','\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_sizeof[argc]; (void)argv; return require; } #else /* CHECK_TYPE_SIZE_TYPE */ # error "CHECK_TYPE_SIZE_TYPE has to specify the type" #endif /* CHECK_TYPE_SIZE_TYPE */ Determining size of void* failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckTypeSizeC.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CheckTypeSizeC.c: #define CHECK_TYPE_SIZE_TYPE void* #ifdef CHECK_TYPE_SIZE_TYPE #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_STDINT_H # include #endif /* HAVE_STDINT_H */ #ifdef HAVE_STDDEF_H # include #endif /* HAVE_STDDEF_H */ #ifdef __CLASSIC_C__ # define const #endif #define SIZE (sizeof(void*)) const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']','\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_sizeof[argc]; (void)argv; return require; } #else /* CHECK_TYPE_SIZE_TYPE */ # error "CHECK_TYPE_SIZE_TYPE has to specify the type" #endif /* CHECK_TYPE_SIZE_TYPE */ Determining size of char failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckTypeSizeC.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CheckTypeSizeC.c: #define CHECK_TYPE_SIZE_TYPE char #ifdef CHECK_TYPE_SIZE_TYPE #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_STDINT_H # include #endif /* HAVE_STDINT_H */ #ifdef HAVE_STDDEF_H # include #endif /* HAVE_STDDEF_H */ #ifdef __CLASSIC_C__ # define const #endif #define SIZE (sizeof(char)) const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']','\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_sizeof[argc]; (void)argv; return require; } #else /* CHECK_TYPE_SIZE_TYPE */ # error "CHECK_TYPE_SIZE_TYPE has to specify the type" #endif /* CHECK_TYPE_SIZE_TYPE */ Determining size of short failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckTypeSizeC.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CheckTypeSizeC.c: #define CHECK_TYPE_SIZE_TYPE short #ifdef CHECK_TYPE_SIZE_TYPE #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_STDINT_H # include #endif /* HAVE_STDINT_H */ #ifdef HAVE_STDDEF_H # include #endif /* HAVE_STDDEF_H */ #ifdef __CLASSIC_C__ # define const #endif #define SIZE (sizeof(short)) const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']','\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_sizeof[argc]; (void)argv; return require; } #else /* CHECK_TYPE_SIZE_TYPE */ # error "CHECK_TYPE_SIZE_TYPE has to specify the type" #endif /* CHECK_TYPE_SIZE_TYPE */ Determining size of float failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckTypeSizeC.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CheckTypeSizeC.c: #define CHECK_TYPE_SIZE_TYPE float #ifdef CHECK_TYPE_SIZE_TYPE #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_STDINT_H # include #endif /* HAVE_STDINT_H */ #ifdef HAVE_STDDEF_H # include #endif /* HAVE_STDDEF_H */ #ifdef __CLASSIC_C__ # define const #endif #define SIZE (sizeof(float)) const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']','\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_sizeof[argc]; (void)argv; return require; } #else /* CHECK_TYPE_SIZE_TYPE */ # error "CHECK_TYPE_SIZE_TYPE has to specify the type" #endif /* CHECK_TYPE_SIZE_TYPE */ Determining size of double failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckTypeSizeC.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CheckTypeSizeC.c: #define CHECK_TYPE_SIZE_TYPE double #ifdef CHECK_TYPE_SIZE_TYPE #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_STDINT_H # include #endif /* HAVE_STDINT_H */ #ifdef HAVE_STDDEF_H # include #endif /* HAVE_STDDEF_H */ #ifdef __CLASSIC_C__ # define const #endif #define SIZE (sizeof(double)) const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']','\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_sizeof[argc]; (void)argv; return require; } #else /* CHECK_TYPE_SIZE_TYPE */ # error "CHECK_TYPE_SIZE_TYPE has to specify the type" #endif /* CHECK_TYPE_SIZE_TYPE */ Determining if files limits.h exist failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckIncludeFiles.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 Source: /* */ #include int main(){return 0;} Determining if files unistd.h exist failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckIncludeFiles.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 Source: /* */ #include int main(){return 0;} Determining if files pthread.h exist failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckIncludeFiles.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 Source: /* */ #include int main(){return 0;} Determining if files sys/types.h;sys/prctl.h exist failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckIncludeFiles.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 Source: /* */ #include #include int main(){return 0;} Determining size of unsigned short failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckTypeSizeC.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CheckTypeSizeC.c: #define CHECK_TYPE_SIZE_TYPE unsigned short #ifdef CHECK_TYPE_SIZE_TYPE #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_STDINT_H # include #endif /* HAVE_STDINT_H */ #ifdef HAVE_STDDEF_H # include #endif /* HAVE_STDDEF_H */ #ifdef __CLASSIC_C__ # define const #endif #define SIZE (sizeof(unsigned short)) const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']','\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_sizeof[argc]; (void)argv; return require; } #else /* CHECK_TYPE_SIZE_TYPE */ # error "CHECK_TYPE_SIZE_TYPE has to specify the type" #endif /* CHECK_TYPE_SIZE_TYPE */ Determining size of unsigned int failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckTypeSizeC.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CheckTypeSizeC.c: #define CHECK_TYPE_SIZE_TYPE unsigned int #ifdef CHECK_TYPE_SIZE_TYPE #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_STDINT_H # include #endif /* HAVE_STDINT_H */ #ifdef HAVE_STDDEF_H # include #endif /* HAVE_STDDEF_H */ #ifdef __CLASSIC_C__ # define const #endif #define SIZE (sizeof(unsigned int)) const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']','\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_sizeof[argc]; (void)argv; return require; } #else /* CHECK_TYPE_SIZE_TYPE */ # error "CHECK_TYPE_SIZE_TYPE has to specify the type" #endif /* CHECK_TYPE_SIZE_TYPE */ Determining size of unsigned long failed with the following output: Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E cmake_progress_report /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o /usr/bin/gcc -mlong-branch -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CheckTypeSizeC.c cc1: error: unrecognized command line option "-mlong-branch" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CheckTypeSizeC.c: #define CHECK_TYPE_SIZE_TYPE unsigned long #ifdef CHECK_TYPE_SIZE_TYPE #ifdef HAVE_SYS_TYPES_H # include #endif /* HAVE_SYS_TYPES_H */ #ifdef HAVE_STDINT_H # include #endif /* HAVE_STDINT_H */ #ifdef HAVE_STDDEF_H # include #endif /* HAVE_STDDEF_H */ #ifdef __CLASSIC_C__ # define const #endif #define SIZE (sizeof(unsigned long)) const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']','\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_sizeof[argc]; (void)argv; return require; } #else /* CHECK_TYPE_SIZE_TYPE */ # error "CHECK_TYPE_SIZE_TYPE has to specify the type" #endif /* CHECK_TYPE_SIZE_TYPE */ On Mon, Feb 16, 2009 at 7:56 PM, Michael Jackson wrote: > I would say post the CMakeError.log to the list to see what may be going > wrong. Or just look through that log file and see if something odd pops out > at you. > > Lots and Lots of people compile VTK CVS nightly on OS X 10.5. Intel 32 bit > systems and are not having any issues. > > Are you starting from a clean build directory each time? > Do you have any environment variables that are automatically set that might > be interfering with the compilation? > > _________________________________________________________ > Mike Jackson mike.jackson at bluequartz.net > BlueQuartz Software www.bluequartz.net > Principal Software Engineer Dayton, Ohio > > > > On Feb 16, 2009, at 4:36 PM, Alessandro A. Bellina wrote: > >> Hi, >> I tried installing VTK 5.2 but I got this error (same error I got before) >> >> I checked it out from CVS >> >> >> CMake Error at /Applications/CMake >> 2.6-2.app/Contents/share/cmake-2.6/Modules/TestBigEndian.cmake:31 >> (MESSAGE): >> no suitable type found >> Call Stack (most recent call first): >> CMake/CMakeBackwardCompatibilityC.cmake:31 (TEST_BIG_ENDIAN) >> CMakeLists.txt:365 (INCLUDE) >> >> >> Any ideas? >> >> Thanks, >> >> Alessandro >> >> >> On Sat, Feb 14, 2009 at 3:44 PM, Alessandro A. Bellina >> wrote: >>> >>> Thanks. I did find that using Delete worked. I was missing one delete >>> for the probeFilter.... >>> >>> I tried installing 5.2 a little while back and I kept on getting a >>> cmake endinanness error. I will try again when I get a chance and let >>> you know what I find. I would like to use temporal datasets (something >>> I understand now comes in 5.2). >>> >>> Thanks, >>> >>> Alessandro >>> >>> On Sat, Feb 14, 2009 at 2:34 PM, Sean McBride >>> wrote: >>>> >>>> On 2/14/09 9:32 AM, Alessandro A. Bellina said: >>>> >>>>> MacOS Intel Based >>>>> VTK 5.0.3 >>>>> I don't have 5.2 because I get endianness errors while trying to >>>>> compile. >>>> >>>> I agree with Mike, you should figure this out. There were several Mac- >>>> related improvements between 5.0 and 5.2, I would definitely recommend >>>> using the newest version. >>>> >>>> -- >>>> ____________________________________________________________ >>>> Sean McBride, B. Eng sean at rogue-research.com >>>> Rogue Research www.rogue-research.com >>>> Mac Software Developer Montr?al, Qu?bec, Canada >>>> >>>> >>>> >>> >>> >>> >>> -- >>> Alessandro A. Bellina >>> >>> Graduate Student >>> Bioacoustics Research Laboratory >>> Electrical and Computer Engineering >>> University of Illinois at Urbana-Champaign >>> >> >> >> >> -- >> Alessandro A. Bellina >> >> Graduate Student >> Bioacoustics Research Laboratory >> Electrical and Computer Engineering >> University of Illinois at Urbana-Champaign >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers > > -- Alessandro A. Bellina Graduate Student Bioacoustics Research Laboratory Electrical and Computer Engineering University of Illinois at Urbana-Champaign From karthik.krishnan at kitware.com Tue Feb 17 10:41:29 2009 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Tue, 17 Feb 2009 10:41:29 -0500 Subject: [vtkusers] [vtk-users] How to get dotted contour lines In-Reply-To: <200e07ca0902170519l1ecdd8ebpffeca5399afa282d@mail.gmail.com> References: <200e07ca0902170519l1ecdd8ebpffeca5399afa282d@mail.gmail.com> Message-ID: <9ddb27260902170741x3baba20vce698b6dd52580cf@mail.gmail.com> look at vtkProperty. There is a stipple mode and a stipple line pattern that can set. On Tue, Feb 17, 2009 at 8:19 AM, Oliver Kania wrote: > ... if the resolution of underlying image is very high. > Subsampling is not an option. > Is there a way to "splice" the single tiny lines and get longer ones > which can be properly stippled ? > > oliver > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Karthik Krishnan R&D Engineer, Kitware Inc. Ph: 518 371 3971 x119 Fax: 518 371 3971 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.jackson at bluequartz.net Tue Feb 17 11:12:25 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Tue, 17 Feb 2009 11:12:25 -0500 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: <20090214203458.965444501@kingu.local> Message-ID: <17E497C6-C358-4440-8D37-BBF615DACD5D@bluequartz.net> how is -mlong-branch getting defined? You you have an environment variable CXXFLAGS set somehow? are you starting with a completely clean build directory? The error is because -mlong-branch" is not recognized by gcc? Are you experimenting with another gcc (4.2 or the LLVM)? _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 17, 2009, at 10:37 AM, Alessandro A. Bellina wrote: > OK, nothing truly jumps out at me so I am posting the whole message. > Could it be something wrong with the CMake I have installed? > > Thanks for the help > > Alessandro > > CMakeError.log starts: > > > Determining if the include file sys/types.h exists failed with the > following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckIncludeFile.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > > Determining if the include file stdint.h exists failed with the > following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckIncludeFile.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > > Determining if the include file stddef.h exists failed with the > following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckIncludeFile.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > > Determining size of int failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckTypeSizeC.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > CheckTypeSizeC.c: > #define CHECK_TYPE_SIZE_TYPE int > #ifdef CHECK_TYPE_SIZE_TYPE > > > #ifdef HAVE_SYS_TYPES_H > # include > #endif /* HAVE_SYS_TYPES_H */ > > #ifdef HAVE_STDINT_H > # include > #endif /* HAVE_STDINT_H */ > > #ifdef HAVE_STDDEF_H > # include > #endif /* HAVE_STDDEF_H */ > > > > #ifdef __CLASSIC_C__ > # define const > #endif > > #define SIZE (sizeof(int)) > const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', > 's','i','z','e','o','f','[', > ('0' + ((SIZE / 10000)%10)), > ('0' + ((SIZE / 1000)%10)), > ('0' + ((SIZE / 100)%10)), > ('0' + ((SIZE / 10)%10)), > ('0' + (SIZE % 10)), > ']','\0'}; > > #ifdef __CLASSIC_C__ > int main(argc, argv) int argc; char *argv[]; > #else > int main(int argc, char *argv[]) > #endif > { > int require = 0; > require += info_sizeof[argc]; > (void)argv; > return require; > } > > #else /* CHECK_TYPE_SIZE_TYPE */ > > # error "CHECK_TYPE_SIZE_TYPE has to specify the type" > > #endif /* CHECK_TYPE_SIZE_TYPE */ > > > Determining size of long failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckTypeSizeC.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > CheckTypeSizeC.c: > #define CHECK_TYPE_SIZE_TYPE long > #ifdef CHECK_TYPE_SIZE_TYPE > > > #ifdef HAVE_SYS_TYPES_H > # include > #endif /* HAVE_SYS_TYPES_H */ > > #ifdef HAVE_STDINT_H > # include > #endif /* HAVE_STDINT_H */ > > #ifdef HAVE_STDDEF_H > # include > #endif /* HAVE_STDDEF_H */ > > > > #ifdef __CLASSIC_C__ > # define const > #endif > > #define SIZE (sizeof(long)) > const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', > 's','i','z','e','o','f','[', > ('0' + ((SIZE / 10000)%10)), > ('0' + ((SIZE / 1000)%10)), > ('0' + ((SIZE / 100)%10)), > ('0' + ((SIZE / 10)%10)), > ('0' + (SIZE % 10)), > ']','\0'}; > > #ifdef __CLASSIC_C__ > int main(argc, argv) int argc; char *argv[]; > #else > int main(int argc, char *argv[]) > #endif > { > int require = 0; > require += info_sizeof[argc]; > (void)argv; > return require; > } > > #else /* CHECK_TYPE_SIZE_TYPE */ > > # error "CHECK_TYPE_SIZE_TYPE has to specify the type" > > #endif /* CHECK_TYPE_SIZE_TYPE */ > > > Determining size of void* failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckTypeSizeC.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > CheckTypeSizeC.c: > #define CHECK_TYPE_SIZE_TYPE void* > #ifdef CHECK_TYPE_SIZE_TYPE > > > #ifdef HAVE_SYS_TYPES_H > # include > #endif /* HAVE_SYS_TYPES_H */ > > #ifdef HAVE_STDINT_H > # include > #endif /* HAVE_STDINT_H */ > > #ifdef HAVE_STDDEF_H > # include > #endif /* HAVE_STDDEF_H */ > > > > #ifdef __CLASSIC_C__ > # define const > #endif > > #define SIZE (sizeof(void*)) > const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', > 's','i','z','e','o','f','[', > ('0' + ((SIZE / 10000)%10)), > ('0' + ((SIZE / 1000)%10)), > ('0' + ((SIZE / 100)%10)), > ('0' + ((SIZE / 10)%10)), > ('0' + (SIZE % 10)), > ']','\0'}; > > #ifdef __CLASSIC_C__ > int main(argc, argv) int argc; char *argv[]; > #else > int main(int argc, char *argv[]) > #endif > { > int require = 0; > require += info_sizeof[argc]; > (void)argv; > return require; > } > > #else /* CHECK_TYPE_SIZE_TYPE */ > > # error "CHECK_TYPE_SIZE_TYPE has to specify the type" > > #endif /* CHECK_TYPE_SIZE_TYPE */ > > > Determining size of char failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckTypeSizeC.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > CheckTypeSizeC.c: > #define CHECK_TYPE_SIZE_TYPE char > #ifdef CHECK_TYPE_SIZE_TYPE > > > #ifdef HAVE_SYS_TYPES_H > # include > #endif /* HAVE_SYS_TYPES_H */ > > #ifdef HAVE_STDINT_H > # include > #endif /* HAVE_STDINT_H */ > > #ifdef HAVE_STDDEF_H > # include > #endif /* HAVE_STDDEF_H */ > > > > #ifdef __CLASSIC_C__ > # define const > #endif > > #define SIZE (sizeof(char)) > const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', > 's','i','z','e','o','f','[', > ('0' + ((SIZE / 10000)%10)), > ('0' + ((SIZE / 1000)%10)), > ('0' + ((SIZE / 100)%10)), > ('0' + ((SIZE / 10)%10)), > ('0' + (SIZE % 10)), > ']','\0'}; > > #ifdef __CLASSIC_C__ > int main(argc, argv) int argc; char *argv[]; > #else > int main(int argc, char *argv[]) > #endif > { > int require = 0; > require += info_sizeof[argc]; > (void)argv; > return require; > } > > #else /* CHECK_TYPE_SIZE_TYPE */ > > # error "CHECK_TYPE_SIZE_TYPE has to specify the type" > > #endif /* CHECK_TYPE_SIZE_TYPE */ > > > Determining size of short failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckTypeSizeC.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > CheckTypeSizeC.c: > #define CHECK_TYPE_SIZE_TYPE short > #ifdef CHECK_TYPE_SIZE_TYPE > > > #ifdef HAVE_SYS_TYPES_H > # include > #endif /* HAVE_SYS_TYPES_H */ > > #ifdef HAVE_STDINT_H > # include > #endif /* HAVE_STDINT_H */ > > #ifdef HAVE_STDDEF_H > # include > #endif /* HAVE_STDDEF_H */ > > > > #ifdef __CLASSIC_C__ > # define const > #endif > > #define SIZE (sizeof(short)) > const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', > 's','i','z','e','o','f','[', > ('0' + ((SIZE / 10000)%10)), > ('0' + ((SIZE / 1000)%10)), > ('0' + ((SIZE / 100)%10)), > ('0' + ((SIZE / 10)%10)), > ('0' + (SIZE % 10)), > ']','\0'}; > > #ifdef __CLASSIC_C__ > int main(argc, argv) int argc; char *argv[]; > #else > int main(int argc, char *argv[]) > #endif > { > int require = 0; > require += info_sizeof[argc]; > (void)argv; > return require; > } > > #else /* CHECK_TYPE_SIZE_TYPE */ > > # error "CHECK_TYPE_SIZE_TYPE has to specify the type" > > #endif /* CHECK_TYPE_SIZE_TYPE */ > > > Determining size of float failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckTypeSizeC.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > CheckTypeSizeC.c: > #define CHECK_TYPE_SIZE_TYPE float > #ifdef CHECK_TYPE_SIZE_TYPE > > > #ifdef HAVE_SYS_TYPES_H > # include > #endif /* HAVE_SYS_TYPES_H */ > > #ifdef HAVE_STDINT_H > # include > #endif /* HAVE_STDINT_H */ > > #ifdef HAVE_STDDEF_H > # include > #endif /* HAVE_STDDEF_H */ > > > > #ifdef __CLASSIC_C__ > # define const > #endif > > #define SIZE (sizeof(float)) > const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', > 's','i','z','e','o','f','[', > ('0' + ((SIZE / 10000)%10)), > ('0' + ((SIZE / 1000)%10)), > ('0' + ((SIZE / 100)%10)), > ('0' + ((SIZE / 10)%10)), > ('0' + (SIZE % 10)), > ']','\0'}; > > #ifdef __CLASSIC_C__ > int main(argc, argv) int argc; char *argv[]; > #else > int main(int argc, char *argv[]) > #endif > { > int require = 0; > require += info_sizeof[argc]; > (void)argv; > return require; > } > > #else /* CHECK_TYPE_SIZE_TYPE */ > > # error "CHECK_TYPE_SIZE_TYPE has to specify the type" > > #endif /* CHECK_TYPE_SIZE_TYPE */ > > > Determining size of double failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckTypeSizeC.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > CheckTypeSizeC.c: > #define CHECK_TYPE_SIZE_TYPE double > #ifdef CHECK_TYPE_SIZE_TYPE > > > #ifdef HAVE_SYS_TYPES_H > # include > #endif /* HAVE_SYS_TYPES_H */ > > #ifdef HAVE_STDINT_H > # include > #endif /* HAVE_STDINT_H */ > > #ifdef HAVE_STDDEF_H > # include > #endif /* HAVE_STDDEF_H */ > > > > #ifdef __CLASSIC_C__ > # define const > #endif > > #define SIZE (sizeof(double)) > const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', > 's','i','z','e','o','f','[', > ('0' + ((SIZE / 10000)%10)), > ('0' + ((SIZE / 1000)%10)), > ('0' + ((SIZE / 100)%10)), > ('0' + ((SIZE / 10)%10)), > ('0' + (SIZE % 10)), > ']','\0'}; > > #ifdef __CLASSIC_C__ > int main(argc, argv) int argc; char *argv[]; > #else > int main(int argc, char *argv[]) > #endif > { > int require = 0; > require += info_sizeof[argc]; > (void)argv; > return require; > } > > #else /* CHECK_TYPE_SIZE_TYPE */ > > # error "CHECK_TYPE_SIZE_TYPE has to specify the type" > > #endif /* CHECK_TYPE_SIZE_TYPE */ > > > Determining if files limits.h exist failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/ > CheckIncludeFiles.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckIncludeFiles.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > Source: > /* */ > #include > > > int main(){return 0;} > > Determining if files unistd.h exist failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/ > CheckIncludeFiles.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckIncludeFiles.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > Source: > /* */ > #include > > > int main(){return 0;} > > Determining if files pthread.h exist failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/ > CheckIncludeFiles.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckIncludeFiles.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > Source: > /* */ > #include > > > int main(){return 0;} > > Determining if files sys/types.h;sys/prctl.h exist failed with the > following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/ > CheckIncludeFiles.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckIncludeFiles.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > Source: > /* */ > #include > #include > > > int main(){return 0;} > > Determining size of unsigned short failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckTypeSizeC.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > CheckTypeSizeC.c: > #define CHECK_TYPE_SIZE_TYPE unsigned short > #ifdef CHECK_TYPE_SIZE_TYPE > > > #ifdef HAVE_SYS_TYPES_H > # include > #endif /* HAVE_SYS_TYPES_H */ > > #ifdef HAVE_STDINT_H > # include > #endif /* HAVE_STDINT_H */ > > #ifdef HAVE_STDDEF_H > # include > #endif /* HAVE_STDDEF_H */ > > > > #ifdef __CLASSIC_C__ > # define const > #endif > > #define SIZE (sizeof(unsigned short)) > const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', > 's','i','z','e','o','f','[', > ('0' + ((SIZE / 10000)%10)), > ('0' + ((SIZE / 1000)%10)), > ('0' + ((SIZE / 100)%10)), > ('0' + ((SIZE / 10)%10)), > ('0' + (SIZE % 10)), > ']','\0'}; > > #ifdef __CLASSIC_C__ > int main(argc, argv) int argc; char *argv[]; > #else > int main(int argc, char *argv[]) > #endif > { > int require = 0; > require += info_sizeof[argc]; > (void)argv; > return require; > } > > #else /* CHECK_TYPE_SIZE_TYPE */ > > # error "CHECK_TYPE_SIZE_TYPE has to specify the type" > > #endif /* CHECK_TYPE_SIZE_TYPE */ > > > Determining size of unsigned int failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckTypeSizeC.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > CheckTypeSizeC.c: > #define CHECK_TYPE_SIZE_TYPE unsigned int > #ifdef CHECK_TYPE_SIZE_TYPE > > > #ifdef HAVE_SYS_TYPES_H > # include > #endif /* HAVE_SYS_TYPES_H */ > > #ifdef HAVE_STDINT_H > # include > #endif /* HAVE_STDINT_H */ > > #ifdef HAVE_STDDEF_H > # include > #endif /* HAVE_STDDEF_H */ > > > > #ifdef __CLASSIC_C__ > # define const > #endif > > #define SIZE (sizeof(unsigned int)) > const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', > 's','i','z','e','o','f','[', > ('0' + ((SIZE / 10000)%10)), > ('0' + ((SIZE / 1000)%10)), > ('0' + ((SIZE / 100)%10)), > ('0' + ((SIZE / 10)%10)), > ('0' + (SIZE % 10)), > ']','\0'}; > > #ifdef __CLASSIC_C__ > int main(argc, argv) int argc; char *argv[]; > #else > int main(int argc, char *argv[]) > #endif > { > int require = 0; > require += info_sizeof[argc]; > (void)argv; > return require; > } > > #else /* CHECK_TYPE_SIZE_TYPE */ > > # error "CHECK_TYPE_SIZE_TYPE has to specify the type" > > #endif /* CHECK_TYPE_SIZE_TYPE */ > > > Determining size of unsigned long failed with the following output: > Change Dir: /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/make "cmTryCompileExec/fast" > /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make > CMakeFiles/cmTryCompileExec.dir/build > "/Applications/CMake 2.6-2.app/Contents/bin/cmake" -E > cmake_progress_report > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/CMakeFiles 1 > Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o > /usr/bin/gcc -mlong-branch -o > CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o -c > /Users/bellina/Code/VTK52/VTKBuild/CMakeFiles/CMakeTmp/ > CheckTypeSizeC.c > cc1: error: unrecognized command line option "-mlong-branch" > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSizeC.c.o] > Error 1 > make: *** [cmTryCompileExec/fast] Error 2 > > CheckTypeSizeC.c: > #define CHECK_TYPE_SIZE_TYPE unsigned long > #ifdef CHECK_TYPE_SIZE_TYPE > > > #ifdef HAVE_SYS_TYPES_H > # include > #endif /* HAVE_SYS_TYPES_H */ > > #ifdef HAVE_STDINT_H > # include > #endif /* HAVE_STDINT_H */ > > #ifdef HAVE_STDDEF_H > # include > #endif /* HAVE_STDDEF_H */ > > > > #ifdef __CLASSIC_C__ > # define const > #endif > > #define SIZE (sizeof(unsigned long)) > const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', > 's','i','z','e','o','f','[', > ('0' + ((SIZE / 10000)%10)), > ('0' + ((SIZE / 1000)%10)), > ('0' + ((SIZE / 100)%10)), > ('0' + ((SIZE / 10)%10)), > ('0' + (SIZE % 10)), > ']','\0'}; > > #ifdef __CLASSIC_C__ > int main(argc, argv) int argc; char *argv[]; > #else > int main(int argc, char *argv[]) > #endif > { > int require = 0; > require += info_sizeof[argc]; > (void)argv; > return require; > } > > #else /* CHECK_TYPE_SIZE_TYPE */ > > # error "CHECK_TYPE_SIZE_TYPE has to specify the type" > > #endif /* CHECK_TYPE_SIZE_TYPE */ > > > > > On Mon, Feb 16, 2009 at 7:56 PM, Michael Jackson > wrote: >> I would say post the CMakeError.log to the list to see what may be >> going >> wrong. Or just look through that log file and see if something odd >> pops out >> at you. >> >> Lots and Lots of people compile VTK CVS nightly on OS X 10.5. Intel >> 32 bit >> systems and are not having any issues. >> >> Are you starting from a clean build directory each time? >> Do you have any environment variables that are automatically set >> that might >> be interfering with the compilation? >> >> _________________________________________________________ >> Mike Jackson mike.jackson at bluequartz.net >> BlueQuartz Software www.bluequartz.net >> Principal Software Engineer Dayton, Ohio >> >> >> >> On Feb 16, 2009, at 4:36 PM, Alessandro A. Bellina wrote: >> >>> Hi, >>> I tried installing VTK 5.2 but I got this error (same error I got >>> before) >>> >>> I checked it out from CVS >>> >>> >>> CMake Error at /Applications/CMake >>> 2.6-2.app/Contents/share/cmake-2.6/Modules/TestBigEndian.cmake:31 >>> (MESSAGE): >>> no suitable type found >>> Call Stack (most recent call first): >>> CMake/CMakeBackwardCompatibilityC.cmake:31 (TEST_BIG_ENDIAN) >>> CMakeLists.txt:365 (INCLUDE) >>> >>> >>> Any ideas? >>> >>> Thanks, >>> >>> Alessandro >>> >>> >>> On Sat, Feb 14, 2009 at 3:44 PM, Alessandro A. Bellina >>> wrote: >>>> >>>> Thanks. I did find that using Delete worked. I was missing one >>>> delete >>>> for the probeFilter.... >>>> >>>> I tried installing 5.2 a little while back and I kept on getting a >>>> cmake endinanness error. I will try again when I get a chance and >>>> let >>>> you know what I find. I would like to use temporal datasets >>>> (something >>>> I understand now comes in 5.2). >>>> >>>> Thanks, >>>> >>>> Alessandro >>>> >>>> On Sat, Feb 14, 2009 at 2:34 PM, Sean McBride >>> > >>>> wrote: >>>>> >>>>> On 2/14/09 9:32 AM, Alessandro A. Bellina said: >>>>> >>>>>> MacOS Intel Based >>>>>> VTK 5.0.3 >>>>>> I don't have 5.2 because I get endianness errors while trying to >>>>>> compile. >>>>> >>>>> I agree with Mike, you should figure this out. There were >>>>> several Mac- >>>>> related improvements between 5.0 and 5.2, I would definitely >>>>> recommend >>>>> using the newest version. >>>>> >>>>> -- >>>>> ____________________________________________________________ >>>>> Sean McBride, B. Eng sean at rogue-research.com >>>>> Rogue Research www.rogue-research.com >>>>> Mac Software Developer Montr?al, Qu?bec, Canada >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Alessandro A. Bellina >>>> >>>> Graduate Student >>>> Bioacoustics Research Laboratory >>>> Electrical and Computer Engineering >>>> University of Illinois at Urbana-Champaign >>>> >>> >>> >>> >>> -- >>> Alessandro A. Bellina >>> >>> Graduate Student >>> Bioacoustics Research Laboratory >>> Electrical and Computer Engineering >>> University of Illinois at Urbana-Champaign >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > > > > -- > Alessandro A. Bellina > > Graduate Student > Bioacoustics Research Laboratory > Electrical and Computer Engineering > University of Illinois at Urbana-Champaign From sean at rogue-research.com Tue Feb 17 11:17:59 2009 From: sean at rogue-research.com (Sean McBride) Date: Tue, 17 Feb 2009 11:17:59 -0500 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: <20090214203458.965444501@kingu.local> Message-ID: <20090217161759.1585082141@kingu.local> On 2/17/09 9:37 AM, Alessandro A. Bellina said: >OK, nothing truly jumps out at me so I am posting the whole message. >Could it be something wrong with the CMake I have installed? BTW, did you ever say which version of Mac OS X and which version of Xcode you are using? What does 'gcc --version' report? -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From bellina at illinois.edu Tue Feb 17 11:27:45 2009 From: bellina at illinois.edu (Alessandro A. Bellina) Date: Tue, 17 Feb 2009 10:27:45 -0600 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: <20090217161759.1585082141@kingu.local> References: <20090214203458.965444501@kingu.local> <20090217161759.1585082141@kingu.local> Message-ID: I am using gcc 4.3.1, and XCode 3.1. I don't have a CXXFLAGS defined. The build directory is clean to start with. If I may add, I think that the problem is at the configure stage. Starting with a clean directory I try to run ccmake ../VTK and I get: CMake Error: An attempt was made to access a variable: CMAKE_SIZEOF_INT that h as not been defined. Some variables were always defined by CMake in versions p rior to 1.6. To fix this you might need to set the cache value of CMAKE_BACKWA RDS_COMPATIBILITY to 1.4 or less. If you are writing a CMakeList file, (or hav e already set CMAKE_BACKWARDS_COMPATABILITY to 1.4 or less) then you probably to include a CMake module to test for the feature this variable defines. CMake Error at /Applications/CMake 2.6-2.app/Contents/share/cmake-2.6/Modules/ TestBigEndian.cmake:31 (MESSAGE): no suitable type found Call Stack (most recent call first): CMake/CMakeBackwardCompatibilityC.cmake:31 (TEST_BIG_ENDIAN) CMakeLists.txt:365 (INCLUDE) Setting that variable with -D ... just causes more problems. Thanks, Alessandro On Tue, Feb 17, 2009 at 10:17 AM, Sean McBride wrote: > On 2/17/09 9:37 AM, Alessandro A. Bellina said: > >>OK, nothing truly jumps out at me so I am posting the whole message. >>Could it be something wrong with the CMake I have installed? > > BTW, did you ever say which version of Mac OS X and which version of > Xcode you are using? What does 'gcc --version' report? > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > -- Alessandro A. Bellina Graduate Student Bioacoustics Research Laboratory Electrical and Computer Engineering University of Illinois at Urbana-Champaign From mhumperdink at yahoo.com Tue Feb 17 11:57:11 2009 From: mhumperdink at yahoo.com (Marty Humperdink) Date: Tue, 17 Feb 2009 08:57:11 -0800 (PST) Subject: [vtkusers] Help, please. vtkStreamingDemandDrivenPipeline Update extent error References: <510628.90464.qm@web112210.mail.gq1.yahoo.com> <49998A72.3000506@ohiou.edu> Message-ID: <778170.93890.qm@web112220.mail.gq1.yahoo.com> Kevin, Thanks for your reply. I've run the programs through the command line and just by clicking the icon and get the same error in each case. The vtkOutputWindow turns white and I can't read the entire error message but it start with the vtkStreamingDemandDrivenPipeline error mentioned below. As I mentioned I'm working on two separate projects. In one I'm trying to simulate CT scan resolution artifacts in an stl model. To do this I load the STL model, create an empty vtkImageData with spacing set to typical CT values (0.59x0.59x1.25), use vtkPolyDataToImage stencil to turn the stl polydata into a stencil, then use vtkStencil to change the voxels in the empty imageData that was created. Then I could use a contour filter to go back to "chunkier" looking polyData. In this project I found that I was having trouble placing the empty imageData so that it encompassed the extent of the stl polyData. The stls that I'm using have bounds that go from about -50 to +50 in each dimension and I found that if I tried to set the imageData so that it would cover this coordinate range I go this vtkStreamingDemandDrivenPipeline. Eventually I translated the polydata so its minimum bound was zero in each dimension and set the imageData extent to go from 0 to the max bound. This works okay but introduced a whole bunch of other headaches by moving the original polydata around. So one question here is how can I create a blank image data that covers the coordinate range of say x: -50 to +50, y: -50 to +50, and z: -50 to +50? I think I might be misunderstanding the difference between SetExtents and SetDimensions in vtkImageData... In the second project I'm trying to convert some 3D ultrasound data, which apparently is in spherical coordinates, to Cartesian coords and then save out the volume. The original image data is in a raw format and I'm manually entering the geometric parameters into a little GUI. I figured I would load the raw data using vtkImageReader2, create a vtkPoints array first calculating spherical coordinates from the known image parameters then converting these to Cartesian coordinates and placing in the points array, loop through and fetch the pixel values from the image data, then assign both these points and scalars to the structured grid. Then I wanted to make an empty imageData that would encompass the entire structured grid and use this imageData to probe the structured grid thereby resampling the Spherical coordinate data into a regular image grid. I've been getting this vtkStreamingDemandDrivenPipeline over and over at the point that the vtkProbe Updates. If I use vtkPolyData instead of a vtkStructuredGrid for the data in Spherical coordinates it runs without error, but takes a long time and doesn't seem like the right way to do this. There's an excerpt of the Tcl script below. I'm using nested loops here and am assuming that there is probably a better way to do it, but right now am justing working on getting a prototype going. I guess another question I ought to ask is can someone point me in the direction of an example routine to load and resample 3D ultrasound data (in Spherical coordinates)? I search the mailing list archives for some time and saw some reference to this vtkStreamingDemandDrivenPipeline error in other messages. Most responses suggested calling an Update at some point in the pipeline and I've added and removed Updates at nearly every step. There was also some suggestion to call an UpdateExtent with -1 1 -1 1 -1 1 on an Actor in order to force an update. I tried this kind of thing without apparent success. In this project I'm also trying to create a blank imageData that covers the coordinate range of another object, this time the structuredGrid. What's the best way to do this? I've tried using GetBounds and applying these results to SetExtent or SetDimensions in the imageData but it doesn't seem to work. Sorry for the long series of questions, but I'm pretty stuck here and getting way behind. As a novice VTK user I realize that many of my mistakes are pretty elementary but I would be tremendously appreciative if someone could please help me with some suggestions. Thanks Marty # Load Image Data vtkImageReader2 imageData imageData SetFileName $imageFilenameFull imageData SetFileDimensionality 3 imageData SetDataSpacing $NFOxVoxelSize $NFOyVoxelSize $NFOzVoxelSize imageData SetDataExtent 0 [expr $NFOwidth -1] 0 [expr $NFOheight -1] 0 [expr $NFOnumFrames -1] #create structured grid with dimensions from raw image vtkStructuredGrid imageStructuredGrid imageStructuredGrid SetDimensions $NFOwidth $NFOheight $NFOnumFrames #create points for sgrid vtkPoints structGridPoints #create array for pixel values vtkDoubleArray pixelValues #start a counter set counter 0 # nested loops to get pixel values from raw image data then assign to Structured Grid # with points in Spherical coords. for {set iFrame 0 } {$iFrame <= [expr $NFOnumFrames - 1]} {incr iFrame 1} { for {set jHeight 0} {$jHeight <= [expr $NFOheight -1]} {incr jHeight 1} { for {set kWidth 0} {$kWidth <= [expr $NFOwidth - 1]} {incr kWidth 1} { #fetch pixel value from imageData set pixValue [[[[imageData GetOutput] GetPointData] GetScalars ] GetComponent [[imageData GetOutput] FindPoint $kWidth $jHeight $iFrame] 0 ] pixelValues InsertTuple1 $counter $pixValue #get corresponding point set pointValue [[imageData GetOutput] GetPoint [[imageData GetOutput] FindPoint $kWidth $jHeight $iFrame]] #calc spherical coords from user entered parameters set sphereCoordsR [expr ([lindex $pointValue 0] * $pixStep) + $startDist] set sphereCoordsTheta [expr ([lindex $pointValue 1] * $thetaStep) + $thetaStartAngle] set sphereCoordsPhi [expr ([lindex $pointValue 2] * $phiStep) + $phiStartAngle] #use separate procedure to calc Cart coords from Spherical coords set cartCoords [sphere2Cart $sphereCoordsR $sphereCoordsTheta $sphereCoordsPhi] structGridPoints InsertPoint $counter [lindex $cartCoords 0] [lindex $cartCoords 1] [lindex $cartCoords 2] #increment counter set counter [expr $counter + 1] } } } #drop the original image data imageData Delete #find bounds of structured grid points set structGridBounds [structGridPoints GetBounds] set x0 [lindex $structGridBounds 0] set x1 [lindex $structGridBounds 1] set y0 [lindex $structGridBounds 2] set y1 [lindex $structGridBounds 3] set z0 [lindex $structGridBounds 4] set z1 [lindex $structGridBounds 5] #set points and scalars in structured grid imageStructuredGrid SetPoints structGridPoints [imageStructuredGrid GetPointData] SetScalars pixelValues set outPixSize 1.0 set outSliceThick 1.0 #create an imageData object for the probe vtkImageData cartImageProbe cartImageProbe SetDimensions [expr int(ceil(($x1 - $x0) / $outPixSize))] [expr int(ceil(($y1 - $y0) / $outPixSize))] [expr int(ceil(($z1 - $z0) / $outSliceThick))] cartImageProbe SetSpacing $outPixSize $outPixSize $outSliceThick cartImageProbe SetOrigin $x0 $y0 $z0 #probe the structured grid with the imageData vtkProbeFilter probe probe SetInput cartImageProbe probe SetSource imageStructuredGrid ________________________________ From: Kevin H. Hobbs To: Marty Humperdink Cc: vtkusers at vtk.org Sent: Monday, February 16, 2009 8:46:58 AM Subject: Re: [vtkusers] Help, please. vtkStreamingDemandDrivenPipeline Update extent error Marty Humperdink wrote: > > In both projects I'm stuck getting an error that looks like this: > vtkStreamingDemandDrivenPipeline (061A8E28): The update extent specified in the information for output port 0 on algorithm .... > Unfortunately the error disappears from the vtkOutput window when Windows tosses up one of those 'VTK.exe had to close do you want to send a report' messages so Are you running the program from the command line, or just clicking on the icon? Are you able to share the tcl code to the program you are writing? From kall at mayo.edu Tue Feb 17 12:57:07 2009 From: kall at mayo.edu (Kall, Bruce A.) Date: Tue, 17 Feb 2009 11:57:07 -0600 Subject: [vtkusers] 'Picking' and 'vtkFixedPointVolumeRaycastMapper' image volume In-Reply-To: <44f773f50902170611l272640fbxe5d44b134897b960@mail.gmail.com> References: <44f773f50902161504y6e7a4402hdd46dcda77550390@mail.gmail.com> <499A1510.7000302@kitware.com> <44f773f50902170611l272640fbxe5d44b134897b960@mail.gmail.com> Message-ID: <499AFA73.2060005@mayo.edu> What is the correct way to pick a point that would be on the outermost surface of an image volume rendered with a vtkFixedPointVolumeRaycastMapper and to get the coordinates in the image volume(model) space? I've tried using vtkCellPicker and can get a cellid, but don't know how to look up the cell closest to the outside surface of the volume. I've also tried vtkPointPicker. Both are returning a Z value that is the same for points on the surface that should have a different Z value as there is a small hump on the top of my volume that should not have the same Z value as that on te same surface but not on the hump. Also as I spin the camera around with an interactor the x,y,z coordinates for the same point (on the hump) on the volume surface returns different x,y,z coordinates and I need to get coordinates in my model (image volume) coordinates. Is there a good example of doing this somewhere? I've seemingly looked everywhere and haven't found one, and I'm sure this has been implemented by someone. Thanks in advance Bruce From hobbsk at ohiou.edu Tue Feb 17 13:06:15 2009 From: hobbsk at ohiou.edu (Kevin H. Hobbs) Date: Tue, 17 Feb 2009 13:06:15 -0500 Subject: [vtkusers] Help, please. vtkStreamingDemandDrivenPipeline Update extent error In-Reply-To: <778170.93890.qm@web112220.mail.gq1.yahoo.com> References: <510628.90464.qm@web112210.mail.gq1.yahoo.com> <49998A72.3000506@ohiou.edu> <778170.93890.qm@web112220.mail.gq1.yahoo.com> Message-ID: <1234893975.6894.10.camel@gargon.hooperlab> On Tue, 2009-02-17 at 08:57 -0800, Marty Humperdink wrote: > I've run the programs through the command line and just by clicking the icon and get the same error in each case. I was hoping the error would be written to the console. > So one question here is how can I create a blank image data that covers the coordinate range of say x: -50 to +50, y: -50 to +50, and z: -50 to +50? I think I might be misunderstanding the difference between SetExtents and SetDimensions in vtkImageData... vtkImageData * image = vtkImageData::New(); image->SetOrigin( -50, -50, -50 ); image->SetSpacing( 0.5, 0.5, 0.5 ); image->SetDimensions( 200, 200, 200 ); -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From enjoywm at cs.wm.edu Tue Feb 17 16:24:32 2009 From: enjoywm at cs.wm.edu (Yixun Liu) Date: Tue, 17 Feb 2009 16:24:32 -0500 Subject: [vtkusers] link error of vtk application Message-ID: <499B2B10.9030301@cs.wm.edu> Hi, I developed an application based on VTK. The CMakelist file is like the following, #FIND_PACKAGE(VTK REQUIRED) #INCLUDE(${VTK_USE_FILE}) ... TARGET_LINK_LIBRARIES(TetrahedrisationNG Basics Graphics2DNG Graphics3DNG vtkIO vtkCommon ) The error is /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld: cannot find -lvtkIO Thanks. Yixun From nkwmailinglists at gmail.com Tue Feb 17 16:52:08 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Tue, 17 Feb 2009 15:52:08 -0600 Subject: [vtkusers] How to -- save vtkProperty data to an XML file? Message-ID: <44f773f50902171352l62ed4ec9pa62b89a7e2e80a41@mail.gmail.com> We already save instance of vtkPolyData to XML files. We already add data to the vtkFieldData for vtkPolyDataInstances to save object names and other information in the XML file with the PolyData. What I'd like to do is also save the state of an associated vtkProperty in the same XML file with the PolyData. I know I could laboriously go through and add every attribute of vtkProperty to the Field Data. I also know I could use get the vtkXMLMaterial and find a way to save its contents as a string and add the string to vtkFieldData. What I don't know is if there is a 'right' way to do this or at least a not too difficult way to do it. From kurakurara at gmail.com Tue Feb 17 22:54:46 2009 From: kurakurara at gmail.com (Takayoshi Kurachi) Date: Wed, 18 Feb 2009 12:54:46 +0900 Subject: [vtkusers] How do I interpolate scalars along the geometric surface? In-Reply-To: <49998E35.5060500@gmail.com> References: <11774795.906761234798246080.JavaMail.root@zimbra> <49998E35.5060500@gmail.com> Message-ID: <499B8686.9020008@gmail.com> After taking look at the filter "vtkInterpolateDataSetAttributes", I understood that it simply calls: vtkDataSetAttribute::InterpolateTime() I also took a look at vtkDataSetAttributes::InterpolatePoint() and found it simply calls: vtkAbstractArray::InterpolateTuple() Then I took a look at vtkTupleInterpolator::InterpolateTuple(), but found that it doesn't take the point coordinate into account. Marcel was right, none of the above seems to fulfil the task I need. It seems that I have to write the code of point by point operation giving each point the interpolation weights according to the geometric distances by myself. :( Thanks, Taka > Hi Marcel, > > Thanks for your quick reply. > > I still want to believe that VTK has a class to solve this task... > It can interpolate between multiple points with colors very well, > even in the simple example code of "Cube" (Cube.cxx)... > > Reading the class description, "vtkInterpolateDataSetAttributes" > seems to be the one I need, but haven't figured out how to use. :( > > > Does anyone know how to use this class? > > > >> Hell Marcel, > > how could you know? ... ]:-}> > Well, of course I know your name. I even know you are a PhD student > at the Department of Neurophysics Max Planck Institute for Human > Cognitive and Brain Sciences. :) > > Taka > > > Marcel Weiss wrote: >>> Hell Marcel, >> how could you know? ... ]:-}> >> >>> The question is how do I calculate the weighted averaging using >>> the geodesic distances for the interpolation? >>> Is there any class for this purpose? I've been trying to use >>> vtkInterpolateDataSetAttributes and vtkTupleInterpolator, but >>> neither do not work well so far... :( >>> Or do I need to write the filter by myself?? >> >> At least I don?t see any filter in VTK being able to solve this task. >> but I assume there might be some code available online ... especially >> for the distance problem ... >> Marcel Weiss >> PhD student >> Department of Neurophysics >> Max Planck Institute for Human Cognitive and Brain Sciences >> >> Marcel Weiss wrote: >>> using the geodesic distances (along the brain surface mesh) to points >>> with given scalar (source points) vectors should enable to do some >>> kind of weighted averaging for mesh points without scalars using the >>> n closest source points ... >>> Marcel Weiss >>> PhD student >>> Department of Neurophysics >>> Max Planck Institute for Human Cognitive and Brain Sciences >>> ----- Original Message ----- >>> From: "Takayoshi Kurachi" >>> To: vtkusers at vtk.org >>> Sent: Monday, February 16, 2009 2:54:19 PM GMT +01:00 Amsterdam / >>> Berlin / Bern / Rome / Stockholm / Vienna >>> Subject: [vtkusers] How do I interpolate scalars along the geometric >>> surface? >>> >>> Hello All, >>> >>> I'm trying to interpolate scalar values along the geometric >>> surface and having a very difficult time. >>> >>> I have a geometric data of a brain in 3DS file and want to set >>> scalar value (of electroencephalogram) in its 21 locations of >>> the surface points, and interpolate for the rest of the points >>> along the surface to show the scalar values in color. >>> >>> With the code below, I could get the vtkPointData and set >>> scalar values on some of the points as the dataset attribute, >>> but it seems that the value is shown in color only within the >>> cell that contains the point with the attribute value I set. >>> I want to interpolate the scalar along the entire surface by >>> the 21 given values. >>> >>> How can I interpolate scalar values along the surface? >>> >>> Many thanks in advance. >>> >>> Taka >>> >>> >>> // Read geometric data from 3DS file >>> vtk3DSImporter* importer = vtk3DSImporter::New(); >>> importer->ComputeNormalsOff(); >>> importer->SetFileName("data/brain.3ds"); >>> importer->Read(); >>> >>> // create lookup table (white <-> red) >>> vtkLookupTable *lut = vtkLookupTable::New(); >>> lut->SetTableRange (0, 1); >>> lut->SetHueRange (1, 1); >>> lut->SetSaturationRange (0, 1); >>> lut->SetValueRange (1, 1); >>> lut->Build(); >>> >>> // create render window and interactor >>> vtkRenderWindow* renWin = vtkRenderWindow::New(); >>> vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); >>> >>> // get data from the importer as vtkDataSet >>> vtkActorCollection* actors = importer->GetRenderer()->GetActors(); >>> actors->InitTraversal(); >>> vtkActor* actor = actors->GetLastActor(); >>> vtkMapper* mapper = actor->GetMapper(); >>> vtkDataSet* data = mapper->GetInput(); >>> vtkPointData* ptData = data->GetPointData(); >>> >>> data->Update(); >>> >>> // get point ids of 4 points for testing (actually i will set 21 points) >>> double bounds[6]; >>> data->GetBounds(bounds); >>> vtkIdType id1 = data->FindPoint(0, 0, bounds[5]); >>> vtkIdType id2 = data->FindPoint(0, 0, bounds[6]); >>> vtkIdType id3 = data->FindPoint(bounds[0], 0, 0); >>> vtkIdType id4 = data->FindPoint(bounds[1], 0, 0); >>> >>> // create array of scalars in vtkFloatArray >>> vtkFloatArray *scalars = vtkFloatArray::New(); >>> scalars->InsertTuple1(id1, 1.0); // set the value 1.0 for testing >>> scalars->InsertTuple1(id2, 1.0); >>> scalars->InsertTuple1(id3, 1.0); >>> scalars->InsertTuple1(id4, 1.0); >>> scalars->SetLookupTable(lut); >>> >>> // set the scalars to the vtkPointData as the dataset attribute >>> ptData->Initialize(); >>> ptData->SetScalars(scalars); >>> >>> // ... setting up mapper, actor, camera, etc. >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >> > From wassim_belhadj at topnet.tn Wed Feb 18 05:57:01 2009 From: wassim_belhadj at topnet.tn (wassim_belhadj at topnet.tn) Date: Wed, 18 Feb 2009 11:57:01 +0100 Subject: [vtkusers] Hounsfield Units : strange result (Volume rendering) In-Reply-To: <499AA140.6060609@netspeed.com.au> References: <354089231d3a49f7751b019847c5088d@pop.topnet.tn> <499A61EA.3030608@netspeed.com.au> <499AA140.6060609@netspeed.com.au> Message-ID: <60455078473a7bd9614eb2850a551311@pop.topnet.tn> Hi, THANK YOU VERY MUCH FOR YOUR EXPLANATION. Should I use ITK for this segmentation (region growing algorithm ). Can you help me? How do I proceed (ITK-VTK)? Have you an example of 3D segmentation (region growing algorithm)? Regards, Wassim On Tue, 17 Feb 2009 22:36:32 +1100, Kevin Osborn wrote: > By definition the Hounsfield value of air is -1000. Water has a value of > 0 HU and all other CT densities (or strictly speaking electron > densities) represent a linear scale around these two values. In practice > the densities don't fit into a narrow Hounsfield range due to variations > in calibration of the xray detectors, noise within CT systems and so > called partial volume artefact where some image voxels contain both air > and soft tissue and therefore have a density intermediate between air > (-1000 HU) and soft tissue (approx 40 HU). To set an appropriate range > to render lung, you will always therefore render the air/skin interface > (and also stomach and bowel gas if the scan includes the upper abdomen). > As Frederic Perez said, a region growing algorithm is your best bet. > > Regards, Kevin > > > wassim_belhadj at topnet.tn wrote: >> Hi, >> >> Thank you for your reply. >> >> According to Hounsfield Units, the pixel values that form the air is >> between -1000 <--------> -995. >> >> I want to display ONLY the lungs (not skin ...) so I set my function >> transfer like this: >> >> opacityFun->AddPoint(-3024, 0.0); >> opacityFun->AddPoint(-878.674, 0.0); >> opacityFun->AddPoint(-864.466, 1.0); >> opacityFun->AddPoint(-594.524, 1.0); >> opacityFun->AddPoint(-395.62, 1.0); >> opacityFun->AddPoint(3071, 0.0); >> >> Hounsfield Units for lungs are -950 <--------> -550 >> >> I Attached a NEW screenshot that illustrates the problem. >> >> I vary the values of the transfer function but no result.I did not manage >> to remove the part that surrounds the lungs. >> >> Best regards, >> BELHADJ wassim >> >> >> >> >> >> On Tue, 17 Feb 2009 18:06:18 +1100, Kevin Osborn >> wrote: >> >>> Don't forget air surrounds the patient. What your image shows is the >>> air/skin interface, not the skin itself. As the lung is mostly air, your >>> >>> Hounsfield range between -600 and -400 not only gives lung but also >>> includes air around the patient. >>> >>> >>> wassim_belhadj at topnet.tn wrote: >>> From runeelmgaard at gmail.com Wed Feb 18 07:14:52 2009 From: runeelmgaard at gmail.com (Rune Laursen) Date: Wed, 18 Feb 2009 13:14:52 +0100 Subject: [vtkusers] Setting view matrix explictly Message-ID: <612a153e0902180414h69565413v8483e5a984868ce1@mail.gmail.com> Hi list, Can anybody explain how I can control what view transformation matrix is used when rendering the scene. I have been supplying my own matrix to Camera->ApplyTransformation but it seems that WindowInteractor has an impact on the final matrix. Is there any way to disable the WindowsInteractor or set its matrices to identity? regards, Rune -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars-friedrich at gmx.net Wed Feb 18 08:42:51 2009 From: lars-friedrich at gmx.net (Lars Friedrich Lars) Date: Wed, 18 Feb 2009 14:42:51 +0100 Subject: [vtkusers] extracting binary label image from poly data contour Message-ID: <20090218134251.65840@gmx.net> Dear VTK-users, I am trying to extract the image region defined by a poly data contour (from vtkContourWidget - stripped and decimated) from a white source image (3D, but 1 slice --> more or less a 2D image) in order to get a binary label image. I am using the code below. Unfortunately, all I get is a black image ... Do you know where the error could be? Could you give me hints where or how I should search for the error, please? I think that the coordinates of the contour and the image match - don't understand why it doesn't work ... Thank you! lars **** the code: bool LabelingCode() { vtkImageData *whiteImage = vtkImageData::New(); whiteImage->SetDimensions(472, 387, 1); whiteImage->SetOrigin(0, 0, 0); whiteImage->SetSpacing(0.84, 0.84, 1.0); whiteImage->SetExtent(0, 471, 0, 386, 0, 0); whiteImage->SetScalarTypeToFloat(); whiteImage->AllocateScalars(); vtkIdType count = whiteImage->GetNumberOfPoints(); for (vtkIdType i = 0; i < count; ++i) whiteImage->GetPointData()->GetScalars()->SetTuple1(i, 255.0); // here I retrieve the input contour (debug output is printed): vtkPolyData *pd = GetFinalContour(); // print debug info of input contour and white image: vtkIndent id; pd->PrintSelf(std::cerr, id); whiteImage->PrintSelf(std::cerr, id); vtkLinearExtrusionFilter *extruder = vtkLinearExtrusionFilter::New(); extruder->SetInput(pd); extruder->SetScaleFactor(1); extruder->SetExtrusionTypeToNormalExtrusion(); extruder->SetVector(0, 0, 1); extruder->Update(); vtkPolyDataToImageStencil *pol2stenc = vtkPolyDataToImageStencil::New(); //pol2stenc->SetInformationInput(whiteImage); pol2stenc->SetInput(extruder->GetOutput()); pol2stenc->SetOutputOrigin(0, 0, 0); pol2stenc->SetOutputSpacing(0.84, 0.84, 1.0); pol2stenc->SetOutputWholeExtent(0, 471, 0, 386, 0, 0); pol2stenc->Update(); vtkImageStencil *imgstenc = vtkImageStencil::New(); imgstenc->SetInput(whiteImage); //imgstenc->SetInput(m_ParentModel->GetImageWrapper()->GetVTKImage()); imgstenc->SetStencil(pol2stenc->GetOutput()); imgstenc->ReverseStencilOff(); imgstenc->SetBackgroundValue(0.); imgstenc->Update(); vtkMetaImageWriter *wm = vtkMetaImageWriter::New(); wm->SetInput(imgstenc->GetOutput()); wm->SetFileName("/data/image-stuff/XrayRegistrationExamples/INN_015/w2.mhd"); wm->Write(); return true; } **** the debug output of the polydata-set: Debug: Off Modified Time: 180037 Reference Count: 3 Registered Events: (none) Source: (none) Information: 0x544a990 Data Released: False Global Release Data: Off UpdateTime: 0 Release Data: Off UpdateExtent: Not Initialized MaximumNumberOfPieces: -1 RequestExactExtent: Off Field Data: Debug: Off Modified Time: 180024 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Number Of Points: 1074 Number Of Cells: 1 Cell Data: Debug: Off Modified Time: 180035 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 ) Pass Through Flags: ( 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) Point Data: Debug: Off Modified Time: 180037 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 ) Pass Through Flags: ( 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) Bounds: Xmin,Xmax: (56.3585, 163.082) Ymin,Ymax: (0.0452085, 133.734) Zmin,Zmax: (0, 0) Compute Time: 180207 Number Of Points: 1074 Point Coordinates: 0x6194770 Locator: 0 Number Of Vertices: 0 Number Of Lines: 1 Number Of Polygons: 0 Number Of Triangle Strips: 0 Number Of Pieces: 1 Piece: 0 Ghost Level: 0 **** the debug output of the image: Debug: Off Modified Time: 180205 Reference Count: 3 Registered Events: (none) Source: (none) Information: 0x544b980 Data Released: False Global Release Data: Off UpdateTime: 0 Release Data: Off UpdateExtent: Not Initialized RequestExactExtent: Off Field Data: Debug: Off Modified Time: 180084 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Number Of Points: 182664 Number Of Cells: 181806 Cell Data: Debug: Off Modified Time: 180087 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 ) Pass Through Flags: ( 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) Point Data: Debug: Off Modified Time: 180205 Reference Count: 1 Registered Events: (none) Number Of Arrays: 1 Array 0 name = NULL Number Of Components: 1 Number Of Tuples: 182664 Copy Tuple Flags: ( 1 1 1 1 1 0 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 ) Pass Through Flags: ( 1 1 1 1 1 1 1 ) Scalars: Debug: Off Modified Time: 180202 Reference Count: 1 Registered Events: (none) Name: (none) Data type: float Size: 182664 MaxId: 182663 NumberOfComponents: 1 Information: 0 Name: (none) Number Of Components: 1 Number Of Tuples: 182664 Size: 182664 MaxId: 182663 LookupTable: (none) Array: 0x66b97b0 Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) Bounds: Xmin,Xmax: (0, 395.64) Ymin,Ymax: (0, 324.24) Zmin,Zmax: (0, 0) Compute Time: 0 ScalarType: 10 NumberOfScalarComponents: 1 Spacing: (0.84, 0.84, 1) Origin: (0, 0, 0) Dimensions: (472, 387, 1) Increments: (0, 0, 0) Extent: (0, 471, 0, 386, 0, 0) -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01 From nkwmailinglists at gmail.com Wed Feb 18 09:53:13 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Wed, 18 Feb 2009 08:53:13 -0600 Subject: [vtkusers] extracting binary label image from poly data contour In-Reply-To: <20090218134251.65840@gmx.net> References: <20090218134251.65840@gmx.net> Message-ID: <44f773f50902180653i106e8406nb3fe66d434645432@mail.gmail.com> Lars, I don't know enough about the process you're using, but we do essentially the same thing in our program, BRAINSTracer, which is a public project on the NITRC website: http://www.nitrc.org/projects/brainstracer We don't do anything nearly that involved; instead, I do this: Create black image For each contour Find contour bounds For each voxel within contour bounds If the voxel is inside the contour, set it to white End End You can look at my source code, but it is complicated by a bunch of other concerns, starting with subsampling the voxel space, and coloring the voxel if the majority of its subvoxels are inside the polygon. The only part of the code is testing polygon membership. There's probable something to do that in VTK, but I found the function I've adapted here by googling before I turned up anything in VTK. // This is a 2D test -- testPoint points to point // data defined as 'double testPoint[2];' -- and though vtkPoints is 3D point data, // only the first two components of each point are used. inline bool PointInPoly(int numPts,vtkPoints *pts,double *testPoint) { int i, j; bool c(false); for (i = 0, j = numPts-1; i < numPts; j = i++) { double pI[3]; pts->GetPoint(i,pI); double pJ[3]; pts->GetPoint(j,pJ); if ((((pI[1] <= testPoint[1]) && (testPoint[1] < pJ[1])) || ((pJ[1] <= testPoint[1]) && (testPoint[1] < pI[1]))) && (testPoint[0] < (pJ[0] - pI[0]) * (testPoint[1] - pI[1]) / (pJ[1] - pI[1]) + pI[0])) { c = !c; } } return c; } From lars-friedrich at gmx.net Wed Feb 18 11:00:47 2009 From: lars-friedrich at gmx.net (Lars Friedrich Lars) Date: Wed, 18 Feb 2009 17:00:47 +0100 Subject: [vtkusers] extracting binary label image from poly data contour In-Reply-To: <44f773f50902180653i106e8406nb3fe66d434645432@mail.gmail.com> References: <20090218134251.65840@gmx.net> <44f773f50902180653i106e8406nb3fe66d434645432@mail.gmail.com> Message-ID: <20090218160047.95940@gmx.net> thank you, kent! I will have a look at your project. I already read about brainstracer and maybe it offers the functionality I am looking for. In the meantime I found out that expanding the white image 3D-slice in negative as well as in positive direction by one slice solves my problem. But this is complicated - I have to extract the middle slice afterwards ... a bit dirty. I am sure the brainstracer-solution works better. thank you again for your response. lars -------- Original-Nachricht -------- > Datum: Wed, 18 Feb 2009 08:53:13 -0600 > Von: kent williams > An: VTK users group > Betreff: Re: [vtkusers] extracting binary label image from poly data contour > Lars, I don't know enough about the process you're using, but we do > essentially the same thing in our program, BRAINSTracer, which is a > public project on the NITRC website: > > http://www.nitrc.org/projects/brainstracer > > We don't do anything nearly that involved; instead, I do this: > > Create black image > For each contour > Find contour bounds > For each voxel within contour bounds > If the voxel is inside the contour, set it to white > End > End > > You can look at my source code, but it is complicated by a bunch of > other concerns, starting with subsampling the voxel space, and > coloring the voxel if the majority of its subvoxels are inside the > polygon. > > The only part of the code is testing polygon membership. There's > probable something to do that in VTK, but I found the function I've > adapted here by googling before I turned up anything in VTK. > > // This is a 2D test -- testPoint points to point > // data defined as 'double testPoint[2];' -- and though vtkPoints is > 3D point data, > // only the first two components of each point are used. > inline > bool PointInPoly(int numPts,vtkPoints *pts,double *testPoint) > { > int i, j; > bool c(false); > for (i = 0, j = numPts-1; i < numPts; j = i++) > { > double pI[3]; > pts->GetPoint(i,pI); > double pJ[3]; > pts->GetPoint(j,pJ); > > if ((((pI[1] <= testPoint[1]) && (testPoint[1] < pJ[1])) || > ((pJ[1] <= testPoint[1]) && (testPoint[1] < pI[1]))) && > (testPoint[0] < (pJ[0] - pI[0]) * (testPoint[1] - pI[1]) / > (pJ[1] - pI[1]) + pI[0])) > { > c = !c; > } > } > return c; > > } > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01 From bhathaw1 at nycap.rr.com Wed Feb 18 12:13:39 2009 From: bhathaw1 at nycap.rr.com (Barry Hathaway) Date: Wed, 18 Feb 2009 12:13:39 -0500 Subject: [vtkusers] VTK_WRAP_TCL2 Message-ID: <499C41C3.5050703@nycap.rr.com> I'm in the process of upgrading an old project from VTK 4.4 to the latest VTK and I'm having problems with several CMake files. They contain a call to the CMake extension VTK_WRAP_TCL2 which was removed from VTK at about 5.0. Would someone tell me the history behind VTK_WRAP_TCL2 such as what it was used for, why it was removed, and what is used as its replacement. I can't seem to find any documentation on it. Thanks. Barry Hathaway From daniele.dml at googlemail.com Wed Feb 18 13:33:07 2009 From: daniele.dml at googlemail.com (Daniele Development-ML) Date: Wed, 18 Feb 2009 18:33:07 +0000 Subject: [vtkusers] Semantics of Field and Vectors keywords in VTK text files Message-ID: <190e13280902181033m5ff3cc36p1ba30f6cc7104b33@mail.gmail.com> Hello everybody, I'm producing a converter from VTK to another format to represents meshes and fields and I'm dealing VTK text files (non XML) - thus not VTK program objects My question is: what is the difference between the data VECTOR and a general FIELD with three components? The difference is meaningful only to a VTK viewer, which instantiates diverse program objects for the two structures, or does it bring some exact meaning even in the only text file? The question might be obvious for VTK gurus - who certainly I'm not. Many thanks in advance! Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From nkwmailinglists at gmail.com Wed Feb 18 13:34:21 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Wed, 18 Feb 2009 12:34:21 -0600 Subject: [vtkusers] vtkDoubleArray -- you can set the number of values but you can't get the number of values? Message-ID: <44f773f50902181034m23b6578an64e12fa7db138923@mail.gmail.com> I've been staring for some time at the Doxygen man pages for vtkDoubleArray and vtkDataArray. It seems that there is a member function vtkDoubleArray::SetNumberOfValues(), but no corresponding vtkDoubleArray::GetNumberOfValues(). This seems to indicate that you have to make sure that you never try to read out more values than you've put in to the array, because there's no way to check this. Or am I missing something? From dcthomp at sandia.gov Wed Feb 18 13:39:37 2009 From: dcthomp at sandia.gov (Thompson, David C) Date: Wed, 18 Feb 2009 11:39:37 -0700 Subject: [vtkusers] vtkDoubleArray -- you can set the number of values but you can't get the number of values? In-Reply-To: <44f773f50902181034m23b6578an64e12fa7db138923@mail.gmail.com> References: <44f773f50902181034m23b6578an64e12fa7db138923@mail.gmail.com> Message-ID: <1C9079C90336A64BBF5612428BC98E1F21AA33C9E6@ES04SNLNT.srn.sandia.gov> You may call GetMaxId(), which returns the number of values minus 1 (since IDs start at 0). David ________________________________________ From: vtkusers-bounces at vtk.org [vtkusers-bounces at vtk.org] On Behalf Of kent williams [nkwmailinglists at gmail.com] Sent: Wednesday, February 18, 2009 10:34 To: VTK users group Subject: [vtkusers] vtkDoubleArray -- you can set the number of values but you can't get the number of values? I've been staring for some time at the Doxygen man pages for vtkDoubleArray and vtkDataArray. It seems that there is a member function vtkDoubleArray::SetNumberOfValues(), but no corresponding vtkDoubleArray::GetNumberOfValues(). This seems to indicate that you have to make sure that you never try to read out more values than you've put in to the array, because there's no way to check this. Or am I missing something? _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From mike.jackson at bluequartz.net Wed Feb 18 13:44:57 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Wed, 18 Feb 2009 13:44:57 -0500 Subject: [vtkusers] vtkDoubleArray -- you can set the number of values but you can't get the number of values? In-Reply-To: <44f773f50902181034m23b6578an64e12fa7db138923@mail.gmail.com> References: <44f773f50902181034m23b6578an64e12fa7db138923@mail.gmail.com> Message-ID: <5CDC6101-CF0F-46CF-9168-D8320672B221@bluequartz.net> You can also use vtkIdType GetNumberOfTuples (); since vtkArrays are based off the "Tuple" concept. Look at the vtkAbstractArray class which vtkDoubleArray descends from. _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 18, 2009, at 1:34 PM, kent williams wrote: > I've been staring for some time at the Doxygen man pages for > vtkDoubleArray and vtkDataArray. It seems that there is a member > function vtkDoubleArray::SetNumberOfValues(), but no corresponding > vtkDoubleArray::GetNumberOfValues(). > > This seems to indicate that you have to make sure that you never try > to read out more values than you've put in to the array, because > there's no way to check this. > > Or am I missing something? > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From francois.bertel at kitware.com Wed Feb 18 13:49:10 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Wed, 18 Feb 2009 13:49:10 -0500 Subject: [vtkusers] vtkDoubleArray -- you can set the number of values but you can't get the number of values? In-Reply-To: <5CDC6101-CF0F-46CF-9168-D8320672B221@bluequartz.net> References: <44f773f50902181034m23b6578an64e12fa7db138923@mail.gmail.com> <5CDC6101-CF0F-46CF-9168-D8320672B221@bluequartz.net> Message-ID: It is not the number of tuples. It is the number of tuples times the number of components, at least according to this implementation: VTK/Common/vtkDataArrayTemplate.txx: //---------------------------------------------------------------------------- // Set the number of n-tuples in the array. template void vtkDataArrayTemplate::SetNumberOfTuples(vtkIdType number) { this->SetNumberOfValues(number*this->NumberOfComponents); this->DataChanged(); } On Wed, Feb 18, 2009 at 1:44 PM, Michael Jackson wrote: > You can also use > vtkIdType GetNumberOfTuples (); > since vtkArrays are based off the "Tuple" concept. Look at the > vtkAbstractArray class which vtkDoubleArray descends from. > > _________________________________________________________ > Mike Jackson mike.jackson at bluequartz.net > BlueQuartz Software www.bluequartz.net > Principal Software Engineer Dayton, Ohio > > > > On Feb 18, 2009, at 1:34 PM, kent williams wrote: > >> I've been staring for some time at the Doxygen man pages for >> vtkDoubleArray and vtkDataArray. It seems that there is a member >> function vtkDoubleArray::SetNumberOfValues(), but no corresponding >> vtkDoubleArray::GetNumberOfValues(). >> >> This seems to indicate that you have to make sure that you never try >> to read out more values than you've put in to the array, because >> there's no way to check this. >> >> Or am I missing something? >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From nkwmailinglists at gmail.com Wed Feb 18 14:38:56 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Wed, 18 Feb 2009 13:38:56 -0600 Subject: [vtkusers] vtkDoubleArray -- you can set the number of values but you can't get the number of values? In-Reply-To: References: <44f773f50902181034m23b6578an64e12fa7db138923@mail.gmail.com> <5CDC6101-CF0F-46CF-9168-D8320672B221@bluequartz.net> Message-ID: <44f773f50902181138p31463d52ifdfd6d41a36f5e8b@mail.gmail.com> Well as it happens, I'm storing an array in one tuple. There's no corresponding GetNumberOfValues method in the class. I could just SetNumberOfValues to 1, and then store each array value in it's own tuple, I guess, but that seems a little clumsy... Here's my code. This may seem to be a dumb exercise, but there's a purpose to it -- I want to save metadata with the vtkPolyData when I write it to disk. I posted yesterday, asking for how one would add vtkProperty attributes into a vtkPolyData in order to write it to disk with the XML writer, and no one answered, so I went ahead and added a data-array for each value in the vtkProperty. Here's what I'm doing, for the Double Array case... static void PolyDataSetDouble(vtkPolyData *p, const char *name, const double *value, int count) { vtkFieldData *fieldData = p->GetFieldData(); vtkDoubleArray *doubleArray = vtkDoubleArray::New(); doubleArray->SetNumberOfComponents(count); doubleArray->InsertNextTupleValue(value); doubleArray->SetName(name); fieldData->AddArray(doubleArray); doubleArray->Delete(); } static void PolyDataGetDouble(vtkPolyData *p, const char *name, double *value, int count) { vtkFieldData *fieldData = p->GetFieldData(); vtkDoubleArray *doubleArray = vtkDoubleArray::SafeDownCast(fieldData->GetArray(name)); if(doubleArray == 0) { for(unsigned i = 0; i < count; i++) { value[i] = 0.0; } } else { // no way to see how many elements actually in this tuple!!! doubleArray->GetTupleValue(0,value); } } On Wed, Feb 18, 2009 at 12:49 PM, Francois Bertel wrote: > It is not the number of tuples. It is the number of tuples times the > number of components, at least according to this implementation: > > VTK/Common/vtkDataArrayTemplate.txx: > > //---------------------------------------------------------------------------- > // Set the number of n-tuples in the array. > template > void vtkDataArrayTemplate::SetNumberOfTuples(vtkIdType number) > { > this->SetNumberOfValues(number*this->NumberOfComponents); > this->DataChanged(); > } > > On Wed, Feb 18, 2009 at 1:44 PM, Michael Jackson > wrote: >> You can also use >> vtkIdType GetNumberOfTuples (); >> since vtkArrays are based off the "Tuple" concept. Look at the >> vtkAbstractArray class which vtkDoubleArray descends from. >> >> _________________________________________________________ >> Mike Jackson mike.jackson at bluequartz.net >> BlueQuartz Software www.bluequartz.net >> Principal Software Engineer Dayton, Ohio >> >> >> >> On Feb 18, 2009, at 1:34 PM, kent williams wrote: >> >>> I've been staring for some time at the Doxygen man pages for >>> vtkDoubleArray and vtkDataArray. It seems that there is a member >>> function vtkDoubleArray::SetNumberOfValues(), but no corresponding >>> vtkDoubleArray::GetNumberOfValues(). >>> >>> This seems to indicate that you have to make sure that you never try >>> to read out more values than you've put in to the array, because >>> there's no way to check this. >>> >>> Or am I missing something? >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > > > -- > Fran?ois Bertel, PhD | Kitware Inc. Suite 204 > 1 (518) 371 3971 x113 | 28 Corporate Drive > | Clifton Park NY 12065, USA > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From jiksed at yahoo.com Wed Feb 18 14:47:04 2009 From: jiksed at yahoo.com (Jim) Date: Wed, 18 Feb 2009 11:47:04 -0800 (PST) Subject: [vtkusers] No image on QVTKWidget In-Reply-To: Message-ID: <104486.76802.qm@web32002.mail.mud.yahoo.com> Dear vtkusers, ? I compiled vtk5.2.1 in VS2008 with Qt GUI support. I also built and ran?three Qt examples (QtEvents, QtSimpleView and QtIamgeViewer) successfully.?In QtEvents, I saw popup menus and coordinate updates when mouse moves. However, the background color does not update when I change background color thru popup menus. I did not see any cone (vtkConeSource) or sphere (vtkSphereSource) in two QVTKWidgets. I noticed similar problems in other two Qt examples. My QVTKWidget shows some erratic color background which changes when I resize the window. Do I miss anything here? ? Thank you. Jim ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.bertel at kitware.com Wed Feb 18 14:53:08 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Wed, 18 Feb 2009 14:53:08 -0500 Subject: [vtkusers] vtkDoubleArray -- you can set the number of values but you can't get the number of values? In-Reply-To: <44f773f50902181138p31463d52ifdfd6d41a36f5e8b@mail.gmail.com> References: <44f773f50902181034m23b6578an64e12fa7db138923@mail.gmail.com> <5CDC6101-CF0F-46CF-9168-D8320672B221@bluequartz.net> <44f773f50902181138p31463d52ifdfd6d41a36f5e8b@mail.gmail.com> Message-ID: Wrong approach. NumberOfComponents is the number of components per tuple. NumberOfComponents is intended to be small. vtkDoubleArray *d=vtkDoubleArray::New(); d->SetNumberOfComponents(1); d->SetNumberOfTuples(count); // allocation happens here. i=0; while(iSetValue(i,value); ++i; } d->Modified(); // you have too, SetValue() does not do it for you, as InsertValue does. or with direct access to the raw pointer: double *ptr=d->GetPointer (0); i=0; while(iModified(); or without copying but just using "double *value": d->SetArray(value,count); On Wed, Feb 18, 2009 at 2:38 PM, kent williams wrote: > Well as it happens, I'm storing an array in one tuple. There's no > corresponding GetNumberOfValues method in the class. I could just > SetNumberOfValues to 1, and then store each array value in it's own > tuple, I guess, but that seems a little clumsy... > > Here's my code. This may seem to be a dumb exercise, but there's a > purpose to it -- I want to save metadata with the vtkPolyData when I > write it to disk. I posted yesterday, asking for how one would add > vtkProperty attributes into a vtkPolyData in order to write it to disk > with the XML writer, and no one answered, so I went ahead and added a > data-array for each value in the vtkProperty. > > Here's what I'm doing, for the Double Array case... > > > static void PolyDataSetDouble(vtkPolyData *p, const char *name, const > double *value, int count) > { > vtkFieldData *fieldData = p->GetFieldData(); > vtkDoubleArray *doubleArray = vtkDoubleArray::New(); > doubleArray->SetNumberOfComponents(count); > doubleArray->InsertNextTupleValue(value); > doubleArray->SetName(name); > fieldData->AddArray(doubleArray); > doubleArray->Delete(); > } > > > static void PolyDataGetDouble(vtkPolyData *p, const char *name, double > *value, int count) > { > vtkFieldData *fieldData = p->GetFieldData(); > vtkDoubleArray *doubleArray = > vtkDoubleArray::SafeDownCast(fieldData->GetArray(name)); > if(doubleArray == 0) > { > for(unsigned i = 0; i < count; i++) > { > value[i] = 0.0; > } > } > else > { // no way to see how many elements actually in this tuple!!! > doubleArray->GetTupleValue(0,value); > } > } > > > On Wed, Feb 18, 2009 at 12:49 PM, Francois Bertel > wrote: >> It is not the number of tuples. It is the number of tuples times the >> number of components, at least according to this implementation: >> >> VTK/Common/vtkDataArrayTemplate.txx: >> >> //---------------------------------------------------------------------------- >> // Set the number of n-tuples in the array. >> template >> void vtkDataArrayTemplate::SetNumberOfTuples(vtkIdType number) >> { >> this->SetNumberOfValues(number*this->NumberOfComponents); >> this->DataChanged(); >> } >> >> On Wed, Feb 18, 2009 at 1:44 PM, Michael Jackson >> wrote: >>> You can also use >>> vtkIdType GetNumberOfTuples (); >>> since vtkArrays are based off the "Tuple" concept. Look at the >>> vtkAbstractArray class which vtkDoubleArray descends from. >>> >>> _________________________________________________________ >>> Mike Jackson mike.jackson at bluequartz.net >>> BlueQuartz Software www.bluequartz.net >>> Principal Software Engineer Dayton, Ohio >>> >>> >>> >>> On Feb 18, 2009, at 1:34 PM, kent williams wrote: >>> >>>> I've been staring for some time at the Doxygen man pages for >>>> vtkDoubleArray and vtkDataArray. It seems that there is a member >>>> function vtkDoubleArray::SetNumberOfValues(), but no corresponding >>>> vtkDoubleArray::GetNumberOfValues(). >>>> >>>> This seems to indicate that you have to make sure that you never try >>>> to read out more values than you've put in to the array, because >>>> there's no way to check this. >>>> >>>> Or am I missing something? >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> Fran?ois Bertel, PhD | Kitware Inc. Suite 204 >> 1 (518) 371 3971 x113 | 28 Corporate Drive >> | Clifton Park NY 12065, USA >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From clinton at elemtech.com Wed Feb 18 15:10:57 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Wed, 18 Feb 2009 13:10:57 -0700 Subject: [vtkusers] No image on QVTKWidget In-Reply-To: <104486.76802.qm@web32002.mail.mud.yahoo.com> References: <104486.76802.qm@web32002.mail.mud.yahoo.com> Message-ID: <499C6B51.8030800@elemtech.com> Do the other vtk examples that don't use Qt work fine? Clint Jim wrote: > Dear vtkusers, > > I compiled vtk5.2.1 in VS2008 with Qt GUI support. I also built and > ran three Qt examples (QtEvents, QtSimpleView and QtIamgeViewer) > successfully. In QtEvents, I saw popup menus and coordinate updates > when mouse moves. However, the background color does not update when I > change background color thru popup menus. I did not see any cone > (vtkConeSource) or sphere (vtkSphereSource) in two QVTKWidgets. I > noticed similar problems in other two Qt examples. My QVTKWidget shows > some erratic color background which changes when I resize the window. > Do I miss anything here? > > Thank you. > Jim > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From fab.meneghini at gmail.com Wed Feb 18 16:49:48 2009 From: fab.meneghini at gmail.com (Fabio Meneghini) Date: Wed, 18 Feb 2009 22:49:48 +0100 Subject: [vtkusers] How do I interpolate scalars along the geometric surface? Message-ID: <972d6afe0902181349j350328acx2fffdbb9e78aa19e@mail.gmail.com> Hi! few weeks ago I faced almost the same kind of problem. The piece of source code I wrote, in C++, act as a moving average filter across the surface. The average is weighted by the distance between the current point and his neighbors. It's quite slow during the execution, since no optimization has been performed (I'm always in short time...). I'm not sure this is what you need, since you have to interpolate scalars across a surface, which is a complete different thing, but I hope this could be of inspiration for you. Good luck! Fabio ---------- Forwarded message ---------- From: Fabio Meneghini Date: 2009/1/18 Subject: Re: [vtkusers] Fwd: How to smooth (or filter) polydata scalars? To: "Kevin H. Hobbs" , vtkusers at vtk.org To whom it may concern, Thanks to help from Kevin H. Hobbs, I wrote a routine performing PolyData scalar values smoothing. That is, it takes as the actual point value the mean of the neighbor points values (but including also himself) , weighting their values mean by the RATIO of their distance from the actual point AND a maximum tolerance distance. Specifically, It takes into account the current point value, with maximum weighting (that is 1), and the neighbors points values with weighting equal to (1 - d/dmax). This only if d > > On Wed, 2009-01-14 at 13:38 +0100, Fabio Meneghini wrote: > > > > Thank you very much for your reply. I really appreciated it! > > You're welcome. > > > So, for every vertex of the polydata, > > "Vertex" has a specific meaning in VTK it means a cell with one point. > I'm not much of a jargon nut but this could prevent some confusion as > you search through classes. > > > I could compute the mean of the scalar values of its neighbors > > (possibly with some weights, depending on their distance from the > > current vertex, and then replace the actual scalar value of current > > vertex with the mean. > > In general yes that's how I'd do it. Do the replacement in a temporary > scalar array or calculate the average from a copy of the scalar array. > That way you won't contaminate the average of the neighbors of later > points with the average of the neighbors of earlier points. > > > waiting for a better suggestion about wich classes do this job > > better, > > Thanks again for the hint... > > > > Use of the gradient or gradient magnitude filters might help you with > highpass filters. > > > Fabio > > I'm attaching code that does point (position) smoothing in a particular > way that I need. It should help you walk the polydata. -------------- next part -------------- A non-text attachment was scrubbed... Name: SmoothPolyDataScalars.tcl Type: application/x-tcl Size: 2423 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smooth_map.cxx Type: text/x-c++src Size: 3751 bytes Desc: not available URL: From johne at annidis.com Wed Feb 18 17:12:31 2009 From: johne at annidis.com (John Eke) Date: Wed, 18 Feb 2009 17:12:31 -0500 Subject: [vtkusers] PNG Header/Metadata Reader In-Reply-To: References: Message-ID: <499C87CF.2070309@annidis.com> Hi Guys, Would anyone know if there are any classes in VTK with which I can view or extract metadata from a PNG image header? Thanks John E From jiksed at yahoo.com Wed Feb 18 17:20:08 2009 From: jiksed at yahoo.com (Jim) Date: Wed, 18 Feb 2009 14:20:08 -0800 (PST) Subject: [vtkusers] C++ example issues Message-ID: <438176.12748.qm@web32003.mail.mud.yahoo.com> ? I built vtk 5.2.1 and c++ examples in VS2008 from the source. I ran Examples\DataManipulation\Cxx\Arrays.exe from both Command Prompt and by double-clicking it from Windows Explorer. Arrays.exe was executed without any error but I did not see any RenderWindow popping up. However, Arrays.tcl runs great and shows a beautiful color square. As a side note, I have vtk5.0.2 built with Borland C++ 2006 on the same computer. ? I had a static build of vtk, but I noticed that all examples are set to dynamic build (/MD). When I changed it to /MT, I got tons of errors all similar to this: ? MSVCRT.lib(MSVCR90.dll) : error LNK2005: _getenv already defined in LIBCMT.lib(getenv.obj) ? Someone please help out. Thank you. ? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kurakurara at gmail.com Wed Feb 18 19:22:08 2009 From: kurakurara at gmail.com (Takayoshi Kurachi) Date: Thu, 19 Feb 2009 09:22:08 +0900 Subject: [vtkusers] How do I interpolate scalars along the geometric surface? In-Reply-To: <972d6afe0902181349j350328acx2fffdbb9e78aa19e@mail.gmail.com> References: <972d6afe0902181349j350328acx2fffdbb9e78aa19e@mail.gmail.com> Message-ID: <499CA630.8030802@gmail.com> Hello Fabio, Thank you very much for your reply!! It really helps to understand how to go through the point by point operation in VTK. It's very valuable to see the working code! I'll do the very similar operation, making it the interpolation across the surface. Thank you!! Taka Fabio Meneghini wrote: > Hi! > few weeks ago I faced almost the same kind of problem. > The piece of source code I wrote, in C++, act as a moving average > filter across the surface. The average is weighted by the distance > between the current point and his neighbors. It's quite slow during > the execution, since no optimization has been performed (I'm always in > short time...). > I'm not sure this is what you need, since you have to interpolate > scalars across a surface, which is a complete different thing, but I > hope this could be of inspiration for you. > Good luck! > > Fabio > > > > > ---------- Forwarded message ---------- > From: Fabio Meneghini > Date: 2009/1/18 > Subject: Re: [vtkusers] Fwd: How to smooth (or filter) polydata scalars? > To: "Kevin H. Hobbs" , vtkusers at vtk.org > > > To whom it may concern, > Thanks to help from Kevin H. Hobbs, I wrote a routine performing > PolyData scalar values smoothing. > > That is, it takes as the actual point value the mean of the neighbor > points values (but including also himself) , weighting their values > mean by the RATIO of their distance from the actual point AND a > maximum tolerance distance. > Specifically, It takes into account the current point value, with > maximum weighting (that is 1), and the neighbors points values with > weighting equal to (1 - d/dmax). This only if d weighting for that point is null. > > Please, I would be glad if anyone could give a look at this algorithm: > it could be implemented as a method (or even a class). It's working > fine for my purposes, but I think it's not very much optimized, since > I'm not exactly a hero in programming, yet, so fell free to suggest me > how to boost and improve performances... > I wrote both the C++ and TCL versions, of the algorithm, so you don't > have excuses! ^__^ Have fun!!! > > Fabio Meneghini > > > 2009/1/14 Kevin H. Hobbs >> On Wed, 2009-01-14 at 13:38 +0100, Fabio Meneghini wrote: >>> Thank you very much for your reply. I really appreciated it! >> You're welcome. >> >>> So, for every vertex of the polydata, >> "Vertex" has a specific meaning in VTK it means a cell with one point. >> I'm not much of a jargon nut but this could prevent some confusion as >> you search through classes. >> >>> I could compute the mean of the scalar values of its neighbors >>> (possibly with some weights, depending on their distance from the >>> current vertex, and then replace the actual scalar value of current >>> vertex with the mean. >> In general yes that's how I'd do it. Do the replacement in a temporary >> scalar array or calculate the average from a copy of the scalar array. >> That way you won't contaminate the average of the neighbors of later >> points with the average of the neighbors of earlier points. >> >>> waiting for a better suggestion about wich classes do this job >>> better, >>> Thanks again for the hint... >>> >> Use of the gradient or gradient magnitude filters might help you with >> highpass filters. >> >>> Fabio >> I'm attaching code that does point (position) smoothing in a particular >> way that I need. It should help you walk the polydata. From fab.meneghini at gmail.com Thu Feb 19 04:11:41 2009 From: fab.meneghini at gmail.com (Fabio Meneghini) Date: Thu, 19 Feb 2009 10:11:41 +0100 Subject: [vtkusers] How do I interpolate scalars along the geometric surface? In-Reply-To: <499CA630.8030802@gmail.com> References: <972d6afe0902181349j350328acx2fffdbb9e78aa19e@mail.gmail.com> <499CA630.8030802@gmail.com> Message-ID: <972d6afe0902190111t768ac06fk89819b6434b36101@mail.gmail.com> You're welcome. Please let me (and us all) know when you do it, I guess it will be very usefull an interpolation method. Fabio 2009/2/19 Takayoshi Kurachi : > Hello Fabio, > > Thank you very much for your reply!! > > It really helps to understand how to go through the point by point > operation in VTK. It's very valuable to see the working code! I'll > do the very similar operation, making it the interpolation across > the surface. > > Thank you!! > Taka > > > > Fabio Meneghini wrote: >> >> Hi! >> few weeks ago I faced almost the same kind of problem. >> The piece of source code I wrote, in C++, act as a moving average >> filter across the surface. The average is weighted by the distance >> between the current point and his neighbors. It's quite slow during >> the execution, since no optimization has been performed (I'm always in >> short time...). >> I'm not sure this is what you need, since you have to interpolate >> scalars across a surface, which is a complete different thing, but I >> hope this could be of inspiration for you. >> Good luck! >> >> Fabio >> >> >> >> >> ---------- Forwarded message ---------- >> From: Fabio Meneghini >> Date: 2009/1/18 >> Subject: Re: [vtkusers] Fwd: How to smooth (or filter) polydata scalars? >> To: "Kevin H. Hobbs" , vtkusers at vtk.org >> >> >> To whom it may concern, >> Thanks to help from Kevin H. Hobbs, I wrote a routine performing >> PolyData scalar values smoothing. >> >> That is, it takes as the actual point value the mean of the neighbor >> points values (but including also himself) , weighting their values >> mean by the RATIO of their distance from the actual point AND a >> maximum tolerance distance. >> Specifically, It takes into account the current point value, with >> maximum weighting (that is 1), and the neighbors points values with >> weighting equal to (1 - d/dmax). This only if d> weighting for that point is null. >> >> Please, I would be glad if anyone could give a look at this algorithm: >> it could be implemented as a method (or even a class). It's working >> fine for my purposes, but I think it's not very much optimized, since >> I'm not exactly a hero in programming, yet, so fell free to suggest me >> how to boost and improve performances... >> I wrote both the C++ and TCL versions, of the algorithm, so you don't >> have excuses! ^__^ Have fun!!! >> >> Fabio Meneghini >> >> >> 2009/1/14 Kevin H. Hobbs >>> >>> On Wed, 2009-01-14 at 13:38 +0100, Fabio Meneghini wrote: >>>> >>>> Thank you very much for your reply. I really appreciated it! >>> >>> You're welcome. >>> >>>> So, for every vertex of the polydata, >>> >>> "Vertex" has a specific meaning in VTK it means a cell with one point. >>> I'm not much of a jargon nut but this could prevent some confusion as >>> you search through classes. >>> >>>> I could compute the mean of the scalar values of its neighbors >>>> (possibly with some weights, depending on their distance from the >>>> current vertex, and then replace the actual scalar value of current >>>> vertex with the mean. >>> >>> In general yes that's how I'd do it. Do the replacement in a temporary >>> scalar array or calculate the average from a copy of the scalar array. >>> That way you won't contaminate the average of the neighbors of later >>> points with the average of the neighbors of earlier points. >>> >>>> waiting for a better suggestion about wich classes do this job >>>> better, >>>> Thanks again for the hint... >>>> >>> Use of the gradient or gradient magnitude filters might help you with >>> highpass filters. >>> >>>> Fabio >>> >>> I'm attaching code that does point (position) smoothing in a particular >>> way that I need. It should help you walk the polydata. > From mathieu.malaterre at gmail.com Thu Feb 19 06:19:16 2009 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Thu, 19 Feb 2009 12:19:16 +0100 Subject: [vtkusers] VTK_WRAP_TCL2 In-Reply-To: <499C41C3.5050703@nycap.rr.com> References: <499C41C3.5050703@nycap.rr.com> Message-ID: On Wed, Feb 18, 2009 at 6:13 PM, Barry Hathaway wrote: > I'm in the process of upgrading an old project from VTK 4.4 to the latest > VTK and > I'm having problems with several CMake files. They contain a call to the > CMake > extension VTK_WRAP_TCL2 which was removed from VTK at about 5.0. > Would someone tell me the history behind VTK_WRAP_TCL2 such as what it > was used for, why it was removed, and what is used as its replacement. I > can't > seem to find any documentation on it. Thanks. > You are missing: INCLUDE(${VTK_CMAKE_DIR}/vtkWrapTcl.cmake) I have a single cmakelists.txt that handle VTK 4.2 to VTK CVS in GDCM fine: http://gdcm.svn.sourceforge.net/viewvc/gdcm/trunk/Utilities/VTK/CMakeLists.txt?view=log 2cts -- Mathieu From daniel.meier at oleco.net Thu Feb 19 07:10:18 2009 From: daniel.meier at oleco.net (Daniel Meier) Date: Thu, 19 Feb 2009 13:10:18 +0100 Subject: [vtkusers] vtkPoints to vtkPolyData Message-ID: <50538.1235045418@oleco.net> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }Hi all, I'm new to vtk. How can I convert vtkPoints to vtkPolydata. The points represent an object in 3D. I have found ConvertPointSequenceToPolyData ( http://www.vtk.org/pipermail/vtkusers/2007-November/093317.html [1] ) from Dean Inglis which works fine in 2D but how can this be done in 3D? Thanks for any suggestions, Daniel ------------------------- versendet mit www.oleco.de Mail - Anmeldung und Nutzung kostenlos! Oleco www.netlcr.org - jetzt auch mit Spamschutz. Links: ------ [1] http://www.vtk.org/pipermail/vtkusers/2007-November/093317.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.gooding at gmail.com Thu Feb 19 08:06:13 2009 From: mark.gooding at gmail.com (Mark Gooding) Date: Thu, 19 Feb 2009 13:06:13 +0000 Subject: [vtkusers] SeedWidget with ImageViewer2 to get 3D locations Message-ID: Hi there, I'm using an ImageViewer2 with a sliderWidget to scroll through a volume image (following an example I found in the archives when searching for a solution to this problem). I am also using a SeedWidget to select points from the current slice. The display XY co-ordinate seems to be picked correctly, however the slice selected by the seed widget is not the current slice, but appears to be fixed. Has anyone done something like this? Some pointers would be helpful. thanks, mark From nkwmailinglists at gmail.com Thu Feb 19 09:46:45 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Thu, 19 Feb 2009 08:46:45 -0600 Subject: [vtkusers] vtkPoints to vtkPolyData In-Reply-To: <50538.1235045418@oleco.net> References: <50538.1235045418@oleco.net> Message-ID: <44f773f50902190646q6b8149f0pb5f982c088ad8426@mail.gmail.com> I'm not sure what you're asking. Are you saying you have a set of 3D points, and want to convert them into a polygon? Then Dean's function works just fine. It assumes that your points are ordered, and it's up to you to make sure they're co-planar, but that function is 3D. If you're doing something more complicated, you need to be more specific about what you're trying. On Thu, Feb 19, 2009 at 6:10 AM, Daniel Meier wrote: > Hi all, > > I'm new to vtk. How can I convert vtkPoints to vtkPolydata. The points > represent an object in 3D. I have found ConvertPointSequenceToPolyData ( > http://www.vtk.org/pipermail/vtkusers/2007-November/093317.html ) from Dean > Inglis which works fine in 2D but how can this be done in 3D? > > Thanks for any suggestions, > > Daniel > ________________________________ > versendet mit www.oleco.de Mail - Anmeldung und Nutzung kostenlos! > Oleco www.netlcr.org - jetzt auch mit Spamschutz. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > From nkwmailinglists at gmail.com Thu Feb 19 10:07:25 2009 From: nkwmailinglists at gmail.com (kent williams) Date: Thu, 19 Feb 2009 09:07:25 -0600 Subject: [vtkusers] SeedWidget with ImageViewer2 to get 3D locations In-Reply-To: References: Message-ID: <44f773f50902190707r413e1e93xf8652529e19cac3c@mail.gmail.com> I suspect that while it reports 3D points, they're really 2D, and you have to fill in the Z coordinate. You should know this anyway since you use the sliderWidget to scroll through the volume. I'm curious about your application. We're going to do the same thing for picking points of interest in a volume. Another developer in our team is working on that, so I don't have hands on experience with the vtkSeedWidget yet, but I suspect that it has the same idiosyncrasy with respect to the coordinate system in which it reports points. It has methods that have 'WorldCoordinates' in the name, but in fact, the X,Y,Z values are permuted such that X and Y are X and Y in the viewing plane, and Z is the direction perpendicular to the viewing plane. We use vtkinria3d's synchronized views instead of vtkImageViewer2, and I don't know if the idea of coordinate systems in 2D views are exactly the same, but we additionally have to negate the Y coordinate in Axial views. So if your point values look upside down, that's one thing to consider ;-) On Thu, Feb 19, 2009 at 7:06 AM, Mark Gooding wrote: > Hi there, > > I'm using an ImageViewer2 with a sliderWidget to scroll through a > volume image (following an example I found in the archives when > searching for a solution to this problem). I am also using a > SeedWidget to select points from the current slice. The display XY > co-ordinate seems to be picked correctly, however the slice selected > by the seed widget is not the current slice, but appears to be fixed. > Has anyone done something like this? Some pointers would be helpful. > > thanks, > > mark > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From syrkinae at ethz.ch Thu Feb 19 10:35:56 2009 From: syrkinae at ethz.ch (Syrkina Ekaterina) Date: Thu, 19 Feb 2009 16:35:56 +0100 Subject: [vtkusers] vtkPoints to vtkPolyData In-Reply-To: <44f773f50902190646q6b8149f0pb5f982c088ad8426@mail.gmail.com> Message-ID: <2DDC0446EF4690489771E0A9491C6305028B016B@EX3.d.ethz.ch> Hello, I recently needed to display point cloud in paraview and "converted" vtkPoints to vtkPolyData this way: vtkPolyData *data = vtkPolyData::New(); vtkPoints *points = vtkPoints::New(); // some code to read points from text file into vtkPoints object // data->SetPoints(points); It didn't solve my problem, since paraview displays only points associated by geometry, so one has to define faces or smth else. But maybe it solves your problem. Best, Katya > -----Original Message----- > From: vtkusers-bounces at vtk.org > [mailto:vtkusers-bounces at vtk.org] On Behalf Of kent williams > Sent: Thursday, February 19, 2009 3:47 PM > To: VTK users group > Subject: Re: [vtkusers] vtkPoints to vtkPolyData > > I'm not sure what you're asking. Are you saying you have a set of 3D > points, and want to convert them into a polygon? Then Dean's function > works just fine. It assumes that your points are ordered, and it's up > to you to make sure they're co-planar, but that function is 3D. > > If you're doing something more complicated, you need to be more > specific about what you're trying. > > On Thu, Feb 19, 2009 at 6:10 AM, Daniel Meier > wrote: > > Hi all, > > > > I'm new to vtk. How can I convert vtkPoints to vtkPolydata. > The points > > represent an object in 3D. I have found > ConvertPointSequenceToPolyData ( > > > http://www.vtk.org/pipermail/vtkusers/2007-November/093317.htm > l ) from Dean > > Inglis which works fine in 2D but how can this be done in 3D? > > > > Thanks for any suggestions, > > > > Daniel > > ________________________________ > > versendet mit www.oleco.de Mail - Anmeldung und Nutzung kostenlos! > > Oleco www.netlcr.org - jetzt auch mit Spamschutz. > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From bellina at illinois.edu Thu Feb 19 10:47:51 2009 From: bellina at illinois.edu (Alessandro A. Bellina) Date: Thu, 19 Feb 2009 09:47:51 -0600 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: <20090214203458.965444501@kingu.local> <20090217161759.1585082141@kingu.local> Message-ID: *bump* I reinstalled cmake and I am still getting this message.. any help would be great. Thanks, Alessandro On Tue, Feb 17, 2009 at 10:27 AM, Alessandro A. Bellina wrote: > I am using gcc 4.3.1, and XCode 3.1. > > I don't have a CXXFLAGS defined. > > The build directory is clean to start with. > > If I may add, I think that the problem is at the configure stage. > Starting with a clean directory I try to run ccmake ../VTK and I get: > > CMake Error: An attempt was made to access a variable: CMAKE_SIZEOF_INT that h > as not been defined. Some variables were always defined by CMake in versions p > rior to 1.6. To fix this you might need to set the cache value of CMAKE_BACKWA > RDS_COMPATIBILITY to 1.4 or less. If you are writing a CMakeList file, (or hav > e already set CMAKE_BACKWARDS_COMPATABILITY to 1.4 or less) then you probably > to include a CMake module to test for the feature this variable defines. > > CMake Error at /Applications/CMake 2.6-2.app/Contents/share/cmake-2.6/Modules/ > TestBigEndian.cmake:31 (MESSAGE): > no suitable type found > Call Stack (most recent call first): > CMake/CMakeBackwardCompatibilityC.cmake:31 (TEST_BIG_ENDIAN) > CMakeLists.txt:365 (INCLUDE) > > > Setting that variable with -D ... just causes more problems. > > Thanks, > Alessandro > > > > > On Tue, Feb 17, 2009 at 10:17 AM, Sean McBride wrote: >> On 2/17/09 9:37 AM, Alessandro A. Bellina said: >> >>>OK, nothing truly jumps out at me so I am posting the whole message. >>>Could it be something wrong with the CMake I have installed? >> >> BTW, did you ever say which version of Mac OS X and which version of >> Xcode you are using? What does 'gcc --version' report? >> >> -- >> ____________________________________________________________ >> Sean McBride, B. Eng sean at rogue-research.com >> Rogue Research www.rogue-research.com >> Mac Software Developer Montr?al, Qu?bec, Canada >> >> >> > > > > -- > Alessandro A. Bellina > > Graduate Student > Bioacoustics Research Laboratory > Electrical and Computer Engineering > University of Illinois at Urbana-Champaign > -- Alessandro A. Bellina Graduate Student Bioacoustics Research Laboratory Electrical and Computer Engineering University of Illinois at Urbana-Champaign From mike.jackson at bluequartz.net Thu Feb 19 11:16:00 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 19 Feb 2009 11:16:00 -0500 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: <20090214203458.965444501@kingu.local> <20090217161759.1585082141@kingu.local> Message-ID: are _really_ using gcc 4.3.1? Where did you get it? I thought Apple only supplied up to gcc 4.2? I have OS X 10.5.6 Intel with Xcode 3.1.2 installed and my version of gcc is 4.0 (or 4.2 optionally). can you run "gcc -dumpversion" and post the output? Did you build this gcc yourself? _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 19, 2009, at 10:47 AM, Alessandro A. Bellina wrote: >> I am using gcc 4.3.1, and XCode 3.1. From bellina at illinois.edu Thu Feb 19 11:18:00 2009 From: bellina at illinois.edu (Alessandro A. Bellina) Date: Thu, 19 Feb 2009 10:18:00 -0600 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: <20090217161759.1585082141@kingu.local> Message-ID: On Thu, Feb 19, 2009 at 10:17 AM, Alessandro A. Bellina wrote: > Using built-in specs. > Target: i386-apple-darwin9.4.0 > Configured with: ../gcc-4.3.1/configure --prefix=/opt/local > --enable-languages=c,c++,objc,obj-c++,java,fortran > --libdir=/opt/local/lib/gcc43 --includedir=/opt/local/include/gcc43 > --infodir=/opt/local/share/info --mandir=/opt/local/share/man > --with-local-prefix=/opt/local --with-system-zlib --disable-nls > --program-suffix=-mp-4.3 > --with-gxx-include-dir=/opt/local/include/gcc43/c++/ > --with-gmp=/opt/local --with-mpfr=/opt/local > Thread model: posix > gcc version 4.3.1 (GCC) > > > > I think I got it from macports.. but I am not sure > > Alessandro > > On Thu, Feb 19, 2009 at 10:16 AM, Michael Jackson > wrote: >> are _really_ using gcc 4.3.1? Where did you get it? I thought Apple only >> supplied up to gcc 4.2? I have OS X 10.5.6 Intel with Xcode 3.1.2 installed >> and my version of gcc is 4.0 (or 4.2 optionally). >> >> can you run "gcc -dumpversion" and post the output? >> >> Did you build this gcc yourself? >> >> _________________________________________________________ >> Mike Jackson mike.jackson at bluequartz.net >> BlueQuartz Software www.bluequartz.net >> Principal Software Engineer Dayton, Ohio >> >> >> >> On Feb 19, 2009, at 10:47 AM, Alessandro A. Bellina wrote: >> >>>> I am using gcc 4.3.1, and XCode 3.1. >> >> > > > > -- > Alessandro A. Bellina > > Graduate Student > Bioacoustics Research Laboratory > Electrical and Computer Engineering > University of Illinois at Urbana-Champaign > -- Alessandro A. Bellina Graduate Student Bioacoustics Research Laboratory Electrical and Computer Engineering University of Illinois at Urbana-Champaign From mike.jackson at bluequartz.net Thu Feb 19 11:28:41 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 19 Feb 2009 11:28:41 -0500 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: <36DE65DB-ABCF-4D19-BD65-CF34F153B8D4@illinois.edu> References: <20090214203458.965444501@kingu.local> <20090217161759.1585082141@kingu.local> <36DE65DB-ABCF-4D19-BD65-CF34F153B8D4@illinois.edu> Message-ID: Use the gcc 4.2 compiler on OS X if you need OpenMP support. That is what I do and I have no problems with it. _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 19, 2009, at 11:25 AM, Alessandro Bellina wrote: > I think I made the switch because OpenMP was not supported > otherwise... > I have to double check. I should be able to change the version on > compile.. let me try that > > Thank you, > > Alessandro > > Alessandro A. Bellina > bellina at illinois.edu > --- > Graduate Research Assistant > Bioacoustics Research Laboratory > Electrical and Computer Engineering > --- > > > > > > > On Feb 19, 2009, at 10:23 AM, Michael Jackson wrote: > >> Why do you think you need gcc 4.3? What is it supposedly offering >> that gcc 4.0.1 is not? > From bellina at illinois.edu Thu Feb 19 11:32:57 2009 From: bellina at illinois.edu (Alessandro A. Bellina) Date: Thu, 19 Feb 2009 10:32:57 -0600 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: References: <20090217161759.1585082141@kingu.local> <36DE65DB-ABCF-4D19-BD65-CF34F153B8D4@illinois.edu> Message-ID: OK. 4.2 is helpming get one step further. I can safely generate now.. however! I get this message on make: [ 0%] Building CXX object Utilities/kwsys/CMakeFiles/vtksys.dir/SystemTools.o In file included from /Users/bellina/Code/VTK52/VTK/Utilities/kwsys/SystemTools.cxx:21: /Users/bellina/Code/VTK52/VTKBuild/Utilities/vtksys/ios/sstream: In member function 'void vtksys_ios::istringstream::clear(int)': /Users/bellina/Code/VTK52/VTKBuild/Utilities/vtksys/ios/sstream:178: error: invalid conversion from 'int' to 'std::_Ios_Iostate' /Users/bellina/Code/VTK52/VTKBuild/Utilities/vtksys/ios/sstream:178: error: initializing argument 1 of 'void std::basic_ios<_CharT, _Traits>::clear(std::_Ios_Iostate) [with _CharT = char, _Traits = std::char_traits]' make[2]: *** [Utilities/kwsys/CMakeFiles/vtksys.dir/SystemTools.o] Error 1 make[1]: *** [Utilities/kwsys/CMakeFiles/vtksys.dir/all] Error 2 make: *** [all] Error 2 Thanks, Alessandro On Thu, Feb 19, 2009 at 10:28 AM, Michael Jackson wrote: > Use the gcc 4.2 compiler on OS X if you need OpenMP support. That is what I > do and I have no problems with it. > > _________________________________________________________ > Mike Jackson mike.jackson at bluequartz.net > BlueQuartz Software www.bluequartz.net > Principal Software Engineer Dayton, Ohio > > > > On Feb 19, 2009, at 11:25 AM, Alessandro Bellina wrote: > >> I think I made the switch because OpenMP was not supported otherwise... >> I have to double check. I should be able to change the version on >> compile.. let me try that >> >> Thank you, >> >> Alessandro >> >> Alessandro A. Bellina >> bellina at illinois.edu >> --- >> Graduate Research Assistant >> Bioacoustics Research Laboratory >> Electrical and Computer Engineering >> --- >> >> >> >> >> >> >> On Feb 19, 2009, at 10:23 AM, Michael Jackson wrote: >> >>> Why do you think you need gcc 4.3? What is it supposedly offering that >>> gcc 4.0.1 is not? >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Alessandro A. Bellina Graduate Student Bioacoustics Research Laboratory Electrical and Computer Engineering University of Illinois at Urbana-Champaign From mike.jackson at bluequartz.net Thu Feb 19 11:35:37 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 19 Feb 2009 11:35:37 -0500 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: <36DE65DB-ABCF-4D19-BD65-CF34F153B8D4@illinois.edu> References: <20090214203458.965444501@kingu.local> <20090217161759.1585082141@kingu.local> <36DE65DB-ABCF-4D19-BD65-CF34F153B8D4@illinois.edu> Message-ID: <96358E88-DF3B-4CCB-A3D6-4766EA93C974@bluequartz.net> export CXX=/Developer/usr/bin/g++-4.2 export CC=/Developer/usr/bin/gcc-4.2 cmake ../VTK Should work for you. http://developer.apple.com/ReleaseNotes/DeveloperTools/RN-llvm-gcc/index.html has more notes. _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 19, 2009, at 11:25 AM, Alessandro Bellina wrote: > I think I made the switch because OpenMP was not supported > otherwise... > I have to double check. I should be able to change the version on > compile.. let me try that > > Thank you, > > Alessandro > > Alessandro A. Bellina > bellina at illinois.edu > --- > Graduate Research Assistant > Bioacoustics Research Laboratory > Electrical and Computer Engineering > --- > > > > > > > On Feb 19, 2009, at 10:23 AM, Michael Jackson wrote: > >> Why do you think you need gcc 4.3? What is it supposedly offering >> that gcc 4.0.1 is not? > From bellina at illinois.edu Thu Feb 19 11:41:10 2009 From: bellina at illinois.edu (Alessandro A. Bellina) Date: Thu, 19 Feb 2009 10:41:10 -0600 Subject: [vtkusers] Wrong way of handing a time-dependent dataset? Memory leaks... In-Reply-To: <96358E88-DF3B-4CCB-A3D6-4766EA93C974@bluequartz.net> References: <20090217161759.1585082141@kingu.local> <36DE65DB-ABCF-4D19-BD65-CF34F153B8D4@illinois.edu> <96358E88-DF3B-4CCB-A3D6-4766EA93C974@bluequartz.net> Message-ID: Thank you for all of the help, but I still get the error I posted before o compiling sstream after setting the compiler to 4.2 the error now is: [ 0%] Building CXX object Utilities/kwsys/CMakeFiles/vtksys.dir/SystemTools.o In file included from /Users/bellina/Code/VTK52/VTK/Utilities/kwsys/SystemTools.cxx:21: /Users/bellina/Code/VTK52/VTKBuild/Utilities/vtksys/ios/sstream: In member function 'void vtksys_ios::istringstream::clear(int)': /Users/bellina/Code/VTK52/VTKBuild/Utilities/vtksys/ios/sstream:178: error: invalid conversion from 'int' to 'std::_Ios_Iostate' /Users/bellina/Code/VTK52/VTKBuild/Utilities/vtksys/ios/sstream:178: error: initializing argument 1 of 'void std::basic_ios<_CharT, _Traits>::clear(std::_Ios_Iostate) [with _CharT = char, _Traits = std::char_traits]' make[2]: *** [Utilities/kwsys/CMakeFiles/vtksys.dir/SystemTools.o] Error 1 make[1]: *** [Utilities/kwsys/CMakeFiles/vtksys.dir/all] Error 2 make: *** [all] Error 2 On Thu, Feb 19, 2009 at 10:35 AM, Michael Jackson wrote: > export CXX=/Developer/usr/bin/g++-4.2 > export CC=/Developer/usr/bin/gcc-4.2 > cmake ../VTK > > Should work for you. > > http://developer.apple.com/ReleaseNotes/DeveloperTools/RN-llvm-gcc/index.html > > has more notes. > _________________________________________________________ > Mike Jackson mike.jackson at bluequartz.net > BlueQuartz Software www.bluequartz.net > Principal Software Engineer Dayton, Ohio > > > > On Feb 19, 2009, at 11:25 AM, Alessandro Bellina wrote: > >> I think I made the switch because OpenMP was not supported otherwise... >> I have to double check. I should be able to change the version on >> compile.. let me try that >> >> Thank you, >> >> Alessandro >> >> Alessandro A. Bellina >> bellina at illinois.edu >> --- >> Graduate Research Assistant >> Bioacoustics Research Laboratory >> Electrical and Computer Engineering >> --- >> >> >> >> >> >> >> On Feb 19, 2009, at 10:23 AM, Michael Jackson wrote: >> >>> Why do you think you need gcc 4.3? What is it supposedly offering that >>> gcc 4.0.1 is not? >> > > -- Alessandro A. Bellina Graduate Student Bioacoustics Research Laboratory Electrical and Computer Engineering University of Illinois at Urbana-Champaign From mike.jackson at bluequartz.net Thu Feb 19 11:45:05 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Thu, 19 Feb 2009 11:45:05 -0500 Subject: [vtkusers] gcc 4.2 compile error on OS X 10.5 Intel In-Reply-To: References: <20090217161759.1585082141@kingu.local> <36DE65DB-ABCF-4D19-BD65-CF34F153B8D4@illinois.edu> Message-ID: (Forking from another message thread.. ) I just tried what I sent you on a clean vtk 5.2 source directory (Not CVS) using gcc/g++ 4.2 and I am already about 30% the way through the compile. I would start from a clean terminal for one. Uninstall gcc 4.3 from fink. Make sure the your .bash_profile is NOT pulling in environment vars from fink then try again. Also, try make VERBOSE=1 and post the complete compile command from the file that gets the error. Maybe someone else can see what is going wrong. --- Mike Jackson www.bluequartz.net On Feb 19, 2009, at 11:32 AM, Alessandro A. Bellina wrote: > OK. 4.2 is helpming get one step further. I can safely generate > now.. however! > > I get this message on make: > > [ 0%] Building CXX object Utilities/kwsys/CMakeFiles/vtksys.dir/ > SystemTools.o > In file included from > /Users/bellina/Code/VTK52/VTK/Utilities/kwsys/SystemTools.cxx:21: > /Users/bellina/Code/VTK52/VTKBuild/Utilities/vtksys/ios/sstream: In > member function 'void vtksys_ios::istringstream::clear(int)': > /Users/bellina/Code/VTK52/VTKBuild/Utilities/vtksys/ios/sstream:178: > error: invalid conversion from 'int' to 'std::_Ios_Iostate' > /Users/bellina/Code/VTK52/VTKBuild/Utilities/vtksys/ios/sstream:178: > error: initializing argument 1 of 'void std::basic_ios<_CharT, > _Traits>::clear(std::_Ios_Iostate) [with _CharT = char, _Traits = > std::char_traits]' > make[2]: *** [Utilities/kwsys/CMakeFiles/vtksys.dir/SystemTools.o] > Error 1 > make[1]: *** [Utilities/kwsys/CMakeFiles/vtksys.dir/all] Error 2 > make: *** [all] Error 2 > > > Thanks, > > Alessandro > > On Thu, Feb 19, 2009 at 10:28 AM, Michael Jackson > wrote: >> Use the gcc 4.2 compiler on OS X if you need OpenMP support. That >> is what I >> do and I have no problems with it. >> >> _________________________________________________________ >> Mike Jackson mike.jackson at bluequartz.net >> BlueQuartz Software www.bluequartz.net >> Principal Software Engineer Dayton, Ohio >> >> >> >> On Feb 19, 2009, at 11:25 AM, Alessandro Bellina wrote: >> >>> I think I made the switch because OpenMP was not supported >>> otherwise... >>> I have to double check. I should be able to change the version on >>> compile.. let me try that >>> >>> Thank you, >>> >>> Alessandro >>> >>> Alessandro A. Bellina >>> bellina at illinois.edu >>> --- >>> Graduate Research Assistant >>> Bioacoustics Research Laboratory >>> Electrical and Computer Engineering >>> --- >>> >>> >>> >>> >>> >>> >>> On Feb 19, 2009, at 10:23 AM, Michael Jackson wrote: >>> >>>> Why do you think you need gcc 4.3? What is it supposedly offering >>>> that >>>> gcc 4.0.1 is not? >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > > > -- > Alessandro A. Bellina > > Graduate Student > Bioacoustics Research Laboratory > Electrical and Computer Engineering > University of Illinois at Urbana-Champaign From bjoern.zehner at ufz.de Thu Feb 19 12:03:21 2009 From: bjoern.zehner at ufz.de (=?iso-8859-1?Q?=22Bj=F6rn_Zehner=22?=) Date: Thu, 19 Feb 2009 18:03:21 +0100 Subject: [vtkusers] vtkDoubleArray -- you can set the number of values but you can't get the number of values? In-Reply-To: <44f773f50902181034m23b6578an64e12fa7db138923@mail.gmail.com> References: <44f773f50902181034m23b6578an64e12fa7db138923@mail.gmail.com> Message-ID: An HTML attachment was scrubbed... URL: From amylists at gmail.com Thu Feb 19 13:31:17 2009 From: amylists at gmail.com (Amy Squillacote) Date: Thu, 19 Feb 2009 12:31:17 -0600 Subject: [vtkusers] vtkPoints to vtkPolyData In-Reply-To: <2DDC0446EF4690489771E0A9491C6305028B016B@EX3.d.ethz.ch> References: <44f773f50902190646q6b8149f0pb5f982c088ad8426@mail.gmail.com> <2DDC0446EF4690489771E0A9491C6305028B016B@EX3.d.ethz.ch> Message-ID: <3b626dd90902191031k3609074cg84af7cf3581efbf6@mail.gmail.com> In order to "see" the points in ParaView, you would need to create a vtkVertex cell for each point. In VTK, a "vertex" is a cell (and will be visible in ParaView); a "point" is just an (x, y, z) coordinate. - Amy On Thu, Feb 19, 2009 at 9:35 AM, Syrkina Ekaterina wrote: > Hello, > > I recently needed to display point cloud in paraview and "converted" > vtkPoints to vtkPolyData this way: > > vtkPolyData *data = vtkPolyData::New(); > vtkPoints *points = vtkPoints::New(); > // some code to read points from text file into vtkPoints object // > data->SetPoints(points); > > It didn't solve my problem, since paraview displays only points > associated by geometry, so one has to define faces or smth else. But > maybe it solves your problem. > > Best, > Katya > > > -----Original Message----- > > From: vtkusers-bounces at vtk.org > > [mailto:vtkusers-bounces at vtk.org] On Behalf Of kent williams > > Sent: Thursday, February 19, 2009 3:47 PM > > To: VTK users group > > Subject: Re: [vtkusers] vtkPoints to vtkPolyData > > > > I'm not sure what you're asking. Are you saying you have a set of 3D > > points, and want to convert them into a polygon? Then Dean's function > > works just fine. It assumes that your points are ordered, and it's up > > to you to make sure they're co-planar, but that function is 3D. > > > > If you're doing something more complicated, you need to be more > > specific about what you're trying. > > > > On Thu, Feb 19, 2009 at 6:10 AM, Daniel Meier > > wrote: > > > Hi all, > > > > > > I'm new to vtk. How can I convert vtkPoints to vtkPolydata. > > The points > > > represent an object in 3D. I have found > > ConvertPointSequenceToPolyData ( > > > > > http://www.vtk.org/pipermail/vtkusers/2007-November/093317.htm > > l ) from Dean > > > Inglis which works fine in 2D but how can this be done in 3D? > > > > > > Thanks for any suggestions, > > > > > > Daniel > > > ________________________________ > > > versendet mit www.oleco.de Mail - Anmeldung und Nutzung kostenlos! > > > Oleco www.netlcr.org - jetzt auch mit Spamschutz. > > > _______________________________________________ > > > Powered by www.kitware.com > > > > > > Visit other Kitware open-source projects at > > > http://www.kitware.com/opensource/opensource.html > > > > > > Please keep messages on-topic and check the VTK FAQ at: > > > http://www.vtk.org/Wiki/VTK_FAQ > > > > > > Follow this link to subscribe/unsubscribe: > > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amylists at gmail.com Thu Feb 19 13:39:02 2009 From: amylists at gmail.com (Amy Squillacote) Date: Thu, 19 Feb 2009 12:39:02 -0600 Subject: [vtkusers] link error of vtk application In-Reply-To: <499B2B10.9030301@cs.wm.edu> References: <499B2B10.9030301@cs.wm.edu> Message-ID: <3b626dd90902191039s4a8f8c0fv570256a0ab03d150@mail.gmail.com> Do you have code in your CMakeLists.txt file to find the vtkIO library? It looks like the code to do that is commented out (using "#"), unless you're doing it somewhere else in your CMakeLists.txt file that you didn't copy here. If the code to find the vtkIO library is there, is it set to the correct value when you run CMake? - Amy On Tue, Feb 17, 2009 at 3:24 PM, Yixun Liu wrote: > Hi, > I developed an application based on VTK. The CMakelist file is like the > following, > > #FIND_PACKAGE(VTK REQUIRED) > #INCLUDE(${VTK_USE_FILE}) > > ... > > TARGET_LINK_LIBRARIES(TetrahedrisationNG > Basics > Graphics2DNG > Graphics3DNG > vtkIO > vtkCommon > ) > > The error is > > /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld: > cannot find -lvtkIO > > Thanks. > > Yixun > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From enjoywm at cs.wm.edu Thu Feb 19 14:05:43 2009 From: enjoywm at cs.wm.edu (Yixun Liu) Date: Thu, 19 Feb 2009 14:05:43 -0500 Subject: [vtkusers] link error of vtk application In-Reply-To: <3b626dd90902191039s4a8f8c0fv570256a0ab03d150@mail.gmail.com> References: <499B2B10.9030301@cs.wm.edu> <3b626dd90902191039s4a8f8c0fv570256a0ab03d150@mail.gmail.com> Message-ID: <499DAD87.9070003@cs.wm.edu> Amy Squillacote wrote: > Do you have code in your CMakeLists.txt file to find the vtkIO > library? It looks like the code to do that is commented out (using > "#"), unless you're doing it somewhere else in your CMakeLists.txt > file that you didn't copy here. If the code to find the vtkIO library > is there, is it set to the correct value when you run CMake? > > - Amy > > On Tue, Feb 17, 2009 at 3:24 PM, Yixun Liu > wrote: > > Hi, > I developed an application based on VTK. The CMakelist file is > like the > following, > > #FIND_PACKAGE(VTK REQUIRED) > #INCLUDE(${VTK_USE_FILE}) > > ... > > TARGET_LINK_LIBRARIES(TetrahedrisationNG > Basics > Graphics2DNG > Graphics3DNG > vtkIO > vtkCommon > ) > > The error is > /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld: > cannot find -lvtkIO > > Thanks. > > Yixun > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > I add FIND_PACKAGE(VTK REQUIRED) INCLUDE(${VTK_USE_FILE}) in my CMakeList and also set the VTK path point to home/scratch//VTK/Build I don't know why it doesn't work. Thanks. From mweiss at cbs.mpg.de Thu Feb 19 14:29:15 2009 From: mweiss at cbs.mpg.de (Marcel Weiss) Date: Thu, 19 Feb 2009 20:29:15 +0100 (CET) Subject: [vtkusers] strange behavior of vtkClipPolyData ??? In-Reply-To: <10741365.712921234181393960.JavaMail.root@zimbra> Message-ID: <21991561.1014341235071755953.JavaMail.root@zimbra> as I could not get any anwser or remark on my problem, I want to raise it once more... I?m struggeling with a strange behavior of vtkClipPolyData which creates an enormous amount of new lines and cells when applied as shown below to a result of vtkStreamLine ... any ideas? .... I am using vtkStreamLine to trace streams through a 3D data field. The start points are given by a vtkPolyData object in the same space. So the number of streams created is identical to the number of points in the vtkPolyData. Each of the created streams consists of ~30 connected points. Everything fine so far. then I use vtkClipPolyData to clip those streams based on (other) scalar value. therefor I assign a scalar value for each of the points of every single stream and use the following code for clipping vtkClipPolyData* cutter = vtkClipPolyData :: New(); cutter-> SetInput(streams); cutter-> GenerateClipScalarsOff(); cutter-> SetValue(1.0); cutter-> UpdateInformation(); cutter-> Update(); this also works (some how), BUT: although vtkClipPolyData removes many of the streams points (as expected), it seems to create many new cell/lines. (see below) streamlining result has got: 12577845 points, 483730 cells, 0 verts, 483730 lines, 0 polys and 0 strips. cutting result has got: 9753382 points, 9268541 cells, 0 verts, 9268541 lines, 0 polys and 0 strips. even if some of the streams/line are clipped into two or more new lines, which should not happen (due to the way I write the scalars), the number of cells/lines/streams increases in a way I can?t understand ... thanks Marcel Weiss PhD student Department of Neurophysics Max Planck Institute for Human Cognitive and Brain Sciences From jtgiles at gmail.com Thu Feb 19 14:42:37 2009 From: jtgiles at gmail.com (Justin Giles) Date: Thu, 19 Feb 2009 13:42:37 -0600 Subject: [vtkusers] vtkQtChart? Message-ID: Has anyone successfully used the vtkQtChart stuff? What I have done is pull the code from VTK/GUISupport/Qt/Testing/Cxx/TestLineSeries.cxx and put it in my own Qt application. The first problem that occurs is that the compiler cannot find vtkQtChartExport.h. Turns out that wasn't installed in my vtk includes directory. So, I copied that over. Application compiles now, but when it tries to link it fails. Any insight in regards to this or the vtkQtChart stuff in general? I haven't seen hardly any examples or HOW-TOs dealing with this. Thanks, Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Feb 19 15:25:45 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 19 Feb 2009 15:25:45 -0500 Subject: [vtkusers] vtkPoints to vtkPolyData In-Reply-To: <3b626dd90902191031k3609074cg84af7cf3581efbf6@mail.gmail.com> References: <44f773f50902190646q6b8149f0pb5f982c088ad8426@mail.gmail.com> <2DDC0446EF4690489771E0A9491C6305028B016B@EX3.d.ethz.ch> <3b626dd90902191031k3609074cg84af7cf3581efbf6@mail.gmail.com> Message-ID: And one way to do that is to apply a glyph filter. On Thu, Feb 19, 2009 at 1:31 PM, Amy Squillacote wrote: > In order to "see" the points in ParaView, you would need to create a > vtkVertex cell for each point. In VTK, a "vertex" is a cell (and will be > visible in ParaView); a "point" is just an (x, y, z) coordinate. > > - Amy > > On Thu, Feb 19, 2009 at 9:35 AM, Syrkina Ekaterina wrote: >> >> Hello, >> >> I recently needed to display point cloud in paraview and "converted" >> vtkPoints to vtkPolyData this way: >> >> vtkPolyData *data = vtkPolyData::New(); >> vtkPoints *points = vtkPoints::New(); >> // some code to read points from text file into vtkPoints object // >> data->SetPoints(points); >> >> It didn't solve my problem, since paraview displays only points >> associated by geometry, so one has to define faces or smth else. But >> maybe it solves your problem. >> >> Best, >> Katya >> >> > -----Original Message----- >> > From: vtkusers-bounces at vtk.org >> > [mailto:vtkusers-bounces at vtk.org] On Behalf Of kent williams >> > Sent: Thursday, February 19, 2009 3:47 PM >> > To: VTK users group >> > Subject: Re: [vtkusers] vtkPoints to vtkPolyData >> > >> > I'm not sure what you're asking. Are you saying you have a set of 3D >> > points, and want to convert them into a polygon? Then Dean's function >> > works just fine. It assumes that your points are ordered, and it's up >> > to you to make sure they're co-planar, but that function is 3D. >> > >> > If you're doing something more complicated, you need to be more >> > specific about what you're trying. >> > >> > On Thu, Feb 19, 2009 at 6:10 AM, Daniel Meier >> > wrote: >> > > Hi all, >> > > >> > > I'm new to vtk. How can I convert vtkPoints to vtkPolydata. >> > The points >> > > represent an object in 3D. I have found >> > ConvertPointSequenceToPolyData ( >> > > >> > http://www.vtk.org/pipermail/vtkusers/2007-November/093317.htm >> > l ) from Dean >> > > Inglis which works fine in 2D but how can this be done in 3D? >> > > >> > > Thanks for any suggestions, >> > > >> > > Daniel >> > > ________________________________ >> > > versendet mit www.oleco.de Mail - Anmeldung und Nutzung kostenlos! >> > > Oleco www.netlcr.org - jetzt auch mit Spamschutz. >> > > _______________________________________________ >> > > Powered by www.kitware.com >> > > >> > > Visit other Kitware open-source projects at >> > > http://www.kitware.com/opensource/opensource.html >> > > >> > > Please keep messages on-topic and check the VTK FAQ at: >> > > http://www.vtk.org/Wiki/VTK_FAQ >> > > >> > > Follow this link to subscribe/unsubscribe: >> > > http://www.vtk.org/mailman/listinfo/vtkusers >> > > >> > > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://www.vtk.org/mailman/listinfo/vtkusers >> > >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From karthik.krishnan at kitware.com Thu Feb 19 17:11:26 2009 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Thu, 19 Feb 2009 17:11:26 -0500 Subject: [vtkusers] SeedWidget with ImageViewer2 to get 3D locations In-Reply-To: <44f773f50902190707r413e1e93xf8652529e19cac3c@mail.gmail.com> References: <44f773f50902190707r413e1e93xf8652529e19cac3c@mail.gmail.com> Message-ID: <9ddb27260902191411p378a3c1aoe5534b67d4430f2f@mail.gmail.com> Mark: This depends on the representation for the handles that you are passing onto the seed widget. As you may be aware, we have both 2D and 3D representations. 2D representations are essentially vtkActor2D's and exist on the overlay plane and will be visible across all slices. My guess is that this is what you are using. Putting it in code.... The following will create seeds that lie on the overlay plane with a behaviour you describe.. vtkSeedRepresentation *rep = vtkSeedRepresentation::New(); vtkPointHandleRepresentation2D *handle = vtkPointHandleRepresentation2D::New(); rep->SetHandleRepresentation(handle); The following will create seeds that lies in world coordinates. vtkSeedRepresentation *rep = vtkSeedRepresentation::New(); vtkPointHandleRepresentation3D *handle = vtkPointHandleRepresentation3D::New(); rep->SetHandleRepresentation(handle); On Thu, Feb 19, 2009 at 10:07 AM, kent williams wrote: > I suspect that while it reports 3D points, they're really 2D, and you > have to fill in the Z coordinate. You should know this anyway since > you use the sliderWidget to scroll through the volume. > > I'm curious about your application. We're going to do the same thing > for picking points of interest in a volume. Another developer in our > team is working on that, so I don't have hands on experience with the > vtkSeedWidget yet, but I suspect that it has the same idiosyncrasy > with respect to the coordinate system in which it reports points. It > has methods that have 'WorldCoordinates' in the name, but in fact, the > X,Y,Z values are permuted such that X and Y are X and Y in the viewing > plane, and Z is the direction perpendicular to the viewing plane. > > We use vtkinria3d's synchronized views instead of vtkImageViewer2, and > I don't know if the idea of coordinate systems in 2D views are exactly > the same, but we additionally have to negate the Y coordinate in Axial > views. So if your point values look upside down, that's one thing to > consider ;-) > > On Thu, Feb 19, 2009 at 7:06 AM, Mark Gooding > wrote: > > Hi there, > > > > I'm using an ImageViewer2 with a sliderWidget to scroll through a > > volume image (following an example I found in the archives when > > searching for a solution to this problem). I am also using a > > SeedWidget to select points from the current slice. The display XY > > co-ordinate seems to be picked correctly, however the slice selected > > by the seed widget is not the current slice, but appears to be fixed. > > Has anyone done something like this? Some pointers would be helpful. > > > > thanks, > > > > mark > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Karthik Krishnan R&D Engineer, Kitware Inc. Ph: 518 371 3971 x119 Fax: 518 371 3971 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.gooding at gmail.com Thu Feb 19 17:18:41 2009 From: mark.gooding at gmail.com (Mark Gooding) Date: Thu, 19 Feb 2009 22:18:41 +0000 Subject: [vtkusers] SeedWidget with ImageViewer2 to get 3D locations In-Reply-To: <9ddb27260902191411p378a3c1aoe5534b67d4430f2f@mail.gmail.com> References: <44f773f50902190707r413e1e93xf8652529e19cac3c@mail.gmail.com> <9ddb27260902191411p378a3c1aoe5534b67d4430f2f@mail.gmail.com> Message-ID: Thanks, but I'd noticed :-). I have been using the 3D representation. Will be replying to Kent's queries tomorrow when I'm at work. Mark 2009/2/19 Karthik Krishnan : > Mark: > > This depends on the representation for the handles that you > are passing onto the seed widget. As you may be aware, we > have both 2D and 3D representations. 2D representations are > essentially vtkActor2D's and exist on the overlay plane and will > be visible across all slices. My guess is that this is what you are using. > > Putting it in code.... > > The following will create seeds that lie on the overlay plane with > a behaviour you describe.. > > vtkSeedRepresentation *rep = vtkSeedRepresentation::New(); > vtkPointHandleRepresentation2D *handle = > vtkPointHandleRepresentation2D::New(); > rep->SetHandleRepresentation(handle); > > The following will create seeds that lies in world coordinates. > > vtkSeedRepresentation *rep = vtkSeedRepresentation::New(); > vtkPointHandleRepresentation3D *handle = > vtkPointHandleRepresentation3D::New(); > rep->SetHandleRepresentation(handle); > > > > > > On Thu, Feb 19, 2009 at 10:07 AM, kent williams > wrote: >> >> I suspect that while it reports 3D points, they're really 2D, and you >> have to fill in the Z coordinate. You should know this anyway since >> you use the sliderWidget to scroll through the volume. >> >> I'm curious about your application. We're going to do the same thing >> for picking points of interest in a volume. Another developer in our >> team is working on that, so I don't have hands on experience with the >> vtkSeedWidget yet, but I suspect that it has the same idiosyncrasy >> with respect to the coordinate system in which it reports points. It >> has methods that have 'WorldCoordinates' in the name, but in fact, the >> X,Y,Z values are permuted such that X and Y are X and Y in the viewing >> plane, and Z is the direction perpendicular to the viewing plane. >> >> We use vtkinria3d's synchronized views instead of vtkImageViewer2, and >> I don't know if the idea of coordinate systems in 2D views are exactly >> the same, but we additionally have to negate the Y coordinate in Axial >> views. So if your point values look upside down, that's one thing to >> consider ;-) >> >> On Thu, Feb 19, 2009 at 7:06 AM, Mark Gooding >> wrote: >> > Hi there, >> > >> > I'm using an ImageViewer2 with a sliderWidget to scroll through a >> > volume image (following an example I found in the archives when >> > searching for a solution to this problem). I am also using a >> > SeedWidget to select points from the current slice. The display XY >> > co-ordinate seems to be picked correctly, however the slice selected >> > by the seed widget is not the current slice, but appears to be fixed. >> > Has anyone done something like this? Some pointers would be helpful. >> > >> > thanks, >> > >> > mark >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://www.vtk.org/mailman/listinfo/vtkusers >> > >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers > > > > -- > Karthik Krishnan > R&D Engineer, > Kitware Inc. > Ph: 518 371 3971 x119 > Fax: 518 371 3971 > From tracy.hu at yahoo.com Thu Feb 19 18:53:22 2009 From: tracy.hu at yahoo.com (Tracy Hu) Date: Thu, 19 Feb 2009 15:53:22 -0800 (PST) Subject: [vtkusers] creating a vtkTexture from a picture of 1MB size increases the memory by 30MB. Message-ID: <936147.9828.qm@web45115.mail.sp1.yahoo.com> Is this normal or I did something wrong? a vtkTexture made from a picture(1MB) can take 30MB memory? thanks a lot Tracy -------------- next part -------------- An HTML attachment was scrubbed... URL: From arturo_caissut at tiscali.it Thu Feb 19 19:31:39 2009 From: arturo_caissut at tiscali.it (Arturo Caissut) Date: Fri, 20 Feb 2009 01:31:39 +0100 Subject: [vtkusers] Reorder PolyData points Message-ID: <499DF9EB.1040807@tiscali.it> Hi everyone, I'd like to change points order on a PolyData that comes from a vtkContourFilter. Is it possible to give them a kind of "line following" order? Maybe someone have had the same need? Thanks, Arturo From dave.demarle at kitware.com Thu Feb 19 19:52:34 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 19 Feb 2009 19:52:34 -0500 Subject: [vtkusers] Reorder PolyData points In-Reply-To: <499DF9EB.1040807@tiscali.it> References: <499DF9EB.1040807@tiscali.it> Message-ID: Try using vtkStripper http://www.vtk.org/doc/release/5.2/html/a01310.html On Thu, Feb 19, 2009 at 7:31 PM, Arturo Caissut wrote: > Hi everyone, > I'd like to change points order on a PolyData that comes from a > vtkContourFilter. Is it possible to give them a kind of "line following" > order? > Maybe someone have had the same need? > > Thanks, > Arturo > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From dean.inglis at sympatico.ca Thu Feb 19 20:56:14 2009 From: dean.inglis at sympatico.ca (Dean Inglis) Date: Thu, 19 Feb 2009 20:56:14 -0500 Subject: [vtkusers] ROI using vtkImageTracerWidget Message-ID: Sercani: You can get the vtkPolyData of the vtkImageTracerWidget and get its bounds using, for example: vtkPolyData poly = vtkPolyData::New(); widget->GetPath( poly ); double* bounds = poly->GetBounds(); from the bounds and knowing the underlying vtkImageActor's input (vtkImageData) origin and spacing, you can calculate the enclosed region's extents and feed those into a vtkImageClip to clip the vtkImageActor's input: double* origin = imageActor->GetInput()->GetOrigin(); double* spacing = imageActor->GetInput()->GetSpacing(); int xmin = (int)((bounds[0] - origin[0])/spacing[0] + 0.5); int xmax = (int)((bounds[1] - origin[0])/spacing[0] + 0.5); int ymin = (int)((bounds[2] - origin[1])/spacing[1] + 0.5); int ymax = (int)((bounds[3] - origin[1])/spacing[1] + 0.5); etc., etc. vtkImageClip clip = vtkImageClip::New(); clip->SetOutputWholeExtent( xmin,xmax,ymin,ymax,zmin,zmax); clip->SetInput(imageActor->GetInput()); Dean >Isn't there anyone who did this before? I have implemented >vtkImageTracerWidget example code to my project but i couldn't get the image >region inside this closed spline. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dean Inglis, PhD ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ Center for Appendicular ~~~~~ Magnetic Resonance Imaging Studies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 610 - 25 Charlton Ave. E. Hamilton, Ontario, L8N 1Y2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Assistant Professor (Adjunct) Department of Civil Engineering McMaster University Hamilton, Ontario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Software Demos: http://www.youtube.com/watch?v=_zYNtHC9-0s -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Feb 19 23:30:32 2009 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 19 Feb 2009 23:30:32 -0500 Subject: [vtkusers] strange behavior of vtkClipPolyData ??? In-Reply-To: <21991561.1014341235071755953.JavaMail.root@zimbra> References: <10741365.712921234181393960.JavaMail.root@zimbra> <21991561.1014341235071755953.JavaMail.root@zimbra> Message-ID: <4db4735c0902192030p45ea12f7u80964ed3e18ac666@mail.gmail.com> In vtkPolyLine::Clip, each segment of the polyline is clipped independently. So a polyline with 30 segments would be split into 30 lines as it is clipped. To reassemble the lines into polylines, you can apply the vtkStripper to the output of the clipper. Bill On Thu, Feb 19, 2009 at 2:29 PM, Marcel Weiss wrote: > as I could not get any anwser or remark on my problem, I want to raise it once more... > > I?m struggeling with a strange behavior of vtkClipPolyData which creates an enormous amount of new lines and cells when applied as shown below to a result of vtkStreamLine ... > > any ideas? > > .... > > I am using vtkStreamLine to trace streams through a 3D data field. > The start points are given by a vtkPolyData object in the same space. > So the number of streams created is identical to the number of points in the vtkPolyData. Each of the created streams consists of ~30 connected points. > > Everything fine so far. > > then I use vtkClipPolyData to clip those streams based on (other) scalar value. > therefor I assign a scalar value for each of the points of every single stream and use the following code for clipping > > vtkClipPolyData* cutter = vtkClipPolyData :: New(); > cutter-> SetInput(streams); > cutter-> GenerateClipScalarsOff(); > cutter-> SetValue(1.0); > cutter-> UpdateInformation(); > cutter-> Update(); > > this also works (some how), BUT: > although vtkClipPolyData removes many of the streams points (as expected), it seems to create many new cell/lines. (see below) > > streamlining result has got: > 12577845 points, 483730 cells, 0 verts, 483730 lines, 0 polys and 0 strips. > > cutting result has got: > 9753382 points, 9268541 cells, 0 verts, 9268541 lines, 0 polys and 0 strips. > > even if some of the streams/line are clipped into two or more new lines, which should not happen (due to the way I write the scalars), the number of cells/lines/streams increases in a way I can?t understand ... > > thanks > > Marcel Weiss > PhD student > Department of Neurophysics > Max Planck Institute for Human Cognitive and Brain Sciences > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From liuwenqing306 at gmail.com Fri Feb 20 02:09:43 2009 From: liuwenqing306 at gmail.com (liu) Date: Fri, 20 Feb 2009 15:09:43 +0800 Subject: [vtkusers] how to rendering only points? Message-ID: <000d01c9932a$39683550$1a01a8c0@X6X8E1B5440E0D> The vtkpolydata can represent lines,polygons.But if I just want to rendering the discret 3D points without the links or connections between them,what classes of VTK can I make use of? -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangjunchen at gmail.com Fri Feb 20 02:16:13 2009 From: wangjunchen at gmail.com (=?ISO-2022-JP?B?GyRCMiY3Lz9DGyhC?=) Date: Fri, 20 Feb 2009 16:16:13 +0900 Subject: [vtkusers] how to rendering only points? In-Reply-To: <000d01c9932a$39683550$1a01a8c0@X6X8E1B5440E0D> References: <000d01c9932a$39683550$1a01a8c0@X6X8E1B5440E0D> Message-ID: <2a2da7df0902192316l7f703336j584dc567139bd89b@mail.gmail.com> hi liu, vtkPolyData will also be fine to achieve your goal. just use vtkPolyData::SetVerts(...) to set the discrete 3d points. 2009/2/20 liu > The vtkpolydata can represent lines,polygons.But if I just want to > rendering the discret 3D points without the links or connections between > them,what classes of VTK can I make use of? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- ??? -------------- next part -------------- An HTML attachment was scrubbed... URL: From blloyd at vision.ee.ethz.ch Fri Feb 20 02:51:19 2009 From: blloyd at vision.ee.ethz.ch (Bryn Lloyd) Date: Fri, 20 Feb 2009 08:51:19 +0100 Subject: [vtkusers] SeedWidget with ImageViewer2 to get 3D locations In-Reply-To: <44f773f50902190707r413e1e93xf8652529e19cac3c@mail.gmail.com> References: <44f773f50902190707r413e1e93xf8652529e19cac3c@mail.gmail.com> Message-ID: <499E60F7.5010104@vision.ee.ethz.ch> I have written a simple viewer which inherits from vtkImageViewer2 and has picking added as well as an observer to move between slices. You can have a look at the code here: http://people.ee.ethz.ch/~blloyd/ImageViewer/ You can switch picking On and Off by pressing 's' (for seed). Use the arrows (Up/Down) >,< for scrolling through slices. -Bryn kent williams wrote: > I suspect that while it reports 3D points, they're really 2D, and you > have to fill in the Z coordinate. You should know this anyway since > you use the sliderWidget to scroll through the volume. > > I'm curious about your application. We're going to do the same thing > for picking points of interest in a volume. Another developer in our > team is working on that, so I don't have hands on experience with the > vtkSeedWidget yet, but I suspect that it has the same idiosyncrasy > with respect to the coordinate system in which it reports points. It > has methods that have 'WorldCoordinates' in the name, but in fact, the > X,Y,Z values are permuted such that X and Y are X and Y in the viewing > plane, and Z is the direction perpendicular to the viewing plane. > > We use vtkinria3d's synchronized views instead of vtkImageViewer2, and > I don't know if the idea of coordinate systems in 2D views are exactly > the same, but we additionally have to negate the Y coordinate in Axial > views. So if your point values look upside down, that's one thing to > consider ;-) > > On Thu, Feb 19, 2009 at 7:06 AM, Mark Gooding wrote: >> Hi there, >> >> I'm using an ImageViewer2 with a sliderWidget to scroll through a >> volume image (following an example I found in the archives when >> searching for a solution to this problem). I am also using a >> SeedWidget to select points from the current slice. The display XY >> co-ordinate seems to be picked correctly, however the slice selected >> by the seed widget is not the current slice, but appears to be fixed. >> Has anyone done something like this? Some pointers would be helpful. >> >> thanks, >> >> mark >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- ------------------------------------------------- Bryn Lloyd Computer Vision Laboratory ETH Z?rich, Sternwartstrasse 7 CH - 8092 Z?rich, Switzerland Tel: +41 44 63 26668 Fax: +41 44 63 21199 ------------------------------------------------- From syrkinae at ethz.ch Fri Feb 20 04:19:25 2009 From: syrkinae at ethz.ch (Syrkina Ekaterina) Date: Fri, 20 Feb 2009 10:19:25 +0100 Subject: [vtkusers] vtkPoints to vtkPolyData In-Reply-To: Message-ID: <2DDC0446EF4690489771E0A9491C6305028B0198@EX3.d.ethz.ch> thanks for the answers! I also found some old vtk-mail with a program to create vtkPolyData (to visualize) from a set of point coordinates: http://www.nabble.com/VTK-Point-Cloud-td14706577.html best, katya > -----Original Message----- > From: David E DeMarle [mailto:dave.demarle at kitware.com] > Sent: Thursday, February 19, 2009 9:26 PM > To: Amy Squillacote > Cc: Syrkina Ekaterina; VTK users group > Subject: Re: [vtkusers] vtkPoints to vtkPolyData > > And one way to do that is to apply a glyph filter. > > On Thu, Feb 19, 2009 at 1:31 PM, Amy Squillacote > wrote: > > In order to "see" the points in ParaView, you would need to create a > > vtkVertex cell for each point. In VTK, a "vertex" is a cell > (and will be > > visible in ParaView); a "point" is just an (x, y, z) coordinate. > > > > - Amy > > > > On Thu, Feb 19, 2009 at 9:35 AM, Syrkina Ekaterina > wrote: > >> > >> Hello, > >> > >> I recently needed to display point cloud in paraview and > "converted" > >> vtkPoints to vtkPolyData this way: > >> > >> vtkPolyData *data = vtkPolyData::New(); > >> vtkPoints *points = vtkPoints::New(); > >> // some code to read points from text file into vtkPoints object // > >> data->SetPoints(points); > >> > >> It didn't solve my problem, since paraview displays only points > >> associated by geometry, so one has to define faces or smth > else. But > >> maybe it solves your problem. > >> > >> Best, > >> Katya > >> > >> > -----Original Message----- > >> > From: vtkusers-bounces at vtk.org > >> > [mailto:vtkusers-bounces at vtk.org] On Behalf Of kent williams > >> > Sent: Thursday, February 19, 2009 3:47 PM > >> > To: VTK users group > >> > Subject: Re: [vtkusers] vtkPoints to vtkPolyData > >> > > >> > I'm not sure what you're asking. Are you saying you > have a set of 3D > >> > points, and want to convert them into a polygon? Then > Dean's function > >> > works just fine. It assumes that your points are > ordered, and it's up > >> > to you to make sure they're co-planar, but that function is 3D. > >> > > >> > If you're doing something more complicated, you need to be more > >> > specific about what you're trying. > >> > > >> > On Thu, Feb 19, 2009 at 6:10 AM, Daniel Meier > >> > wrote: > >> > > Hi all, > >> > > > >> > > I'm new to vtk. How can I convert vtkPoints to vtkPolydata. > >> > The points > >> > > represent an object in 3D. I have found > >> > ConvertPointSequenceToPolyData ( > >> > > > >> > http://www.vtk.org/pipermail/vtkusers/2007-November/093317.htm > >> > l ) from Dean > >> > > Inglis which works fine in 2D but how can this be done in 3D? > >> > > > >> > > Thanks for any suggestions, > >> > > > >> > > Daniel > >> > > ________________________________ > >> > > versendet mit www.oleco.de Mail - Anmeldung und > Nutzung kostenlos! > >> > > Oleco www.netlcr.org - jetzt auch mit Spamschutz. > >> > > _______________________________________________ > >> > > Powered by www.kitware.com > >> > > > >> > > Visit other Kitware open-source projects at > >> > > http://www.kitware.com/opensource/opensource.html > >> > > > >> > > Please keep messages on-topic and check the VTK FAQ at: > >> > > http://www.vtk.org/Wiki/VTK_FAQ > >> > > > >> > > Follow this link to subscribe/unsubscribe: > >> > > http://www.vtk.org/mailman/listinfo/vtkusers > >> > > > >> > > > >> > _______________________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Please keep messages on-topic and check the VTK FAQ at: > >> > http://www.vtk.org/Wiki/VTK_FAQ > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://www.vtk.org/mailman/listinfo/vtkusers > >> > > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > > -- > David E DeMarle > Kitware, Inc. > R&D Engineer > 28 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-371-3971 x109 > From mark.gooding at gmail.com Fri Feb 20 05:51:56 2009 From: mark.gooding at gmail.com (Mark Gooding) Date: Fri, 20 Feb 2009 10:51:56 +0000 Subject: [vtkusers] SeedWidget with ImageViewer2 to get 3D locations In-Reply-To: <44f773f50902190707r413e1e93xf8652529e19cac3c@mail.gmail.com> References: <44f773f50902190707r413e1e93xf8652529e19cac3c@mail.gmail.com> Message-ID: 2009/2/19 kent williams : > I suspect that while it reports 3D points, they're really 2D, and you > have to fill in the Z coordinate. You should know this anyway since > you use the sliderWidget to scroll through the volume. ah yes... should have done this first... but vtkSeedWidget::AddPointAction sets the display z coordinate to 0. I guess I'll just have to override that. > I'm curious about your application. At the moment I'm planning on using it for picking a number of corresponding points in a bunch of images to initialise a registration. But one of my colleagues will also be needing it for seeding 3D region growing / graph cuts. thanks for your help Mark From dominik at itis.ethz.ch Fri Feb 20 07:08:44 2009 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Fri, 20 Feb 2009 13:08:44 +0100 Subject: [vtkusers] python + custom time-aware reader + demand driven pipeline In-Reply-To: References: <44f773f50902190707r413e1e93xf8652529e19cac3c@mail.gmail.com> Message-ID: <499E9D4C.2020706@itis.ethz.ch> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Does anybody have an example how to request a specific timestep in my time-aware reader using python? I am trying: reader = vtkHDF5UnstructuredGridReader() ... executive = reader.GetExecutive() executive.SetUpdateTimeSteps(0,0.0) and am getting an error: AttributeError: SetUpdateTimeSteps According to the docu the call to SetUpdateTimeSteps is fine... - -- Dominik Szczerba, Ph.D. Computational Physics Group IT'IS Foundation for Research http://www.itis.ethz.ch -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkmenUwACgkQ/EBMh9bUuzIoogCgxp8rsV5j1NON1Xekge+SLoju nA0An0rvDLLlACk7CBedjUWRYVhrfxkl =9EvP -----END PGP SIGNATURE----- From jtgiles at gmail.com Fri Feb 20 09:22:06 2009 From: jtgiles at gmail.com (Justin Giles) Date: Fri, 20 Feb 2009 08:22:06 -0600 Subject: [vtkusers] 2D x-y plots Message-ID: Are there any good, full-featured 2D x-y plot tutorials, examples, how-to's out there? I've looked at the limited examples in the source code, but I find them lacking in substance. Thanks, Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From louxkr at gmail.com Fri Feb 20 09:38:40 2009 From: louxkr at gmail.com (Kerry Loux) Date: Fri, 20 Feb 2009 09:38:40 -0500 Subject: [vtkusers] 2D x-y plots In-Reply-To: References: Message-ID: <65c344fe0902200638n2fecd784ud4dfb4649012efbd@mail.gmail.com> I found this link useful when I started using 2D plots: http://www.vtk.org/pipermail/vtkusers/2006-June/085617.html Is there something you're looking for in particular? -Kerry On Fri, Feb 20, 2009 at 9:22 AM, Justin Giles wrote: > Are there any good, full-featured 2D x-y plot tutorials, examples, how-to's > out there? I've looked at the limited examples in the source code, but I > find them lacking in substance. > > Thanks, > > Justin > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Fri Feb 20 10:51:55 2009 From: daviddoria at gmail.com (David Doria) Date: Fri, 20 Feb 2009 10:51:55 -0500 Subject: [vtkusers] Use Mesh Subdivision on VTP files Message-ID: I have a polydata with a bunch of vtkTriangles. I want to smooth the mesh, so in paraview I tried the subdivide filter, but it produces absolutely ridiculous triangles. So I thought this meant the connectivity information was wrong? So I tried the TriangleStrips filter and then the subdivide filter, but now the subdivide filter complains that there are no triangles. I tried triangulate and then subdivide and I get the same mess as in the first case. In all cases, the LoopSubdivision filter simply crashes. There is clearly still something wrong with my understanding of these file formats and which filters can be used on which types of files. Can anyone clarify this for me? Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.spitzlinger at synedra.com Fri Feb 20 10:52:34 2009 From: p.spitzlinger at synedra.com (Philip Spitzlinger) Date: Fri, 20 Feb 2009 16:52:34 +0100 Subject: [vtkusers] Calculate PixelSpacing for Output of vtkImageReslice Message-ID: <499ED1C2.3070306@synedra.com> Hi Everybody, I am using vtkImageReslice to create sliced images out of a volume. I am setting the ResliceAxesOrigin and the ResliceAxesDirectionCosines to create a rotated slice. What I would like to know is the pixel spacing that the output image/volume will have before the reslicing operation. One way would be to create a temporary vtkImageData and read the needed information out of it. vtkImageData* temp = reslicer->GetOutput(); temp->Update(); temp->GetSpacing( x, y, z ) As this is higly inefficient, there must be a way to calculate the resulting spacing ahead, as vtkImageReslice must calculate it in some way. In the documentation is written, that the output spacing is the input spacing permuted by the ResliceAxes. What does permuted in this context mean? How can I use this information to calculate the output spacing. Thanks in advance for any suggestions or hints, Philip From arnaldo.fisica at gmail.com Fri Feb 20 13:34:52 2009 From: arnaldo.fisica at gmail.com (=?ISO-8859-1?Q?Arnaldo_Luis_Lixandr=E3o_Filho?=) Date: Fri, 20 Feb 2009 15:34:52 -0300 Subject: [vtkusers] VTK running OpenGL commands urgent HELP Message-ID: <5c1bc630902201034h38454134ndf24030ce756086e@mail.gmail.com> Hi, I want to execute the follow OpenGL commands in VTK if (bShaded) { glBegin(GL_TRIANGLES); for (int i=0; i From parya.momayyezsiahkal at mail.mcgill.ca Fri Feb 20 15:11:24 2009 From: parya.momayyezsiahkal at mail.mcgill.ca (Parya Mamayyez Siahkal) Date: Fri, 20 Feb 2009 15:11:24 -0500 Subject: [vtkusers] libvtkfreetype.so Message-ID: <499F0E6C.7090201@mail.mcgill.ca> Hello all, I am trying to run an executable which has been built on Ubuntu 8.04 with VTK 5.02 andI don't have access to the source code of the program. Running the executable gives me the following error: error while loading shared libraries: libvtkfreetype.so.5.0: cannot open shared object file: No such file or directory and I am not able to find the missing library. Has anyone encountered this problem before? Thanks, Parya From tracy.hu at yahoo.com Fri Feb 20 15:16:36 2009 From: tracy.hu at yahoo.com (Tracy Hu) Date: Fri, 20 Feb 2009 12:16:36 -0800 (PST) Subject: [vtkusers] creating a texture costs extra 30MB memory, pls advise me Message-ID: <988647.35489.qm@web45103.mail.sp1.yahoo.com> I wrote simple code as following to decide how much memory a vtkTexture would result. without using texture (by commenting out the line "actor->SetTexture(pTexture)" ), the process takes 74MB memory, using texture(by uncommenting the line "actor->SetTexture(pTexture)" ), the process takes 105MB memory. the dimension of picture FOREST011.jpg is 11083 X 823, and takes 1,015KB Can somebody give me any idea what's going on, or how to avoid this memory expense? thanks a lot Tracy int main_vtk(int argc, char* argv[]) { ??? vtkJPEGReader* pJPEGReader = vtkJPEGReader::New(); ??? ??? pJPEGReader->SetFileName("D:\\FOREST011.jpg"); ??? ??? pJPEGReader->ReleaseDataFlagOn(); ??? vtkTexture* pTexture = vtkTexture::New(); ??? ??? pTexture->SetInputConnection(pJPEGReader->GetOutputPort()); ??? ??? pTexture->InterpolateOn(); ??? ??? pTexture->ReleaseDataFlagOn(); ??? pJPEGReader->Delete(); ??? vtkSphereSource *sphere = vtkSphereSource::New(); ??? vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); ??? ??? mapper->SetInputConnection(sphere->GetOutputPort()); ??? ??? mapper->ScalarVisibilityOff(); ??? vtkActor *actor = vtkActor::New(); ??? ??? actor->SetMapper(mapper); ??? ??? actor->GetProperty()->SetColor(0.0, 0.0, 1.0); ??? ??? actor->SetTexture(pTexture); ??? ??? ??? vtkRenderer* ren = vtkRenderer::New(); ??? ??? ren->SetBackground(1, 1, 1); ??? ??? ren->AddActor(actor); ??? vtkRenderWindow* renWin = vtkRenderWindow::New(); ??? ??? renWin->AddRenderer(ren); ??? vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); ??? ??? iren->SetRenderWindow(renWin); ??? vtkInteractorStyleTrackballCamera *style = vtkInteractorStyleTrackballCamera::New(); ??? ??? iren->SetInteractorStyle(style); ??? ??? renWin->SetSize(600,600); ??? renWin->SetPosition(600, 100); ??? renWin->Render(); ??? iren->Initialize(); ??? iren->Start(); ??? ??? return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.bertel at kitware.com Fri Feb 20 15:25:53 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Fri, 20 Feb 2009 15:25:53 -0500 Subject: [vtkusers] creating a texture costs extra 30MB memory, pls advise me In-Reply-To: <988647.35489.qm@web45103.mail.sp1.yahoo.com> References: <988647.35489.qm@web45103.mail.sp1.yahoo.com> Message-ID: Assuming your image is one component and a component takes one byte: 11083x823/1024/1024=8.7MB. If you have three components (RGB), this is 26.1MB (close to 30MB). So, I guess your 1015KB is actually the size of the compressed jpg file... On Fri, Feb 20, 2009 at 3:16 PM, Tracy Hu wrote: > I wrote simple code as following to decide how much memory a vtkTexture > would result. > without using texture (by commenting out the line > "actor->SetTexture(pTexture)" ), the process takes 74MB memory, > using texture(by uncommenting the line "actor->SetTexture(pTexture)" ), the > process takes 105MB memory. > the dimension of picture FOREST011.jpg is 11083 X 823, and takes 1,015KB > > Can somebody give me any idea what's going on, or how to avoid this memory > expense? > > thanks a lot > Tracy > > int main_vtk(int argc, char* argv[]) > { > vtkJPEGReader* pJPEGReader = vtkJPEGReader::New(); > pJPEGReader->SetFileName("D:\\FOREST011.jpg"); > pJPEGReader->ReleaseDataFlagOn(); > vtkTexture* pTexture = vtkTexture::New(); > pTexture->SetInputConnection(pJPEGReader->GetOutputPort()); > pTexture->InterpolateOn(); > pTexture->ReleaseDataFlagOn(); > pJPEGReader->Delete(); > > vtkSphereSource *sphere = vtkSphereSource::New(); > vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); > mapper->SetInputConnection(sphere->GetOutputPort()); > mapper->ScalarVisibilityOff(); > vtkActor *actor = vtkActor::New(); > actor->SetMapper(mapper); > actor->GetProperty()->SetColor(0.0, 0.0, 1.0); > actor->SetTexture(pTexture); > > vtkRenderer* ren = vtkRenderer::New(); > ren->SetBackground(1, 1, 1); > ren->AddActor(actor); > > vtkRenderWindow* renWin = vtkRenderWindow::New(); > renWin->AddRenderer(ren); > > vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > vtkInteractorStyleTrackballCamera *style = > vtkInteractorStyleTrackballCamera::New(); > iren->SetInteractorStyle(style); > > renWin->SetSize(600,600); > renWin->SetPosition(600, 100); > renWin->Render(); > > iren->Initialize(); > iren->Start(); > > return 0; > } > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From tracy.hu at yahoo.com Fri Feb 20 23:28:44 2009 From: tracy.hu at yahoo.com (Tracy Hu) Date: Fri, 20 Feb 2009 20:28:44 -0800 (PST) Subject: [vtkusers] creating a texture costs extra 30MB memory, Message-ID: <234724.30653.qm@web45114.mail.sp1.yahoo.com> thanks a lot for help. But is there anyway at all to use the same picture for texture, but reduce the memory cost? perhaps at the cost of slower rendering? ? thanks tracy Assuming your image is one component and a component takes one byte: 11083x823/1024/1024=8.7MB. If you have three components (RGB), this is 26.1MB (close to 30MB). So, I guess your 1015KB is actually the size of the compressed jpg file... On Fri, Feb 20, 2009 at 3:16 PM, Tracy Hu wrote: > I wrote simple code as following to decide how much memory a vtkTexture > would result. > without using texture (by commenting out the line > "actor->SetTexture(pTexture)" ), the process takes 74MB memory, > using texture(by uncommenting the line "actor->SetTexture(pTexture)" ), the > process takes 105MB memory. > the dimension of picture FOREST011.jpg is 11083 X 823, and takes 1,015KB > > Can somebody give me any idea what's going on, or how to avoid this memory > expense? > > thanks a lot > Tracy > > int main_vtk(int argc, char* argv[]) > { > vtkJPEGReader* pJPEGReader = vtkJPEGReader::New(); > pJPEGReader->SetFileName("D:\\FOREST011.jpg"); > pJPEGReader->ReleaseDataFlagOn(); > vtkTexture* pTexture = vtkTexture::New(); > pTexture->SetInputConnection(pJPEGReader->GetOutputPort()); > pTexture->InterpolateOn(); > pTexture->ReleaseDataFlagOn(); > pJPEGReader->Delete(); > > vtkSphereSource *sphere = vtkSphereSource::New(); > vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); > mapper->SetInputConnection(sphere->GetOutputPort()); > mapper->ScalarVisibilityOff(); > vtkActor *actor = vtkActor::New(); > actor->SetMapper(mapper); > actor->GetProperty()->SetColor(0.0, 0.0, 1.0); > actor->SetTexture(pTexture); > > vtkRenderer* ren = vtkRenderer::New(); > ren->SetBackground(1, 1, 1); > ren->AddActor(actor); > > vtkRenderWindow* renWin = vtkRenderWindow::New(); > renWin->AddRenderer(ren); > > vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > vtkInteractorStyleTrackballCamera *style = > vtkInteractorStyleTrackballCamera::New(); > iren->SetInteractorStyle(style); > > renWin->SetSize(600,600); > renWin->SetPosition(600, 100); > renWin->Render(); > > iren->Initialize(); > iren->Start(); > > return 0; > } > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.mutka at fer.hr Sat Feb 21 07:24:14 2009 From: alan.mutka at fer.hr (Alan Mutka) Date: Sat, 21 Feb 2009 13:24:14 +0100 Subject: [vtkusers] Blocking 'Q' and 'E' keys Message-ID: <499FF26E.204@fer.hr> I have problems with blocking keys Q and E witch are shutting down visualization. I have tried adding Observers to keys, setting ExitMethod but without success. Please help if you had better luck and managed to find solution! Thank you! From mathieu.malaterre at gmail.com Sat Feb 21 07:27:32 2009 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Sat, 21 Feb 2009 13:27:32 +0100 Subject: [vtkusers] libvtkfreetype.so In-Reply-To: <499F0E6C.7090201@mail.mcgill.ca> References: <499F0E6C.7090201@mail.mcgill.ca> Message-ID: On Fri, Feb 20, 2009 at 9:11 PM, Parya Mamayyez Siahkal wrote: > Hello all, > > I am trying to run an executable which has been built on Ubuntu 8.04 > with VTK 5.02 andI don't have access to the source code of the program. > > Running the executable gives me the following error: > > error while loading shared libraries: libvtkfreetype.so.5.0: cannot open > shared object file: No such file or directory > > and I am not able to find the missing library. Has anyone encountered > this problem before? I am guessing the exe you were sent was build against a VTK version where VTK_USE_SYSTEM_FREETYPE was OFF while the VTK version on ubuntu must be a VTK_USE_SYSTEM_FREETYPE:ON. You should ask your friend to recompile the exe either as static or using the exact same configuration as a ubuntu-vtk type installation. Another way would be to not do transitive linking and thus libvtkfreetype would not be pulled in the main executable. This is just pure wild guess. 2cts -- Mathieu From trshash84 at gmail.com Sat Feb 21 11:53:46 2009 From: trshash84 at gmail.com (T.R.Shashwath) Date: Sat, 21 Feb 2009 22:23:46 +0530 Subject: [vtkusers] Blocking 'Q' and 'E' keys In-Reply-To: <499FF26E.204@fer.hr> References: <499FF26E.204@fer.hr> Message-ID: <200902212223.47052.trshash84@gmail.com> On Saturday 21 Feb 2009 5:54:14 pm Alan Mutka wrote: > I have problems with blocking keys Q and E witch are shutting down > visualization. > I have tried adding Observers to keys, setting ExitMethod but without > success. > Please help if you had better luck and managed to find solution! > Thank you! Hi The way we worked this out was to add observers directly to the interactor (not the style), at a priority of -5, and then calling AbortEvent on the command whenever the event hits. HTH Shash From francois.bertel at kitware.com Sat Feb 21 12:45:10 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Sat, 21 Feb 2009 12:45:10 -0500 Subject: [vtkusers] creating a texture costs extra 30MB memory, In-Reply-To: <234724.30653.qm@web45114.mail.sp1.yahoo.com> References: <234724.30653.qm@web45114.mail.sp1.yahoo.com> Message-ID: I don't know if the jpeg reader can load an image piece by piece. If the JPEG Reader can load an image piece by piece, maybe look at class vtkMemoryLimitImageDataStreamer (I just found it, I don't know how to use it, maybe somebody else on the list can tell you). There are two other things to consider: 1. Even if you can load an image piece by piece, in OpenGL, when you send a texture to the graphics card, the data is copied first from the process space (RAM) to the driver space (RAM), and then from the driver space to the card (VRAM). So if your image takes 1MB in RAM once loaded and uncompressed by the jpeg reader from the disk, just sending the texture will make the RAM footprint jump to 2MB. 2. On a pretty advanced graphics card (nVidia Quadro FX 3600M, 512MB), any 2D texture cannot be larger than 8192x8192. It means in the best case your image will be divided into two textures. It will be divided in even more textures on a less advanced graphics card (for example, it is 4096x4096 on an nVidia GeForce 6). On Fri, Feb 20, 2009 at 11:28 PM, Tracy Hu wrote: > thanks a lot for help. But is there anyway at all to use the same picture > for texture, but reduce the memory cost? perhaps at the cost of slower > rendering? > > thanks > > tracy > > > > Assuming your image is one component and a component takes one byte: > 11083x823/1024/1024=8.7MB. > If you have three components (RGB), this is 26.1MB (close to 30MB). > > So, I guess your 1015KB is actually the size of the compressed jpg file... > > > On Fri, Feb 20, 2009 at 3:16 PM, Tracy Hu wrote: >> I wrote simple code as following to decide how much memory a vtkTexture >> would result. >> without using texture (by commenting out the line >> "actor->SetTexture(pTexture)" ), the process takes 74MB memory, >> using texture(by uncommenting the line "actor->SetTexture(pTexture)" ), >> the >> process takes 105MB memory. >> the dimension of picture FOREST011.jpg is 11083 X 823, and takes > 1,015KB >> >> Can somebody give me any idea what's going on, or how to avoid this memory >> expense? >> >> thanks a lot >> Tracy >> >> int main_vtk(int argc, char* argv[]) >> { >> vtkJPEGReader* pJPEGReader = vtkJPEGReader::New(); >> pJPEGReader->SetFileName("D:\\FOREST011.jpg"); >> pJPEGReader->ReleaseDataFlagOn(); >> vtkTexture* pTexture = vtkTexture::New(); >> pTexture->SetInputConnection(pJPEGReader->GetOutputPort()); >> pTexture->InterpolateOn(); >> pTexture->ReleaseDataFlagOn(); >> pJPEGReader->Delete(); >> >> vtkSphereSource *sphere = vtkSphereSource::New(); >> vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); >> > mapper->SetInputConnection(sphere->GetOutputPort()); >> mapper->ScalarVisibilityOff(); >> vtkActor *actor = vtkActor::New(); >> actor->SetMapper(mapper); >> actor->GetProperty()->SetColor(0.0, 0.0, 1.0); >> actor->SetTexture(pTexture); >> >> vtkRenderer* ren = vtkRenderer::New(); >> ren->SetBackground(1, 1, 1); >> ren->AddActor(actor); >> >> vtkRenderWindow* renWin = vtkRenderWindow::New(); >> renWin->AddRenderer(ren); >> >> vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); >> iren->SetRenderWindow(renWin); >> vtkInteractorStyleTrackballCamera *style = >> vtkInteractorStyleTrackballCamera::New(); >> > iren->SetInteractorStyle(style); >> >> renWin->SetSize(600,600); >> renWin->SetPosition(600, 100); >> renWin->Render(); >> >> iren->Initialize(); >> iren->Start(); >> >> return 0; >> } >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to > subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > > > > -- > Fran?ois Bertel, PhD | Kitware Inc. Suite 204 > 1 (518) 371 3971 x113 | 28 Corporate Drive > | Clifton Park NY 12065, USA > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From gnedin at fnal.gov Sat Feb 21 16:30:52 2009 From: gnedin at fnal.gov (Nick Gnedin) Date: Sat, 21 Feb 2009 15:30:52 -0600 Subject: [vtkusers] Blocking 'Q' and 'E' keys Message-ID: <29fcb80a0902211330h51131860l705956efb7511eec@mail.gmail.com> Here is a snippet from vtkRenderWindowInteractor.cpp. I think if you have an empty observer for vtkCommand::ExitEvent, the application would not terminate. void vtkRenderWindowInteractor::ExitCallback() { if (this->HasObserver(vtkCommand::ExitEvent)) { this->InvokeEvent(vtkCommand::ExitEvent,NULL); } else { this->TerminateApp(); } } From dominik at itis.ethz.ch Sun Feb 22 03:33:29 2009 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Sun, 22 Feb 2009 09:33:29 +0100 Subject: [vtkusers] is demand driven pipeline wrapped in python? Message-ID: <49A10DD9.9000906@itis.ethz.ch> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 by doing executive.SetUpdateTimeSteps(0,0.0) I am getting an error: AttributeError: SetUpdateTimeSteps Or did I forget to import something? - -- Dominik Szczerba, Ph.D. Computational Physics Group IT'IS Foundation for Research http://www.itis.ethz.ch -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkmhDdgACgkQ/EBMh9bUuzLJEACgj/StkJP2TOI1jxbGnuNE8J3l 6usAoLUb/0KZ6T6m5kc5owhvtJS3DnLU =AN31 -----END PGP SIGNATURE----- From tavares at fe.up.pt Sun Feb 22 13:06:59 2009 From: tavares at fe.up.pt (=?iso-8859-1?Q?Jo=E3o_Manuel_R._S._Tavares?=) Date: Sun, 22 Feb 2009 18:06:59 -0000 Subject: [vtkusers] ECCOMAS Thematic Conference VipIMAGE 2009: Call for Thematic Sessions and Papers Message-ID: <013001c99518$5b240210$116c0630$@up.pt> ---------------------------------------------------------------------------- ------------------------ (Apologies for cross-posting) International ECCOMAS Thematic Conference VipIMAGE 2009 - II ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING 14-16th October 2009, FEUP, Porto, Portugal www.fe.up.pt/vipimage Call For Thematic Sessions And Papers We would appreciate if you could distribute this information by your colleagues and co-workers. ---------------------------------------------------------------------------- ------------------------- Dear Colleague, We are glad to announce the International Conference VipIMAGE 2009 - II ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING will be held in the Faculty of Engineering of University of Porto, Porto, Portugal, on October 14-16, 2009. Possible Topics (not limited to) ? Image Processing and Analysis ? Segmentation, Tracking and Analyze of Objects in Images ? 3D Vision ? Signal Processing ? Data Interpolation, Registration, Acquisition and Compression ? Objects Simulation ? Virtual Reality ? Software Development for Image Processing and Analysis ? Computer Aided Diagnosis, Surgery, Therapy and Treatment ? Computational Bioimaging and Visualization ? Telemedicine Systems and their Applications Invited Lecturers ? Alejandro Frangi - Pompeu Fabra University, Spain ? Christos E. Constantinou - Stanford University School of Medicine, USA ? Demetri Terzopoulos - University of California, USA ? Joaquim A. Jorge - Instituto Superior T?cnico, Portugal ? Jos? Carlos Pr?ncipe - University of Florida, USA ? Lionel Moisan - Universit? Paris V, France ? Tony Chan - University of California, USA Thematic Sessions Proposals to organize Thematic Session within VipIMAGE 2009 are mostly welcome. The organizers of the selected thematic sessions will be included in the conference scientific committee and will have a reduced registration fee. They will be responsible for the dissemination of their thematic session, may invite expertise researches to have invited keynotes during their session and will participate in the review process of the submitted contributions. Proposals for Thematic Sessions should be submitted by email to the conference co-chairs (tavares at fe.up.pt, rnatal at fe.up.pt). Confirmed Thematic Sessions (not yet closed) - Texture Image Analysis: Methods and Applications - Processing and Classification of Satellite Imagery - Small Animal Imaging: Trends and Techniques - Imaging of Biological Flows: Trends and Challenges Publications The proceedings book is going to be published by the Taylor & Francis Group, as happened with VipIMAGE 2007 (ISBN: 9780415457774). The organizers will encourage the submission of extended versions of the accepted papers to related International Journals; in particular for special issues dedicated to the conference. One possibility already confirmed is the International Journal for Computational Vision and Biomechanics (IJCV&B). Following the success of VipIMAGE 2007, the organizers are going to too edit a book to be published by SPRINGER (ISBN: 978-1-4020-9085-1), under the Computational Methods in Applied Sciences series, with invited works from the most important ones presented in the conference. Awards "best paper award" and "best student paper award" are going to be given to the author(s) of two papers presented at the conference, selected by the Organizing Committee based on the best combined marks from the Scientific Committee and Session Chairs. Important dates ? Deadline for Thematic Sessions proposals: March 1, 2009 (extended) ? Submission of extended abstracts: March 15, 2009 ? Lectures and Final Papers: June 15, 2009 We are looking forward to see you in Porto next October. Kind regards, Jo?o Manuel R. S. Tavares Renato Natal Jorge (conference co-chairs) PS. For further details, please see the conference website at: www.fe.up.pt/vipimage From blloyd at vision.ee.ethz.ch Mon Feb 23 03:08:26 2009 From: blloyd at vision.ee.ethz.ch (Bryn Lloyd) Date: Mon, 23 Feb 2009 09:08:26 +0100 Subject: [vtkusers] Use Mesh Subdivision on VTP files In-Reply-To: References: Message-ID: <49A2597A.8080105@vision.ee.ethz.ch> Hi David, 1) creating triangle strips and then running triangulate again should get you back to the original situation. Nothing gained! 2) what do mean by "absolutely ridiculous triangles" ? a) are they disconnected? b) are there holes? c) are they too small? d) ... 3) how did you obtain the triangles? what does you polydata file look like. Maybe you could try with a simple example, e.g. two triangles: # vtk DataFile Version 3.0 vtk output ASCII DATASET POLYDATA POINTS 4 float 0 0 0 1 0 0 1 1 0 0 1 0 POLYGONS 2 8 3 0 1 2 3 0 2 3 -Bryn David Doria wrote: > I have a polydata with a bunch of vtkTriangles. I want to smooth the > mesh, so in paraview I tried the subdivide filter, but it produces > absolutely ridiculous triangles. So I thought this meant the > connectivity information was wrong? So I tried the TriangleStrips filter > and then the subdivide filter, but now the subdivide filter complains > that there are no triangles. I tried triangulate and then subdivide and > I get the same mess as in the first case. > > In all cases, the LoopSubdivision filter simply crashes. There is > clearly still something wrong with my understanding of these file > formats and which filters can be used on which types of files. Can > anyone clarify this for me? > > Thanks, > > David > > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers -- ------------------------------------------------- Bryn Lloyd Computer Vision Laboratory ETH Z?rich, Sternwartstrasse 7 CH - 8092 Z?rich, Switzerland Tel: +41 44 63 26668 Fax: +41 44 63 21199 ------------------------------------------------- From alberto.email at tiscali.it Mon Feb 23 04:40:06 2009 From: alberto.email at tiscali.it (Alberto Orlandini) Date: Mon, 23 Feb 2009 10:40:06 +0100 Subject: [vtkusers] vtkFLTK building problems Message-ID: <49A26EF6.5060409@tiscali.it> Hello, Im' trying to build vtkFLTK on Windows with Visual studio 9 2008, I used the latest versions of the src vtkFLTK-0.6.1 vtk-5.2.1 fltk-1.1.9 with cmake I generated the 3 solutions for VS9, I managed to build vtk and fltk with 0 errors, but when I tried to build vtkFLTK first I got an error here about the warning directive not recognized # if (VTK_MAJOR_VERSION==3) # warning "vtkFLTK version requires VTK version >= 4.1.0." # elif (VTK_MAJOR_VERSION==4) # if (VTK_MINOR_VERSION==0) # warning "vtkFLTK version requires VTK version >= 4.1.0." # endif # else # warning "vtkFLTK version not intended for use with this VTK version." # endif /* VTK Version */ # endif /* __cplusplus */ Then I commented the directive and got lots of other errors... So I was wondering... How can I have a working build of vtkFLTK? I could change the version of Visual Studio if necessary but I could not find vtk4 source anywhere... and anyway the site says >=4.1 so it should work with vtk5 Thank you Alberto From alberto.email at tiscali.it Mon Feb 23 05:31:26 2009 From: alberto.email at tiscali.it (Alberto Orlandini) Date: Mon, 23 Feb 2009 11:31:26 +0100 Subject: [vtkusers] vtkFLTK building problems Message-ID: <49A27AFE.4090408@tiscali.it> If I try to build just the vtkFLTK project inside the vtkFLTK solution and not all the other projects inside the solution the number of errors decreases but I still don't know what to do to go on... Help please! These are the errors error C2039: 'RemovePropA' : is not a member of 'Fl_VTK_Window' c:\Programmi\VTK-fromSRC\vtkFLTK-0.6.1\src\Fl_VTK_Window.cxx 589 vtkFLTK error C2673: 'RemovePropA' : global functions do not have 'this' pointers c:\Programmi\VTK-fromSRC\vtkFLTK-0.6.1\src\Fl_VTK_Window.cxx 598 vtkFLTK error C2227: left of '->GetDefaultRenderer' must point to class/struct/union/generic type c:\Programmi\VTK-fromSRC\vtkFLTK-0.6.1\src\Fl_VTK_Window.cxx 598 vtkFLTK fatal error C1083: Cannot open include file: 'GL/glaux.h': No such file or directory c:\Programmi\VTK-fromSRC\vtkFLTK-0.6.1\src\vtkFLTKOpenGLRenderWindow.cxx 46 vtkFLTK From luis.ibanez at kitware.com Mon Feb 23 07:43:58 2009 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Mon, 23 Feb 2009 07:43:58 -0500 Subject: [vtkusers] R-REG001: Machine Submitting to the ITK Dashboard: Third Call for removing Locally modified files Message-ID: <49A29A0E.1050008@kitware.com> The machine: r-reg001 has been submitting a Nightly Linux-c++ build to the ITK and VTK Dashboards. If you know the administrator of this machine, please let her/him know that it has locally modified files that need to be fixed: ITK: http://www.cdash.org/CDash/viewUpdate.php?buildid=277691 VTK: http://www.cdash.org/CDash/viewUpdate.php?buildid=277739 This is one of the few remaining red entries in the Dashboard... Thanks Luis From edsb at hotmail.it Mon Feb 23 07:44:47 2009 From: edsb at hotmail.it (EDSB EDSB) Date: Mon, 23 Feb 2009 13:44:47 +0100 Subject: [vtkusers] tube with elliptical section Message-ID: Dear list members, Has anyone already implemented a class like vtkTubeFilter that generates a tube with elliptical transversal sections around an input line? could somebody give me a hint on this topic? Thanks in advance Mary _________________________________________________________________ Vai oltre le parole, scarica Messenger 2009! http://www.messenger.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From jtgiles at gmail.com Mon Feb 23 10:09:46 2009 From: jtgiles at gmail.com (Justin Giles) Date: Mon, 23 Feb 2009 09:09:46 -0600 Subject: [vtkusers] Qt & VTK 2d plotting Message-ID: I am able to create a 2d plot using a QVTKWidget, however I am unable to interact with that plot. I pretty much new to VTK, so I am kind of at a loss as to how to connect the vtk interactors and Qt. I have poked around a bit and noticed a QVTKInteractor class, but anything I do with that results in my 2d plot going away to be replaced with a blank white area. Below is the code that I am using. Just as a note, this is being done in a class that extends a QMainWindow. //snippet// view = new QVTKWidget; setCentralWidget(view); int DIM = 500; vtkDataArray *dataArray1 = vtkDataArray::CreateDataArray(VTK_FLOAT); dataArray1->SetNumberOfTuples(DIM); vtkDataArray *dataArray2 = vtkDataArray::CreateDataArray(VTK_FLOAT); dataArray2->SetNumberOfTuples(DIM); int t; for (t = 0; t < DIM; t++) { float x = t; float y = vtkMath::Random(0.0f,1.0f); dataArray1->SetTuple(t, &x); dataArray2->SetTuple(t, &y); } vtkFieldData *fieldData = vtkFieldData::New(); fieldData->AllocateArrays(2); fieldData->AddArray(dataArray1); fieldData->AddArray(dataArray2); vtkDataObject *dataObject = vtkDataObject::New(); dataObject->SetFieldData(fieldData); vtkXYPlotActor *plot = vtkXYPlotActor::New(); plot->AddDataObjectInput(dataObject); plot->SetTitle("Plot"); plot->SetXTitle("X-Axis"); plot->SetYTitle("Y-Axis"); plot->SetXValuesToValue(); plot->SetWidth(0.9); plot->SetHeight(0.9); plot->SetPosition(0.05, 0.05); plot->LegendOn(); plot->PickableOff(); plot->PlotCurvePointsOn(); plot->PlotCurveLinesOff(); plot->SetDataObjectXComponent(0, 0); plot->SetDataObjectYComponent(0, 1); plot->SetPlotColor(0, 1.0, 0.0, 0.0); plot->SetPlotLabel(0, "My Label"); //plot->GetProperty()->SetColor(0.0, 0.0, 0.0); vtkRenderer *renderer = vtkRenderer::New(); renderer->SetBackground(0, 0, 0); renderer->AddActor2D(plot); vtkRenderWindow *renderWindow = vtkRenderWindow::New(); renderWindow->SetSize(550, 450); renderWindow->AddRenderer(renderer); // vtkRenderWindowInteractor* inter = QVTKInteractor::New(); // renderWindow->SetInteractor(inter); view->SetRenderWindow(renderWindow); //end-snippet// -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.baumes at kitware.com Mon Feb 23 10:20:20 2009 From: jeff.baumes at kitware.com (Jeff Baumes) Date: Mon, 23 Feb 2009 10:20:20 -0500 Subject: [vtkusers] vtkQtChart? In-Reply-To: References: Message-ID: <2137e33e0902230720x2ccd3c9eoe6b03a5a1a7ce140@mail.gmail.com> > Has anyone successfully used the vtkQtChart stuff? The charting library is relatively new, and the problems you're having may be because the installation code does not work properly. Please file a bug, including your system info and version of VTK you are using. > Any insight in regards to this or the vtkQtChart > stuff in general? I haven't seen hardly any examples or HOW-TOs dealing > with this. The tests are the best place to look for now. The charting code in GUISupport\Qt\Charts is a pure-Qt library that can accept Qt item models (QAbstractItemModel subclasses) in order to view charts. There are some helper classes in the QVTK library (in GUISupport\Qt) that help adapt the VTK structure vtkTable to be displayed in the charts. As a disclaimer, the API for these charting classes are just starting to settle down, so you may see some minor changes over the next few months. Jeff From clinton at elemtech.com Mon Feb 23 12:20:44 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 23 Feb 2009 10:20:44 -0700 Subject: [vtkusers] Qt & VTK 2d plotting In-Reply-To: References: Message-ID: <49A2DAEC.9080200@elemtech.com> Interaction is handled by the interactor style classes. http://www.vtk.org/doc/nightly/html/classvtkInteractorStyle.html You can use an existing style, or make your own and give it to the interactor. Clint Justin Giles wrote: > I am able to create a 2d plot using a QVTKWidget, however I am unable > to interact with that plot. I pretty much new to VTK, so I am kind of > at a loss as to how to connect the vtk interactors and Qt. I have > poked around a bit and noticed a QVTKInteractor class, but anything I > do with that results in my 2d plot going away to be replaced with a > blank white area. Below is the code that I am using. Just as a note, > this is being done in a class that extends a QMainWindow. > > //snippet// > > > view = new QVTKWidget; > setCentralWidget(view); > > int DIM = 500; > vtkDataArray *dataArray1 = vtkDataArray::CreateDataArray(VTK_FLOAT); > dataArray1->SetNumberOfTuples(DIM); > > vtkDataArray *dataArray2 = vtkDataArray::CreateDataArray(VTK_FLOAT); > dataArray2->SetNumberOfTuples(DIM); > > int t; > for (t = 0; t < DIM; t++) > { > float x = t; > float y = vtkMath::Random(0.0f,1.0f); > dataArray1->SetTuple(t, &x); > dataArray2->SetTuple(t, &y); > } > > vtkFieldData *fieldData = vtkFieldData::New(); > fieldData->AllocateArrays(2); > fieldData->AddArray(dataArray1); > fieldData->AddArray(dataArray2); > > vtkDataObject *dataObject = vtkDataObject::New(); > dataObject->SetFieldData(fieldData); > > vtkXYPlotActor *plot = vtkXYPlotActor::New(); > plot->AddDataObjectInput(dataObject); > plot->SetTitle("Plot"); > plot->SetXTitle("X-Axis"); > plot->SetYTitle("Y-Axis"); > plot->SetXValuesToValue(); > plot->SetWidth(0.9); > plot->SetHeight(0.9); > plot->SetPosition(0.05, 0.05); > plot->LegendOn(); > plot->PickableOff(); > plot->PlotCurvePointsOn(); > plot->PlotCurveLinesOff(); > > plot->SetDataObjectXComponent(0, 0); > plot->SetDataObjectYComponent(0, 1); > plot->SetPlotColor(0, 1.0, 0.0, 0.0); > plot->SetPlotLabel(0, "My Label"); > //plot->GetProperty()->SetColor(0.0, 0.0, 0.0); > > vtkRenderer *renderer = vtkRenderer::New(); > renderer->SetBackground(0, 0, 0); > renderer->AddActor2D(plot); > > vtkRenderWindow *renderWindow = vtkRenderWindow::New(); > renderWindow->SetSize(550, 450); > renderWindow->AddRenderer(renderer); > // vtkRenderWindowInteractor* inter = QVTKInteractor::New(); > // renderWindow->SetInteractor(inter); > view->SetRenderWindow(renderWindow); > > //end-snippet// > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From jtgiles at gmail.com Mon Feb 23 13:22:41 2009 From: jtgiles at gmail.com (Justin Giles) Date: Mon, 23 Feb 2009 12:22:41 -0600 Subject: [vtkusers] Qt & VTK 2d plotting In-Reply-To: <49A2DAEC.9080200@elemtech.com> References: <49A2DAEC.9080200@elemtech.com> Message-ID: Ok, I added a style to my interactor in the following way: //code vtkRenderWindow *renderWindow = vtkRenderWindow::New(); renderWindow->SetSize(550, 450); renderWindow->AddRenderer(renderer); vtkRenderWindowInteractor* inter = QVTKInteractor::New(); renderWindow->SetInteractor(inter); vtkInteractorStyleImage* interstyle = vtkInteractorStyleImage::New(); inter->SetInteractorStyle(interstyle); view->SetRenderWindow(renderWindow); //end code (where view = QVTKWidget) And, I still get the same results. Instead of a nice plot, I just get a blank white screen. Thoughts? Am I doing something wrong? Thanks, Justin On Mon, Feb 23, 2009 at 11:20 AM, Clinton Stimpson wrote: > > Interaction is handled by the interactor style classes. > http://www.vtk.org/doc/nightly/html/classvtkInteractorStyle.html > > You can use an existing style, or make your own and give it to the > interactor. > > Clint > > Justin Giles wrote: > >> I am able to create a 2d plot using a QVTKWidget, however I am unable to >> interact with that plot. I pretty much new to VTK, so I am kind of at a >> loss as to how to connect the vtk interactors and Qt. I have poked around a >> bit and noticed a QVTKInteractor class, but anything I do with that results >> in my 2d plot going away to be replaced with a blank white area. Below is >> the code that I am using. Just as a note, this is being done in a class >> that extends a QMainWindow. >> >> //snippet// >> >> >> view = new QVTKWidget; >> setCentralWidget(view); >> >> int DIM = 500; >> vtkDataArray *dataArray1 = vtkDataArray::CreateDataArray(VTK_FLOAT); >> dataArray1->SetNumberOfTuples(DIM); >> >> vtkDataArray *dataArray2 = vtkDataArray::CreateDataArray(VTK_FLOAT); >> dataArray2->SetNumberOfTuples(DIM); >> >> int t; >> for (t = 0; t < DIM; t++) >> { >> float x = t; >> float y = vtkMath::Random(0.0f,1.0f); >> dataArray1->SetTuple(t, &x); >> dataArray2->SetTuple(t, &y); >> } >> >> vtkFieldData *fieldData = vtkFieldData::New(); >> fieldData->AllocateArrays(2); >> fieldData->AddArray(dataArray1); >> fieldData->AddArray(dataArray2); >> >> vtkDataObject *dataObject = vtkDataObject::New(); >> dataObject->SetFieldData(fieldData); >> >> vtkXYPlotActor *plot = vtkXYPlotActor::New(); >> plot->AddDataObjectInput(dataObject); >> plot->SetTitle("Plot"); >> plot->SetXTitle("X-Axis"); >> plot->SetYTitle("Y-Axis"); >> plot->SetXValuesToValue(); >> plot->SetWidth(0.9); >> plot->SetHeight(0.9); >> plot->SetPosition(0.05, 0.05); >> plot->LegendOn(); >> plot->PickableOff(); >> plot->PlotCurvePointsOn(); >> plot->PlotCurveLinesOff(); >> >> plot->SetDataObjectXComponent(0, 0); >> plot->SetDataObjectYComponent(0, 1); >> plot->SetPlotColor(0, 1.0, 0.0, 0.0); >> plot->SetPlotLabel(0, "My Label"); >> //plot->GetProperty()->SetColor(0.0, 0.0, 0.0); >> >> vtkRenderer *renderer = vtkRenderer::New(); >> renderer->SetBackground(0, 0, 0); >> renderer->AddActor2D(plot); >> >> vtkRenderWindow *renderWindow = vtkRenderWindow::New(); >> renderWindow->SetSize(550, 450); >> renderWindow->AddRenderer(renderer); >> // vtkRenderWindowInteractor* inter = QVTKInteractor::New(); >> // renderWindow->SetInteractor(inter); >> view->SetRenderWindow(renderWindow); >> >> //end-snippet// >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.mutka at fer.hr Mon Feb 23 13:36:39 2009 From: alan.mutka at fer.hr (amutka) Date: Mon, 23 Feb 2009 10:36:39 -0800 (PST) Subject: [vtkusers] Blocking 'Q' and 'E' keys In-Reply-To: <200902212223.47052.trshash84@gmail.com> References: <499FF26E.204@fer.hr> <200902212223.47052.trshash84@gmail.com> Message-ID: <22167336.post@talk.nabble.com> Dear Shash, thank you for your answer. I add event to interactor... iren1->AddObserver(vtkCommand::ExitEvent,eventObserver,-5); And I caught the ExitEvent in my eventObserver class. How can I abort event? I'm using simple class, structure like this void PickCommand::Execute(vtkObject *caller,unsigned long event,void * callData) { switch(event) { case vtkCommand::PickEvent: { } case vtkCommand::ExitEvent { .... } } and I make object from class PickCommand * eventObserver = PickCommand::New(); and I simply add observer iren1->AddObserver(vtkCommand::ExitEvent,eventObserver,-5); Pressing Q or E Exit event is invoked but how can I block ExitMethod. I tried to call vtkCommand::SetAbortEvent but i think this is wrong, I need to block interactor events and I don't know how. I'm sorry for bothering, but I have no idea more, so please give me another hint! Thank you! Alan Bugzilla from trshash84 at gmail.com wrote: > > On Saturday 21 Feb 2009 5:54:14 pm Alan Mutka wrote: >> I have problems with blocking keys Q and E witch are shutting down >> visualization. >> I have tried adding Observers to keys, setting ExitMethod but without >> success. >> Please help if you had better luck and managed to find solution! >> Thank you! > > Hi > > The way we worked this out was to add observers directly to the interactor > (not the style), at a priority of -5, and then calling AbortEvent on the > command whenever the event hits. > > HTH > Shash > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- View this message in context: http://www.nabble.com/Blocking-%27Q%27-and-%27E%27-keys-tp22135517p22167336.html Sent from the VTK - Users mailing list archive at Nabble.com. From clinton at elemtech.com Mon Feb 23 14:05:50 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 23 Feb 2009 12:05:50 -0700 Subject: [vtkusers] Qt & VTK 2d plotting In-Reply-To: References: <49A2DAEC.9080200@elemtech.com> Message-ID: <49A2F38E.2000403@elemtech.com> Maybe you're just missing a renderer->ResetCamera(); If you're just viewing an image, have a look at the image viewer example in VTK/Examples/GUI/Qt/ImageViewer Clint Justin Giles wrote: > Ok, I added a style to my interactor in the following way: > > //code > vtkRenderWindow *renderWindow = vtkRenderWindow::New(); > renderWindow->SetSize(550, 450); > renderWindow->AddRenderer(renderer); > vtkRenderWindowInteractor* inter = QVTKInteractor::New(); > renderWindow->SetInteractor(inter); > vtkInteractorStyleImage* interstyle = vtkInteractorStyleImage::New(); > inter->SetInteractorStyle(interstyle); > view->SetRenderWindow(renderWindow); > //end code > > (where view = QVTKWidget) > > And, I still get the same results. Instead of a nice plot, I just get > a blank white screen. Thoughts? Am I doing something wrong? > > Thanks, > > Justin > > On Mon, Feb 23, 2009 at 11:20 AM, Clinton Stimpson > > wrote: > > > Interaction is handled by the interactor style classes. > http://www.vtk.org/doc/nightly/html/classvtkInteractorStyle.html > > You can use an existing style, or make your own and give it to the > interactor. > > Clint > > Justin Giles wrote: > > I am able to create a 2d plot using a QVTKWidget, however I am > unable to interact with that plot. I pretty much new to VTK, > so I am kind of at a loss as to how to connect the vtk > interactors and Qt. I have poked around a bit and noticed a > QVTKInteractor class, but anything I do with that results in > my 2d plot going away to be replaced with a blank white area. > Below is the code that I am using. Just as a note, this is > being done in a class that extends a QMainWindow. > > //snippet// > > > view = new QVTKWidget; > setCentralWidget(view); > > int DIM = 500; > vtkDataArray *dataArray1 = > vtkDataArray::CreateDataArray(VTK_FLOAT); > dataArray1->SetNumberOfTuples(DIM); > > vtkDataArray *dataArray2 = > vtkDataArray::CreateDataArray(VTK_FLOAT); > dataArray2->SetNumberOfTuples(DIM); > > int t; > for (t = 0; t < DIM; t++) > { > float x = t; > float y = vtkMath::Random(0.0f,1.0f); > dataArray1->SetTuple(t, &x); > dataArray2->SetTuple(t, &y); > } > > vtkFieldData *fieldData = vtkFieldData::New(); > fieldData->AllocateArrays(2); > fieldData->AddArray(dataArray1); > fieldData->AddArray(dataArray2); > > vtkDataObject *dataObject = vtkDataObject::New(); > dataObject->SetFieldData(fieldData); > > vtkXYPlotActor *plot = vtkXYPlotActor::New(); > plot->AddDataObjectInput(dataObject); > plot->SetTitle("Plot"); > plot->SetXTitle("X-Axis"); > plot->SetYTitle("Y-Axis"); > plot->SetXValuesToValue(); > plot->SetWidth(0.9); > plot->SetHeight(0.9); > plot->SetPosition(0.05, 0.05); > plot->LegendOn(); > plot->PickableOff(); > plot->PlotCurvePointsOn(); > plot->PlotCurveLinesOff(); > > plot->SetDataObjectXComponent(0, 0); > plot->SetDataObjectYComponent(0, 1); > plot->SetPlotColor(0, 1.0, 0.0, 0.0); > plot->SetPlotLabel(0, "My Label"); > //plot->GetProperty()->SetColor(0.0, 0.0, 0.0); > > vtkRenderer *renderer = vtkRenderer::New(); > renderer->SetBackground(0, 0, 0); > renderer->AddActor2D(plot); > > vtkRenderWindow *renderWindow = vtkRenderWindow::New(); > renderWindow->SetSize(550, 450); > renderWindow->AddRenderer(renderer); > // vtkRenderWindowInteractor* inter = QVTKInteractor::New(); > // renderWindow->SetInteractor(inter); > view->SetRenderWindow(renderWindow); > > //end-snippet// > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > From jtgiles at gmail.com Mon Feb 23 16:10:29 2009 From: jtgiles at gmail.com (Justin Giles) Date: Mon, 23 Feb 2009 15:10:29 -0600 Subject: [vtkusers] Qt & VTK 2d plotting In-Reply-To: <49A2F38E.2000403@elemtech.com> References: <49A2DAEC.9080200@elemtech.com> <49A2F38E.2000403@elemtech.com> Message-ID: That didn't seem to work either. I'm trying to view a xy plot. Justin On Mon, Feb 23, 2009 at 1:05 PM, Clinton Stimpson wrote: > > Maybe you're just missing a > renderer->ResetCamera(); > > If you're just viewing an image, have a look at the image viewer example in > VTK/Examples/GUI/Qt/ImageViewer > > Clint > > Justin Giles wrote: > >> Ok, I added a style to my interactor in the following way: >> >> //code >> vtkRenderWindow *renderWindow = vtkRenderWindow::New(); >> renderWindow->SetSize(550, 450); >> renderWindow->AddRenderer(renderer); >> vtkRenderWindowInteractor* inter = QVTKInteractor::New(); >> renderWindow->SetInteractor(inter); >> vtkInteractorStyleImage* interstyle = vtkInteractorStyleImage::New(); >> inter->SetInteractorStyle(interstyle); >> view->SetRenderWindow(renderWindow); >> //end code >> >> (where view = QVTKWidget) >> >> And, I still get the same results. Instead of a nice plot, I just get a >> blank white screen. Thoughts? Am I doing something wrong? >> >> Thanks, >> >> Justin >> >> On Mon, Feb 23, 2009 at 11:20 AM, Clinton Stimpson > clinton at elemtech.com>> wrote: >> >> >> Interaction is handled by the interactor style classes. >> http://www.vtk.org/doc/nightly/html/classvtkInteractorStyle.html >> >> You can use an existing style, or make your own and give it to the >> interactor. >> >> Clint >> >> Justin Giles wrote: >> >> I am able to create a 2d plot using a QVTKWidget, however I am >> unable to interact with that plot. I pretty much new to VTK, >> so I am kind of at a loss as to how to connect the vtk >> interactors and Qt. I have poked around a bit and noticed a >> QVTKInteractor class, but anything I do with that results in >> my 2d plot going away to be replaced with a blank white area. >> Below is the code that I am using. Just as a note, this is >> being done in a class that extends a QMainWindow. >> >> //snippet// >> >> >> view = new QVTKWidget; >> setCentralWidget(view); >> >> int DIM = 500; >> vtkDataArray *dataArray1 = >> vtkDataArray::CreateDataArray(VTK_FLOAT); >> dataArray1->SetNumberOfTuples(DIM); >> >> vtkDataArray *dataArray2 = >> vtkDataArray::CreateDataArray(VTK_FLOAT); >> dataArray2->SetNumberOfTuples(DIM); >> >> int t; >> for (t = 0; t < DIM; t++) >> { >> float x = t; >> float y = vtkMath::Random(0.0f,1.0f); >> dataArray1->SetTuple(t, &x); >> dataArray2->SetTuple(t, &y); >> } >> >> vtkFieldData *fieldData = vtkFieldData::New(); >> fieldData->AllocateArrays(2); >> fieldData->AddArray(dataArray1); >> fieldData->AddArray(dataArray2); >> >> vtkDataObject *dataObject = vtkDataObject::New(); >> dataObject->SetFieldData(fieldData); >> >> vtkXYPlotActor *plot = vtkXYPlotActor::New(); >> plot->AddDataObjectInput(dataObject); >> plot->SetTitle("Plot"); >> plot->SetXTitle("X-Axis"); >> plot->SetYTitle("Y-Axis"); >> plot->SetXValuesToValue(); >> plot->SetWidth(0.9); >> plot->SetHeight(0.9); >> plot->SetPosition(0.05, 0.05); >> plot->LegendOn(); >> plot->PickableOff(); >> plot->PlotCurvePointsOn(); >> plot->PlotCurveLinesOff(); >> >> plot->SetDataObjectXComponent(0, 0); >> plot->SetDataObjectYComponent(0, 1); >> plot->SetPlotColor(0, 1.0, 0.0, 0.0); >> plot->SetPlotLabel(0, "My Label"); >> //plot->GetProperty()->SetColor(0.0, 0.0, 0.0); >> >> vtkRenderer *renderer = vtkRenderer::New(); >> renderer->SetBackground(0, 0, 0); >> renderer->AddActor2D(plot); >> >> vtkRenderWindow *renderWindow = vtkRenderWindow::New(); >> renderWindow->SetSize(550, 450); >> renderWindow->AddRenderer(renderer); >> // vtkRenderWindowInteractor* inter = QVTKInteractor::New(); >> // renderWindow->SetInteractor(inter); >> view->SetRenderWindow(renderWindow); >> >> //end-snippet// >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shekhar.Chandra at sci.monash.edu.au Mon Feb 23 17:33:09 2009 From: Shekhar.Chandra at sci.monash.edu.au (Shakes) Date: Tue, 24 Feb 2009 09:33:09 +1100 Subject: [vtkusers] Blocking 'Q' and 'E' keys In-Reply-To: <22167336.post@talk.nabble.com> References: <499FF26E.204@fer.hr> <200902212223.47052.trshash84@gmail.com> <22167336.post@talk.nabble.com> Message-ID: <49A32425.9040508@sci.monash.edu.au> Hi Alan, Not sure if this will do what u need. But when I needed to unbind the mouse click events I used ///Unbind the right mouse button events as Qt uses context menu. QVTKWidget::GetRenderWindow()->GetInteractor()->RemoveObservers(vtkCommand::RightButtonPressEvent); QVTKWidget::GetRenderWindow()->GetInteractor()->RemoveObservers(vtkCommand::RightButtonReleaseEvent); Not sure how to unbind keys, perhaps change the vtkCommand::RightButtonPressEvent bits? Hope that helps Cheers Shakes amutka wrote: > Dear Shash, thank you for your answer. > I add event to interactor... > > iren1->AddObserver(vtkCommand::ExitEvent,eventObserver,-5); > > And I caught the ExitEvent in my eventObserver class. How can I abort event? > I'm using simple class, structure like this > > void PickCommand::Execute(vtkObject *caller,unsigned long event,void * > callData) > { > > switch(event) > { > case vtkCommand::PickEvent: > { > > } > case vtkCommand::ExitEvent > { > .... > } > } > > and I make object from class > > PickCommand * eventObserver = PickCommand::New(); > and I simply add observer > > iren1->AddObserver(vtkCommand::ExitEvent,eventObserver,-5); > > Pressing Q or E Exit event is invoked but how can I block ExitMethod. I > tried to call > vtkCommand::SetAbortEvent > > but i think this is wrong, I need to block interactor events and I don't > know how. I'm sorry for bothering, but I have no idea more, so please give > me another hint! > Thank you! > > Alan > > > Bugzilla from trshash84 at gmail.com wrote: >> On Saturday 21 Feb 2009 5:54:14 pm Alan Mutka wrote: >>> I have problems with blocking keys Q and E witch are shutting down >>> visualization. >>> I have tried adding Observers to keys, setting ExitMethod but without >>> success. >>> Please help if you had better luck and managed to find solution! >>> Thank you! >> Hi >> >> The way we worked this out was to add observers directly to the interactor >> (not the style), at a priority of -5, and then calling AbortEvent on the >> command whenever the event hits. >> >> HTH >> Shash >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Shekhar_Chandra.vcf Type: text/x-vcard Size: 247 bytes Desc: not available URL: From Shekhar.Chandra at sci.monash.edu.au Mon Feb 23 17:37:43 2009 From: Shekhar.Chandra at sci.monash.edu.au (Shakes) Date: Tue, 24 Feb 2009 09:37:43 +1100 Subject: [vtkusers] Qt & VTK 2d plotting In-Reply-To: References: <49A2DAEC.9080200@elemtech.com> <49A2F38E.2000403@elemtech.com> Message-ID: <49A32537.3050206@sci.monash.edu.au> Hi Justin, Someone correct me if I'm wrong, but I don't think u can interact with it as the plot is not in a 3D scene (i.e., its a not plane in a 3D scene). This is difference between vtkImageViewer and vtkImageViewer2, the latter is in a 3D scene and you can interact with it. I used the following to "zoom" XY Plots: //Scale plotActor->SetWidth(factor); plotActor->SetHeight(factor); //Reposition plotActor->SetPosition(pos[0]-factor*pos[0], pos[1]-factor*pos[1]); HTH Cheers Shakes Justin Giles wrote: > That didn't seem to work either. I'm trying to view a xy plot. > > Justin > > On Mon, Feb 23, 2009 at 1:05 PM, Clinton Stimpson > wrote: > > > Maybe you're just missing a > renderer->ResetCamera(); > > If you're just viewing an image, have a look at the image viewer > example in VTK/Examples/GUI/Qt/ImageViewer > > Clint > > Justin Giles wrote: > > Ok, I added a style to my interactor in the following way: > > //code > vtkRenderWindow *renderWindow = vtkRenderWindow::New(); > renderWindow->SetSize(550, 450); > renderWindow->AddRenderer(renderer); > vtkRenderWindowInteractor* inter = QVTKInteractor::New(); > renderWindow->SetInteractor(inter); > vtkInteractorStyleImage* interstyle = > vtkInteractorStyleImage::New(); > inter->SetInteractorStyle(interstyle); > view->SetRenderWindow(renderWindow); > //end code > > (where view = QVTKWidget) > > And, I still get the same results. Instead of a nice plot, I > just get a blank white screen. Thoughts? Am I doing something > wrong? > > Thanks, > > Justin > > On Mon, Feb 23, 2009 at 11:20 AM, Clinton Stimpson > > >> wrote: > > > Interaction is handled by the interactor style classes. > http://www.vtk.org/doc/nightly/html/classvtkInteractorStyle.html > > You can use an existing style, or make your own and give it > to the > interactor. > > Clint > > Justin Giles wrote: > > I am able to create a 2d plot using a QVTKWidget, however > I am > unable to interact with that plot. I pretty much new to VTK, > so I am kind of at a loss as to how to connect the vtk > interactors and Qt. I have poked around a bit and noticed a > QVTKInteractor class, but anything I do with that results in > my 2d plot going away to be replaced with a blank white area. > Below is the code that I am using. Just as a note, this is > being done in a class that extends a QMainWindow. > > //snippet// > > > view = new QVTKWidget; > setCentralWidget(view); > > int DIM = 500; > vtkDataArray *dataArray1 = > vtkDataArray::CreateDataArray(VTK_FLOAT); > dataArray1->SetNumberOfTuples(DIM); > > vtkDataArray *dataArray2 = > vtkDataArray::CreateDataArray(VTK_FLOAT); > dataArray2->SetNumberOfTuples(DIM); > > int t; > for (t = 0; t < DIM; t++) > { > float x = t; > float y = vtkMath::Random(0.0f,1.0f); > dataArray1->SetTuple(t, &x); > dataArray2->SetTuple(t, &y); > } > > vtkFieldData *fieldData = vtkFieldData::New(); > fieldData->AllocateArrays(2); > fieldData->AddArray(dataArray1); > fieldData->AddArray(dataArray2); > > vtkDataObject *dataObject = vtkDataObject::New(); > dataObject->SetFieldData(fieldData); > > vtkXYPlotActor *plot = vtkXYPlotActor::New(); > plot->AddDataObjectInput(dataObject); > plot->SetTitle("Plot"); > plot->SetXTitle("X-Axis"); > plot->SetYTitle("Y-Axis"); > plot->SetXValuesToValue(); > plot->SetWidth(0.9); > plot->SetHeight(0.9); > plot->SetPosition(0.05, 0.05); > plot->LegendOn(); > plot->PickableOff(); > plot->PlotCurvePointsOn(); > plot->PlotCurveLinesOff(); > > plot->SetDataObjectXComponent(0, 0); > plot->SetDataObjectYComponent(0, 1); > plot->SetPlotColor(0, 1.0, 0.0, 0.0); > plot->SetPlotLabel(0, "My Label"); > //plot->GetProperty()->SetColor(0.0, 0.0, 0.0); > > vtkRenderer *renderer = vtkRenderer::New(); > renderer->SetBackground(0, 0, 0); > renderer->AddActor2D(plot); > > vtkRenderWindow *renderWindow = vtkRenderWindow::New(); > renderWindow->SetSize(550, 450); > renderWindow->AddRenderer(renderer); > // vtkRenderWindowInteractor* inter = > QVTKInteractor::New(); > // renderWindow->SetInteractor(inter); > view->SetRenderWindow(renderWindow); > > //end-snippet// > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- A non-text attachment was scrubbed... Name: Shekhar_Chandra.vcf Type: text/x-vcard Size: 247 bytes Desc: not available URL: From rjaeger at gmail.com Mon Feb 23 18:49:22 2009 From: rjaeger at gmail.com (Robbie Jaeger) Date: Mon, 23 Feb 2009 15:49:22 -0800 Subject: [vtkusers] How to have vtkCells refer to the same vtkPoints array? Message-ID: <818aad690902231549i6f94cf1cycc8f820e83c63f8e@mail.gmail.com> Hello, I am creating an unstructured grid that contains all cells and would like to define all of my vtkPoints first, and then create cells that refer to these points (create nodes, then elements from nodes). Is this possible? Currently, I am having to create points for each cell separately, which I believe to be inefficient since some cells share points. Thanks, Robbie -------------- next part -------------- An HTML attachment was scrubbed... URL: From flymolo at gmail.com Mon Feb 23 19:10:33 2009 From: flymolo at gmail.com (jonathan grimm) Date: Mon, 23 Feb 2009 16:10:33 -0800 Subject: [vtkusers] QVTKWidget and toolbars Message-ID: The QVTKWidget from the visualization toolkit not working properly in windows with toolbars(at least at the top of the window) on Mac OSX 10.5 Qt-4.5.0-rc1 and snapshot20090218 Cocoa/64. Plotting the mouse position on the Widget is not lining up with the mouse cursor position. The plotted location appears displaced by the size of the toolbar and is correct if the toolbar is turned off. This worked on the Mac with qt-4.4 and current works on windows with qt-4.5.0-snapshot-20090220. -- Sometimes it's hard to tell the dancer from the dance - Corwin in CoC -------------- next part -------------- An HTML attachment was scrubbed... URL: From jtgiles at gmail.com Mon Feb 23 22:32:09 2009 From: jtgiles at gmail.com (Justin Giles) Date: Mon, 23 Feb 2009 21:32:09 -0600 Subject: [vtkusers] Qt & VTK 2d plotting In-Reply-To: <49A32537.3050206@sci.monash.edu.au> References: <49A2DAEC.9080200@elemtech.com> <49A2F38E.2000403@elemtech.com> <49A32537.3050206@sci.monash.edu.au> Message-ID: Ok, so if I understand this correctly, with any 2d plots in VTK, you cannot interact with them unless you create your own mouse/keyboard listeners with your own custom code to do what you want? That leads to another question...... I see a lot of vtkQtChart stuff in the source code with a few examples. It looks as if that code base has interaction built in and it seems to be 2d plots as well. Any comments on the vtkQtChart stuff? I haven't been able to get it to work due to a flaw in the cmake files in the GUISupport/Qt/Chart area (already filed a bug report). Thanks for any input with this. I appreciate the responses so far. It's a big help! Justin On Mon, Feb 23, 2009 at 4:37 PM, Shakes wrote: > Hi Justin, > > Someone correct me if I'm wrong, but I don't think u can interact with it > as the plot is not in a 3D scene (i.e., its a not plane in a 3D scene). > > This is difference between vtkImageViewer and vtkImageViewer2, the latter > is in a 3D scene and you can interact with it. > > I used the following to "zoom" XY Plots: > > //Scale > plotActor->SetWidth(factor); > plotActor->SetHeight(factor); > //Reposition > plotActor->SetPosition(pos[0]-factor*pos[0], pos[1]-factor*pos[1]); > > HTH > Cheers > Shakes > > Justin Giles wrote: > >> That didn't seem to work either. I'm trying to view a xy plot. >> >> Justin >> >> On Mon, Feb 23, 2009 at 1:05 PM, Clinton Stimpson > clinton at elemtech.com>> wrote: >> >> >> Maybe you're just missing a >> renderer->ResetCamera(); >> >> If you're just viewing an image, have a look at the image viewer >> example in VTK/Examples/GUI/Qt/ImageViewer >> >> Clint >> >> Justin Giles wrote: >> >> Ok, I added a style to my interactor in the following way: >> >> //code >> vtkRenderWindow *renderWindow = vtkRenderWindow::New(); >> renderWindow->SetSize(550, 450); >> renderWindow->AddRenderer(renderer); >> vtkRenderWindowInteractor* inter = QVTKInteractor::New(); >> renderWindow->SetInteractor(inter); >> vtkInteractorStyleImage* interstyle = >> vtkInteractorStyleImage::New(); >> inter->SetInteractorStyle(interstyle); >> view->SetRenderWindow(renderWindow); >> //end code >> >> (where view = QVTKWidget) >> >> And, I still get the same results. Instead of a nice plot, I >> just get a blank white screen. Thoughts? Am I doing something >> wrong? >> >> Thanks, >> >> Justin >> >> On Mon, Feb 23, 2009 at 11:20 AM, Clinton Stimpson >> >> >> >> wrote: >> >> >> Interaction is handled by the interactor style classes. >> >> http://www.vtk.org/doc/nightly/html/classvtkInteractorStyle.html >> >> You can use an existing style, or make your own and give it >> to the >> interactor. >> >> Clint >> >> Justin Giles wrote: >> >> I am able to create a 2d plot using a QVTKWidget, however >> I am >> unable to interact with that plot. I pretty much new to >> VTK, >> so I am kind of at a loss as to how to connect the vtk >> interactors and Qt. I have poked around a bit and noticed a >> QVTKInteractor class, but anything I do with that results in >> my 2d plot going away to be replaced with a blank white >> area. >> Below is the code that I am using. Just as a note, this is >> being done in a class that extends a QMainWindow. >> >> //snippet// >> >> >> view = new QVTKWidget; >> setCentralWidget(view); >> >> int DIM = 500; >> vtkDataArray *dataArray1 = >> vtkDataArray::CreateDataArray(VTK_FLOAT); >> dataArray1->SetNumberOfTuples(DIM); >> >> vtkDataArray *dataArray2 = >> vtkDataArray::CreateDataArray(VTK_FLOAT); >> dataArray2->SetNumberOfTuples(DIM); >> >> int t; >> for (t = 0; t < DIM; t++) >> { >> float x = t; >> float y = vtkMath::Random(0.0f,1.0f); >> dataArray1->SetTuple(t, &x); >> dataArray2->SetTuple(t, &y); >> } >> >> vtkFieldData *fieldData = vtkFieldData::New(); >> fieldData->AllocateArrays(2); >> fieldData->AddArray(dataArray1); >> fieldData->AddArray(dataArray2); >> >> vtkDataObject *dataObject = vtkDataObject::New(); >> dataObject->SetFieldData(fieldData); >> >> vtkXYPlotActor *plot = vtkXYPlotActor::New(); >> plot->AddDataObjectInput(dataObject); >> plot->SetTitle("Plot"); >> plot->SetXTitle("X-Axis"); >> plot->SetYTitle("Y-Axis"); >> plot->SetXValuesToValue(); >> plot->SetWidth(0.9); >> plot->SetHeight(0.9); >> plot->SetPosition(0.05, 0.05); >> plot->LegendOn(); >> plot->PickableOff(); >> plot->PlotCurvePointsOn(); >> plot->PlotCurveLinesOff(); >> >> plot->SetDataObjectXComponent(0, 0); >> plot->SetDataObjectYComponent(0, 1); >> plot->SetPlotColor(0, 1.0, 0.0, 0.0); >> plot->SetPlotLabel(0, "My Label"); >> //plot->GetProperty()->SetColor(0.0, 0.0, 0.0); >> >> vtkRenderer *renderer = vtkRenderer::New(); >> renderer->SetBackground(0, 0, 0); >> renderer->AddActor2D(plot); >> >> vtkRenderWindow *renderWindow = vtkRenderWindow::New(); >> renderWindow->SetSize(550, 450); >> renderWindow->AddRenderer(renderer); >> // vtkRenderWindowInteractor* inter = >> QVTKInteractor::New(); >> // renderWindow->SetInteractor(inter); >> view->SetRenderWindow(renderWindow); >> >> //end-snippet// >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anton.deguet at jhu.edu Mon Feb 23 22:51:22 2009 From: anton.deguet at jhu.edu (Anton Deguet) Date: Mon, 23 Feb 2009 22:51:22 -0500 Subject: [vtkusers] Multi threading question Message-ID: Hello, I have an application with one renderer and multiple actors. Each actor (assembly) is controlled by a different thread and all use a single renderer (running in its own thread). As a temporary solution, I use an application wide mutex lock/unlock for any access to VTK to avoid rendering while a thread is modifying the scene via its actor (threads can modify anything; position, size, visibility, opacity, texture, ... and other non atomic operations). It somewhat works but I am afraid one programmer might forget to lock/unlock the scene before modifying its actors and this might be hard to debug/detect. I am also slightly concerned by long waiting periods to lock the mutex as the application is growing. So, does VTK provide something better than what I am using, i.e. is there any build-in thread safety mechanism that one can use (multiple buffers, queued commands, ...) that would avoid locks. Thank you, Anton Deguet From shenyanwen at gmail.com Tue Feb 24 02:26:43 2009 From: shenyanwen at gmail.com (shenyanwen) Date: Tue, 24 Feb 2009 15:26:43 +0800 Subject: [vtkusers] Which is easier and appropriate Message-ID: <245222690902232326r2f2733f1s28801d22d1f30a5a@mail.gmail.com> I am doing some work about modifying ParaView's source code.I just want to read my custom data which has a file format that ParaView does not recognize.How can I do this more easily.Write my own reader for this file or write a VTK filter that can read this data file and produce VTK data structures? Thanks all~ -- shenyanwen at gmail.com Mobile Phone:13476177952 Tel: 027-87558144 -------------- next part -------------- An HTML attachment was scrubbed... URL: From navneeth.s at ge.com Tue Feb 24 03:32:24 2009 From: navneeth.s at ge.com (S, Navneeth (GE, Research)) Date: Tue, 24 Feb 2009 14:02:24 +0530 Subject: [vtkusers] Overlay Contour on vtkImageViewer2 Message-ID: Hello, I'm trying to overlay a contour corresponding to a segmentation mask on an image displayed using vtkImageViewer2. However, the iso contour lines do not show up correctly (corresponding to the actual boundary) For example if the mask is formated such that the object has label=1, and I use the following to generate the contour: maskContourer = vtkMarchingContourFilter::New(); maskContourer->SetInput( maskImage ); maskContourer->SetValue(0, 1); vtkPolyDataNormals *normals = vtkPolyDataNormals::New(); normals->SetInputConnection( maskContourer->GetOutputPort()); normals->SetFeatureAngle(60.0); vtkPolyDataMapper *contourMapper = vtkPolyDataMapper::New(); contourMapper->SetInputConnection(normals->GetOutputPort()); contourMapper->ScalarVisibilityOff(); vtkActor *contour = vtkActor::New(); contour->SetMapper(contourMapper); myVtkIMageViewer2->GetRenderer()->AddActor( skin ); What could be the reason ? Pl help. thanks, navneeth From mark.gooding at gmail.com Tue Feb 24 04:12:08 2009 From: mark.gooding at gmail.com (Mark Gooding) Date: Tue, 24 Feb 2009 09:12:08 +0000 Subject: [vtkusers] Overlay Contour on vtkImageViewer2 In-Reply-To: References: Message-ID: could you elaborate on the problem - is the contour showing up, but in the wrong place? or is it just not showing up at all? mark 2009/2/24 S, Navneeth (GE, Research) : > Hello, > ? I'm ?trying to overlay a contour corresponding to a segmentation mask > on an image displayed using vtkImageViewer2. > However, the iso contour lines do not show up correctly (corresponding > to the actual boundary) ... From trshash at gmail.com Tue Feb 24 04:20:56 2009 From: trshash at gmail.com (Shashwath T.R.) Date: Tue, 24 Feb 2009 14:50:56 +0530 Subject: [vtkusers] Blocking 'Q' and 'E' keys In-Reply-To: <22167336.post@talk.nabble.com> References: <499FF26E.204@fer.hr> <200902212223.47052.trshash84@gmail.com> <22167336.post@talk.nabble.com> Message-ID: <2a2a16740902240120u35685b7fs55f7e55c8e08c503@mail.gmail.com> On Tue, Feb 24, 2009 at 12:06 AM, amutka wrote: > > Dear Shash, thank you for your answer. > I add event to interactor... > > iren1->AddObserver(vtkCommand::ExitEvent,eventObserver,-5); > > And I caught the ExitEvent in my eventObserver class. How can I abort > event? > I'm using simple class, structure like this > > void PickCommand::Execute(vtkObject *caller,unsigned long event,void * > callData) > { > > switch(event) > { > case vtkCommand::PickEvent: > { > > } > case vtkCommand::ExitEvent > { > .... > } > } > > and I make object from class > > PickCommand * eventObserver = PickCommand::New(); > and I simply add observer > > iren1->AddObserver(vtkCommand::ExitEvent,eventObserver,-5); > > Pressing Q or E Exit event is invoked but how can I block ExitMethod. I > tried to call > vtkCommand::SetAbortEvent > > but i think this is wrong, I need to block interactor events and I don't > know how. I'm sorry for bothering, but I have no idea more, so please give > me another hint! > Thank you! > > Alan > Try vtkCommand::AbortFlagOn(). That should do it... Regards, Shash -------------- next part -------------- An HTML attachment was scrubbed... URL: From trshash at gmail.com Tue Feb 24 04:22:27 2009 From: trshash at gmail.com (Shashwath T.R.) Date: Tue, 24 Feb 2009 14:52:27 +0530 Subject: [vtkusers] Blocking 'Q' and 'E' keys In-Reply-To: <29fcb80a0902211330h51131860l705956efb7511eec@mail.gmail.com> References: <29fcb80a0902211330h51131860l705956efb7511eec@mail.gmail.com> Message-ID: <2a2a16740902240122r6a460c88off97137bf9000b2d@mail.gmail.com> Hi Nick, On Sun, Feb 22, 2009 at 3:00 AM, Nick Gnedin wrote: > Here is a snippet from vtkRenderWindowInteractor.cpp. I think if you > have an empty observer for vtkCommand::ExitEvent, the application > would not terminate. > > > void vtkRenderWindowInteractor::ExitCallback() > { > if (this->HasObserver(vtkCommand::ExitEvent)) > { > this->InvokeEvent(vtkCommand::ExitEvent,NULL); > } > else > { > this->TerminateApp(); > } > } > This should work, but my method will also work for other keystrokes. For example, if you don't want the pick event to be called, you just abort the command when 'P' is detected in CharEvent. Regards, Shash -------------- next part -------------- An HTML attachment was scrubbed... URL: From navneeth.s at ge.com Tue Feb 24 04:35:40 2009 From: navneeth.s at ge.com (S, Navneeth (GE, Research)) Date: Tue, 24 Feb 2009 15:05:40 +0530 Subject: [vtkusers] Overlay Contour on vtkImageViewer2 In-Reply-To: References: Message-ID: It shows up, but in the wrong place. Oddly the contour is at the correct iso-curve on the original image (in vtkImageViewer2). Eg. If I set myVtkImageViewer2->SetInput( orig ); contourer->SetInput( mask ) contourer->SetValue(0, 2); The iso-contour shows up corresponding to intensity=2 on the image=orig. Though, the contourer should generate the same for image=mask ! Thanks ! -----Original Message----- From: Mark Gooding [mailto:mark.gooding at gmail.com] Sent: Tuesday, February 24, 2009 2:42 PM To: S, Navneeth (GE, Research); VTK users group Subject: Re: [vtkusers] Overlay Contour on vtkImageViewer2 could you elaborate on the problem - is the contour showing up, but in the wrong place? or is it just not showing up at all? mark 2009/2/24 S, Navneeth (GE, Research) : > Hello, > ? I'm ?trying to overlay a contour corresponding to a segmentation > mask on an image displayed using vtkImageViewer2. > However, the iso contour lines do not show up correctly (corresponding > to the actual boundary) ... From Michael.Knopke at gmx.de Tue Feb 24 06:17:49 2009 From: Michael.Knopke at gmx.de (Michael Knopke) Date: Tue, 24 Feb 2009 12:17:49 +0100 Subject: [vtkusers] How to change the stiffness of line interpolation curve in vtkContourRepresentation? Message-ID: Hello, I'd like to change the representation of a vtkContourWidget, especially the curvature of the line interpolation between the nodes. VtkContourRepresentation uses vtkBezierContourLineInterpolation as default. Is there an easy way to use splines instead ? (in order to change the stiffness for example) Regards, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Feb 24 08:07:52 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 24 Feb 2009 08:07:52 -0500 Subject: [vtkusers] vtkPolyData vs vtkUnstructuredGrid In-Reply-To: References: Message-ID: vtp is more limited in that it is limited to containing only 2D cell types, for example triangles. vtu can contain those as well as 3D cell types such as tetrahedra. As far as which structure can be set as input to more filters, I can not say. Many filters will accept either, by virtue of their sharing a common superclass. On Sun, Feb 15, 2009 at 5:46 PM, David Doria wrote: > I want to store triangulated models (ie a list of triangles). However, > I would like to be able to use as many filters as possible. Which > format should I use? It seems that more filters are available in > ParaView for the file that I write as vtp, but I thought vtu was > supposed to be the most general? > > Thanks, > > David > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From dave.demarle at kitware.com Tue Feb 24 08:17:10 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 24 Feb 2009 08:17:10 -0500 Subject: [vtkusers] How to have vtkCells refer to the same vtkPoints array? In-Reply-To: <818aad690902231549i6f94cf1cycc8f820e83c63f8e@mail.gmail.com> References: <818aad690902231549i6f94cf1cycc8f820e83c63f8e@mail.gmail.com> Message-ID: On Mon, Feb 23, 2009 at 6:49 PM, Robbie Jaeger wrote: > Hello, > > I am creating an unstructured grid that contains all cells and would like to > define all of my vtkPoints first, and then create cells that refer to these > points (create nodes, then elements from nodes).? Is this possible? Yes. It was designed to be used that way. In: vtkUnstructuredGrid::InsertNextCell(int cellType, vtkIdList *ptIds) ptIds is a list of indices into the vtkPoints list. -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From dave.demarle at kitware.com Tue Feb 24 08:24:42 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 24 Feb 2009 08:24:42 -0500 Subject: [vtkusers] Which is easier and appropriate In-Reply-To: <245222690902232326r2f2733f1s28801d22d1f30a5a@mail.gmail.com> References: <245222690902232326r2f2733f1s28801d22d1f30a5a@mail.gmail.com> Message-ID: On Tue, Feb 24, 2009 at 2:26 AM, shenyanwen wrote: > ??? I am doing some work about modifying ParaView's source code.I just want > to read my custom data which has a file format that > ParaView does not recognize.How can I do this more easily.Write my own > reader for this file or write a VTK filter that can read this > data file and produce VTK data structures? > Thanks all~ A reader is nothing more than a filter that has zero inputs that reads a file and produces VTK data set structures. Once you have the VTK class working, letting ParaView use it is a simple process, which is described in the ParaView book and on the ParaView plugins wiki page. > > -- > shenyanwen at gmail.com > Mobile Phone:13476177952 > Tel: 027-87558144 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From dave.demarle at kitware.com Tue Feb 24 08:30:12 2009 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 24 Feb 2009 08:30:12 -0500 Subject: [vtkusers] Multi threading question In-Reply-To: References: Message-ID: What you are doing is correct. VTK is not thread safe, so in general you have to protect against concurrent access manually as you have done. On Mon, Feb 23, 2009 at 10:51 PM, Anton Deguet wrote: > Hello, > > I have an application with one renderer and multiple actors. ?Each actor (assembly) is controlled by a different thread and all use a single renderer (running in its own thread). ?As a temporary solution, I use an application wide mutex lock/unlock for any access to VTK to avoid rendering while a thread is modifying the scene via its actor (threads can modify anything; position, size, visibility, opacity, texture, ... and other non atomic operations). ?It somewhat works but I am afraid one programmer might forget to lock/unlock the scene before modifying its actors and this might be hard to debug/detect. ?I am also slightly concerned by long waiting periods to lock the mutex as the application is growing. > > So, does VTK provide something better than what I am using, i.e. is there any build-in thread safety mechanism that one can use (multiple buffers, queued commands, ...) that would avoid locks. > > Thank you, > > Anton Deguet > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- David E DeMarle Kitware, Inc. R&D Engineer 28 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-371-3971 x109 From dhoppes at mbfbioscience.com Tue Feb 24 09:27:31 2009 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Tue, 24 Feb 2009 09:27:31 -0500 Subject: [vtkusers] Image Actor Showing only one channel Message-ID: Hi all, I have a standard RGB image and would like to show only the Red, Green OR blue channel in my image. What is the best way to load the image so that I can toggle between the different channels? Would there be one actor for each channel (comprising a total of 4 actors... Red, Green, Blue, and RGB)? Or would it be better to swap the channel image on the fly when the user hits a particular key? Doug ---------------------------------------------------------------------- Doug Hoppes dhoppes at mbfbioscience.com Senior Software Engineer MBF Bioscience (Microbrightfield, Inc.) +1.802.288.9290 ext: 119 www.mbfbioscience.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.bertel at kitware.com Tue Feb 24 09:43:11 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Tue, 24 Feb 2009 09:43:11 -0500 Subject: [vtkusers] Image Actor Showing only one channel In-Reply-To: References: Message-ID: Hello, By default (ie for free), the hardware multiplies the texture color value by the current state color. It means you can use the color on the actor as a filter. If you set the color on the actor to red (1.0,0.0,0.0), the color of the rendered pixel on screen will be the texture color "times" red. The green and blue will automatically be black. My recommendation is to use a single actor with the RGB texture and change the color of the actor when the user hits a particular key. On Tue, Feb 24, 2009 at 9:27 AM, Doug Hoppes wrote: > Hi all, > > > > ??????????? I have a standard RGB image and would like to show only the Red, > Green OR blue channel in my image.? What is the best way to load the image > so that I can toggle between the different channels?? Would there be one > actor for each channel (comprising a total of 4 actors? Red, Green, Blue, > and RGB)?? Or would it be better to swap the channel image on the fly when > the user hits a particular key? > > > > Doug > > > > ---------------------------------------------------------------------- > > Doug Hoppes dhoppes at mbfbioscience.com > > Senior Software Engineer > > MBF Bioscience (Microbrightfield, Inc.) > > +1.802.288.9290 ext: 119 > > www.mbfbioscience.com > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From mike.jackson at bluequartz.net Tue Feb 24 10:02:36 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Tue, 24 Feb 2009 10:02:36 -0500 Subject: [vtkusers] Which is easier and appropriate In-Reply-To: <245222690902232326r2f2733f1s28801d22d1f30a5a@mail.gmail.com> References: <245222690902232326r2f2733f1s28801d22d1f30a5a@mail.gmail.com> Message-ID: <998E2AA5-E90E-40EE-B493-D7BCF00F5A08@bluequartz.net> A non-text attachment was scrubbed... Name: MyReaderPlugin.zip Type: application/zip Size: 3916 bytes Desc: not available URL: -------------- next part -------------- Here is some example code to get you started. _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 24, 2009, at 2:26 AM, shenyanwen wrote: > I am doing some work about modifying ParaView's source code.I > just want to read my custom data which has a file format that > ParaView does not recognize.How can I do this more easily.Write my > own reader for this file or write a VTK filter that can read this > data file and produce VTK data structures? > Thanks all~ > > -- > shenyanwen at gmail.com > Mobile Phone:13476177952 > Tel: 027-87558144 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From Michael.Knopke at gmx.de Tue Feb 24 11:01:42 2009 From: Michael.Knopke at gmx.de (Michael Knopke) Date: Tue, 24 Feb 2009 17:01:42 +0100 Subject: [vtkusers] vtkImageAccumulate using volume too slow Message-ID: <5BAD9390F2FC413CBAEC903545D34667@imagesystems.local> Hello, I'm looking for a fast way to build a histogram that represents the voxel distribution in an volume (e.g. 512,512,900). It's 1 component scalar data (ct slices) represented as unsigned short (shifted). When using vtkImageAccumulate the following approach works fine when using 2D images (e.g. one slice): double get_range[2]; double range; mySlice->GetOutput()->GetScalarRange(get_range); // e.g. vtkImageData with extent (0,511,0,511,0,1); range = get_range[1] - get_range[0]; int numbins=range/2; vtkImageAccumulate *histo = vtkImageAccumulate::New(); histo->SetInput(ResliceInstance->GetOutput()); //histo->SetInput(SourceObject->GetImageData()); histo->SetComponentSpacing((get_range[1]/numbins),1,1); histo->SetComponentExtent(0,numbins,0,0,0,0); histo->SetComponentOrigin(0,0,0); ... then drawing it vtk vtkImageCanvasSource2D or vtkXYPlotActor (like in vtkHistogramWidget.tcl) But this represents only the histogram over one slice. However if I use the whole volume, the histogram is not drawn correctly and computation with vtkImageAccumulate uses alot of memory and is very slow. Is there a better way to do this kind of task? Regards Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From Aurelie.Larcher at imag.fr Tue Feb 24 11:33:56 2009 From: Aurelie.Larcher at imag.fr (=?ISO-8859-1?Q?Aur=E9lie_Larcher?=) Date: Tue, 24 Feb 2009 17:33:56 +0100 Subject: [vtkusers] Rotation with vtkProp3D (Set/GetOrientation) Message-ID: <49A42174.1040907@imag.fr> Hello, I don't understand why, when I orientate the Y axes of an actor with the function setOrientation(0,90,0), my actor doesn't rotate. It's exactly the same representation if I set the orientation to (0,0,0) or (0,45,0) or another y-value. Is anybody can explain me ? Here a piece of code and the 3D object. ***** vtkPolyDataReader *outils = vtkPolyDataReader::New(); outils->SetFileName( "C:/Images/vtk/outils.vtk" ); vtkPolyDataMapper *outilsMapper = vtkPolyDataMapper::New(); outilsMapper->SetInput(outils->GetOutput()); outilsMapper->ScalarVisibilityOff(); vtkActor *outilRouge = vtkActor::New(); outilRouge->SetMapper(outilsMapper); outilRouge->GetProperty()->SetDiffuseColor(1, .49, .25); outilRouge->GetProperty()->SetSpecular(0); outilRouge->GetProperty()->SetSpecularPower(20); outilRouge->GetProperty()->SetColor( 1.0, 0, 0 ); outilRouge->GetProperty()->SetOpacity( 1 ); outilRouge->SetOrigin(0,0,0); outilRouge->SetPosition(0,0,0); outilRouge->SetOrientation(0,90,0); // or (0,0,0) or (0,10,0) or (0,45,0)... vtkRenderer *rendu3D2 = vtkRenderer::New(); vtkRenderWindow *fenetre = vtkRenderWindow::New(); vtkRenderWindowInteractor *interactor = vtkRenderWindowInteractor::New(); rendu3D2->AddActor(outilRouge); rendu3D2->SetBackground(0,0,0); rendu3D2->ResetCamera(); rendu3D2->GetActiveCamera()->Elevation(90); fenetre->AddRenderer(rendu3D2); fenetre->SetSize(600,600); interactor->SetRenderWindow(fenetre); fenetre->Render(); interactor->Initialize(); interactor->Start(); ***** For the curious, I have an other problem certainly linked in my understanding problem : - The object (actor) is positioned and rotated according to his center. I can obtain this coordinates (x,y,z). - I know the distance between the center and the extremity. - The origine is set to (0,0,0) - Any orientation could be performed in x-y and z axes, I have this angles with the function GetOrientation() ==> I would like to know WHERE is the coordinates (x',y',z') of the extremity of my actor. ... It seems nevertheless simple ... Thanks for your help ! Aur?lie -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: outils.vtk URL: From gbook at gbook.org Tue Feb 24 12:51:33 2009 From: gbook at gbook.org (Greg Book) Date: Tue, 24 Feb 2009 12:51:33 -0500 Subject: [vtkusers] basic vtkImageViewer questions Message-ID: <49A433A5.1070903@gbook.org> An HTML attachment was scrubbed... URL: From karthik.krishnan at kitware.com Tue Feb 24 13:40:05 2009 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Tue, 24 Feb 2009 13:40:05 -0500 Subject: [vtkusers] Overlay Contour on vtkImageViewer2 In-Reply-To: References: Message-ID: <9ddb27260902241040s2e3f1fem16ffc5b91a3a2fc4@mail.gmail.com> Perhaps your mask and input images have different locations in physical space. (origin,/ extent etc). -- k On Tue, Feb 24, 2009 at 4:35 AM, S, Navneeth (GE, Research) < navneeth.s at ge.com> wrote: > It shows up, but in the wrong place. > Oddly the contour is at the correct iso-curve on the original image (in > vtkImageViewer2). > > Eg. If I set > myVtkImageViewer2->SetInput( orig ); > > contourer->SetInput( mask ) > contourer->SetValue(0, 2); > > The iso-contour shows up corresponding to intensity=2 on the image=orig. > Though, the contourer should generate the same for image=mask ! > > Thanks ! > > -----Original Message----- > From: Mark Gooding [mailto:mark.gooding at gmail.com] > Sent: Tuesday, February 24, 2009 2:42 PM > To: S, Navneeth (GE, Research); VTK users group > Subject: Re: [vtkusers] Overlay Contour on vtkImageViewer2 > > could you elaborate on the problem - is the contour showing up, but in the > wrong place? or is it just not showing up at all? > > mark > > 2009/2/24 S, Navneeth (GE, Research) : > > Hello, > > I'm trying to overlay a contour corresponding to a segmentation > > mask on an image displayed using vtkImageViewer2. > > However, the iso contour lines do not show up correctly (corresponding > > to the actual boundary) > ... > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Karthik Krishnan R&D Engineer, Kitware Inc. Ph: 518 371 3971 x119 Fax: 518 371 3971 -------------- next part -------------- An HTML attachment was scrubbed... URL: From karthik.krishnan at kitware.com Tue Feb 24 13:42:50 2009 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Tue, 24 Feb 2009 13:42:50 -0500 Subject: [vtkusers] How to change the stiffness of line interpolation curve in vtkContourRepresentation? In-Reply-To: References: Message-ID: <9ddb27260902241042i3966da9ax64ddd95d375bf0f8@mail.gmail.com> Its meant to be extensible. You will need to subclass vtkContourLineInterpolator and add your spline interpolation there. Perhaps you can use the existing splines from the ImageTracerWidget and rework it into a vtkContourLineInterpolator class. -- karthik On Tue, Feb 24, 2009 at 6:17 AM, Michael Knopke wrote: > Hello, > > > > I?d like to change the representation of a vtkContourWidget, especially the > curvature of the line interpolation between the nodes. > > VtkContourRepresentation uses vtkBezierContourLineInterpolation as default. > Is there an easy way to use splines instead ? (in order to change the > stiffness for example) > > Regards, > > > > Michael > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Karthik Krishnan R&D Engineer, Kitware Inc. Ph: 518 371 3971 x119 Fax: 518 371 3971 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jtgiles at gmail.com Tue Feb 24 15:09:06 2009 From: jtgiles at gmail.com (Justin Giles) Date: Tue, 24 Feb 2009 14:09:06 -0600 Subject: [vtkusers] vtkXYPlotActor & viewport coordinates Message-ID: I'm attempting to get Plot coordinates in a vtkXYPlotActor. I am able to get viewport coordinates (ie: 0,0 = bottom left corner of the window), but I am at a loss on how to map those into coordinates of points in my xy Plot. I have attempted to use ViewportToPlot(), but that doesn't seem to work properly (or causes a seg fault). Any thoughts on this or examples? Am I missing a key element here? Thanks, Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiksed at yahoo.com Tue Feb 24 18:03:01 2009 From: jiksed at yahoo.com (Jim) Date: Tue, 24 Feb 2009 15:03:01 -0800 (PST) Subject: [vtkusers] Failed to run C++ examples In-Reply-To: Message-ID: <440677.50826.qm@web32008.mail.mud.yahoo.com> Dear vtkusers, ? I built vtk-5.2.1 and c++ examples in VS2008 without any errors. My TCL examples run fine. However, when I ran Arrays.exe or Cube.exe, I didn't see anything rendered on the screen, and no error messages either. I tried both BUILD_SHARED_LIBS=OFF and ON, and I also tried both Debug and Release builds. It didn't make any difference. I am completely lost. Someone please help me out. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From navneeth.s at ge.com Tue Feb 24 23:47:12 2009 From: navneeth.s at ge.com (S, Navneeth (GE, Research)) Date: Wed, 25 Feb 2009 10:17:12 +0530 Subject: [vtkusers] Overlay Contour on vtkImageViewer2 In-Reply-To: <9ddb27260902241040s2e3f1fem16ffc5b91a3a2fc4@mail.gmail.com> References: <9ddb27260902241040s2e3f1fem16ffc5b91a3a2fc4@mail.gmail.com> Message-ID: I've put together a tcl script to show what I mean (see attached). This script: 1) Generates a synthetic image composed of spheres 2) Uses either vtkContourer or vtkDiscreteMarchingCubes to extract the contour. 3) Renders the result of 2 independently & also inside a vtkImageViewer Notice that though the contour (in this case 3D) shows up on the vanilla renderer it does not show up on the vtkImageViewer !. What could be happening ? Thanks for your help, navneeth ________________________________ From: Karthik Krishnan [mailto:karthik.krishnan at kitware.com] Sent: Wednesday, February 25, 2009 12:10 AM To: S, Navneeth (GE, Research) Cc: Mark Gooding; VTK users group Subject: Re: [vtkusers] Overlay Contour on vtkImageViewer2 Perhaps your mask and input images have different locations in physical space. (origin,/ extent etc). -- k On Tue, Feb 24, 2009 at 4:35 AM, S, Navneeth (GE, Research) wrote: It shows up, but in the wrong place. Oddly the contour is at the correct iso-curve on the original image (in vtkImageViewer2). Eg. If I set myVtkImageViewer2->SetInput( orig ); contourer->SetInput( mask ) contourer->SetValue(0, 2); The iso-contour shows up corresponding to intensity=2 on the image=orig. Though, the contourer should generate the same for image=mask ! Thanks ! -----Original Message----- From: Mark Gooding [mailto:mark.gooding at gmail.com] Sent: Tuesday, February 24, 2009 2:42 PM To: S, Navneeth (GE, Research); VTK users group Subject: Re: [vtkusers] Overlay Contour on vtkImageViewer2 could you elaborate on the problem - is the contour showing up, but in the wrong place? or is it just not showing up at all? mark 2009/2/24 S, Navneeth (GE, Research) : > Hello, > I'm trying to overlay a contour corresponding to a segmentation > mask on an image displayed using vtkImageViewer2. > However, the iso contour lines do not show up correctly (corresponding > to the actual boundary) ... _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -- Karthik Krishnan R&D Engineer, Kitware Inc. Ph: 518 371 3971 x119 Fax: 518 371 3971 -------------- next part -------------- A non-text attachment was scrubbed... Name: TestContourOverlay.tcl Type: application/octet-stream Size: 2540 bytes Desc: TestContourOverlay.tcl URL: From J.S.Wijnhout at lumc.nl Wed Feb 25 05:19:13 2009 From: J.S.Wijnhout at lumc.nl (J.S.Wijnhout at lumc.nl) Date: Wed, 25 Feb 2009 11:19:13 +0100 Subject: [vtkusers] QVTKWidget with vtkImageViewer2 glitch Message-ID: Hi, For starters, I have read the thread on this issue: http://www.vtk.org/pipermail/vtkusers/2008-November/098242.html However I managed to get vtkImageViewer2 working inside a QVTKWidget, with one glitch however. The sample code is printed at the bottom of the screen. The way I got this to work relies on the order in which calls to Render and SetRenderWindow are made. First I render the image viewer by calling vtkImageViewer2::Render, after that I attach the image viewer render window to the QVTKWidget. This works, but because I call render first a separate render window is created and then (after the call to QVTKWidget::SetRenderWindow) reparented to the QVTKWidget. This happens really fast, so I guess I could live with it. But it keeps me wondering what I should do to have it functioning properly. Any advice on how to circumvent or fix vtkImageViewer2 would be welcome. best, Jeroen #include #include #include #include #include #include #include #include #include int main ( int argc, char **argv ) { QApplication app(argc,argv); const char* fileName = argv[1]; QMainWindow w; w.statusBar()->showMessage(fileName); QVTKWidget vtkWidget; vtkWidget.setAutomaticImageCacheEnabled(false); w.setCentralWidget(&vtkWidget); vtkPNGReader *reader1 = vtkPNGReader::New (); reader1->SetFileName(fileName); reader1->Update (); vtkImageViewer2 *viewer1 = vtkImageViewer2::New (); viewer1->SetInput(reader1->GetOutput()); viewer1->SetupInteractor(vtkWidget.GetInteractor()); viewer1->Render (); viewer1->SetRenderWindow(vtkWidget.GetRenderWindow()); w.show (); app.exec (); viewer1->Delete (); reader1->Delete (); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From nourmestiri at yahoo.fr Wed Feb 25 06:07:20 2009 From: nourmestiri at yahoo.fr (Nour Mestiri) Date: Wed, 25 Feb 2009 11:07:20 +0000 (GMT) Subject: [vtkusers] Smoothing features lines Message-ID: <203364.12859.qm@web28212.mail.ukl.yahoo.com> Hi all vtk users. I'm using 'vtkFeatureEdges' to extract special lines on a mesh. I have good results but ther's also many fragment of lines which have not any signification or which are discontinuous. I don't know how to elimintae those pieces to keep just the significant lines. Can some one help me? Thank you soooo much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ch.monty.burns at googlemail.com Wed Feb 25 10:17:27 2009 From: ch.monty.burns at googlemail.com (Charles Monty Burns) Date: Wed, 25 Feb 2009 16:17:27 +0100 Subject: [vtkusers] Using PointLocator and insert points Message-ID: Hello, I will use the vtkPointLocator to detect wheather a point exist in a special space in my polydata-mesh. If no one exist I will add one, but the added point should be available to the locator for a further search. How can I do this? The point will be added to the mesh and should also available to the locator. Greetings From mike.jackson at bluequartz.net Wed Feb 25 10:54:24 2009 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Wed, 25 Feb 2009 10:54:24 -0500 Subject: [vtkusers] Using PointLocator and insert points In-Reply-To: References: Message-ID: Take a look at the vtkSTLReader class. It does this type of operation I believe. _________________________________________________________ Mike Jackson mike.jackson at bluequartz.net BlueQuartz Software www.bluequartz.net Principal Software Engineer Dayton, Ohio On Feb 25, 2009, at 10:17 AM, Charles Monty Burns wrote: > Hello, > > I will use the vtkPointLocator to detect wheather a point exist in a > special space in my polydata-mesh. If no one exist I will add one, but > the added point should be available to the locator for a further > search. > > How can I do this? The point will be added to the mesh and should also > available to the locator. > > Greetings > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From jtgiles at gmail.com Wed Feb 25 12:08:03 2009 From: jtgiles at gmail.com (Justin Giles) Date: Wed, 25 Feb 2009 11:08:03 -0600 Subject: [vtkusers] vtkXYPlotActor & symbols & glyphs Message-ID: Anyone have any pointers on how to get the plot symbol in the vtkXYPLotActor to be the same as what the Glyph is set to. For instance say I do this: vtkXYPlotActor* plot = vtkXYPlotActor::New(); plot->GetGlyphSource()->SetGlyphTypeToCross(); plot->GetGlyphSource()->CrossOn(); This changes the symbol in the legend to a cross, however it doesn't change the actual points. I'm assuming I need to use something like SetPlotSymbol(), but I am unsure how to get the exact same shape as what the Glyph is set at. Any help is greatly appreciated. Thanks, Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiksed at yahoo.com Wed Feb 25 12:51:47 2009 From: jiksed at yahoo.com (Jim) Date: Wed, 25 Feb 2009 09:51:47 -0800 (PST) Subject: [vtkusers] Failed to run C++ examples In-Reply-To: <440677.50826.qm@web32008.mail.mud.yahoo.com> Message-ID: <843459.88861.qm@web32001.mail.mud.yahoo.com> I googled around and followed guides on this website http://vtkblog.blogspot.com/.? I build vtk_minimal successfully but nothing showed on the screen (not even an error message) when I run vtk_minimal.exe. I exhausted my effort but could not figure out what is wrong. I am sure a lot of people on this mailing list use vtk with Visual Studio on a daily basis. Someone please help me get started. ? Thank you. Jim. --- On Tue, 2/24/09, Jim wrote: From: Jim Subject: Re: [vtkusers] Failed to run C++ examples To: vtkusers at vtk.org Date: Tuesday, February 24, 2009, 4:03 PM Dear vtkusers, ? I built vtk-5.2.1 and c++ examples in VS2008 without any errors. My TCL examples run fine. However, when I ran Arrays.exe or Cube.exe, I didn't see anything rendered on the screen, and no error messages either. I tried both BUILD_SHARED_LIBS=OFF and ON, and I also tried both Debug and Release builds. It didn't make any difference. I am completely lost. Someone please help me out. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Wed Feb 25 12:55:17 2009 From: drescherjm at gmail.com (John Drescher) Date: Wed, 25 Feb 2009 12:55:17 -0500 Subject: [vtkusers] Failed to run C++ examples In-Reply-To: <843459.88861.qm@web32001.mail.mud.yahoo.com> References: <440677.50826.qm@web32008.mail.mud.yahoo.com> <843459.88861.qm@web32001.mail.mud.yahoo.com> Message-ID: <387ee2020902250955y3c863708l8c457245d03e2939@mail.gmail.com> > I googled around and followed guides on this website > http://vtkblog.blogspot.com/.? I build vtk_minimal successfully but nothing > showed on the screen (not even an error message) when I run vtk_minimal.exe. > I exhausted my effort but could not figure out what is wrong. I am sure a > lot of people on this mailing list use vtk with Visual Studio on a daily > basis. Someone please help me get started. > One problem is not all of us are using Visual Studio 2008. I use 2005 the most. John From clinton at elemtech.com Wed Feb 25 13:06:31 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Wed, 25 Feb 2009 11:06:31 -0700 Subject: [vtkusers] QVTKWidget with vtkImageViewer2 glitch In-Reply-To: References: Message-ID: <49A588A7.1060206@elemtech.com> Here's what I understand is happening. vtkImageViewer2::Render assumes it can change the size of the window and places the image accordingly. When embedded in a GUI, the size of the window can't always be changed, so the image shows up in the wrong place based on what it thought the window size was. Your workaround give vtkImageViewer2 a chance to successfully resize a window and initialize the camera properly based on that, then you replaced the window and kept the correctly initialized camera. There are probably other workarounds, such as fixing the camera yourself. I'd file a bug against vtkImageViewer2. Clint J.S.Wijnhout at lumc.nl wrote: > Hi, > > For starters, I have read the thread on this issue: > http://www.vtk.org/pipermail/vtkusers/2008-November/098242.html > > However I managed to get vtkImageViewer2 working inside a QVTKWidget, > with one glitch however. The sample code is printed at the bottom of > the screen. > The way I got this to work relies on the order in which calls to > Render and SetRenderWindow are made. First I render the image viewer > by calling vtkImageViewer2::Render, after that I attach the image > viewer render window to the QVTKWidget. This works, but because I call > render first a separate render window is created and then (after the > call to QVTKWidget::SetRenderWindow) reparented to the QVTKWidget. > This happens really fast, so I guess I could live with it. But it > keeps me wondering what I should do to have it functioning properly. > Any advice on how to circumvent or fix vtkImageViewer2 would be welcome. > > best, > Jeroen > > > #include > #include > #include > #include > #include > > #include > > #include > #include > #include > > int main ( int argc, char **argv ) > { > QApplication app(argc,argv); > > const char* fileName = argv[1]; > > QMainWindow w; > w.statusBar()->showMessage(fileName); > > QVTKWidget vtkWidget; > vtkWidget.setAutomaticImageCacheEnabled(false); > w.setCentralWidget(&vtkWidget); > > vtkPNGReader *reader1 = vtkPNGReader::New (); > reader1->SetFileName(fileName); > reader1->Update (); > > vtkImageViewer2 *viewer1 = vtkImageViewer2::New (); > viewer1->SetInput(reader1->GetOutput()); > viewer1->SetupInteractor(vtkWidget.GetInteractor()); > viewer1->Render (); > viewer1->SetRenderWindow(vtkWidget.GetRenderWindow()); > > w.show (); > > app.exec (); > > viewer1->Delete (); > reader1->Delete (); > } > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From jiksed at yahoo.com Wed Feb 25 13:59:00 2009 From: jiksed at yahoo.com (Jim) Date: Wed, 25 Feb 2009 10:59:00 -0800 (PST) Subject: [vtkusers] Failed to run C++ examples In-Reply-To: <387ee2020902250955y3c863708l8c457245d03e2939@mail.gmail.com> Message-ID: <363805.45451.qm@web32001.mail.mud.yahoo.com> Dear John, ? Thank you so much for pointing out the compiler version issue. You made my day! In one trial with VS2005 (BUILD_SHARED_LIBS=OFF), my vtk C++ examples run beautifully without any turns and twists. There must be an incorrect parameter or a bug somewhere which failed my VS2008 build. ? I am very grateful for John's hint. Every response counts! ? --- On Wed, 2/25/09, John Drescher wrote: From: John Drescher Subject: Re: [vtkusers] Failed to run C++ examples To: jiksed at yahoo.com Cc: vtkusers at vtk.org Date: Wednesday, February 25, 2009, 10:55 AM > I googled around and followed guides on this website > http://vtkblog.blogspot.com/.? I build vtk_minimal successfully but nothing > showed on the screen (not even an error message) when I run vtk_minimal.exe. > I exhausted my effort but could not figure out what is wrong. I am sure a > lot of people on this mailing list use vtk with Visual Studio on a daily > basis. Someone please help me get started. > One problem is not all of us are using Visual Studio 2008. I use 2005 the most. John -------------- next part -------------- An HTML attachment was scrubbed... URL: From alberto.email at tiscali.it Wed Feb 25 14:14:04 2009 From: alberto.email at tiscali.it (Alberto Orlandini) Date: Wed, 25 Feb 2009 20:14:04 +0100 Subject: [vtkusers] vtkFLTK building problems In-Reply-To: <49A27AFE.4090408@tiscali.it> References: <49A27AFE.4090408@tiscali.it> Message-ID: <49A5987C.8030704@tiscali.it> I finally managed to build everything! I just tried different combinations of the projects' versions... this one worked for me: vtk 5.0 fltk 1.1.7 vtkfltk 0.6.1 I used cmake 2.6 to build vtk and fltk for VS9 2008, then I removed the #warning preprocessor directive which was not supported by MSVS, I included to solve problems about redefinitions of functions like GetClassName into GetClassNameA, and I finally downloaded the full opengl includes and libs from microsoft.com and it worked From dqchen at cvip.louisville.edu Wed Feb 25 17:56:52 2009 From: dqchen at cvip.louisville.edu (Dongqing Chen) Date: Wed, 25 Feb 2009 14:56:52 -0800 Subject: [vtkusers] generate surface mesh using vtkSTLwriter? Message-ID: <1C761F6676054A67B451E5FF08A0D461@cvipchen> Dear All: I could generate the volume mesh of a segmented volumetric dataset using vtkSTLwriter. Then how to get the surface mesh? Thank you. Best Wishes, ----------------------------------------------------------------------------- Dongqing Chen, Ph.D. Computer Vision & Image Processing (CVIP) Lab Department of Electrical & Computer Engineering Speed School of Engineering University of Louisville Louisville, KY, 40292 U.S.A email: dqchen at cvip.louisville.edu phone: 1-502-852-2789 (Lab) 1-502-852-6130 (Office) ---------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From preet.desai at gmail.com Wed Feb 25 16:27:30 2009 From: preet.desai at gmail.com (Preet) Date: Wed, 25 Feb 2009 16:27:30 -0500 Subject: [vtkusers] Installing VTK with X11 and Python wrapping on OS X Message-ID: <8057bdcf0902251327u724ca230k709ee629272a8932@mail.gmail.com> Hey all, I've had a lot of trouble installing VTK with X11 (no cocoa or carbon) and python wrapping on OS X Leopard. Here's what I change from defaults in CMakeCache.txt: VTK_SHARED_LIBS: ON VTK_USE_COCOA: OFF VTK_USE_CARBON: OFF VTK_USE_X: ON VTK_USE_GUISUPPORT: ON VTK_WRAP_PYTHON: OFF CMAKE_INSTALL_PREFIX=/Users/preet/Development/VTKBin OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib OPENGL_INCLUDE_DIR:PATH=/usr/X11R6/include After compiling I open up terminal and try the following using a python interpreter: import vtk Here's what I get: Python 2.5.1 (r251:54863, Nov 11 2008, 17:46:48) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import vtk Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.5/site-packages/VTK-5.2.1-py2.5.egg/vtk/__init__.py", line 41, in from common import * File "/Library/Python/2.5/site-packages/VTK-5.2.1-py2.5.egg/vtk/common.py", line 7, in from libvtkCommonPython import * ImportError: dlopen(/Library/Python/2.5/site-packages/VTK-5.2.1-py2.5.egg/vtk/libvtkCommonPython.so, 10): Library not loaded: libvtkCommonPythonD.5.2.dylib Referenced from: /Library/Python/2.5/site-packages/VTK-5.2.1-py2.5.egg/vtk/libvtkCommonPython.so Reason: image not found I'd appreciate any advice... Regards, -Preet -------------- next part -------------- An HTML attachment was scrubbed... URL: From costabel at wanadoo.fr Wed Feb 25 19:08:16 2009 From: costabel at wanadoo.fr (Martin Costabel) Date: Thu, 26 Feb 2009 01:08:16 +0100 Subject: [vtkusers] Installing VTK with X11 and Python wrapping on OS X In-Reply-To: <8057bdcf0902251327u724ca230k709ee629272a8932@mail.gmail.com> References: <8057bdcf0902251327u724ca230k709ee629272a8932@mail.gmail.com> Message-ID: <49A5DD70.70202@wanadoo.fr> Preet wrote: > Hey all, > > I've had a lot of trouble installing VTK with X11 (no cocoa or carbon) > and python wrapping on OS X Leopard. > > Here's what I change from defaults in CMakeCache.txt: [] > VTK_WRAP_PYTHON: OFF OFF? I thought you wanted python wrapping? [] > from libvtkCommonPython import * > ImportError: > dlopen(/Library/Python/2.5/site-packages/VTK-5.2.1-py2.5.egg/vtk/libvtkCommonPython.so, > 10): Library not loaded: libvtkCommonPythonD.5.2.dylib > Referenced from: > /Library/Python/2.5/site-packages/VTK-5.2.1-py2.5.egg/vtk/libvtkCommonPython.so > Reason: image not found Look at libvtkCommonPython.so with "otool -L libvtkCommonPython.so" to see where it thinks libvtkCommonPythonD.5.2.dylib is living. If it does not specify a path, as I suspect, then you can set the environment variable DYLD_FALLBACK_LIBRARY_PATH to the directory where this dylib is living (assuming vtk built and installed it somewhere). You may be victim of a bug in cmake that does not do the right install_name_tool tricks for python modules as it does for dylibs and for other executables. You can build with VTK_USE_RPATH=ON but you must then set, during build time, the environment variable DYLD_LIBRARY_PATH to `pwd`/bin, otherwise the executables that run at build time won't find their dylibs. I have been bitten by this when building the Fink package for vtk52, but Fink has now all 3 variants x11, carbon, and cocoa, that build correctly. -- Martin From yguo2006 at gmail.com Wed Feb 25 19:43:12 2009 From: yguo2006 at gmail.com (Eugene Guo) Date: Wed, 25 Feb 2009 16:43:12 -0800 Subject: [vtkusers] Catch Exceptions of vtkSTLReader Message-ID: Hi, I am trying to catch the exception by vtkSTLReader (e.g. to read a non-exist STL file), so that the vtkOutputWindow will not show up. I added two observer events (vtkCommand::ErrorEvent and vtkCommand::WarningEvent) to the reader, then use Try...Catch. It looks that the error event was caught, since the error message was printed on the screen; but the vtkOutputWindow is also displayed while the "Update()" is executed. vtkMyObserver *errObserver = vtkMyObserver::New(); vtkSTLReader *stlReader; stlReader = vtkSTLReader::New(); stlReader->SetFileName("abc.stl"); // random name which will be sure to throw an exception stlReader->AddObserver(vtkCommand::ErrorEvent,errObserver); stlReader->AddObserver(vtkCommand::WarningEvent,errObserver); stlReader->AddObserver(vtkCommand::AbortCheckEvent,errObserver); try { stlReader->Update(); } catch (...){ } if (errObserver->GetVTKError()) { cout << "Caught an vtkSTLReader exception \n"; return false; } However, the same sequence of code works perfectly for vtkPolyDataReader. I only saw the error message, while the vtkOutputWindow was not shown at all. vtkMyObserver *errObserver = vtkMyObserver::New(); vtkPolyDataReader *vtkReader; vtkReader = vtkSTLReader::New(); vtkReader->SetFileName("abc.vtk"); // random name which will be sure to throw an exception vtkReader->AddObserver(vtkCommand::ErrorEvent,errObserver); vtkReader->AddObserver(vtkCommand::WarningEvent,errObserver); vtkReader->AddObserver(vtkCommand::AbortCheckEvent,errObserver); try { stlReader->Update(); } catch (...){ } if (errObserver->GetVTKError()) { cout << "Caught an vtkPolyDataReader exception \n"; return false; } Any comments or suggestions are appreciated. Thanks Eugene -------------- next part -------------- An HTML attachment was scrubbed... URL: From jtgiles at gmail.com Wed Feb 25 19:51:05 2009 From: jtgiles at gmail.com (Justin Giles) Date: Wed, 25 Feb 2009 18:51:05 -0600 Subject: [vtkusers] Users guide Message-ID: Does anyone know how extensive 2D plotting is covered in the VTK users guide? Anything beyond the source code examples provided in the VTK source code? I'm just a bit leery shelling out $80 if it isn't going to cover what I need. Thanks, Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From karthik.krishnan at kitware.com Wed Feb 25 23:00:05 2009 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Wed, 25 Feb 2009 23:00:05 -0500 Subject: [vtkusers] Overlay Contour on vtkImageViewer2 In-Reply-To: References: <9ddb27260902241040s2e3f1fem16ffc5b91a3a2fc4@mail.gmail.com> Message-ID: <9ddb27260902252000p2c0be1fflb8a27c18ede2c188@mail.gmail.com> Try adding the actor to the imageviewer's renderer *after* you setup the interactor for the viewer. The SetupInteractor call generally installs the pipeline, possibly creates a new renderer.. On Tue, Feb 24, 2009 at 11:47 PM, S, Navneeth (GE, Research) < navneeth.s at ge.com> wrote: > I've put together a tcl script to show what I mean (see attached). > > This script: > 1) Generates a synthetic image composed of spheres > 2) Uses either vtkContourer or vtkDiscreteMarchingCubes to extract the > contour. > 3) Renders the result of 2 independently & also inside a vtkImageViewer > > Notice that though the contour (in this case 3D) shows up on the vanilla > renderer it does not show up on the vtkImageViewer !. > > What could be happening ? > > Thanks for your help, > navneeth > > ________________________________ > > From: Karthik Krishnan [mailto:karthik.krishnan at kitware.com] > Sent: Wednesday, February 25, 2009 12:10 AM > To: S, Navneeth (GE, Research) > Cc: Mark Gooding; VTK users group > Subject: Re: [vtkusers] Overlay Contour on vtkImageViewer2 > > > Perhaps your mask and input images have different locations in physical > space. (origin,/ extent etc). > > -- > k > > > On Tue, Feb 24, 2009 at 4:35 AM, S, Navneeth (GE, Research) > wrote: > > > It shows up, but in the wrong place. > Oddly the contour is at the correct iso-curve on the original > image (in vtkImageViewer2). > > Eg. If I set > myVtkImageViewer2->SetInput( orig ); > > contourer->SetInput( mask ) > contourer->SetValue(0, 2); > > The iso-contour shows up corresponding to intensity=2 on the > image=orig. Though, the contourer should generate the same for > image=mask ! > > Thanks ! > > > -----Original Message----- > From: Mark Gooding [mailto:mark.gooding at gmail.com] > Sent: Tuesday, February 24, 2009 2:42 PM > To: S, Navneeth (GE, Research); VTK users group > Subject: Re: [vtkusers] Overlay Contour on vtkImageViewer2 > > could you elaborate on the problem - is the contour showing up, > but in the wrong place? or is it just not showing up at all? > > mark > > 2009/2/24 S, Navneeth (GE, Research) : > > Hello, > > I'm trying to overlay a contour corresponding to a > segmentation > > mask on an image displayed using vtkImageViewer2. > > However, the iso contour lines do not show up correctly > (corresponding > > to the actual boundary) > ... > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > -- > Karthik Krishnan > R&D Engineer, > Kitware Inc. > Ph: 518 371 3971 x119 > Fax: 518 371 3971 > > -- Karthik Krishnan R&D Engineer, Kitware Inc. Ph: 518 371 3971 x119 Fax: 518 371 3971 -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.beare at gmail.com Wed Feb 25 23:11:27 2009 From: richard.beare at gmail.com (Richard Beare) Date: Thu, 26 Feb 2009 15:11:27 +1100 Subject: [vtkusers] world coordinates and image data Message-ID: <779dabeb0902252011p2d343523wa57a8dd5425af28f@mail.gmail.com> Hi, I'm trying to track down appropriate vtk data representations for displaying multiple image data sets in correct relationships to one another. The source data is MRI slices. Does the vtkImageData type have the option of image axes not being aligned to world coordinates? I haven't been able to see any way of doing this. Assuming this isn't possible, what is the most appropriate data structure to use. The approach I'm thinking of is to iterate over the image in ITK, looking up world coordinates for each voxel, and building a large vtk data structure that I'd then save in a paraview compatible format. Any recommendations? From karthik.krishnan at kitware.com Wed Feb 25 23:28:59 2009 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Wed, 25 Feb 2009 23:28:59 -0500 Subject: [vtkusers] world coordinates and image data In-Reply-To: <779dabeb0902252011p2d343523wa57a8dd5425af28f@mail.gmail.com> References: <779dabeb0902252011p2d343523wa57a8dd5425af28f@mail.gmail.com> Message-ID: <9ddb27260902252028u34b4553j7e2992e0ba96bbb6@mail.gmail.com> On Wed, Feb 25, 2009 at 11:11 PM, Richard Beare wrote: > Hi, > I'm trying to track down appropriate vtk data representations for > displaying multiple image data sets in correct relationships to one > another. The source data is MRI slices. > > Does the vtkImageData type have the option of image axes not being > aligned to world coordinates? no > Assuming this isn't possible, what is the most appropriate data > structure to use. The approach I'm thinking of is to iterate over the > image in ITK, looking up world coordinates for each voxel, and > building a large vtk data structure that I'd then save in a paraview > compatible format. We tend to keep the image data in its local (axis aligned) coordinate system. You can manage local to world coordinate system mapping at the actor level by setting a user transform (see SetUserTransform) on the actor visualizing your data. However, if you are looking to transform the data itself, your only option is to transform the imagedata to polys using vtkImageDataGeometryFilter and then transforming this using vtkTransformPolyDataFilter. > > Any recommendations? > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- Karthik Krishnan R&D Engineer, Kitware Inc. Ph: 518 371 3971 x119 Fax: 518 371 3971 -------------- next part -------------- An HTML attachment was scrubbed... URL: From vinay.l at iiitb.ac.in Thu Feb 26 00:10:13 2009 From: vinay.l at iiitb.ac.in (vinay l.) Date: Thu, 26 Feb 2009 10:40:13 +0530 Subject: [vtkusers] Creating a 3D model of a pencil (cylinder) using stored data Message-ID: <8626C1B7EB748940BCDD7596134632BE039430BD@jal.iiitb.ac.in> Hi all, I am trying to create a 3D model of a Pencil. The pencil has been photographed when it is rotating and stored in a standard image format. There are 360 images in total, which covers the entire 360 degrees of the pencil. How do i make a visualization of this? I have a camera which can be programmed to take images and store it in any format necessary. If taking photographs is not the right approach, is there any other way of visualizing the pencil? Is it possible to use the cylinderSource class and create a cylinder and then 'paint' the surface of the cylinder with the data of the pencil that i have obtained through the camera? I am using VTK 5.2 and the tcl wrapper. A quick reply will be much appreciated. Thanks in advance. Vinay L -------------- next part -------------- An HTML attachment was scrubbed... URL: From wassim_belhadj at topnet.tn Thu Feb 26 03:43:13 2009 From: wassim_belhadj at topnet.tn (wassim_belhadj at topnet.tn) Date: Thu, 26 Feb 2009 09:43:13 +0100 Subject: [vtkusers] vtkColorTransferFunction of lungs Message-ID: Hi, I'm using VTk/VTKEdge for lungs Volume rendering. My problem is that I have not found the appropriate vtkColorTransferFunction of lungs. Most of the examples provide vtkColorTransferFunction and vtkPiecewiseFunction functions of muscles, bones, skin but not lungs. Bellow my transfer function that I used to display Lungs. opacityFun->AddPoint(-960,0.0); opacityFun->AddPoint(-950, 1.0); opacityFun->AddPoint(-550,1.0 ); opacityFun->AddPoint(-500,0.3 ); opacityFun->AddPoint(-450, 0.0); opacityFun->AddPoint(-300, 0.0); Can someone HELP ME? Best regards, wassim From Michael.Knopke at gmx.de Thu Feb 26 04:04:03 2009 From: Michael.Knopke at gmx.de (Michael Knopke) Date: Thu, 26 Feb 2009 10:04:03 +0100 Subject: [vtkusers] Users guide Message-ID: Hi, The user-guide is pretty much basic stuff that actually doesn't need explanation, maybe for absolute programming beginners... I was quite disappointed about buying it. Usually if I have a problem, the book will be the last place to find any answers. I'm sorry to say this, but I'd like to have a Advanced User Guide. Regards, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From vinay.l at iiitb.ac.in Thu Feb 26 05:11:22 2009 From: vinay.l at iiitb.ac.in (vinay l.) Date: Thu, 26 Feb 2009 15:41:22 +0530 Subject: [vtkusers] Newbie here, Please help [Convert multiple 2D images into a 3D model] Message-ID: <8626C1B7EB748940BCDD7596134632BE039430BE@jal.iiitb.ac.in> Dear all, I have just installed VTK a couple of days back and wanted to know whether I will be able to convert multiple images of a cube into a 3D model of the cube. If yes, can you please tell me the class that I will have to use. What kind of data do I need to supply and what file format? I am just beginning to learn the basics and would be really thankful if you can guide me. Thanks in advance Vinay L -------------- next part -------------- An HTML attachment was scrubbed... URL: From wassim_belhadj at topnet.tn Thu Feb 26 04:43:39 2009 From: wassim_belhadj at topnet.tn (wassim_belhadj at topnet.tn) Date: Thu, 26 Feb 2009 10:43:39 +0100 Subject: [vtkusers] Reduce the size of this sphere/ball of vtkBoxWidget Message-ID: <26620a9ccfda621c945ebfb5bdcd5e08@pop.topnet.tn> Hi, I'm using vtkBoxWidget for clipping a volume and view only subregion of the data. To manipulate (orient and position of bounfing box) the vtkBoxWidget, we must use the red sphere/ball that exist in each plan of the box. My problem is that when I zoomed my volume this sphere/ball becomes large. Is there a way to reduce the size of this sphere/ball. Thank you in advance. Best regards, wassim From rim.ayari at gmail.com Thu Feb 26 05:36:06 2009 From: rim.ayari at gmail.com (RimAY) Date: Thu, 26 Feb 2009 02:36:06 -0800 (PST) Subject: [vtkusers] Problem with vtkTkRenderWidget Message-ID: <22221552.post@talk.nabble.com> Hi, I'm trying to work with vtkTkRenderWidget class.This is my code: from vtk import* from Tkinter import* from vtkTkRenderWidget import* import time import thread source = vtkSphereSource() mapper = vtkPolyDataMapper() mapper.SetInput(source.GetOutput()) actor = vtkActor() actor.SetMapper(mapper) # create root window root = Tk() # create vtkTkRenderWidget pane = vtkTkRenderWidget(root,width=300,height=300) ren = vtkRenderer() renWin = pane.GetRenderWindow() renWin.AddRenderer(ren) ren.AddActor(actor) # pack the pane into the tk root pane.pack() # start the tk mainloop thread.start_new_thread(root.mainloop, ()) #---------------------------------------- I get this error message when i execute the line 'pane = vtkTkRenderWidget(root,width=300,height=300)': Microsoft Visual C++ Runtime Library Runtime Error! Program: C:\Python24\pythonw.exe This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information Any help will be very appreciated, thanks -- View this message in context: http://www.nabble.com/Problem-with-vtkTkRenderWidget-tp22221552p22221552.html Sent from the VTK - Users mailing list archive at Nabble.com. From mathieu.malaterre at gmail.com Thu Feb 26 05:51:38 2009 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Thu, 26 Feb 2009 11:51:38 +0100 Subject: [vtkusers] is demand driven pipeline wrapped in python? In-Reply-To: <49A10DD9.9000906@itis.ethz.ch> References: <49A10DD9.9000906@itis.ethz.ch> Message-ID: On Sun, Feb 22, 2009 at 9:33 AM, Dominik Szczerba wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > by doing > > executive.SetUpdateTimeSteps(0,0.0) > > I am getting an error: > > AttributeError: SetUpdateTimeSteps > > Or did I forget to import something? double* are not wrap AFAIK (in this particular case it would be nice to have double*+length mapped to a PyList). You only have access to: >>> import vtk >>> help(vtk.vtkStreamingDemandDrivenPipeline().SetUpdateTimeStep) Help on built-in function SetUpdateTimeStep: SetUpdateTimeStep(...) V.SetUpdateTimeStep(int, float) -> int C++: int SetUpdateTimeStep (int port, double time); Get/Set the update extent for output ports that use Temporal Extents -- Mathieu From dominik at itis.ethz.ch Thu Feb 26 06:14:27 2009 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Thu, 26 Feb 2009 12:14:27 +0100 Subject: [vtkusers] is demand driven pipeline wrapped in python? In-Reply-To: References: <49A10DD9.9000906@itis.ethz.ch> Message-ID: <49A67993.4000306@itis.ethz.ch> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Many thanks Mathieu, but I already figured it out meanwhile. ipython is an excellent 'debugging' tool in such cases: tab expansion on a class instance will tell immediately what is wrapped and what is not :) regards, Dominik Mathieu Malaterre wrote: > On Sun, Feb 22, 2009 at 9:33 AM, Dominik Szczerba wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> by doing >> >> executive.SetUpdateTimeSteps(0,0.0) >> >> I am getting an error: >> >> AttributeError: SetUpdateTimeSteps >> >> Or did I forget to import something? > > double* are not wrap AFAIK (in this particular case it would be nice > to have double*+length mapped to a PyList). > > You only have access to: > >>>> import vtk >>>> help(vtk.vtkStreamingDemandDrivenPipeline().SetUpdateTimeStep) > Help on built-in function SetUpdateTimeStep: > > SetUpdateTimeStep(...) > V.SetUpdateTimeStep(int, float) -> int > C++: int SetUpdateTimeStep (int port, double time); > > Get/Set the update extent for output ports that use Temporal Extents > > - -- Dominik Szczerba, Ph.D. Computational Physics Group IT'IS Foundation for Research http://www.itis.ethz.ch -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkmmeZMACgkQ/EBMh9bUuzKSKwCdFs3kTGf0QBUDSn50Ym6r30qb Q/gAnjzFhY8M/EVkLPk/0Hsx+cwDwzoJ =yXFT -----END PGP SIGNATURE----- From riechmann at ira.uka.de Thu Feb 26 08:57:19 2009 From: riechmann at ira.uka.de (Matthias Riechmann) Date: Thu, 26 Feb 2009 14:57:19 +0100 Subject: [vtkusers] Multi threading question In-Reply-To: References: Message-ID: <49A69FBF.4080509@ira.uka.de> I have a similar question: When triggering all rendering by yourself it is easy to protect VTK from concurrent access by using a mutex. But how can I do that when using a QVtkWidget? In this case the rendering might be triggered at any time from the GUI. Is there a way to do a synchronisation from a application programmer's view in this scenario? Matthias David E DeMarle schrieb: > What you are doing is correct. VTK is not thread safe, so in general > you have to protect against concurrent access manually as you have > done. > > On Mon, Feb 23, 2009 at 10:51 PM, Anton Deguet wrote: >> Hello, >> >> I have an application with one renderer and multiple actors. Each actor (assembly) is controlled by a different thread and all use a single renderer (running in its own thread). As a temporary solution, I use an application wide mutex lock/unlock for any access to VTK to avoid rendering while a thread is modifying the scene via its actor (threads can modify anything; position, size, visibility, opacity, texture, ... and other non atomic operations). It somewhat works but I am afraid one programmer might forget to lock/unlock the scene before modifying its actors and this might be hard to debug/detect. I am also slightly concerned by long waiting periods to lock the mutex as the application is growing. >> >> So, does VTK provide something better than what I am using, i.e. is there any build-in thread safety mechanism that one can use (multiple buffers, queued commands, ...) that would avoid locks. >> >> Thank you, >> >> Anton Deguet >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > > -- Dipl.-Inform. Matthias Riechmann Institut f?r Prozessrechentechnik, Automation und Robotik Medizin-Gruppe Universit?t Karlsruhe (TH) Geb?ude 40.28, Zimmer 103 Engler-Bunte-Ring 8 76131 Karlsruhe Fon: +49 (721) 608-4049 Fax: +49 (721) 608-7141 Web: http://wwwipr.ira.uka.de/~richmann -------------- next part -------------- A non-text attachment was scrubbed... Name: riechmann.vcf Type: text/x-vcard Size: 483 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3319 bytes Desc: S/MIME Cryptographic Signature URL: From gbivins at objectreservoir.com Thu Feb 26 09:11:58 2009 From: gbivins at objectreservoir.com (Gerrick Bivins) Date: Thu, 26 Feb 2009 08:11:58 -0600 Subject: [vtkusers] Users guide In-Reply-To: Message-ID: I ?second? what Michael says. I wouldn?t own User?s Guide if I wouldn?t have gotten it at a Kitware Training session. biv On 2/26/09 3:04 AM, "Michael Knopke" wrote: > Hi, > The user-guide is pretty much basic stuff that actually doesn?t need > explanation, maybe for absolute programming beginners... > I was quite disappointed about buying it. Usually if I have a problem, the > book will be the last place to find any answers. > I?m sorry to say this, but I?d like to have a Advanced User Guide. > Regards, > Michael > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.malaterre at gmail.com Thu Feb 26 09:43:31 2009 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Thu, 26 Feb 2009 15:43:31 +0100 Subject: [vtkusers] Catch Exceptions of vtkSTLReader In-Reply-To: References: Message-ID: On Thu, Feb 26, 2009 at 1:43 AM, Eugene Guo wrote: > Hi, > > I am trying to catch the exception by vtkSTLReader (e.g. to read a non-exist > STL file), so that the vtkOutputWindow will not show up. I added two > observer events (vtkCommand::ErrorEvent and vtkCommand::WarningEvent) to the > reader, then use Try...Catch. It looks that the error event was caught, > since the error message was printed on the screen; but the vtkOutputWindow > is also displayed while the "Update()" is executed. > > vtkMyObserver *errObserver = vtkMyObserver::New(); > > vtkSTLReader *stlReader; > stlReader = vtkSTLReader::New(); > stlReader->SetFileName("abc.stl"); // random name which will be sure to > throw an exception > stlReader->AddObserver(vtkCommand::ErrorEvent,errObserver); > stlReader->AddObserver(vtkCommand::WarningEvent,errObserver); > stlReader->AddObserver(vtkCommand::AbortCheckEvent,errObserver); > > try { > stlReader->Update(); > } > catch (...){ > } > > if (errObserver->GetVTKError()) { > cout << "Caught an vtkSTLReader exception \n"; > return false; > } > > However, the same sequence of code works perfectly for vtkPolyDataReader. I > only saw the error message, while the vtkOutputWindow was not shown at all. > > vtkMyObserver *errObserver = vtkMyObserver::New(); > > vtkPolyDataReader *vtkReader; > vtkReader = vtkSTLReader::New(); > vtkReader->SetFileName("abc.vtk"); // random name which will be sure to > throw an exception > vtkReader->AddObserver(vtkCommand::ErrorEvent,errObserver); > vtkReader->AddObserver(vtkCommand::WarningEvent,errObserver); > vtkReader->AddObserver(vtkCommand::AbortCheckEvent,errObserver); > > try { > stlReader->Update(); > } > catch (...){ > } > > if (errObserver->GetVTKError()) { > cout << "Caught an vtkPolyDataReader exception \n"; > return false; > } > > > Any comments or suggestions are appreciated. VTK does not throw exception, so you do not need your try/catch. I can see the vtkErrorMacro in the vtkSTLReader. It is simply missing the corresponding SetErrorCode (I could fix that, but VTK CVS write access is currently restricted). Meanwhile do not rely on error code, but instead simply use the default mechanism of command/observer on ErrorEvent (vtkErrorMacro does invoke it). 2cts -- Mathieu From clinton at elemtech.com Thu Feb 26 10:13:16 2009 From: clinton at elemtech.com (Clinton Stimpson) Date: Thu, 26 Feb 2009 08:13:16 -0700 Subject: [vtkusers] Multi threading question In-Reply-To: <49A69FBF.4080509@ira.uka.de> References: <49A69FBF.4080509@ira.uka.de> Message-ID: <49A6B18C.3090002@elemtech.com> How about locking/unlocking when you get the vtkCommand::StartEvent/vtkCommand::EndEvent from the vtkRenderWindow? Then the locking is automatic no matter where Render() was called from. Clint Matthias Riechmann wrote: > I have a similar question: When triggering all rendering by yourself > it is easy to protect VTK from concurrent access by using a mutex. But > how can I do that when using a QVtkWidget? In this case the rendering > might be triggered at any time from the GUI. Is there a way to do a > synchronisation from a application programmer's view in this scenario? > > > Matthias > > > > > David E DeMarle schrieb: >> What you are doing is correct. VTK is not thread safe, so in general >> you have to protect against concurrent access manually as you have >> done. >> >> On Mon, Feb 23, 2009 at 10:51 PM, Anton Deguet >> wrote: >>> Hello, >>> >>> I have an application with one renderer and multiple actors. Each >>> actor (assembly) is controlled by a different thread and all use a >>> single renderer (running in its own thread). As a temporary >>> solution, I use an application wide mutex lock/unlock for any access >>> to VTK to avoid rendering while a thread is modifying the scene via >>> its actor (threads can modify anything; position, size, visibility, >>> opacity, texture, ... and other non atomic operations). It somewhat >>> works but I am afraid one programmer might forget to lock/unlock the >>> scene before modifying its actors and this might be hard to >>> debug/detect. I am also slightly concerned by long waiting periods >>> to lock the mutex as the application is growing. >>> >>> So, does VTK provide something better than what I am using, i.e. is >>> there any build-in thread safety mechanism that one can use >>> (multiple buffers, queued commands, ...) that would avoid locks. >>> >>> Thank you, >>> >>> Anton Deguet >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >> >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From kall at mayo.edu Thu Feb 26 10:19:15 2009 From: kall at mayo.edu (Kall, Bruce A.) Date: Thu, 26 Feb 2009 09:19:15 -0600 Subject: [vtkusers] world coordinates and image data In-Reply-To: <9ddb27260902252028u34b4553j7e2992e0ba96bbb6@mail.gmail.com> References: <779dabeb0902252011p2d343523wa57a8dd5425af28f@mail.gmail.com> <9ddb27260902252028u34b4553j7e2992e0ba96bbb6@mail.gmail.com> Message-ID: <49A6B2F3.4060808@mayo.edu> > However, if you are looking to transform the data itself, your only > option is to transform the imagedata to polys using > vtkImageDataGeometryFilter and then transforming this using > vtkTransformPolyDataFilter. I have been able to accomplish what I think Richard original asked by using vtkImageReslice *reslice; I put the transform on this and it transforms all my image data which is not axis aligned into world coordinates correctly. Small snippet: ----------------------------------------------------------------------------------------------------------------------------- volume_reader = vtkImageReader::New(); volume_reader->SetFileName(data_filename); volume_reader->SetFileDimensionality(3); volume_reader->SetDataExtent(0,(int) xsize - 1,0,(int)ysize - 1,0,(int) zsize - 1); volume_reader->SetDataSpacing(voxel_size,voxel_size,voxel_size); volume_reader->FileLowerLeftOn(); volume_reader->SetDataOrigin(origin); volume_reader->SetDataScalarTypeToUnsignedChar(); volume_reader->SetDataByteOrderToBigEndian(); /* You may or may not need a permutation matrix here to have your volume put in */ /* correctly. Mine starts at the upper left and not lower left */ permutation_xform = vtkTransform::New(); permutation_matrix = vtkMatrix4x4::New(); permutation_matrix->Identity(); permutation_matrix->SetElement(1,1,-1); permutation_matrix->SetElement(2,2,-1); permutation_xform->SetMatrix(permutation_matrix); volume_reader->SetTransform(permutation_xform); reslice_matrix = vtkMatrix4x4::New(); /* stuff in your transform here */ reslice_xform = vtkTransform::New(); reslice_xform->SetMatrix(reslice_matrix); reslice = vtkImageReslice::New(); reslice->SetInputConnection(volume_reader->GetOutputPort()); reslice->SetResliceTransform(reslice_xform); image_volume = vtkVolume::New(); volume_raycast_mapper = vtkFixedPointVolumeRayCastMapper::New(); volume_raycast_mapper->SetInputConnection(reslice->GetOutputPort()); image_volume->SetMapper(volume_raycast_mapper); renderer->AddVolume(image_volume); ---------------------------------------------------------------------------------------------------------------------- This works for me. Bruce Karthik Krishnan wrote: > On Wed, Feb 25, 2009 at 11:11 PM, Richard Beare > > wrote: > > Hi, > I'm trying to track down appropriate vtk data representations for > displaying multiple image data sets in correct relationships to one > another. The source data is MRI slices. > > Does the vtkImageData type have the option of image axes not being > aligned to world coordinates? > > > no > > > Assuming this isn't possible, what is the most appropriate data > structure to use. The approach I'm thinking of is to iterate over the > image in ITK, looking up world coordinates for each voxel, and > building a large vtk data structure that I'd then save in a paraview > compatible format. > > > We tend to keep the image data in its local (axis aligned) coordinate > system. You can manage local to world coordinate system mapping at the > actor level by setting a user transform (see SetUserTransform) on the > actor visualizing your data. > > However, if you are looking to transform the data itself, your only > option is to transform the imagedata to polys using > vtkImageDataGeometryFilter and then transforming this using > vtkTransformPolyDataFilter. > > > > Any recommendations? > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > > -- > Karthik Krishnan > R&D Engineer, > Kitware Inc. > Ph: 518 371 3971 x119 > Fax: 518 371 3971 > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Aurelie.Larcher at imag.fr Thu Feb 26 10:01:58 2009 From: Aurelie.Larcher at imag.fr (=?ISO-8859-1?Q?Aur=E9lie_Larcher?=) Date: Thu, 26 Feb 2009 16:01:58 +0100 Subject: [vtkusers] vtkActor : SetOrientation(x,y,z) Message-ID: <49A6AEE6.1070302@imag.fr> Hello, About the vtkProp3D's function SetOrientation(double x, double y, double z) the documentation precises this : "Sets the orientation of the Prop3D. Orientation is specified as X,Y and Z rotations in that order, but they are performed as RotateZ, RotateX, and finally RotateY." OK but is anybody knows what are these angles ? For exemple : (30,40,-50) First. Angle -50 ? from Z to Y Second. Angle 30? from X to Y Third. Angle 40? from Y to ? It's really important for me to understand this, I hope someone could help me ! Aur?lie From jtgiles at gmail.com Thu Feb 26 11:54:21 2009 From: jtgiles at gmail.com (Justin Giles) Date: Thu, 26 Feb 2009 10:54:21 -0600 Subject: [vtkusers] vtkXYPlotActor Message-ID: Can anyone tell me how ViewportToPlotCoordinate is supposed to work? No matter what I do I keep getting X = -25.8051 and Y = -0.167051. What I do when the mouse is clicked is the following: (plot is my vtkXYPlotActor object, renderer is my vtkRenderer object) ----------------------- vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::SafeDownCast(obj); int event_pos[2]; iren->GetEventPosition(event_pos); //generates X/Y coordinates based on viewport where 0,0 is bottom left of window plot->SetViewportCoordinate(event_pos[0], event_pos[1]); double pos2[3]; plot->ViewportToPlotCoordinate(renderer, pos2[0], pos2[1]); //cout always shows -25.8051 and -0.167051 cout << pos2[0] << " : " << pos2[1] << endl; ------------------------------- Any thoughts on this? Am I doing something wrong? My assumption on how this should work is that I would get coordinates based on the X/Y axis of the actual 2D plot. I've been stuck on this for quite a few days, so any help would be appreciated. Thanks, Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From riechmann at ira.uka.de Thu Feb 26 12:20:35 2009 From: riechmann at ira.uka.de (Matthias Riechmann) Date: Thu, 26 Feb 2009 18:20:35 +0100 Subject: [vtkusers] Multi threading question In-Reply-To: <49A6B18C.3090002@elemtech.com> References: <49A69FBF.4080509@ira.uka.de> <49A6B18C.3090002@elemtech.com> Message-ID: <49A6CF63.4070805@ira.uka.de> This might work - as long as there is no not-thread-safe code between in the procedures that are responsible for sending the StartEvent. And I'm not sure whether VTK likes events being stalled by mutexes, I'm not deep enough in VTK's event system. Are there any developers nearby? ;-) Matthias Clinton Stimpson schrieb: > > How about locking/unlocking when you get the > vtkCommand::StartEvent/vtkCommand::EndEvent from the vtkRenderWindow? > Then the locking is automatic no matter where Render() was called from. > > Clint > > Matthias Riechmann wrote: >> I have a similar question: When triggering all rendering by yourself >> it is easy to protect VTK from concurrent access by using a mutex. But >> how can I do that when using a QVtkWidget? In this case the rendering >> might be triggered at any time from the GUI. Is there a way to do a >> synchronisation from a application programmer's view in this scenario? >> >> >> Matthias >> >> >> >> >> David E DeMarle schrieb: >>> What you are doing is correct. VTK is not thread safe, so in general >>> you have to protect against concurrent access manually as you have >>> done. >>> >>> On Mon, Feb 23, 2009 at 10:51 PM, Anton Deguet >>> wrote: >>>> Hello, >>>> >>>> I have an application with one renderer and multiple actors. Each >>>> actor (assembly) is controlled by a different thread and all use a >>>> single renderer (running in its own thread). As a temporary >>>> solution, I use an application wide mutex lock/unlock for any access >>>> to VTK to avoid rendering while a thread is modifying the scene via >>>> its actor (threads can modify anything; position, size, visibility, >>>> opacity, texture, ... and other non atomic operations). It somewhat >>>> works but I am afraid one programmer might forget to lock/unlock the >>>> scene before modifying its actors and this might be hard to >>>> debug/detect. I am also slightly concerned by long waiting periods >>>> to lock the mutex as the application is growing. >>>> >>>> So, does VTK provide something better than what I am using, i.e. is >>>> there any build-in thread safety mechanism that one can use >>>> (multiple buffers, queued commands, ...) that would avoid locks. >>>> >>>> Thank you, >>>> >>>> Anton Deguet >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://www.vtk.org/mailman/listinfo/vtkusers >>>> >>> >>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > -- Dipl.-Inform. Matthias Riechmann Institut f?r Prozessrechentechnik, Automation und Robotik Medizin-Gruppe Universit?t Karlsruhe (TH) Geb?ude 40.28, Zimmer 103 Engler-Bunte-Ring 8 76131 Karlsruhe Fon: +49 (721) 608-4049 Fax: +49 (721) 608-7141 Web: http://wwwipr.ira.uka.de/~richmann -------------- next part -------------- A non-text attachment was scrubbed... Name: riechmann.vcf Type: text/x-vcard Size: 483 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3319 bytes Desc: S/MIME Cryptographic Signature URL: From Shekhar.Chandra at sci.monash.edu.au Thu Feb 26 17:23:33 2009 From: Shekhar.Chandra at sci.monash.edu.au (Shakes) Date: Fri, 27 Feb 2009 09:23:33 +1100 Subject: [vtkusers] vtkXYPlotActor In-Reply-To: References: Message-ID: <49A71665.2090803@sci.monash.edu.au> Hi Justin, This link might help, not for XY Plot class but for picking values from the renderer by Mark Wyszomierski. Its got iren->GetEventPosition(event_pos) stuff, uses the Picker class. Let me know how u go.... I will probably need to do this later. ;) HTH Cheers Shakes Justin Giles wrote: > Can anyone tell me how ViewportToPlotCoordinate is supposed to work? No > matter what I do I keep getting X = -25.8051 and Y = -0.167051. > > What I do when the mouse is clicked is the following: > (plot is my vtkXYPlotActor object, renderer is my vtkRenderer object) > ----------------------- > vtkRenderWindowInteractor* iren = > vtkRenderWindowInteractor::SafeDownCast(obj); > int event_pos[2]; > iren->GetEventPosition(event_pos); //generates X/Y coordinates based > on viewport where 0,0 is bottom left of window > plot->SetViewportCoordinate(event_pos[0], event_pos[1]); > double pos2[3]; > plot->ViewportToPlotCoordinate(renderer, pos2[0], pos2[1]); > > //cout always shows -25.8051 and -0.167051 > cout << pos2[0] << " : " << pos2[1] << endl; > ------------------------------- > > Any thoughts on this? Am I doing something wrong? My assumption on how > this should work is that I would get coordinates based on the X/Y axis > of the actual 2D plot. > > I've been stuck on this for quite a few days, so any help would be > appreciated. > > Thanks, > > Justin > > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- A non-text attachment was scrubbed... Name: Shekhar_Chandra.vcf Type: text/x-vcard Size: 247 bytes Desc: not available URL: From talentaa at hotmail.com Thu Feb 26 21:29:41 2009 From: talentaa at hotmail.com (XingJoshua) Date: Fri, 27 Feb 2009 10:29:41 +0800 Subject: [vtkusers] Problem about vtkPicker Message-ID: Hey, everybody~ Though I have used vtk for a long period, it's my first time to use vtkPicker. Here I came across a problem with vtkPicker: there are several vtkPolydata displaying in the screen, how could the vtkPicker pick the cells from a certain polydata rather than others? Thanks~ _________________________________________________________________ ???????????????????????????? http://chunjie.live.com/?form=PANER01 -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.bertel at kitware.com Thu Feb 26 22:31:38 2009 From: francois.bertel at kitware.com (Francois Bertel) Date: Thu, 26 Feb 2009 22:31:38 -0500 Subject: [vtkusers] Problem about vtkPicker In-Reply-To: References: Message-ID: Hi, You can control that on the actor, more exactly the superclass of vtkActor, vtkProp has a Pickable flag. Initially its value is true. Just set this flag to false to all the vtkProp objects you don't want to pick and keep it to true on the vtkProp handling the vtkPolydata you want to pick. 2009/2/26 XingJoshua : > Hey, everybody~ > > Though I have used vtk for a long period, it's my first time to use > vtkPicker. Here I came across a problem with vtkPicker: there are several > vtkPolydata displaying in the screen, how could the vtkPicker pick the cells > from a certain polydata rather than others? > > Thanks~ > > > > ________________________________ > ??????????MSN??? ????? > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA From vinay.l at iiitb.ac.in Fri Feb 27 01:34:53 2009 From: vinay.l at iiitb.ac.in (vinay l.) Date: Fri, 27 Feb 2009 12:04:53 +0530 Subject: [vtkusers] Parameters for SetHeight and SetRadius in vtkCylinderSource Message-ID: <8626C1B7EB748940BCDD7596134632BE039430C0@jal.iiitb.ac.in> Dear all, I am trying to map the texture of an image onto a cylinder for which I am using vtkTextureMapToCylinder. I am constructing a cylinder and 'painting' the image on to the cylinder. I have a doubt regarding this. What exactly are the parameters to SetHeight and SetRadius in vtkCylinderSource? It being of double datatype, can it be considered as mm or cm or m? Since i need to map the image precisely i need the exact dimension of the cylinder to be created. Thanks in advance, Vinay L -------------- next part -------------- An HTML attachment was scrubbed... URL: From msvinod+vtk at gmail.com Fri Feb 27 01:30:36 2009 From: msvinod+vtk at gmail.com (NIPL) Date: Thu, 26 Feb 2009 22:30:36 -0800 (PST) Subject: [vtkusers] Draw 2D Ellipse annotation/overlay over a 2D graphics object In-Reply-To: <22034221.post@talk.nabble.com> References: <22034221.post@talk.nabble.com> Message-ID: <22240274.post@talk.nabble.com> Hi all, Method 3 is working now. I changed SetPoint to InsertPoint . ellipsePoints.InsertPoint(id, r1 * Math.Cos(angle) + CenterX, r2 * Math.Sin(angle) + CenterY, 0); NIPL wrote: > > Hi all, > I want to draw a 2D ellipse annotation over a DICOM image loaded in a 2D > View. > There is no builtin function/class for ellipse. But there is a > vtkSphereSource and it is 3D. Can I derive a 2D ellipse from it by using > vtkPolyDataMapper2D? I tried using the vtkPoints first and have some > issues. I am using the vtkDotnet wrapper for c#. > I have done like this: > Method 1: > vtk.vtkPoints ellipsePoints = new vtk.vtkPoints(); > double angle = 0; > double r1, r2; > int id = 0; > int CenterX = 0, CenterY = 0; > CenterX = 100; > CenterY = 100; > r1 = 40; > r2 = 20; > > while (angle <= 2F * Math.PI + (Math.PI / 30F)) > { > ellipsePoints.InsertPoint(id, r1 * Math.Cos(angle) + CenterX, > r2 * Math.Sin(angle) + CenterY, 0); > angle = angle + (Math.PI / 30F); > id++; > } > vtk.vtkPolyLine ellipse = new vtk.vtkPolyLine(); > ellipse.GetPointIds().SetNumberOfIds(id); > > for (int i = 0; i < id; i++) > { > ellipse.GetPointIds().SetId(i, i); > > } > > vtk.vtkUnstructuredGrid grid = new > vtk.vtkUnstructuredGrid(); > grid.Allocate(1, 1); > grid.InsertNextCell(ellipse.GetCellType(), > ellipse.GetPointIds()); > grid.SetPoints(ellipsePoints); > grid.Update(); > > vtk.vtkDataSetMapper m = new vtk.vtkDataSetMapper(); > m.SetInput(grid); > m.SetColorModeToMapScalars(); > > vtk.vtkActor aSphere = new vtk.vtkActor(); > aSphere.SetMapper(m); > aSphere.GetProperty().SetColor(0, 0, 1); // color blue > aSphere.GetProperty().SetInterpolationToFlat(); > aSphere.VisibilityOn(); > // a renderer for the data > //vtk.vtkRenderer ren1 = new vtk.vtkRenderer(); > irenderer.AddActor(aSphere); > iwindow.Render(); > > But the ellipse is no visible while i draw. > > Method 2: > vtk.vtkSphereSource vtkEllipse = new > vtk.vtkSphereSource(); > vtkEllipse.SetRadius(100); > vtkEllipse.SetCenter(100, 100, 0); > vtkEllipse.SetThetaResolution(360); > vtkEllipse.SetPhiResolution(90); > vtkEllipse.SetEndPhi(90); > vtkEllipse.SetStartPhi(70); > vtk.vtkTransformPolyDataFilter tf = new > vtk.vtkTransformPolyDataFilter(); > vtk.vtkTransform tr = new vtk.vtkTransform(); > tr.Identity(); > tf.SetInput(vtkEllipse.GetOutput()); > tf.SetTransform(tr); > tf.Update(); > vtk.vtkPolyDataMapper2D m = new vtk.vtkPolyDataMapper2D(); > vtk.vtkActor2D vtkActor = new vtk.vtkActor2D(); > m.SetInput(tf.GetOutput()); > vtkActor.SetMapper(m); > vtkActor.VisibilityOn(); > vtkActor.GetProperty().SetColor(1, .5, 0); > irenderer.AddViewProp(vtkActor); > iwindow.Render(); > But this is not what i want. the line width is not correct. > > Method 3: > double angle = 0; > double r1, r2; > int id = 0; > int CenterX , CenterY; > CenterX = 100; > CenterY = 100; > r1 = 40; > r2 = 20; > > vtk.vtkPoints ellipsePoints = new vtk.vtkPoints(); > ellipsePoints.SetNumberOfPoints(31); > while (angle <= 2F * Math.PI + (Math.PI / 30F)) > { > ellipsePoints.SetPoint(id, r1 * Math.Cos(angle) + > CenterX, r2 * Math.Sin(angle) + CenterY, 0); > angle = angle + (Math.PI / 30F); > id++; > } > //id = ellipsePoints.GetNumberOfPoints(); > vtk.vtkCellArray c_lines = new vtk.vtkCellArray(); > c_lines.Allocate(1, 1); > c_lines.InsertNextCell(id); > c_lines.SetNumberOfCells(id); > for (int k = 0; k < id; ++k) > c_lines.InsertCellPoint(k); > > vtk.vtkPolyData c_polyData = new vtk.vtkPolyData(); > c_polyData.ReleaseDataFlagOn(); > c_polyData.Allocate(1, 1); > c_polyData.SetPoints(ellipsePoints); > c_polyData.SetLines(c_lines); > > vtk.vtkPolyDataMapper2D c_polyDataMapper = new > vtk.vtkPolyDataMapper2D(); > c_polyDataMapper.SetInput(c_polyData); > > vtk.vtkActor2D c_actor = new vtk.vtkActor2D(); > > //c_actor.GetProperty().SetOpacity(.50); > //c_actor.GetProperty().SetLineWidth(2.0f); > > c_actor.SetMapper(c_polyDataMapper); > c_actor.VisibilityOn(); > c_actor.GetProperty().SetColor(1, .5, 0); > irenderer.AddViewProp(c_actor); > > iwindow.Render(); > c_polyData.Dispose(); > c_lines.Dispose(); > ellipsePoints.Dispose(); > > This one is working fine. I can see the ellipse and it looks great. But > when I draw a second ellipse on same image, it crashes. The constructor > returns null pointer. > > Is my logic correct or am I missing something? The Method 1 is not > crashing but it is is not visible. Can anyone please help me fixing it? > > Thanks in advance. > -- View this message in context: http://www.nabble.com/Draw-2D-Ellipse-annotation-overlay-over-a-2D-graphics-object-tp22034221p22240274.html Sent from the VTK - Users mailing list archive at Nabble.com. From prashanth.udupa at gmail.com Fri Feb 27 02:15:27 2009 From: prashanth.udupa at gmail.com (Prashanth Udupa) Date: Fri, 27 Feb 2009 12:45:27 +0530 Subject: [vtkusers] Parameters for SetHeight and SetRadius in vtkCylinderSource In-Reply-To: <8626C1B7EB748940BCDD7596134632BE039430C0@jal.iiitb.ac.in> References: <8626C1B7EB748940BCDD7596134632BE039430C0@jal.iiitb.ac.in> Message-ID: <912c00f0902262315q6c08c2c3n3f4aa3912458f792@mail.gmail.com> Hi, You need to use an image reader to read and input the image to vtkTexture, which will then be applied on to an actor. attached images image1.jpg and image2.jpg files show the pipeline and its output. Hope this helps. / Prashanth On Fri, Feb 27, 2009 at 12:04 PM, vinay l. wrote: > Dear all, > > I am trying to map the texture of an image onto a cylinder for which I am > using vtkTextureMapToCylinder. > I am constructing a cylinder and 'painting' the image on to the cylinder. I > have a doubt regarding this. > > What exactly are the parameters to SetHeight and SetRadius in > vtkCylinderSource? It being of double datatype, > can it be considered as mm or cm or m? Since i need to map the image > precisely i need the exact dimension of the cylinder > to be created. > > Thanks in advance, > > Vinay L > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- Thanks and Warm Regards, Prashanth N Udupa prashanth.udupa at gmail.com http://www.prashanthudupa.com http://prashanthudupa.livejournal.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image1.jpg Type: image/jpeg Size: 39104 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image2.jpg Type: image/jpeg Size: 17673 bytes Desc: not available URL: From mail-andi at web.de Fri Feb 27 02:50:50 2009 From: mail-andi at web.de (Andi2008) Date: Thu, 26 Feb 2009 23:50:50 -0800 (PST) Subject: [vtkusers] Multi threading question In-Reply-To: <49A6CF63.4070805@ira.uka.de> References: <49A69FBF.4080509@ira.uka.de> <49A6B18C.3090002@elemtech.com> <49A6CF63.4070805@ira.uka.de> Message-ID: <22240997.post@talk.nabble.com> Hi, if you syncronize the access to vtk by a global mutex or syncronize the Render() methode in the RenderWindow it will work but in this case i think you dont need a multitheading architecture anymore. Maybe you can find out which parts of vtk are thread- unsafe and only syncronize them. I have the same problem because i work with RenderWindows in different threads. I found out, that there are some singleton classes in vtk which are not threadsafe. Those are vtkFreeTypeUtilities and the Register() methode of vtkFilteringInformationKeyManager and vtkCommonInformationKeyManager. When i syncronize the access to this classes vtk works threadsafe in my programm. You loose performance with this but it is not that much than synronizing the access to vtk globally. I hope it helps Andi Matthias Riechmann wrote: > > This might work - as long as there is no not-thread-safe code between in > the procedures that are responsible for sending the StartEvent. And I'm > not sure whether VTK likes events being stalled by mutexes, I'm not deep > enough in VTK's event system. Are there any developers nearby? ;-) > > > Matthias > > > > > Clinton Stimpson schrieb: >> >> How about locking/unlocking when you get the >> vtkCommand::StartEvent/vtkCommand::EndEvent from the vtkRenderWindow? >> Then the locking is automatic no matter where Render() was called from. >> >> Clint >> >> Matthias Riechmann wrote: >>> I have a similar question: When triggering all rendering by yourself >>> it is easy to protect VTK from concurrent access by using a mutex. But >>> how can I do that when using a QVtkWidget? In this case the rendering >>> might be triggered at any time from the GUI. Is there a way to do a >>> synchronisation from a application programmer's view in this scenario? >>> >>> >>> Matthias >>> >>> >>> >>> >>> David E DeMarle schrieb: >>>> What you are doing is correct. VTK is not thread safe, so in general >>>> you have to protect against concurrent access manually as you have >>>> done. >>>> >>>> On Mon, Feb 23, 2009 at 10:51 PM, Anton Deguet >>>> wrote: >>>>> Hello, >>>>> >>>>> I have an application with one renderer and multiple actors. Each >>>>> actor (assembly) is controlled by a different thread and all use a >>>>> single renderer (running in its own thread). As a temporary >>>>> solution, I use an application wide mutex lock/unlock for any access >>>>> to VTK to avoid rendering while a thread is modifying the scene via >>>>> its actor (threads can modify anything; position, size, visibility, >>>>> opacity, texture, ... and other non atomic operations). It somewhat >>>>> works but I am afraid one programmer might forget to lock/unlock the >>>>> scene before modifying its actors and this might be hard to >>>>> debug/detect. I am also slightly concerned by long waiting periods >>>>> to lock the mutex as the application is growing. >>>>> >>>>> So, does VTK provide something better than what I am using, i.e. is >>>>> there any build-in thread safety mechanism that one can use >>>>> (multiple buffers, queued commands, ...) that would avoid locks. >>>>> >>>>> Thank you, >>>>> >>>>> Anton Deguet >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://www.vtk.org/mailman/listinfo/vtkusers >>>>> >>>> >>>> >>>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >> >> > > -- > Dipl.-Inform. Matthias Riechmann > Institut f?r Prozessrechentechnik, Automation und Robotik > Medizin-Gruppe > Universit?t Karlsruhe (TH) > Geb?ude 40.28, Zimmer 103 > Engler-Bunte-Ring 8 > 76131 Karlsruhe > > Fon: +49 (721) 608-4049 > Fax: +49 (721) 608-7141 > > Web: http://wwwipr.ira.uka.de/~richmann > > begin:vcard > fn:Matthias Riechmann > n:Riechmann;Matthias > org;quoted-printable;quoted-printable:Universit=C3=A4t Karlsruhe > (TH);Institut f=C3=BCr Prozessrechentechnik, Automation und Robotik > adr;quoted-printable;quoted-printable:Geb=C3=A4ude 40.28, Zimmer > 103;;Engler-Bunte-Ring 8;Karlsruhe;Baden-W=C3=BCrttemberg;76131;germany > email;internet:riechmann at ira.uka.de > tel;work:+49 (721) 608-4049 > tel;fax:+49 (721) 608-7141 > url:Web: http://wwwipr.ira.uka.de/~richmann > version:2.1 > end:vcard > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -- View this message in context: http://www.nabble.com/Multi-threading-question-tp22175349p22240997.html Sent from the VTK - Users mailing list archive at Nabble.com. From gael.goret at gmail.com Fri Feb 27 03:35:12 2009 From: gael.goret at gmail.com (exomind) Date: Fri, 27 Feb 2009 00:35:12 -0800 (PST) Subject: [vtkusers] Urgent !! interactor problem Message-ID: <22241506.post@talk.nabble.com> I want to render the deformation of a molecular structure (polydata type). To do this, I try to render all the actors (store in gfx.nma) and hide all of them, after that as you can see, I show one actor and i render the scene. the rendering is good, but i lose the interaction with my actor. how can i maintain the interactor during the rendering loop ? Should i use another method to represent the deformation ? AnimationScene/Cue ? Transformation ? #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# def mol_nma_renderer(gfx): gfx.renderer = vtk.vtkOpenGLRenderer() gfx.renwin.AddRenderer(gfx.renderer) beg=1 for mol in gfx.nma: gfx.renderer.AddActor(mol.acteur) mol.acteur.VisibilityOff() gfx.renwin.SetDesiredUpdateRate(60)# useful ? gfx.iren.SetStillUpdateRate(60) while 1: for mol in gfx.nma: mol.acteur.VisibilityOn() gfx.renwin.Render() mol.acteur.VisibilityOff() mol.acteur.VisibilityOn() #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# -- View this message in context: http://www.nabble.com/Urgent-%21%21-interactor-problem-tp22241506p22241506.html Sent from the VTK - Users mailing list archive at Nabble.com. From Aurelie.Larcher at imag.fr Fri Feb 27 04:02:47 2009 From: Aurelie.Larcher at imag.fr (=?ISO-8859-1?Q?Aur=E9lie_Larcher?=) Date: Fri, 27 Feb 2009 10:02:47 +0100 Subject: [vtkusers] vtkMatrix4x4 : Position in the 3 first line of the last column Message-ID: <49A7AC37.4080600@imag.fr> Hello, I have a question about the vtkMatrix4x4 : What represents the position of the matrix 4x4 in the three first line of the last column ? I believed that is the position of the origin of my object in its own coordinates : when I translate my object, I see the positions moves. But when I rotate an object from his center (without translation), strangely I see also the positions moves. Is somebody can explain what are these positions ? I really appreciate your help Thanks, From vinay.l at iiitb.ac.in Fri Feb 27 04:25:38 2009 From: vinay.l at iiitb.ac.in (vinay l.) Date: Fri, 27 Feb 2009 14:55:38 +0530 Subject: [vtkusers] Problem With texture mapping Message-ID: <8626C1B7EB748940BCDD7596134632BE039430C3@jal.iiitb.ac.in> Hi all, I am trying to map an image on to a cylinder. This is the code i have written in tcl. package require vtk vtkCylinderSource cyl cyl SetResolution 30 cyl SetRadius 6 cyl SetHeight 15 cyl CappingOn cyl SetCenter 0 0 0 vtkDataSetMapper mapper mapper SetInputConnection [cyl GetOutputPort] vtkJPEGReader jpgReader jpgReader SetFileName "C:\\Data\\image.jpg" vtkTexture atext atext SetInputConnection [jpgReader GetOutputPort] atext InterpolateOn vtkActor triangulation triangulation SetMapper mapper triangulation SetTexture atext vtkRenderer ren1 vtkRenderWindow renWin renWin AddRenderer ren1 vtkRenderWindowInteractor iren iren SetRenderWindow renWin ren1 AddActor triangulation ren1 SetBackground 1 1 1 renWin SetSize 640 240 renWin Render renWin Render wm withdraw . The problem is that the image is being mapped on the cylinder twice, One being the mirror image of the other. If there is some word printed on the image then in the cylinder, the word is being printed normally and apart from that there is a mirror image of the word too. The original image is being mapped onto half the cylinder with the mirror image being mapped on the other half. I want just 1 image to be fully mapped on to the cylinder. Can someone please help. Thanks in advance, Vinay L -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.S.Wijnhout at lumc.nl Fri Feb 27 07:41:30 2009 From: J.S.Wijnhout at lumc.nl (J.S.Wijnhout at lumc.nl) Date: Fri, 27 Feb 2009 13:41:30 +0100 Subject: [vtkusers] QVTKWidget with vtkImageViewer2 glitch References: <49A588A7.1060206@elemtech.com> Message-ID: Thank for the pointer. Since setting the size of the image viewer is apparently the problem I created a custom QVTKWidget that embeds an vtkImageViewer2. The implementation is basically: ImageViewerWidget::ImageViewerWidget(QWidget *_parent) : QVTKWidget(_parent) { m_imageViewer = vtkImageViewer2::New (); } void ImageViewerWidget::SetInput ( vtkImageData *_image ) { m_imageViewer->SetInput ( _image ); m_imageViewer->SetupInteractor(GetInteractor()); m_imageViewer->SetRenderWindow(GetRenderWindow()); m_imageViewer->UpdateDisplayExtent (); } void ImageViewerWidget::resizeEvent ( QResizeEvent * event ) { QVTKWidget::resizeEvent(event); m_imageViewer->SetSize(width(),height()); m_imageViewer->SetPosition(x(),y()); m_imageViewer->UpdateDisplayExtent (); } void ImageViewerWidget::showEvent ( QShowEvent * event ) { QVTKWidget::showEvent(event); m_imageViewer->SetSize(width(),height()); m_imageViewer->SetPosition(x(),y()); m_imageViewer->UpdateDisplayExtent (); } This gets rid of the problems I mentioned, because the size is set explicitly on a show and resize event. However, there is a new problem that occurs only when there are multiple QVTKWidgets around. Upon starting the application (I have four QVTKWidgets in a grid layout), a random number of widgets actually show up (sometimes all four, but usually only two or three). After, seemingly, an arbitrary number of resize actions one or more QVTKWidgets become defunctional (it stops resizing and does not respond to input any more). When you click on a defunctional QVTKWidget, the whole desktop screen flickers once. It almost seems as if there can be only on QVTKWidget because the first QVTKWidget that is initialized always remains working. best, Jeroen -- Leiden University Medical Center Image Processing Division -----Original Message----- From: Clinton Stimpson [mailto:clinton at elemtech.com] Sent: Wed 2/25/2009 7:06 PM To: Wijnhout, J.S. (LKEB) Cc: vtkusers at vtk.org Subject: Re: [vtkusers] QVTKWidget with vtkImageViewer2 glitch Here's what I understand is happening. vtkImageViewer2::Render assumes it can change the size of the window and places the image accordingly. When embedded in a GUI, the size of the window can't always be changed, so the image shows up in the wrong place based on what it thought the window size was. Your workaround give vtkImageViewer2 a chance to successfully resize a window and initialize the camera properly based on that, then you replaced the window and kept the correctly initialized camera. There are probably other workarounds, such as fixing the camera yourself. I'd file a bug against vtkImageViewer2. Clint J.S.Wijnhout at lumc.nl wrote: > Hi, > > For starters, I have read the thread on this issue: > http://www.vtk.org/pipermail/vtkusers/2008-November/098242.html > > However I managed to get vtkImageViewer2 working inside a QVTKWidget, > with one glitch however. The sample code is printed at the bottom of > the screen. > The way I got this to work relies on the order in which calls to > Render and SetRenderWindow are made. First I render the image viewer > by calling vtkImageViewer2::Render, after that I attach the image > viewer render window to the QVTKWidget. This works, but because I call > render first a separate render window is created and then (after the > call to QVTKWidget::SetRenderWindow) reparented to the QVTKWidget. > This happens really fast, so I guess I could live with it. But it > keeps me wondering what I should do to have it functioning properly. > Any advice on how to circumvent or fix vtkImageViewer2 would be welcome. > > best, > Jeroen > > > #include > #include > #include > #include > #include > > #include > > #include > #include > #include > > int main ( int argc, char **argv ) > { > QApplication app(argc,argv); > > const char* fileName = argv[1]; > > QMainWindow w; > w.statusBar()->showMessage(fileName); > > QVTKWidget vtkWidget; > vtkWidget.setAutomaticImageCacheEnabled(false); > w.setCentralWidget(&vtkWidget); > > vtkPNGReader *reader1 = vtkPNGReader::New (); > reader1->SetFileName(fileName); > reader1->Update (); > > vtkImageViewer2 *viewer1 = vtkImageViewer2::New (); > viewer1->SetInput(reader1->GetOutput()); > viewer1->SetupInteractor(vtkWidget.GetInteractor()); > viewer1->Render (); > viewer1->SetRenderWindow(vtkWidget.GetRenderWindow()); > > w.show (); > > app.exec (); > > viewer1->Delete (); > reader1->Delete (); > } > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Rolf.Anders.Syvertsen at rikshospitalet.no Fri Feb 27 07:58:03 2009 From: Rolf.Anders.Syvertsen at rikshospitalet.no (Rolf Anders Syvertsen) Date: Fri, 27 Feb 2009 13:58:03 +0100 Subject: [vtkusers] Rendering short data Message-ID: <38AF0029C76AEA4C8B386E574805F6CA014371F50903@HV3KD026.ad.rikshospitalet.no> Hi, I have a series of 16 bit data that I would like to make a volume from. How do I load the data into vtk and render them? Tried to use the vtkImageImporter but can't find out how to make it work. The ReadImage function in vtkVolume16Reader is protected, so I can't use that directly. Does anyone have a simple example of how to load and render the volume from this? Rolf Anders Syvertsen Software Developer IMI (Institute for Medical Informatics) Radiumhospitalet, Oslo Universitetssykehus HF email: rolf.anders.syvertsen at rikshospitalet.no Denne meldingen inneholder ikke sensitiv informasjon som bryter med Rikshospitalets krav til informasjonssikkerhet. (In compliance with the Security Policy of Rikshospitalet , the content of this message (including any attachments) is of a non-sensitive nature) -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.malaterre at gmail.com Fri Feb 27 08:19:16 2009 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Fri, 27 Feb 2009 14:19:16 +0100 Subject: [vtkusers] Rendering short data In-Reply-To: <38AF0029C76AEA4C8B386E574805F6CA014371F50903@HV3KD026.ad.rikshospitalet.no> References: <38AF0029C76AEA4C8B386E574805F6CA014371F50903@HV3KD026.ad.rikshospitalet.no> Message-ID: On Fri, Feb 27, 2009 at 1:58 PM, Rolf Anders Syvertsen wrote: > Hi, I have a series of 16 bit data that I would like to make a volume from. > How do I load the data into vtk and render them? Tried to use the > vtkImageImporter but can't find out how to make it work. The ReadImage > function in vtkVolume16Reader is protected, so I can't use that directly. > > Does anyone have a simple example of how to load and render the volume from > this? > Are you reading from memory or from a file ? If reading from a file: lookup doxygen for vtkImageReader. Otherwise an example can be found in the following test: http://www.vtk.org/doc/nightly/html/classvtkImageImport.html [scroll down to test section] -> http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Imaging/Testing/Cxx/ImportExport.cxx?root=VTK&content-type=text/plain -- Mathieu From ncreati at inogs.it Fri Feb 27 08:56:35 2009 From: ncreati at inogs.it (Nicola Creati) Date: Fri, 27 Feb 2009 05:56:35 -0800 (PST) Subject: [vtkusers] VTK + wxPython + wx.aui X error Message-ID: <22246344.post@talk.nabble.com> Hello, I'm developing an application using VTK python (version 5.2.1) binding and wxPython (2.8.9.2). The main window frame is managed by wx.aui. In the central panel there is a wxVTKRenderWindowInteractor (win1). In another panel I create another wxVTKRenderWindowInteractor (win2). The second panel (win2) is a float panel. If I try to dock the second panel (win2) to the first one (win1) on Linux I get a X Window System Error and the program close. The same program works perfectly under Windows. I'm attaching an example script that reproduce the error: Thank you. Nicola import vtk import wx import wx.aui from wxVTKRenderWindowInteractor import * #-------------------------------------------------------------------------------- class PlotCanvas(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self, parent, id, size=(350,350)) self.parent = parent self.widget = wxVTKRenderWindowInteractor(self, -1) self.widget.Enable(1) self.widget.SetRenderWhenDisabled(True) self.ren = vtk.vtkRenderer() self.widget.GetRenderWindow().AddRenderer(self.ren) self.widget._Iren.SetPicker(None) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.widget, 1, wx.EXPAND) self.SetSizer(sizer) self.Layout() #-------------------------------------------------------------------------------- class Test(wx.Frame): def __init__(self, parent, id): wx.Frame.__init__(self, parent, id=-1, title="AUI Test", pos=(0,0), size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN|wx.MAXIMIZE) self._mgr = wx.aui.AuiManager() self._mgr.SetManagedWindow(self) self.SetMinSize(wx.Size(400, 300)) self._mgr.AddPane(self.createPlotFrame(), wx.aui.AuiPaneInfo().Name("win1"). CenterPane()) self._mgr.AddPane(self.createPlotFrame(), wx.aui.AuiPaneInfo(). Name("win2").Caption("win2"). Left().Position(0).Float()) self.Bind(wx.EVT_CLOSE, self.onExit) self.perspective_default = self._mgr.SavePerspective() self._mgr.Update() def createPlotFrame(self): win2 = PlotCanvas(self, -1) return win2 def onExit(self, event): self.Destroy() #-------------------------------------------------------------------------------- if __name__ == "__main__": app = wx.App(0) main = Test(None, wx.ID_ANY) main.Show() main.Maximize() app.MainLoop() -- View this message in context: http://www.nabble.com/VTK-%2B-wxPython-%2B-wx.aui-X-error-tp22246344p22246344.html Sent from the VTK - Users mailing list archive at Nabble.com. From preet.desai at gmail.com Fri Feb 27 08:57:58 2009 From: preet.desai at gmail.com (Preet) Date: Fri, 27 Feb 2009 08:57:58 -0500 Subject: [vtkusers] Installing VTK with X11 and Python wrapping on OS X Leopard Message-ID: <8057bdcf0902270557i2c54fb60i7bbb383d90b889a1@mail.gmail.com> I had posted some trouble I was having with getting VTK with Python wrapping working correctly in OS X Leopard (on pretty much a clean install of the OS).After compiling with the following options: VTK_SHARED_LIBS: ON VTK_USE_COCOA: OFF VTK_USE_CARBON: OFF VTK_USE_X: ON VTK_USE_GUISUPPORT: ON VTK_WRAP_PYTHON: ON CMAKE_INSTALL_PREFIX=/Users/preet/Development/VTKBin OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib OPENGL_INCLUDE_DIR:PATH=/usr/X11R6/include I needed to set the environment variable DYLD_FALLBACK_LIBRARY_PATH since it was not pointing in the right location. I set the directory with: export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/my/path/to/vtkinstall/lib/vtk-5.2 Doing this let the files resolve correctly and I'm able to type in 'import vtk' at a python interpreter with no issues. I tried to download a sample python file that displays a basic cube but I get the following error: ircci-macpro12:vtk preetdesai$ python cube.py Traceback (most recent call last): File "cube.py", line 15, in mapper = vtk.vtkPolyDataMapper() AttributeError: 'module' object has no attribute 'vtkPolyDataMapper' I can confirm this file works fine on a similar linux (Ubuntu) install. Are there more things I need to set / change to get this working? Regards, -Preet -------------- next part -------------- An HTML attachment was scrubbed... URL: From preet.desai at gmail.com Fri Feb 27 10:47:06 2009 From: preet.desai at gmail.com (Preet) Date: Fri, 27 Feb 2009 10:47:06 -0500 Subject: [vtkusers] Installing VTK with X11 and Python wrapping on OS X Leopard In-Reply-To: References: <8057bdcf0902270557i2c54fb60i7bbb383d90b889a1@mail.gmail.com> Message-ID: <8057bdcf0902270747p7de09e72s9822f60652e9ba88@mail.gmail.com> I'm trying to use the toolkit found at this site:http://www.vmtk.org It requires X11, with carbon and cocoa disabled. I'm prepared to deal with shoddy performance... Id just like to get it working first =) Regards, -Preet On Fri, Feb 27, 2009 at 10:11 AM, Michael Jackson < mike.jackson at bluequartz.net> wrote: > I am curios as to why you are using X11 on OS X? I know everyone has their > reasons.. Existing toolkits, existing code base.. But if you are doing > python and vtk together you probably really want a carbon build as it will > most likely render a bit quicker and the Apple supplied X11 is morbidly slow > since they upgraded to a x.org. > If you continue to use X11 on OS X Leopard I would suggest you download > and install the http://xquartz.macosforge.org/downloads/X11-2.3.2.dmg > > Release notes are here: > > http://xquartz.macosforge.org/trac/wiki/X112.3.2 > > And the Apple X11 list can be found here. > > http://lists.apple.com/archives/x11-users/ > > Cheers > _________________________________________________________ > Mike Jackson mike.jackson at bluequartz.net > BlueQuartz Software www.bluequartz.net > Principal Software Engineer Dayton, Ohio > > > > > On Feb 27, 2009, at 8:57 AM, Preet wrote: > > I had posted some trouble I was having with getting VTK with Python >> wrapping working correctly in OS X Leopard (on pretty much a clean install >> of the OS). >> After compiling with the following options: >> >> VTK_SHARED_LIBS: ON >> VTK_USE_COCOA: OFF >> VTK_USE_CARBON: OFF >> VTK_USE_X: ON >> VTK_USE_GUISUPPORT: ON >> VTK_WRAP_PYTHON: ON >> CMAKE_INSTALL_PREFIX=/Users/preet/Development/VTKBin >> OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib >> OPENGL_INCLUDE_DIR:PATH=/usr/X11R6/include >> >> I needed to set the environment variable DYLD_FALLBACK_LIBRARY_PATH since >> it was not pointing in the right location. I set the directory with: >> export >> DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/my/path/to/vtkinstall/lib/vtk-5.2 >> >> Doing this let the files resolve correctly and I'm able to type in 'import >> vtk' at a python interpreter with no issues. I tried to download a sample >> python file that displays a basic cube but I get the following error: >> >> ircci-macpro12:vtk preetdesai$ python cube.py >> Traceback (most recent call last): >> File "cube.py", line 15, in >> mapper = vtk.vtkPolyDataMapper() >> AttributeError: 'module' object has no attribute 'vtkPolyDataMapper' >> >> I can confirm this file works fine on a similar linux (Ubuntu) install. >> Are there more things I need to set / change to get this working? >> >> >> Regards, >> >> -Preet >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jtgiles at gmail.com Fri Feb 27 14:16:03 2009 From: jtgiles at gmail.com (Justin Giles) Date: Fri, 27 Feb 2009 13:16:03 -0600 Subject: [vtkusers] vtkXYPlotActor In-Reply-To: <49A71665.2090803@sci.monash.edu.au> References: <49A71665.2090803@sci.monash.edu.au> Message-ID: Thanks for the link, but I can't seem to get vtkPointPicker to work the the 2D XYPlotActor data correctly. I feel that I'm missing something dealing with the mapping of my polydata set to the viewport coordinates correctly (or vice-versa). My input data is of the following format: x = 0-100 (integer values) y = 0-1 (floating point values) Those get placed into my polydata structure as points and scalars respectively. I then add this dataset to the XYPlotActor. I've played around with the polydatamapper2d, but I don't understand it very well evidently. When I click the mouse over one of the points in my plot, I'm able to extract the viewport x,y coordinate of the mouse from the windowinteractor. Then, using vtkPropPicker I'm able to pull out the point that was clicked on and get the x,y,z coordinates of the point picked by using picker->GetPickedPosition(). That gives me +- values between -1 and 1. What I am missing is how to map those values to find the point ids in my polydataset. Any further thoughts? Do I need to add a mapper? Do I need to play with vtkCoordinate on the dataset? I'm basically at a loss... Thanks, Justin On Thu, Feb 26, 2009 at 4:23 PM, Shakes wrote: > Hi Justin, > > This link might help, not for XY Plot class but for picking values from the > renderer by Mark Wyszomierski. > > < > http://devsample.org/index.php?option=com_content&task=view&id=48&Itemid=27 > > > > Its got iren->GetEventPosition(event_pos) stuff, uses the Picker class. Let > me know how u go.... I will probably need to do this later. ;) > > HTH > Cheers > Shakes > > Justin Giles wrote: > >> Can anyone tell me how ViewportToPlotCoordinate is supposed to work? No >> matter what I do I keep getting X = -25.8051 and Y = -0.167051. >> >> What I do when the mouse is clicked is the following: >> (plot is my vtkXYPlotActor object, renderer is my vtkRenderer object) >> ----------------------- >> vtkRenderWindowInteractor* iren = >> vtkRenderWindowInteractor::SafeDownCast(obj); >> int event_pos[2]; >> iren->GetEventPosition(event_pos); //generates X/Y coordinates based on >> viewport where 0,0 is bottom left of window >> plot->SetViewportCoordinate(event_pos[0], event_pos[1]); >> double pos2[3]; >> plot->ViewportToPlotCoordinate(renderer, pos2[0], pos2[1]); >> >> //cout always shows -25.8051 and -0.167051 >> cout << pos2[0] << " : " << pos2[1] << endl; >> ------------------------------- >> >> Any thoughts on this? Am I doing something wrong? My assumption on how >> this should work is that I would get coordinates based on the X/Y axis of >> the actual 2D plot. >> >> I've been stuck on this for quite a few days, so any help would be >> appreciated. >> >> Thanks, >> >> Justin >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.hoffman at kitware.com Sat Feb 28 09:46:49 2009 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Sat, 28 Feb 2009 09:46:49 -0500 Subject: [vtkusers] CMake article Message-ID: <49A94E59.1090304@kitware.com> I am writing an article for the Kitware Source (http://www.kitware.com/products/thesource.html ) about how CMake aides in innovation and collaboration. If you have stories about how CMake has helped your project/research achieve its goals, I would be interested to hear them. Thanks in advance. -Bill -- Bill Hoffman Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 bill.hoffman at kitware.com http://www.kitware.com 518-371-3971 (phone and fax) From an.84 at hotmail.fr Sat Feb 28 10:29:47 2009 From: an.84 at hotmail.fr (nnnn aaaa) Date: Sat, 28 Feb 2009 15:29:47 +0000 Subject: [vtkusers] add/delete point from polydata Message-ID: Hello; I use visual c++ and vtk as development tools, in my project. I work by the snake's method. I implemented functions to add or to remove points of snake is a polydata (it is a circle), after each iteration, I do not have any errors but l' posting of result it does not go (no posting, it posts dubug). Help me please. Here is my code of function void vtkSnake::ResampleSnake(vtkPolyData *snake,int dmax,int dmin) { int numberOfPoints=snake->GetNumberOfPoints(); int nbInputPoint,*inputPointsId; vtkPoints* points = snake->GetPoints(); // get the number of point of the unregularized snake snake->GetLines()->GetCell(0,nbInputPoint,inputPointsId); for(int i=0;iGetPoint(inputPointsId[i],pti); // TO CHECK THE DISTANCES WITH HALF OF THE FOLLOWING POINTS for(int idp=(1+numberOfPoints)/2;idp>0;idp--) { double ptiFlw[3]; points->GetPoint(inputPointsId[(idp+i)%numberOfPoints],ptiFlw); points->GetPoint(inputPointsId[idp],pti); double dist = sqrt(pow(ptiFlw[0]-pti[0],2)+pow(ptiFlw[1]-pti[1],2)); if(dist>dmin) continue; for(int k=0;kGetPoint(inputPointsId[(idp+1)%numberOfPoints],ptiFlw); points->GetPoint(inputPointsId[idp],pti); double dist = sqrt(pow(ptiFlw[0]-pti[0],2)+pow(ptiFlw[1]-pti[1],2)); if(dist>dmax) { addSnake(snake,idp); } } } //------------------------------------------------------------------------- void vtkSnake::addSnake(vtkPolyData *snake,int pos) { int numberOfPoints=snake->GetNumberOfPoints(); int nbInputPoint,*inputPointsId; vtkPoints* points = snake->GetPoints(); // get the number of point of the unregularized snake snake->GetLines()->GetCell(0,nbInputPoint,inputPointsId); double ptiFlw[3],pti[3]; points->GetPoint(inputPointsId[(pos+1)%numberOfPoints],ptiFlw); points->GetPoint(inputPointsId[pos],pti); double newX = (ptiFlw[0]+pti[0])/2.0; double newY = (ptiFlw[1]+pti[1])/2.0; int newId=points->InsertNextPoint(newX,newY,pti[2]); points->Modified(); snake->GetLines()->InsertCellPoint(newId); snake->GetLines()->UpdateCellCount(numberOfPoints++); snake->Modified(); numberOfPoints++; } //------------------------------------------------------------------------- void vtkSnake::removeSnake(vtkPolyData *snake,int pos) { int numberOfPoints=snake->GetNumberOfPoints(); int nbInputPoint,*inputPointsId; snake->GetLines()->GetCell(0,nbInputPoint,inputPointsId); snake->RemoveCellReference(inputPointsId[pos]); snake->DeleteCell(inputPointsId[pos]); snake->Modified(); numberOfPoints--; } _________________________________________________________________ D?couvrez tout ce que Windows Live a ? vous apporter ! http://www.microsoft.com/windows/windowslive/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nourmestiri at yahoo.fr Sat Feb 28 14:11:28 2009 From: nourmestiri at yahoo.fr (Nour Mestiri) Date: Sat, 28 Feb 2009 19:11:28 +0000 (GMT) Subject: [vtkusers] Surface reconstruction Message-ID: <81425.93862.qm@web28203.mail.ukl.yahoo.com> Hi all vtk users. I have a sequence of 2D images and i want to make the reconstruction of a 3D image. I know how to make the 'volume' reconstruction but i'm interested by the 'surface' reconstrcuction (generate directly the surface of the 3D image). Is it possible? If yes, can you tell me what to do? Thank you so much -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.dowson at mac.com Sat Feb 28 15:34:56 2009 From: elvis.dowson at mac.com (Elvis Dowson) Date: Sat, 28 Feb 2009 23:34:56 +0300 Subject: [vtkusers] Surface reconstruction In-Reply-To: <81425.93862.qm@web28203.mail.ukl.yahoo.com> References: <81425.93862.qm@web28203.mail.ukl.yahoo.com> Message-ID: <86A150E2-5273-485C-84D4-A5FD73E23A32@mac.com> Hi Nouri, You should try the Marching Cubes algorithm samples. This algorithm was invented by Bill Lorensen. It can be used to extract a surface from 2D DICOM images. Best regards, Elvis Dowson On Feb 28, 2009, at 10:11 PM, Nour Mestiri wrote: > Hi all vtk users. > I have a sequence of 2D images and i want to make the reconstruction > of a 3D image. > I know how to make the 'volume' reconstruction but i'm interested by > the 'surface' reconstrcuction (generate directly the surface of the > 3D image). > Is it possible? If yes, can you tell me what to do? > Thank you so much > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From an.84 at hotmail.fr Sat Feb 28 16:48:49 2009 From: an.84 at hotmail.fr (nnnn aaaa) Date: Sat, 28 Feb 2009 21:48:49 +0000 Subject: [vtkusers] add/delete point from polydata Message-ID: Hi; I use visual c++ and vtk as development tools, in my project. I work by the snake's method. I implemented functions to add or to remove points of snake is a polydata (it is a circle), after each iteration, I do not have any errors but l' posting of result it does not go (no posting, it posts dubug). Can someone help me please Here is my code of function void vtkSnake::ResampleSnake(vtkPolyData *snake,int dmax,int dmin) { int numberOfPoints=snake->GetNumberOfPoints(); int nbInputPoint,*inputPointsId; vtkPoints* points = snake->GetPoints(); // get the number of point of the unregularized snake snake->GetLines()->GetCell(0,nbInputPoint,inputPointsId); for(int i=0;iGetPoint(inputPointsId[i],pti); for(int idp=(1+numberOfPoints)/2;idp>0;idp--) { double ptiFlw[3]; points->GetPoint(inputPointsId[(idp+i)%numberOfPoints],ptiFlw); points->GetPoint(inputPointsId[idp],pti); double dist = sqrt(pow(ptiFlw[0]-pti[0],2)+pow(ptiFlw[1]-pti[1],2)); if(dist>dmin) continue; for(int k=0;kGetPoint(inputPointsId[(idp+1)%numberOfPoints],ptiFlw); points->GetPoint(inputPointsId[idp],pti); double dist = sqrt(pow(ptiFlw[0]-pti[0],2)+pow(ptiFlw[1]-pti[1],2)); if(dist>dmax) { addSnake(snake,idp); } } } //------------------------------------------------------------------------- void vtkSnake::addSnake(vtkPolyData *snake,int pos) { int numberOfPoints=snake->GetNumberOfPoints(); int nbInputPoint,*inputPointsId; vtkPoints* points = snake->GetPoints(); // get the number of point of the unregularized snake snake->GetLines()->GetCell(0,nbInputPoint,inputPointsId); double ptiFlw[3],pti[3]; points->GetPoint(inputPointsId[(pos+1)%numberOfPoints],ptiFlw); points->GetPoint(inputPointsId[pos],pti); double newX = (ptiFlw[0]+pti[0])/2.0; double newY = (ptiFlw[1]+pti[1])/2.0; int newId=points->InsertNextPoint(newX,newY,pti[2]); points->Modified(); snake->GetLines()->InsertCellPoint(newId); snake->GetLines()->UpdateCellCount(numberOfPoints++); snake->Modified(); numberOfPoints++; } //------------------------------------------------------------------------- void vtkSnake::removeSnake(vtkPolyData *snake,int pos) { int numberOfPoints=snake->GetNumberOfPoints(); int nbInputPoint,*inputPointsId; snake->GetLines()->GetCell(0,nbInputPoint,inputPointsId); snake->RemoveCellReference(inputPointsId[pos]); snake->DeleteCell(inputPointsId[pos]); snake->Modified(); numberOfPoints--; } _________________________________________________________________ D?couvrez tout ce que Windows Live a ? vous apporter ! http://www.microsoft.com/windows/windowslive/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ch.monty.burns at googlemail.com Sat Feb 28 18:33:44 2009 From: ch.monty.burns at googlemail.com (Charles Monty Burns) Date: Sun, 1 Mar 2009 00:33:44 +0100 Subject: [vtkusers] Find cell that embed a point - Python Message-ID: Hello, I'm looking for a locator to get the cell that embed a point. Unfortunately some methodes of vtkCellLocator are not available in Python. Knows someone a other way to do this? I'm working with VTK 5.3! Greetings -------------- next part -------------- An HTML attachment was scrubbed... URL: From sachinjam at gmail.com Sun Feb 15 10:55:35 2009 From: sachinjam at gmail.com (Sachin Jambawalikar) Date: Sun, 15 Feb 2009 15:55:35 -0000 Subject: [vtkusers] How to crop a rectangular volume of interest from an image when your roi is defined as polydata? Message-ID: <6735efef0902150755r335b2b03wd8d6c739bdac18b6@mail.gmail.com> Hi all, I generated a vtkcube source and then used vtktransform to scale translate and rotate the cube so that it become a rectangular voi . I use the vtkTransformPolydataFilter to apply the transform to the cube data. This polydata is then mapped into a vtkactor and added along with exisitng volume data to vtksliceviewer2. This works well and I see a rectangular voi shifted , scaled and translated from center of my volume data. However what I'm trying to develop is a vtk slice viewer which will show the region of intersection of the volume of interest and the image data in each slice (like an alpha-blended overlay rather than a polygon actor which occlude the slice). I need to generate a subvolume of the Original data from this transformed rectangular voi. I have seen people using vtkextractvoi by first using vtkoutlinefilter to generate a bounding box. However bounding box limits are not the same as the polydata (because when I display an actor from vtkoutlinefilter it is bigger and doesnot show angulation as shown by the trinangulated polydata actor) What I need to do is extract a subvolume form Image data corresponding to the rectangular voi. Create a composite volume (or overlay the voi volume )and then hopefully be able to show the voi volume transparent overlayed on Image data so as I move through the slices Ican see the structure of the original data inside the voi. I have attached the code as to how i generate my rectangular voi and it seems to work. Thanks for all your help Regards --Sachin vtkImagedata=reader.GetOutput() (xMin, xMax, yMin, yMax, zMin, zMax) = reader.GetOutput().GetWholeExtent() (sx, sy, sz) = reader.GetOutput().GetSpacing() print sz (ox, oy, oz) = reader.GetOutput().GetOrigin() #print (x0, y0, z0) center = [ox + sx * 0.5 * (xMin + xMax), oy + sy * 0.5 * (yMin + yMax), oz + sz * 0.5 * (zMin + zMax)] # An outline is shown for context. outline = vtk.vtkOutlineFilter() outline.SetInputConnection(reader.GetOutputPort()) outlineMapper = vtk.vtkPolyDataMapper() outlineMapper.SetInputConnection(outline.GetOutputPort()) outlineActor = vtk.vtkActor() outlineActor.SetMapper(outlineMapper) ####roi cube = vtk.vtkCubeSource() cube.SetXLength(1); cube.SetYLength(1); cube.SetZLength(1); vtkmath=vtk.vtkMath() transP1 = vtk.vtkTransform() transP1.Identity() transP1.PostMultiply() transP1.Scale(10, 27.5,9.942770958) transP1.RotateX(22.90897369) transP1.RotateY(0.1529316902) #transP1.RotateX(0) transP1.RotateZ(0.7547413111) transP1.Translate(center[0]-22, center[1]-17, center[2]+11) tpd1 = vtk.vtkTransformPolyDataFilter() tpd1.SetInputConnection(cube.GetOutputPort()) tpd1.SetTransform(transP1) #triangulate points triangle=vtk.vtkTriangleFilter() triangle.SetInputConnection(tpd1.GetOutputPort()) #outTpd1 = vtk.vtkOutlineFilter() #outTpd1.SetInputConnection(triangle.GetOutputPort()) #mapper mapTpd1 = vtk.vtkPolyDataMapper() #mapTpd1.SetInputConnection(outTpd1.GetOutputPort()) mapTpd1.SetInputConnection(triangle.GetOutputPort()) #Actor roiActor = vtk.vtkActor() roiActor.SetMapper(mapTpd1) roiActor.GetProperty().SetColor(1, 0, 0) -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkimage.jpg Type: image/jpeg Size: 84008 bytes Desc: not available URL: From leser21 at gmail.com Thu Feb 12 11:28:36 2009 From: leser21 at gmail.com (Renan Leser) Date: Thu, 12 Feb 2009 16:28:36 -0000 Subject: [vtkusers] Program to write .VTK In-Reply-To: References: <704f8f370902120001x4447490bh4c76839de5dd8bce@mail.gmail.com> <45d654b0902120539n38261bf7m5a9cf5813d675608@mail.gmail.com> Message-ID: <704f8f370902120828g21cb616bqc3670cac3da82de3@mail.gmail.com> Berk, I'm sending the .DAT file attached, with latitude, longitude and the final .VTK file I wrote(rectilinear grid.vtk) . There's no big deal. It's a normal grid, with x and y dimensions (lines and columns). The data goes in the middle. When I have a different time step, the data in the middle changes. The team here can write these data time steps in various ways, together in the same file, each time step separated, etc. *I found that the only way to animate them is to write several .VTK files and read a Legacy .VTK in Paraview*, but takes too long to use the filters in each time step... Renato, This is the first approach we tried last year, remember? When I asked you to show me the basics of paraview? You created a little code that translated the .DAT in a Binary file and opened in paraview using .RAW importer. But the problem came when they asked me to do animation... As I said above, I searched the web and discovered that paraview can read several .VTK files. He stores each of them in the memory and you just have to press "play" to see the animation. Of course, there's a glitche. You have to use filters in each file, that corresponds to each time-step of the animation. So you have to use threshold, extract surface and warp scalar in each time-step. Nowadays, we're using 50-60 time-steps for simulations here, so, it's not hat hard... I searched for a way to apply a filter to a legacy vtk file(with all time steps), but there's nothing on the web. If any of you know how, please tell me, will buy a lot of time. I'm at COPPE right now, If you want I can go to NACAD so we can chat about this. Thanks a lot, Renan. 2009/2/12 Renato Elias > Renan, > > I'll suggest you a very naive approach: > > 1). Translate your ASCII/DAT files into binary > 2). Use the RAW Binary format in ParaView to load your files > > now the question is: How can you animate several RAW binary files? Berk can > answer you better than me, but, I'd try to use a python script in ParaView > to create the animation or something like that. > > Regards > > Renato. > > ps.: Answering the portuguese email you sent to me. No, I don't have any > program that could help you in this task, but, you could easily do it in > Fortran or using a script-based language like Python. > > > > On Thu, Feb 12, 2009 at 10:39 AM, Berk Geveci wrote: > >> Can you describe in detail what the .dat format looks like? >> >> -berk >> >> On Thu, Feb 12, 2009 at 3:01 AM, Renan Leser wrote: >> > Hello everybody, >> > >> > I'm searching for a program to write some .DAT files in .VTK format. >> > >> > These .DATs contains grid structure, scalars and vectors. I'm writing >> them >> > manually in .VTK, like these: >> > >> > # vtk DataFile Version 3.0 >> > vtk output >> > ASCII >> > DATASET STRUCTURED_POINTS >> > DIMENSIONS 387 312 1 >> > SPACING 1 1 1 >> > ORIGIN 0 0 0 >> > POINT_DATA 120744 >> > SCALARS batimetria float >> > LOOKUP_TABLE default >> > 0.0000000e+000 0.0000000e+000 0.0000000e+000 0.0000000e+000 >> > 0.0000000e+000... >> > 0.0000000e+000 0.0000000e+000 0.0000000e+000 0.0000000e+000 >> > 0.0000000e+000... >> > ... >> > >> > >> > The DAT files holds the grid, then I spent lots of time copying and >> pasting >> > the grid form .DAT to LOOKUP_TABLE default, and writing the dimensions >> and >> > point data. >> > >> > Since I'm working with large time data-steps files, I would like to >> known if >> > anybody use or recommend a program to speed up this process. >> > >> > Thanks a lot, >> > >> > Renan. >> > >> > >> > >> > -- >> > Renan Leser de Medeiros >> > Laboratory of Computational Methods in Engineering >> > Federal University of Rio de Janeiro - COPPE >> > P.O.Box 68552 - ZIP 21949-900 >> > Rio de Janeiro, RJ, Brasil >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://www.vtk.org/mailman/listinfo/vtkusers >> > >> > >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > -- Renan Leser de Medeiros Laboratory of Computational Methods in Engineering Federal University of Rio de Janeiro - COPPE P.O.Box 68552 - ZIP 21949-900 Rio de Janeiro, RJ, Brasil -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: batgau_seagrid_piatam6.dat Type: application/octet-stream Size: 480299 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: xgrid_seagrid_piatam6-long.dat Type: application/octet-stream Size: 480299 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ygrid_seagrid_piatam6-lat.dat Type: application/octet-stream Size: 480299 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rectilinear grid.vtk Type: application/octet-stream Size: 486038 bytes Desc: not available URL: