From sebastien.murphy at gmail.com Fri Jun 1 03:34:05 2018 From: sebastien.murphy at gmail.com (smurphy) Date: Fri, 1 Jun 2018 00:34:05 -0700 (MST) Subject: [vtkusers] Orthographic projection onto arbitrary plane In-Reply-To: References: <1527778140580-0.post@n5.nabble.com> Message-ID: <1527838445611-0.post@n5.nabble.com> Hello David, this works nicely thanks very much. One last thing I would like the default view of the camera to be farther away from my geometry (see attached picture). However if I set the camera position to a distant coordinate it affects the rendering of the parallel projection. Is there a way to do this? (I don't want the user to have to zoom out every time to get the full picture). Cheers, Sebastien  -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mathieu.westphal at kitware.com Fri Jun 1 03:35:56 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Fri, 1 Jun 2018 09:35:56 +0200 Subject: [vtkusers] vtkChartHistogram2D use case In-Reply-To: <1527799246003-0.post@n5.nabble.com> References: <1527716304307-0.post@n5.nabble.com> <1527786104721-0.post@n5.nabble.com> <1527799246003-0.post@n5.nabble.com> Message-ID: Hi FYI there has been a full reimplementation of QVTKOpenGLWidget. it has just been merged and is available in master. Best regards, Mathieu Westphal On Thu, May 31, 2018 at 10:40 PM, BBerco wrote: > Got it! It turns out that I had to manually resize the enclosing QDialog > prior to calling Render() for the first time for the plot to show. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From satwik.k8 at gmail.com Fri Jun 1 07:27:47 2018 From: satwik.k8 at gmail.com (Satwik) Date: Fri, 1 Jun 2018 04:27:47 -0700 (MST) Subject: [vtkusers] VtkPointWidget cursor visibility Issue Message-ID: <1527852467246-0.post@n5.nabble.com> Hi everyone, I'm trying to draw x,y,z cursor lines on 3D MIP PET dataset. As an input i'm passing the volume. Here is the code: d->pointWidget = vtkSmartPointer::New(); d->pointWidget->SetInteractor(d->m_iren); d->pointWidget->SetPlaceFactor(1.01); d->pointWidget->SetHandleSize(0.005); d->pointWidget->SetProp3D(d->m_volume); d->pointWidget->SetDefaultRenderer(d->m_renderer); d->pointWidget->PlaceWidget(); d->pointWidget->EnabledOff(); d->pointWidget->XShadowsOff(); d->pointWidget->YShadowsOff(); d->pointWidget->ZShadowsOff(); d->pointWidget->OutlineOff(); d->pointWidget->GetProperty()->SetColor(0, 1, 0); d->pointWidget->GetProperty()->SetLineWidth(2); d->pointWidget->GetProperty()->SetOpacity(1); d->pointWidget->On(); Problem i'm facing is that the cursor inside the volume is getting transparent. How can i make it visible. So, that i can see the intersection points. Is there is any other way to draw cursors(X,Y & Z) sugge Regards, Satwik k -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Fri Jun 1 08:47:31 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 1 Jun 2018 06:47:31 -0600 Subject: [vtkusers] Orthographic projection onto arbitrary plane In-Reply-To: <1527838445611-0.post@n5.nabble.com> References: <1527778140580-0.post@n5.nabble.com> <1527838445611-0.post@n5.nabble.com> Message-ID: Use SetParallelScale() to set the height of the orthographic projection. On Fri, Jun 1, 2018 at 1:34 AM, smurphy wrote: > Hello David, > > this works nicely thanks very much. > One last thing I would like the default view of the camera to be farther > away from my geometry (see attached picture). However if I set the camera > position to a distant coordinate it affects the rendering of the parallel > projection. Is there a way to do this? (I don't want the user to have to > zoom out every time to get the full picture). > > Cheers, > Sebastien > > 2018-06-01_at_09.png> -------------- next part -------------- An HTML attachment was scrubbed... URL: From rubendibattista at gmail.com Fri Jun 1 09:53:17 2018 From: rubendibattista at gmail.com (Ruben Di Battista) Date: Fri, 1 Jun 2018 15:53:17 +0200 Subject: [vtkusers] Display different ImageData Scalar to different Viewport In-Reply-To: References: Message-ID: Hello David, thanks for your answer. I changed my `show` method like this: def show(self): # Render Window rw = vtk.vtkRenderWindow() rw.SetSize(800, 800) # Defining Bounds of Viewports xmins = [0, 0.5] xmaxs = [0.5, 1] ymins = [0, 0] ymaxs = [1, 1] # Curvature Types curv_types = ['Mean_Curvature', 'Gauss_Curvature'] for i in six.moves.range(2): render = vtk.vtkRenderer() rw.AddRenderer(render) # Mean Curvature View render.SetViewport(xmins[i], ymins[i], xmaxs[i], ymaxs[i]) # Create mapper mapper = vtk.vtkPolyDataMapper() mapper.SetInputData(self.surface) mapper.Update() # Probably useless mapper.SetScalarRange(-1, 1) mapper.SetArrayName(curv_types[0]) mapper.Update() # ColorBar color_bar = vtk.vtkScalarBarActor() color_bar.SetLookupTable(mapper.GetLookupTable()) # Surface Actor actor = vtk.vtkActor() actor.SetMapper(mapper) actor.GetProperty().EdgeVisibilityOn() render.AddActor(actor) render.AddActor2D(color_bar) import ipdb ipdb.set_trace() # Render Window Interactor rwi = vtk.vtkRenderWindowInteractor() rwi.SetRenderWindow(rw) rwi.Initialize() rwi.Start() but it's not working. Actually stopping the execution at the first iteration of the `for` loop, and then triggering rwi.Initialize() and rwi.Start() just after the first iteration still shows that the Mapper is rendering the last scalar added to the `PolyData` and not the one specified by `mapper.SetArrayName`. In my previous email, at least, if I stopped the execution at the first iteration and then manually triggering the rendering, was correctly showing the first scalar (i.e. `Mean_Curvatures`). I'm still attaching the complete example. On Thu, May 31, 2018 at 10:07 PM David Gobbi wrote: > Hi Ruben, > > Instead of data.SetActiveScalars(), use mapper.SetArrayId(i) or > mapper.SetArrayName(name). > > - David > > > On Thu, May 31, 2018 at 8:57 AM, Ruben Di Battista < > rubendibattista at gmail.com> wrote: > >> Hello, >> I'm playing a bit with VTK and its Python bindings. I wrote down a simple >> case where I generate the distance function of a sphere, I extract the >> surface from it using the FlyingEdge3D algorithm, then I calculate the >> curvatures using the vtkCurvatures filter, and then I'd like to show the >> Mean_Curvature and the Gauss_Curvature in two different viewports. >> >> What I tried to do is to use the `SetActiveScalars` method of the >> `PointData` associated to my `ImageData` dataset, but at the end I get two >> Viewports showing the same scalar (the last one activated). I also tried to >> stop the program execution using a debugger and triggering the render >> before the second scalar is made "active", and it correctly shows the first >> scalar field. So It's like that the two mappers rendered are "linked". >> >> Do I need to do a ShallowCopy somewhere? >> > > -- _ -. .? |???? ', ; |?????? ?? |????????? RdB ,., |?????? .' '. |???? -' `' http://rdb.is -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sphere.py Type: text/x-python Size: 8682 bytes Desc: not available URL: From david.gobbi at gmail.com Fri Jun 1 12:13:12 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 1 Jun 2018 10:13:12 -0600 Subject: [vtkusers] Display different ImageData Scalar to different Viewport In-Reply-To: References: Message-ID: There might be other settings for the mapper that are needed in addition to SetArrayName(). Take a look at the docs for vtkMapper, it has lots of methods related to scalars. On Fri, Jun 1, 2018 at 7:53 AM, Ruben Di Battista wrote: > Hello David, > > thanks for your answer. > > I changed my `show` method like this: > > def show(self): > # Render Window > rw = vtk.vtkRenderWindow() > rw.SetSize(800, 800) > > # Defining Bounds of Viewports > xmins = [0, 0.5] > xmaxs = [0.5, 1] > ymins = [0, 0] > ymaxs = [1, 1] > > # Curvature Types > curv_types = ['Mean_Curvature', 'Gauss_Curvature'] > > for i in six.moves.range(2): > > render = vtk.vtkRenderer() > rw.AddRenderer(render) > > # Mean Curvature View > render.SetViewport(xmins[i], ymins[i], xmaxs[i], ymaxs[i]) > > # Create mapper > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputData(self.surface) > mapper.Update() # Probably useless > mapper.SetScalarRange(-1, 1) > mapper.SetArrayName(curv_types[0]) > mapper.Update() > > # ColorBar > color_bar = vtk.vtkScalarBarActor() > color_bar.SetLookupTable(mapper.GetLookupTable()) > > # Surface Actor > actor = vtk.vtkActor() > actor.SetMapper(mapper) > actor.GetProperty().EdgeVisibilityOn() > > render.AddActor(actor) > render.AddActor2D(color_bar) > > import ipdb > ipdb.set_trace() > > # Render Window Interactor > rwi = vtk.vtkRenderWindowInteractor() > rwi.SetRenderWindow(rw) > > rwi.Initialize() > rwi.Start() > > but it's not working. > > Actually stopping the execution at the first iteration of the `for` loop, > and then triggering rwi.Initialize() and rwi.Start() just after the first > iteration still shows that the Mapper is rendering the last scalar added to > the `PolyData` and not the one specified by `mapper.SetArrayName`. > > In my previous email, at least, if I stopped the execution at the first > iteration and then manually triggering the rendering, was correctly showing > the first scalar (i.e. `Mean_Curvatures`). > > I'm still attaching the complete example. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjhulsey at gmail.com Fri Jun 1 15:12:03 2018 From: bjhulsey at gmail.com (B.J. Hulsey) Date: Fri, 1 Jun 2018 14:12:03 -0500 Subject: [vtkusers] Pip install vtk for Python 3.x In-Reply-To: References: Message-ID: Thank you. I am using sudo which only had access to the Python 2. However, I am gettting a GL dirver error with when I run vtk under Python 3. Can you recommend current compatible LLVM and MESA versions for OpenGL2 backend? Running a simple example , I get: Local terminal ERROR: In /work/standalone-x64-build/VTK-source/Rendering/OpenGL2/vtkShaderProgram.cxx, line 446 vtkShaderProgram (0x169d500): 0:31(12): error: extension `GL_EXT_gpu_shader4' unsupported in fragment shader Remote PuTTY terminal ERROR: In /work/standalone-x64-build/VTK-source/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 797 vtkXOpenGLRenderWindow (0x2029d00): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2. user at server: glxinfo | grep "string\|version" server glx vendor string: SGI server glx version string: 1.4 client glx vendor string: Mesa Project and SGI client glx version string: 1.4 GLX version: 1.4 OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.6, 128 bits) OpenGL version string: 2.1 Mesa 10.6.5 OpenGL shading language version string: 1.30 OpenGL ES profile version string: OpenGL ES 2.0 Mesa 10.6.5 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16 Regards. On Thu, May 31, 2018 at 1:18 PM, Matt McCormick wrote: > Hello, > > Please try > > python3 -m pip install vtk > > to ensure the desired Python starts the process. > > HTH, > Matt > > On Thu, May 31, 2018 at 1:58 PM B.J. Hulsey wrote: > >> Hello, >> >> When I install vtk using "pip3.5 install vtk" it is installed under >> python 2. Why is that and how do I install under python 3? >> >> >> >> Thanks. >> >> >> _______________________________________________ >> 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjhulsey at gmail.com Fri Jun 1 15:18:01 2018 From: bjhulsey at gmail.com (B.J. Hulsey) Date: Fri, 1 Jun 2018 14:18:01 -0500 Subject: [vtkusers] Pip install vtk for Python 3.x In-Reply-To: References: Message-ID: Thank you. I am using sudo which only had access to the Python 2. However, I am gettting a GL dirver error with when I run vtk under Python 3. Can you recommend current compatible LLVM and MESA versions for OpenGL2 backend? Running a simple example , I get: Local terminal ERROR: In /work/standalone-x64-build/VTK-source/Rendering/OpenGL2/vtkShaderProgram.cxx, line 446 vtkShaderProgram (0x169d500): 0:31(12): error: extension `GL_EXT_gpu_shader4' unsupported in fragment shader Remote PuTTY terminal ERROR: In /work/standalone-x64-build/VTK-source/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 797 vtkXOpenGLRenderWindow (0x2029d00): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2. user at server: glxinfo | grep "string\|version" server glx vendor string: SGI server glx version string: 1.4 client glx vendor string: Mesa Project and SGI client glx version string: 1.4 GLX version: 1.4 OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.6, 128 bits) OpenGL version string: 2.1 Mesa 10.6.5 OpenGL shading language version string: 1.30 OpenGL ES profile version string: OpenGL ES 2.0 Mesa 10.6.5 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16 Regards. > > On Thu, May 31, 2018 at 1:18 PM, Matt McCormick < > matt.mccormick at kitware.com> wrote: > >> Hello, >> >> Please try >> >> python3 -m pip install vtk >> >> to ensure the desired Python starts the process. >> >> HTH, >> Matt >> >> On Thu, May 31, 2018 at 1:58 PM B.J. Hulsey wrote: >> >>> Hello, >>> >>> When I install vtk using "pip3.5 install vtk" it is installed under >>> python 2. Why is that and how do I install under python 3? >>> >>> >>> >>> Thanks. >>> >>> >>> _______________________________________________ >>> 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 >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://public.kitware.com/mailman/listinfo/vtkusers >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kayarre at gmail.com Fri Jun 1 15:30:42 2018 From: kayarre at gmail.com (Kurt Sansom) Date: Fri, 1 Jun 2018 12:30:42 -0700 Subject: [vtkusers] clip polyline Message-ID: Hi all, I am trying to clip a polyline with vtk. currently I am able to find the point where I want to "snip" line. however when I attempt to do this it doesn't seem to work. the approach I am taking is to edit the individual cell by storing the Ids and then updating them. pts_ids = vtk.vtkIdList() cell = centerlines.GetCell(cellIds.GetId(0)) N_ids_cell = cell.GetPointIds().GetNumberOfIds() for i in range(N_ids_cell): pt_id_cell = cell.GetPointIds().GetId(i) #skip ids outside of the surface if (n_out_idx < 0 and int(pt_id_cell) < mvidx): continue elif (n_out_idx > 0 and int(pt_id_cell) > mvidx): continue pts_ids.InsertNextId(pt_id_cell) print(N_ids_cell, pts_ids.GetNumberOfIds()) cell.GetPointIds().SetNumberOfIds(pts_ids.GetNumberOfIds()) for i in range(pts_ids.GetNumberOfIds()): cell.GetPointIds().SetId(i,pts_ids.GetId(i)) Regards, ~Kurt -- Kurt Sansom -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.jacquenot at gmail.com Sat Jun 2 03:52:42 2018 From: guillaume.jacquenot at gmail.com (Guillaume Jacquenot) Date: Sat, 2 Jun 2018 09:52:42 +0200 Subject: [vtkusers] Ideas on how to debug a cross compiled program that used VTK Message-ID: Hello VTK developpers and users, I am doing cross compilation with docker dockcross for a fortran program using VTK. Target is a static windows 64 bit program, which is about 43 MB. - Without cross compilation, program works fine. - With cross compilation, program works fine when launched with wine in a debian - With cross compilation, program seems works fine on Windows, but throws error messages on error output: Program received signal SIGSEGV, Segmentation fault. This error is thrown even if the program just prints help and does nothing (no use of VTK code). If I disable the VTK part of my program, error goes away. (VTK part = VTK library+ my wrapping Fortran code to call VTK with pointer storage to keep track of vtkSmartPointer). I use other libraries that work fine. I don't know if it is related to VTK, but when I use gdb on Windows , I get some VTK stuff appearing (See below). If anyone has a clue on how I can track this down? From the log, can we say it that error is mine or comes from cross compilation? Maybe I should use valgrind to see if everything really works fine with. I have tried with the static VTK 6.3 version provided by mxe, and a personal static compilation of VTK 8.1.1. Thanks for reading till this point and here comes the interesting thing: build_windows>gdb testing.exe GNU gdb (GDB) 7.8.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later < http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-w64-mingw32". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from testing.exe...done. (gdb) r Starting program: testing.exe [New Thread 11212.0x362c] warning: Could not load shared library symbols for C:\windows\system32\kernel64.dll. Do you need "set solib-search-path" or "set sysroot"? Test module initialized . : successful assert, F : failed assert .......................................... Program received signal SIGSEGV, Segmentation fault. 0x0000000077adcff6 in ntdll!RtlEnterCriticalSection () from C:\windows\SYSTEM32\ntdll.dll (gdb) bt #0 0x0000000077adcff6 in ntdll!RtlEnterCriticalSection () from C:\windows\SYSTEM32\ntdll.dll #1 0x0000000000b95bb6 in detail::AtomicOps<8ull>::PreIncrement(detail::AtomicOps<8ull>::atomic_type*) () #2 0x0000000000b81b0d in vtkTimeStamp::Modified() () #3 0x0000000000b3a0b1 in vtkObject::Modified() () #4 0x0000000000acdb18 in vtkCollection::~vtkCollection() () #5 0x0000000001417817 in vtkObjectFactoryCollection::~vtkObjectFactoryCollection() () #6 0x0000000000b3aa85 in vtkObjectFactory::UnRegisterAllFactories() () #7 0x000007feff57908f in wcscspn () from C:\windows\system32\msvcrt.dll #8 0x00000000021f8348 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) bt -------------- next part -------------- An HTML attachment was scrubbed... URL: From pdhahn at compintensehpc.com Sat Jun 2 07:46:00 2018 From: pdhahn at compintensehpc.com (Paul Douglas Hahn) Date: Sat, 2 Jun 2018 06:46:00 -0500 Subject: [vtkusers] Ideas on how to debug a cross compiled program that used VTK In-Reply-To: References: Message-ID: <0d625fbb-1e0f-0039-7f70-01892f5d8e98@compintensehpc.com> Speaking generally, stack frames 7 + 6 are nonsense indicating that there is a link issue or a memory trasher involved (my guess). On 06/02/2018 02:52 AM, Guillaume Jacquenot wrote: > Hello VTK developpers and users, > > I am doing cross compilation with docker dockcross for a fortran > program using VTK. Target is a static windows 64 bit program, which is > about 43 MB. > > - Without cross compilation, program works fine. > - With cross compilation, program works fine when launched with wine > in a debian > - With cross compilation, program seems works fine on Windows, but > throws error messages on error output: ?Program received signal > SIGSEGV, Segmentation fault. This error is thrown even if the program > just prints help and does nothing (no use of VTK code). > > If I disable the VTK part of my program, error goes away. (VTK part = > VTK library+ my wrapping Fortran code to call VTK with pointer storage > to keep track of vtkSmartPointer). I use other libraries that work fine. > > > I don't know if it is related to VTK, but when I use gdb on Windows , > I get some VTK stuff appearing (See below). > > If anyone has a clue on how I can track this down? From the log, can > we say it that error is mine or comes from cross compilation? Maybe I > should use valgrind to see if everything really works fine with. > > I have tried with the static VTK 6.3 version provided by mxe, and a > personal static compilation of VTK 8.1.1. > > Thanks for reading till this point and here comes the interesting thing: > > ? ? build_windows>gdb testing.exe > ? ? GNU gdb (GDB) 7.8.1 > ? ? Copyright (C) 2014 Free Software Foundation, Inc. > ? ? License GPLv3+: GNU GPL version 3 or later > > ? ? This is free software: you are free to change and redistribute it. > ? ? There is NO WARRANTY, to the extent permitted by law.? Type "show > copying" > ? ? and "show warranty" for details. > ? ? This GDB was configured as "x86_64-w64-mingw32". > ? ? Type "show configuration" for configuration details. > ? ? For bug reporting instructions, please see: > ? ? . > ? ? Find the GDB manual and other documentation resources online at: > ? ? . > ? ? For help, type "help". > ? ? Type "apropos word" to search for commands related to "word"... > ? ? Reading symbols from testing.exe...done. > ? ? (gdb) r > ? ? Starting program: testing.exe > ? ? [New Thread 11212.0x362c] > ? ? warning: Could not load shared library symbols for > C:\windows\system32\kernel64.dll. > ? ? Do you need "set solib-search-path" or "set sysroot"? > > ? ? Test module initialized > > ? ? ? ? . : successful assert, ? F : failed assert > > ? ? .......................................... > ? ? Program received signal SIGSEGV, Segmentation fault. > ? ? 0x0000000077adcff6 in ntdll!RtlEnterCriticalSection () from > C:\windows\SYSTEM32\ntdll.dll > ? ? (gdb) bt > ? ? #0 ?0x0000000077adcff6 in ntdll!RtlEnterCriticalSection () from > C:\windows\SYSTEM32\ntdll.dll > ? ? #1 ?0x0000000000b95bb6 in > detail::AtomicOps<8ull>::PreIncrement(detail::AtomicOps<8ull>::atomic_type*) > () > ? ? #2 ?0x0000000000b81b0d in vtkTimeStamp::Modified() () > ? ? #3 ?0x0000000000b3a0b1 in vtkObject::Modified() () > ? ? #4 ?0x0000000000acdb18 in vtkCollection::~vtkCollection() () > ? ? #5 ?0x0000000001417817 in > vtkObjectFactoryCollection::~vtkObjectFactoryCollection() () > ? ? #6 ?0x0000000000b3aa85 in > vtkObjectFactory::UnRegisterAllFactories() () > ? ? #7 ?0x000007feff57908f in wcscspn () from > C:\windows\system32\msvcrt.dll > ? ? #8 ?0x00000000021f8348 in ?? () > ? ? Backtrace stopped: previous frame inner to this frame (corrupt stack?) > ? ? (gdb) bt > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -- Paul D. Hahn CompIntense HPC, LLC -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.murphy at gmail.com Sun Jun 3 10:11:17 2018 From: sebastien.murphy at gmail.com (smurphy) Date: Sun, 3 Jun 2018 07:11:17 -0700 (MST) Subject: [vtkusers] Orthographic projection onto arbitrary plane In-Reply-To: References: <1527778140580-0.post@n5.nabble.com> <1527838445611-0.post@n5.nabble.com> Message-ID: <1528035077831-0.post@n5.nabble.com> thanks it works. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From kf6kjg+vtk at gmail.com Sun Jun 3 19:30:23 2018 From: kf6kjg+vtk at gmail.com (Ricky C.) Date: Sun, 3 Jun 2018 16:30:23 -0700 Subject: [vtkusers] How to get texture coordinates from results of IntersectWithLine? Message-ID: I'd posted this a few days back in StackOverflow ( https://stackoverflow.com/questions/50595530/how-to-get- texture-coordinates-from-vtk-intersectwithline), but since I've not had an answer yet there I decided to sub here and re-ask. The question is best formatted there, but in summary I've loaded am OBJ that has a 3D triangulated model with per-vertex texture coordinates: UV coordinates. I then IntersectWithLine against a vtkModifiedBSPTree of said model, and get back the results. If I got a result I want to then get the texture coordinates at the intersection point. I understand that the intersection point, if it exists at all, is unlikely to land directly on a vertex. Thus, since this model is triangulated, there should always be 3 nearby vertices for any intersection point. The texture coordinates of each vertex can then be interpolated/weighted to give me a new synthesized texture coordinate that is the texture coordinate at the intersection point. If anyone can help here, on SO, or both, that'd be great. Thank you, Ricky Curtice -------------- next part -------------- An HTML attachment was scrubbed... URL: From abhishekworld at gmail.com Mon Jun 4 20:35:26 2018 From: abhishekworld at gmail.com (Abhishek) Date: Tue, 5 Jun 2018 10:35:26 +1000 Subject: [vtkusers] change ploydata color using vtk.vtkUnsignedCharArray dynamically not re-rendering Message-ID: Greetings, I am new to VTK so may be my question is very basic. I have following code, where the aim is to be able to change the lines colors using dynamically based on data we get from QColorDialog. if I apply the color directly to vtkActor and re-render the window then it just works fine. But eventually I wan to be able to change individual line Points color and thats why I am setting self.linesPolyData.GetCellData().SetScalars(self.colors) when I change the color using QPushButton in function def select_color(self): it doesn't re-render the lines with new color. What am I doing wrong? from Analysis.Channel import *import vtkimport numpy as npimport itertoolsimport sysimport math from PyQt5 import QtGui, QtCorefrom PyQt5.QtWidgets import QApplication, QWidget, QGridLayout, QScrollArea, QPushButton, QColorDialogfrom vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor # Qt Class which will render the objectsclass MainWindow(QWidget): def __init__(self, parent = None): super().__init__() self.layout = QGridLayout(self) self.color_button = QPushButton('Select Color') self.layout.addWidget(self.color_button) self.color_button.clicked.connect(self.select_color) self.color = [255, 255, 0, 255] self.colors = vtk.vtkUnsignedCharArray() self.colors.SetNumberOfComponents(4) # Create the polydata where we will store all the geometric data self.linesPolyData = vtk.vtkPolyData() # Create three points origin = [0.0, 0.0, 0.0] p0 = [1.0, 0.0, 0.0] p1 = [0.0, 1.0, 0.0] # Create a vtkPoints container and store the points in it pts = vtk.vtkPoints() pts.InsertNextPoint(origin) pts.InsertNextPoint(p0) pts.InsertNextPoint(p1) self.linesPolyData.SetPoints(pts) # Create the first line (between Origin and P0) line0 = vtk.vtkLine() line0.GetPointIds().SetId(0, 0) # the second 0 is the index of the Origin in linesPolyData's points line0.GetPointIds().SetId(1, 1) # the second 1 is the index of P0 in linesPolyData's points # Create the second line (between Origin and P1) line1 = vtk.vtkLine() line1.GetPointIds().SetId(0, 0) # the second 0 is the index of the Origin in linesPolyData's points line1.GetPointIds().SetId(1, 2) # 2 is the index of P1 in linesPolyData's points self.lines = vtk.vtkCellArray() self.lines.InsertNextCell(line0) self.lines.InsertNextCell(line1) # Add the lines to the polydata container self.linesPolyData.SetLines(self.lines) for i in range(0, self.lines.GetNumberOfCells()): self.colors.InsertNextTuple(self.color) self.linesPolyData.GetCellData().SetScalars(self.colors) self.mapper = vtk.vtkPolyDataMapper() self.mapper.SetInputData(self.linesPolyData) self.actor = vtk.vtkActor() self.actor.SetMapper(self.mapper) self.actor.GetProperty().SetLineWidth(4) self.vtk_widget = QVTKRenderWindowInteractor() # vtk_widget.setMinimumSize(round(1024/3), round(1024/3)) ren = vtk.vtkRenderer() self.vtk_widget.GetRenderWindow().AddRenderer(ren) ren.AddActor(self.actor) ren.ResetCamera() interactor = self.vtk_widget.GetRenderWindow().GetInteractor() interactor.Initialize() interactor.Start() self.layout.addWidget(self.vtk_widget) def select_color(self): color = QColorDialog.getColor(QtCore.Qt.green, self) if color.isValid(): self.color = color.getRgb() for i in range(0, self.lines.GetNumberOfCells()): self.colors.InsertNextTuple(self.color) self.linesPolyData.GetCellData().SetScalars(self.colors) self.mapper.SetInputData(self.linesPolyData) self.linesPolyData.Modified() self.mapper.Modified() # self.actor.GetProperty().Modified() self.vtk_widget.Render() if __name__ == '__main__': app = QApplication(sys.argv) win = MainWindow() win.show() sys.exit(app.exec_()) -- Abhishek zeroth.me -- Abhishek Patil zeroth.me -------------- next part -------------- An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Tue Jun 5 02:47:11 2018 From: kor1581 at gmail.com (ran) Date: Mon, 4 Jun 2018 23:47:11 -0700 (MST) Subject: [vtkusers] vtkTransform for vtkLineWidget2 Message-ID: <1528181231108-0.post@n5.nabble.com> Hi, Can apply vtkTransform (Rotate, Translate) on vtkLineWidget2? My intention is to rotate and translate vtkLineWidget2 using code (not by mouse interactions) and get the rotation angle value. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tkiniulis at gmail.com Tue Jun 5 02:59:26 2018 From: tkiniulis at gmail.com (TomasKiniulis) Date: Mon, 4 Jun 2018 23:59:26 -0700 (MST) Subject: [vtkusers] Extracting a sphere with vtkSphereWidget Message-ID: <1528181966656-0.post@n5.nabble.com> Hey folks, have a course in university to study The Visualization Toolkit. I'm a complete newbie and I'm quite surprised by the lack of information to learn this tool. So I hope you can help me here.My task is to extract a sphere from a model using vtkSphereWidget and visualize its scalar atrribute distribution using vtkGlyphs. How can I use a vtkSphereWidget to extract a sphere? Do I need to create a sphere that follows around the widget? Any examples you could suggest of such task?Found this useful example, but it's using a plane to cut. How would I use this with a sphere?https://www.vtk.org/Wiki/VTK/Examples/Cxx/VisualizationAlgorithms/CutterThis is my messy code, my attempt here was to make box cut instead of a plane one. But instead it throws me an error that "there is no suitable conversion function from "vtkSmartPointer to "vtkImplicitFunction *" exists.//Cutter code#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include class SphereCallback : public vtkCommand{public: static SphereCallback *New() { return new SphereCallback; } SphereCallback() {} virtual void Execute(vtkObject *caller, unsigned long, void*) { vtkSphereWidget *sphereWidget = reinterpret_cast(caller); double center[3]; sphereWidget->GetCenter(center); std::cout << "Center: " << center[0] << " " << center[1] << " " << center[2] << std::endl; }};int main(int, char *[]){ //nuskaitymas vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("Models\\carotid.vtk"); reader->Update(); vtkSmartPointer carotidMapper = vtkSmartPointer::New(); carotidMapper->SetInputConnection(reader->GetOutputPort()); //Create carotid actor vtkSmartPointer carotidActor = vtkSmartPointer::New(); carotidActor->GetProperty()->SetOpacity(0.5); carotidActor->SetMapper(carotidMapper); //Creating plane to cut this majestic peace of model vtkSmartPointer sphereC = vtkSmartPointer::New(); sphereC->SetXLength(40); sphereC->SetYLength(30); sphereC->SetZLength(20); sphereC->SetOrigin(20, 0, 0); // Create carotid cutter vtkSmartPointer cutterC = vtkSmartPointer::New(); cutterC->SetCutFunction(sphereC); cutterC->SetInputConnection(reader->GetOutputPort()); cutterC->Update(); vtkSmartPointer cutterMapperC = vtkSmartPointer::New(); cutterMapperC->SetInputConnection(cutterC->GetOutputPort()); // vtkSmartPointer cube = vtkSmartPointer::New(); cube->SetXLength(40); cube->SetYLength(30); cube->SetZLength(20); vtkSmartPointer cubeMapper = vtkSmartPointer::New(); cubeMapper->SetInputConnection(cube->GetOutputPort()); // Create a plane to cut,here it cuts in the XZ direction (xz normal=(1,0,0);XY =(0,0,1),YZ =(0,1,0) vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetOrigin(10, 0, 0); plane->SetNormal(1, 0, 0); // Create cutter vtkSmartPointer cutter = vtkSmartPointer::New(); cutter->SetCutFunction(plane); cutter->SetInputConnection(cube->GetOutputPort()); cutter->Update(); vtkSmartPointer cutterMapper = vtkSmartPointer::New(); cutterMapper->SetInputConnection(cutter->GetOutputPort()); // Create plane actor vtkSmartPointer planeActor = vtkSmartPointer::New(); planeActor->GetProperty()->SetColor(1.0, 1, 0); planeActor->GetProperty()->SetLineWidth(2); planeActor->SetMapper(cutterMapper); //Create second plane actor vtkSmartPointer planeActor2 = vtkSmartPointer::New(); planeActor2->GetProperty()->SetColor(1.0, 1, 0); planeActor2->GetProperty()->SetLineWidth(2); planeActor2->SetMapper(cutterMapper2); //Create carotid actor vtkSmartPointer carotidPlaneActor = vtkSmartPointer::New(); carotidPlaneActor ->GetProperty()->SetColor(1.0, 1, 0); carotidPlaneActor->GetProperty()->SetLineWidth(2); carotidPlaneActor->SetMapper(cutterMapperC); // Create cube actor vtkSmartPointer cubeActor = vtkSmartPointer::New(); cubeActor->GetProperty()->SetColor(0.5, 1, 0.5); cubeActor->GetProperty()->SetOpacity(0.5); cubeActor->SetMapper(cubeMapper); // Create renderers and add actors of plane and cube vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(planeActor); //display the rectangle resulting from the cut renderer->AddActor(cubeActor); //display the cube renderer->AddActor(carotidActor); //display carotid renderer->AddActor(planeActor2); //display rectangle of second cut renderer->AddActor(carotidPlaneActor); //display rectangle of carotid cut // Add renderer to renderwindow and render vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); //Sphere widget interactor // An interactor vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); vtkSmartPointer sphereWidget = vtkSmartPointer::New(); sphereWidget->SetInteractor(renderWindowInteractor); sphereWidget->SetRepresentationToWireframe(); sphereWidget->SetProp3D(carotidActor); sphereWidget->SetPlaceFactor(0.5); sphereWidget->PlaceWidget(); vtkSmartPointer cutter2 = vtkSmartPointer::New(); cutter2->SetCutFunction(sphereWidget); cutter2->SetInputConnection(cube->GetOutputPort()); cutter2->Update(); vtkSmartPointer cutterMapper2 = vtkSmartPointer::New(); cutterMapper2->SetInputConnection(cutter2->GetOutputPort()); sphereWidget->SetInteractor(renderWindowInteractor); sphereWidget->SetRepresentationToSurface(); vtkSmartPointer sphereCallback = vtkSmartPointer::New(); sphereWidget->AddObserver(vtkCommand::InteractionEvent, sphereCallback); renderWindow->SetSize(600, 600); renderWindowInteractor->SetRenderWindow(renderWindow); renderer->SetBackground(0, 0, 0); renderWindow->Render(); //sphere widget interactor renderWindowInteractor->Initialize(); renderWindow->Render(); sphereWidget->On(); renderWindowInteractor->Start(); return EXIT_SUCCESS;}Any suggestions would be highly appreciated. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From berti_krueger at hotmail.com Tue Jun 5 03:26:27 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Tue, 5 Jun 2018 07:26:27 +0000 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: , Message-ID: Hi David, thank you very much for your help. I tried the example from your link. Unfortunately the result is same as using the vtkVoxelModeller: [Screenshot result voxelization] I get only a voxelization of the surface. The interior of the voxelized cone is still hollow and not filled with voxels (at least this is implied by the visualization). For the visualization i use Bill Lorensen's example code from here: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/ I have attached this small example which compiles with VTK 8.1 to show the issue. It basicly only consist of the example code from your link (https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/) and the visualization code from the Bill Lorensen's example from the link above. I have not changed much. Any idea what is going wrong or what can i do get also voxelization of the interior (solid voxelization)? Thank you very much in advance. Regards Berti PolyDataToImageData - lorensen.github.io lorensen.github.io If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build: GenerateCubesFromLabels - GitHub Pages lorensen.github.io Usage: GenerateCubesFromLabels FullHead.mhd StartLabel EndLabel where InputVolume is a meta file containing a 3 volume of discrete labels. ________________________________ Von: David Gobbi Gesendet: Montag, 28. Mai 2018 23:13 An: Berti Kr?ger Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Solid Voxelization with VTK Hi Berti, If its a triangulated surface that you want to fill with voxels, use vtkPolyDataToImageStencil: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ PolyDataToImageData - lorensen.github.io lorensen.github.io If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build: If its a mesh of 3D elements and you want to sample the elements to create voxels, try vtkResampleToImage. - David On Mon, May 28, 2018 at 4:41 PM, Berti Kr?ger > wrote: Hello Everyone. For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per second), works, but only voxelizes the outer shell where the mesh boundary triangles are. The inner part of the mesh stays hollow. Is there some way to get solid voxelization of 3D-Triangle-Meshes out of the box with VTK ? Thank you very much in advance, Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot.jpg Type: image/jpeg Size: 62429 bytes Desc: screenshot.jpg URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: CMakeLists.txt URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PolyDataToImageDataVisualization.cxx Type: text/x-c++src Size: 7162 bytes Desc: PolyDataToImageDataVisualization.cxx URL: From scofieldzhu.zcg at gmail.com Tue Jun 5 04:30:26 2018 From: scofieldzhu.zcg at gmail.com (scofield zhu) Date: Tue, 5 Jun 2018 16:30:26 +0800 Subject: [vtkusers] dicom series image orientation problem! request David for help! Message-ID: hi david, I use vtkGDCMImageReader(gdcm2.8.5) to read dicom serires image, and SetFileLowerLeftOn() called too. after success reading, the process image codes as following: _____________________________________________________________________________ Point3 data_origin = imgdata->GetOrigin(); Point3 dataorigin = info->origin; Point3 patient_position = info->patient_position; //here: i am sure:data_origin is equal with both dataorigin and patient_position Vec3 row_orient = info->patient_row_orientation; Vec3 col_orient = info->patient_col_orientation; Vec3 slice_orient = info->patient_orientation; vtkMatrix4x4* matrix = vtkMatrix4x4::New(); matrix->Identity(); matrix->SetElement(0, 0, row_orient[0]); matrix->SetElement(0, 1, row_orient[1]); matrix->SetElement(0, 2, row_orient[2]); matrix->SetElement(1, 0, col_orient[0]); matrix->SetElement(1, 1, col_orient[1]); matrix->SetElement(1, 2, col_orient[2]); matrix->SetElement(2, 0, slice_orient[0]); matrix->SetElement(2, 1, slice_orient[1]); matrix->SetElement(2, 2, slice_orient[2]); vtkMatrix4x4* inverse_matrix = vtkMatrix4x4::New(); matrix->Invert(matrix, inverse_matrix); double new_origin[4] = {0.0}; new_origin[3] = 1.0; inverse_matrix->MultiplyPoint(data_origin, new_origin); inverse_matrix->Delete(); vtkImageChangeInformation* imgchangeinfo = vtkImageChangeInformation::New(); imgchangeinfo->SetOutputOrigin(new_origin[0], new_origin[1], new_origin[2]); imgchangeinfo->SetInputData(imgdata); imgchangeinfo->Update(); imgdata->DeepCopy(reslice->GetOutput()); imgchangeinfo->Delete(); vtkTransformFilter* transform_filter = vtkTransformFilter::New(); vtkTransform* patient_transform = vtkTransform::New(); patient_transform->SetMatrix(matrix); transform_filter->SetTransform(patient_transform); transform_filter->SetInputData(imgdata); transform_filter->Update(); imgdata->DeepCopy(transform_filter->GetOutputDataObject(0)); transform_filter->Delete(); patient_transform->Delete(); matrix->Delete(); __________________________________________________________________________ it works ok in some dicom series image, but not working for some series image especially single dcm file with multi-frame. what's wrong in my code? please help me ! thanks a lot! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Sateeshlearner at gmail.com Tue Jun 5 04:57:31 2018 From: Sateeshlearner at gmail.com (Itsme) Date: Tue, 5 Jun 2018 01:57:31 -0700 (MST) Subject: [vtkusers] Question about contour widget In-Reply-To: <1287592349995-3228950.post@n5.nabble.com> References: <1287570510534-3228302.post@n5.nabble.com> <1287578153940-3228481.post@n5.nabble.com> <1287592349995-3228950.post@n5.nabble.com> Message-ID: <1528189051044-0.post@n5.nabble.com> is your query about that polydata changed after the contour widgte dragged solved ? i too had the same doubt whether after changing the contour, can we get the polydata back which is according to the changes done by the contour widget? please revert back asap. itsme -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tj.corona at kitware.com Tue Jun 5 08:28:33 2018 From: tj.corona at kitware.com (TJ Corona) Date: Tue, 5 Jun 2018 08:28:33 -0400 Subject: [vtkusers] Extracting a sphere with vtkSphereWidget In-Reply-To: <1528181966656-0.post@n5.nabble.com> References: <1528181966656-0.post@n5.nabble.com> Message-ID: <061F9C85-0ED6-4228-8AD9-29B694EA35C4@kitware.com> Hello Tomas, > I'm quite surprised by the lack of information to learn this tool. There are quite a few sources information out there on how to use VTK: a wiki , a user?s guide , a textbook , generated documentation , and archives of this mailing list to name a few. > My task is to extract a sphere from a model using vtkSphereWidget and visualize its scalar atrribute distribution using vtkGlyphs. So, you have a dataset and you wish to clip a sphere from it and draw glyphs on this sphere?s surface? There are several ways you could try this, but here?s one off the top of my head: import your dataset, construct a sphere source, use vtkProbeFilter to sample your first dataset onto your sphere, and then glyph the resulting fields on your sphere polydata. You probably could use vtkCutter to accomplish this as well. Good luck, and welcome to VTK! Sincerely, T.J. > On Jun 5, 2018, at 2:59 AM, TomasKiniulis wrote: > > Hey folks, have a course in university to study The Visualization Toolkit. I'm a complete newbie and I'm quite surprised by the lack of information to learn this tool. So I hope you can help me here. My task is to extract a sphere from a model using vtkSphereWidget and visualize its scalar atrribute distribution using vtkGlyphs. How can I use a vtkSphereWidget to extract a sphere? Do I need to create a sphere that follows around the widget? Any examples you could suggest of such task? Found this useful example, but it's using a plane to cut. How would I use this with a sphere? https://www.vtk.org/Wiki/VTK/Examples/Cxx/VisualizationAlgorithms/Cutter This is my messy code, my attempt here was to make box cut instead of a plane one. But instead it throws me an error that "there is no suitable conversion function from "vtkSmartPointer to "vtkImplicitFunction *" exists. //Cutter code #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include class SphereCallback : public vtkCommand { public: static SphereCallback *New() { return new SphereCallback; } SphereCallback() {} virtual void Execute(vtkObject *caller, unsigned long, void*) { vtkSphereWidget *sphereWidget = reinterpret_cast(caller); double center[3]; sphereWidget->GetCenter(center); std::cout << "Center: " << center[0] << " " << center[1] << " " << center[2] << std::endl; } }; int main(int, char *[]) { //nuskaitymas vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("Models\\carotid.vtk"); reader->Update(); vtkSmartPointer carotidMapper = vtkSmartPointer::New(); carotidMapper->SetInputConnection(reader->GetOutputPort()); //Create carotid actor vtkSmartPointer carotidActor = vtkSmartPointer::New(); carotidActor->GetProperty()->SetOpacity(0.5); carotidActor->SetMapper(carotidMapper); //Creating plane to cut this majestic peace of model vtkSmartPointer sphereC = vtkSmartPointer::New(); sphereC->SetXLength(40); sphereC->SetYLength(30); sphereC->SetZLength(20); sphereC->SetOrigin(20, 0, 0); // Create carotid cutter vtkSmartPointer cutterC = vtkSmartPointer::New(); cutterC->SetCutFunction(sphereC); cutterC->SetInputConnection(reader->GetOutputPort()); cutterC->Update(); vtkSmartPointer cutterMapperC = vtkSmartPointer::New(); cutterMapperC->SetInputConnection(cutterC->GetOutputPort()); // vtkSmartPointer cube = vtkSmartPointer::New(); cube->SetXLength(40); cube->SetYLength(30); cube->SetZLength(20); vtkSmartPointer cubeMapper = vtkSmartPointer::New(); cubeMapper->SetInputConnection(cube->GetOutputPort()); // Create a plane to cut,here it cuts in the XZ direction (xz normal=(1,0,0);XY =(0,0,1),YZ =(0,1,0) vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetOrigin(10, 0, 0); plane->SetNormal(1, 0, 0); // Create cutter vtkSmartPointer cutter = vtkSmartPointer::New(); cutter->SetCutFunction(plane); cutter->SetInputConnection(cube->GetOutputPort()); cutter->Update(); vtkSmartPointer cutterMapper = vtkSmartPointer::New(); cutterMapper->SetInputConnection(cutter->GetOutputPort()); // Create plane actor vtkSmartPointer planeActor = vtkSmartPointer::New(); planeActor->GetProperty()->SetColor(1.0, 1, 0); planeActor->GetProperty()->SetLineWidth(2); planeActor->SetMapper(cutterMapper); //Create second plane actor vtkSmartPointer planeActor2 = vtkSmartPointer::New(); planeActor2->GetProperty()->SetColor(1.0, 1, 0); planeActor2->GetProperty()->SetLineWidth(2); planeActor2->SetMapper(cutterMapper2); //Create carotid actor vtkSmartPointer carotidPlaneActor = vtkSmartPointer::New(); carotidPlaneActor ->GetProperty()->SetColor(1.0, 1, 0); carotidPlaneActor->GetProperty()->SetLineWidth(2); carotidPlaneActor->SetMapper(cutterMapperC); // Create cube actor vtkSmartPointer cubeActor = vtkSmartPointer::New(); cubeActor->GetProperty()->SetColor(0.5, 1, 0.5); cubeActor->GetProperty()->SetOpacity(0.5); cubeActor->SetMapper(cubeMapper); // Create renderers and add actors of plane and cube vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(planeActor); //display the rectangle resulting from the cut renderer->AddActor(cubeActor); //display the cube renderer->AddActor(carotidActor); //display carotid renderer->AddActor(planeActor2); //display rectangle of second cut renderer->AddActor(carotidPlaneActor); //display rectangle of carotid cut // Add renderer to renderwindow and render vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); //Sphere widget interactor // An interactor vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); vtkSmartPointer sphereWidget = vtkSmartPointer::New(); sphereWidget->SetInteractor(renderWindowInteractor); sphereWidget->SetRepresentationToWireframe(); sphereWidget->SetProp3D(carotidActor); sphereWidget->SetPlaceFactor(0.5); sphereWidget->PlaceWidget(); vtkSmartPointer cutter2 = vtkSmartPointer::New(); cutter2->SetCutFunction(sphereWidget); cutter2->SetInputConnection(cube->GetOutputPort()); cutter2->Update(); vtkSmartPointer cutterMapper2 = vtkSmartPointer::New(); cutterMapper2->SetInputConnection(cutter2->GetOutputPort()); sphereWidget->SetInteractor(renderWindowInteractor); sphereWidget->SetRepresentationToSurface(); vtkSmartPointer sphereCallback = vtkSmartPointer::New(); sphereWidget->AddObserver(vtkCommand::InteractionEvent, sphereCallback); renderWindow->SetSize(600, 600); renderWindowInteractor->SetRenderWindow(renderWindow); renderer->SetBackground(0, 0, 0); renderWindow->Render(); //sphere widget interactor renderWindowInteractor->Initialize(); renderWindow->Render(); sphereWidget->On(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } Any suggestions would be highly appreciated. > Sent from the VTK - Users mailing list archive at Nabble.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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Jun 5 09:01:34 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 5 Jun 2018 07:01:34 -0600 Subject: [vtkusers] dicom series image orientation problem! request David for help! In-Reply-To: References: Message-ID: Where does info->patient_orientation come from? Is it the cross product of patient_row_orientation and patient_col_orientation? The line "imgdata->DeepCopy(reslice->GetOutput());" looks like a mistake, is it meant to be "imgdata->DeepCopy(imgchangeinfo->GetOutput());"? And where does the "imgdata" object come from? Note that it is only safe to DeepCopy into a data object that you create yourself, it isn't safe to DeepCopy into an object that is the output of a VTK algorithm. Also, the output of vtkTransformFilter is a vtkStructuredGrid, not a vtkImageData, so it seems like an unusual filter to use in a VTK image display pipeline. For the problem with multi-frame files, my guess is that you depend on proper sorting of the DICOM files in order to properly reconstruct the volume, and file sorting doesn't work if there is only one file. Instead, it is necessary to sort the frames, but how to do this depends on what kind of multi-frame file you have (e.g. NM vs enhanced MR/CT/US). If you're curious, you can see my own DICOM file/frame sorting code here: https://github.com/dgobbi/vtk-dicom/blob/master/Source/vtkDICOMSliceSorter.cxx#L414 - David On Tue, Jun 5, 2018 at 2:30 AM, scofield zhu wrote: > hi david, > I use vtkGDCMImageReader(gdcm2.8.5) to read dicom serires image, and > SetFileLowerLeftOn() called too. after success reading, the process image > codes as following: > ____________________________________________________________ > _________________ > Point3 data_origin = imgdata->GetOrigin(); > Point3 dataorigin = info->origin; > Point3 patient_position = info->patient_position; > > //here: i am sure:data_origin is equal with both dataorigin and > patient_position > > Vec3 row_orient = info->patient_row_orientation; > Vec3 col_orient = info->patient_col_orientation; > Vec3 slice_orient = info->patient_orientation; > > vtkMatrix4x4* matrix = vtkMatrix4x4::New(); > matrix->Identity(); > matrix->SetElement(0, 0, row_orient[0]); > matrix->SetElement(0, 1, row_orient[1]); > matrix->SetElement(0, 2, row_orient[2]); > matrix->SetElement(1, 0, col_orient[0]); > matrix->SetElement(1, 1, col_orient[1]); > matrix->SetElement(1, 2, col_orient[2]); > matrix->SetElement(2, 0, slice_orient[0]); > matrix->SetElement(2, 1, slice_orient[1]); > matrix->SetElement(2, 2, slice_orient[2]); > > vtkMatrix4x4* inverse_matrix = vtkMatrix4x4::New(); > matrix->Invert(matrix, inverse_matrix); > double new_origin[4] = {0.0}; > new_origin[3] = 1.0; > inverse_matrix->MultiplyPoint(data_origin, new_origin); > inverse_matrix->Delete(); > > vtkImageChangeInformation* imgchangeinfo = vtkImageChangeInformation:: > New(); > imgchangeinfo->SetOutputOrigin(new_origin[0], new_origin[1], > new_origin[2]); > imgchangeinfo->SetInputData(imgdata); > imgchangeinfo->Update(); > imgdata->DeepCopy(reslice->GetOutput()); > imgchangeinfo->Delete(); > > vtkTransformFilter* transform_filter = vtkTransformFilter::New(); > vtkTransform* patient_transform = vtkTransform::New(); > patient_transform->SetMatrix(matrix); > transform_filter->SetTransform(patient_transform); > transform_filter->SetInputData(imgdata); > transform_filter->Update(); > imgdata->DeepCopy(transform_filter->GetOutputDataObject(0)); > transform_filter->Delete(); > patient_transform->Delete(); > matrix->Delete(); > > __________________________________________________________________________ > > it works ok in some dicom series image, but not working for some > series image especially single dcm file with multi-frame. > > what's wrong in my code? please help me ! thanks a lot! > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Jun 5 09:41:32 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 5 Jun 2018 09:41:32 -0400 Subject: [vtkusers] change ploydata color using vtk.vtkUnsignedCharArray dynamically not re-rendering In-Reply-To: References: Message-ID: Hi Ahishek, It looks to me like you are appending to the end of the self.colors. Call self.colors.GetNumberOfTuples() to verify that. If you fix (do replacement with Insertvalue(id, value) instead of InserNextValue(value)) I think it will do what you are trying to do. hth David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Jun 4, 2018 at 8:35 PM, Abhishek wrote: > Greetings, > I am new to VTK so may be my question is very basic. > > I have following code, where the aim is to be able to change the lines > colors using dynamically based on data we get from QColorDialog. if I > apply the color directly to vtkActor and re-render the window then it > just works fine. But eventually I wan to be able to change individual line > Points color and thats why I am setting self.linesPolyData. > GetCellData().SetScalars(self.colors) when I change the color using > QPushButton in function def select_color(self): it doesn't re-render the > lines with new color. What am I doing wrong? > > from Analysis.Channel import *import vtkimport numpy as npimport itertoolsimport sysimport math > from PyQt5 import QtGui, QtCorefrom PyQt5.QtWidgets import QApplication, QWidget, QGridLayout, QScrollArea, QPushButton, QColorDialogfrom vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor > > > # Qt Class which will render the objectsclass MainWindow(QWidget): > def __init__(self, parent = None): > super().__init__() > self.layout = QGridLayout(self) > self.color_button = QPushButton('Select Color') > > self.layout.addWidget(self.color_button) > self.color_button.clicked.connect(self.select_color) > > self.color = [255, 255, 0, 255] > self.colors = vtk.vtkUnsignedCharArray() > self.colors.SetNumberOfComponents(4) > > # Create the polydata where we will store all the geometric data > self.linesPolyData = vtk.vtkPolyData() > > # Create three points > origin = [0.0, 0.0, 0.0] > p0 = [1.0, 0.0, 0.0] > p1 = [0.0, 1.0, 0.0] > > # Create a vtkPoints container and store the points in it > pts = vtk.vtkPoints() > pts.InsertNextPoint(origin) > pts.InsertNextPoint(p0) > pts.InsertNextPoint(p1) > > self.linesPolyData.SetPoints(pts) > > # Create the first line (between Origin and P0) > line0 = vtk.vtkLine() > line0.GetPointIds().SetId(0, 0) # the second 0 is the index of the Origin in linesPolyData's points > line0.GetPointIds().SetId(1, 1) # the second 1 is the index of P0 in linesPolyData's points > > # Create the second line (between Origin and P1) > line1 = vtk.vtkLine() > line1.GetPointIds().SetId(0, 0) # the second 0 is the index of the Origin in linesPolyData's points > line1.GetPointIds().SetId(1, 2) # 2 is the index of P1 in linesPolyData's points > > self.lines = vtk.vtkCellArray() > self.lines.InsertNextCell(line0) > self.lines.InsertNextCell(line1) > # Add the lines to the polydata container > self.linesPolyData.SetLines(self.lines) > > for i in range(0, self.lines.GetNumberOfCells()): > self.colors.InsertNextTuple(self.color) > > self.linesPolyData.GetCellData().SetScalars(self.colors) > > self.mapper = vtk.vtkPolyDataMapper() > self.mapper.SetInputData(self.linesPolyData) > > self.actor = vtk.vtkActor() > self.actor.SetMapper(self.mapper) > self.actor.GetProperty().SetLineWidth(4) > > self.vtk_widget = QVTKRenderWindowInteractor() > # vtk_widget.setMinimumSize(round(1024/3), round(1024/3)) > ren = vtk.vtkRenderer() > self.vtk_widget.GetRenderWindow().AddRenderer(ren) > > ren.AddActor(self.actor) > > ren.ResetCamera() > interactor = self.vtk_widget.GetRenderWindow().GetInteractor() > interactor.Initialize() > interactor.Start() > > self.layout.addWidget(self.vtk_widget) > > def select_color(self): > color = QColorDialog.getColor(QtCore.Qt.green, self) > if color.isValid(): > self.color = color.getRgb() > for i in range(0, self.lines.GetNumberOfCells()): > self.colors.InsertNextTuple(self.color) > > self.linesPolyData.GetCellData().SetScalars(self.colors) > self.mapper.SetInputData(self.linesPolyData) > self.linesPolyData.Modified() > self.mapper.Modified() > # self.actor.GetProperty().Modified() > self.vtk_widget.Render() > > > if __name__ == '__main__': > app = QApplication(sys.argv) > win = MainWindow() > win.show() > sys.exit(app.exec_()) > > -- > > Abhishek > > zeroth.me > > -- > Abhishek Patil > zeroth.me > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaba.pinter at queensu.ca Tue Jun 5 10:14:52 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Tue, 5 Jun 2018 14:14:52 +0000 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: , Message-ID: Hi Berti, There is a pretty robust conversion algorithm implemented within 3D Slicer but using solely VTK: https://github.com/Slicer/Slicer/blob/master/Libs/vtkSegmentationCore/vtkClosedSurfaceToBinaryLabelmapConversionRule.cxx#L118 It consists of a short pipeline of standard VTK filters (some preprocessing then vtkPolyDataToImageStencil and vtkImageStencil). Let me know if you have any questions. csaba From: vtkusers On Behalf Of Berti Kr?ger Sent: Tuesday, June 5, 2018 03:26 To: David Gobbi Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Solid Voxelization with VTK Hi David, thank you very much for your help. I tried the example from your link. Unfortunately the result is same as using the vtkVoxelModeller: [Screenshot result voxelization] I get only a voxelization of the surface. The interior of the voxelized cone is still hollow and not filled with voxels (at least this is implied by the visualization). For the visualization i use Bill Lorensen's example code from here: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/ I have attached this small example which compiles with VTK 8.1 to show the issue. It basicly only consist of the example code from your link (https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/) and the visualization code from the Bill Lorensen's example from the link above. I have not changed much. Any idea what is going wrong or what can i do get also voxelization of the interior (solid voxelization)? Thank you very much in advance. Regards Berti PolyDataToImageData - lorensen.github.io lorensen.github.io If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build: GenerateCubesFromLabels - GitHub Pages lorensen.github.io Usage: GenerateCubesFromLabels FullHead.mhd StartLabel EndLabel where InputVolume is a meta file containing a 3 volume of discrete labels. ________________________________ Von: David Gobbi > Gesendet: Montag, 28. Mai 2018 23:13 An: Berti Kr?ger Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Solid Voxelization with VTK Hi Berti, If its a triangulated surface that you want to fill with voxels, use vtkPolyDataToImageStencil: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ PolyDataToImageData - lorensen.github.io lorensen.github.io If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build: If its a mesh of 3D elements and you want to sample the elements to create voxels, try vtkResampleToImage. - David On Mon, May 28, 2018 at 4:41 PM, Berti Kr?ger > wrote: Hello Everyone. For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per second), works, but only voxelizes the outer shell where the mesh boundary triangles are. The inner part of the mesh stays hollow. Is there some way to get solid voxelization of 3D-Triangle-Meshes out of the box with VTK ? Thank you very much in advance, Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 62429 bytes Desc: image001.jpg URL: From epd at ilight.com Tue Jun 5 17:04:11 2018 From: epd at ilight.com (Earl Duque) Date: Tue, 5 Jun 2018 14:04:11 -0700 Subject: [vtkusers] Call for Papers/Participation: ISAV 2018: In Situ Infrastructures for Enabling Extreme-scale Analysis and Visualization Message-ID: <0b5201d3fd10$c0eeb5d0$42cc2170$@ilight.com> ISAV 2018: In Situ Infrastructures for Enabling Extreme-Scale Analysis and Visualization Held in conjunction with SC18: The International Conference on High Performance Computing, Networking, Storage and Analysis, Dallas, Texas, U.S.A. ISAV 2018 -- http://dav.lbl.gov/events/ISAV2018/ Full-day 9:00 AM - 5:30 PM Monday 12 Nov 2018 Workshop Theme The considerable interest in the HPC community regarding in situ analysis and visualization is due to several factors. First is an I/O cost savings, where data is analyzed/visualized while being generated, without first storing to a file system. Second is the potential for increased accuracy, where fine temporal sampling of transient analysis might expose some complex behavior missed in coarse temporal sampling. Third is the ability to use all available resources, CPUs and accelerators, in the computation of analysis products. The workshop brings together researchers, developers and practitioners from industry, academia, and government laboratories developing, applying, and deploying in situ methods in extreme-scale, high performance computing. The goal is to present research findings, lessons learned, and insights related to developing and applying in situ methods and infrastructure across a range of science and engineering applications in HPC environments; to discuss topics like opportunities presented by new architectures, existing infrastructure needs, requirements, and gaps, and experiences to foster and enable in situ analysis and visualization; to serve as a "center of gravity" for researchers, practitioners, and users/consumers of in situ methods and infrastructure in the HPC space. Participation/Call for Papers and Oral Presentations We invite two types of submissions to ISAV 2018: (1) short, 4-page papers that present research results, that identify opportunities or challenges, and that present case studies/best practices for in situ methods/infrastructure in the areas of data management, analysis and visualization; (2) lightning presentation submission, consisting of a 1- or 2-page submission, for a brief oral presentation at the workshop. Short papers will appear in the workshop proceedings and will be invited to give an oral presentation of 15 to 20 minutes; lightning round submissions that are invited to present at the workshop will have author names and titles included as part of the proceedings. Submissions of both types are welcome that fall within one or more areas of interest, as follows: Areas of interest for ISAV, include, but are not limited to: In situ infrastructures * Current Systems: production quality, research prototypes * Opportunities * Gaps System resources, hardware, and emerging architectures * Enabling Hardware * Hardware and architectures that provide opportunities for In situ processing, such as burst buffers, staging computations on I/O nodes, sharing cores within a node for both simulation and in situ processing Methods/algorithms/applications/Case studies * Best practices * Analysis: feature detection, statistical methods, temporal methods, geometric methods * Visualization: information visualization, scientific visualization, time-varying methods * Data reduction/compression * Examples/case studies of solving a specific science challenge with in situ methods/infrastructure. Simulation * Integration:data modeling, software-engineering * Resilience: error detection, fault recovery * Workflows for supporting complex in situ processing pipelines Requirements * Preserve important elements * Significantly reduce the data size * Flexibility for post-processing exploration Review Process All submissions will undergo a peer-review process consisting of three reviews by experts in the field, and evaluated according to relevance to the workshop theme, technical soundness, creativity, originality, and impactfulness of method/results. Lightning round submissions will be evaluated primarily for relevance to the workshop. Submission Process Authors are invited to submit papers of at most 4 pages in PDF format, excluding references, and lightning presentations of at most 2 pages in PDF format, excluding references. Papers must be submitted in PDF format (readable by Adobe Acrobat Reader 5.0 and higher) and formatted for 8.5" x 11" (U.S. Letter). A Latex template will be provided via the submission website, https://submissions.supercomputing.org, and via workshop website, http://dav.lbl.gov/events/ISAV2018/. We believe that reproducible science is essential, and that SC should be a leader in this effort. As a consequence ISAV 2018 participates in the SC reproducibility initiative and encourages submitters to include an appendix with reproducibility information. While we will not disqualify a paper based on information provided or not provided in this appendix, nor if the appendix is not available, the availability and quality of an appendix will be used in ranking a paper. For more information, see the ISAV 2018 reproducibility FAQ. Papers must be self-contained and provide the technical substance required for the program committee to evaluate their contributions. Submitted papers must be original work that has not appeared in and is not under consideration for another conference or a journal. See the ACM Prior Publication Policy for more details. Papers can be submitted at https://submissions.supercomputing.org. Publication in proceedings, presentation at the workshop All paper submissions that receive favorable reviews will be included as part of the workshop proceedings. Lightning round submission will not be included as part of the proceedings. Subject to the constraints of workshop length, some subset of the accepted publications will be invited to give a brief oral presentation at the workshop. The exact number of such presentations and their length will be determined after the review process has been completed. Timeline/Important Dates 10 August 2018 Abstract submission deadline 17 August 2018 Paper submission deadline 28 September 2018 Author notification 12 October 2018 Camera ready copy due 24 October 2018 Final program posted to ISAV web page 12 November 2018 ISAV 2018 workshop at SC18 Committees and Chairs * General chair: Matthew Wolf, Oak Ridge National Laboratory, USA * Program chair and co-chair: Kenneth Moreland, Sandia National Laboratory, USA; E. Wes Bethel, Lawrence Berkeley National Laboratory, USA * Publicity chair: Earl P.N. Duque, Intelligent Light, USA * Publications chair and co-chair: Nicola Ferrier, Argonne National Laboratory, USA; Silvio Rizzi, Argonne National Laboratory, USA * Early Career Program Committee Chair: E. Wes Bethel, Lawrence Berkeley National Laboratory, USA * At-large chair: Patrick O'Leary, Kitware, Inc., USA Organizing Committee * E. Wes Bethel, Lawrence Berkeley National Laboratory, USA * Earl P.N. Duque, Intelligent Light, USA * Nicola Ferrier, Argonne National Laboratory, USA * Patrick O'Leary, Kitware, Inc., USA * Gunther H. Weber, Lawrence Berkeley National Laboratory, USA * Matthew Wolf, Oak Ridge National Laboratory, USA Program Committee To be announced Early Career Program Committee To be announced /////////////////////////////////////////////////////////////////////////// Earl P.N. Duque, PhD Manager of Applied Research Intelligent Light 301 Route 17N - 7th Floor Rutherford, NJ 07070 PHN: (201) 460-4700 FAX: (201) 460-0221 EML: epd at ilight.com Advancing CFD, Advancing You Intelligent Light leads CFD with the most advanced products and services delivered by globally respected CFD and visualization practitioners. FieldView products and services give you better results sooner. We exist for the advancement of CFD - and you. Visit our website at http://www.ilight.com /////////////////////////////////////////////////////////////////////////// -------------- next part -------------- An HTML attachment was scrubbed... URL: From abhishekworld at gmail.com Tue Jun 5 19:11:14 2018 From: abhishekworld at gmail.com (Abhishek) Date: Wed, 6 Jun 2018 09:11:14 +1000 Subject: [vtkusers] change ploydata color using vtk.vtkUnsignedCharArray dynamically not re-rendering In-Reply-To: References: Message-ID: Hi David, Thanks for pointing out, Just to be clear InsertValue(id, val) trows error because val should be int, I tried InsertTuple(id, tuple) it didn't throw an error but didn't work either. End up re-initializing the vtk.vtkUnsignedCharArray in def select_color(self) as self.colors = vtk.vtkUnsignedCharArray() self.colors.SetNumberOfComponents(4) and it works smooth. :) Thanks, On Tue, Jun 5, 2018 at 11:41 PM David E DeMarle wrote: > Hi Ahishek, > > It looks to me like you are appending to the end of the self.colors. Call > self.colors.GetNumberOfTuples() to verify that. > If you fix (do replacement with Insertvalue(id, value) instead of > InserNextValue(value)) I think it will do what you are trying to do. > > hth > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > > Clifton Park, NY 12065 > > -8662 > Phone: 518-881-4909 > > On Mon, Jun 4, 2018 at 8:35 PM, Abhishek wrote: > >> Greetings, >> I am new to VTK so may be my question is very basic. >> >> I have following code, where the aim is to be able to change the lines >> colors using dynamically based on data we get from QColorDialog. if I >> apply the color directly to vtkActor and re-render the window then it >> just works fine. But eventually I wan to be able to change individual line >> Points color and thats why I am setting >> self.linesPolyData.GetCellData().SetScalars(self.colors) when I change >> the color using QPushButton in function def select_color(self): it >> doesn't re-render the lines with new color. What am I doing wrong? >> >> from Analysis.Channel import *import vtkimport numpy as npimport itertoolsimport sysimport math >> from PyQt5 import QtGui, QtCorefrom PyQt5.QtWidgets import QApplication, QWidget, QGridLayout, QScrollArea, QPushButton, QColorDialogfrom vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor >> >> >> # Qt Class which will render the objectsclass MainWindow(QWidget): >> def __init__(self, parent = None): >> super().__init__() >> self.layout = QGridLayout(self) >> self.color_button = QPushButton('Select Color') >> >> self.layout.addWidget(self.color_button) >> self.color_button.clicked.connect(self.select_color) >> >> self.color = [255, 255, 0, 255] >> self.colors = vtk.vtkUnsignedCharArray() >> self.colors.SetNumberOfComponents(4) >> >> # Create the polydata where we will store all the geometric data >> self.linesPolyData = vtk.vtkPolyData() >> >> # Create three points >> origin = [0.0, 0.0, 0.0] >> p0 = [1.0, 0.0, 0.0] >> p1 = [0.0, 1.0, 0.0] >> >> # Create a vtkPoints container and store the points in it >> pts = vtk.vtkPoints() >> pts.InsertNextPoint(origin) >> pts.InsertNextPoint(p0) >> pts.InsertNextPoint(p1) >> >> self.linesPolyData.SetPoints(pts) >> >> # Create the first line (between Origin and P0) >> line0 = vtk.vtkLine() >> line0.GetPointIds().SetId(0, 0) # the second 0 is the index of the Origin in linesPolyData's points >> line0.GetPointIds().SetId(1, 1) # the second 1 is the index of P0 in linesPolyData's points >> >> # Create the second line (between Origin and P1) >> line1 = vtk.vtkLine() >> line1.GetPointIds().SetId(0, 0) # the second 0 is the index of the Origin in linesPolyData's points >> line1.GetPointIds().SetId(1, 2) # 2 is the index of P1 in linesPolyData's points >> >> self.lines = vtk.vtkCellArray() >> self.lines.InsertNextCell(line0) >> self.lines.InsertNextCell(line1) >> # Add the lines to the polydata container >> self.linesPolyData.SetLines(self.lines) >> >> for i in range(0, self.lines.GetNumberOfCells()): >> self.colors.InsertNextTuple(self.color) >> >> self.linesPolyData.GetCellData().SetScalars(self.colors) >> >> self.mapper = vtk.vtkPolyDataMapper() >> self.mapper.SetInputData(self.linesPolyData) >> >> self.actor = vtk.vtkActor() >> self.actor.SetMapper(self.mapper) >> self.actor.GetProperty().SetLineWidth(4) >> >> self.vtk_widget = QVTKRenderWindowInteractor() >> # vtk_widget.setMinimumSize(round(1024/3), round(1024/3)) >> ren = vtk.vtkRenderer() >> self.vtk_widget.GetRenderWindow().AddRenderer(ren) >> >> ren.AddActor(self.actor) >> >> ren.ResetCamera() >> interactor = self.vtk_widget.GetRenderWindow().GetInteractor() >> interactor.Initialize() >> interactor.Start() >> >> self.layout.addWidget(self.vtk_widget) >> >> def select_color(self): >> color = QColorDialog.getColor(QtCore.Qt.green, self) >> if color.isValid(): >> self.color = color.getRgb() >> for i in range(0, self.lines.GetNumberOfCells()): >> self.colors.InsertNextTuple(self.color) >> >> self.linesPolyData.GetCellData().SetScalars(self.colors) >> self.mapper.SetInputData(self.linesPolyData) >> self.linesPolyData.Modified() >> self.mapper.Modified() >> # self.actor.GetProperty().Modified() >> self.vtk_widget.Render() >> >> >> if __name__ == '__main__': >> app = QApplication(sys.argv) >> win = MainWindow() >> win.show() >> sys.exit(app.exec_()) >> >> -- >> >> Abhishek >> >> zeroth.me >> >> -- >> Abhishek Patil >> zeroth.me >> >> _______________________________________________ >> 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> >> > -- Abhishek Patil zeroth.me -------------- next part -------------- An HTML attachment was scrubbed... URL: From tkiniulis at gmail.com Tue Jun 5 19:29:43 2018 From: tkiniulis at gmail.com (TomasKiniulis) Date: Tue, 5 Jun 2018 16:29:43 -0700 (MST) Subject: [vtkusers] Extracting a sphere with vtkSphereWidget In-Reply-To: <061F9C85-0ED6-4228-8AD9-29B694EA35C4@kitware.com> References: <1528181966656-0.post@n5.nabble.com> <061F9C85-0ED6-4228-8AD9-29B694EA35C4@kitware.com> Message-ID: <1528241383553-0.post@n5.nabble.com> Hi T.J. Thanks a lot for the response! I did some progress on the task, using vtkCutter a sphere is extracted correctly now. Although, right now, my problem is that all of the glyphs are pointing to one direction. How can I make the glyphs point according to scalar attribute distribution? This is the code so far: https://pastebin.com/yNYAEUgc Model file used: https://drive.google.com/file/d/1kZAFNFdw65PdiW1m1Ksstt_CKZLcFKPo/view?usp=sharing Regards, Tomas Kiniulis -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Tue Jun 5 19:49:58 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 5 Jun 2018 17:49:58 -0600 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Hi Berti, The correct pad filter to use for this is "vtkImageConstantPad", not "WrapPad", but padding really isn't necessary. Neither is the use of cell scalars, it's more appropriate to use point scalars when working with image data since each voxel is represented as a point scalar. The threshold should be set like this, for a threshold halfway between your "inval" and "outval": selector->ThresholdByUpper(0.5*(startLabel + endLabel)); The lookup table wasn't correctly set. Calling SetRange() does not set the number of entries in the lookup table (by default, the lookup table has 256 entries). lut->SetTableRange(0, 1); lut->SetNumberOfColors(2); Also, your color for "1" was transparent, whereas it has to be opaque in order to properly see a scalar-colored cone. I stripped the visualization part of your pipeline down to the following. No padding is done, the thresholding uses point scalars, no shifting, and no lookup table (instead, I call ScalarVisibilityOff() and set the color via the actor's property object). I replaced vtkPolyDataMapper with vtkDataSetMapper, which automatically skins the data. unsigned char startLabel = outval; unsigned char endLabel = inval; vtkNew selector; // the call to SetInputArrayToProcess() isn't necessary, the default is fine //selector->SetInputArrayToProcess(0, 0, 0, // vtkDataObject::FIELD_ASSOCIATION_POINTS, // vtkDataSetAttributes::SCALARS); selector->SetInputData(voxelImage); selector->ThresholdByUpper(0.5*(startLabel + endLabel)); selector->Update(); vtkNew mapper; mapper->SetInputConnection(selector->GetOutputPort()); mapper->ScalarVisibilityOff(); vtkNew actor; actor->SetMapper(mapper); actor->GetProperty()->SetColor(0.0, 1.0, 0.0); An image of the resulting cone is attached. - David On Tue, Jun 5, 2018 at 1:26 AM, Berti Kr?ger wrote: > Hi David, > > > thank you very much for your help. > > > I tried the example from your link. Unfortunately the result is same as > using the vtkVoxelModeller: > > > [image: Screenshot result voxelization] > I get only a voxelization of the surface. The interior of the voxelized > cone is still hollow and not filled with voxels (at least this is implied > by the visualization). > > > For the visualization i use Bill Lorensen's example code from here: > > https://lorensen.github.io/VTKExamples/site/Cxx/Medical/ > GenerateCubesFromLabels/ > > > > I have attached this small example which compiles with VTK 8.1 to show the > issue. It basicly only consist of the example code from your link ( > https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ > PolyDataToImageData/) and the visualization code from the Bill > Lorensen's example from the link above. I have not changed much. > > > Any idea what is going wrong or what can i do get also voxelization of the > interior (solid voxelization)? > > > Thank you very much in advance. > > > > Regards > > > Berti > > PolyDataToImageData - lorensen.github.io > > lorensen.github.io > If VTK is not installed but compiled on your system, you will need to > specify the path to your VTK build: > > > > GenerateCubesFromLabels - GitHub Pages > > lorensen.github.io > Usage: GenerateCubesFromLabels FullHead.mhd StartLabel EndLabel where > InputVolume is a meta file containing a 3 volume of discrete labels. > > > > > ------------------------------ > *Von:* David Gobbi > *Gesendet:* Montag, 28. Mai 2018 23:13 > *An:* Berti Kr?ger > *Cc:* vtkusers at vtk.org > *Betreff:* Re: [vtkusers] Solid Voxelization with VTK > > Hi Berti, > > If its a triangulated surface that you want to fill with voxels, use > vtkPolyDataToImageStencil: > https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/Pol > yDataToImageData/ > PolyDataToImageData - lorensen.github.io > > lorensen.github.io > If VTK is not installed but compiled on your system, you will need to > specify the path to your VTK build: > > > > If its a mesh of 3D elements and you want to sample the elements to create > voxels, try vtkResampleToImage. > > - David > > > > On Mon, May 28, 2018 at 4:41 PM, Berti Kr?ger > wrote: > > Hello Everyone. > > For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the > vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per > second), works, but only voxelizes the outer shell where the mesh boundary > triangles are. The inner part of the mesh stays hollow. > > Is there some way to get solid voxelization of 3D-Triangle-Meshes out of > the > box with VTK ? > > > Thank you very much in advance, > > Berti > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot.jpg Type: image/jpeg Size: 62429 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SolidCone.png Type: image/png Size: 16859 bytes Desc: not available URL: From kor1581 at gmail.com Wed Jun 6 07:10:16 2018 From: kor1581 at gmail.com (ran) Date: Wed, 6 Jun 2018 04:10:16 -0700 (MST) Subject: [vtkusers] How can add individual observers for the end points of vtkLineWidget2? Message-ID: <1528283416453-0.post@n5.nabble.com> Hi, I need to individually track movements of the two endpoints (vtkHandleWidget) of a line drawn using vtkLineWidget2. Can add separate observers for the endpoint vtkHandleWidgets? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tj.corona at kitware.com Wed Jun 6 08:27:15 2018 From: tj.corona at kitware.com (TJ Corona) Date: Wed, 6 Jun 2018 08:27:15 -0400 Subject: [vtkusers] Extracting a sphere with vtkSphereWidget In-Reply-To: <1528241383553-0.post@n5.nabble.com> References: <1528181966656-0.post@n5.nabble.com> <061F9C85-0ED6-4228-8AD9-29B694EA35C4@kitware.com> <1528241383553-0.post@n5.nabble.com> Message-ID: <9998A1C0-AFEE-4289-848D-52E01E191DDC@kitware.com> Hi Tomas, > My task is to extract a sphere from a model using vtkSphereWidget and visualize its scalar atrribute distribution using vtkGlyphs. Your problem may be that glyphs are more appropriate for vector datasets. In which direction would you like the glyphs to point? If you which for the glyphs to point radially outward and have a magnitude dictated by some scalar attribute, I believe you will have to construct that dataset yourself (cell normals * scalar value) and set it as your dataset?s vector field. Hope this helps! Sincerely, T.J. > On Jun 5, 2018, at 7:29 PM, TomasKiniulis wrote: > > Hi T.J. > > Thanks a lot for the response! > > I did some progress on the task, using vtkCutter a sphere is extracted > correctly now. Although, right now, my problem is that all of the glyphs are > pointing to one direction. How can I make the glyphs point according to > scalar attribute distribution? > > This is the code so far: > https://pastebin.com/yNYAEUgc > Model file used: > https://drive.google.com/file/d/1kZAFNFdw65PdiW1m1Ksstt_CKZLcFKPo/view?usp=sharing > > Regards, > Tomas Kiniulis > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From Bertram.Sabrowsky-Hirsch at risc-software.at Thu Jun 7 03:54:16 2018 From: Bertram.Sabrowsky-Hirsch at risc-software.at (Bertram Sabrowsky-Hirsch) Date: Thu, 7 Jun 2018 07:54:16 +0000 Subject: [vtkusers] Smooth label-map volume rendering Message-ID: <2FAC7B9E487D2C478AB8E83F062AF6800736A4D8@doug.risc.local> Hi all, I am working with volume data before and after a classification algorithm. The input volume has ushort intensity values, the output volume is a label-map where the values indicate each voxels class/label (background=0, vessel=1, aneurysm=2, ...). I am visualizing the input volume with a opacity transfer function that simulates a threshold filter (e.g. control points: 799=0.0, 800=1.0) and the result is a nice and smooth visualization of the volume. However, the output volume has this blocky Minecraft style effect. The opacity transfer function has the control points: 0=0.0, 1=1.0 and I use the color transfer function to distinguish the classes/labels. Is there a way to visualize the output volume in a similar way as the input volume? I considered generating iso-surface meshes and smooth those, but this is not really an option. I also don't really understand why this is an issue because the Input volume is also rendered with a distance of 1 between the two opacity thresholds. Are the volumes handled differently by vtk and how? Input volume: [cid:image001.jpg at 01D3FE45.7E817C10] Output volume: [cid:image006.jpg at 01D3FE45.7E817C10] Kind regards, Bertram -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 7443 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.jpg Type: image/jpeg Size: 10479 bytes Desc: image006.jpg URL: From madaramh at gmail.com Thu Jun 7 05:01:31 2018 From: madaramh at gmail.com (madz) Date: Thu, 7 Jun 2018 02:01:31 -0700 (MST) Subject: [vtkusers] Curved mid-side node mesh Message-ID: <1528362091530-0.post@n5.nabble.com> I have an unstructured grid made with vtkQuadraticTetra cells. (4 - corner points and 6 - mid-side points). Currently mid-side nodes are straight edge connected to the corner nodes. I would like to get them connected in a curved edge. How can I get the edges to appear as in the black line shown in the right image. The left one is what I have now. Thanks. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From hitman-47fran at hotmail.com Thu Jun 7 05:20:30 2018 From: hitman-47fran at hotmail.com (rolof) Date: Thu, 7 Jun 2018 02:20:30 -0700 (MST) Subject: [vtkusers] UseVTK.cmake: file not recognized Message-ID: <1528363230173-0.post@n5.nabble.com> Hello, I am trying to compile a source code to load a stl file. This source is inside of a folder in my dekstop, and I have not installed vtk, I have only built it. My Cmake file is the next: --------------------------------------------------------------------------------------------------------------- # This is the root ITK CMakeLists file. cmake_minimum_required(VERSION 3.9.5 FATAL_ERROR) foreach(p ## Only policies introduced after the cmake_minimum_required ## version need to explicitly be set to NEW. CMP0070 #3.10.0 Define ``file(GENERATE)`` behavior for relative paths. CMP0071 #3.10.0 Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files. ) if(POLICY ${p}) cmake_policy(SET ${p} NEW) endif() endforeach() set (CMAKE_CXX_STANDARD 11) # This project is designed to be built outside the Insight source tree. project(HelloWorld) # Find VTK. set( VTK_DIR "/home/fj/src_build/VTK-8.1.0" ) FIND_PACKAGE (VTK REQUIRED) IF(VTK_FOUND) INCLUDE(${VTK_USE_FILE}) ENDIF(VTK_FOUND) add_executable(loadStl load_STL_file.cpp) target_link_libraries(loadStl ${VTK_USE_FILE}) --------------------------------------------------------------------------------------------------------------- When I try to do the "make step" I obtain the next: --------------------------------------------------------------------------------------------------------------- [ 50%] Building CXX object CMakeFiles/loadStl.dir/load_STL_file.cpp.o [100%] Linking CXX executable loadStl /home/fj/src_build/VTK-8.1.0/CMake/UseVTK.cmake: file not recognized: collect2: error: ld returned 1 exit status .... --------------------------------------------------------------------------------------------------------------- I do not know what I am doing wrong. Thanks in advance. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Thu Jun 7 12:07:50 2018 From: lasso at queensu.ca (Andras Lasso) Date: Thu, 7 Jun 2018 16:07:50 +0000 Subject: [vtkusers] Smooth label-map volume rendering In-Reply-To: <2FAC7B9E487D2C478AB8E83F062AF6800736A4D8@doug.risc.local> References: <2FAC7B9E487D2C478AB8E83F062AF6800736A4D8@doug.risc.local> Message-ID: I would be interested in a good solution to this, too. In 3d Slicer, we've been using flying edges filter, which creates usable (non-blocky) surfaces very quickly (suitable for interactive editing). The limitation is that we still need a smoothing filter to avoid all staircase artifacts, and that it increases update time by about a magnitude. We've been evaluating using multi-volume rendering for displaying segmentation in 3D, to achieve faster updates and nicer transparent renderings. Multi-volume rendering is good because we can apply Gaussian smoothing on each input volume to get correctly reconstructed (non-blocky) surface and we can display overlapping segments. However, this Gaussian smoothing takes some time (still competitive with surface smoothing) and multi-volume renderer does not support shading yet (this is the blocking issue right now). Andras From: vtkusers On Behalf Of Bertram Sabrowsky-Hirsch Sent: Thursday, June 7, 2018 3:54 AM To: vtkusers at vtk.org Subject: [vtkusers] Smooth label-map volume rendering Hi all, I am working with volume data before and after a classification algorithm. The input volume has ushort intensity values, the output volume is a label-map where the values indicate each voxels class/label (background=0, vessel=1, aneurysm=2, ...). I am visualizing the input volume with a opacity transfer function that simulates a threshold filter (e.g. control points: 799=0.0, 800=1.0) and the result is a nice and smooth visualization of the volume. However, the output volume has this blocky Minecraft style effect. The opacity transfer function has the control points: 0=0.0, 1=1.0 and I use the color transfer function to distinguish the classes/labels. Is there a way to visualize the output volume in a similar way as the input volume? I considered generating iso-surface meshes and smooth those, but this is not really an option. I also don't really understand why this is an issue because the Input volume is also rendered with a distance of 1 between the two opacity thresholds. Are the volumes handled differently by vtk and how? Input volume: [cid:image001.jpg at 01D3FE56.AEDC44B0] Output volume: [cid:image002.jpg at 01D3FE56.AEDC44B0] Kind regards, Bertram -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 7443 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 10479 bytes Desc: image002.jpg URL: From chinander at gmail.com Thu Jun 7 13:11:59 2018 From: chinander at gmail.com (Mike Chinander) Date: Thu, 7 Jun 2018 12:11:59 -0500 Subject: [vtkusers] UseVTK.cmake: file not recognized In-Reply-To: <1528363230173-0.post@n5.nabble.com> References: <1528363230173-0.post@n5.nabble.com> Message-ID: Your target_link_libraries line should use the variable ${VTK_LIBRARIES} instead of ${VTK_USE_FILE}. On Thu, Jun 7, 2018 at 4:20 AM rolof wrote: > Hello, I am trying to compile a source code to load a stl file. This source > is inside of a folder in my dekstop, and I have not installed vtk, I have > only built it. > > My Cmake file is the next: > > --------------------------------------------------------------------------------------------------------------- > # This is the root ITK CMakeLists file. > cmake_minimum_required(VERSION 3.9.5 FATAL_ERROR) > foreach(p > ## Only policies introduced after the cmake_minimum_required > ## version need to explicitly be set to NEW. > CMP0070 #3.10.0 Define ``file(GENERATE)`` behavior for relative paths. > CMP0071 #3.10.0 Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` > files. > ) > if(POLICY ${p}) > cmake_policy(SET ${p} NEW) > endif() > endforeach() > > > set (CMAKE_CXX_STANDARD 11) > > # This project is designed to be built outside the Insight source tree. > project(HelloWorld) > # Find VTK. > set( VTK_DIR "/home/fj/src_build/VTK-8.1.0" ) > FIND_PACKAGE (VTK REQUIRED) > IF(VTK_FOUND) > INCLUDE(${VTK_USE_FILE}) > ENDIF(VTK_FOUND) > > add_executable(loadStl load_STL_file.cpp) > > target_link_libraries(loadStl ${VTK_USE_FILE}) > > --------------------------------------------------------------------------------------------------------------- > > > When I try to do the "make step" I obtain the next: > > --------------------------------------------------------------------------------------------------------------- > [ 50%] Building CXX object CMakeFiles/loadStl.dir/load_STL_file.cpp.o > [100%] Linking CXX executable loadStl > /home/fj/src_build/VTK-8.1.0/CMake/UseVTK.cmake: file not recognized: > collect2: error: ld returned 1 exit status > .... > > --------------------------------------------------------------------------------------------------------------- > > I do not know what I am doing wrong. Thanks in advance. > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hitman-47fran at hotmail.com Thu Jun 7 13:47:01 2018 From: hitman-47fran at hotmail.com (rolof) Date: Thu, 7 Jun 2018 10:47:01 -0700 (MST) Subject: [vtkusers] UseVTK.cmake: file not recognized In-Reply-To: References: <1528363230173-0.post@n5.nabble.com> Message-ID: <1528393621824-0.post@n5.nabble.com> Thank you I didn't notice that I was using a ${VTK_USE_FILE} instead of ${VTK_LIBRARIES}. Thank you again. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From csaba.pinter at queensu.ca Thu Jun 7 15:56:32 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Thu, 7 Jun 2018 19:56:32 +0000 Subject: [vtkusers] vtkGPUInfoList does not work with OpenGL2 Message-ID: Hi all, I'm trying to use the vtkGPUInfoList in VTK 9 built using OpenGL backend 2 to get the GPU memory. On both Windows 10 (with GeForce 1060) and MacOSX (10.13 Mid-2014), GetNumberOfGPUs returns 0 after Probe. Which is not surprising, because the instantiated info list object is of type vtkDummyGPUInfoList, which, according to the documentation, is "Useful when an OS specific implementation is not available". Is vtkGPUInfoList supposed to work with OpenGL2? Should I use another class? Thanks, csaba -------------- next part -------------- An HTML attachment was scrubbed... URL: From rickfrank at me.com Thu Jun 7 16:38:09 2018 From: rickfrank at me.com (Richard Frank) Date: Thu, 07 Jun 2018 16:38:09 -0400 Subject: [vtkusers] qt5_use_modules Message-ID: <007201d3fe9f$73431e30$59c95a90$@me.com> Hi, Cmake with VTK 8.1.1 with build examples turned on with Qt 5.11 gives me the following CMake Error at Examples/Infovis/Cxx/EasyView/CMakeLists.txt:77 (qt5_use_modules): Unknown CMake command "qt5_use_modules". Is there a workaround? Thanks Rick Frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From pbergeron at spiria.com Thu Jun 7 19:08:43 2018 From: pbergeron at spiria.com (Patrick Bergeron) Date: Thu, 7 Jun 2018 23:08:43 +0000 Subject: [vtkusers] Questions about vtkPolyData Message-ID: <08793A55-3D2D-413B-BC2C-8B036835CE26@spiria.com> Hi everyone. How would I go about specifying multiple sets of user attributes on a per-vertex basis on a polydata? For example, hlet?s say I would like multiple sets of uv coordinates, normal, colors, int attributes, etc? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.borduas at caboma.com Thu Jun 7 19:18:30 2018 From: jonathan.borduas at caboma.com (Jonathan Borduas) Date: Thu, 7 Jun 2018 23:18:30 +0000 Subject: [vtkusers] Questions about vtkPolyData In-Reply-To: <08793A55-3D2D-413B-BC2C-8B036835CE26@spiria.com> References: <08793A55-3D2D-413B-BC2C-8B036835CE26@spiria.com> Message-ID: Hey All these examples may help. https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData https://www.vtk.org/Wiki/VTK/Examples/Cxx/VTKConcepts/Scalars Best, Jonathan Borduas Get Outlook for iOS ________________________________ From: vtkusers on behalf of Patrick Bergeron Sent: Thursday, June 7, 2018 7:08:43 PM To: vtkusers at vtk.org Subject: [vtkusers] Questions about vtkPolyData Hi everyone. How would I go about specifying multiple sets of user attributes on a per-vertex basis on a polydata? For example, hlet?s say I would like multiple sets of uv coordinates, normal, colors, int attributes, etc? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Thu Jun 7 21:59:18 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 7 Jun 2018 21:59:18 -0400 Subject: [vtkusers] qt5_use_modules In-Reply-To: <007201d3fe9f$73431e30$59c95a90$@me.com> References: <007201d3fe9f$73431e30$59c95a90$@me.com> Message-ID: I think the example would have to be updated to just use ?target_link_libraries? instead of qt5_use_modules. See http://doc.qt.io/qt-5/cmake-manual.html ? On Thu, Jun 7, 2018 at 5:38 PM Richard Frank wrote: > > > Hi, > > > > Cmake with VTK 8.1.1 with build examples turned on with Qt 5.11 gives me > the following > > > > CMake Error at Examples/Infovis/Cxx/EasyView/CMakeLists.txt:77 > (qt5_use_modules): > Unknown CMake command "qt5_use_modules". > > > > Is there a workaround? > > > > Thanks > > > > Rick Frank > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From vacingforo at gmail.com Fri Jun 8 04:07:55 2018 From: vacingforo at gmail.com (vacingforo) Date: Fri, 8 Jun 2018 01:07:55 -0700 (MST) Subject: [vtkusers] Diagnostic of Geometric errors in a Mesh(.stl etc) Message-ID: <1528445275122-0.post@n5.nabble.com> I would like to has a set of test functions that let know how many, which elements of a mesh model(STL file) has geometric errors(Non-manifold elements, Self-intersections, etc: http://www.cs.wustl.edu/~taoju/research/repairsurvey.pdf ). In addition to this, It would be great if I also can fix it after diagnostic these errors. Is there functions or ways to do that with VTK? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Fri Jun 8 09:03:32 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 8 Jun 2018 09:03:32 -0400 Subject: [vtkusers] Diagnostic of Geometric errors in a Mesh(.stl etc) In-Reply-To: <1528445275122-0.post@n5.nabble.com> References: <1528445275122-0.post@n5.nabble.com> Message-ID: You can use vtkFeatureEdges [1] to identify edges that a non-manifold. Nothing I know of does self-intersection tests, but you could may do this yourself with vtkTriangle::TrianglesIntersect() [2]. I'm not aware of anything that will fix these situations automatically. HTH, Cory [1] https://www.vtk.org/doc/nightly/html/classvtkFeatureEdges.html [2] https://www.vtk.org/doc/nightly/html/classvtkTriangle.html#a26cd88fc3c83b075f84387ef0eef98b9 -- Cory Quammen Staff R&D Engineer Kitware, Inc. From will.schroeder at kitware.com Fri Jun 8 11:06:30 2018 From: will.schroeder at kitware.com (Will Schroeder) Date: Fri, 8 Jun 2018 11:06:30 -0400 Subject: [vtkusers] Letters of Support for VTK proposal Message-ID: *Dear VTK Community-Kitware is submitting a VTK development grant proposal to the NIH in early July, and we?d like you to send us a letter of support for that proposal. This four year proposal aims to make significant improvements to VTK including rendering enhancements (VR and AR), better support for the web (such as VTK.js), improved data integration (supporting deep learning systems and federated, distributed databases, for example), and updated mechanisms for community support (improving the software and contribution process, documentation).We are very excited about the proposal since it will make a very positive impact on VTK, its community, and the many applications that use VTK. Several years ago we received a similar award and were able to revamp our rendering support (OpenGL), improve our software processes, and lay the foundation for VTK.js (among other achievements). Now, we can really use your help with our follow-on proposal. Part of the strategy of our proposal is to demonstrate to the reviewers that VTK plays a critical part in medical innovation. Along this line, we want to hear from the developers and users of VTK, so that they can indicate their support for VTK and our proposal.If you?d like to help, we have included three example letters. Please modify one of them to fit your circumstances, copy it to your letterhead, sign it, and then send it (a scanned pdf is fine) directly to me by June 30. These letters in no way obligate you or your employer, they simply state ?VTK is great and important to my work.? Also, don?t worry if you are not doing biomedical research, we want to hear from everybody. Note that this information (i.e., the names of endorsers) is considered private, only the writers of the VTK proposal and the NIH review team will see this information.If you have any questions or concerns, please feel free to contact me directly. Thanks and we hope to hear from you (by June 30). Feel free to forward this to friends and family.Sincerely,Will SchroederStephen AylwardKen MartinExample support letters follow:Example 1=========Dr. Ken MartinKitware, Inc.28 Corporate DriveClifton Park, NY 12065, USADear Dr. Martin,I am writing to indicate my support for your NIH proposal for the continued development of VTK. The VTK standards and software are absolutely critical to my lab, the ___ Lab at ___ University, and to my collaborators around the world. Even as we speak, I am working on a project involving complex visualizations using 3D Slicer, Osirix, ParaView, and ITKSnap (which are largely built on VTK). Several of my students also use VTK software libraries to write customized user interfaces and visualizations for my scientific and clinical collaborators. Our most recent application was for a physiologist who wanted to explore very specialized data related to the movement of the tongue in speech after glossectomy surgery.There are many worthy software projects under development around the world, but very few who can claim to be foundational. VTK can claim this, and I'm certain it can claim to be at the core of hundreds of software products that will be used by many biomedical researchers and thousands more that will be developed and used in-house. The complexity of visualization tasks has continued to grow with the volume of data and its connections across scales and from anatomy to function and from individuals to populations. VTK is keeping up with the demand?leading the rest, in fact?and should be a high priority for continued funding.Example 2=========Dr. William J. SchroederKitware, Inc.28 Corporate DriveClifton Park, NY 12065, USADear Dr. Schroeder,I enthusiastically endorse your proposed effort to support and improve VTK. We use this open source software in our work and have found it extremely helpful as we create new technological solutions. We have developed a software application that is currently being used by around the world for scientific data visualization to gain new insights. Your Visualization Toolkit has provided the software tools needed to develop that application that has satisfied the needs of a very diverse customer base. We definitely would be interested in your proposed VR/AR enhancements and improved integration with web services. VTK fills a vital role in the international community?s scientific computing infrastructure; additional developments along the lines that you propose will certainly accelerate innovation.Example 3=========Dr. Stephen R. AylwardKitware, Inc.101 East Weaver St, Ste G4Carrboro, NC 27510, USADear Dr. Aylward,I am writing in ardent support of your NIH proposal to continue the development, enhancement, and dissemination of the Visualization Toolkit (VTK). Not only do I use it in several projects myself, but I have found that it fosters the dissemination and extension of research by allowing the community to efficiently reproduce research, to easily combine contributions in unexpected ways, and to transfer research into production. Developing and maintaining a project as large and complex as VTK while fostering such an active community is a breathtaking achievement, and I hope Kitware obtains the funding it needs to keep this work up. * -- William J. Schroeder, PhD Kitware, Inc. - Building the World's Technical Computing Software 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pbergeron at spiria.com Fri Jun 8 12:57:54 2018 From: pbergeron at spiria.com (Patrick Bergeron) Date: Fri, 8 Jun 2018 16:57:54 +0000 Subject: [vtkusers] Questions about vtkPolyData In-Reply-To: References: <08793A55-3D2D-413B-BC2C-8B036835CE26@spiria.com> Message-ID: <7AA03571-CE59-4046-AAFF-6CDFB9ADB594@spiria.com> Thanks. Do these values make it into vertex shaders? From: Jonathan Borduas Date: Thursday, June 7, 2018 at 7:18 PM To: Patrick Bergeron , "vtkusers at vtk.org" Subject: Re: [vtkusers] Questions about vtkPolyData Hey All these examples may help. https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData https://www.vtk.org/Wiki/VTK/Examples/Cxx/VTKConcepts/Scalars Best, Jonathan Borduas Get Outlook for iOS ________________________________ From: vtkusers on behalf of Patrick Bergeron Sent: Thursday, June 7, 2018 7:08:43 PM To: vtkusers at vtk.org Subject: [vtkusers] Questions about vtkPolyData Hi everyone. How would I go about specifying multiple sets of user attributes on a per-vertex basis on a polydata? For example, hlet?s say I would like multiple sets of uv coordinates, normal, colors, int attributes, etc? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.borduas at caboma.com Fri Jun 8 14:03:27 2018 From: jonathan.borduas at caboma.com (Jonathan Borduas) Date: Fri, 8 Jun 2018 18:03:27 +0000 Subject: [vtkusers] Questions about vtkPolyData In-Reply-To: <7AA03571-CE59-4046-AAFF-6CDFB9ADB594@spiria.com> References: <08793A55-3D2D-413B-BC2C-8B036835CE26@spiria.com> <7AA03571-CE59-4046-AAFF-6CDFB9ADB594@spiria.com> Message-ID: Hi Patrick, You can do per-vertex and per-cell coloring. https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleColoredPoints https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB For UV texture shading: https://www.vtk.org/Wiki/VTK/Examples/Cxx/Texture/TexturedSphere http://scylardor.fr/2013/05/06/making-multi-texturing-work-with-vtk/ To try some of the possibilities of VTK, you want to use ParaView. This application is heavily based on VTK and can give you a good sense of what is feasible with VTK. https://www.paraview.org/download/ Best Jonathan From: Patrick Bergeron Sent: Friday, June 08, 2018 12:58 PM To: Jonathan Borduas ; vtkusers at vtk.org Subject: Re: [vtkusers] Questions about vtkPolyData Thanks. Do these values make it into vertex shaders? From: Jonathan Borduas > Date: Thursday, June 7, 2018 at 7:18 PM To: Patrick Bergeron >, "vtkusers at vtk.org" > Subject: Re: [vtkusers] Questions about vtkPolyData Hey All these examples may help. https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData https://www.vtk.org/Wiki/VTK/Examples/Cxx/VTKConcepts/Scalars Best, Jonathan Borduas Get Outlook for iOS ________________________________ From: vtkusers > on behalf of Patrick Bergeron > Sent: Thursday, June 7, 2018 7:08:43 PM To: vtkusers at vtk.org Subject: [vtkusers] Questions about vtkPolyData Hi everyone. How would I go about specifying multiple sets of user attributes on a per-vertex basis on a polydata? For example, hlet?s say I would like multiple sets of uv coordinates, normal, colors, int attributes, etc? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Fri Jun 8 15:06:24 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Fri, 8 Jun 2018 15:06:24 -0400 Subject: [vtkusers] Smooth label-map volume rendering In-Reply-To: References: <2FAC7B9E487D2C478AB8E83F062AF6800736A4D8@doug.risc.local> Message-ID: Hi Andras, Note that the vtkGPUVolumeRayCastMapper already supports labeled data rendering. Take a look at TestGPURayCastCompositeMask and TestGPURayCastCompositeMaskBlend. Sankhesh? On Thu, Jun 7, 2018 at 12:08 PM Andras Lasso wrote: > I would be interested in a good solution to this, too. > > > > In 3d Slicer, we?ve been using flying edges filter, which creates usable > (non-blocky) surfaces very quickly (suitable for interactive editing). The > limitation is that we still need a smoothing filter to avoid all staircase > artifacts, and that it increases update time by about a magnitude. > > > > We?ve been evaluating using multi-volume rendering for displaying > segmentation in 3D, to achieve faster updates and nicer transparent > renderings. Multi-volume rendering is good because we can apply Gaussian > smoothing on each input volume to get correctly reconstructed (non-blocky) > surface and we can display overlapping segments. However, this Gaussian > smoothing takes some time (still competitive with surface smoothing) and > multi-volume renderer does not support shading yet (this is the blocking > issue right now). > > > > Andras > > > > *From:* vtkusers * On Behalf Of *Bertram > Sabrowsky-Hirsch > *Sent:* Thursday, June 7, 2018 3:54 AM > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] Smooth label-map volume rendering > > > > Hi all, > > > > I am working with volume data before and after a classification algorithm. > > The input volume has ushort intensity values, the output volume is a > label-map where the values indicate each voxels class/label (background=0, > vessel=1, aneurysm=2, ?). > > > > I am visualizing the input volume with a opacity transfer function that > simulates a threshold filter (e.g. control points: 799=0.0, 800=1.0) and > the result is a nice and smooth visualization of the volume. > > > > However, the output volume has this blocky Minecraft style effect. The > opacity transfer function has the control points: 0=0.0, 1=1.0 and I use > the color transfer function to distinguish the classes/labels. > > Is there a way to visualize the output volume in a similar way as the > input volume? I considered generating iso-surface meshes and smooth those, > but this is not really an option. I also don?t really understand why this > is an issue because the > > Input volume is also rendered with a distance of 1 between the two opacity > thresholds. Are the volumes handled differently by vtk and how? > > > > Input volume: > > > > Output volume: > > > > Kind regards, > > Bertram > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 7443 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 10479 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 10479 bytes Desc: not available URL: From pbergeron at spiria.com Fri Jun 8 16:43:21 2018 From: pbergeron at spiria.com (Patrick Bergeron) Date: Fri, 8 Jun 2018 20:43:21 +0000 Subject: [vtkusers] Questions about vtkPolyData In-Reply-To: References: <08793A55-3D2D-413B-BC2C-8B036835CE26@spiria.com> <7AA03571-CE59-4046-AAFF-6CDFB9ADB594@spiria.com> Message-ID: Yep, I got that. My question ?Do these values make it into vertex shaders?? was meant so that I?d like to know that, if they DO get into shaders, how would they be names, and what would the shader script look like, because I need to do custom GLSL shading stuff with scalar/vector attributes that are sent on a per-vertex basis. (in fact, I want data to be sent on a per-vertex basis to the VTK vertex shader, so that I can make them a varying variable in the fragment shader). Thanks! Patrick From: Jonathan Borduas Date: Friday, June 8, 2018 at 2:03 PM To: Patrick Bergeron , "vtkusers at vtk.org" Subject: RE: [vtkusers] Questions about vtkPolyData Hi Patrick, You can do per-vertex and per-cell coloring. https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleColoredPoints https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB For UV texture shading: https://www.vtk.org/Wiki/VTK/Examples/Cxx/Texture/TexturedSphere http://scylardor.fr/2013/05/06/making-multi-texturing-work-with-vtk/ To try some of the possibilities of VTK, you want to use ParaView. This application is heavily based on VTK and can give you a good sense of what is feasible with VTK. https://www.paraview.org/download/ Best Jonathan From: Patrick Bergeron Sent: Friday, June 08, 2018 12:58 PM To: Jonathan Borduas ; vtkusers at vtk.org Subject: Re: [vtkusers] Questions about vtkPolyData Thanks. Do these values make it into vertex shaders? From: Jonathan Borduas > Date: Thursday, June 7, 2018 at 7:18 PM To: Patrick Bergeron >, "vtkusers at vtk.org" > Subject: Re: [vtkusers] Questions about vtkPolyData Hey All these examples may help. https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData https://www.vtk.org/Wiki/VTK/Examples/Cxx/VTKConcepts/Scalars Best, Jonathan Borduas Get Outlook for iOS ________________________________ From: vtkusers > on behalf of Patrick Bergeron > Sent: Thursday, June 7, 2018 7:08:43 PM To: vtkusers at vtk.org Subject: [vtkusers] Questions about vtkPolyData Hi everyone. How would I go about specifying multiple sets of user attributes on a per-vertex basis on a polydata? For example, hlet?s say I would like multiple sets of uv coordinates, normal, colors, int attributes, etc? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.borduas at caboma.com Fri Jun 8 17:14:56 2018 From: jonathan.borduas at caboma.com (Jonathan Borduas) Date: Fri, 8 Jun 2018 21:14:56 +0000 Subject: [vtkusers] Questions about vtkPolyData In-Reply-To: References: <08793A55-3D2D-413B-BC2C-8B036835CE26@spiria.com> <7AA03571-CE59-4046-AAFF-6CDFB9ADB594@spiria.com> , Message-ID: Never play with that, but you specify ?user? shader like this: https://gitlab.kitware.com/vtk/vtk/blob/v7.0.0.rc2/Rendering/OpenGL2/Testing/Cxx/TestUserShader.cxx Jonathan Borduas Get Outlook for iOS ________________________________ From: Patrick Bergeron Sent: Friday, June 8, 2018 4:43:21 PM To: Jonathan Borduas; vtkusers at vtk.org Subject: Re: [vtkusers] Questions about vtkPolyData Yep, I got that. My question ?Do these values make it into vertex shaders?? was meant so that I?d like to know that, if they DO get into shaders, how would they be names, and what would the shader script look like, because I need to do custom GLSL shading stuff with scalar/vector attributes that are sent on a per-vertex basis. (in fact, I want data to be sent on a per-vertex basis to the VTK vertex shader, so that I can make them a varying variable in the fragment shader). Thanks! Patrick From: Jonathan Borduas Date: Friday, June 8, 2018 at 2:03 PM To: Patrick Bergeron , "vtkusers at vtk.org" Subject: RE: [vtkusers] Questions about vtkPolyData Hi Patrick, You can do per-vertex and per-cell coloring. https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleColoredPoints https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB For UV texture shading: https://www.vtk.org/Wiki/VTK/Examples/Cxx/Texture/TexturedSphere http://scylardor.fr/2013/05/06/making-multi-texturing-work-with-vtk/ To try some of the possibilities of VTK, you want to use ParaView. This application is heavily based on VTK and can give you a good sense of what is feasible with VTK. https://www.paraview.org/download/ Best Jonathan From: Patrick Bergeron Sent: Friday, June 08, 2018 12:58 PM To: Jonathan Borduas ; vtkusers at vtk.org Subject: Re: [vtkusers] Questions about vtkPolyData Thanks. Do these values make it into vertex shaders? From: Jonathan Borduas > Date: Thursday, June 7, 2018 at 7:18 PM To: Patrick Bergeron >, "vtkusers at vtk.org" > Subject: Re: [vtkusers] Questions about vtkPolyData Hey All these examples may help. https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData https://www.vtk.org/Wiki/VTK/Examples/Cxx/VTKConcepts/Scalars Best, Jonathan Borduas Get Outlook for iOS ________________________________ From: vtkusers > on behalf of Patrick Bergeron > Sent: Thursday, June 7, 2018 7:08:43 PM To: vtkusers at vtk.org Subject: [vtkusers] Questions about vtkPolyData Hi everyone. How would I go about specifying multiple sets of user attributes on a per-vertex basis on a polydata? For example, hlet?s say I would like multiple sets of uv coordinates, normal, colors, int attributes, etc? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Jun 8 17:26:25 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 8 Jun 2018 17:26:25 -0400 Subject: [vtkusers] Questions about vtkPolyData In-Reply-To: References: <08793A55-3D2D-413B-BC2C-8B036835CE26@spiria.com> <7AA03571-CE59-4046-AAFF-6CDFB9ADB594@spiria.com> Message-ID: You can use mapper->MapDataArrayToVertexAttribute() to hand over specific data arrays of your choice to your custom shaders. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Jun 8, 2018 at 5:14 PM, Jonathan Borduas < jonathan.borduas at caboma.com> wrote: > Never play with that, but you specify ?user? shader like this: > > https://gitlab.kitware.com/vtk/vtk/blob/v7.0.0.rc2/ > Rendering/OpenGL2/Testing/Cxx/TestUserShader.cxx > > Jonathan Borduas > > Get Outlook for iOS > ------------------------------ > *From:* Patrick Bergeron > *Sent:* Friday, June 8, 2018 4:43:21 PM > *To:* Jonathan Borduas; vtkusers at vtk.org > > *Subject:* Re: [vtkusers] Questions about vtkPolyData > > > Yep, I got that. > > > > My question ?Do these values make it into vertex shaders?? was meant so > that I?d like to know that, if they DO get into shaders, how would they be > names, and what would the shader script look like, because I need to do > custom GLSL shading stuff with scalar/vector attributes that are sent on a > per-vertex basis. > > > > (in fact, I want data to be sent on a per-vertex basis to the VTK vertex > shader, so that I can make them a varying variable in the fragment shader). > > > > Thanks! > > Patrick > > > > *From: *Jonathan Borduas > *Date: *Friday, June 8, 2018 at 2:03 PM > *To: *Patrick Bergeron , "vtkusers at vtk.org" < > vtkusers at vtk.org> > *Subject: *RE: [vtkusers] Questions about vtkPolyData > > > > Hi Patrick, > > You can do per-vertex and per-cell coloring. > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleColoredPoints > https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB > > > For UV texture shading: > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/Texture/TexturedSphere > > http://scylardor.fr/2013/05/06/making-multi-texturing-work-with-vtk/ > > > > To try some of the possibilities of VTK, you want to use ParaView. This > application is heavily based on VTK and can give you a good sense of what > is feasible with VTK. > > https://www.paraview.org/download/ > > > > Best > > > > Jonathan > > > > *From:* Patrick Bergeron > *Sent:* Friday, June 08, 2018 12:58 PM > *To:* Jonathan Borduas ; vtkusers at vtk.org > *Subject:* Re: [vtkusers] Questions about vtkPolyData > > > > Thanks. Do these values make it into vertex shaders? > > > > *From: *Jonathan Borduas > *Date: *Thursday, June 7, 2018 at 7:18 PM > *To: *Patrick Bergeron , "vtkusers at vtk.org" < > vtkusers at vtk.org> > *Subject: *Re: [vtkusers] Questions about vtkPolyData > > > > Hey > > > > All these examples may help. > > > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints > > > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData > > > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/VTKConcepts/Scalars > > > > Best, > > > > Jonathan Borduas > > > > > > Get Outlook for iOS > ------------------------------ > > *From:* vtkusers on behalf of > Patrick Bergeron > *Sent:* Thursday, June 7, 2018 7:08:43 PM > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] Questions about vtkPolyData > > > > Hi everyone. > > > > How would I go about specifying multiple sets of user attributes on a > per-vertex basis on a polydata? > > > > For example, hlet?s say I would like multiple sets of uv coordinates, > normal, colors, int attributes, etc? > > > > Thanks > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Jun 8 18:05:15 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 8 Jun 2018 15:05:15 -0700 Subject: [vtkusers] Questions about vtkPolyData In-Reply-To: References: <08793A55-3D2D-413B-BC2C-8B036835CE26@spiria.com> <7AA03571-CE59-4046-AAFF-6CDFB9ADB594@spiria.com> Message-ID: First, please do not use the examples at https://www.vtk.org/Wiki/VTK/Examples These are no longer updated and will eventually go away. Instead use the site, https://lorensen.github.io/VTKExamples/site/ which contains updated and expanded examples as well as copies of the textbook: https://lorensen.github.io/VTKExamples/site/VTKBook/ There are a few shader examples here https://lorensen.github.io/VTKExamples/site/Cxx/#shaders You can also follow progress of the VTK Examples Project at : https://www.researchgate.net/project/VTK-Examples Here is as vertex shader: https://lorensen.github.io/VTKExamples/site/Cxx/Shaders/BozoShader/ Bill On Fri, Jun 8, 2018 at 1:43 PM, Patrick Bergeron wrote: > Yep, I got that. > > > > My question ?Do these values make it into vertex shaders?? was meant so that > I?d like to know that, if they DO get into shaders, how would they be names, > and what would the shader script look like, because I need to do custom GLSL > shading stuff with scalar/vector attributes that are sent on a per-vertex > basis. > > > > (in fact, I want data to be sent on a per-vertex basis to the VTK vertex > shader, so that I can make them a varying variable in the fragment shader). > > > > Thanks! > > Patrick > > > > From: Jonathan Borduas > Date: Friday, June 8, 2018 at 2:03 PM > To: Patrick Bergeron , "vtkusers at vtk.org" > > Subject: RE: [vtkusers] Questions about vtkPolyData > > > > Hi Patrick, > > You can do per-vertex and per-cell coloring. > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleColoredPoints > https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB > > > For UV texture shading: > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/Texture/TexturedSphere > > http://scylardor.fr/2013/05/06/making-multi-texturing-work-with-vtk/ > > > > To try some of the possibilities of VTK, you want to use ParaView. This > application is heavily based on VTK and can give you a good sense of what is > feasible with VTK. > > https://www.paraview.org/download/ > > > > Best > > > > Jonathan > > > > From: Patrick Bergeron > Sent: Friday, June 08, 2018 12:58 PM > To: Jonathan Borduas ; vtkusers at vtk.org > Subject: Re: [vtkusers] Questions about vtkPolyData > > > > Thanks. Do these values make it into vertex shaders? > > > > From: Jonathan Borduas > Date: Thursday, June 7, 2018 at 7:18 PM > To: Patrick Bergeron , "vtkusers at vtk.org" > > Subject: Re: [vtkusers] Questions about vtkPolyData > > > > Hey > > > > All these examples may help. > > > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints > > > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData > > > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/VTKConcepts/Scalars > > > > Best, > > > > Jonathan Borduas > > > > > > Get Outlook for iOS > > ________________________________ > > From: vtkusers on behalf of Patrick > Bergeron > Sent: Thursday, June 7, 2018 7:08:43 PM > To: vtkusers at vtk.org > Subject: [vtkusers] Questions about vtkPolyData > > > > Hi everyone. > > > > How would I go about specifying multiple sets of user attributes on a > per-vertex basis on a polydata? > > > > For example, hlet?s say I would like multiple sets of uv coordinates, > normal, colors, int attributes, etc? > > > > Thanks > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsParadise at noware dot com From vjblog_info at yahoo.com Fri Jun 8 19:53:39 2018 From: vjblog_info at yahoo.com (terminator) Date: Fri, 8 Jun 2018 16:53:39 -0700 (MST) Subject: [vtkusers] Smooth label-map volume rendering In-Reply-To: <2FAC7B9E487D2C478AB8E83F062AF6800736A4D8@doug.risc.local> References: <2FAC7B9E487D2C478AB8E83F062AF6800736A4D8@doug.risc.local> Message-ID: <1528502019542-0.post@n5.nabble.com> Wow why label-map volume rendering has many problems and limitation? Except what you said, I figured out that I can't change opacity of each component independently and just opacity of the first one (index=0) will be applied (while I can SetScalarOpacity(1,tf),... ). Also Do you know why does it just support up to four components?! And is there any plan to solve them? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From 278124177 at qq.com Sat Jun 9 04:00:33 2018 From: 278124177 at qq.com (=?gb18030?B?zui3qM7ozOw=?=) Date: Sat, 9 Jun 2018 16:00:33 +0800 Subject: [vtkusers] Out line of actor Message-ID: hi I want to show the outline of a actor like the picture below, how can i do this with vtk? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FE3F6774 at A4ECBC69.21891B5B.jpg.jpg Type: image/jpeg Size: 47468 bytes Desc: not available URL: From rasoul.sharifian1 at gmail.com Sat Jun 9 05:41:14 2018 From: rasoul.sharifian1 at gmail.com (Rasoul Sharifian) Date: Sat, 9 Jun 2018 14:11:14 +0430 Subject: [vtkusers] Read Series of DICOM images Message-ID: Hi every one, I am a beginner user and I want to read a series of DICOM images and access different views( (Axial,Coronal, and Sagittal). I am using ImageSlicing.cxx example. My question is how to put my DICOM image series into this example? The reader uses reader->SetFilePrefix(argv[1]); How should I use this function to read my DICOM series? Thanks a lot -------------- next part -------------- An HTML attachment was scrubbed... URL: From lorfalwit at gmail.com Sat Jun 9 05:54:47 2018 From: lorfalwit at gmail.com (=?UTF-8?B?bG9yZmFsd2l0QGdtYWlsLmNvbQ==?=) Date: Sat, 9 Jun 2018 17:54:47 +0800 (GMT+08:00) Subject: [vtkusers] Read Series of DICOM images Message-ID: <5b1ba3ed.1c69fb81.4828b.78c0@mx.google.com> An HTML attachment was scrubbed... URL: From rasoul.sharifian1 at gmail.com Sat Jun 9 07:43:29 2018 From: rasoul.sharifian1 at gmail.com (Rasoul Sharifian) Date: Sat, 9 Jun 2018 16:13:29 +0430 Subject: [vtkusers] Create a 3d volume using series of DICOM images Message-ID: Hi every one, I have a series of DICOM images and I want to create and display a 3d volume from these images. I used ITK library and I successfully create a volume in .mha format. But I want to visualize my 3d volume, So I think I should use VTK library. any help would be welcome Thanks a lot -------------- next part -------------- An HTML attachment was scrubbed... URL: From vjblog_info at yahoo.com Sat Jun 9 10:32:09 2018 From: vjblog_info at yahoo.com (terminator) Date: Sat, 9 Jun 2018 07:32:09 -0700 (MST) Subject: [vtkusers] Create a 3d volume using series of DICOM images In-Reply-To: References: Message-ID: <1528554729811-0.post@n5.nabble.com> Although if you just want to visualize, you can use 3D Slicer (3D slicer uses VTK). But in VTK, if you have a vtkImageData (which explained http://vtk.1045678.n5.nabble.com/Read-Series-of-DICOM-images-td5747695.html), you just need a Mapper. Creating vtkImageData for mha format is also simply done by vtkMetaImageReader. Create an object (mapper) of vtkSmartVolumeMapper, then connect your vtkImageData output port to mapper input port: /mapper->SetInputConnection(imageData->GetOutputPort()). / Then set vtkVolume mapper to that object. vtkVolume also need a vtkVolumeProperty object to control colors and opacity. You can find many examples at https://lorensen.github.io/VTKExamples/site/ -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From hitman-47fran at hotmail.com Sat Jun 9 12:30:54 2018 From: hitman-47fran at hotmail.com (rolof) Date: Sat, 9 Jun 2018 09:30:54 -0700 (MST) Subject: [vtkusers] Multithread filer? Message-ID: <1528561854600-0.post@n5.nabble.com> Hi everyone, is It possible to create a multithread filter like ITK multithread filer or the only way is using openMP? On the other and, it is possible to use GPU filters or should I do it myself with opencl low level functions? Thanks in advance. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Sat Jun 9 15:16:25 2018 From: lasso at queensu.ca (Andras Lasso) Date: Sat, 9 Jun 2018 19:16:25 +0000 Subject: [vtkusers] Smooth label-map volume rendering In-Reply-To: References: <2FAC7B9E487D2C478AB8E83F062AF6800736A4D8@doug.risc.local> Message-ID: Thank you for the information. Do these rendering options allow smoothing (low-pass filtering that reconstructs the continuous signal from discrete samples)? Is visualization of overlapping segments supported? I know that generating new label value for each intersection combination and setting appropriate color and opacity value could be a solution. However, this is only practical if number of segments is small (up to 16 segments a label value could be a bitfield which encodes presence of each segment), but not a generally applicable solution, we need support visualization up to about 200 potentially overlapping segments. It is also a difficulty that current image processing filter implementations cannot operate directly on bitfield data (that was the main motivation for us to use to choose per-segment volumes instead of bitfield volumes for overlapping segment storage). Andras From: Sankhesh Jhaveri Sent: Friday, June 8, 2018 3:06 PM To: Andras Lasso Cc: Bertram Sabrowsky-Hirsch ; vtkusers at vtk.org Subject: Re: [vtkusers] Smooth label-map volume rendering Hi Andras, Note that the vtkGPUVolumeRayCastMapper already supports labeled data rendering. Take a look at TestGPURayCastCompositeMask and TestGPURayCastCompositeMaskBlend. Sankhesh? On Thu, Jun 7, 2018 at 12:08 PM Andras Lasso > wrote: I would be interested in a good solution to this, too. In 3d Slicer, we?ve been using flying edges filter, which creates usable (non-blocky) surfaces very quickly (suitable for interactive editing). The limitation is that we still need a smoothing filter to avoid all staircase artifacts, and that it increases update time by about a magnitude. We?ve been evaluating using multi-volume rendering for displaying segmentation in 3D, to achieve faster updates and nicer transparent renderings. Multi-volume rendering is good because we can apply Gaussian smoothing on each input volume to get correctly reconstructed (non-blocky) surface and we can display overlapping segments. However, this Gaussian smoothing takes some time (still competitive with surface smoothing) and multi-volume renderer does not support shading yet (this is the blocking issue right now). Andras From: vtkusers > On Behalf Of Bertram Sabrowsky-Hirsch Sent: Thursday, June 7, 2018 3:54 AM To: vtkusers at vtk.org Subject: [vtkusers] Smooth label-map volume rendering Hi all, I am working with volume data before and after a classification algorithm. The input volume has ushort intensity values, the output volume is a label-map where the values indicate each voxels class/label (background=0, vessel=1, aneurysm=2, ?). I am visualizing the input volume with a opacity transfer function that simulates a threshold filter (e.g. control points: 799=0.0, 800=1.0) and the result is a nice and smooth visualization of the volume. However, the output volume has this blocky Minecraft style effect. The opacity transfer function has the control points: 0=0.0, 1=1.0 and I use the color transfer function to distinguish the classes/labels. Is there a way to visualize the output volume in a similar way as the input volume? I considered generating iso-surface meshes and smooth those, but this is not really an option. I also don?t really understand why this is an issue because the Input volume is also rendered with a distance of 1 between the two opacity thresholds. Are the volumes handled differently by vtk and how? Input volume: [cid:image001.jpg at 01D3FE56.AEDC44B0] Output volume: [cid:image002.jpg at 01D3FE56.AEDC44B0] Kind regards, Bertram _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -- Sankhesh Jhaveri Sr. Research & Development Engineer | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Sat Jun 9 17:55:31 2018 From: matt.mccormick at kitware.com (Matt McCormick) Date: Sat, 9 Jun 2018 17:55:31 -0400 Subject: [vtkusers] Create a 3d volume using series of DICOM images In-Reply-To: References: Message-ID: Hi Rasoul, You can read the images to ITK, then convert them to vtkImageData with the ITKVtkGlue module. In your ITK CMake configuration, set Module_ITKVtkGlue to ON. Here are some examples: https://itk.org/ITKExamples/src/Bridge/VtkGlue/ConvertAnitkImageTovtkImageData/Documentation.html Hope this helps, Matt On Sat, Jun 9, 2018 at 7:43 AM Rasoul Sharifian wrote: > Hi every one, > I have a series of DICOM images and I want to create and display a 3d > volume from these images. I used ITK library and I successfully create a > volume in .mha format. But I want to visualize my 3d volume, So I think I > should use VTK library. > any help would be welcome > Thanks a lot > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sat Jun 9 23:20:07 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 9 Jun 2018 20:20:07 -0700 Subject: [vtkusers] Out line of actor In-Reply-To: References: Message-ID: This example may be useful. https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/Silhouette/ Bill On Sat, Jun 9, 2018 at 1:00 AM, ???? <278124177 at qq.com> wrote: > hi > I want to show the outline of a actor like the picture below, how can > i do this with vtk? > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -- Unpaid intern in BillsParadise at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FE3F6774 at A4ECBC69.21891B5B.jpg.jpg Type: image/jpeg Size: 47468 bytes Desc: not available URL: From rasoul.sharifian1 at gmail.com Sun Jun 10 03:31:02 2018 From: rasoul.sharifian1 at gmail.com (Rasoul Sharifian) Date: Sun, 10 Jun 2018 12:01:02 +0430 Subject: [vtkusers] No override found for 'vtkRayCastImageDisplayHelper' Message-ID: Hi every one, Do you guys face with this error? Generic Warning: In F:\VTK-8.1.0\Source\Rendering\Volume\vtkRayCastImageDisplayHelper.cxx, line 20 Error: no override found for '*vtkRayCastImageDisplayHelper*'. It occurs at this line of my code: vtkSmartPointer mapper = vtkSmartPointer::New(); Any help would be welcome -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Jun 10 08:29:01 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 10 Jun 2018 06:29:01 -0600 Subject: [vtkusers] No override found for 'vtkRayCastImageDisplayHelper' In-Reply-To: References: Message-ID: It's looking for vtkOpenGLRayCastImageDisplayHelper, in vtkRenderingVolumeOpenGL2. If you link your program to vtkRenderingVolumeOpenGL2 the error should disappear. On Sun, Jun 10, 2018 at 1:31 AM, Rasoul Sharifian < rasoul.sharifian1 at gmail.com> wrote: > Hi every one, > Do you guys face with this error? > > Generic Warning: In F:\VTK-8.1.0\Source\Rendering\Volume\vtkRayCastImageDisplayHelper.cxx, line 20 > Error: no override found for '*vtkRayCastImageDisplayHelper*'. > > It occurs at this line of my code: > > vtkSmartPointer mapper = > vtkSmartPointer::New(); > > Any help would be welcome > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vjblog_info at yahoo.com Sun Jun 10 21:09:46 2018 From: vjblog_info at yahoo.com (terminator) Date: Sun, 10 Jun 2018 18:09:46 -0700 (MST) Subject: [vtkusers] reasons of limitations on opacity per component and up to 4 components in label-map volume rendering? Message-ID: <1528679386409-0.post@n5.nabble.com> Hi everyone, Although subject is clear enough, but I want to know what's the reasons of these limitations? I found out that vtk supports up to 4 components in label map volume rendering (with mask). I can set colors for each component, but just first opacity (index=0) will applied and others will be ignored. Is there technical issue for controlling each component opacity separately? My last question, why number of components is restricted to four? seems the overhead of a few transfer functions is not too much. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From satwik.k8 at gmail.com Mon Jun 11 00:43:15 2018 From: satwik.k8 at gmail.com (Satwik) Date: Sun, 10 Jun 2018 21:43:15 -0700 (MST) Subject: [vtkusers] How to display opaque vtkPointWidget inside 3D MIP or Volume Message-ID: <1528692195900-0.post@n5.nabble.com> Hi everyone, I'm trying to draw x,y,z cursor lines on 3D MIP PET dataset. d->pointWidget = vtkSmartPointer::New(); d->pointWidget->SetInteractor(d->m_iren); d->pointWidget->SetPlaceFactor(1.01); d->pointWidget->SetHandleSize(0.005); d->pointWidget->SetProp3D(d->m_volume); d->pointWidget->SetDefaultRenderer(d->m_renderer); d->pointWidget->PlaceWidget(); d->pointWidget->EnabledOff(); d->pointWidget->XShadowsOff(); d->pointWidget->YShadowsOff(); d->pointWidget->ZShadowsOff(); d->pointWidget->OutlineOff(); d->pointWidget->GetProperty()->SetColor(0, 1, 0); d->pointWidget->GetProperty()->SetLineWidth(2); d->pointWidget->GetProperty()->SetOpacity(1); d->pointWidget->On(); Problem I'm facing is that the cursor inside the volume is getting transparent. How can i make it visible. So, that i can see the intersection points. Regards, Satwik k -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From berti_krueger at hotmail.com Mon Jun 11 02:32:55 2018 From: berti_krueger at hotmail.com (=?utf-8?B?QmVydGkgS3LDvGdlcg==?=) Date: Mon, 11 Jun 2018 06:32:55 +0000 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Hi David, thank you very much for all your help and for all the effort. I am sorry, but i am an absolute beginner with VTK and for me it is really hard to find informations / documentation / explanations beyond the doxygen class documentation about the advanced visualization/manipulation operations in VTK (the VTK User Manual sadly only covers the very basics). So thanks again for all your clarifications and all your help so far. I replaced the visualization part of my pipeline with your code which makes it so much clearer, shorter and better in terms of the visualization. And it is also easy enough so that even i get it :-) Unfortunately when i extend the simple cone source voxelization example i attached the last time by using general STL meshes via the vtkSTLReader, i get missing voxels in the visualization. To be sure that the problem is indeed in the visualization part and not in the voxelization part i used binvox, a mature voxelization program (http://www.patrickmin.com/binvox/ ) to do the voxelization and the code you suggested for the visualization of the vtkImageData via VTK. Using this setup the Utah Teapot looks like this (the handle and other thin parts of the mesh are missing in the visualization): [Teapot missing voxels] For surface-only-voxelized meshes there even more voxels missing (the example here is the Stanford Bunny which has only been surface voxelized): [bunny surface voxelization visualization] What i don't get is that the visualization code is as simple as it gets: vtkNew selector; selector->SetInputData(voxelImage); selector->ThresholdByUpper(1.0); selector->Update(); vtkNew mapper; mapper->SetInputConnection(selector->GetOutputPort()); mapper->ScalarVisibilityOff(); mapper->StaticOn(); When i understand it correctly, then we simply visualize every cell (voxel) whose threshold is equal or greater than 1.0 which means we visualize (filter) all voxels which are set (in my vtkImageData voxels which are set are 1, voxels which are not set 0) and the vtkDataSetMapper maps these to graphic primitives and this does the rest of the visualization. Not much to do wrong here and that basically should do the trick but it doesn't. Any idea why this does not work correctly all the time and has problems with thin parts? I therefore tried another approach by using the vtkGlyph3DMapper based on the example code from https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Glyph3DMapper : vtkNew points; for (int x = 0; x < dims[0]; x++) { for (int y = 0; y < dims[1]; y++) { for (int z = 0; z < dims[2]; z++) { char* pixel = static_cast(voxelImage->GetScalarPointer(x, y, z)); if(pixel[0] == 1) // if the voxel is set (1) in the voxel image points->InsertNextPoint(x, y, z); } } } vtkNew polydata; polydata->SetPoints(points); vtkNew glyph; vtkNew cubeSource; vtkNew glyph3Dmapper; glyph3Dmapper->SetSourceConnection(cubeSource->GetOutputPort()); glyph3Dmapper->SetInputData(polydata); glyph3Dmapper->Update(); actor->SetMapper(glyph3Dmapper); The visualization with this approach is a bit slower (probably because it does no backface culling of the backfaces of the cube polygons) but it seems to work correctly even with surface only voxelized meshes: [bunny ok][teapot] I attached a simple working vtk demo with both visualizations and integrated voxelized meshes (no external data files or other dependencies) as a simple cmake/vtk compileable project (PolyDataToImageDataVisualizationVoxel). Maybe it might help other vtk users in the future. Are there any other possibilities (maybe faster) to do the visualization with vtk ? Now having a visualization that seems to work, i tried this visualization with the suggested voxelization code from the vtk examples here https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ and while the voxelization is lighting-fast and some example meshes did get correctly voxelized, i also had a lot of meshes whose voxelizations had misclassified voxels (e.g. voxels are set where voxels should not have been set and the opposite (holes)) like with the Utah Teapot here: [teapot errors][teapot errors 2][teapot errors3] The problem is that for my project i have to find paths through the voxel image. So miscIassified voxels would lead to either wrong paths found (paths which do not really exist like in the first image) or maybe to a situation where no path can be found because of holes. I attached a compileable cmake/vtk example (PolyDataToImageDataVisualizationSTL) together with some small example stl-mesh-files (teapot etc.) using the example code from the vtk example repository for showing the problem with the given approach there. Is it possible by tweaking the vtk PolyDataToImageData example code to always get a correct voxelization or is another approach needed? If you or anybody else has ideas / suggestions i would really be glad. Thank for reading if you managed to get this far and have not fallen asleep and thank you very much in advance. Regards Berti Am 06.06.2018 um 01:49 schrieb David Gobbi: Hi Berti, The correct pad filter to use for this is "vtkImageConstantPad", not "WrapPad", but padding really isn't necessary. Neither is the use of cell scalars, it's more appropriate to use point scalars when working with image data since each voxel is represented as a point scalar. The threshold should be set like this, for a threshold halfway between your "inval" and "outval": selector->ThresholdByUpper(0.5*(startLabel + endLabel)); The lookup table wasn't correctly set. Calling SetRange() does not set the number of entries in the lookup table (by default, the lookup table has 256 entries). lut->SetTableRange(0, 1); lut->SetNumberOfColors(2); Also, your color for "1" was transparent, whereas it has to be opaque in order to properly see a scalar-colored cone. I stripped the visualization part of your pipeline down to the following. No padding is done, the thresholding uses point scalars, no shifting, and no lookup table (instead, I call ScalarVisibilityOff() and set the color via the actor's property object). I replaced vtkPolyDataMapper with vtkDataSetMapper, which automatically skins the data. unsigned char startLabel = outval; unsigned char endLabel = inval; vtkNew selector; // the call to SetInputArrayToProcess() isn't necessary, the default is fine //selector->SetInputArrayToProcess(0, 0, 0, // vtkDataObject::FIELD_ASSOCIATION_POINTS, // vtkDataSetAttributes::SCALARS); selector->SetInputData(voxelImage); selector->ThresholdByUpper(0.5*(startLabel + endLabel)); selector->Update(); vtkNew mapper; mapper->SetInputConnection(selector->GetOutputPort()); mapper->ScalarVisibilityOff(); vtkNew actor; actor->SetMapper(mapper); actor->GetProperty()->SetColor(0.0, 1.0, 0.0); An image of the resulting cone is attached. - David On Tue, Jun 5, 2018 at 1:26 AM, Berti Kr?ger > wrote: Hi David, thank you very much for your help. I tried the example from your link. Unfortunately the result is same as using the vtkVoxelModeller: [Screenshot result voxelization] I get only a voxelization of the surface. The interior of the voxelized cone is still hollow and not filled with voxels (at least this is implied by the visualization). For the visualization i use Bill Lorensen's example code from here: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/ I have attached this small example which compiles with VTK 8.1 to show the issue. It basicly only consist of the example code from your link (https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/) and the visualization code from the Bill Lorensen's example from the link above. I have not changed much. Any idea what is going wrong or what can i do get also voxelization of the interior (solid voxelization)? Thank you very much in advance. Regards Berti ________________________________ Von: David Gobbi > Gesendet: Montag, 28. Mai 2018 23:13 An: Berti Kr?ger Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Solid Voxelization with VTK Hi Berti, If its a triangulated surface that you want to fill with voxels, use vtkPolyDataToImageStencil: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ If its a mesh of 3D elements and you want to sample the elements to create voxels, try vtkResampleToImage. - David On Mon, May 28, 2018 at 4:41 PM, Berti Kr?ger > wrote: Hello Everyone. For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per second), works, but only voxelizes the outer shell where the mesh boundary triangles are. The inner part of the mesh stays hollow. Is there some way to get solid voxelization of 3D-Triangle-Meshes out of the box with VTK ? Thank you very much in advance, Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: teapot_cracks.jpg Type: image/jpeg Size: 46709 bytes Desc: teapot_cracks.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bunny_hollow.png Type: image/png Size: 13894 bytes Desc: bunny_hollow.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bunny_ok.jpg Type: image/jpeg Size: 111248 bytes Desc: bunny_ok.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: teapot_ok_glyph3d_opaque.jpg Type: image/jpeg Size: 81862 bytes Desc: teapot_ok_glyph3d_opaque.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: teapot_errors.jpg Type: image/jpeg Size: 103527 bytes Desc: teapot_errors.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: teapot_holes.jpg Type: image/jpeg Size: 55175 bytes Desc: teapot_holes.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: teapot_holes2.jpg Type: image/jpeg Size: 81734 bytes Desc: teapot_holes2.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot.jpg Type: image/jpeg Size: 62429 bytes Desc: screenshot.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PolyDataToImageDataVisualizationVoxel.zip Type: application/zip Size: 12443 bytes Desc: PolyDataToImageDataVisualizationVoxel.zip URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PolyDataToImageDataVisualizationSTL.zip Type: application/zip Size: 212435 bytes Desc: PolyDataToImageDataVisualizationSTL.zip URL: From berti_krueger at hotmail.com Mon Jun 11 02:45:31 2018 From: berti_krueger at hotmail.com (=?Windows-1252?Q?Berti_Kr=FCger?=) Date: Mon, 11 Jun 2018 06:45:31 +0000 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Hi Csaba, thank you very much for you answer and for offering your help. I already have looked at it and i think if no simpler option will come up, i will give it a try (hoping not to have to change too much to get it working with my pipeline since i am an absolute vtk beginner :-) ). How is this code licensed ? (i am only doing research work at the moment, the whole project i am working on is internal and just for testing and part of some larger work, it might be open sourced one day in the very far future but could even be not at all and it will never be used commercially). Regards Berti Am 05.06.2018 um 16:14 schrieb Csaba Pinter: Hi Berti, There is a pretty robust conversion algorithm implemented within 3D Slicer but using solely VTK: https://github.com/Slicer/Slicer/blob/master/Libs/vtkSegmentationCore/vtkClosedSurfaceToBinaryLabelmapConversionRule.cxx#L118 It consists of a short pipeline of standard VTK filters (some preprocessing then vtkPolyDataToImageStencil and vtkImageStencil). Let me know if you have any questions. csaba From: vtkusers On Behalf Of Berti Kr?ger Sent: Tuesday, June 5, 2018 03:26 To: David Gobbi Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Solid Voxelization with VTK Hi David, thank you very much for your help. I tried the example from your link. Unfortunately the result is same as using the vtkVoxelModeller: [Screenshot result voxelization] I get only a voxelization of the surface. The interior of the voxelized cone is still hollow and not filled with voxels (at least this is implied by the visualization). For the visualization i use Bill Lorensen's example code from here: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/ I have attached this small example which compiles with VTK 8.1 to show the issue. It basicly only consist of the example code from your link (https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/) and the visualization code from the Bill Lorensen's example from the link above. I have not changed much. Any idea what is going wrong or what can i do get also voxelization of the interior (solid voxelization)? Thank you very much in advance. Regards Berti PolyDataToImageData - lorensen.github.io lorensen.github.io If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build: GenerateCubesFromLabels - GitHub Pages lorensen.github.io Usage: GenerateCubesFromLabels FullHead.mhd StartLabel EndLabel where InputVolume is a meta file containing a 3 volume of discrete labels. ________________________________ Von: David Gobbi > Gesendet: Montag, 28. Mai 2018 23:13 An: Berti Kr?ger Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Solid Voxelization with VTK Hi Berti, If its a triangulated surface that you want to fill with voxels, use vtkPolyDataToImageStencil: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ PolyDataToImageData - lorensen.github.io lorensen.github.io If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build: If its a mesh of 3D elements and you want to sample the elements to create voxels, try vtkResampleToImage. - David On Mon, May 28, 2018 at 4:41 PM, Berti Kr?ger > wrote: Hello Everyone. For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per second), works, but only voxelizes the outer shell where the mesh boundary triangles are. The inner part of the mesh stays hollow. Is there some way to get solid voxelization of 3D-Triangle-Meshes out of the box with VTK ? Thank you very much in advance, Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 62429 bytes Desc: image001.jpg URL: From elvis.stansvik at orexplore.com Mon Jun 11 02:50:17 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 11 Jun 2018 08:50:17 +0200 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Den m?n 11 juni 2018 08:33Berti Kr?ger skrev: > Hi David, > > thank you very much for all your help and for all the effort. > > I am sorry, but i am an absolute beginner with VTK and for me it is really > hard to find informations / documentation / explanations beyond the doxygen > class documentation about the advanced visualization/manipulation > operations in VTK (the VTK User Manual sadly only covers the very basics). > > So thanks again for all your clarifications and all your help so far. > > I replaced the visualization part of my pipeline with your code which > makes it so much clearer, shorter and better in terms of the visualization. > And it is also easy enough so that even i get it :-) > > Unfortunately when i extend the simple cone source voxelization example i > attached the last time by using general STL meshes via the vtkSTLReader, i > get missing voxels in the visualization. To be sure that the problem is > indeed in the visualization part and not in the voxelization part i used > *binvox*, a mature voxelization program (http://www.patrickmin.com/binvox/ > ) to do the voxelization and the code you suggested for the visualization > of the vtkImageData via VTK. > > > Using this setup the Utah Teapot looks like this (the handle and other > thin parts of the mesh are missing in the visualization): > > [image: Teapot missing voxels] > > > For surface-only-voxelized meshes there even more voxels missing (the > example here is the Stanford Bunny which has only been surface voxelized): > > [image: bunny surface voxelization visualization] > > What i don't get is that the visualization code is as simple as it gets: > > vtkNew selector; > selector->SetInputData(voxelImage); > selector->ThresholdByUpper(1.0); > selector->Update(); > > vtkNew mapper; > mapper->SetInputConnection(selector->GetOutputPort()); > mapper->ScalarVisibilityOff(); > mapper->StaticOn(); > > When i understand it correctly, then we simply visualize every cell > (voxel) whose threshold is equal or greater than 1.0 which means we > visualize (filter) all voxels which are set (in my vtkImageData voxels > which are set are 1, voxels which are not set 0) and the vtkDataSetMapper > maps these to graphic primitives and this does the rest of the > visualization. Not much to do wrong here and that basically should do the > trick but it doesn't. > > *Any idea why this does not work correctly all the time and has problems > with thin parts?* > I'm just jumping in from the side here, and I'm by no means a VTK expert. But I think what you're seeing is simply due to how VTK does volume rendering. It interpolates the given data points, which means you need at least two data points to get a voxel. I'm guessing that at the resolution you're doing the voxelization here, your teapot handle is simply too thin to result in even a single voxel. Think of your data points as a grid of fenceposts. You'll get a voxel in the middle of each 2x2x2 cluster of posts. Someone correct me if I'm wrong here. HTH, Elvis > > > I therefore tried another approach by using the vtkGlyph3DMapper based on > the example code from > > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Glyph3DMapper : > > > vtkNew points; > > for (int x = 0; x < dims[0]; x++) > { > for (int y = 0; y < dims[1]; y++) > { > for (int z = 0; z < dims[2]; z++) > { > char* pixel = static_cast(voxelImage->GetScalarPointer(x, > y, z)); > > if(pixel[0] == 1) // if the voxel is set (1) in the voxel image > points->InsertNextPoint(x, y, z); > } > } > } > > vtkNew polydata; > polydata->SetPoints(points); > > vtkNew glyph; > > vtkNew cubeSource; > > vtkNew glyph3Dmapper; > glyph3Dmapper->SetSourceConnection(cubeSource->GetOutputPort()); > glyph3Dmapper->SetInputData(polydata); > glyph3Dmapper->Update(); > > actor->SetMapper(glyph3Dmapper); > > > The visualization with this approach is a bit slower (probably because it > does no backface culling of the backfaces of the cube polygons) but it > seems to work correctly even with surface only voxelized meshes: > [image: bunny ok][image: teapot] > > > I attached a simple working vtk demo with both visualizations and > integrated voxelized meshes (no external data files or other dependencies) > as a simple cmake/vtk compileable project ( > *PolyDataToImageDataVisualizationVoxel*). Maybe it might help other vtk > users in the future. > > *Are there any other possibilities (maybe faster) to do the visualization > with vtk ?* > > > > Now having a visualization that seems to work, i tried this visualization > with the suggested voxelization code from the vtk examples here > https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ > > and while the voxelization is lighting-fast and some example meshes did > get correctly voxelized, i also had a lot of meshes whose voxelizations had > misclassified voxels (e.g. voxels are set where voxels should not have been > set and the opposite (holes)) like with the Utah Teapot here: > > [image: teapot errors][image: teapot errors 2][image: teapot errors3] > > The problem is that for my project i have to find paths through the voxel > image. So miscIassified voxels would lead to either wrong paths found > (paths which do not really exist like in the first image) or maybe to a > situation where no path can be found because of holes. > > I attached a compileable cmake/vtk example ( > *PolyDataToImageDataVisualizationSTL*) together with some small example > stl-mesh-files (teapot etc.) using the example code from the vtk example > repository for showing the problem with the given approach there. > > > *Is it possible by tweaking the vtk PolyDataToImageData example code to > always get a correct voxelization or is another approach needed?* > > > If you or anybody else has ideas / suggestions i would really be glad. > Thank for reading if you managed to get this far and have not fallen > asleep and thank you very much in advance. > > > Regards > > Berti > > > Am 06.06.2018 um 01:49 schrieb David Gobbi: > > Hi Berti, > > The correct pad filter to use for this is "vtkImageConstantPad", not > "WrapPad", but padding really isn't necessary. Neither is the use of cell > scalars, it's more appropriate to use point scalars when working with image > data since each voxel is represented as a point scalar. > > The threshold should be set like this, for a threshold halfway between > your "inval" and "outval": > > selector->ThresholdByUpper(0.5*(startLabel + endLabel)); > > The lookup table wasn't correctly set. Calling SetRange() does not set the > number of entries in the lookup table (by default, the lookup table has 256 > entries). > > lut->SetTableRange(0, 1); > lut->SetNumberOfColors(2); > > Also, your color for "1" was transparent, whereas it has to be opaque in > order to properly see a scalar-colored cone. > > > > I stripped the visualization part of your pipeline down to the following. > No padding is done, the thresholding uses point scalars, no shifting, and > no lookup table (instead, I call ScalarVisibilityOff() and set the color > via the actor's property object). I replaced vtkPolyDataMapper with > vtkDataSetMapper, which automatically skins the data. > > > unsigned char startLabel = outval; > unsigned char endLabel = inval; > > vtkNew selector; > // the call to SetInputArrayToProcess() isn't necessary, the default is > fine > //selector->SetInputArrayToProcess(0, 0, 0, > // > vtkDataObject::FIELD_ASSOCIATION_POINTS, > // vtkDataSetAttributes::SCALARS); > selector->SetInputData(voxelImage); > selector->ThresholdByUpper(0.5*(startLabel + endLabel)); > selector->Update(); > > vtkNew mapper; > mapper->SetInputConnection(selector->GetOutputPort()); > mapper->ScalarVisibilityOff(); > > vtkNew actor; > actor->SetMapper(mapper); > actor->GetProperty()->SetColor(0.0, 1.0, 0.0); > > > An image of the resulting cone is attached. > > - David > > > On Tue, Jun 5, 2018 at 1:26 AM, Berti Kr?ger > wrote: > >> Hi David, >> >> >> thank you very much for your help. >> >> >> I tried the example from your link. Unfortunately the result is same as >> using the vtkVoxelModeller: >> >> >> [image: Screenshot result voxelization] >> I get only a voxelization of the surface. The interior of the voxelized >> cone is still hollow and not filled with voxels (at least this is implied >> by the visualization). >> >> >> For the visualization i use Bill Lorensen's example code from here: >> >> >> https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/ >> >> >> >> I have attached this small example which compiles with VTK 8.1 to show >> the issue. It basicly only consist of the example code from your link ( >> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/) >> and the visualization code from the Bill Lorensen's example from the >> link above. I have not changed much. >> >> >> Any idea what is going wrong or what can i do get also voxelization of >> the interior (solid voxelization)? >> >> >> Thank you very much in advance. >> >> >> >> Regards >> >> >> Berti >> ------------------------------ >> *Von:* David Gobbi >> *Gesendet:* Montag, 28. Mai 2018 23:13 >> *An:* Berti Kr?ger >> *Cc:* vtkusers at vtk.org >> *Betreff:* Re: [vtkusers] Solid Voxelization with VTK >> >> Hi Berti, >> >> If its a triangulated surface that you want to fill with voxels, use >> vtkPolyDataToImageStencil: >> >> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ >> >> If its a mesh of 3D elements and you want to sample the elements to >> create voxels, try vtkResampleToImage. >> >> - David >> >> >> >> On Mon, May 28, 2018 at 4:41 PM, Berti Kr?ger >> wrote: >> >> Hello Everyone. >> >> For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the >> vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per >> second), works, but only voxelizes the outer shell where the mesh boundary >> triangles are. The inner part of the mesh stays hollow. >> >> Is there some way to get solid voxelization of 3D-Triangle-Meshes out of >> the >> box with VTK ? >> >> >> Thank you very much in advance, >> >> Berti >> >> > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot.jpg Type: image/jpeg Size: 62429 bytes Desc: not available URL: From 278124177 at qq.com Mon Jun 11 05:56:40 2018 From: 278124177 at qq.com (=?gb18030?B?zui3qM7ozOw=?=) Date: Mon, 11 Jun 2018 17:56:40 +0800 Subject: [vtkusers] vtkDistancewidget Message-ID: Hi: I use vtkDistanceWidget to measeure the distance between to points of a polydata actor. I add two vtkdistancewidget in the screen, and i hope to select one and delete it, but i find it cannot be picked by mouse click, how can i pick it? thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaba.pinter at queensu.ca Mon Jun 11 08:45:55 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Mon, 11 Jun 2018 12:45:55 +0000 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Hi Berti, That code is under BSD-style license, so you're free to do basically anything with it. This implementation is already pretty simple; just a concatenation of several VTK filters, so you can just give it a try by copy-pasting the relevant part of that function into your code and see if it works. If you're interested in using the vtkSegmentation library, let me know though! Best, csaba From: Berti Kr?ger Sent: Monday, June 11, 2018 02:46 To: Csaba Pinter ; David Gobbi Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Solid Voxelization with VTK Hi Csaba, thank you very much for you answer and for offering your help. I already have looked at it and i think if no simpler option will come up, i will give it a try (hoping not to have to change too much to get it working with my pipeline since i am an absolute vtk beginner :-) ). How is this code licensed ? (i am only doing research work at the moment, the whole project i am working on is internal and just for testing and part of some larger work, it might be open sourced one day in the very far future but could even be not at all and it will never be used commercially). Regards Berti Am 05.06.2018 um 16:14 schrieb Csaba Pinter: Hi Berti, There is a pretty robust conversion algorithm implemented within 3D Slicer but using solely VTK: https://github.com/Slicer/Slicer/blob/master/Libs/vtkSegmentationCore/vtkClosedSurfaceToBinaryLabelmapConversionRule.cxx#L118 It consists of a short pipeline of standard VTK filters (some preprocessing then vtkPolyDataToImageStencil and vtkImageStencil). Let me know if you have any questions. csaba From: vtkusers On Behalf Of Berti Kr?ger Sent: Tuesday, June 5, 2018 03:26 To: David Gobbi Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Solid Voxelization with VTK Hi David, thank you very much for your help. I tried the example from your link. Unfortunately the result is same as using the vtkVoxelModeller: [Screenshot result voxelization] I get only a voxelization of the surface. The interior of the voxelized cone is still hollow and not filled with voxels (at least this is implied by the visualization). For the visualization i use Bill Lorensen's example code from here: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/ I have attached this small example which compiles with VTK 8.1 to show the issue. It basicly only consist of the example code from your link (https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/) and the visualization code from the Bill Lorensen's example from the link above. I have not changed much. Any idea what is going wrong or what can i do get also voxelization of the interior (solid voxelization)? Thank you very much in advance. Regards Berti PolyDataToImageData - lorensen.github.io lorensen.github.io If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build: GenerateCubesFromLabels - GitHub Pages lorensen.github.io Usage: GenerateCubesFromLabels FullHead.mhd StartLabel EndLabel where InputVolume is a meta file containing a 3 volume of discrete labels. ________________________________ Von: David Gobbi > Gesendet: Montag, 28. Mai 2018 23:13 An: Berti Kr?ger Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Solid Voxelization with VTK Hi Berti, If its a triangulated surface that you want to fill with voxels, use vtkPolyDataToImageStencil: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ PolyDataToImageData - lorensen.github.io lorensen.github.io If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build: If its a mesh of 3D elements and you want to sample the elements to create voxels, try vtkResampleToImage. - David On Mon, May 28, 2018 at 4:41 PM, Berti Kr?ger > wrote: Hello Everyone. For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per second), works, but only voxelizes the outer shell where the mesh boundary triangles are. The inner part of the mesh stays hollow. Is there some way to get solid voxelization of 3D-Triangle-Meshes out of the box with VTK ? Thank you very much in advance, Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 62429 bytes Desc: image001.jpg URL: From david.gobbi at gmail.com Mon Jun 11 12:34:14 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 11 Jun 2018 10:34:14 -0600 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Hi Berti, Currently you have two distinct parts to your pipeline: 1) generate the image (via vtkPolyDataToImageStencil) 2) visualize the result (via vtkThreshold) Let's start with vtkThreshold, since it seems to be the filter whose behavior is furthest from your expectations. The vtkThreshold filter is designed to extract cells. In your case, each "cell" that it extracts is a cube. But it's crucial to understand how a vtk "cell" is defined: each corner of the cell is a point in the data set. In this case, each of these points is one of the image samples, i.e. each point is what image analysis folks commonly refer to as a "voxel". So the cubes that vtkThreshold produces are not the image voxels. Instead, each cube is in fact a finite element whose corners are positioned at the image voxels. To make things even more confusing, VTK calls each of these elements a vtkVoxel. But a vtkVoxel is not an image voxel. A vtkVoxel is a cube that has an image voxel at each corner. You with me so far? What vtkThreshold output, by default, is every cube for which every corner of the cube is above the threshold. You can use threshold->SetAllScalars(0) to make it output every cube for which _any_ corner is above threshold. This makes it much more inclusive. But this is probably still not what you want. Your approach of using glyphs is good, since what you really want to do is render a small cube for every point in the image. Your loop will run faster if you call voxelImage->GetScalarPointer(x, y, z) just once instead of calling it for every iteration. It returns a pointer, so all you have to do is increment the pointer at every iteration. Or you could replace the loop with the vtkThresholdPoints filter. An alternative that might be faster (I say "might" because I'm not sure) is to use the vtkDiscreteMarchingCubes class. Regarding vtkPolyDataToImageStencil, this class selects all voxels whose center points are within volume enclosed by the surface. It is not enough for the surface to merely pass through the voxel, this class wasn't designed to do that. So it is necessary for the voxel spacing to be smaller than the thinnest part of the model. Also, vtkPolyDataToImageStencil expects the input data to be truly closed (it isn't enough if the surface merely "looks" like it is watertight). Otherwise, it can produce artifacts like the ones you have shown. You can test whether a surface is closed with the vtkFeatureEdges class. If you update vtkFeatureEdges for your original polydata, it should produce no output cells when used like this: vtkNew features; features->BoundaryEdgesOn(); features->NonManifoldEdgesOn(); features->FeatureEdgesOff(); features->SetInputData(....); features->Update(); If features->GetOutput()->GetNumberOfCells() is not zero, then the polydata is not truly watertight. I have a question for you: if your goal is to find paths through the object, then why convert it into voxels? Why not work directly with the original surface data? - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From dallen28 at uwo.ca Mon Jun 11 13:43:02 2018 From: dallen28 at uwo.ca (Daniel Allen) Date: Mon, 11 Jun 2018 17:43:02 +0000 Subject: [vtkusers] Generating ITK DRR Based on the VTK camera transform Message-ID: Hi there, I am creating an app which generates a DRR using ITK's DigitallyReconstructedRadiograph1.exe. The parameters are being set based on the transform from a vtk camera looking at a 3D volume rendered from a .mha file which is the same file being passed into the ITK program. The DRR appears to be accurate when no rotation is specified but when I rotate the camera in any direction the DRR image is no longer centered. I was just wondering if anyone can provide me with a straightforward method for syncing the VTK camera with the ITK camera with regards to the ITK example program DigitallyReconstructedRadiograph1.exe? Thanks, Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Tue Jun 12 09:28:45 2018 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Tue, 12 Jun 2018 07:28:45 -0600 Subject: [vtkusers] Cross platform rendering tests Message-ID: I am working on a VTK based GUI and would like to test the rendered results across platforms (Linux and MacOS). Based on various sources of documentation, most of which seem to be quite old ( https://www.vtk.org/Wiki/VTK/OpenGL), this should be possible with Mesa and software rendering. Could someone please point me to an example and/or current documentation for doing this sort of work. Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Jun 12 09:43:32 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 12 Jun 2018 09:43:32 -0400 Subject: [vtkusers] Cross platform rendering tests In-Reply-To: References: Message-ID: To drive the testing take a look at testing with ctest To do image comparisons look at vtkRegressionTestImage.h and vtkTesting.h We typically invoke testing as int retVal = vtkRegressionTestImage( renWin ); The typical approach uses argc and argv to extract the location of a valid image file to use as a comparison. Those two headers have some example code in them. We test nightly on OSX, Window, and Linux with both Mesa and native drivers from Intel, Nvidia, and AMD. On Tue, Jun 12, 2018 at 9:28 AM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I am working on a VTK based GUI and would like to test the rendered > results across platforms (Linux and MacOS). Based on various sources of > documentation, most of which seem to be quite old ( > https://www.vtk.org/Wiki/VTK/OpenGL), this should be possible with Mesa > and software rendering. > > Could someone please point me to an example and/or current documentation > for doing this sort of work. > > Thanks, > Andrew > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Tue Jun 12 11:10:23 2018 From: david.m.groppe at gmail.com (David Groppe) Date: Tue, 12 Jun 2018 11:10:23 -0400 Subject: [vtkusers] Activiz Error, vtkImageViewer2 example, "Attempted to read or write protected memory" Message-ID: Hi all, I'm trying to run the Activiz PNG reader example: https://lorensen.github.io/VTKExamples/site/CSharp/IO/PNGReader/ I changed filepath to be a png file on my machine: string filePath = @"C:\Users\dgrop\Downloads\cthead1.png"; And the file can be opened fine. However, the following line: imageViewer.SetRenderer(renderer); throws the following error: System.AccessViolationException HResult=0x80004003 Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Source= StackTrace: I've tried moving the variable declarations to the Public Partial Class level as suggested here: http://vtk.1045678.n5.nabble.com/ActiViz-WindowColor-Memory-Corrupt-td5725980.html but that did not change anything. Any ideas on how to fix this? thanks in advance, -David -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Tue Jun 12 11:39:41 2018 From: doug at beachmailing.com (scotsman60) Date: Tue, 12 Jun 2018 08:39:41 -0700 (MST) Subject: [vtkusers] What is the most current pattern/reference for using VTK for finite element post-processing? Message-ID: <1528817981603-0.post@n5.nabble.com> Hello, I'm using VTK to post-process finite element analysis results. For "simple" cases - where results data is associated with Nodes or Elements the standard VTK classes work well. But finite element results processing can also requires more advanced cases to be supported. For example "Element Nodal" results and "Integration point" results. Element Nodal data is characterized by having multiple result values calculated per element - one at each of the element nodes. When a node is referenced by more than one element (the elements are connected) this gives rise to multiple result values per node. In some cases, it is possible to simply average the nodal data and reduce the Element Nodal data to simple Nodal data, and this can be handled directly by the VTK classes - UnstructuredGrids and PointData. But in some cases, it is desirable NOT to average the data, and this cases seems not to fit well with the standard VTK classes. One approach would be to create an UnstructuredGrid where each cell has it's own independent Points. This would require some mapping from the FE data structures to the VTK data structures and of course would increase the number of Points in the UnstructuredGrid - increasing memory requirements an likely negatively impacting performance. Although I believe this WOULD work, it does seem clumsy...... So my question is this. Is there an established pattern and/or reference material on the best way to support this type of Element Nodal data nu VTK? I did search this forum and found some rather old references to the "AdaptorFramework" - Is this a good direction to go or is there something more recent that would make a better starting point? Thanks in advance, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sankhesh.jhaveri at kitware.com Tue Jun 12 11:40:24 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 12 Jun 2018 11:40:24 -0400 Subject: [vtkusers] Deprecate vtkGeo* classes In-Reply-To: References: Message-ID: Update: Here is the merge request that deprecates the classes: https://gitlab.kitware.com/vtk/vtk/merge_requests/4395 ? On Wed, May 23, 2018 at 4:14 PM Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > Folks, > > There have been some discussions about deprecating a bunch of classes from > the vtkGeovisCore and vtkViewsGeovis module owing to the lack of users > and maintainers. The tentative list of classes to be deprecated is as > follows: > > - vtkGeoAdaptiveArcs > - vtkGeoAlignedImageRepresentation > - vtkGeoAlignedImageSource > - vtkGeoAssignCoordinates > - vtkGeoFileImageSource > - vtkGeoFileTerrainSource > - vtkGeoGlobeSource > - vtkGeoGraticule > - vtkGeoImageNode > - vtkGeoRandomGraphSource > - vtkGeoSampleArcs > - vtkGeoSource > - vtkGeoTerrain > - vtkGeoTerrain2D > - vtkGeoTerrainNode > - vtkGeoTreeNode > - vtkGeoTreeNodeCache > - vtkGeoView > - vtkGeoView2D > > The primary reason for deprecation is lack of known users and maintainers. > Please reply to this email if you use these classes and intend to maintain > them or if you think they shouldn?t be deprecated. > > Thank you! > Sankhesh > ? > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Tue Jun 12 11:53:51 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 12 Jun 2018 11:53:51 -0400 Subject: [vtkusers] reasons of limitations on opacity per component and up to 4 components in label-map volume rendering? In-Reply-To: <1528679386409-0.post@n5.nabble.com> References: <1528679386409-0.post@n5.nabble.com> Message-ID: Hi, In short, VTK?s support for label map masks is limited. I?m not sure what you mean by opacity. If you see the documentation for vtkGPUVolumeRayCastMapper::SetMaskInput , it explains how the final sample color is determined. As to why it works the way it does, I?ll defer to the authors but more likely, this was all that was required from the mapper at the time it was written. The mapper might actually work(I?ve not tested this, but should, in general) with N number of components given that vtkProperty::IndependentComponents is set. The limitation of a maximum of 4 components is when they are treated as dependent. Hope this helps. Thanks, Sankhesh ? On Sun, Jun 10, 2018 at 9:10 PM terminator via vtkusers < vtkusers at public.kitware.com> wrote: > Hi everyone, > Although subject is clear enough, but I want to know what's the reasons of > these limitations? > I found out that vtk supports up to 4 components in label map volume > rendering (with mask). I can set colors for each component, but just first > opacity (index=0) will applied and others will be ignored. Is there > technical issue for controlling each component opacity separately? > My last question, why number of components is restricted to four? seems the > overhead of a few transfer functions is not too much. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaba.pinter at queensu.ca Tue Jun 12 11:56:07 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Tue, 12 Jun 2018 15:56:07 +0000 Subject: [vtkusers] vtkGPUInfoList does not work with OpenGL2 In-Reply-To: References: Message-ID: Hi again, I'd appreciate any information about using GPU info list with the new OpenGL2 backend. Please see below. Thanks, csaba From: vtkusers On Behalf Of Csaba Pinter Sent: Thursday, June 7, 2018 15:57 To: vtkusers at vtk.org Subject: [vtkusers] vtkGPUInfoList does not work with OpenGL2 Hi all, I'm trying to use the vtkGPUInfoList in VTK 9 built using OpenGL backend 2 to get the GPU memory. On both Windows 10 (with GeForce 1060) and MacOSX (10.13 Mid-2014), GetNumberOfGPUs returns 0 after Probe. Which is not surprising, because the instantiated info list object is of type vtkDummyGPUInfoList, which, according to the documentation, is "Useful when an OS specific implementation is not available". Is vtkGPUInfoList supposed to work with OpenGL2? Should I use another class? Thanks, csaba -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Tue Jun 12 12:00:07 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 12 Jun 2018 12:00:07 -0400 Subject: [vtkusers] Smooth label-map volume rendering In-Reply-To: References: <2FAC7B9E487D2C478AB8E83F062AF6800736A4D8@doug.risc.local> Message-ID: Hi Andras, I don?t think that there is any explicit smoothing operation performed by the mapper. However, final color computation does blend the mapped color values from the input volume and the mask. Even though we call it a label map, it is more of a masking operation based on a secondary label map volume. By virtue of this, it supports overlapping segments. See the attached baseline image for TestGPURayCastCompositeMaskBlend: [image: TestGPURayCastCompositeMaskBlend] ? On Sat, Jun 9, 2018 at 3:16 PM Andras Lasso wrote: > Thank you for the information. > > > > Do these rendering options allow smoothing (low-pass filtering that > reconstructs the continuous signal from discrete samples)? > > > > Is visualization of overlapping segments supported? I know that generating > new label value for each intersection combination and setting appropriate > color and opacity value could be a solution. However, this is only > practical if number of segments is small (up to 16 segments a label value > could be a bitfield which encodes presence of each segment), but not a > generally applicable solution, we need support visualization up to about > 200 potentially overlapping segments. It is also a difficulty that current > image processing filter implementations cannot operate directly on bitfield > data (that was the main motivation for us to use to choose per-segment > volumes instead of bitfield volumes for overlapping segment storage). > > > > Andras > > > > *From:* Sankhesh Jhaveri > *Sent:* Friday, June 8, 2018 3:06 PM > *To:* Andras Lasso > *Cc:* Bertram Sabrowsky-Hirsch ; > vtkusers at vtk.org > *Subject:* Re: [vtkusers] Smooth label-map volume rendering > > > > Hi Andras, > > Note that the vtkGPUVolumeRayCastMapper already supports labeled data > rendering. > > Take a look at TestGPURayCastCompositeMask and > TestGPURayCastCompositeMaskBlend. > > Sankhesh? > > > > On Thu, Jun 7, 2018 at 12:08 PM Andras Lasso wrote: > > I would be interested in a good solution to this, too. > > > > In 3d Slicer, we?ve been using flying edges filter, which creates usable > (non-blocky) surfaces very quickly (suitable for interactive editing). The > limitation is that we still need a smoothing filter to avoid all staircase > artifacts, and that it increases update time by about a magnitude. > > > > We?ve been evaluating using multi-volume rendering for displaying > segmentation in 3D, to achieve faster updates and nicer transparent > renderings. Multi-volume rendering is good because we can apply Gaussian > smoothing on each input volume to get correctly reconstructed (non-blocky) > surface and we can display overlapping segments. However, this Gaussian > smoothing takes some time (still competitive with surface smoothing) and > multi-volume renderer does not support shading yet (this is the blocking > issue right now). > > > > Andras > > > > *From:* vtkusers *On Behalf Of *Bertram > Sabrowsky-Hirsch > *Sent:* Thursday, June 7, 2018 3:54 AM > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] Smooth label-map volume rendering > > > > Hi all, > > > > I am working with volume data before and after a classification algorithm. > > The input volume has ushort intensity values, the output volume is a > label-map where the values indicate each voxels class/label (background=0, > vessel=1, aneurysm=2, ?). > > > > I am visualizing the input volume with a opacity transfer function that > simulates a threshold filter (e.g. control points: 799=0.0, 800=1.0) and > the result is a nice and smooth visualization of the volume. > > > > However, the output volume has this blocky Minecraft style effect. The > opacity transfer function has the control points: 0=0.0, 1=1.0 and I use > the color transfer function to distinguish the classes/labels. > > Is there a way to visualize the output volume in a similar way as the > input volume? I considered generating iso-surface meshes and smooth those, > but this is not really an option. I also don?t really understand why this > is an issue because the > > Input volume is also rendered with a distance of 1 between the two opacity > thresholds. Are the volumes handled differently by vtk and how? > > > > Input volume: > > > > Output volume: > > > > Kind regards, > > Bertram > > _______________________________________________ > 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 > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > > -- > Sankhesh Jhaveri > *Sr. Research & Development Engineer* | Kitware > > | (518) 881-4417 > > ? > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Jun 12 12:03:35 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 12 Jun 2018 12:03:35 -0400 Subject: [vtkusers] vtkGPUInfoList does not work with OpenGL2 In-Reply-To: References: Message-ID: It has not been ported over to the new OpenGL2 backend. You could try taking the old version from the OpenGL1 backend and porting it over. On Tue, Jun 12, 2018 at 11:56 AM, Csaba Pinter wrote: > Hi again, > > > > I?d appreciate any information about using GPU info list with the new > OpenGL2 backend. Please see below. > > > > Thanks, > > csaba > > > > *From:* vtkusers * On Behalf Of *Csaba > Pinter > *Sent:* Thursday, June 7, 2018 15:57 > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] vtkGPUInfoList does not work with OpenGL2 > > > > Hi all, > > > > I?m trying to use the vtkGPUInfoList in VTK 9 built using OpenGL backend 2 > to get the GPU memory. On both Windows 10 (with GeForce 1060) and MacOSX > (10.13 Mid-2014), GetNumberOfGPUs returns 0 after Probe. Which is not > surprising, because the instantiated info list object is of type > vtkDummyGPUInfoList, which, according to the documentation, is ?Useful when > an OS specific implementation is not available?. > > > > Is vtkGPUInfoList supposed to work with OpenGL2? Should I use another > class? > > > > Thanks, > > csaba > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Tue Jun 12 12:11:14 2018 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Tue, 12 Jun 2018 10:11:14 -0600 Subject: [vtkusers] Cross platform rendering tests In-Reply-To: References: Message-ID: Thanks for the testing information, you mention that "We test nightly on OSX, Window, and Linux with both Mesa and native drivers from Intel, Nvidia, and AMD". I am interested in setting up VTK to use Mesa, are the instructions for building VTK to use Mesa? On Tue, Jun 12, 2018 at 7:43 AM, Ken Martin wrote: > To drive the testing take a look at testing with ctest > > To do image comparisons look at vtkRegressionTestImage.h and vtkTesting.h > We typically invoke testing as > > int retVal = vtkRegressionTestImage( renWin ); > > The typical approach uses argc and argv to extract the location of a valid > image file to use as a comparison. Those two headers have some example code > in them. We test nightly on OSX, Window, and Linux with both Mesa and > native drivers from Intel, Nvidia, and AMD. > > > > > > > > > > > > On Tue, Jun 12, 2018 at 9:28 AM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > >> I am working on a VTK based GUI and would like to test the rendered >> results across platforms (Linux and MacOS). Based on various sources of >> documentation, most of which seem to be quite old ( >> https://www.vtk.org/Wiki/VTK/OpenGL >> ), >> this should be possible with Mesa and software rendering. >> >> Could someone please point me to an example and/or current documentation >> for doing this sort of work. >> >> Thanks, >> Andrew >> >> _______________________________________________ >> 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 >> >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Jun 12 12:37:05 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 12 Jun 2018 12:37:05 -0400 Subject: [vtkusers] Cross platform rendering tests In-Reply-To: References: Message-ID: VTK uses OpenGL and Mesa is an OpenGL implementation. Building VTK is OpenGL agnostic and it can switch between mesa and native drivers by changing library paths, moving dlls, etc. This page has information on building mesa for various use cases although generally you can find prebuilt packages/binaries on the web. https://blog.kitware.com/messing-with-mesa-for-paraview-5-0vtk-7-0/ Hope that helps Ken On Tue, Jun 12, 2018 at 12:11 PM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > Thanks for the testing information, you mention that "We test nightly on > OSX, Window, and Linux with both Mesa and native drivers from Intel, > Nvidia, and AMD". I am interested in setting up VTK to use Mesa, are the > instructions for building VTK to use Mesa? > > On Tue, Jun 12, 2018 at 7:43 AM, Ken Martin > wrote: > >> To drive the testing take a look at testing with ctest >> >> To do image comparisons look at vtkRegressionTestImage.h and vtkTesting.h >> We typically invoke testing as >> >> int retVal = vtkRegressionTestImage( renWin ); >> >> The typical approach uses argc and argv to extract the location of a >> valid image file to use as a comparison. Those two headers have some >> example code in them. We test nightly on OSX, Window, and Linux with both >> Mesa and native drivers from Intel, Nvidia, and AMD. >> >> >> >> >> >> >> >> >> >> >> >> On Tue, Jun 12, 2018 at 9:28 AM, Slaughter, Andrew E < >> andrew.slaughter at inl.gov> wrote: >> >>> I am working on a VTK based GUI and would like to test the rendered >>> results across platforms (Linux and MacOS). Based on various sources of >>> documentation, most of which seem to be quite old ( >>> https://www.vtk.org/Wiki/VTK/OpenGL >>> ), >>> this should be possible with Mesa and software rendering. >>> >>> Could someone please point me to an example and/or current documentation >>> for doing this sort of work. >>> >>> Thanks, >>> Andrew >>> >>> _______________________________________________ >>> 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 >>> >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> >>> Follow this link to subscribe/unsubscribe: >>> https://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >> >> >> -- >> Ken Martin PhD >> Distinguished Engineer >> Kitware Inc. >> 101 East Weaver Street >> >> Carrboro, North Carolina >> >> 27510 USA >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vjblog_info at yahoo.com Tue Jun 12 23:22:18 2018 From: vjblog_info at yahoo.com (terminator) Date: Tue, 12 Jun 2018 20:22:18 -0700 (MST) Subject: [vtkusers] reasons of limitations on opacity per component and up to 4 components in label-map volume rendering? In-Reply-To: References: <1528679386409-0.post@n5.nabble.com> Message-ID: <1528860138781-0.post@n5.nabble.com> Thank you, I read that link (about SetMaskInput) and I have no problem with controlling components color. But about opacity, I mean that I want to control opacity of each component separately just like components' colors by different PieseWiseFunctions. I use SetScalarOpacity(0,...),SetScalarOpacity(1,...),SetScalarOpacity(2,...),... but just first one affects on the volume. I cannot hide component 0,make component 1 semi-transparent and component 2 opaque. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From abhishekworld at gmail.com Wed Jun 13 00:26:44 2018 From: abhishekworld at gmail.com (Abhishek) Date: Wed, 13 Jun 2018 14:26:44 +1000 Subject: [vtkusers] Redering 3D tiff files in VTK Message-ID: Greetings, I want to render a 3D tiff file (tiff file with lots of 2D slices). I have a image with `Extent - (0, 799, 0, 511, 0, 69)` I got this information as follow: import vtk reader = vtk.vtkTIFFReader() reader.SetFileName('./data_image.tif') reader.Update() img = reader.GetOutput() img.GetExtent() (0, 799, 0, 511, 0, 69) I am not sure how to render this 3D volume. Could you please help. Thanks, Abhishek -- Abhishek Patil zeroth.me -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Wed Jun 13 08:50:41 2018 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 13 Jun 2018 08:50:41 -0400 Subject: [vtkusers] Redering 3D tiff files in VTK In-Reply-To: References: Message-ID: You could do a volume rendering such as in https://lorensen.github.io/VTKExamples/site/Python/VolumeRendering/SimpleRayCast/ On Wed, Jun 13, 2018 at 12:27 AM Abhishek wrote: > Greetings, > I want to render a 3D tiff file (tiff file with lots of 2D slices). > I have a image with `Extent - (0, 799, 0, 511, 0, 69)` > I got this information as follow: > > import vtk > reader = vtk.vtkTIFFReader() > reader.SetFileName('./data_image.tif') > reader.Update() > img = reader.GetOutput() > img.GetExtent() > (0, 799, 0, 511, 0, 69) > > I am not sure how to render this 3D volume. > Could you please help. > > Thanks, > Abhishek > -- > Abhishek Patil > zeroth.me > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Wed Jun 13 10:09:54 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 13 Jun 2018 10:09:54 -0400 Subject: [vtkusers] reasons of limitations on opacity per component and up to 4 components in label-map volume rendering? In-Reply-To: <1528860138781-0.post@n5.nabble.com> References: <1528679386409-0.post@n5.nabble.com> <1528860138781-0.post@n5.nabble.com> Message-ID: Hi, Just so I understand properly, you cannot get the scalar opacity piecewise functions to work for components 1 through N, right? Could you please share sample code that reproduces the issue? Thanks, Sankhesh ? On Tue, Jun 12, 2018 at 11:22 PM terminator via vtkusers < vtkusers at public.kitware.com> wrote: > Thank you, > I read that link (about SetMaskInput) and I have no problem with > controlling > components color. > But about opacity, I mean that I want to control opacity of each component > separately just like components' colors by different PieseWiseFunctions. > I use > SetScalarOpacity(0,...),SetScalarOpacity(1,...),SetScalarOpacity(2,...),... > but just first one affects on the volume. I cannot hide component 0,make > component 1 semi-transparent and component 2 opaque. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaba.pinter at queensu.ca Wed Jun 13 13:47:36 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Wed, 13 Jun 2018 17:47:36 +0000 Subject: [vtkusers] vtkGPUInfoList does not work with OpenGL2 In-Reply-To: References: Message-ID: Thanks for the answer! Noted. I?ll take a look if I get there before anybody else :) Best, csaba From: Ken Martin Sent: Tuesday, June 12, 2018 12:04 To: Csaba Pinter Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkGPUInfoList does not work with OpenGL2 It has not been ported over to the new OpenGL2 backend. You could try taking the old version from the OpenGL1 backend and porting it over. On Tue, Jun 12, 2018 at 11:56 AM, Csaba Pinter > wrote: Hi again, I?d appreciate any information about using GPU info list with the new OpenGL2 backend. Please see below. Thanks, csaba From: vtkusers > On Behalf Of Csaba Pinter Sent: Thursday, June 7, 2018 15:57 To: vtkusers at vtk.org Subject: [vtkusers] vtkGPUInfoList does not work with OpenGL2 Hi all, I?m trying to use the vtkGPUInfoList in VTK 9 built using OpenGL backend 2 to get the GPU memory. On both Windows 10 (with GeForce 1060) and MacOSX (10.13 Mid-2014), GetNumberOfGPUs returns 0 after Probe. Which is not surprising, because the instantiated info list object is of type vtkDummyGPUInfoList, which, according to the documentation, is ?Useful when an OS specific implementation is not available?. Is vtkGPUInfoList supposed to work with OpenGL2? Should I use another class? Thanks, csaba _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Jun 13 13:50:27 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 13 Jun 2018 13:50:27 -0400 Subject: [vtkusers] anyone care to share some hdf5 backed sensor data? Message-ID: Hi folks, Aashish, John and I are working on a project at Kitware that involves non-traditional (for scivis) data stored in hdf5 files. Things like altimeter readings or intertial velocity readings taken over time would be just about perfect. If you have something like that handy that you are willing to share, please let us know off list. thanks! David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kayarre at gmail.com Wed Jun 13 20:01:45 2018 From: kayarre at gmail.com (Kurt Sansom) Date: Wed, 13 Jun 2018 17:01:45 -0700 Subject: [vtkusers] combine vtkImplicitSelectionLoop and vtkPlane to get intersection Message-ID: Hi all, I am able to use vtkImplicitSelectionLoop and vtkPlane to with vtkImplicitBoolean to create implicit function that clips out half of a tubular shaped shaped entity. but I want to use the intersection of the absolute value of vtkPlane rather than one direction or the other. how might I do this? I attached a diagram to explain what I want. I want to clip a surface but keep both sides intact. Thanks, Regards, ~Kurt -- Kurt Sansom -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Tube_explainer.png Type: image/png Size: 35144 bytes Desc: not available URL: From berti_krueger at hotmail.com Wed Jun 13 21:21:07 2018 From: berti_krueger at hotmail.com (=?utf-8?B?QmVydGkgS3LDvGdlcg==?=) Date: Thu, 14 Jun 2018 01:21:07 +0000 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Hi Elvis, thanks for jumping in. As you can see in David's response you were right or at least close with your assumptions. Regards Berti Am 11.06.2018 um 08:50 schrieb Elvis Stansvik: Den m?n 11 juni 2018 08:33Berti Kr?ger > skrev: Hi David, thank you very much for all your help and for all the effort. I am sorry, but i am an absolute beginner with VTK and for me it is really hard to find informations / documentation / explanations beyond the doxygen class documentation about the advanced visualization/manipulation operations in VTK (the VTK User Manual sadly only covers the very basics). So thanks again for all your clarifications and all your help so far. I replaced the visualization part of my pipeline with your code which makes it so much clearer, shorter and better in terms of the visualization. And it is also easy enough so that even i get it :-) Unfortunately when i extend the simple cone source voxelization example i attached the last time by using general STL meshes via the vtkSTLReader, i get missing voxels in the visualization. To be sure that the problem is indeed in the visualization part and not in the voxelization part i used binvox, a mature voxelization program (http://www.patrickmin.com/binvox/ ) to do the voxelization and the code you suggested for the visualization of the vtkImageData via VTK. Using this setup the Utah Teapot looks like this (the handle and other thin parts of the mesh are missing in the visualization): [Teapot missing voxels] For surface-only-voxelized meshes there even more voxels missing (the example here is the Stanford Bunny which has only been surface voxelized): [bunny surface voxelization visualization] What i don't get is that the visualization code is as simple as it gets: vtkNew selector; selector->SetInputData(voxelImage); selector->ThresholdByUpper(1.0); selector->Update(); vtkNew mapper; mapper->SetInputConnection(selector->GetOutputPort()); mapper->ScalarVisibilityOff(); mapper->StaticOn(); When i understand it correctly, then we simply visualize every cell (voxel) whose threshold is equal or greater than 1.0 which means we visualize (filter) all voxels which are set (in my vtkImageData voxels which are set are 1, voxels which are not set 0) and the vtkDataSetMapper maps these to graphic primitives and this does the rest of the visualization. Not much to do wrong here and that basically should do the trick but it doesn't. Any idea why this does not work correctly all the time and has problems with thin parts? I'm just jumping in from the side here, and I'm by no means a VTK expert. But I think what you're seeing is simply due to how VTK does volume rendering. It interpolates the given data points, which means you need at least two data points to get a voxel. I'm guessing that at the resolution you're doing the voxelization here, your teapot handle is simply too thin to result in even a single voxel. Think of your data points as a grid of fenceposts. You'll get a voxel in the middle of each 2x2x2 cluster of posts. Someone correct me if I'm wrong here. HTH, Elvis I therefore tried another approach by using the vtkGlyph3DMapper based on the example code from https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Glyph3DMapper : vtkNew points; for (int x = 0; x < dims[0]; x++) { for (int y = 0; y < dims[1]; y++) { for (int z = 0; z < dims[2]; z++) { char* pixel = static_cast(voxelImage->GetScalarPointer(x, y, z)); if(pixel[0] == 1) // if the voxel is set (1) in the voxel image points->InsertNextPoint(x, y, z); } } } vtkNew polydata; polydata->SetPoints(points); vtkNew glyph; vtkNew cubeSource; vtkNew glyph3Dmapper; glyph3Dmapper->SetSourceConnection(cubeSource->GetOutputPort()); glyph3Dmapper->SetInputData(polydata); glyph3Dmapper->Update(); actor->SetMapper(glyph3Dmapper); The visualization with this approach is a bit slower (probably because it does no backface culling of the backfaces of the cube polygons) but it seems to work correctly even with surface only voxelized meshes: [bunny ok][teapot] I attached a simple working vtk demo with both visualizations and integrated voxelized meshes (no external data files or other dependencies) as a simple cmake/vtk compileable project (PolyDataToImageDataVisualizationVoxel). Maybe it might help other vtk users in the future. Are there any other possibilities (maybe faster) to do the visualization with vtk ? Now having a visualization that seems to work, i tried this visualization with the suggested voxelization code from the vtk examples here https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ and while the voxelization is lighting-fast and some example meshes did get correctly voxelized, i also had a lot of meshes whose voxelizations had misclassified voxels (e.g. voxels are set where voxels should not have been set and the opposite (holes)) like with the Utah Teapot here: [teapot errors][teapot errors 2][teapot errors3] The problem is that for my project i have to find paths through the voxel image. So miscIassified voxels would lead to either wrong paths found (paths which do not really exist like in the first image) or maybe to a situation where no path can be found because of holes. I attached a compileable cmake/vtk example (PolyDataToImageDataVisualizationSTL) together with some small example stl-mesh-files (teapot etc.) using the example code from the vtk example repository for showing the problem with the given approach there. Is it possible by tweaking the vtk PolyDataToImageData example code to always get a correct voxelization or is another approach needed? If you or anybody else has ideas / suggestions i would really be glad. Thank for reading if you managed to get this far and have not fallen asleep and thank you very much in advance. Regards Berti Am 06.06.2018 um 01:49 schrieb David Gobbi: Hi Berti, The correct pad filter to use for this is "vtkImageConstantPad", not "WrapPad", but padding really isn't necessary. Neither is the use of cell scalars, it's more appropriate to use point scalars when working with image data since each voxel is represented as a point scalar. The threshold should be set like this, for a threshold halfway between your "inval" and "outval": selector->ThresholdByUpper(0.5*(startLabel + endLabel)); The lookup table wasn't correctly set. Calling SetRange() does not set the number of entries in the lookup table (by default, the lookup table has 256 entries). lut->SetTableRange(0, 1); lut->SetNumberOfColors(2); Also, your color for "1" was transparent, whereas it has to be opaque in order to properly see a scalar-colored cone. I stripped the visualization part of your pipeline down to the following. No padding is done, the thresholding uses point scalars, no shifting, and no lookup table (instead, I call ScalarVisibilityOff() and set the color via the actor's property object). I replaced vtkPolyDataMapper with vtkDataSetMapper, which automatically skins the data. unsigned char startLabel = outval; unsigned char endLabel = inval; vtkNew selector; // the call to SetInputArrayToProcess() isn't necessary, the default is fine //selector->SetInputArrayToProcess(0, 0, 0, // vtkDataObject::FIELD_ASSOCIATION_POINTS, // vtkDataSetAttributes::SCALARS); selector->SetInputData(voxelImage); selector->ThresholdByUpper(0.5*(startLabel + endLabel)); selector->Update(); vtkNew mapper; mapper->SetInputConnection(selector->GetOutputPort()); mapper->ScalarVisibilityOff(); vtkNew actor; actor->SetMapper(mapper); actor->GetProperty()->SetColor(0.0, 1.0, 0.0); An image of the resulting cone is attached. - David On Tue, Jun 5, 2018 at 1:26 AM, Berti Kr?ger > wrote: Hi David, thank you very much for your help. I tried the example from your link. Unfortunately the result is same as using the vtkVoxelModeller: [Screenshot result voxelization] I get only a voxelization of the surface. The interior of the voxelized cone is still hollow and not filled with voxels (at least this is implied by the visualization). For the visualization i use Bill Lorensen's example code from here: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/ I have attached this small example which compiles with VTK 8.1 to show the issue. It basicly only consist of the example code from your link (https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/) and the visualization code from the Bill Lorensen's example from the link above. I have not changed much. Any idea what is going wrong or what can i do get also voxelization of the interior (solid voxelization)? Thank you very much in advance. Regards Berti ________________________________ Von: David Gobbi > Gesendet: Montag, 28. Mai 2018 23:13 An: Berti Kr?ger Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Solid Voxelization with VTK Hi Berti, If its a triangulated surface that you want to fill with voxels, use vtkPolyDataToImageStencil: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ If its a mesh of 3D elements and you want to sample the elements to create voxels, try vtkResampleToImage. - David On Mon, May 28, 2018 at 4:41 PM, Berti Kr?ger > wrote: Hello Everyone. For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per second), works, but only voxelizes the outer shell where the mesh boundary triangles are. The inner part of the mesh stays hollow. Is there some way to get solid voxelization of 3D-Triangle-Meshes out of the box with VTK ? Thank you very much in advance, Berti _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From berti_krueger at hotmail.com Wed Jun 13 21:21:32 2018 From: berti_krueger at hotmail.com (=?Windows-1252?Q?Berti_Kr=FCger?=) Date: Thu, 14 Jun 2018 01:21:32 +0000 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Hi Csaba, thanks again. This is just perfect. I will try it. Regards Berti Am 11.06.2018 um 14:45 schrieb Csaba Pinter: Hi Berti, That code is under BSD-style license, so you?re free to do basically anything with it. This implementation is already pretty simple; just a concatenation of several VTK filters, so you can just give it a try by copy-pasting the relevant part of that function into your code and see if it works. If you?re interested in using the vtkSegmentation library, let me know though! Best, csaba From: Berti Kr?ger Sent: Monday, June 11, 2018 02:46 To: Csaba Pinter ; David Gobbi Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Solid Voxelization with VTK Hi Csaba, thank you very much for you answer and for offering your help. I already have looked at it and i think if no simpler option will come up, i will give it a try (hoping not to have to change too much to get it working with my pipeline since i am an absolute vtk beginner :-) ). How is this code licensed ? (i am only doing research work at the moment, the whole project i am working on is internal and just for testing and part of some larger work, it might be open sourced one day in the very far future but could even be not at all and it will never be used commercially). Regards Berti Am 05.06.2018 um 16:14 schrieb Csaba Pinter: Hi Berti, There is a pretty robust conversion algorithm implemented within 3D Slicer but using solely VTK: https://github.com/Slicer/Slicer/blob/master/Libs/vtkSegmentationCore/vtkClosedSurfaceToBinaryLabelmapConversionRule.cxx#L118 It consists of a short pipeline of standard VTK filters (some preprocessing then vtkPolyDataToImageStencil and vtkImageStencil). Let me know if you have any questions. csaba From: vtkusers On Behalf Of Berti Kr?ger Sent: Tuesday, June 5, 2018 03:26 To: David Gobbi Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Solid Voxelization with VTK Hi David, thank you very much for your help. I tried the example from your link. Unfortunately the result is same as using the vtkVoxelModeller: [Screenshot result voxelization] I get only a voxelization of the surface. The interior of the voxelized cone is still hollow and not filled with voxels (at least this is implied by the visualization). For the visualization i use Bill Lorensen's example code from here: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/ I have attached this small example which compiles with VTK 8.1 to show the issue. It basicly only consist of the example code from your link (https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/) and the visualization code from the Bill Lorensen's example from the link above. I have not changed much. Any idea what is going wrong or what can i do get also voxelization of the interior (solid voxelization)? Thank you very much in advance. Regards Berti PolyDataToImageData - lorensen.github.io lorensen.github.io If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build: GenerateCubesFromLabels - GitHub Pages lorensen.github.io Usage: GenerateCubesFromLabels FullHead.mhd StartLabel EndLabel where InputVolume is a meta file containing a 3 volume of discrete labels. ________________________________ Von: David Gobbi > Gesendet: Montag, 28. Mai 2018 23:13 An: Berti Kr?ger Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] Solid Voxelization with VTK Hi Berti, If its a triangulated surface that you want to fill with voxels, use vtkPolyDataToImageStencil: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataToImageData/ PolyDataToImageData - lorensen.github.io lorensen.github.io If VTK is not installed but compiled on your system, you will need to specify the path to your VTK build: If its a mesh of 3D elements and you want to sample the elements to create voxels, try vtkResampleToImage. - David On Mon, May 28, 2018 at 4:41 PM, Berti Kr?ger > wrote: Hello Everyone. For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the vtkVoxelModeller which, while somewhat slow (only around 200 Triangles per second), works, but only voxelizes the outer shell where the mesh boundary triangles are. The inner part of the mesh stays hollow. Is there some way to get solid voxelization of 3D-Triangle-Meshes out of the box with VTK ? Thank you very much in advance, Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 62429 bytes Desc: image001.jpg URL: From berti_krueger at hotmail.com Wed Jun 13 21:30:23 2018 From: berti_krueger at hotmail.com (=?utf-8?B?QmVydGkgS3LDvGdlcg==?=) Date: Thu, 14 Jun 2018 01:30:23 +0000 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Am 11.06.2018 um 18:34 schrieb David Gobbi: Hi Berti, Hi David. Currently you have two distinct parts to your pipeline: 1) generate the image (via vtkPolyDataToImageStencil) 2) visualize the result (via vtkThreshold) Let's start with vtkThreshold, since it seems to be the filter whose behavior is furthest from your expectations. The vtkThreshold filter is designed to extract cells. In your case, each "cell" that it extracts is a cube. But it's crucial to understand how a vtk "cell" is defined: each corner of the cell is a point in the data set. In this case, each of these points is one of the image samples, i.e. each point is what image analysis folks commonly refer to as a "voxel". So the cubes that vtkThreshold produces are not the image voxels. Instead, each cube is in fact a finite element whose corners are positioned at the image voxels. To make things even more confusing, VTK calls each of these elements a vtkVoxel. But a vtkVoxel is not an image voxel. A vtkVoxel is a cube that has an image voxel at each corner. You with me so far? Yes. And i now understand why the visualization i get from VTK is not what i expected it to be. What vtkThreshold output, by default, is every cube for which every corner of the cube is above the threshold. You can use threshold->SetAllScalars(0) to make it output every cube for which _any_ corner is above threshold. This makes it much more inclusive. But this is probably still not what you want. Exactly. Thank you very much for this great explanation. I think some of this should really be added to the examples since i seem not to be the only one who seems to be confused by the terminology of VTK. While these abstractions that vtk does are powerful because they can be applied independly of the dimensionality / topology of the underlying data it would be good to have some notes for common entities in 3D graphics because i got similar problems with 3D meshes (like what means vtkCell in this regard, etc.) Your approach of using glyphs is good, since what you really want to do is render a small cube for every point in the image. Your loop will run faster if you call voxelImage->GetScalarPointer(x, y, z) just once instead of calling it for every iteration. It returns a pointer, so all you have to do is increment the pointer at every iteration. Or you could replace the loop with the vtkThresholdPoints filter. Thanks again. I should have seen this by myself, but i coded it in a hurry to just give an example to show to you where my problems lie. But originally i meant slower regarding the visualization not the loop. Sorry i didn't make myself clearer. But after your explanation it is now obvious to me why my visualization using the glyphs is a bit slower (not by much) than the original visualization with the vtkThreshold approach. It simply does draw more primitives since my definition of a voxel results in more geometry for the graphics card. An alternative that might be faster (I say "might" because I'm not sure) is to use the vtkDiscreteMarchingCubes class. Thanks for the suggestion. But since you approved my approach with the glyphs and speedwise i am quite happy with it (i only wondered why it was a bit slower than the vtkThreshold approach thinking i was doing something wrong) i think i will stay with it. However if i am getting problems with the rendering speed with larger volumes later on it might be good to keep this in mind. So thanks again. Regarding vtkPolyDataToImageStencil, this class selects all voxels whose center points are within volume enclosed by the surface. It is not enough for the surface to merely pass through the voxel, this class wasn't designed to do that. So it is necessary for the voxel spacing to be smaller than the thinnest part of the model. Ok. I see. These constraints are to strict for me since i don't want to have the voxel image resolution be constrained by the geometry of the mesh. Also, vtkPolyDataToImageStencil expects the input data to be truly closed (it isn't enough if the surface merely "looks" like it is watertight). Otherwise, it can produce artifacts like the ones you have shown. You can test whether a surface is closed with the vtkFeatureEdges class. If you update vtkFeatureEdges for your original polydata, it should produce no output cells when used like this: vtkNew features; features->BoundaryEdgesOn(); features->NonManifoldEdgesOn(); features->FeatureEdgesOff(); features->SetInputData(....); features->Update(); If features->GetOutput()->GetNumberOfCells() is not zero, then the polydata is not truly watertight. Thanks again. While i might not be using the vtkPolyDataToImageStencil approach i think i will still need to check if the surface mesh is watertight. So this is really useful. So after all i will try the Slicer3D code Csaba has pointed me too. If nothing works as expected i have to write my own. I have a question for you: if your goal is to find paths through the object, then why convert it into voxels? Why not work directly with the original surface data? - David While i am not totally fixed at this voxel approach and still be open to alternatives e.g. working with the mesh directly, from a first consideration the discretization of the space into voxels (image samples / basis functions) makes some operations and reasoning easier and hopefully less computationally demanding. At least i think so but i could err on it. I have taken this image from a thread of the slicer newsgroup (it is attributed to Bill Lorensen) so i hope i didn't do any copyright infringement to give an example: [amygdala] The caption says that this should be the left amygdala. I am not an expert in brain anatomy but i think only the lower red ball-like part of this image is the actual amygdala and the rest is part of the striatum, caudate nucleus, lenticular nucleus and more. But anyway it does not matter here at all. Instead of just using 0 and 1 for the voxel image samples (unset or set, meaning inside or outside of the mesh) i have more options to use (as shown by the different colors in the image) since i use vtkUnsignedChar (vtkBool is not so useful anyway). So i can use these values to label different regions inside of the mesh. So i might easily slice certain regions away or use morphological or general image analysis operations. I can use these labels as landmarks so algorithms know easily in which part they actually operate. The voxel values can also be used to penalize / forbid or encourage certain paths while routing through the mesh (using them as a kind of weight). For multiple paths the voxel values can be used as marks that there is already some other path going through so there might not be a need for some kind of collision detection with AABBs, kd-Trees, Octrees and so on. The instruments i target have a limited resolution / precision anyway so maybe there might also be some mapping from the visualization / representation to the physical reality which could somehow be exploited. Without a deep analysis these are the first thoughts that came to my mind at the moment. There might be more. But the voxel representation is not yet set in stone. Of course you could all do this on the original surface mesh. But for me it was the first approach to get these requirements (which can still change) in one relatively simple uniform representation. Maybe all of this will change and maybe there might also be much better ways. But first i think you have to start somewhere and see if your ideas work. And i have the hope that vtk helps me trying out ideas without much additional boilerplate code. Thanks for all. Regards Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: left_amygdala.png Type: image/png Size: 146782 bytes Desc: left_amygdala.png URL: From bill.lorensen at gmail.com Wed Jun 13 21:38:21 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 13 Jun 2018 18:38:21 -0700 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: No copyright issuses. Use however you wish. Enjoy, Bill On Wed, Jun 13, 2018, 6:31 PM Berti Kr?ger wrote: > Am 11.06.2018 um 18:34 schrieb David Gobbi: > > Hi Berti, > > > *Hi David.* > > Currently you have two distinct parts to your pipeline: > > 1) generate the image (via vtkPolyDataToImageStencil) > > 2) visualize the result (via vtkThreshold) > > > Let's start with vtkThreshold, since it seems to be the filter whose > behavior is furthest from your expectations. > > The vtkThreshold filter is designed to extract cells. In your case, each > "cell" that it extracts is a cube. But it's crucial to understand how a > vtk "cell" is defined: each corner of the cell is a point in the data set. > In this case, each of these points is one of the image samples, i.e. each > point is what image analysis folks commonly refer to as a "voxel". > > So the cubes that vtkThreshold produces are not the image voxels. > Instead, each cube is in fact a finite element whose corners are positioned > at the image voxels. To make things even more confusing, VTK calls each of > these elements a vtkVoxel. But a vtkVoxel is not an image voxel. A > vtkVoxel is a cube that has an image voxel at each corner. You with me so > far? > > *Yes. And i now understand why the visualization i get from VTK is not > what i expected it to be.* > > What vtkThreshold output, by default, is every cube for which every corner > of the cube is above the threshold. You can use > threshold->SetAllScalars(0) to make it output every cube for which _any_ > corner is above threshold. This makes it much more inclusive. But this is > probably still not what you want. > > *Exactly. Thank you very much for this great explanation. I think some of > this should really be added to the examples since i seem not to be the only > one who seems to be confused by the terminology of VTK. While these > abstractions that vtk does are powerful because they can be applied > independly of the dimensionality / topology of the underlying data it would > be good to have some notes for common entities in 3D graphics because i got > similar problems with 3D meshes (like what means vtkCell in this regard, > etc.)* > > > Your approach of using glyphs is good, since what you really want to do is > render a small cube for every point in the image. Your loop will run > faster if you call voxelImage->GetScalarPointer(x, y, z) just once instead > of calling it for every iteration. It returns a pointer, so all you have > to do is increment the pointer at every iteration. Or you could replace > the loop with the vtkThresholdPoints filter. > > *Thanks again. I should have seen this by myself, but i coded it in a > hurry to just give an example to show to you where my problems lie.* > > *But originally i meant slower regarding the visualization not the loop. > Sorry i didn't make myself clearer. But after your explanation it is now > obvious to me why my visualization using the glyphs is a bit slower (not by > much) than the original visualization with the vtkThreshold approach. It > simply does draw more primitives since my definition of a voxel results in > more geometry for the graphics card.* > > > An alternative that might be faster (I say "might" because I'm not sure) > is to use the vtkDiscreteMarchingCubes class. > > *Thanks for the suggestion. But since you approved my approach with the > glyphs and speedwise i am quite happy with it (i only wondered why it was a > bit slower than the vtkThreshold approach thinking i was doing something > wrong) i think i will stay with it. However if i am getting problems with > the rendering speed with larger volumes later on it might be good to keep > this in mind. So thanks again.* > > > Regarding vtkPolyDataToImageStencil, this class selects all voxels whose > center points are within volume enclosed by the surface. It is not enough > for the surface to merely pass through the voxel, this class wasn't > designed to do that. So it is necessary for the voxel spacing to be > smaller than the thinnest part of the model. > > *Ok. I see. These constraints are to strict for me since i don't want to > have the voxel image resolution be constrained by the geometry of the mesh.* > > > Also, vtkPolyDataToImageStencil expects the input data to be truly closed > (it isn't enough if the surface merely "looks" like it is watertight). > Otherwise, it can produce artifacts like the ones you have shown. You can > test whether a surface is closed with the vtkFeatureEdges class. If you > update vtkFeatureEdges for your original polydata, it should produce no > output cells when used like this: > > vtkNew features; > features->BoundaryEdgesOn(); > features->NonManifoldEdgesOn(); > features->FeatureEdgesOff(); > features->SetInputData(....); > features->Update(); > > If features->GetOutput()->GetNumberOfCells() is not zero, then the > polydata is not truly watertight. > > > > > > *Thanks again. While i might not be using the vtkPolyDataToImageStencil > approach i think i will still need to check if the surface mesh is > watertight. So this is really useful. So after all i will try the Slicer3D > code Csaba has pointed me too. If nothing works as expected i have to write > my own. * > > I have a question for you: if your goal is to find paths through the > object, then why convert it into voxels? Why not work directly with the > original surface data? > > - David > > > *While i am not totally fixed at this voxel approach and still be open to > alternatives e.g. working with the mesh directly, from a first > consideration the discretization of the space into voxels (image samples / > basis functions) makes some operations and reasoning easier and hopefully > less computationally demanding.* > * At least i think so but i could err on it. * > *I have taken this image from a thread of the slicer newsgroup (it is > attributed to Bill Lorensen) so i hope i didn't do any copyright > infringement to give an example:* > > [image: amygdala] > > *The caption says that this should be the left amygdala. I am not an > expert in brain anatomy but i think only the lower red ball-like part of > this image is the actual amygdala and the rest is part of the striatum, > caudate nucleus, lenticular nucleus and more. But anyway it does not matter > here at all. * > > *Instead of just using 0 and 1 for the voxel image samples (unset or set, > meaning inside or outside of the mesh) i have more options to use (as shown > by the different colors in the image) since i use vtkUnsignedChar (vtkBool > is not so useful anyway). So i can use these values to label different > regions inside of the mesh. So i might easily slice certain regions away or > use morphological or general image analysis operations. I can use these > labels as landmarks so algorithms know easily in which part they actually > operate. The voxel values can also be used to penalize / forbid or > encourage certain paths while routing through the mesh (using them as a > kind of weight). For multiple paths the voxel values can be used as marks > that there is already some other path going through so there might not be a > need for some kind of collision detection with AABBs, kd-Trees, Octrees and > so on. The instruments i target have a limited resolution / precision > anyway so maybe there might also be some mapping from the visualization / > representation to the physical reality which could somehow be exploited.* > > *Without a deep analysis these are the first thoughts that came to my mind > at the moment. There might be more. But the voxel representation is not yet > set in stone. Of course you could all do this on the original surface mesh. > But for me it was the first approach to get these requirements (which can > still change) in one relatively simple uniform representation. Maybe all of > this will change and maybe there might also be much better ways. But first > i think you have to start somewhere and see if your ideas work. And i have > the hope that vtk helps me trying out ideas without much additional > boilerplate code.* > > > *Thanks for all.* > > *Regard**s* > > *Berti* > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: left_amygdala.png Type: image/png Size: 146782 bytes Desc: not available URL: From david.gobbi at gmail.com Wed Jun 13 21:43:21 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 13 Jun 2018 19:43:21 -0600 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Hi Berti, I'm glad that I could help. - David On Wed, Jun 13, 2018 at 7:30 PM, Berti Kr?ger wrote: > > *Thanks for all.* > > *Regard**s* > > *Berti* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Jun 13 22:28:20 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 13 Jun 2018 22:28:20 -0400 Subject: [vtkusers] combine vtkImplicitSelectionLoop and vtkPlane to get intersection In-Reply-To: References: Message-ID: One thing to try: Clip twice, but the second time flip normal of the vtkPlane (scale it by -1). HTH, Cory On Wed, Jun 13, 2018 at 8:01 PM Kurt Sansom wrote: > Hi all, > I am able to use vtkImplicitSelectionLoop and vtkPlane to > with vtkImplicitBoolean to create implicit function that clips out half of > a tubular shaped shaped entity. but I want to use the intersection of the > absolute value of vtkPlane rather than one direction or the other. how > might I do this? I attached a diagram to explain what I want. I want to > clip a surface but keep both sides intact. > > > Thanks, > Regards, > ~Kurt > > -- > Kurt Sansom > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Tube_explainer.png Type: image/png Size: 35144 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Thu Jun 14 01:46:26 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 14 Jun 2018 07:46:26 +0200 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: 2018-06-14 3:21 GMT+02:00 Berti Kr?ger : > Hi Elvis, > > thanks for jumping in. As you can see in David's response you were right > or at > least close with your assumptions. > Yep, you can always trust David to have all the nitty gritty details. He's the friendly VTK ninja around here :) Elvis > > Regards > > Berti > > Am 11.06.2018 um 08:50 schrieb Elvis Stansvik: > > Den m?n 11 juni 2018 08:33Berti Kr?ger skrev: > >> Hi David, >> >> thank you very much for all your help and for all the effort. >> >> I am sorry, but i am an absolute beginner with VTK and for me it is >> really hard to find informations / documentation / explanations beyond the >> doxygen class documentation about the advanced visualization/manipulation >> operations in VTK (the VTK User Manual sadly only covers the very basics). >> >> So thanks again for all your clarifications and all your help so far. >> >> I replaced the visualization part of my pipeline with your code which >> makes it so much clearer, shorter and better in terms of the visualization. >> And it is also easy enough so that even i get it :-) >> >> Unfortunately when i extend the simple cone source voxelization example i >> attached the last time by using general STL meshes via the vtkSTLReader, i >> get missing voxels in the visualization. To be sure that the problem is >> indeed in the visualization part and not in the voxelization part i used >> *binvox*, a mature voxelization program (http://www.patrickmin.com/ >> binvox/ ) to do the voxelization and the code you suggested for the >> visualization of the vtkImageData via VTK. >> >> >> Using this setup the Utah Teapot looks like this (the handle and other >> thin parts of the mesh are missing in the visualization): >> >> [image: Teapot missing voxels] >> >> >> For surface-only-voxelized meshes there even more voxels missing (the >> example here is the Stanford Bunny which has only been surface voxelized): >> >> [image: bunny surface voxelization visualization] >> >> What i don't get is that the visualization code is as simple as it gets: >> >> vtkNew selector; >> selector->SetInputData(voxelImage); >> selector->ThresholdByUpper(1.0); >> selector->Update(); >> >> vtkNew mapper; >> mapper->SetInputConnection(selector->GetOutputPort()); >> mapper->ScalarVisibilityOff(); >> mapper->StaticOn(); >> >> When i understand it correctly, then we simply visualize every cell >> (voxel) whose threshold is equal or greater than 1.0 which means we >> visualize (filter) all voxels which are set (in my vtkImageData voxels >> which are set are 1, voxels which are not set 0) and the vtkDataSetMapper >> maps these to graphic primitives and this does the rest of the >> visualization. Not much to do wrong here and that basically should do the >> trick but it doesn't. >> >> *Any idea why this does not work correctly all the time and has problems >> with thin parts?* >> > I'm just jumping in from the side here, and I'm by no means a VTK expert. > But I think what you're seeing is simply due to how VTK does volume > rendering. It interpolates the given data points, which means you need at > least two data points to get a voxel. > > I'm guessing that at the resolution you're doing the voxelization here, > your teapot handle is simply too thin to result in even a single voxel. > > Think of your data points as a grid of fenceposts. You'll get a voxel in > the middle of each 2x2x2 cluster of posts. > > Someone correct me if I'm wrong here. > > HTH, > Elvis > >> >> >> I therefore tried another approach by using the vtkGlyph3DMapper based on >> the example code from >> >> >> https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Glyph3DMapper : >> >> >> vtkNew points; >> >> for (int x = 0; x < dims[0]; x++) >> { >> for (int y = 0; y < dims[1]; y++) >> { >> for (int z = 0; z < dims[2]; z++) >> { >> char* pixel = static_cast(voxelImage->GetScalarPointer(x, >> y, z)); >> >> if(pixel[0] == 1) // if the voxel is set (1) in the voxel image >> points->InsertNextPoint(x, y, z); >> } >> } >> } >> >> vtkNew polydata; >> polydata->SetPoints(points); >> >> vtkNew glyph; >> >> vtkNew cubeSource; >> >> vtkNew glyph3Dmapper; >> glyph3Dmapper->SetSourceConnection(cubeSource->GetOutputPort()); >> glyph3Dmapper->SetInputData(polydata); >> glyph3Dmapper->Update(); >> >> actor->SetMapper(glyph3Dmapper); >> >> >> The visualization with this approach is a bit slower (probably because it >> does no backface culling of the backfaces of the cube polygons) but it >> seems to work correctly even with surface only voxelized meshes: >> [image: bunny ok][image: teapot] >> >> >> I attached a simple working vtk demo with both visualizations and >> integrated voxelized meshes (no external data files or other dependencies) >> as a simple cmake/vtk compileable project ( >> *PolyDataToImageDataVisualizationVoxel*). Maybe it might help other vtk >> users in the future. >> >> *Are there any other possibilities (maybe faster) to do the visualization >> with vtk ?* >> >> >> >> Now having a visualization that seems to work, i tried this visualization >> with the suggested voxelization code from the vtk examples here >> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ >> PolyDataToImageData/ >> >> and while the voxelization is lighting-fast and some example meshes did >> get correctly voxelized, i also had a lot of meshes whose voxelizations had >> misclassified voxels (e.g. voxels are set where voxels should not have been >> set and the opposite (holes)) like with the Utah Teapot here: >> >> [image: teapot errors][image: teapot errors 2][image: teapot errors3] >> >> The problem is that for my project i have to find paths through the voxel >> image. So miscIassified voxels would lead to either wrong paths found >> (paths which do not really exist like in the first image) or maybe to a >> situation where no path can be found because of holes. >> >> I attached a compileable cmake/vtk example ( >> *PolyDataToImageDataVisualizationSTL*) together with some small example >> stl-mesh-files (teapot etc.) using the example code from the vtk example >> repository for showing the problem with the given approach there. >> >> >> *Is it possible by tweaking the vtk PolyDataToImageData example code to >> always get a correct voxelization or is another approach needed?* >> >> >> If you or anybody else has ideas / suggestions i would really be glad. >> Thank for reading if you managed to get this far and have not fallen >> asleep and thank you very much in advance. >> >> >> Regards >> >> Berti >> >> >> Am 06.06.2018 um 01:49 schrieb David Gobbi: >> >> Hi Berti, >> >> The correct pad filter to use for this is "vtkImageConstantPad", not >> "WrapPad", but padding really isn't necessary. Neither is the use of cell >> scalars, it's more appropriate to use point scalars when working with image >> data since each voxel is represented as a point scalar. >> >> The threshold should be set like this, for a threshold halfway between >> your "inval" and "outval": >> >> selector->ThresholdByUpper(0.5*(startLabel + endLabel)); >> >> The lookup table wasn't correctly set. Calling SetRange() does not set >> the number of entries in the lookup table (by default, the lookup table has >> 256 entries). >> >> lut->SetTableRange(0, 1); >> lut->SetNumberOfColors(2); >> >> Also, your color for "1" was transparent, whereas it has to be opaque in >> order to properly see a scalar-colored cone. >> >> >> >> I stripped the visualization part of your pipeline down to the >> following. No padding is done, the thresholding uses point scalars, no >> shifting, and no lookup table (instead, I call ScalarVisibilityOff() and >> set the color via the actor's property object). I replaced >> vtkPolyDataMapper with vtkDataSetMapper, which automatically skins the data. >> >> >> unsigned char startLabel = outval; >> unsigned char endLabel = inval; >> >> vtkNew selector; >> // the call to SetInputArrayToProcess() isn't necessary, the default is >> fine >> //selector->SetInputArrayToProcess(0, 0, 0, >> // vtkDataObject::FIELD_ >> ASSOCIATION_POINTS, >> // vtkDataSetAttributes::SCALARS); >> selector->SetInputData(voxelImage); >> selector->ThresholdByUpper(0.5*(startLabel + endLabel)); >> selector->Update(); >> >> vtkNew mapper; >> mapper->SetInputConnection(selector->GetOutputPort()); >> mapper->ScalarVisibilityOff(); >> >> vtkNew actor; >> actor->SetMapper(mapper); >> actor->GetProperty()->SetColor(0.0, 1.0, 0.0); >> >> >> An image of the resulting cone is attached. >> >> - David >> >> >> On Tue, Jun 5, 2018 at 1:26 AM, Berti Kr?ger >> wrote: >> >>> Hi David, >>> >>> >>> thank you very much for your help. >>> >>> >>> I tried the example from your link. Unfortunately the result is same as >>> using the vtkVoxelModeller: >>> >>> >>> [image: Screenshot result voxelization] >>> I get only a voxelization of the surface. The interior of the voxelized >>> cone is still hollow and not filled with voxels (at least this is implied >>> by the visualization). >>> >>> >>> For the visualization i use Bill Lorensen's example code from here: >>> >>> https://lorensen.github.io/VTKExamples/site/Cxx/Medical/ >>> GenerateCubesFromLabels/ >>> >>> >>> >>> I have attached this small example which compiles with VTK 8.1 to show >>> the issue. It basicly only consist of the example code from your link ( >>> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ >>> PolyDataToImageData/) and the visualization code from the Bill >>> Lorensen's example from the link above. I have not changed much. >>> >>> >>> Any idea what is going wrong or what can i do get also voxelization of >>> the interior (solid voxelization)? >>> >>> >>> Thank you very much in advance. >>> >>> >>> >>> Regards >>> >>> >>> Berti >>> ------------------------------ >>> *Von:* David Gobbi >>> *Gesendet:* Montag, 28. Mai 2018 23:13 >>> *An:* Berti Kr?ger >>> *Cc:* vtkusers at vtk.org >>> *Betreff:* Re: [vtkusers] Solid Voxelization with VTK >>> >>> Hi Berti, >>> >>> If its a triangulated surface that you want to fill with voxels, use >>> vtkPolyDataToImageStencil: >>> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ >>> PolyDataToImageData/ >>> >>> If its a mesh of 3D elements and you want to sample the elements to >>> create voxels, try vtkResampleToImage. >>> >>> - David >>> >>> >>> >>> On Mon, May 28, 2018 at 4:41 PM, Berti Kr?ger >> > wrote: >>> >>> Hello Everyone. >>> >>> For my Project i have to voxelize a 3D-Triangle-Mesh. I already found the >>> vtkVoxelModeller which, while somewhat slow (only around 200 Triangles >>> per >>> second), works, but only voxelizes the outer shell where the mesh >>> boundary >>> triangles are. The inner part of the mesh stays hollow. >>> >>> Is there some way to get solid voxelization of 3D-Triangle-Meshes out of >>> the >>> box with VTK ? >>> >>> >>> Thank you very much in advance, >>> >>> Berti >>> >>> >> >> _______________________________________________ >> 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adelaossa at gmail.com Thu Jun 14 04:00:14 2018 From: adelaossa at gmail.com (amdelaossa) Date: Thu, 14 Jun 2018 10:00:14 +0200 Subject: [vtkusers] Fwd: VTK + PyQt5 + VirtualGL not working References: <92D8FCE3-EBFA-426E-8A12-F1166F8725FD@desy.de> Message-ID: Dear VTK developers, We have an issue with our 3D visualization software which uses VTK, through Python bindings. Although VTK has been working with no problems with VirtualGL, recently we have implemented a GUI for our visualization routines. The problem appeared when we tried to use this GUI remotely through VirtualGL. We get the following error message: ` [VGL] NOTICE: Automatically setting VGL_CLIENT environment variable to [VGL] 131.169.206.101, the IP address of your SSH client. ERROR: In /data/netapp/fla/plasma/software-max/source/VTK-git/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 725 vtkXOpenGLRenderWindow (0x2ef7b00): GLEW could not be initialized. Segmentation fault ` The problem also appear with a much more simple program that we took from the VTK examples: This python script runs smoothly in a local computer, but it fails when using vglrun (VirtualGL). This is a critical issue for us: Our simulation data is stored in remote clusters for parallel computing, and therefore, it is a must to use VirtualGL to visualize the data with VTK without needing to transfer large amounts of data to our personal computers. Any help or information is much appreciated. Thanks! Best regards, Alberto Alberto Martinez de la Ossa Postdoc Uni. Hamburg - DESY-FLA Deutsches Elektronen-Synchrotron DESY Notkestra?e 85, 22607 Hamburg Office: 01E/O2.514 Phone: +49 40 8998 1569 Email: alberto.martinez.de.la.ossa at desy.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkQtSimple.py Type: text/x-python-script Size: 1334 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.murphy at gmail.com Thu Jun 14 05:38:51 2018 From: sebastien.murphy at gmail.com (smurphy) Date: Thu, 14 Jun 2018 02:38:51 -0700 (MST) Subject: [vtkusers] vtk.js issue with the ES6 example Message-ID: <1528969131745-0.post@n5.nabble.com> Hello, I am having issues with running the vtk.js example from https://kitware.github.io/vtk-js/docs/intro_vtk_as_es6_dependency.html. I did exactly as instructed (at least I believe I did and cross-checked many times). when running >npm run build I get the following error ERROR in ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeVS.glsl Module parse failed: Unexpected token (18:10) You may need an appropriate loader to handle this file type. The entire output until this error is copied below. I also attach the webpack.config.js file. Tried searching online and in the forum but can't find any solutions to this specific problem. Thanks, Sebastien > mywebproject at 1.0.0 build ~/VTK/Web/MyWebProject > webpack Hash: a6f352cb63b054c23d33 Version: webpack 4.8.3 Time: 1959ms Built at: 2018-06-14 11:29:58 1 asset Entrypoint main = main.js [2] (webpack)/buildin/amd-define.js 88 bytes {0} [built] [4] (webpack)/buildin/amd-options.js 82 bytes {0} [built] [5] (webpack)/buildin/module.js 519 bytes {0} [built] [6] (webpack)/buildin/global.js 509 bytes {0} [built] [10] ./src/controller.html 158 bytes {0} [built] [failed] [1 error] [20] ./src/index.js + 98 modules 904 KiB {0} [built] | ./src/index.js 2.59 KiB [built] | + 98 hidden modules [21] crypto (ignored) 15 bytes {0} [optional] [built] + 25 hidden modules WARNING in ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js 1293:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was not found in './ComputeGradients.worker' @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/ViewNodeFactory/index.js @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/RenderWindow/index.js @ ./node_modules/vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index.js @ ./src/index.js WARNING in configuration The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment. You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/ ERROR in ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeVS.glsl Module parse failed: Unexpected token (18:10) You may need an appropriate loader to handle this file type. | =========================================================================*/ -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From vjblog_info at yahoo.com Thu Jun 14 06:50:40 2018 From: vjblog_info at yahoo.com (terminator) Date: Thu, 14 Jun 2018 03:50:40 -0700 (MST) Subject: [vtkusers] reasons of limitations on opacity per component and up to 4 components in label-map volume rendering? In-Reply-To: References: <1528679386409-0.post@n5.nabble.com> <1528860138781-0.post@n5.nabble.com> Message-ID: <1528973440861-0.post@n5.nabble.com> Of curse, It's the output: And this is the code: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define PIC_STEP 5 int main(int, char *[]) { int start = 3785, end = 4285; std::string ctPath = "..\\CTDATA\\"; std::string maskPath = "..\\labelmap\\"; vtkSmartPointer ctReader = vtkSmartPointer::New(); vtkSmartPointer maskReader = vtkSmartPointer::New(); vtkImageData * ctImages; vtkImageData * maskImages; vtkVolume * volume; vtkGPUVolumeRayCastMapper * vMap; vtkVolumeProperty * vProp; vtkPiecewiseFunction * tf[3]; vtkColorTransferFunction * cf[3]; int pic_num = start; ctReader->SetFileName((ctPath + std::to_string(pic_num) + ".tif").c_str()); ctReader->Update(); int * extents = ctReader->GetOutput()->GetExtent(); vtkStdString * ctFileNames = new vtkStdString[(end - start) / PIC_STEP + 1]; vtkStdString * maskFileNames = new vtkStdString[(end - start) / PIC_STEP + 1]; int i = 0; for (int pic_num = start; pic_num <= end; pic_num += PIC_STEP) { ctFileNames[i] = ctPath + std::to_string(pic_num) + ".tif"; maskFileNames[i] = maskPath + std::to_string(pic_num) + ".tif"; i++; } vtkStringArray * ctFileNameArr = vtkStringArray::New(); vtkStringArray * maskFileNameArr = vtkStringArray::New(); ctFileNameArr->SetArray(ctFileNames, (end - start) / PIC_STEP + 1, 0); maskFileNameArr->SetArray(maskFileNames, (end - start) / PIC_STEP + 1, 0); std::cout << "Slices: " << (end - start) / PIC_STEP << std::endl; ctReader->SetDataExtent(extents[0], extents[1], extents[2], extents[3], 0, ((end - start) / PIC_STEP)); ctReader->SetFileNames(ctFileNameArr); ctReader->Update(); ctImages = ctReader->GetOutput(); maskReader->SetDataExtent(extents[0], extents[1], extents[2], extents[3], 0, ((end - start) / PIC_STEP)); maskReader->SetFileNames(maskFileNameArr); maskReader->SetOrientationType(ORIENTATION_LEFTBOT); maskReader->Update(); maskImages = maskReader->GetOutput(); //Opacity TF tf[0] = vtkPiecewiseFunction::New(); tf[0]->AddPoint(20, 0); tf[0]->AddPoint(255, 0.2); tf[1] = vtkPiecewiseFunction::New(); tf[1]->AddPoint(0, 1); tf[1]->AddPoint(255, 1); tf[2] = vtkPiecewiseFunction::New(); tf[2]->AddPoint(0, 0); tf[2]->AddPoint(255, 0); //Color TF cf[0] = vtkColorTransferFunction::New(); cf[0]->AddRGBPoint(0, 0, 0, 0); cf[0]->AddRGBPoint(255, 1, 1, 1); cf[1] = vtkColorTransferFunction::New(); cf[1]->AddRGBPoint(0, 1, 0, 0); cf[1]->AddRGBPoint(255, 1, 0, 0); cf[2] = vtkColorTransferFunction::New(); cf[2]->AddRGBPoint(0, 0, 0, 1); cf[2]->AddRGBPoint(255, 0, 0, 1); vProp = vtkVolumeProperty::New(); vProp->IndependentComponentsOn(); vProp->SetScalarOpacity(0, tf[0]); vProp->SetGradientOpacity(0, tf[0]); vProp->SetScalarOpacity(1, tf[1]); vProp->SetGradientOpacity(1, tf[1]); vProp->SetScalarOpacity(2, tf[2]); vProp->SetGradientOpacity(2, tf[2]); vProp->SetColor(0, cf[0]); vProp->SetColor(1, cf[1]); vProp->SetColor(2, cf[2]); vMap = vtkGPUVolumeRayCastMapper::New(); vMap->SetInputData(ctImages); vMap->SetMaskTypeToLabelMap(); vMap->SetMaskBlendFactor(0.8); vMap->SetMaskInput(maskImages); volume = vtkVolume::New(); volume->SetMapper(vMap); volume->SetProperty(vProp); vtkRenderer * render = vtkRenderer::New(); vtkRenderWindow * renderWin = vtkRenderWindow::New(); vtkRenderWindowInteractor * irenWin = vtkRenderWindowInteractor::New(); render->SetBackground(0, 0.5, 0.5); render->AddVolume(volume); renderWin->AddRenderer(render); irenWin->SetRenderWindow(renderWin); renderWin->Render(); irenWin->Start(); return EXIT_SUCCESS; } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sebastien.jourdain at kitware.com Thu Jun 14 08:59:41 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 14 Jun 2018 06:59:41 -0600 Subject: [vtkusers] vtk.js issue with the ES6 example In-Reply-To: <1528969131745-0.post@n5.nabble.com> References: <1528969131745-0.post@n5.nabble.com> Message-ID: Good catch, I'll update the code, but the missing loader would be https://github.com/Kitware/vtk-js/blob/master/Utilities/config/rules-tests.js#L5-L10 and that should be part of the vtk rules. Thanks for reporting the issue. Seb On Thu, Jun 14, 2018 at 3:38 AM smurphy wrote: > Hello, > > I am having issues with running the vtk.js example from > https://kitware.github.io/vtk-js/docs/intro_vtk_as_es6_dependency.html. > > I did exactly as instructed (at least I believe I did and cross-checked > many > times). > > when running > >npm run build > I get the following error > > ERROR in > ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeVS.glsl > Module parse failed: Unexpected token (18:10) > You may need an appropriate loader to handle this file type. > > The entire output until this error is copied below. I also attach the > webpack.config.js file. > > Tried searching online and in the forum but can't find any solutions to > this > specific problem. > > Thanks, > Sebastien > > > mywebproject at 1.0.0 build ~/VTK/Web/MyWebProject > > webpack > > Hash: a6f352cb63b054c23d33 > Version: webpack 4.8.3 > Time: 1959ms > Built at: 2018-06-14 11:29:58 > 1 asset > Entrypoint main = main.js > [2] (webpack)/buildin/amd-define.js 88 bytes {0} [built] > [4] (webpack)/buildin/amd-options.js 82 bytes {0} [built] > [5] (webpack)/buildin/module.js 519 bytes {0} [built] > [6] (webpack)/buildin/global.js 509 bytes {0} [built] > [10] ./src/controller.html 158 bytes {0} [built] [failed] [1 error] > [20] ./src/index.js + 98 modules 904 KiB {0} [built] > | ./src/index.js 2.59 KiB [built] > | + 98 hidden modules > [21] crypto (ignored) 15 bytes {0} [optional] [built] > + 25 hidden modules > > WARNING in ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js > 1293:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was not > found in './ComputeGradients.worker' > @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js > @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/ViewNodeFactory/index.js > @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/RenderWindow/index.js > @ > > ./node_modules/vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index.js > @ ./src/index.js > > WARNING in configuration > The 'mode' option has not been set, webpack will fallback to 'production' > for this value. Set 'mode' option to 'development' or 'production' to > enable > defaults for each environment. > You can also set it to 'none' to disable any default behavior. Learn more: > https://webpack.js.org/concepts/mode/ > > ERROR in > ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeVS.glsl > Module parse failed: Unexpected token (18:10) > You may need an appropriate loader to handle this file type. > | > =========================================================================*/ > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From messari.omar at gmail.com Thu Jun 14 09:03:43 2018 From: messari.omar at gmail.com (messari.omar) Date: Thu, 14 Jun 2018 06:03:43 -0700 (MST) Subject: [vtkusers] VTK draw POINT ERREUR when x,y and Z are big Message-ID: <1528981423429-0.post@n5.nabble.com> HELLO, I'm trying to display my points (data comming from a magneto sensor) the datas are between -600 and 600 i can't show them and i have a message error that tells me that the format i'm trying to enter are incorrect. but when i normalise my values ( -1 X = new List(); // cr?ation de la liste List Y = new List(); List Z = new List(); // Create topology of the points (a vertex per point) vtkCellArray vertices = vtkCellArray.New(); double a = double.Parse(reader.MAGx.Text); // data comming from the sensor double b = double.Parse(reader.MAGy.Text);// data comming from the sensor double c = double.Parse(reader.MAGz.Text);// data comming from the sensor X.Add(a); Y.Add(b); Z.Add(c); label7.Text = a.ToString(); int[] ids = new int[X.Count]; for (i = 0; i < X.Count; i++) ids[i] = points.InsertNextPoint(X[i], Y[i], Z[i]); int size = Marshal.SizeOf(typeof(int)) * X.Count; IntPtr pIds = Marshal.AllocHGlobal(size); Marshal.Copy(ids, 0, pIds, X.Count); vertices.InsertNextCell(X.Count, pIds); Marshal.FreeHGlobal(pIds); // Create a polydata object vtkPolyData pointPoly = vtkPolyData.New(); // Set the points and vertices we created as the geometry and topology of the polydata pointPoly.SetPoints(points); pointPoly.SetVerts(vertices); // Visualize vtkPolyDataMapper mapper = vtkPolyDataMapper.New(); mapper.SetInput(pointPoly); vtkActor actor = vtkActor.New(); actor.SetMapper(mapper); actor.GetProperty().SetPointSize(2); vtkRenderWindow renderWindow = renderWindowControl1.RenderWindow; vtkRenderer renderer = renderWindow.GetRenderers().GetFirstRenderer(); renderer.AddActor(actor); renderWindow.Render(); } Thanks all. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From messari.omar at gmail.com Thu Jun 14 07:18:31 2018 From: messari.omar at gmail.com (messari.omar) Date: Thu, 14 Jun 2018 04:18:31 -0700 (MST) Subject: [vtkusers] VTK draw POINT ERREUR when x,y and Z are big Message-ID: <1528975111669-0.post@n5.nabble.com> HELLO, I'm trying to display my points (data comming from a magneto sensor) the datas are between -600 and 600 i can't show them and i have a message error that tells me that the format i'm trying to enter are incorrect. but when i normalise my values ( -1 X = new List(); // cr?ation de la liste List Y = new List(); List Z = new List(); // Create topology of the points (a vertex per point) vtkCellArray vertices = vtkCellArray.New(); double a = double.Parse(reader.MAGx.Text); // data comming from the sensor double b = double.Parse(reader.MAGy.Text);// data comming from the sensor double c = double.Parse(reader.MAGz.Text);// data comming from the sensor X.Add(a); Y.Add(b); Z.Add(c); label7.Text = a.ToString(); int[] ids = new int[X.Count]; for (i = 0; i < X.Count; i++) ids[i] = points.InsertNextPoint(X[i], Y[i], Z[i]); int size = Marshal.SizeOf(typeof(int)) * X.Count; IntPtr pIds = Marshal.AllocHGlobal(size); Marshal.Copy(ids, 0, pIds, X.Count); vertices.InsertNextCell(X.Count, pIds); Marshal.FreeHGlobal(pIds); // Create a polydata object vtkPolyData pointPoly = vtkPolyData.New(); // Set the points and vertices we created as the geometry and topology of the polydata pointPoly.SetPoints(points); pointPoly.SetVerts(vertices); // Visualize vtkPolyDataMapper mapper = vtkPolyDataMapper.New(); mapper.SetInput(pointPoly); vtkActor actor = vtkActor.New(); actor.SetMapper(mapper); actor.GetProperty().SetPointSize(2); vtkRenderWindow renderWindow = renderWindowControl1.RenderWindow; vtkRenderer renderer = renderWindow.GetRenderers().GetFirstRenderer(); renderer.AddActor(actor); renderWindow.Render(); } Thanks all. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sebastien.jourdain at kitware.com Thu Jun 14 10:10:46 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 14 Jun 2018 08:10:46 -0600 Subject: [vtkusers] vtk.js issue with the ES6 example In-Reply-To: References: <1528969131745-0.post@n5.nabble.com> Message-ID: Which version of vtk.js are you using? Looking at the code (now 6.6.5), it seems that the missing rule exist. On Thu, Jun 14, 2018 at 6:59 AM Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > Good catch, I'll update the code, but the missing loader would be > https://github.com/Kitware/vtk-js/blob/master/Utilities/config/rules-tests.js#L5-L10 > and that should be part of the vtk rules. > > Thanks for reporting the issue. > > Seb > > On Thu, Jun 14, 2018 at 3:38 AM smurphy > wrote: > >> Hello, >> >> I am having issues with running the vtk.js example from >> https://kitware.github.io/vtk-js/docs/intro_vtk_as_es6_dependency.html. >> >> I did exactly as instructed (at least I believe I did and cross-checked >> many >> times). >> >> when running >> >npm run build >> I get the following error >> >> ERROR in >> ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeVS.glsl >> Module parse failed: Unexpected token (18:10) >> You may need an appropriate loader to handle this file type. >> >> The entire output until this error is copied below. I also attach the >> webpack.config.js file. >> >> Tried searching online and in the forum but can't find any solutions to >> this >> specific problem. >> >> Thanks, >> Sebastien >> >> > mywebproject at 1.0.0 build ~/VTK/Web/MyWebProject >> > webpack >> >> Hash: a6f352cb63b054c23d33 >> Version: webpack 4.8.3 >> Time: 1959ms >> Built at: 2018-06-14 11:29:58 >> 1 asset >> Entrypoint main = main.js >> [2] (webpack)/buildin/amd-define.js 88 bytes {0} [built] >> [4] (webpack)/buildin/amd-options.js 82 bytes {0} [built] >> [5] (webpack)/buildin/module.js 519 bytes {0} [built] >> [6] (webpack)/buildin/global.js 509 bytes {0} [built] >> [10] ./src/controller.html 158 bytes {0} [built] [failed] [1 error] >> [20] ./src/index.js + 98 modules 904 KiB {0} [built] >> | ./src/index.js 2.59 KiB [built] >> | + 98 hidden modules >> [21] crypto (ignored) 15 bytes {0} [optional] [built] >> + 25 hidden modules >> >> WARNING in ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js >> 1293:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was >> not >> found in './ComputeGradients.worker' >> @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js >> @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/ViewNodeFactory/index.js >> @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/RenderWindow/index.js >> @ >> >> ./node_modules/vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index.js >> @ ./src/index.js >> >> WARNING in configuration >> The 'mode' option has not been set, webpack will fallback to 'production' >> for this value. Set 'mode' option to 'development' or 'production' to >> enable >> defaults for each environment. >> You can also set it to 'none' to disable any default behavior. Learn more: >> https://webpack.js.org/concepts/mode/ >> >> ERROR in >> ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeVS.glsl >> Module parse failed: Unexpected token (18:10) >> You may need an appropriate loader to handle this file type. >> | >> >> =========================================================================*/ >> >> >> >> -- >> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >> _______________________________________________ >> 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.murphy at gmail.com Thu Jun 14 10:32:39 2018 From: sebastien.murphy at gmail.com (smurphy) Date: Thu, 14 Jun 2018 07:32:39 -0700 (MST) Subject: [vtkusers] vtk.js issue with the ES6 example In-Reply-To: References: <1528969131745-0.post@n5.nabble.com> Message-ID: <1528986759873-0.post@n5.nabble.com> Hi, I'm using vtk version 6.6.1. (Below is my package.json) { "name": "mywebproject", "version": "1.0.0", "description": "", "main": "src/index.js", "dependencies": { "kw-web-suite": "^6.1.0", "vtk.js": "^6.6.1" }, "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "scripts": { "build": "webpack", "build:release": "webpack -p", "start": "webpack-dev-server --content-base ./dist", "commit": "git cz", "semantic-release": "semantic-release" }, "author": "Seb", "license": "ISC" } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sebastien.murphy at gmail.com Thu Jun 14 10:47:49 2018 From: sebastien.murphy at gmail.com (smurphy) Date: Thu, 14 Jun 2018 07:47:49 -0700 (MST) Subject: [vtkusers] vtk.js issue with the ES6 example In-Reply-To: <1528986759873-0.post@n5.nabble.com> References: <1528969131745-0.post@n5.nabble.com> <1528986759873-0.post@n5.nabble.com> Message-ID: <1528987669124-0.post@n5.nabble.com> Ok I updated to 6.6. 5 (package.json below) but I still have the same problem as before.. Thanks { "name": "mywebproject", "version": "1.0.0", "description": "", "main": "src/index.js", "dependencies": { "vtk.js": "^6.6.5" }, "devDependencies": { "kw-web-suite": "^6.1.0" }, "scripts": { "build": "webpack", "build:release": "webpack -p", "start": "webpack-dev-server --content-base ./dist", "commit": "git cz", "semantic-release": "semantic-release" }, "author": "Seb", "license": "ISC" } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From roman.hiestand at fluxim.com Thu Jun 14 11:16:12 2018 From: roman.hiestand at fluxim.com (Roman Hiestand) Date: Thu, 14 Jun 2018 17:16:12 +0200 Subject: [vtkusers] Rasterized output with vtkGL2PSExporter Message-ID: Hello Since upgrading to VTK 8.1.1 and using the OpenGL2 backend I have noticed that when exporting to vector graphics formats such as PDF and SVG using vtkGL2PSExporter a large part of the scene is rasterized. I have a 2D scene with a vtkPolyDataMapper and some axis (vtkCubeAxesActor2D), the camera is set to parallel projection. When I try to export the scene to PDF or SVG using vtkGL2PSExporter the vtkPolyData is rasterized, while the axis (including labels etc) is exported in vector graphics. I tried fiddling around with the parameters of vtkGL2PSExporter, but I wasn't able to achieve all-vector-graphics like with VTK 8.0 and (old) OpenGL backend. Has anyone a clue how to create a non-rasterized output? When debugging the code, I saw that vtkGL2PSExporter rasterizes the background, but why is the vtkPolyDataMapper considered to be background? I also tried exporting the same vtkPolyData with ParaView (5.5.1 64bit Windows) to PDF or SVG, and I have the same effect there, the polydata is rasterized. Regards Roman -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Thu Jun 14 11:16:03 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 14 Jun 2018 09:16:03 -0600 Subject: [vtkusers] vtk.js issue with the ES6 example In-Reply-To: <1528987669124-0.post@n5.nabble.com> References: <1528969131745-0.post@n5.nabble.com> <1528986759873-0.post@n5.nabble.com> <1528987669124-0.post@n5.nabble.com> Message-ID: Ok, I'll try the process from scratch to make sure we are not missing anything in the documentation. On Thu, Jun 14, 2018 at 8:47 AM smurphy wrote: > Ok I updated to 6.6. 5 (package.json below) but I still have the same > problem > as before.. > Thanks > > { > "name": "mywebproject", > "version": "1.0.0", > "description": "", > "main": "src/index.js", > "dependencies": { > "vtk.js": "^6.6.5" > }, > "devDependencies": { > "kw-web-suite": "^6.1.0" > }, > "scripts": { > "build": "webpack", > "build:release": "webpack -p", > "start": "webpack-dev-server --content-base ./dist", > "commit": "git cz", > "semantic-release": "semantic-release" > }, > "author": "Seb", > "license": "ISC" > } > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Jun 14 11:39:02 2018 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 14 Jun 2018 11:39:02 -0400 Subject: [vtkusers] Rasterized output with vtkGL2PSExporter In-Reply-To: References: Message-ID: Roman, For the new OpenGL2 backend only 2D polygon data drawn within a vtkContext2D can be exported as vector data in a PDF or SVG. This is because GL2PS uses a feature removed from recent OpenGL versions (glFeedbackBuffer). So, if exporting vector data is important to your application you'll have to port it to draw everything inside a vtkContext2D class. We are currently doing this port for the cdat. On Thu, Jun 14, 2018 at 11:16 AM Roman Hiestand wrote: > Hello > > Since upgrading to VTK 8.1.1 and using the OpenGL2 backend I have noticed > that when exporting to vector graphics formats such as PDF and SVG using > vtkGL2PSExporter a large part of the scene is rasterized. > I have a 2D scene with a vtkPolyDataMapper and some axis > (vtkCubeAxesActor2D), the camera is set to parallel projection. > When I try to export the scene to PDF or SVG using vtkGL2PSExporter the > vtkPolyData is rasterized, while the axis (including labels etc) is > exported in vector graphics. > > I tried fiddling around with the parameters of vtkGL2PSExporter, but I > wasn't able to achieve all-vector-graphics like with VTK 8.0 and (old) > OpenGL backend. > > Has anyone a clue how to create a non-rasterized output? When debugging > the code, I saw that vtkGL2PSExporter rasterizes the background, but why is > the vtkPolyDataMapper considered to be background? > > I also tried exporting the same vtkPolyData with ParaView (5.5.1 64bit > Windows) to PDF or SVG, and I have the same effect there, the polydata is > rasterized. > > Regards > Roman > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Thu Jun 14 22:36:57 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 14 Jun 2018 22:36:57 -0400 Subject: [vtkusers] reasons of limitations on opacity per component and up to 4 components in label-map volume rendering? In-Reply-To: <1528973440861-0.post@n5.nabble.com> References: <1528679386409-0.post@n5.nabble.com> <1528860138781-0.post@n5.nabble.com> <1528973440861-0.post@n5.nabble.com> Message-ID: Hi, The code you shared seems fine to me. I see the image you shared but could you please describe what we?re looking at and what we expect to see? It would help to identify the issue by removing all additional logic and minimizing the test case. Do you see the issue without the gradient opacity function and masking? Thanks, Sankhesh ? On Thu, Jun 14, 2018 at 6:50 AM terminator via vtkusers < vtkusers at public.kitware.com> wrote: > Of curse, > It's the output: > > > And this is the code: > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > #define PIC_STEP 5 > int main(int, char *[]) > { > int start = 3785, end = 4285; > std::string ctPath = "..\\CTDATA\\"; > std::string maskPath = "..\\labelmap\\"; > vtkSmartPointer ctReader = > vtkSmartPointer::New(); > vtkSmartPointer maskReader = > vtkSmartPointer::New(); > vtkImageData * ctImages; > vtkImageData * maskImages; > vtkVolume * volume; > vtkGPUVolumeRayCastMapper * vMap; > vtkVolumeProperty * vProp; > vtkPiecewiseFunction * tf[3]; > vtkColorTransferFunction * cf[3]; > > > int pic_num = start; > ctReader->SetFileName((ctPath + std::to_string(pic_num) + > ".tif").c_str()); > ctReader->Update(); > int * extents = ctReader->GetOutput()->GetExtent(); > > > vtkStdString * ctFileNames = new vtkStdString[(end - start) / > PIC_STEP + > 1]; > vtkStdString * maskFileNames = new vtkStdString[(end - start) / > PIC_STEP + > 1]; > int i = 0; > for (int pic_num = start; pic_num <= end; pic_num += PIC_STEP) { > ctFileNames[i] = ctPath + std::to_string(pic_num) + ".tif"; > maskFileNames[i] = maskPath + std::to_string(pic_num) + > ".tif"; > i++; > } > vtkStringArray * ctFileNameArr = vtkStringArray::New(); > vtkStringArray * maskFileNameArr = vtkStringArray::New(); > ctFileNameArr->SetArray(ctFileNames, (end - start) / PIC_STEP + 1, > 0); > maskFileNameArr->SetArray(maskFileNames, (end - start) / PIC_STEP > + 1, 0); > std::cout << "Slices: " << (end - start) / PIC_STEP << std::endl; > ctReader->SetDataExtent(extents[0], extents[1], extents[2], > extents[3], 0, > ((end - start) / PIC_STEP)); > ctReader->SetFileNames(ctFileNameArr); > ctReader->Update(); > ctImages = ctReader->GetOutput(); > maskReader->SetDataExtent(extents[0], extents[1], extents[2], > extents[3], > 0, ((end - start) / PIC_STEP)); > maskReader->SetFileNames(maskFileNameArr); > maskReader->SetOrientationType(ORIENTATION_LEFTBOT); > maskReader->Update(); > maskImages = maskReader->GetOutput(); > > //Opacity TF > tf[0] = vtkPiecewiseFunction::New(); > tf[0]->AddPoint(20, 0); > tf[0]->AddPoint(255, 0.2); > tf[1] = vtkPiecewiseFunction::New(); > tf[1]->AddPoint(0, 1); > tf[1]->AddPoint(255, 1); > tf[2] = vtkPiecewiseFunction::New(); > tf[2]->AddPoint(0, 0); > tf[2]->AddPoint(255, 0); > //Color TF > cf[0] = vtkColorTransferFunction::New(); > cf[0]->AddRGBPoint(0, 0, 0, 0); > cf[0]->AddRGBPoint(255, 1, 1, 1); > cf[1] = vtkColorTransferFunction::New(); > cf[1]->AddRGBPoint(0, 1, 0, 0); > cf[1]->AddRGBPoint(255, 1, 0, 0); > cf[2] = vtkColorTransferFunction::New(); > cf[2]->AddRGBPoint(0, 0, 0, 1); > cf[2]->AddRGBPoint(255, 0, 0, 1); > > vProp = vtkVolumeProperty::New(); > vProp->IndependentComponentsOn(); > vProp->SetScalarOpacity(0, tf[0]); > vProp->SetGradientOpacity(0, tf[0]); > vProp->SetScalarOpacity(1, tf[1]); > vProp->SetGradientOpacity(1, tf[1]); > vProp->SetScalarOpacity(2, tf[2]); > vProp->SetGradientOpacity(2, tf[2]); > vProp->SetColor(0, cf[0]); > vProp->SetColor(1, cf[1]); > vProp->SetColor(2, cf[2]); > > > vMap = vtkGPUVolumeRayCastMapper::New(); > vMap->SetInputData(ctImages); > vMap->SetMaskTypeToLabelMap(); > vMap->SetMaskBlendFactor(0.8); > vMap->SetMaskInput(maskImages); > > volume = vtkVolume::New(); > volume->SetMapper(vMap); > volume->SetProperty(vProp); > > vtkRenderer * render = vtkRenderer::New(); > vtkRenderWindow * renderWin = vtkRenderWindow::New(); > vtkRenderWindowInteractor * irenWin = > vtkRenderWindowInteractor::New(); > render->SetBackground(0, 0.5, 0.5); > render->AddVolume(volume); > renderWin->AddRenderer(render); > irenWin->SetRenderWindow(renderWin); > renderWin->Render(); > irenWin->Start(); > return EXIT_SUCCESS; > } > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From vjblog_info at yahoo.com Fri Jun 15 04:39:29 2018 From: vjblog_info at yahoo.com (terminator) Date: Fri, 15 Jun 2018 01:39:29 -0700 (MST) Subject: [vtkusers] reasons of limitations on opacity per component and up to 4 components in label-map volume rendering? In-Reply-To: References: <1528679386409-0.post@n5.nabble.com> <1528860138781-0.post@n5.nabble.com> <1528973440861-0.post@n5.nabble.com> Message-ID: <1529051969451-0.post@n5.nabble.com> Hi, In the image, component 1 is red, component 2 is blue and the rest of that is component 0. As you can see the left image shows partially all of the component while (scalar) opacity transfer function of component 2 is always zero. But we see partially all of components with the transfer function of component zero. Which I expected is component 2 must be invisible. In the right image, (scalar) opacity of component 0 is zero for all input values (intensity of ct image), but two other components (red and blue) must be opaque and visible, but what we see is entirely invisible volume, which means just opacity transfer function of component 0 is applied to the volume. (each tf[i] under the images shows scalar opacity transfer function for component i) > Do you see the issue without the gradient opacity function and masking? I forgot to remove gradient opacity, but it doesn't help. The problem still exists. Without masking I don't have any problem, but the point is I need masking for visualizing and controlling several components in a volume. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From felipebordeu at gmail.com Fri Jun 15 04:58:21 2018 From: felipebordeu at gmail.com (Felipe Bordeu) Date: Fri, 15 Jun 2018 10:58:21 +0200 Subject: [vtkusers] Fwd: VTK + PyQt5 + VirtualGL not working In-Reply-To: References: <92D8FCE3-EBFA-426E-8A12-F1166F8725FD@desy.de> Message-ID: Hi everyone, I can confirm this problem. I have a python 2.7 + qt4 + vtk working app on a remote server with vnc for the visualisation. But with python 3 + qt4 + vtk the same error message appears. If I test the vtk installation alone (not in a embedded qt window) I can create a visualisation in a window. Le jeu. 14 juin 2018 ? 10:00, amdelaossa a ?crit : > Dear VTK developers, > > We have an issue with our 3D visualization software which uses VTK, > through Python bindings. > Although VTK has been working with no problems with VirtualGL, > recently we have implemented a GUI for our visualization routines. > The problem appeared when we tried to use this GUI remotely through > VirtualGL. > > We get the following error message: > > ` > [VGL] NOTICE: Automatically setting VGL_CLIENT environment variable to > [VGL] 131.169.206.101, the IP address of your SSH client. > ERROR: In > /data/netapp/fla/plasma/software-max/source/VTK-git/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, > line 725 > vtkXOpenGLRenderWindow (0x2ef7b00): GLEW could not be initialized. > > Segmentation fault > ` > > The problem also appear with a much more simple program that we took from > the VTK examples: > > > This python script runs smoothly in a local computer, but it fails when > using vglrun (VirtualGL). > > This is a critical issue for us: > Our simulation data is stored in remote clusters for parallel computing, > and therefore, > it is a must to use VirtualGL to visualize the data with VTK without > needing to transfer large amounts of data to our personal computers. > > Any help or information is much appreciated. > Thanks! > > Best regards, > Alberto > > Alberto Martinez de la Ossa > Postdoc Uni. Hamburg - DESY-FLA > > Deutsches Elektronen-Synchrotron DESY > Notkestra?e 85, 22607 Hamburg > Office: 01E/O2.514 > Phone: +49 40 8998 1569 > Email: alberto.martinez.de.la.ossa at desy.de > > > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roman.hiestand at fluxim.com Fri Jun 15 05:02:43 2018 From: roman.hiestand at fluxim.com (Roman Hiestand) Date: Fri, 15 Jun 2018 11:02:43 +0200 Subject: [vtkusers] Rasterized output with vtkGL2PSExporter In-Reply-To: References: Message-ID: Dan, Thank you for the information! I assume there is no mapper from vtkPolyData to vtkContext2D? At least I didn't find one. Migrating our code to vtkContext2D would be too tedious, so for now we stick to the current solution. If we need a better SVG/PDF output, we will use either Qt or a specialized library like cairo. Regards Roman On Thu, Jun 14, 2018 at 5:39 PM, Dan Lipsa wrote: > Roman, > For the new OpenGL2 backend only 2D polygon data drawn within a > vtkContext2D can be exported as vector data in a PDF or SVG. This is > because GL2PS uses a feature removed from recent OpenGL versions > (glFeedbackBuffer). So, if exporting vector data is important to your > application you'll have to port it to draw everything inside a vtkContext2D > class. We are currently doing this port for the cdat. > > > On Thu, Jun 14, 2018 at 11:16 AM Roman Hiestand > wrote: > >> Hello >> >> Since upgrading to VTK 8.1.1 and using the OpenGL2 backend I have noticed >> that when exporting to vector graphics formats such as PDF and SVG using >> vtkGL2PSExporter a large part of the scene is rasterized. >> I have a 2D scene with a vtkPolyDataMapper and some axis >> (vtkCubeAxesActor2D), the camera is set to parallel projection. >> When I try to export the scene to PDF or SVG using vtkGL2PSExporter the >> vtkPolyData is rasterized, while the axis (including labels etc) is >> exported in vector graphics. >> >> I tried fiddling around with the parameters of vtkGL2PSExporter, but I >> wasn't able to achieve all-vector-graphics like with VTK 8.0 and (old) >> OpenGL backend. >> >> Has anyone a clue how to create a non-rasterized output? When debugging >> the code, I saw that vtkGL2PSExporter rasterizes the background, but why is >> the vtkPolyDataMapper considered to be background? >> >> I also tried exporting the same vtkPolyData with ParaView (5.5.1 64bit >> Windows) to PDF or SVG, and I have the same effect there, the polydata is >> rasterized. >> >> Regards >> Roman >> >> >> _______________________________________________ >> 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > -- Fluxim AG Roman Hiestand Katharina-Sulzer-Platz 2 8406 Winterthur Switzerland www.fluxim.com Email: roman.hiestand at fluxim.com Phone: +41 44 500 4770 Fax: +41 44 500 4779 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pty0220 at gmail.com Fri Jun 15 06:51:18 2018 From: pty0220 at gmail.com (=?utf-8?B?67CV7YOc7JiB?=) Date: Fri, 15 Jun 2018 19:51:18 +0900 Subject: [vtkusers] Convert vtkRectilineargrid to vtkimagedata or vtkUnstructuredgrid Message-ID: <26B7D5C7-1151-4E66-884C-CBAA2926FA83@gmail.com> Hi all, I would like to do volume render using my vtkRectilineargrid file Thus, I search internet and I recognized that I have to convert my vtkRectilineargird to vtkimagedata or vtkunstructuredgrid for do volume render And I tried convert using .DeepCopy(), but it isn?t work ,, So, I very appreciate if you give some tips about who can I convert vtkRectilineargird to vtkimagedata or vtkunstructuredgrid * my vtkRectilineargird has same spacing and has scalar value only on cell data I really want to solve this problem as soon as possible. Thanks, Tae Young From dan.lipsa at kitware.com Fri Jun 15 08:59:59 2018 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 15 Jun 2018 08:59:59 -0400 Subject: [vtkusers] Rasterized output with vtkGL2PSExporter In-Reply-To: References: Message-ID: Context2D should support vtkPolyData. See the following commit. commit 1469ea5dcb33d69710ed4099789ebc0fa2bcdf57 Author: Alvaro Sanchez Date: Mon Oct 17 19:00:43 2016 -0400 Added support for vtkPolyData in vtkContext2D. vtkContext2D takes a new type of item which directly draws a 2D mesh represented by a vtkPolyData object. Internally, vtkContextDevice2D makes the API calls necessary to draw the internal primitives of vtkPolyData. Added a test demonstrating the use of vtkPolyDataItem. Added interaction and batched primitives for drawing. vtkInteractiveArea derives from vtkContextArea and implements basic interaction (zoom and panning). Currently, two types of vtkPolyData primitives are supported, Lines and Polygons. Lines are batched and drawn using ContextDevice2D::DrawLines. Polygons are first decomposed into a set of triangles and then drawn using ContextDevice2D::CoreDrawTriangles. Primitives are colored per vertex. Suppressed run-time warning. Setting the current renderer in the interactor style. Removed unecessary initializations. Using defined symbolic names for scalar modes. On Fri, Jun 15, 2018 at 5:02 AM Roman Hiestand wrote: > Dan, > > Thank you for the information! I assume there is no mapper from > vtkPolyData to vtkContext2D? At least I didn't find one. > Migrating our code to vtkContext2D would be too tedious, so for now we > stick to the current solution. If we need a better SVG/PDF output, we will > use either Qt or a specialized library like cairo. > > Regards > Roman > > > On Thu, Jun 14, 2018 at 5:39 PM, Dan Lipsa wrote: > >> Roman, >> For the new OpenGL2 backend only 2D polygon data drawn within a >> vtkContext2D can be exported as vector data in a PDF or SVG. This is >> because GL2PS uses a feature removed from recent OpenGL versions >> (glFeedbackBuffer). So, if exporting vector data is important to your >> application you'll have to port it to draw everything inside a vtkContext2D >> class. We are currently doing this port for the cdat. >> >> >> On Thu, Jun 14, 2018 at 11:16 AM Roman Hiestand < >> roman.hiestand at fluxim.com> wrote: >> >>> Hello >>> >>> Since upgrading to VTK 8.1.1 and using the OpenGL2 backend I have >>> noticed that when exporting to vector graphics formats such as PDF and SVG >>> using vtkGL2PSExporter a large part of the scene is rasterized. >>> I have a 2D scene with a vtkPolyDataMapper and some axis >>> (vtkCubeAxesActor2D), the camera is set to parallel projection. >>> When I try to export the scene to PDF or SVG using vtkGL2PSExporter the >>> vtkPolyData is rasterized, while the axis (including labels etc) is >>> exported in vector graphics. >>> >>> I tried fiddling around with the parameters of vtkGL2PSExporter, but I >>> wasn't able to achieve all-vector-graphics like with VTK 8.0 and (old) >>> OpenGL backend. >>> >>> Has anyone a clue how to create a non-rasterized output? When debugging >>> the code, I saw that vtkGL2PSExporter rasterizes the background, but why is >>> the vtkPolyDataMapper considered to be background? >>> >>> I also tried exporting the same vtkPolyData with ParaView (5.5.1 64bit >>> Windows) to PDF or SVG, and I have the same effect there, the polydata is >>> rasterized. >>> >>> Regards >>> Roman >>> >>> >>> _______________________________________________ >>> 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 >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://public.kitware.com/mailman/listinfo/vtkusers >>> >> > > > -- > > Fluxim AG > Roman Hiestand > Katharina-Sulzer-Platz 2 > 8406 Winterthur > Switzerland > > > www.fluxim.com > Email: roman.hiestand at fluxim.com > Phone: +41 44 500 4770 > Fax: +41 44 500 4779 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.murphy at gmail.com Fri Jun 15 12:10:08 2018 From: sebastien.murphy at gmail.com (smurphy) Date: Fri, 15 Jun 2018 09:10:08 -0700 (MST) Subject: [vtkusers] vtk.js issue with the ES6 example In-Reply-To: References: <1528969131745-0.post@n5.nabble.com> <1528986759873-0.post@n5.nabble.com> <1528987669124-0.post@n5.nabble.com> Message-ID: <1529079008767-0.post@n5.nabble.com> Hi again, I had a naming issue with the webpack.config.js file (I had called it wepack.config.js forgetting the "b"). Stupid mistake. So the example works fine. Thanks a lot for the help, -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sur.chiranjib at gmail.com Sat Jun 16 02:41:39 2018 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Sat, 16 Jun 2018 12:11:39 +0530 Subject: [vtkusers] Convert vtkRectilineargrid to vtkimagedata or vtkUnstructuredgrid In-Reply-To: <26B7D5C7-1151-4E66-884C-CBAA2926FA83@gmail.com> References: <26B7D5C7-1151-4E66-884C-CBAA2926FA83@gmail.com> Message-ID: Normally standard conversion filter should work. Maybe, you can post your code and sample here. Thanks and regards, Chiranjib ------ Using hand held device. Sorry for the typo, if any. On Fri, Jun 15, 2018, 4:21 PM ??? wrote: > Hi all, > > I would like to do volume render using my vtkRectilineargrid file > Thus, I search internet and I recognized that I have to convert my > vtkRectilineargird to vtkimagedata or vtkunstructuredgrid > for do volume render > > > And I tried convert using .DeepCopy(), but it isn?t work ,, > So, I very appreciate if you give some tips about who can I convert > vtkRectilineargird to vtkimagedata or vtkunstructuredgrid > > > * my vtkRectilineargird has same spacing and has scalar value only on cell > data > > I really want to solve this problem as soon as possible. > > Thanks, Tae Young > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Sun Jun 17 05:44:22 2018 From: doug at beachmailing.com (scotsman60) Date: Sun, 17 Jun 2018 02:44:22 -0700 (MST) Subject: [vtkusers] Horrible performance partitioning an UnstructuredGrid into connected regions with vtkConnectivityFilter Message-ID: <1529228662737-0.post@n5.nabble.com> Hello!!! I am partitioning a single large vtkUnstructuredGrid with around 15 million Points and Cells into contiguous cell regions using the vtkConnectivityFilter. I'm using VTK 7.1 with Python 3.6.2 The filter finds around 4,700 regions quite quickly - in about 10 seconds. But then it takes almost the same amount of time to extract each region into it's own grid and add to a MultiBlockDataSet - this is my end goal at the moment. Here is the code, def extractConnectedRegions(self): start = timer() connect = vtk.vtkConnectivityFilter() connect.SetInputData(self.mesh) connect.SetExtractionModeToSpecifiedRegions() connect.ColorRegionsOn(); connect.Update() num_regions = connect.GetNumberOfExtractedRegions() end = timer() print("Extracted " + str(num_regions) + " regions in " + str(end-start) + " seconds") self.mb = vtk.vtkMultiBlockDataSet() i=0 while True: start = timer() extractGrid = vtk.vtkUnstructuredGrid() connect.AddSpecifiedRegion(i) connect.Update() extractGrid.DeepCopy(connect.GetOutput()) if extractGrid.GetNumberOfCells() <= 0: break print(i,extractGrid.GetNumberOfCells()) self.mb.SetBlock(i, extractGrid) connect.DeleteSpecifiedRegion(i) end = timer() print("Processed region " + str(i) + " in " + str(end-start) + " seconds") i+=1 return num_regions The output from this fragment is shown below, Time to add 15811239 points to vtkUnstructuredGrid - 0.19109638981581245 seconds Time to size array for 15685372 elements is 8.62148243552241e-06 seconds Time to create connectivity array for 15685372 elements is 0.6341917319162356 seconds Time to populate vtkUnstructuredGrid with 15685372 cells is 1.5787703795422896 seconds Extracted 4739 regions in 10.1558246735332 seconds 0 1 Processed region 0 in 7.074993349142119 seconds 1 1 Processed region 1 in 7.067869541369976 seconds 2 1 Processed region 2 in 6.956592478126069 seconds 3 1 Processed region 3 in 6.968502850836856 seconds I have to believe that there's a more efficient way to do this than the one I'm using, but I haven't been able to find one. Any suggestions, hints or solutions will be gratefully appreciated. Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tsilveira1993 at gmail.com Sun Jun 17 18:41:56 2018 From: tsilveira1993 at gmail.com (mafiaskafia) Date: Sun, 17 Jun 2018 15:41:56 -0700 (MST) Subject: [vtkusers] VTK rendering 2D mesh Message-ID: <1529275316164-0.post@n5.nabble.com> Hello, so i'm trying to render a 2D mesh using vtk (in python). I have a list of tuples containing all the points and also a list of tuples containing the points of each cell. Just to experiment, I tried to create a polydata object of a square with 4 elements and render it, but i ended up with this: I would like it to show the lines connecting the nodes (like a wireframe) instead of solid square.. This is the code to produce the image above: code example I would also like to know if it's possible to have a gridline as the background of the render window, instead of a black color, just like this: -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Sun Jun 17 23:19:26 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Mon, 18 Jun 2018 12:19:26 +0900 Subject: [vtkusers] VTK rendering 2D mesh In-Reply-To: <1529275316164-0.post@n5.nabble.com> References: <1529275316164-0.post@n5.nabble.com> Message-ID: Hello mafiaskafia, You can render the wireframe edges of the mesh and set color of them in the following way. --- colors = vtk.vtkNamedColors() #Create an actor MeshActor = vtk.vtkActor() MeshActor.SetMapper(MeshMapper) MeshActor.GetProperty().EdgeVisibilityOn() MeshActor.GetProperty().SetEdgeColor(colors.GetColor3d("White")) --- Best 2018-06-18 7:41 GMT+09:00 mafiaskafia : > Hello, so i'm trying to render a 2D mesh using vtk (in python). I have a list > of tuples containing all the points and also a list of tuples containing the > points of each cell. Just to experiment, I tried to create a polydata object > of a square with 4 elements and render it, but i ended up with this: > > > > I would like it to show the lines connecting the nodes (like a wireframe) > instead of solid square.. > This is the code to produce the image above: code example > > > I would also like to know if it's possible to have a gridline as the > background of the render window, instead of a black color, just like this: > > > > > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From roman.hiestand at fluxim.com Mon Jun 18 06:18:46 2018 From: roman.hiestand at fluxim.com (Roman Hiestand) Date: Mon, 18 Jun 2018 12:18:46 +0200 Subject: [vtkusers] Rasterized output with vtkGL2PSExporter In-Reply-To: References: Message-ID: I tried your suggestion, but after some testing I found that the exported SVG/PDF does not contain the vtkPolyData. I assume it is because it's not yet implemented: https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx#L1853 Another issue I am having is that I would like to draw the cells in vtkPolyData as wireframe, which does not seem to be supported directly. I could convert the cells to lines myself, however. But thanks for your tips and suggestions, I appreciate your help very much! On Fri, Jun 15, 2018 at 2:59 PM, Dan Lipsa wrote: > Context2D should support vtkPolyData. See the following commit. > > commit 1469ea5dcb33d69710ed4099789ebc0fa2bcdf57 > > Author: Alvaro Sanchez > > Date: Mon Oct 17 19:00:43 2016 -0400 > > > Added support for vtkPolyData in vtkContext2D. > > > > vtkContext2D takes a new type of item which directly draws a 2D mesh > > represented by a vtkPolyData object. Internally, vtkContextDevice2D > makes > > the API calls necessary to draw the internal primitives of > vtkPolyData. > > Added a test demonstrating the use of vtkPolyDataItem. > > > > Added interaction and batched primitives for drawing. > > > > vtkInteractiveArea derives from vtkContextArea and implements basic > interaction > > (zoom and panning). Currently, two types of vtkPolyData primitives > are supported, > > Lines and Polygons. Lines are batched and drawn using > ContextDevice2D::DrawLines. > > Polygons are first decomposed into a set of triangles and then drawn > using > > ContextDevice2D::CoreDrawTriangles. Primitives are colored per vertex. > > > > Suppressed run-time warning. > > > > Setting the current renderer in the interactor style. Removed > > unecessary initializations. > > > > Using defined symbolic names for scalar modes. > > > On Fri, Jun 15, 2018 at 5:02 AM Roman Hiestand > wrote: > >> Dan, >> >> Thank you for the information! I assume there is no mapper from >> vtkPolyData to vtkContext2D? At least I didn't find one. >> Migrating our code to vtkContext2D would be too tedious, so for now we >> stick to the current solution. If we need a better SVG/PDF output, we will >> use either Qt or a specialized library like cairo. >> >> Regards >> Roman >> >> >> On Thu, Jun 14, 2018 at 5:39 PM, Dan Lipsa wrote: >> >>> Roman, >>> For the new OpenGL2 backend only 2D polygon data drawn within a >>> vtkContext2D can be exported as vector data in a PDF or SVG. This is >>> because GL2PS uses a feature removed from recent OpenGL versions >>> (glFeedbackBuffer). So, if exporting vector data is important to your >>> application you'll have to port it to draw everything inside a vtkContext2D >>> class. We are currently doing this port for the cdat. >>> >>> >>> On Thu, Jun 14, 2018 at 11:16 AM Roman Hiestand < >>> roman.hiestand at fluxim.com> wrote: >>> >>>> Hello >>>> >>>> Since upgrading to VTK 8.1.1 and using the OpenGL2 backend I have >>>> noticed that when exporting to vector graphics formats such as PDF and SVG >>>> using vtkGL2PSExporter a large part of the scene is rasterized. >>>> I have a 2D scene with a vtkPolyDataMapper and some axis >>>> (vtkCubeAxesActor2D), the camera is set to parallel projection. >>>> When I try to export the scene to PDF or SVG using vtkGL2PSExporter the >>>> vtkPolyData is rasterized, while the axis (including labels etc) is >>>> exported in vector graphics. >>>> >>>> I tried fiddling around with the parameters of vtkGL2PSExporter, but I >>>> wasn't able to achieve all-vector-graphics like with VTK 8.0 and (old) >>>> OpenGL backend. >>>> >>>> Has anyone a clue how to create a non-rasterized output? When debugging >>>> the code, I saw that vtkGL2PSExporter rasterizes the background, but why is >>>> the vtkPolyDataMapper considered to be background? >>>> >>>> I also tried exporting the same vtkPolyData with ParaView (5.5.1 64bit >>>> Windows) to PDF or SVG, and I have the same effect there, the polydata is >>>> rasterized. >>>> >>>> Regards >>>> Roman >>>> >>>> >>>> _______________________________________________ >>>> 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 >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> https://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> >> >> >> -- >> >> Fluxim AG >> Roman Hiestand >> Katharina-Sulzer-Platz 2 >> >> 8406 Winterthur >> >> Switzerland >> >> >> >> www.fluxim.com >> Email: roman.hiestand at fluxim.com >> Phone: +41 44 500 4770 >> Fax: +41 44 500 4779 >> > -- Fluxim AG Roman Hiestand Katharina-Sulzer-Platz 2 8406 Winterthur Switzerland www.fluxim.com Email: roman.hiestand at fluxim.com Phone: +41 44 500 4770 Fax: +41 44 500 4779 -------------- next part -------------- An HTML attachment was scrubbed... URL: From polanski.slawomir at gmail.com Mon Jun 18 06:35:22 2018 From: polanski.slawomir at gmail.com (spolanski) Date: Mon, 18 Jun 2018 03:35:22 -0700 (MST) Subject: [vtkusers] Vtk Exodus Reader and Scalar Range Message-ID: <1529318122467-0.post@n5.nabble.com> Dear All, I am struggling with the example script attached. I would like to set up the scalar range for the scalar bar and mapper (I think that I need it for the mapper as well in order to plot values using correct colours). The problem is, I don't know how to get the value's data as it is not located in blocks, but in nodal arrays. Could anyone point me how to get the range of the loaded data? I was thinking about lookup table, but I am not sure how this can be done. I do appreciate any help! I am vtk newbie, so please forgive if I am wrong at any point of my post. The script file: vtkTest.py I am unable to send the .exo file because of it's size (~7mb), so I uploaded it to Google Drive LINK Slaw -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tsilveira1993 at gmail.com Mon Jun 18 06:39:54 2018 From: tsilveira1993 at gmail.com (mafiaskafia) Date: Mon, 18 Jun 2018 03:39:54 -0700 (MST) Subject: [vtkusers] VTK rendering 2D mesh In-Reply-To: References: <1529275316164-0.post@n5.nabble.com> Message-ID: <1529318394802-0.post@n5.nabble.com> Thank you, it worked like a charm! Can you also help me render a gridline behind the mesh like this: I tried looking up on google but couldn't find anything about it.. Cheers -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dan.lipsa at kitware.com Mon Jun 18 09:02:12 2018 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 18 Jun 2018 09:02:12 -0400 Subject: [vtkusers] Rasterized output with vtkGL2PSExporter In-Reply-To: References: Message-ID: Roman, Thanks for testing. Indeed, this is work in progress and we add and fix things as we move along with our port of cdat. Dan On Mon, Jun 18, 2018 at 6:18 AM Roman Hiestand wrote: > I tried your suggestion, but after some testing I found that the exported > SVG/PDF does not contain the vtkPolyData. I assume it is because it's not > yet implemented: > > > https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx#L1853 > > Another issue I am having is that I would like to draw the cells in > vtkPolyData as wireframe, which does not seem to be supported directly. I > could convert the cells to lines myself, however. > > But thanks for your tips and suggestions, I appreciate your help very much! > > > On Fri, Jun 15, 2018 at 2:59 PM, Dan Lipsa wrote: > >> Context2D should support vtkPolyData. See the following commit. >> >> commit 1469ea5dcb33d69710ed4099789ebc0fa2bcdf57 >> >> Author: Alvaro Sanchez >> >> Date: Mon Oct 17 19:00:43 2016 -0400 >> >> >> Added support for vtkPolyData in vtkContext2D. >> >> >> >> vtkContext2D takes a new type of item which directly draws a 2D mesh >> >> represented by a vtkPolyData object. Internally, vtkContextDevice2D >> makes >> >> the API calls necessary to draw the internal primitives of >> vtkPolyData. >> >> Added a test demonstrating the use of vtkPolyDataItem. >> >> >> >> Added interaction and batched primitives for drawing. >> >> >> >> vtkInteractiveArea derives from vtkContextArea and implements basic >> interaction >> >> (zoom and panning). Currently, two types of vtkPolyData primitives >> are supported, >> >> Lines and Polygons. Lines are batched and drawn using >> ContextDevice2D::DrawLines. >> >> Polygons are first decomposed into a set of triangles and then drawn >> using >> >> ContextDevice2D::CoreDrawTriangles. Primitives are colored per >> vertex. >> >> >> >> Suppressed run-time warning. >> >> >> >> Setting the current renderer in the interactor style. Removed >> >> unecessary initializations. >> >> >> >> Using defined symbolic names for scalar modes. >> >> >> On Fri, Jun 15, 2018 at 5:02 AM Roman Hiestand >> wrote: >> >>> Dan, >>> >>> Thank you for the information! I assume there is no mapper from >>> vtkPolyData to vtkContext2D? At least I didn't find one. >>> Migrating our code to vtkContext2D would be too tedious, so for now we >>> stick to the current solution. If we need a better SVG/PDF output, we will >>> use either Qt or a specialized library like cairo. >>> >>> Regards >>> Roman >>> >>> >>> On Thu, Jun 14, 2018 at 5:39 PM, Dan Lipsa >>> wrote: >>> >>>> Roman, >>>> For the new OpenGL2 backend only 2D polygon data drawn within a >>>> vtkContext2D can be exported as vector data in a PDF or SVG. This is >>>> because GL2PS uses a feature removed from recent OpenGL versions >>>> (glFeedbackBuffer). So, if exporting vector data is important to your >>>> application you'll have to port it to draw everything inside a vtkContext2D >>>> class. We are currently doing this port for the cdat. >>>> >>>> >>>> On Thu, Jun 14, 2018 at 11:16 AM Roman Hiestand < >>>> roman.hiestand at fluxim.com> wrote: >>>> >>>>> Hello >>>>> >>>>> Since upgrading to VTK 8.1.1 and using the OpenGL2 backend I have >>>>> noticed that when exporting to vector graphics formats such as PDF and SVG >>>>> using vtkGL2PSExporter a large part of the scene is rasterized. >>>>> I have a 2D scene with a vtkPolyDataMapper and some axis >>>>> (vtkCubeAxesActor2D), the camera is set to parallel projection. >>>>> When I try to export the scene to PDF or SVG using vtkGL2PSExporter >>>>> the vtkPolyData is rasterized, while the axis (including labels etc) is >>>>> exported in vector graphics. >>>>> >>>>> I tried fiddling around with the parameters of vtkGL2PSExporter, but I >>>>> wasn't able to achieve all-vector-graphics like with VTK 8.0 and (old) >>>>> OpenGL backend. >>>>> >>>>> Has anyone a clue how to create a non-rasterized output? When >>>>> debugging the code, I saw that vtkGL2PSExporter rasterizes the background, >>>>> but why is the vtkPolyDataMapper considered to be background? >>>>> >>>>> I also tried exporting the same vtkPolyData with ParaView (5.5.1 64bit >>>>> Windows) to PDF or SVG, and I have the same effect there, the polydata is >>>>> rasterized. >>>>> >>>>> Regards >>>>> Roman >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> https://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> >>> >>> >>> -- >>> >>> Fluxim AG >>> Roman Hiestand >>> Katharina-Sulzer-Platz 2 >>> >>> 8406 Winterthur >>> >>> Switzerland >>> >>> >>> >>> www.fluxim.com >>> Email: roman.hiestand at fluxim.com >>> Phone: +41 44 500 4770 >>> Fax: +41 44 500 4779 >>> >> > > > -- > > Fluxim AG > Roman Hiestand > Katharina-Sulzer-Platz 2 > 8406 Winterthur > Switzerland > > > www.fluxim.com > Email: roman.hiestand at fluxim.com > Phone: +41 44 500 4770 > Fax: +41 44 500 4779 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Jun 18 09:49:29 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 18 Jun 2018 09:49:29 -0400 Subject: [vtkusers] Rasterized output with vtkGL2PSExporter In-Reply-To: References: Message-ID: Dear Roman, As Dan mentioned improving the PDF support in Context 2D is our roadmap and we have fairly good idea on how to get there but it may take some time because we are still porting our code to OpenGL2 backend. If you need it sooner, let us know and we can talk offline. - aashish On Mon, Jun 18, 2018 at 9:02 AM Dan Lipsa wrote: > Roman, > Thanks for testing. Indeed, this is work in progress and we add and fix > things as we move along with our port of cdat. > > Dan > > > On Mon, Jun 18, 2018 at 6:18 AM Roman Hiestand > wrote: > >> I tried your suggestion, but after some testing I found that the exported >> SVG/PDF does not contain the vtkPolyData. I assume it is because it's not >> yet implemented: >> >> >> https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx#L1853 >> >> Another issue I am having is that I would like to draw the cells in >> vtkPolyData as wireframe, which does not seem to be supported directly. I >> could convert the cells to lines myself, however. >> >> But thanks for your tips and suggestions, I appreciate your help very >> much! >> >> >> On Fri, Jun 15, 2018 at 2:59 PM, Dan Lipsa wrote: >> >>> Context2D should support vtkPolyData. See the following commit. >>> >>> commit 1469ea5dcb33d69710ed4099789ebc0fa2bcdf57 >>> >>> Author: Alvaro Sanchez >>> >>> Date: Mon Oct 17 19:00:43 2016 -0400 >>> >>> >>> Added support for vtkPolyData in vtkContext2D. >>> >>> >>> >>> vtkContext2D takes a new type of item which directly draws a 2D mesh >>> >>> represented by a vtkPolyData object. Internally, vtkContextDevice2D >>> makes >>> >>> the API calls necessary to draw the internal primitives of >>> vtkPolyData. >>> >>> Added a test demonstrating the use of vtkPolyDataItem. >>> >>> >>> >>> Added interaction and batched primitives for drawing. >>> >>> >>> >>> vtkInteractiveArea derives from vtkContextArea and implements basic >>> interaction >>> >>> (zoom and panning). Currently, two types of vtkPolyData primitives >>> are supported, >>> >>> Lines and Polygons. Lines are batched and drawn using >>> ContextDevice2D::DrawLines. >>> >>> Polygons are first decomposed into a set of triangles and then >>> drawn using >>> >>> ContextDevice2D::CoreDrawTriangles. Primitives are colored per >>> vertex. >>> >>> >>> >>> Suppressed run-time warning. >>> >>> >>> >>> Setting the current renderer in the interactor style. Removed >>> >>> unecessary initializations. >>> >>> >>> >>> Using defined symbolic names for scalar modes. >>> >>> >>> On Fri, Jun 15, 2018 at 5:02 AM Roman Hiestand < >>> roman.hiestand at fluxim.com> wrote: >>> >>>> Dan, >>>> >>>> Thank you for the information! I assume there is no mapper from >>>> vtkPolyData to vtkContext2D? At least I didn't find one. >>>> Migrating our code to vtkContext2D would be too tedious, so for now we >>>> stick to the current solution. If we need a better SVG/PDF output, we will >>>> use either Qt or a specialized library like cairo. >>>> >>>> Regards >>>> Roman >>>> >>>> >>>> On Thu, Jun 14, 2018 at 5:39 PM, Dan Lipsa >>>> wrote: >>>> >>>>> Roman, >>>>> For the new OpenGL2 backend only 2D polygon data drawn within a >>>>> vtkContext2D can be exported as vector data in a PDF or SVG. This is >>>>> because GL2PS uses a feature removed from recent OpenGL versions >>>>> (glFeedbackBuffer). So, if exporting vector data is important to your >>>>> application you'll have to port it to draw everything inside a vtkContext2D >>>>> class. We are currently doing this port for the cdat. >>>>> >>>>> >>>>> On Thu, Jun 14, 2018 at 11:16 AM Roman Hiestand < >>>>> roman.hiestand at fluxim.com> wrote: >>>>> >>>>>> Hello >>>>>> >>>>>> Since upgrading to VTK 8.1.1 and using the OpenGL2 backend I have >>>>>> noticed that when exporting to vector graphics formats such as PDF and SVG >>>>>> using vtkGL2PSExporter a large part of the scene is rasterized. >>>>>> I have a 2D scene with a vtkPolyDataMapper and some axis >>>>>> (vtkCubeAxesActor2D), the camera is set to parallel projection. >>>>>> When I try to export the scene to PDF or SVG using vtkGL2PSExporter >>>>>> the vtkPolyData is rasterized, while the axis (including labels etc) is >>>>>> exported in vector graphics. >>>>>> >>>>>> I tried fiddling around with the parameters of vtkGL2PSExporter, but >>>>>> I wasn't able to achieve all-vector-graphics like with VTK 8.0 and (old) >>>>>> OpenGL backend. >>>>>> >>>>>> Has anyone a clue how to create a non-rasterized output? When >>>>>> debugging the code, I saw that vtkGL2PSExporter rasterizes the background, >>>>>> but why is the vtkPolyDataMapper considered to be background? >>>>>> >>>>>> I also tried exporting the same vtkPolyData with ParaView (5.5.1 >>>>>> 64bit Windows) to PDF or SVG, and I have the same effect there, the >>>>>> polydata is rasterized. >>>>>> >>>>>> Regards >>>>>> Roman >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> https://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> Fluxim AG >>>> Roman Hiestand >>>> Katharina-Sulzer-Platz 2 >>>> >>>> 8406 Winterthur >>>> >>>> Switzerland >>>> >>>> >>>> >>>> www.fluxim.com >>>> Email: roman.hiestand at fluxim.com >>>> Phone: +41 44 500 4770 <+41%2044%20500%2047%2070> >>>> Fax: +41 44 500 4779 <+41%2044%20500%2047%2079> >>>> >>> >> >> >> -- >> >> Fluxim AG >> Roman Hiestand >> Katharina-Sulzer-Platz 2 >> >> 8406 Winterthur >> >> Switzerland >> >> >> >> www.fluxim.com >> Email: roman.hiestand at fluxim.com >> Phone: +41 44 500 4770 <+41%2044%20500%2047%2070> >> Fax: +41 44 500 4779 <+41%2044%20500%2047%2079> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roman.hiestand at fluxim.com Mon Jun 18 10:09:38 2018 From: roman.hiestand at fluxim.com (Roman Hiestand) Date: Mon, 18 Jun 2018 16:09:38 +0200 Subject: [vtkusers] Rasterized output with vtkGL2PSExporter In-Reply-To: References: Message-ID: Aashish, Thanks for your offer. For the time being I will stay on the current solution, which is to use the vtkPolyDataMapper and GL2PS, with the drawback of the rasterized output. So you don't need to change your priorities because of me. On Mon, Jun 18, 2018 at 3:49 PM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Dear Roman, > > As Dan mentioned improving the PDF support in Context 2D is our roadmap > and we have fairly good idea on how to get there but it may take some time > because we are still porting our code to OpenGL2 backend. If you need it > sooner, let us know and we can talk offline. > > - aashish > > On Mon, Jun 18, 2018 at 9:02 AM Dan Lipsa wrote: > >> Roman, >> Thanks for testing. Indeed, this is work in progress and we add and fix >> things as we move along with our port of cdat. >> >> Dan >> >> >> On Mon, Jun 18, 2018 at 6:18 AM Roman Hiestand >> wrote: >> >>> I tried your suggestion, but after some testing I found that the >>> exported SVG/PDF does not contain the vtkPolyData. I assume it is because >>> it's not yet implemented: >>> >>> https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/ContextOpenGL2/ >>> vtkOpenGLContextDevice2D.cxx#L1853 >>> >>> Another issue I am having is that I would like to draw the cells in >>> vtkPolyData as wireframe, which does not seem to be supported directly. I >>> could convert the cells to lines myself, however. >>> >>> But thanks for your tips and suggestions, I appreciate your help very >>> much! >>> >>> >>> On Fri, Jun 15, 2018 at 2:59 PM, Dan Lipsa >>> wrote: >>> >>>> Context2D should support vtkPolyData. See the following commit. >>>> >>>> commit 1469ea5dcb33d69710ed4099789ebc0fa2bcdf57 >>>> >>>> Author: Alvaro Sanchez >>>> >>>> Date: Mon Oct 17 19:00:43 2016 -0400 >>>> >>>> >>>> Added support for vtkPolyData in vtkContext2D. >>>> >>>> >>>> >>>> vtkContext2D takes a new type of item which directly draws a 2D >>>> mesh >>>> >>>> represented by a vtkPolyData object. Internally, >>>> vtkContextDevice2D makes >>>> >>>> the API calls necessary to draw the internal primitives of >>>> vtkPolyData. >>>> >>>> Added a test demonstrating the use of vtkPolyDataItem. >>>> >>>> >>>> >>>> Added interaction and batched primitives for drawing. >>>> >>>> >>>> >>>> vtkInteractiveArea derives from vtkContextArea and implements >>>> basic interaction >>>> >>>> (zoom and panning). Currently, two types of vtkPolyData primitives >>>> are supported, >>>> >>>> Lines and Polygons. Lines are batched and drawn using >>>> ContextDevice2D::DrawLines. >>>> >>>> Polygons are first decomposed into a set of triangles and then >>>> drawn using >>>> >>>> ContextDevice2D::CoreDrawTriangles. Primitives are colored per >>>> vertex. >>>> >>>> >>>> >>>> Suppressed run-time warning. >>>> >>>> >>>> >>>> Setting the current renderer in the interactor style. Removed >>>> >>>> unecessary initializations. >>>> >>>> >>>> >>>> Using defined symbolic names for scalar modes. >>>> >>>> >>>> On Fri, Jun 15, 2018 at 5:02 AM Roman Hiestand < >>>> roman.hiestand at fluxim.com> wrote: >>>> >>>>> Dan, >>>>> >>>>> Thank you for the information! I assume there is no mapper from >>>>> vtkPolyData to vtkContext2D? At least I didn't find one. >>>>> Migrating our code to vtkContext2D would be too tedious, so for now we >>>>> stick to the current solution. If we need a better SVG/PDF output, we will >>>>> use either Qt or a specialized library like cairo. >>>>> >>>>> Regards >>>>> Roman >>>>> >>>>> >>>>> On Thu, Jun 14, 2018 at 5:39 PM, Dan Lipsa >>>>> wrote: >>>>> >>>>>> Roman, >>>>>> For the new OpenGL2 backend only 2D polygon data drawn within a >>>>>> vtkContext2D can be exported as vector data in a PDF or SVG. This is >>>>>> because GL2PS uses a feature removed from recent OpenGL versions >>>>>> (glFeedbackBuffer). So, if exporting vector data is important to your >>>>>> application you'll have to port it to draw everything inside a vtkContext2D >>>>>> class. We are currently doing this port for the cdat. >>>>>> >>>>>> >>>>>> On Thu, Jun 14, 2018 at 11:16 AM Roman Hiestand < >>>>>> roman.hiestand at fluxim.com> wrote: >>>>>> >>>>>>> Hello >>>>>>> >>>>>>> Since upgrading to VTK 8.1.1 and using the OpenGL2 backend I have >>>>>>> noticed that when exporting to vector graphics formats such as PDF and SVG >>>>>>> using vtkGL2PSExporter a large part of the scene is rasterized. >>>>>>> I have a 2D scene with a vtkPolyDataMapper and some axis >>>>>>> (vtkCubeAxesActor2D), the camera is set to parallel projection. >>>>>>> When I try to export the scene to PDF or SVG using vtkGL2PSExporter >>>>>>> the vtkPolyData is rasterized, while the axis (including labels etc) is >>>>>>> exported in vector graphics. >>>>>>> >>>>>>> I tried fiddling around with the parameters of vtkGL2PSExporter, but >>>>>>> I wasn't able to achieve all-vector-graphics like with VTK 8.0 and (old) >>>>>>> OpenGL backend. >>>>>>> >>>>>>> Has anyone a clue how to create a non-rasterized output? When >>>>>>> debugging the code, I saw that vtkGL2PSExporter rasterizes the background, >>>>>>> but why is the vtkPolyDataMapper considered to be background? >>>>>>> >>>>>>> I also tried exporting the same vtkPolyData with ParaView (5.5.1 >>>>>>> 64bit Windows) to PDF or SVG, and I have the same effect there, the >>>>>>> polydata is rasterized. >>>>>>> >>>>>>> Regards >>>>>>> Roman >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> https://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> Fluxim AG >>>>> Roman Hiestand >>>>> Katharina-Sulzer-Platz 2 >>>>> >>>>> 8406 Winterthur >>>>> >>>>> Switzerland >>>>> >>>>> >>>>> >>>>> www.fluxim.com >>>>> Email: roman.hiestand at fluxim.com >>>>> Phone: +41 44 500 4770 <+41%2044%20500%2047%2070> >>>>> Fax: +41 44 500 4779 <+41%2044%20500%2047%2079> >>>>> >>>> >>> >>> >>> -- >>> >>> Fluxim AG >>> Roman Hiestand >>> Katharina-Sulzer-Platz 2 >>> >>> 8406 Winterthur >>> >>> Switzerland >>> >>> >>> >>> www.fluxim.com >>> Email: roman.hiestand at fluxim.com >>> Phone: +41 44 500 4770 <+41%2044%20500%2047%2070> >>> Fax: +41 44 500 4779 <+41%2044%20500%2047%2079> >>> >> -- Fluxim AG Roman Hiestand Katharina-Sulzer-Platz 2 8406 Winterthur Switzerland www.fluxim.com Email: roman.hiestand at fluxim.com Phone: +41 44 500 4770 Fax: +41 44 500 4779 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Mon Jun 18 11:22:22 2018 From: ochampao at hotmail.com (ochampao) Date: Mon, 18 Jun 2018 08:22:22 -0700 (MST) Subject: [vtkusers] Callback method to handle LeftButtonPressEvent + 'keyboard char-key pressed' Message-ID: <1529335342450-0.post@n5.nabble.com> Hi vtkUsers, In my code I have a callback function invoked when the vtkCommand::LeftButtonPressEvent event is emitted. Inside the callback, I would like to check if also a specific keyboard button is pressed. When I try to access the button being pressed via vtkRenderWindowInteractor::GetKeySym(), I get the following error: "Debug Assertion Failed! Program: ....MSVCP140D.dll, File: ...\xstring: Line 1181, Expression: invalid pointer". How can I correctly implement this behaviour? Here is a minimal callback method that causes the error: // ======================== void MyLeftMousePressedCallback( vtkObject* caller, long unsigned int vtkNotUsed(eventId), void* vtkNotUsed(clientData), void* vtkNotUsed(callData)) { vtkRenderWindowInteractor *iren = static_cast(caller); std::string key = iren->GetKeySym(); if ((key == "C") || (key == "c")) std::cout << "Do something if LeftMouseButton + C-key is pressed"; } // ======================== and this is how the callback is registered: // ========================= vtkNew cbk; cbk->SetCallback(MyLeftMousePressedCallback); renderWindowInteractor->AddObserver( vtkCommand::LeftButtonPressEvent, cbk); // ========================= I have also tried extending vtkInteractorStyleImage and re-implementing the virtual method OnLeftButtonDown(), but I get the same error when using this->Interactor->GetKeySym(). In both cases, if GetKeySym() is replaced with GetKeyCode(), the returned value is always '\0'. Interestingly, using GetControlKey() works. Thanks for your help, Panos. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Mon Jun 18 16:06:53 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 18 Jun 2018 14:06:53 -0600 Subject: [vtkusers] Callback method to handle LeftButtonPressEvent + 'keyboard char-key pressed' In-Reply-To: <1529335342450-0.post@n5.nabble.com> References: <1529335342450-0.post@n5.nabble.com> Message-ID: Hi Panos, The GetKeySym() and GetKeyCode() methods are only valid within Key event callbacks. If you need to know what key is held down, then you must also bind your callback to KeyPressEvent and KeyReleaseEvent. Then whenever there is a KeyPress, you can store the key that was pressed in a variable, and in KeyReleaseEvent, you can clear it. Modifier keys (Ctrl, Shift, etc) are stored in a bitfield where each bit represents a different key, but it's only the modifier keys that are handled this way. - David On Mon, Jun 18, 2018 at 9:22 AM, ochampao wrote: > Hi vtkUsers, > > In my code I have a callback function invoked when the > vtkCommand::LeftButtonPressEvent event is emitted. Inside the callback, I > would like to check if also a specific keyboard button is pressed. When I > try to access the button being pressed via > vtkRenderWindowInteractor::GetKeySym(), I get the following error: > > "Debug Assertion Failed! Program: ....MSVCP140D.dll, File: ...\xstring: > Line > 1181, Expression: invalid pointer". > > How can I correctly implement this behaviour? > > > Here is a minimal callback method that causes the error: > > // ======================== > void MyLeftMousePressedCallback( > vtkObject* caller, > long unsigned int vtkNotUsed(eventId), > void* vtkNotUsed(clientData), > void* vtkNotUsed(callData)) > { > vtkRenderWindowInteractor *iren = > static_cast(caller); > > std::string key = iren->GetKeySym(); > > if ((key == "C") || (key == "c")) > std::cout << "Do something if LeftMouseButton + C-key is > pressed"; > } > // ======================== > > and this is how the callback is registered: > > // ========================= > vtkNew cbk; > cbk->SetCallback(MyLeftMousePressedCallback); > renderWindowInteractor->AddObserver( > vtkCommand::LeftButtonPressEvent, cbk); > // ========================= > > I have also tried extending vtkInteractorStyleImage and re-implementing the > virtual method OnLeftButtonDown(), but I get the same error when using > this->Interactor->GetKeySym(). In both cases, if GetKeySym() is replaced > with GetKeyCode(), the returned value is always '\0'. Interestingly, using > GetControlKey() works. > > Thanks for your help, > Panos. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilindsay at insigniamedical.co.uk Tue Jun 19 06:33:08 2018 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 19 Jun 2018 03:33:08 -0700 (MST) Subject: [vtkusers] vtkGPUInfoList does not work with OpenGL2 In-Reply-To: References: Message-ID: <1529404388064-0.post@n5.nabble.com> We have had reasonable success with including the vtkDirectXGPUInfoList.cxx and .h files from the OpenGL directory in our project, then instantiating the class directly. You will need the DirectX SDK installed (as you would have needed to with the original implementation). Note that this also affects the resampling code that deals with textures larger than the GPU can handle in vtkSmartVolumeMapper/vtkGPUVolumeRayCastMapper::GetReductionRatio which we have had to do our own implementation of as the OpenGL2 implementation is currently a stub that returns a ratio of 1. Hopefully it will get re-instated properly at some stage if enough people ask for it. Our current solution is a bit too hacky to submit as a proper change. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From coyarzunlaura at googlemail.com Tue Jun 19 08:36:44 2018 From: coyarzunlaura at googlemail.com (Cristina Oyarzun) Date: Tue, 19 Jun 2018 14:36:44 +0200 Subject: [vtkusers] Deadline extended!! MICCAI CLIP 2018 Workshop on Clinical Image-based Procedures: Translational Research in Medical Imaging Message-ID: CALL FOR PAPERS MICCAI 2018 Workshop on Clinical Image-based Procedures: Translational Research in Medical Imaging September 16, 2018 Granada, Spain Website:http://miccai-clip.org/ ============================== ========================================== SCOPE The outstanding proliferation of medical image applications has created a need for greater study and scrutiny of the clinical application and validation of such methods. New strategies are essential to ensure a smooth and effective translation of computational image-based techniques into the clinic. For these reasons CLIP 2018?s major focus is on translational research filling the gaps between basic science and clinical applications. A highlight of the workshop is the subject of strategies for personalized medicine to enhance diagnosis, treatment and interventions. Authors are encouraged to submit work centered on specific clinical applications, including techniques and procedures based on comprehensive clinical image data. Submissions related to applications already in use and evaluated by clinical users are particularly encouraged. The event will bring together world-class specialists to present ways to strengthen links between computer scientists and engineers, and clinicians. TOPICS *Strategies for patient-specific and anatomical modeling to support planning and interventions *Clinical studies employing advanced image-guided methods *Clinical translation and validation of image-guided systems *Current challenges and emerging techniques in image-based procedures *Identification of parameters and error analysis in image-based procedures *Multimodal image integration for modeling, planning and guidance *Clinical applications in open and minimally invasive procedures PAPER SUBMISSION Papers will be limited to ten pages following the MICCAI submission guidelines. Prospective authors should refer to the Paper Submission section on the workshop website for details on how to submit papers to be presented at the workshop. All submissions will be peer-reviewed by at least 2 members of the program committee. The selection of the papers will be based on the significance of results, novelty, technical merit, relevance and clarity of presentation. Papers will be presented in a day long single track workshop starting with plenary sessions. Accepted papers will be published as a proceedings volume in the Springer Lecture Notes in Computer Science (LNCS) series after the workshop. WORKSHOP FORMAT Accepted papers will be presented in a day long single track workshop. The final program will consist of invited speakers and original papers with time allocated for discussions. Electronic proceedings will be arranged for all of the papers presented at the workshop. IMPORTANT DATES * June 25, 2018: Paper submission due date * tbd: Notification of acceptance * tbd: Final camera-ready paper submission deadline CONTACT Inquires about the workshop should be sent to the Information Desk ( info at miccai-clip.org). ORGANIZERS (in alphabetical order) -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaba.pinter at queensu.ca Tue Jun 19 08:50:23 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Tue, 19 Jun 2018 12:50:23 +0000 Subject: [vtkusers] vtkGPUInfoList does not work with OpenGL2 In-Reply-To: <1529404388064-0.post@n5.nabble.com> References: <1529404388064-0.post@n5.nabble.com> Message-ID: We need a platform-independent solution, so I cannot use the DirectX one directly, but I'll give this some thought. Thanks for the reply, I appreciate the information! -----Original Message----- From: vtkusers On Behalf Of ianl Sent: Tuesday, June 19, 2018 06:33 To: vtkusers at vtk.org Subject: Re: [vtkusers] vtkGPUInfoList does not work with OpenGL2 We have had reasonable success with including the vtkDirectXGPUInfoList.cxx and .h files from the OpenGL directory in our project, then instantiating the class directly. You will need the DirectX SDK installed (as you would have needed to with the original implementation). Note that this also affects the resampling code that deals with textures larger than the GPU can handle in vtkSmartVolumeMapper/vtkGPUVolumeRayCastMapper::GetReductionRatio which we have had to do our own implementation of as the OpenGL2 implementation is currently a stub that returns a ratio of 1. Hopefully it will get re-instated properly at some stage if enough people ask for it. Our current solution is a bit too hacky to submit as a proper change. -- Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C54e2b19ee1d549caac9208d5d5d00ef8%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636650011943203788&sdata=iRf4j0hNvMOVIMN0UTuJ62T2Qrlh3us%2FYogfl5O6Wb4%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C54e2b19ee1d549caac9208d5d5d00ef8%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636650011943203788&sdata=4UxhT27YmZsPrzAXcBezaE%2FhXxNCyZjVwDGbGaCpTus%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C54e2b19ee1d549caac9208d5d5d00ef8%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636650011943203788&sdata=hOth4DoHSm9ViDVWJI2AqM9xgdO7ZW3AQtDI%2FoAbX8Q%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C54e2b19ee1d549caac9208d5d5d00ef8%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636650011943203788&sdata=F7KAQe3YgILs9jLFjUKGl%2Fw7Djyoc5a4IBwDVNLPooI%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C54e2b19ee1d549caac9208d5d5d00ef8%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636650011943213797&sdata=NFNf52qIaDX0tEqfLSIdp8vEPna7WmRf0qvOTFO3Ebw%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C54e2b19ee1d549caac9208d5d5d00ef8%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636650011943213797&sdata=3JBvSKIjyIoUrMTTGmpxyhI7kotZmSrZGWpn3XS7c10%3D&reserved=0 From sebastien.murphy at gmail.com Tue Jun 19 09:56:38 2018 From: sebastien.murphy at gmail.com (smurphy) Date: Tue, 19 Jun 2018 06:56:38 -0700 (MST) Subject: [vtkusers] set name to actor and display it with mouse hover Message-ID: <1529416598905-0.post@n5.nabble.com> Hello, I would like to assign names to individual actors and that the actor name gets displayed temporarily when the mouse is hovered over it. The closest example I could find is this one: https://www.vtk.org/Wiki/VTK/Examples/Python/Interaction/HighlightAPickedActor Instead of clicking and the sphere turning red, I would like for a text to be displayed next to the mouse (e.g "this is sphere number 1"). Ideally when hovering, but on click is also fine. Is this, or something equivalent, possible in vtk? (I would later also try it in vtk.js) Thanks, Sebastien -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From elvis.stansvik at orexplore.com Tue Jun 19 10:20:33 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 19 Jun 2018 16:20:33 +0200 Subject: [vtkusers] QVTKOpenGLWidget - update() or GetRenderWindow()->Render() Message-ID: Hi all, I was looking over calls to Render() in our application, trying to replace them with update() which I think is a "nicer" way of requesting a re-render (?). But it seems to not be a drop-in replacements since it seems sometimes update() doesn't cause a re-render (not even when control returns to the event loop). So then I looked again at the docs for QVTKOpenGLWidget, and they say: "An alternative is to call update() on the widget instance to trigger a render once the context gets validated" It was this that sort of guided me to try to use update() instead of Render(). But then I found e.g. this commit: " https://gitlab.kitware.com/vtk/vtk/commit/4c77c46025e737ad66e0b797a759e73d81c9f240 " The commit message says: "QVTKOpenGLWidget now relies on VTK applications calling `Render` on the window when data or rendering has changed.". So now I'm a little confused: What is the correct way to request a re-render once control returns to the event loop? Or must we always call Render()? I'm talking now about the QVTKOpenGLWidget that is in 8.1.1, not the new one that is in master (though I guess the best practice should be the same for the two?). Many thanks in advance, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Tue Jun 19 10:22:00 2018 From: ochampao at hotmail.com (ochampao) Date: Tue, 19 Jun 2018 07:22:00 -0700 (MST) Subject: [vtkusers] Callback method to handle LeftButtonPressEvent + 'keyboard char-key pressed' In-Reply-To: References: <1529335342450-0.post@n5.nabble.com> Message-ID: <1529418120409-0.post@n5.nabble.com> Hi David, Thanks a lot for your reply. I suspected that those methods were valid within KeyPress events only. It works now. P. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From utkarsh.ayachit at kitware.com Tue Jun 19 10:38:08 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 19 Jun 2018 10:38:08 -0400 Subject: [vtkusers] QVTKOpenGLWidget - update() or GetRenderWindow()->Render() In-Reply-To: References: Message-ID: Elvis, The best practice is indeed to call Render() when data has changed. While making QVTKOpenGLWidget (which is called QVTKOpenGLSimpleWidget in master) do a `RenderWindow::Render` in paint may seem like a good behavior (as we indeed did initially), it so happens that the paint gets called way too frequently e.g. if a tooltip or a menu pops up. Doing these potentially expensive renders in each `paint` is not necessary since QVTKOpenGLWidget caches the last rendered image and can simply `blit` it to the active frame buffer to satisfy Qt. Hence we opted to let the application decide when scene has truly changed and call Render explicitly to indicate that. Hope that clarifies things. Utkarsh On Tue, Jun 19, 2018 at 10:20 AM Elvis Stansvik wrote: > > Hi all, > > I was looking over calls to Render() in our application, trying to replace them with update() which I think is a "nicer" way of requesting a re-render (?). > > But it seems to not be a drop-in replacements since it seems sometimes update() doesn't cause a re-render (not even when control returns to the event loop). > > So then I looked again at the docs for QVTKOpenGLWidget, and they say: > > "An alternative is to call update() on the widget instance to trigger a render once the context gets validated" > > It was this that sort of guided me to try to use update() instead of Render(). > > But then I found e.g. this commit: > > "https://gitlab.kitware.com/vtk/vtk/commit/4c77c46025e737ad66e0b797a759e73d81c9f240" > > The commit message says: "QVTKOpenGLWidget now relies on VTK applications calling `Render` on the window when data or rendering has changed.". > > So now I'm a little confused: What is the correct way to request a re-render once control returns to the event loop? Or must we always call Render()? > > I'm talking now about the QVTKOpenGLWidget that is in 8.1.1, not the new one that is in master (though I guess the best practice should be the same for the two?). > > Many thanks in advance, > Elvis > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From rabysam28 at gmail.com Tue Jun 19 11:18:25 2018 From: rabysam28 at gmail.com (Sam Raby) Date: Tue, 19 Jun 2018 08:18:25 -0700 Subject: [vtkusers] VTK for PCL Message-ID: Hello, In order to use VTK in PCL, is there any flag that I need to enable in cmake during the complication of VTK library? Right now when I compile a PCL sample code I am getting the following error: *error: 'class vtkMapper' has no member named 'ImmediateModeRenderingOn'* *actor->GetMapper ()->ImmediateModeRenderingOn ();* Thanks S -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Tue Jun 19 11:32:27 2018 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 19 Jun 2018 15:32:27 +0000 Subject: [vtkusers] QVTKOpenGLWidget - update() or GetRenderWindow()->Render() In-Reply-To: References: Message-ID: You can use CTK's ctkVTKAbstractView class to handle this. It has scheduleRender method, which you call any time something might have changed in your pipeline. Actual rendering will not happen more frequently than the specified maximumUpdateRate. https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.h#L77 Andras -----Original Message----- From: vtkusers On Behalf Of Utkarsh Ayachit Sent: Tuesday, June 19, 2018 10:38 AM To: Elvis Stansvik Cc: vtk Subject: Re: [vtkusers] QVTKOpenGLWidget - update() or GetRenderWindow()->Render() Elvis, The best practice is indeed to call Render() when data has changed. While making QVTKOpenGLWidget (which is called QVTKOpenGLSimpleWidget in master) do a `RenderWindow::Render` in paint may seem like a good behavior (as we indeed did initially), it so happens that the paint gets called way too frequently e.g. if a tooltip or a menu pops up. Doing these potentially expensive renders in each `paint` is not necessary since QVTKOpenGLWidget caches the last rendered image and can simply `blit` it to the active frame buffer to satisfy Qt. Hence we opted to let the application decide when scene has truly changed and call Render explicitly to indicate that. Hope that clarifies things. Utkarsh On Tue, Jun 19, 2018 at 10:20 AM Elvis Stansvik wrote: > > Hi all, > > I was looking over calls to Render() in our application, trying to replace them with update() which I think is a "nicer" way of requesting a re-render (?). > > But it seems to not be a drop-in replacements since it seems sometimes update() doesn't cause a re-render (not even when control returns to the event loop). > > So then I looked again at the docs for QVTKOpenGLWidget, and they say: > > "An alternative is to call update() on the widget instance to trigger a render once the context gets validated" > > It was this that sort of guided me to try to use update() instead of Render(). > > But then I found e.g. this commit: > > "https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fvtk%2Fvtk%2Fcommit%2F4c77c46025e737ad66e0b797a759e73d81c9f240&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=8m7aw0XcHhoXg5h%2BH%2FnywEEfXlSKd04Fc3%2F2wKRcaRc%3D&reserved=0" > > The commit message says: "QVTKOpenGLWidget now relies on VTK applications calling `Render` on the window when data or rendering has changed.". > > So now I'm a little confused: What is the correct way to request a re-render once control returns to the event loop? Or must we always call Render()? > > I'm talking now about the QVTKOpenGLWidget that is in 8.1.1, not the new one that is in master (though I guess the best practice should be the same for the two?). > > Many thanks in advance, > Elvis > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > a=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd6 > 1ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=NuXp > HHrNM9ouQUfibQdvb%2FvdHXbDdJt2gUMbKCwoQhU%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queens > u.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636650159330792727&sdata=Xppm3uezu3nyaA9rf5IxxDqLMBeyBb > 6nIrt%2FForVoBs%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57e > e44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636 > 650159330792727&sdata=hhRnwdAr4eTN5Tidn%2FhjGoDj9REIazlvfVgW3V8uAPs%3D > &reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C > 2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C > 1%7C0%7C636650159330792727&sdata=xChSvX1Q%2BjBODVNNLWtCkFaoEdhSR1KeRIi > MBCM%2Bm%2Bo%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpubli > c.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40q > ueensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb > 2838b925c%7C1%7C0%7C636650159330792727&sdata=vjwoMbm%2BOqCgp4O%2F7h%2F > JqtvqoSZWx%2FQwpot6Gqs%2BLiE%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=NuXpHHrNM9ouQUfibQdvb%2FvdHXbDdJt2gUMbKCwoQhU%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=Xppm3uezu3nyaA9rf5IxxDqLMBeyBb6nIrt%2FForVoBs%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=hhRnwdAr4eTN5Tidn%2FhjGoDj9REIazlvfVgW3V8uAPs%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=xChSvX1Q%2BjBODVNNLWtCkFaoEdhSR1KeRIiMBCM%2Bm%2Bo%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=vjwoMbm%2BOqCgp4O%2F7h%2FJqtvqoSZWx%2FQwpot6Gqs%2BLiE%3D&reserved=0 From elvis.stansvik at orexplore.com Tue Jun 19 11:51:11 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 19 Jun 2018 17:51:11 +0200 Subject: [vtkusers] QVTKOpenGLWidget - update() or GetRenderWindow()->Render() In-Reply-To: References: Message-ID: Aha, thank you both for the clarification/tip. I had hoped that there was a way in VTK to request a re-render to occur once control returns to the Qt event loop, instead of the immediate Render(). That way an application could afford to be "sloppy" and request a re-render multiple times during the processing of a single event, but it would in the end only result in a single re-render. The ITK help class I guess could help here, but I'm always weary of bringing in additional dependencies. Thanks for the tip though, we may end up using it. My endeavour was not to solve any identified problems in our app. I just wrongly though that calling Render was discouraged in favor of update(), so was wondering why it didn't work. I may go with the do nothing approach now that I know that Render is not bad per se. Elvis Den tis 19 juni 2018 17:32Andras Lasso skrev: > You can use CTK's ctkVTKAbstractView class to handle this. It has > scheduleRender method, which you call any time something might have changed > in your pipeline. Actual rendering will not happen more frequently than the > specified maximumUpdateRate. > > > https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.h#L77 > > Andras > > -----Original Message----- > From: vtkusers On Behalf Of Utkarsh > Ayachit > Sent: Tuesday, June 19, 2018 10:38 AM > To: Elvis Stansvik > Cc: vtk > Subject: Re: [vtkusers] QVTKOpenGLWidget - update() or > GetRenderWindow()->Render() > > Elvis, > > The best practice is indeed to call Render() when data has changed. > While making QVTKOpenGLWidget (which is called QVTKOpenGLSimpleWidget in > master) do a `RenderWindow::Render` in paint may seem like a good behavior > (as we indeed did initially), it so happens that the paint gets called way > too frequently e.g. if a tooltip or a menu pops up. > Doing these potentially expensive renders in each `paint` is not necessary > since QVTKOpenGLWidget caches the last rendered image and can simply `blit` > it to the active frame buffer to satisfy Qt. Hence we opted to let the > application decide when scene has truly changed and call Render explicitly > to indicate that. > > Hope that clarifies things. > > Utkarsh > On Tue, Jun 19, 2018 at 10:20 AM Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > > > > Hi all, > > > > I was looking over calls to Render() in our application, trying to > replace them with update() which I think is a "nicer" way of requesting a > re-render (?). > > > > But it seems to not be a drop-in replacements since it seems sometimes > update() doesn't cause a re-render (not even when control returns to the > event loop). > > > > So then I looked again at the docs for QVTKOpenGLWidget, and they say: > > > > "An alternative is to call update() on the widget instance to > trigger a render once the context gets validated" > > > > It was this that sort of guided me to try to use update() instead of > Render(). > > > > But then I found e.g. this commit: > > > > " > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fvtk%2Fvtk%2Fcommit%2F4c77c46025e737ad66e0b797a759e73d81c9f240&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=8m7aw0XcHhoXg5h%2BH%2FnywEEfXlSKd04Fc3%2F2wKRcaRc%3D&reserved=0 > " > > > > The commit message says: "QVTKOpenGLWidget now relies on VTK > applications calling `Render` on the window when data or rendering has > changed.". > > > > So now I'm a little confused: What is the correct way to request a > re-render once control returns to the event loop? Or must we always call > Render()? > > > > I'm talking now about the QVTKOpenGLWidget that is in 8.1.1, not the new > one that is in master (though I guess the best practice should be the same > for the two?). > > > > Many thanks in advance, > > Elvis > > _______________________________________________ > > Powered by > > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > > a=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd6 > > 1ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=NuXp > > HHrNM9ouQUfibQdvb%2FvdHXbDdJt2gUMbKCwoQhU%3D&reserved=0 > > > > Visit other Kitware open-source projects at > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queens > > u.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b > > 925c%7C1%7C0%7C636650159330792727&sdata=Xppm3uezu3nyaA9rf5IxxDqLMBeyBb > > 6nIrt%2FForVoBs%3D&reserved=0 > > > > Please keep messages on-topic and check the VTK FAQ at: > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57e > > e44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636 > > 650159330792727&sdata=hhRnwdAr4eTN5Tidn%2FhjGoDj9REIazlvfVgW3V8uAPs%3D > > &reserved=0 > > > > Search the list archives at: > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C > > 2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C > > 1%7C0%7C636650159330792727&sdata=xChSvX1Q%2BjBODVNNLWtCkFaoEdhSR1KeRIi > > MBCM%2Bm%2Bo%3D&reserved=0 > > > > Follow this link to subscribe/unsubscribe: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpubli > > c.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40q > > ueensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb > > 2838b925c%7C1%7C0%7C636650159330792727&sdata=vjwoMbm%2BOqCgp4O%2F7h%2F > > JqtvqoSZWx%2FQwpot6Gqs%2BLiE%3D&reserved=0 > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=NuXpHHrNM9ouQUfibQdvb%2FvdHXbDdJt2gUMbKCwoQhU%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=Xppm3uezu3nyaA9rf5IxxDqLMBeyBb6nIrt%2FForVoBs%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=hhRnwdAr4eTN5Tidn%2FhjGoDj9REIazlvfVgW3V8uAPs%3D&reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=xChSvX1Q%2BjBODVNNLWtCkFaoEdhSR1KeRIiMBCM%2Bm%2Bo%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=vjwoMbm%2BOqCgp4O%2F7h%2FJqtvqoSZWx%2FQwpot6Gqs%2BLiE%3D&reserved=0 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Jun 19 11:52:51 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 19 Jun 2018 17:52:51 +0200 Subject: [vtkusers] QVTKOpenGLWidget - update() or GetRenderWindow()->Render() In-Reply-To: References: Message-ID: Den tis 19 juni 2018 17:51Elvis Stansvik skrev: > Aha, thank you both for the clarification/tip. > > I had hoped that there was a way in VTK to request a re-render to occur > once control returns to the Qt event loop, instead of the immediate > Render(). > > That way an application could afford to be "sloppy" and request a > re-render multiple times during the processing of a single event, but it > would in the end only result in a single re-render. > > The ITK help class I guess could help > *CTK Elvis here, but I'm always weary of bringing in additional dependencies. Thanks > for the tip though, we may end up using it. > > My endeavour was not to solve any identified problems in our app. I just > wrongly though that calling Render was discouraged in favor of update(), so > was wondering why it didn't work. > > I may go with the do nothing approach now that I know that Render is not > bad per se. > > Elvis > > Den tis 19 juni 2018 17:32Andras Lasso skrev: > >> You can use CTK's ctkVTKAbstractView class to handle this. It has >> scheduleRender method, which you call any time something might have changed >> in your pipeline. Actual rendering will not happen more frequently than the >> specified maximumUpdateRate. >> >> >> https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.h#L77 >> >> Andras >> >> -----Original Message----- >> From: vtkusers On Behalf Of >> Utkarsh Ayachit >> Sent: Tuesday, June 19, 2018 10:38 AM >> To: Elvis Stansvik >> Cc: vtk >> Subject: Re: [vtkusers] QVTKOpenGLWidget - update() or >> GetRenderWindow()->Render() >> >> Elvis, >> >> The best practice is indeed to call Render() when data has changed. >> While making QVTKOpenGLWidget (which is called QVTKOpenGLSimpleWidget in >> master) do a `RenderWindow::Render` in paint may seem like a good behavior >> (as we indeed did initially), it so happens that the paint gets called way >> too frequently e.g. if a tooltip or a menu pops up. >> Doing these potentially expensive renders in each `paint` is not >> necessary since QVTKOpenGLWidget caches the last rendered image and can >> simply `blit` it to the active frame buffer to satisfy Qt. Hence we opted >> to let the application decide when scene has truly changed and call Render >> explicitly to indicate that. >> >> Hope that clarifies things. >> >> Utkarsh >> On Tue, Jun 19, 2018 at 10:20 AM Elvis Stansvik < >> elvis.stansvik at orexplore.com> wrote: >> > >> > Hi all, >> > >> > I was looking over calls to Render() in our application, trying to >> replace them with update() which I think is a "nicer" way of requesting a >> re-render (?). >> > >> > But it seems to not be a drop-in replacements since it seems sometimes >> update() doesn't cause a re-render (not even when control returns to the >> event loop). >> > >> > So then I looked again at the docs for QVTKOpenGLWidget, and they say: >> > >> > "An alternative is to call update() on the widget instance to >> trigger a render once the context gets validated" >> > >> > It was this that sort of guided me to try to use update() instead of >> Render(). >> > >> > But then I found e.g. this commit: >> > >> > " >> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fvtk%2Fvtk%2Fcommit%2F4c77c46025e737ad66e0b797a759e73d81c9f240&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=8m7aw0XcHhoXg5h%2BH%2FnywEEfXlSKd04Fc3%2F2wKRcaRc%3D&reserved=0 >> " >> > >> > The commit message says: "QVTKOpenGLWidget now relies on VTK >> applications calling `Render` on the window when data or rendering has >> changed.". >> > >> > So now I'm a little confused: What is the correct way to request a >> re-render once control returns to the event loop? Or must we always call >> Render()? >> > >> > I'm talking now about the QVTKOpenGLWidget that is in 8.1.1, not the >> new one that is in master (though I guess the best practice should be the >> same for the two?). >> > >> > Many thanks in advance, >> > Elvis >> > _______________________________________________ >> > Powered by >> > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat >> > a=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd6 >> > 1ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=NuXp >> > HHrNM9ouQUfibQdvb%2FvdHXbDdJt2gUMbKCwoQhU%3D&reserved=0 >> > >> > Visit other Kitware open-source projects at >> > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki >> > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queens >> > u.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b >> > 925c%7C1%7C0%7C636650159330792727&sdata=Xppm3uezu3nyaA9rf5IxxDqLMBeyBb >> > 6nIrt%2FForVoBs%3D&reserved=0 >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt >> > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57e >> > e44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636 >> > 650159330792727&sdata=hhRnwdAr4eTN5Tidn%2FhjGoDj9REIazlvfVgW3V8uAPs%3D >> > &reserved=0 >> > >> > Search the list archives at: >> > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma >> > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C >> > 2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C >> > 1%7C0%7C636650159330792727&sdata=xChSvX1Q%2BjBODVNNLWtCkFaoEdhSR1KeRIi >> > MBCM%2Bm%2Bo%3D&reserved=0 >> > >> > Follow this link to subscribe/unsubscribe: >> > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpubli >> > c.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40q >> > ueensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb >> > 2838b925c%7C1%7C0%7C636650159330792727&sdata=vjwoMbm%2BOqCgp4O%2F7h%2F >> > JqtvqoSZWx%2FQwpot6Gqs%2BLiE%3D&reserved=0 >> _______________________________________________ >> Powered by >> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=NuXpHHrNM9ouQUfibQdvb%2FvdHXbDdJt2gUMbKCwoQhU%3D&reserved=0 >> >> Visit other Kitware open-source projects at >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=Xppm3uezu3nyaA9rf5IxxDqLMBeyBb6nIrt%2FForVoBs%3D&reserved=0 >> >> Please keep messages on-topic and check the VTK FAQ at: >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=hhRnwdAr4eTN5Tidn%2FhjGoDj9REIazlvfVgW3V8uAPs%3D&reserved=0 >> >> Search the list archives at: >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=xChSvX1Q%2BjBODVNNLWtCkFaoEdhSR1KeRIiMBCM%2Bm%2Bo%3D&reserved=0 >> >> Follow this link to subscribe/unsubscribe: >> >> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7C2c47a8aa57ee44de212b08d5d5f25ffa%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636650159330792727&sdata=vjwoMbm%2BOqCgp4O%2F7h%2FJqtvqoSZWx%2FQwpot6Gqs%2BLiE%3D&reserved=0 >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Jun 19 14:39:12 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 19 Jun 2018 11:39:12 -0700 Subject: [vtkusers] set name to actor and display it with mouse hover In-Reply-To: <1529416598905-0.post@n5.nabble.com> References: <1529416598905-0.post@n5.nabble.com> Message-ID: Try this https://lorensen.github.io/VTKExamples/site/Cxx/Widgets/BalloonWidget/ On Tue, Jun 19, 2018, 6:56 AM smurphy wrote: > Hello, > > I would like to assign names to individual actors and that the actor name > gets displayed temporarily when the mouse is hovered over it. > > The closest example I could find is this one: > > https://www.vtk.org/Wiki/VTK/Examples/Python/Interaction/HighlightAPickedActor > > Instead of clicking and the sphere turning red, I would like for a text to > be displayed next to the mouse (e.g "this is sphere number 1"). Ideally > when hovering, but on click is also fine. > > Is this, or something equivalent, possible in vtk? (I would later also try > it in vtk.js) > > Thanks, > Sebastien > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.murphy at gmail.com Tue Jun 19 15:05:42 2018 From: sebastien.murphy at gmail.com (smurphy) Date: Tue, 19 Jun 2018 12:05:42 -0700 (MST) Subject: [vtkusers] set name to actor and display it with mouse hover In-Reply-To: References: <1529416598905-0.post@n5.nabble.com> Message-ID: <1529435142884-0.post@n5.nabble.com> this looks perfect. Thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From vtk_user at gmx.de Tue Jun 19 16:21:15 2018 From: vtk_user at gmx.de (vtk user) Date: Tue, 19 Jun 2018 22:21:15 +0200 Subject: [vtkusers] Why does the OBJ (WaveFront) Exporter only take vtkRenderWindow as input? Message-ID: An HTML attachment was scrubbed... URL: From Gerald.Lodron at joanneum.at Wed Jun 20 02:36:21 2018 From: Gerald.Lodron at joanneum.at (Lodron, Gerald) Date: Wed, 20 Jun 2018 06:36:21 +0000 Subject: [vtkusers] Bug in vtkPointHandleRepresentation3D/vtkSeedWidget setting properties seperately for seed points? Message-ID: <7bedeb42aff4420da08e7df4d02a58fc@RZJMBX2.jr1.local> Hi I am using a vtkSeedWidget with a vtkPointHandleRepresentation3D to place some points in my image. I want to set different color for different seed points so I use for each point vtkSmartPointer vtkPorperty = vtkSmartPointer::New(); vtkPorperty->SetColor(r,g,b); static_cast( seedWidget->GetSeedRepresentation()->GetHandleRepresentation( pointId ))->SetProperty(vtkPorperty); after adding the point. The problem is that after that line of code/after Render() ALL seed points get those color. Example: Add 3 Seedpoints and set first red, second blue, third green (using above code). All appear green, because this one was the last "SetProperty" call. When I move first seed point a little bit it becomes (after movement/after releasing mouse) red again which is my wanted color for this seed. Any idea what I am making wrong? Can I maybe simulate an move interaction to get correct color. I already tried several "StartInteraction" calls on the representation and widget without success. ??? From Gerald.Lodron at joanneum.at Wed Jun 20 02:33:39 2018 From: Gerald.Lodron at joanneum.at (Lodron, Gerald) Date: Wed, 20 Jun 2018 06:33:39 +0000 Subject: [vtkusers] Bug in vtkPointHandleRepresentation3D/vtkSeedWidget setting properties seperately for seed points? Message-ID: <9240e830a55849e88e57cea942a138a2@RZJMBX2.jr1.local> Hi I am using a vtkSeedWidget with a vtkPointHandleRepresentation3D to place some points in my image. I want to set different color for different seed points so I use for each point vtkSmartPointer vtkPorperty = vtkSmartPointer::New(); vtkPorperty->SetColor(r,g,b); static_cast( seedWidget->GetSeedRepresentation()->GetHandleRepresentation( pointId ))->SetProperty(vtkPorperty); after adding the point. The problem is that after that line of code/after Render() ALL seed points get those color. Example: Add 3 Seedpoints and set first red, second blue, third green (using above code). All appear green, because this one was the last "SetProperty" call. When I move first seed point a little bit it becomes (after movement/after releasing mouse) red again which is my wanted color for this seed. Any idea what I am making wrong? Can I maybe simulate an move interaction to get correct color. I already tried several "StartInteraction" calls on the representation and widget without success... -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Wed Jun 20 06:37:57 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Wed, 20 Jun 2018 19:37:57 +0900 Subject: [vtkusers] Horrible performance partitioning an UnstructuredGrid into connected regions with vtkConnectivityFilter In-Reply-To: <1529228662737-0.post@n5.nabble.com> References: <1529228662737-0.post@n5.nabble.com> Message-ID: Hi Doug, It may be faster to use a SetExtractionModeToAllRegions method in vtkConnectivityFilter and then extract each region by vtkThreshold one by one. ----- connect.SetExtractionModeToAllRegions() ... threshold = vtk.vtkThreshold() threshold.SetInputConnection(connect.GetOutputPort()) threshold.SetInputArrayToProcess(0, 0, 0, vtk.vtkDataObject.FIELD_ASSOCIATION_CELLS, 'RegionId') i = 0 while True: start = timer() extractGrid = vtk.vtkUnstructuredGrid() threshold.ThresholdBetween(i, i) threshold.Update() extractGrid.DeepCopy(threshold.GetOutput()) if extractGrid.GetNumberOfCells() <= 0: break print(i, extractGrid.GetNumberOfCells()) mb.SetBlock(i, extractGrid) end = timer() print("Processed region " + str(i) + " in " + str(end-start) + "seconds") i += 1 ----- Best 2018-06-17 18:44 GMT+09:00 scotsman60 : > Hello!!! > > I am partitioning a single large vtkUnstructuredGrid with around 15 million > Points and Cells into contiguous cell regions using the > vtkConnectivityFilter. > > I'm using VTK 7.1 with Python 3.6.2 > > The filter finds around 4,700 regions quite quickly - in about 10 seconds. > > But then it takes almost the same amount of time to extract each region into > it's own grid and add to a MultiBlockDataSet - this is my end goal at the > moment. > > Here is the code, > > def extractConnectedRegions(self): > start = timer() > connect = vtk.vtkConnectivityFilter() > connect.SetInputData(self.mesh) > connect.SetExtractionModeToSpecifiedRegions() > connect.ColorRegionsOn(); > connect.Update() > num_regions = connect.GetNumberOfExtractedRegions() > end = timer() > print("Extracted " + str(num_regions) + " regions in " + > str(end-start) + " seconds") > > self.mb = vtk.vtkMultiBlockDataSet() > > i=0 > while True: > start = timer() > extractGrid = vtk.vtkUnstructuredGrid() > connect.AddSpecifiedRegion(i) > connect.Update() > extractGrid.DeepCopy(connect.GetOutput()) > if extractGrid.GetNumberOfCells() <= 0: > break > print(i,extractGrid.GetNumberOfCells()) > self.mb.SetBlock(i, extractGrid) > connect.DeleteSpecifiedRegion(i) > end = timer() > print("Processed region " + str(i) + " in " + str(end-start) + " > seconds") > i+=1 > > return num_regions > > > The output from this fragment is shown below, > > Time to add 15811239 points to vtkUnstructuredGrid - 0.19109638981581245 > seconds > Time to size array for 15685372 elements is 8.62148243552241e-06 seconds > Time to create connectivity array for 15685372 elements is > 0.6341917319162356 seconds > Time to populate vtkUnstructuredGrid with 15685372 cells is > 1.5787703795422896 seconds > Extracted 4739 regions in 10.1558246735332 seconds > 0 1 > Processed region 0 in 7.074993349142119 seconds > 1 1 > Processed region 1 in 7.067869541369976 seconds > 2 1 > Processed region 2 in 6.956592478126069 seconds > 3 1 > Processed region 3 in 6.968502850836856 seconds > > > I have to believe that there's a more efficient way to do this than the one > I'm using, but I haven't been able to find one. > > Any suggestions, hints or solutions will be gratefully appreciated. > > Doug > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From doug at beachmailing.com Wed Jun 20 08:14:44 2018 From: doug at beachmailing.com (scotsman60) Date: Wed, 20 Jun 2018 05:14:44 -0700 (MST) Subject: [vtkusers] Horrible performance partitioning an UnstructuredGrid into connected regions with vtkConnectivityFilter In-Reply-To: References: <1529228662737-0.post@n5.nabble.com> Message-ID: <1529496884984-0.post@n5.nabble.com> kenichiro yoshimi wrote > Hi Doug, > > It may be faster to use a SetExtractionModeToAllRegions method in > vtkConnectivityFilter and then extract each region by vtkThreshold one > by one. > > - Kenichiro, Since my original post I had actually tried what you suggested and the extraction time came down to 2.5 seconds per region. I got even better performance using the selection method - vtkSelection, vtkSelectionNode and vtkExtactSelection brought it down to 0.6 seconds per extracted region. But with almost 5,000 regions to extract that's still too slow. So my latest strategy is to use the vtkConnectivityFilter to find the regions - if you use SetExtractionModeToAllRegionsusing this causes a Scalar array of RegionIds to be added to the UG. I'm planning to use that array to process the original cell data that I have in a series of numpy arrays (one per cell type) so that I can simply create each region as a new UG and the throw away the original UG. Basically I'm betting that numpy manipulation is faster than extracting and copying using UG methods...... We'll see how that works out..... For reference, here's the code for the selection method. It took a little while to understand how the classes work together, but in the end it works quite well - jut too slow for my needs..... def extractConnectedRegions2(self): num_cell_arrays = self.mesh.GetCellData().GetNumberOfArrays() start = timer() connect = vtk.vtkConnectivityFilter() connect.SetInputData(self.mesh) connect.SetExtractionModeToAllRegions() connect.ColorRegionsOn(); connect.Update() num_regions = connect.GetNumberOfExtractedRegions() end = timer() print("Extracted " + str(num_regions) + " regions in " + str(end-start) + " seconds") start = timer() self.extractGrid = vtk.vtkUnstructuredGrid() self.extractGrid.DeepCopy(connect.GetOutput()) end = timer() print("Deep copied in " + str(end-start) + " seconds") selectionNode =vtk.vtkSelectionNode() selectionNode.SetFieldType(vtk.vtkSelectionNode.CELL) selectionNode.SetContentType(vtk.vtkSelectionNode.VALUES) selection = vtk.vtkSelection() selection.AddNode(selectionNode) extract_selection = vtk.vtkExtractSelection() extract_selection.SetInputData(0, self.extractGrid) extract_selection.SetInputData(1, selection) self.mb = vtk.vtkMultiBlockDataSet() for i in range(num_regions): start = timer() ids = vtk.vtkIntArray() ids.InsertNextValue(i) ids.SetName("RegionId") selectionNode.SetSelectionList(ids) val = ids.GetValue(0) extract_selection.Update() leaf = vtk.vtkUnstructuredGrid() leaf.DeepCopy(extract_selection.GetOutput()) self.mb.SetBlock(i, leaf) end = timer() print("Processed region " + str(i) + " in " + str(end-start) + " seconds") return num_regions Here's the timing info from the above Deep copied in 0.46751967130063576 seconds Processed region 0 in 0.7530222326956988 seconds Processed region 1 in 0.6797586976174443 seconds Processed region 2 in 0.6042322342475757 seconds Processed region 3 in 0.6011810580749852 seconds Processed region 4 in 0.5983285860557288 seconds Processed region 5 in 0.604301616482914 seconds Processed region 6 in 0.6362392036725879 seconds Processed region 7 in 0.6126373378241681 seconds -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From vtk_user at gmx.de Wed Jun 20 08:27:21 2018 From: vtk_user at gmx.de (vtk user) Date: Wed, 20 Jun 2018 14:27:21 +0200 Subject: [vtkusers] Weird Problem with OpenVR SDK Message-ID: An HTML attachment was scrubbed... URL: From nqfrench9 at gmail.com Wed Jun 20 10:46:47 2018 From: nqfrench9 at gmail.com (Nick French) Date: Wed, 20 Jun 2018 09:46:47 -0500 Subject: [vtkusers] VTK AxesGrid Message-ID: I'm currently attempting to recreate a script that I wrote in Paraview's python editor in VTK C# (ActiViz). I pretty much have everything that I want except for what Paraview calls "AxesGrid". With this feature, I can create a custom axis grid where I pick which tick marks to show and what value they have. In ActiViz, I have found "CubeAxesActor" which has a function called "SetAxisLabels" that allows me to add custom labels to the tick marks, but I have no way of selecting the location of the tick marks. I've attached an image showing what I was able to render in Paraview (on the left) vs. what I currently doing in ActiViz. Would really appreciate any insight into how to add the axis that I had in Paraview. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 92514 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VTK_Axes.png Type: image/png Size: 391578 bytes Desc: not available URL: From rabysam28 at gmail.com Wed Jun 20 11:10:49 2018 From: rabysam28 at gmail.com (Sam Raby) Date: Wed, 20 Jun 2018 08:10:49 -0700 Subject: [vtkusers] [PCL-users] Ubunu 17.10 In-Reply-To: References: Message-ID: Thanks for the response. I got reply from vtk email list that this method 'ImmediateModeRenderingOn' is removed in vtk8.1. Is there a pre-compiled version of PCL that works with vtk8.1? If I want to use vtk8.1, how shall I proceed to be able to use PCL? Thanks On Tue, Jun 19, 2018 at 12:09 PM, Fabien Rozar wrote: > Hello, > > I was wondering if your error message can easily be check with > the online VTK documentation. > > After checking the 6.3 documentation, I found this: > https://www.vtk.org/doc/release/6.3/html/classvtkMapper.html# > ab9db044b3f5113808d2de42f13bb4fe8 > > In the class vtkMapper, you can see that the method > 'ImmediateModeRenderingOn ()' > exists so it's not obvious why you have this error message. > > You should check which VTK header is actually use (maybe in cmake log > file). > You can also delete your build directory to launch a new clean cmake > generation. > > I cannot say more with so few information. Good luck, > frozar > > Le mar. 19 juin 2018 ? 04:12, Sam Raby a ?crit : > >> Hi Fabien, when I run the command line, I get the following response: >> >> ii libvtk6-dev 6.3.0+dfsg1-10build1 amd64 VTK header files >> ii libvtk6-qt-dev 6.3.0+dfsg1-10build1 amd64 VTK header files, >> containing Qt files >> >> >> On Mon, Jun 18, 2018 at 12:08 AM, Fabien Rozar >> wrote: >> >>> HI, >>> >>> It seems like the installed vtk library on your machine doesn't match >>> the code in libpcl. >>> >>> Can you share the version number of the installed vtk library please? >>> You should can it if you type this in a terminal: >>> dpkg -l libvtk*dev* | grep "^ii" >>> >>> frozar >>> >>> Le sam. 16 juin 2018 ? 21:05, Sam Raby a ?crit : >>> >>>> I just installed PCL using the following command line => sudo apt >>>> install libpcl-dev >>>> >>>> but, when I include the following in my source code => #include >>>> >>>> >>>> I get the below error. Any idea why it is happening and how to fix it? >>>> Thanks! >>>> >>>> *error: 'class vtkMapper' has no member named >>>> 'ImmediateModeRenderingOn'* >>>> *actor->GetMapper ()->ImmediateModeRenderingOn ();* >>>> ^~~~~~~~~~~~~~~~~~~~~~~~ >>>> >>>> >>>> >>>> >>>> On Thu, Jun 7, 2018 at 3:48 AM, Bart Verhagen >>>> wrote: >>>> >>>>> Hi Sam, >>>>> >>>>> There are upstream pre-compiled binary packages available in the >>>>> universe-repository of Ubuntu, see here: https://packages.ubuntu. >>>>> com/artful/libpcl-dev. Most Ubuntu installations have this mirror >>>>> configured for APT by default. >>>>> So a simple >>>>> sudo apt-get update && sudo apt-get install libpcl-dev' should do the >>>>> job. >>>>> >>>>> Regards, >>>>> >>>>> Bart >>>>> >>>>> >>>>> Bart Verhagen, >>>>> Kapernikov >>>>> www.kapernikov.com >>>>> >>>>> On Wed, Jun 6, 2018 at 10:30 PM, Sam Raby wrote: >>>>> >>>>>> Hi, Is there an installation instruction of how to install PCL on >>>>>> Ubnuut 17.10 without having to compile it? >>>>>> >>>>>> Thanks >>>>>> -S >>>>>> >>>>>> _______________________________________________ >>>>>> PCL-users at pointclouds.org / http://pointclouds.org >>>>>> http://pointclouds.org/mailman/listinfo/pcl-users >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> PCL-users at pointclouds.org / http://pointclouds.org >>>>> http://pointclouds.org/mailman/listinfo/pcl-users >>>>> >>>>> >>>> _______________________________________________ >>>> PCL-users at pointclouds.org / http://pointclouds.org >>>> http://pointclouds.org/mailman/listinfo/pcl-users >>>> >>> >>> _______________________________________________ >>> PCL-users at pointclouds.org / http://pointclouds.org >>> http://pointclouds.org/mailman/listinfo/pcl-users >>> >>> >> _______________________________________________ >> PCL-users at pointclouds.org / http://pointclouds.org >> http://pointclouds.org/mailman/listinfo/pcl-users >> > > _______________________________________________ > PCL-users at pointclouds.org / http://pointclouds.org > http://pointclouds.org/mailman/listinfo/pcl-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Wed Jun 20 11:13:38 2018 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 20 Jun 2018 09:13:38 -0600 Subject: [vtkusers] Disabling interaction of a renderer Message-ID: I am creating an application that will require the user to "activate" an object prior to being able to manipulate it via mouse movements. The attached script is simple (python2.7;vtk7.1;MacOS10.13.4) demonstration with two renderers (left and right). Pressing "t" toggles/highlights the contents. However, when the left side is highlighted I can still interact with the right side. How can I disable the interaction for a particular renderer? Thanks for the help, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dual_toggle.py Type: text/x-python-script Size: 2157 bytes Desc: not available URL: From adelaossa at gmail.com Wed Jun 20 11:24:03 2018 From: adelaossa at gmail.com (amdelaossa) Date: Wed, 20 Jun 2018 17:24:03 +0200 Subject: [vtkusers] VTK + PyQt5 + VirtualGL not working In-Reply-To: References: <92D8FCE3-EBFA-426E-8A12-F1166F8725FD@desy.de> Message-ID: <27E7D890-FEBC-4DF2-8F9F-8EF6687B5902@gmail.com> Hello Felipe, I have compiled VTK 8.1.1 with python2 and Qt4 and the problem persists. No idea of what else can be done. Is anyone else interested in getting this fixed? I can imagine that using VTK through VirtualGL to access large data sets stored in computing clusters is not a rare task... Greetings, Alberto > On 15. Jun 2018, at 10:58, Felipe Bordeu wrote: > > Hi everyone, > > I can confirm this problem. I have a python 2.7 + qt4 + vtk working app on a remote server with vnc for the visualisation. But with python 3 + qt4 + vtk the same error message appears. If I test the vtk installation alone (not in a embedded qt window) I can create a visualisation in a window. > > > > > Le jeu. 14 juin 2018 ? 10:00, amdelaossa > a ?crit : > Dear VTK developers, > > We have an issue with our 3D visualization software which uses VTK, through Python bindings. > Although VTK has been working with no problems with VirtualGL, > recently we have implemented a GUI for our visualization routines. > The problem appeared when we tried to use this GUI remotely through VirtualGL. > > We get the following error message: > > ` > [VGL] NOTICE: Automatically setting VGL_CLIENT environment variable to > [VGL] 131.169.206.101, the IP address of your SSH client. > ERROR: In /data/netapp/fla/plasma/software-max/source/VTK-git/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 725 > vtkXOpenGLRenderWindow (0x2ef7b00): GLEW could not be initialized. > > Segmentation fault > ` > > The problem also appear with a much more simple program that we took from the VTK examples: > > > This python script runs smoothly in a local computer, but it fails when using vglrun (VirtualGL). > > This is a critical issue for us: > Our simulation data is stored in remote clusters for parallel computing, and therefore, > it is a must to use VirtualGL to visualize the data with VTK without needing to transfer large amounts of data to our personal computers. > > Any help or information is much appreciated. > Thanks! > > Best regards, > Alberto > > Alberto Martinez de la Ossa > Postdoc Uni. Hamburg - DESY-FLA > > Deutsches Elektronen-Synchrotron DESY > Notkestra?e 85, 22607 Hamburg > Office: 01E/O2.514 > Phone: +49 40 8998 1569 > Email: alberto.martinez.de.la.ossa at desy.de > > > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Wed Jun 20 16:29:12 2018 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 20 Jun 2018 14:29:12 -0600 Subject: [vtkusers] VTK AxesGrid In-Reply-To: References: Message-ID: I am not sure if this is the best solution, but it is possible using a vtkAxis object. Attached is a python script that creates a vtkAxis object with some custom tick marks, it should help you get started. But, it will take some work to get it lined up with your result. It is probably also possible to do this with a vtkAxisActor object, but I have not tried that before. On Wed, Jun 20, 2018 at 8:46 AM, Nick French wrote: > I'm currently attempting to recreate a script that I wrote in Paraview's > python editor in VTK C# (ActiViz). I pretty much have everything that I > want except for what Paraview calls "AxesGrid". With this feature, I can > create a custom axis grid where I pick which tick marks to show and what > value they have. In ActiViz, I have found "CubeAxesActor" which has a > function called "SetAxisLabels" that allows me to add custom labels to the > tick marks, but I have no way of selecting the location of the tick marks. > I've attached an image showing what I was able to render in Paraview (on > the left) vs. what I currently doing in ActiViz. Would really appreciate > any insight into how to add the axis that I had in Paraview. > > Thanks > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at https://urldefense.proofpoint. > com/v2/url?u=http-3A__www.kitware.com_opensource_ > opensource.html&d=DwICAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8 > c&m=J8Nh2c3UpdPzfnv11-DKAc5tbOJfLIchLSpSB5Itvc8&s=V8Yuu8HEV_ > qDw1AlswuEAUkcHSzZLkxtAZjW76lDe20&e= > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk. > org_Wiki_VTK-5FFAQ&d=DwICAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8 > c&m=J8Nh2c3UpdPzfnv11-DKAc5tbOJfLIchLSpSB5Itvc8&s=CsoGFRj6wi2gBqRd2FBjn36- > uDDANYgj6l0o8G_e7j8&e= > > Search the list archives at: https://urldefense.proofpoint. > com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=J8Nh2c3UpdPzfnv11- > DKAc5tbOJfLIchLSpSB5Itvc8&s=Q4UHj_qbIGjrwjYrD7Jzb0qVQJPZkmPlrpFCJvR7OBo&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__public. > kitware.com_mailman_listinfo_vtkusers&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=J8Nh2c3UpdPzfnv11- > DKAc5tbOJfLIchLSpSB5Itvc8&s=TfNr8GWe9fyp92w_mSYPjCebWuipmkVTUKFkr1zt7NY&e= > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 92514 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: axis.py Type: text/x-python-script Size: 948 bytes Desc: not available URL: From dave.demarle at kitware.com Thu Jun 21 15:44:04 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 21 Jun 2018 15:44:04 -0400 Subject: [vtkusers] IEEE Supercomputing 2018 - Kitware wants to promote your work! Message-ID: Greetings VTK and ParaView communities, We at Kitware are searching for compelling images, videos, and entire applications enabled by VTK and ParaView to show in our booth at this year's Supercomputing conference . For a sample of what we demonstrated before, check out last year's highlights . In conjunction with SC18, and again with your permission, we would also like to reference your work from the galleries and success stories on paraview.org or vtk.org. So, if you've got a cool app, or have recently used VTK and ParaView to make some great looking visualizations, are able to share them, and want us to show them off for you, please contact me so we can discuss the details. Videos should ideally be 1920x1080 pixels for HD display, and still visualizations should be 150ppi when scaled to 100%. For the attribution, we will need at a minimum your name, a title or brief caption, and the acknowledgement as you would like it to appear. Finally, if you happen to be going to the conference and would like a forum to present your work at, please let me know so we can schedule your presentation in our booth. thanks, and I hope to see many of you at SuperComputing in November! David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From leodelcarpio at hotmail.com Thu Jun 21 15:53:56 2018 From: leodelcarpio at hotmail.com (Jota Manrique Del Carpio) Date: Thu, 21 Jun 2018 19:53:56 +0000 Subject: [vtkusers] (no subject) Message-ID: hi Vtkusers https://goo.gl/fJno9V Jota Manrique Del Carpio From andrew.slaughter at inl.gov Thu Jun 21 16:12:06 2018 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Thu, 21 Jun 2018 14:12:06 -0600 Subject: [vtkusers] Disabling interaction of a renderer In-Reply-To: References: Message-ID: After digging around a bit I figured out how to solve the problem, the complete script with a working version is attached. In short the vtkRenderWindowInteractor::FindPokedRenderer always returns a renderer regardless of the Set/GetInteractive state. Therefore, I created a "background" renderer with layer 0 with the others on layer 1. Using SetInteractive(False) on the two layer 1 renders that causes the background to be the fallback renderer for the interactor, which produces the desired behavior. Thanks to anyone who might of took time to look at my problem. On Wed, Jun 20, 2018 at 9:13 AM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I am creating an application that will require the user to "activate" an > object prior to being able to manipulate it via mouse movements. The > attached script is simple (python2.7;vtk7.1;MacOS10.13.4) demonstration > with two renderers (left and right). Pressing "t" toggles/highlights the > contents. > > However, when the left side is highlighted I can still interact with the > right side. How can I disable the interaction for a particular renderer? > > Thanks for the help, > > Andrew > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: dual_toggle.py Type: text/x-python-script Size: 2459 bytes Desc: not available URL: From dave.demarle at kitware.com Thu Jun 21 16:13:56 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 21 Jun 2018 16:13:56 -0400 Subject: [vtkusers] Disabling interaction of a renderer In-Reply-To: References: Message-ID: Thanks for posting a solution Andrew. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jun 21, 2018 at 4:12 PM Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > After digging around a bit I figured out how to solve the problem, the > complete script with a working version is attached. In short the > vtkRenderWindowInteractor::FindPokedRenderer always returns a renderer > regardless of the Set/GetInteractive state. Therefore, I created a > "background" renderer with layer 0 with the others on layer 1. Using > SetInteractive(False) on the two layer 1 renders that causes the background > to be the fallback renderer for the interactor, which produces the desired > behavior. > > Thanks to anyone who might of took time to look at my problem. > > On Wed, Jun 20, 2018 at 9:13 AM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > >> I am creating an application that will require the user to "activate" an >> object prior to being able to manipulate it via mouse movements. The >> attached script is simple (python2.7;vtk7.1;MacOS10.13.4) demonstration >> with two renderers (left and right). Pressing "t" toggles/highlights the >> contents. >> >> However, when the left side is highlighted I can still interact with the >> right side. How can I disable the interaction for a particular renderer? >> >> Thanks for the help, >> >> Andrew >> > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bzindovic at gmail.com Fri Jun 22 05:17:54 2018 From: bzindovic at gmail.com (Budo Zindovic) Date: Fri, 22 Jun 2018 11:17:54 +0200 Subject: [vtkusers] Messed up mesh connectivity Message-ID: Hello, I'm trying to visualize triangular mesh (by using unstructured data) from a VTK file I've created. Contents of this file are as follows: # vtk DataFile Version 3.0 Test data ASCII DATASET UNSTRUCTURED_GRID POINTS 7 float -174.0 -305.0 0.0 4538.0 135.0 0.0 43860.0 35730.0 0.0 18980.0 35780.0 0.0 298770.0 -109640.0 0.0 265940.0 141140.0 0.0 2342000.0 3887000.0 0.0 CELLS 8 24 3 7 4 6 3 7 6 5 3 6 4 3 3 6 3 5 3 5 2 1 3 5 3 2 3 4 2 3 3 4 1 2 CELL_TYPES 8 5 5 5 5 5 5 5 5 POINT_DATA 7 SCALARS float LOOKUP_TABLE default 0.0 0.0 0.0 0.0 0.0 0.500000 0.0 The problem is that VTK displays mesh with triangles messed up. I've attached two images, one with correct and the other with messed up triangles (from VTK visualization engine). Did anyone encounter this? If you have, how did you overcome this issue? Budo Zindovic -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Mesh_Correct.jpg Type: image/jpeg Size: 58713 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Mesh_VTK.jpg Type: image/jpeg Size: 36225 bytes Desc: not available URL: From bzindovic at gmail.com Fri Jun 22 07:25:51 2018 From: bzindovic at gmail.com (Budo Zindovic) Date: Fri, 22 Jun 2018 04:25:51 -0700 (MST) Subject: [vtkusers] Messed up mesh connectivity In-Reply-To: References: Message-ID: <1529666751107-0.post@n5.nabble.com> What a novice mistake. VTK indices start with 0 and not 1 as I thought. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dhoppes at mbfbioscience.com Fri Jun 22 10:20:08 2018 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Fri, 22 Jun 2018 14:20:08 +0000 Subject: [vtkusers] Find point in vtkappendpolydata Message-ID: <403FB8A2E4E75A4CA51E33B6E9FC06C228307A59@exchange3.microbrightfield.com> Hi all, Quick question that I can't seem to find the answer for. I have a vtkappendpolydata that contains 200 input connections and 1000 points per connection. I was able to use the vtkpointlocator to locate my point quickly but I need the input connection and the point index within that connection. Is there a fast search of a vtkappendpolydata to get me this information? Dougie -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Jun 22 10:43:47 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 22 Jun 2018 10:43:47 -0400 Subject: [vtkusers] Find point in vtkappendpolydata In-Reply-To: <403FB8A2E4E75A4CA51E33B6E9FC06C228307A59@exchange3.microbrightfield.com> References: <403FB8A2E4E75A4CA51E33B6E9FC06C228307A59@exchange3.microbrightfield.com> Message-ID: On Fri, Jun 22, 2018 at 10:32 AM Doug Hoppes wrote: > Hi all, > > > > Quick question that I can?t seem to find the answer for. > I have a vtkappendpolydata that contains 200 input connections and 1000 > points per connection. I was able to use the vtkpointlocator to locate my > point quickly but I need the input connection and the point index within > that connection. > > > > Is there a fast search of a vtkappendpolydata to get me > this information? > Nothing in VTK will give you that, I'm afraid, but with some bookkeeping it shouldn't be too hard. The output of vtkAppendPolyData should have the points appended in the order the inputs are added to it. With that in mind, you could make a map say, the from upper index of that input's points in the append filter's output to the input itself. Then, given the id of the point in the output, you can get use the map to get the input, and do some subtraction to get the id in the input. I've likely missed some details, but that should get you going in the right direction. HTH, Cory > > > Dougie > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Jun 22 21:23:40 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 22 Jun 2018 18:23:40 -0700 Subject: [vtkusers] Find point in vtkappendpolydata In-Reply-To: References: <403FB8A2E4E75A4CA51E33B6E9FC06C228307A59@exchange3.microbrightfield.com> Message-ID: I have not tried this but you could store the input connection and point index in the PointData for each input. Then when the point locator returns an index you can use the appended data to find the connections and original point id. On Fri, Jun 22, 2018 at 7:43 AM, Cory Quammen wrote: > On Fri, Jun 22, 2018 at 10:32 AM Doug Hoppes > wrote: >> >> Hi all, >> >> >> >> Quick question that I can?t seem to find the answer for. >> I have a vtkappendpolydata that contains 200 input connections and 1000 >> points per connection. I was able to use the vtkpointlocator to locate my >> point quickly but I need the input connection and the point index within >> that connection. >> >> >> >> Is there a fast search of a vtkappendpolydata to get me >> this information? > > > Nothing in VTK will give you that, I'm afraid, but with some bookkeeping it > shouldn't be too hard. The output of vtkAppendPolyData should have the > points appended in the order the inputs are added to it. With that in mind, > you could make a map say, the from upper index of that input's points in the > append filter's output to the input itself. Then, given the id of the point > in the output, you can get use the map to get the input, and do some > subtraction to get the id in the input. I've likely missed some details, but > that should get you going in the right direction. > > HTH, > Cory > >> >> >> >> Dougie >> >> _______________________________________________ >> 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsParadise at noware dot com From romain.leguay at gmail.com Sat Jun 23 13:28:30 2018 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Sat, 23 Jun 2018 19:28:30 +0200 Subject: [vtkusers] VTK data structure to C-array Message-ID: <5b2e833f.1c69fb81.2af57.5bcb@mx.google.com> Hi everyone, I try to convert all points of a vtkImageData to a C-array. My purpose is to use this array Inside OpenCL for example. My method actually is to read all points of the vtkImageData using vtkImageData::ComputePointId and vtkImageData?::GetPoint but this method is too slow. I don?t find any documentation on this. Thanks, Romain -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sat Jun 23 13:43:39 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sat, 23 Jun 2018 19:43:39 +0200 Subject: [vtkusers] VTK data structure to C-array In-Reply-To: <5b2e833f.1c69fb81.2af57.5bcb@mx.google.com> References: <5b2e833f.1c69fb81.2af57.5bcb@mx.google.com> Message-ID: 2018-06-23 19:28 GMT+02:00 Romain LEGUAY : > Hi everyone, > > > > I try to convert all points of a vtkImageData to a C-array. > > My purpose is to use this array Inside OpenCL for example. > > > > My method actually is to read all points of the vtkImageData using > vtkImageData::ComputePointId and vtkImageData ::GetPoint but this method is > too slow. > > > > I don?t find any documentation on this. > You can get a direct pointer to the data using GetScalarPointer() [1]. HTH, Elvis [1] https://www.vtk.org/doc/nightly/html/classvtkImageData.html#a567566b094dcc3187061dc5ff02a6abb > > Thanks, > > > > Romain > > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ustungozde at gmail.com Sat Jun 23 20:13:13 2018 From: ustungozde at gmail.com (blue) Date: Sat, 23 Jun 2018 17:13:13 -0700 (MST) Subject: [vtkusers] Hot to .mhd file for 3d reconstruction images Message-ID: <1529799193394-0.post@n5.nabble.com> Hello; I have a dataset for 3d reconstructions and I have this code: * import vtk def main(): colors = vtk.vtkNamedColors() fileName = get_program_parameters() colors.SetColor("BkgColor", [51, 77, 102, 255]) ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) reader = vtk.vtkMetaImageReader() reader.SetFileName(fileName) volumeMapper = vtk.vtkFixedPointVolumeRayCastMapper() volumeMapper.SetInputConnection(reader.GetOutputPort()) volumeColor = vtk.vtkColorTransferFunction() volumeColor.AddRGBPoint(0, 0.0, 0.0, 0.0) volumeColor.AddRGBPoint(500, 1.0, 0.5, 0.3) volumeColor.AddRGBPoint(1000, 1.0, 0.5, 0.3) volumeColor.AddRGBPoint(1150, 1.0, 1.0, 0.9) volumeScalarOpacity = vtk.vtkPiecewiseFunction() volumeScalarOpacity.AddPoint(0, 0.00) volumeScalarOpacity.AddPoint(500, 0.15) volumeScalarOpacity.AddPoint(1000, 0.15) volumeScalarOpacity.AddPoint(1150, 0.85) volumeGradientOpacity = vtk.vtkPiecewiseFunction() volumeGradientOpacity.AddPoint(0, 0.0) volumeGradientOpacity.AddPoint(90, 0.5) volumeGradientOpacity.AddPoint(100, 1.0) volumeProperty = vtk.vtkVolumeProperty() volumeProperty.SetColor(volumeColor) volumeProperty.SetScalarOpacity(volumeScalarOpacity) volumeProperty.SetGradientOpacity(volumeGradientOpacity) volumeProperty.SetInterpolationTypeToLinear() volumeProperty.ShadeOn() volumeProperty.SetAmbient(0.4) volumeProperty.SetDiffuse(0.6) volumeProperty.SetSpecular(0.2) volume = vtk.vtkVolume() volume.SetMapper(volumeMapper) volume.SetProperty(volumeProperty) ren.AddViewProp(volume) camera = ren.GetActiveCamera() c = volume.GetCenter() camera.SetViewUp(0, 0, -1) camera.SetPosition(c[0], c[1] - 400, c[2]) camera.SetFocalPoint(c[0], c[1], c[2]) camera.Azimuth(30.0) camera.Elevation(30.0) ren.SetBackground(colors.GetColor3d("BkgColor")) renWin.SetSize(640, 480) iren.Start() def get_program_parameters(): import argparse description = 'Read a volume dataset and displays it via volume rendering.' epilogue = ''' Derived from VTK/Examples/Cxx/Medical4.cxx ''' parser = argparse.ArgumentParser(description=description, epilog=epilogue, formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('filename', help='FullHead.mhd.') args = parser.parse_args() return args.filename if __name__ == '__main__': main() * This code including .mhd file How to convert my dataset .mhd file with vtk for this code -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Sun Jun 24 00:24:58 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sun, 24 Jun 2018 13:24:58 +0900 Subject: [vtkusers] Hot to .mhd file for 3d reconstruction images In-Reply-To: <1529799193394-0.post@n5.nabble.com> References: <1529799193394-0.post@n5.nabble.com> Message-ID: Hello, You have only to specify a file name in executing the program: > python program.py file-name Best, 2018-06-24 9:13 GMT+09:00 blue : > Hello; > I have a dataset for 3d reconstructions and I have this code: > * > import vtk > > > def main(): > colors = vtk.vtkNamedColors() > > fileName = get_program_parameters() > > colors.SetColor("BkgColor", [51, 77, 102, 255]) > > ren = vtk.vtkRenderer() > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren) > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > > reader = vtk.vtkMetaImageReader() > reader.SetFileName(fileName) > > volumeMapper = vtk.vtkFixedPointVolumeRayCastMapper() > volumeMapper.SetInputConnection(reader.GetOutputPort()) > > volumeColor = vtk.vtkColorTransferFunction() > volumeColor.AddRGBPoint(0, 0.0, 0.0, 0.0) > volumeColor.AddRGBPoint(500, 1.0, 0.5, 0.3) > volumeColor.AddRGBPoint(1000, 1.0, 0.5, 0.3) > volumeColor.AddRGBPoint(1150, 1.0, 1.0, 0.9) > > > volumeScalarOpacity = vtk.vtkPiecewiseFunction() > volumeScalarOpacity.AddPoint(0, 0.00) > volumeScalarOpacity.AddPoint(500, 0.15) > volumeScalarOpacity.AddPoint(1000, 0.15) > volumeScalarOpacity.AddPoint(1150, 0.85) > > > volumeGradientOpacity = vtk.vtkPiecewiseFunction() > volumeGradientOpacity.AddPoint(0, 0.0) > volumeGradientOpacity.AddPoint(90, 0.5) > volumeGradientOpacity.AddPoint(100, 1.0) > > > volumeProperty = vtk.vtkVolumeProperty() > volumeProperty.SetColor(volumeColor) > volumeProperty.SetScalarOpacity(volumeScalarOpacity) > volumeProperty.SetGradientOpacity(volumeGradientOpacity) > volumeProperty.SetInterpolationTypeToLinear() > volumeProperty.ShadeOn() > volumeProperty.SetAmbient(0.4) > volumeProperty.SetDiffuse(0.6) > volumeProperty.SetSpecular(0.2) > > > volume = vtk.vtkVolume() > volume.SetMapper(volumeMapper) > volume.SetProperty(volumeProperty) > > ren.AddViewProp(volume) > > camera = ren.GetActiveCamera() > c = volume.GetCenter() > camera.SetViewUp(0, 0, -1) > camera.SetPosition(c[0], c[1] - 400, c[2]) > camera.SetFocalPoint(c[0], c[1], c[2]) > camera.Azimuth(30.0) > camera.Elevation(30.0) > > ren.SetBackground(colors.GetColor3d("BkgColor")) > > renWin.SetSize(640, 480) > > iren.Start() > > > def get_program_parameters(): > import argparse > description = 'Read a volume dataset and displays it via volume > rendering.' > epilogue = ''' > Derived from VTK/Examples/Cxx/Medical4.cxx > ''' > parser = argparse.ArgumentParser(description=description, > epilog=epilogue, > > formatter_class=argparse.RawDescriptionHelpFormatter) > parser.add_argument('filename', help='FullHead.mhd.') > args = parser.parse_args() > return args.filename > > > if __name__ == '__main__': > main() > * > > This code including .mhd file How to convert my dataset .mhd file with vtk > for this code > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From romain.leguay at gmail.com Sun Jun 24 02:50:12 2018 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Sun, 24 Jun 2018 08:50:12 +0200 Subject: [vtkusers] Resolved - VTK data structure to C-array In-Reply-To: References: <5b2e833f.1c69fb81.2af57.5bcb@mx.google.com> Message-ID: <5b2f3f24.1c69fb81.74099.ba43@mx.google.com> Thank you for your answer. I didn?t understand the term Scalar like the pixel value. Romain De?: Elvis Stansvik Envoy? le?:samedi 23 juin 2018 19:43 ??: Romain LEGUAY Cc?: vtkusers at vtk.org Objet?:Re: [vtkusers] VTK data structure to C-array 2018-06-23 19:28 GMT+02:00 Romain LEGUAY : Hi everyone, ? I try to convert all points of a vtkImageData to a C-array. My purpose is to use this array Inside OpenCL for example. ? My method actually is to read all points of the vtkImageData using? vtkImageData::ComputePointId and vtkImageData?::GetPoint but this method is too slow. ? I don?t find any documentation on this. You can get a direct pointer to the data using GetScalarPointer() [1]. HTH, Elvis [1] https://www.vtk.org/doc/nightly/html/classvtkImageData.html#a567566b094dcc3187061dc5ff02a6abb ? Thanks, ? Romain ? _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From moustafasalli at gmail.com Sun Jun 24 07:05:29 2018 From: moustafasalli at gmail.com (Salli) Date: Sun, 24 Jun 2018 04:05:29 -0700 (MST) Subject: [vtkusers] MP4 video generation Message-ID: <1529838329527-0.post@n5.nabble.com> Hello, I am using VTK 8.1 and I am able to generate on-the-fly an AVI file showing the progress of my simulation. I am wondering if it possible to generate an MP4 file instead. Is it? PS: I can convert the AVI file to MP4 once the video is fully generated but if I can do this during generation it is better for me. Thanks in advance, Salli. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ustungozde at gmail.com Mon Jun 25 02:48:05 2018 From: ustungozde at gmail.com (blue) Date: Sun, 24 Jun 2018 23:48:05 -0700 (MST) Subject: [vtkusers] Hot to .mhd file for 3d reconstruction images In-Reply-To: References: <1529799193394-0.post@n5.nabble.com> Message-ID: <1529909285887-0.post@n5.nabble.com> Thank you so much I will try and I will back to you -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Mon Jun 25 08:44:47 2018 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 25 Jun 2018 08:44:47 -0400 Subject: [vtkusers] [PCL-users] Ubunu 17.10 In-Reply-To: References: Message-ID: If it helps, in newer versions of VTK 'ImmediateModeRenderingOn' calls can be removed from your code with no impact. Even in older versions of VTK the call is an optimization and the code should work fine without it. On Wed, Jun 20, 2018 at 11:11 AM Sam Raby wrote: > Thanks for the response. > I got reply from vtk email list that this method > 'ImmediateModeRenderingOn' is removed in vtk8.1. Is there a pre-compiled > version of PCL that works with vtk8.1? If I want to use vtk8.1, how shall I > proceed to be able to use PCL? > > Thanks > > On Tue, Jun 19, 2018 at 12:09 PM, Fabien Rozar > wrote: > >> Hello, >> >> I was wondering if your error message can easily be check with >> the online VTK documentation. >> >> After checking the 6.3 documentation, I found this: >> >> https://www.vtk.org/doc/release/6.3/html/classvtkMapper.html#ab9db044b3f5113808d2de42f13bb4fe8 >> >> In the class vtkMapper, you can see that the method >> 'ImmediateModeRenderingOn ()' >> exists so it's not obvious why you have this error message. >> >> You should check which VTK header is actually use (maybe in cmake log >> file). >> You can also delete your build directory to launch a new clean cmake >> generation. >> >> I cannot say more with so few information. Good luck, >> frozar >> >> Le mar. 19 juin 2018 ? 04:12, Sam Raby a ?crit : >> >>> Hi Fabien, when I run the command line, I get the following response: >>> >>> ii libvtk6-dev 6.3.0+dfsg1-10build1 amd64 VTK header files >>> ii libvtk6-qt-dev 6.3.0+dfsg1-10build1 amd64 VTK header files, >>> containing Qt files >>> >>> >>> On Mon, Jun 18, 2018 at 12:08 AM, Fabien Rozar >>> wrote: >>> >>>> HI, >>>> >>>> It seems like the installed vtk library on your machine doesn't match >>>> the code in libpcl. >>>> >>>> Can you share the version number of the installed vtk library please? >>>> You should can it if you type this in a terminal: >>>> dpkg -l libvtk*dev* | grep "^ii" >>>> >>>> frozar >>>> >>>> Le sam. 16 juin 2018 ? 21:05, Sam Raby a ?crit : >>>> >>>>> I just installed PCL using the following command line => sudo apt >>>>> install libpcl-dev >>>>> >>>>> but, when I include the following in my source code => #include >>>>> >>>>> >>>>> I get the below error. Any idea why it is happening and how to fix it? >>>>> Thanks! >>>>> >>>>> *error: 'class vtkMapper' has no member named >>>>> 'ImmediateModeRenderingOn'* >>>>> *actor->GetMapper ()->ImmediateModeRenderingOn ();* >>>>> ^~~~~~~~~~~~~~~~~~~~~~~~ >>>>> >>>>> >>>>> >>>>> >>>>> On Thu, Jun 7, 2018 at 3:48 AM, Bart Verhagen >>>>> wrote: >>>>> >>>>>> Hi Sam, >>>>>> >>>>>> There are upstream pre-compiled binary packages available in the >>>>>> universe-repository of Ubuntu, see here: >>>>>> https://packages.ubuntu.com/artful/libpcl-dev. Most Ubuntu >>>>>> installations have this mirror configured for APT by default. >>>>>> So a simple >>>>>> sudo apt-get update && sudo apt-get install libpcl-dev' should do the >>>>>> job. >>>>>> >>>>>> Regards, >>>>>> >>>>>> Bart >>>>>> >>>>>> >>>>>> Bart Verhagen, >>>>>> Kapernikov >>>>>> www.kapernikov.com >>>>>> >>>>>> On Wed, Jun 6, 2018 at 10:30 PM, Sam Raby >>>>>> wrote: >>>>>> >>>>>>> Hi, Is there an installation instruction of how to install PCL on >>>>>>> Ubnuut 17.10 without having to compile it? >>>>>>> >>>>>>> Thanks >>>>>>> -S >>>>>>> >>>>>>> _______________________________________________ >>>>>>> PCL-users at pointclouds.org / http://pointclouds.org >>>>>>> http://pointclouds.org/mailman/listinfo/pcl-users >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> PCL-users at pointclouds.org / http://pointclouds.org >>>>>> http://pointclouds.org/mailman/listinfo/pcl-users >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> PCL-users at pointclouds.org / http://pointclouds.org >>>>> http://pointclouds.org/mailman/listinfo/pcl-users >>>>> >>>> >>>> _______________________________________________ >>>> PCL-users at pointclouds.org / http://pointclouds.org >>>> http://pointclouds.org/mailman/listinfo/pcl-users >>>> >>>> >>> _______________________________________________ >>> PCL-users at pointclouds.org / http://pointclouds.org >>> http://pointclouds.org/mailman/listinfo/pcl-users >>> >> >> _______________________________________________ >> PCL-users at pointclouds.org / http://pointclouds.org >> http://pointclouds.org/mailman/listinfo/pcl-users >> >> > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From edern.haumont at kitware.com Mon Jun 25 09:20:35 2018 From: edern.haumont at kitware.com (Edern Haumont) Date: Mon, 25 Jun 2018 15:20:35 +0200 Subject: [vtkusers] vtkXMLReader and vtkXMLWriter data headers Message-ID: Hello, I am writing a python application which requires to send a stored compressed vtkImageData by block to a client. I read on this ( https://www.vtk.org/Wiki/VTK_XML_Formats) link (and by looking at the vtkXMLWriter source) that the actual data array is preceded by some header. Either : - [#bytes]*[DATA] *if the data is not compressed - [#blocks][#u-size][#p-size][#c-size-1][#c-size-2]...[#c-size-#blocks]*[DATA] *if it is compressed. My problem : I did not succeed in manually reading those values, either in the uncompressed (binary or ascii) or compressed case. Does anyone have any pointer or example on how to do that ? I could not find a lot of documentation on the subject. Also side question : I am not sure the ZLib compressor uses a full flush. If that is not the case, it seems impossible to read only one random data block. Am I right ? Thanks a lot. Bests. -- Edern Haumont *edern.haumont at kitware.com* -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Jun 25 09:47:21 2018 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 25 Jun 2018 09:47:21 -0400 Subject: [vtkusers] Weird Problem with OpenVR SDK In-Reply-To: References: Message-ID: Have you set # This option determines if the VR rendering code will become # the default renderer option(VTK_OPENVR_OBJECT_FACTORY "Make openVR the default render window for VTK" ON) to off? Otherwise the factory mechanism will always try to create the openvr classes. On Wed, Jun 20, 2018 at 8:27 AM vtk user wrote: > Hello VTK users, > > I am having a weird problem with using VTK with OpenVR. I built VTK 8.1 > against OpenVR and the Plugin itself is working fine. I visualize my Data > with the OpenVR headers included and the according renderclasses > (vtkOpenVRRenderer, ...) used instead of the standart render classes > (vtkRenderer, ...). When I did that (withoud HMD attached), OpenVR > complained that the Headset is not attached and SteamVR claims that that > the HMD is not ready, which makes sense. But as I deleted the includes > again and took the normal rendering classes, the complains still go on > (complains at line: renderWindow->render()). I deleted and rebuilt the > whole project via cmake, but its the same thing. This now happens to any > VTK program I write (I wrote a completely seperate program, visualizing a > sphere source from the examples with the normal VTK renderer, and its just > not rendering on the laptop screen, but complains that there is not HMD > attached). It seems like VTK is forcing to render with the OpenVR SDK, even > if no OpenVR library is included. Does anyone know how to solve the problem? > > Thanks alot! > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Mon Jun 25 10:50:57 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 25 Jun 2018 08:50:57 -0600 Subject: [vtkusers] vtkXMLReader and vtkXMLWriter data headers In-Reply-To: References: Message-ID: You might be able to find some good comments or logic in that code base https://github.com/Kitware/vtk-js/blob/master/Sources/IO/XML/XMLReader/index.js#L142-L150 On Mon, Jun 25, 2018 at 7:20 AM Edern Haumont wrote: > Hello, > > I am writing a python application which requires to send a stored > compressed vtkImageData by block to a client. > I read on this ( > https://www.vtk.org/Wiki/VTK_XML_Formats) link (and by looking at the > vtkXMLWriter source) that the actual data array is preceded by some header. > Either : > - [#bytes]*[DATA] *if the data is not compressed > - [#blocks][#u-size][#p-size][#c-size-1][#c-size-2]...[#c-size-#blocks]*[DATA] > *if it is compressed. > > My problem : I did not succeed in manually reading those values, either in > the uncompressed (binary or ascii) or compressed case. Does anyone have any > pointer or example on how to do that ? I could not find a lot of > documentation on the subject. > > Also side question : I am not sure the ZLib compressor uses a full flush. > If that is not the case, it seems impossible to read only one random data > block. Am I right ? > > Thanks a lot. > Bests. > > -- > Edern Haumont > *edern.haumont at kitware.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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Jun 25 11:12:05 2018 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 25 Jun 2018 11:12:05 -0400 Subject: [vtkusers] Why does the OBJ (WaveFront) Exporter only take vtkRenderWindow as input? In-Reply-To: References: Message-ID: I believe it is because OBJ files often go with MTL files and we need the actor/properties to write out the materials. Exporters in VTK are designed to write our a scene which can include positions, textures, material properties, etc. I think there is a vtkOBJWriter class that may be more in line with what you are suggesting. On Tue, Jun 19, 2018 at 4:26 PM vtk user wrote: > Hello vtk users, > > I was asking myself why the vtkOBJExporter has the methods > SetInput(vtkRenderWindow *renWin) and SetRenderWindow(vtkRenderWindow > *renWin), but no simple SetInputData(vtkPolyData *poly). As far as I > checked, WaveFront also only stores geometries (like STLs) and no contexts, > please correct me if I am wrong. So why the detour? > > Thanks alot! > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ustungozde at gmail.com Mon Jun 25 18:39:16 2018 From: ustungozde at gmail.com (blue) Date: Mon, 25 Jun 2018 15:39:16 -0700 (MST) Subject: [vtkusers] Hot to .mhd file for 3d reconstruction images In-Reply-To: References: <1529799193394-0.post@n5.nabble.com> Message-ID: <1529966356524-0.post@n5.nabble.com> Hello ; I tried code but I have this error: I cannot understand why? Any advice -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Mon Jun 25 20:28:52 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Tue, 26 Jun 2018 09:28:52 +0900 Subject: [vtkusers] Hot to .mhd file for 3d reconstruction images In-Reply-To: <1529966356524-0.post@n5.nabble.com> References: <1529799193394-0.post@n5.nabble.com> <1529966356524-0.post@n5.nabble.com> Message-ID: Hi, Your mhd file might be invalid as shown in the error message. Would you confirm if it is visualized correctly with ParaView or 3D Slicer? Thanks 2018?6?26?(?) 7:39 blue : > > Hello ; > I tried code but I have this error: > > > I cannot understand why? > Any advice > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From ustungozde at gmail.com Tue Jun 26 02:18:40 2018 From: ustungozde at gmail.com (blue) Date: Mon, 25 Jun 2018 23:18:40 -0700 (MST) Subject: [vtkusers] Hot to .mhd file for 3d reconstruction images In-Reply-To: References: <1529799193394-0.post@n5.nabble.com> <1529966356524-0.post@n5.nabble.com> Message-ID: <1529993920604-0.post@n5.nabble.com> Hi; I have images but not .mhd file I only give images folder to code How can Iconvert .mhd file my image dataset(images) with vtk in python? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From will.schroeder at kitware.com Tue Jun 26 05:57:04 2018 From: will.schroeder at kitware.com (Will Schroeder) Date: Tue, 26 Jun 2018 05:57:04 -0400 Subject: [vtkusers] Letters of Support for VTK proposal In-Reply-To: References: Message-ID: We really can use more letters of support, they mean a lot in the review process. Please consider sending us one. And thanks to those of you that already have. Best, Will On Fri, Jun 8, 2018 at 11:06 AM Will Schroeder wrote: > > > > > > > > > > > > > > > > > > > > > > *Dear VTK Community-Kitware is submitting a VTK development grant proposal > to the NIH in early July, and we?d like you to send us a letter of support > for that proposal. This four year proposal aims to make significant > improvements to VTK including rendering enhancements (VR and AR), better > support for the web (such as VTK.js), improved data integration (supporting > deep learning systems and federated, distributed databases, for example), > and updated mechanisms for community support (improving the software and > contribution process, documentation).We are very excited about the proposal > since it will make a very positive impact on VTK, its community, and the > many applications that use VTK. Several years ago we received a similar > award and were able to revamp our rendering support (OpenGL), improve our > software processes, and lay the foundation for VTK.js (among other > achievements). Now, we can really use your help with our follow-on > proposal. Part of the strategy of our proposal is to demonstrate to the > reviewers that VTK plays a critical part in medical innovation. Along this > line, we want to hear from the developers and users of VTK, so that they > can indicate their support for VTK and our proposal.If you?d like to help, > we have included three example letters. Please modify one of them to fit > your circumstances, copy it to your letterhead, sign it, and then send it > (a scanned pdf is fine) directly to me by June 30. These letters in no way > obligate you or your employer, they simply state ?VTK is great and > important to my work.? Also, don?t worry if you are not doing biomedical > research, we want to hear from everybody. Note that this information (i.e., > the names of endorsers) is considered private, only the writers of the VTK > proposal and the NIH review team will see this information.If you have any > questions or concerns, please feel free to contact me directly. Thanks and > we hope to hear from you (by June 30). Feel free to forward this to friends > and family.Sincerely,Will SchroederStephen AylwardKen MartinExample support > letters follow:Example 1=========Dr. Ken MartinKitware, Inc.28 Corporate > DriveClifton Park, NY 12065, USADear Dr. Martin,I am writing to indicate my > support for your NIH proposal for the continued development of VTK. The VTK > standards and software are absolutely critical to my lab, the ___ Lab at > ___ University, and to my collaborators around the world. Even as we speak, > I am working on a project involving complex visualizations using 3D Slicer, > Osirix, ParaView, and ITKSnap (which are largely built on VTK). Several of > my students also use VTK software libraries to write customized user > interfaces and visualizations for my scientific and clinical collaborators. > Our most recent application was for a physiologist who wanted to explore > very specialized data related to the movement of the tongue in speech after > glossectomy surgery.There are many worthy software projects under > development around the world, but very few who can claim to be > foundational. VTK can claim this, and I'm certain it can claim to be at the > core of hundreds of software products that will be used by many biomedical > researchers and thousands more that will be developed and used in-house. > The complexity of visualization tasks has continued to grow with the volume > of data and its connections across scales and from anatomy to function and > from individuals to populations. VTK is keeping up with the demand?leading > the rest, in fact?and should be a high priority for continued > funding.Example 2=========Dr. William J. SchroederKitware, Inc.28 Corporate > DriveClifton Park, NY 12065, USADear Dr. Schroeder,I enthusiastically > endorse your proposed effort to support and improve VTK. We use this open > source software in our work and have found it extremely helpful as we > create new technological solutions. We have developed a software > application that is currently being used by around the world for scientific > data visualization to gain new insights. Your Visualization Toolkit has > provided the software tools needed to develop that application that has > satisfied the needs of a very diverse customer base. We definitely would be > interested in your proposed VR/AR enhancements and improved integration > with web services. VTK fills a vital role in the international community?s > scientific computing infrastructure; additional developments along the > lines that you propose will certainly accelerate innovation.Example > 3=========Dr. Stephen R. AylwardKitware, Inc.101 East Weaver St, Ste > G4Carrboro, NC 27510, USADear Dr. Aylward,I am writing in ardent support > of your NIH proposal to continue the development, enhancement, and > dissemination of the Visualization Toolkit (VTK). Not only do I use it in > several projects myself, but I have found that it fosters the dissemination > and extension of research by allowing the community to efficiently > reproduce research, to easily combine contributions in unexpected ways, and > to transfer research into production. Developing and maintaining a project > as large and complex as VTK while fostering such an active community is a > breathtaking achievement, and I hope Kitware obtains the funding it needs > to keep this work up. * > > > -- > William J. Schroeder, PhD > Kitware, Inc. - Building the World's Technical Computing Software > 28 Corporate Drive > Clifton Park, NY 12065 > will.schroeder at kitware.com > http://www.kitware.com > (518) 881-4902 > -- William J. Schroeder, PhD Kitware, Inc. - Building the World's Technical Computing Software 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From arw.tyx-ouy_mz at ezweb.ne.jp Tue Jun 26 06:43:51 2018 From: arw.tyx-ouy_mz at ezweb.ne.jp (arwtyxouymz) Date: Tue, 26 Jun 2018 03:43:51 -0700 (MST) Subject: [vtkusers] How to create my custom Image Style class? Message-ID: <1530009831284-0.post@n5.nabble.com> Hi, I try to create my style class inherited from `vtkInteractorStyleImage.h` Actually i created, but it doesn't work. This is compile error ``` ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [src/Main] Error 1 make[1]: *** [src/CMakeFiles/Main.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... ``` This is my code: mySytleImage class ```cpp class StyleImage : public vtkInteractorStyleImage { public: static StyleImage* New(); vtkTypeMacro(StyleImage, vtkInteractorStyleImage); StyleImage(); virtual ~StyleImage(); void SetImageViewer(vtkResliceImageViewer* viewer); private: vtkSmartPointer m_viewer; }; /** * @brief Constructor */ StyleImage::StyleImage() = default; /** * @brief Destructor */ StyleImage::~StyleImage() = default; /* * @brief Set Image Viewer */ void StyleImage::SetImageViewer(vtkResliceImageViewer* viewer) { m_viewer = viewer; } ``` And I use like this ```cpp vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputData( m_image ); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->Render(); imageViewer->GetRenderer()->ResetCamera(); imageViewer->Render(); vtkSmartPointer style = vtkSmartPointer::New(); style->SetImageViewer(imageViewer); renderWindowInteractor->SetInteractorStyle(style); renderWindowInteractor->Start(); ``` What's wrong? I think i need `vtkStandardNewMacro`, but i don't understand why this macro is needed and how to use it. please help me -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From shayan.moradkhani at gmail.com Tue Jun 26 06:51:26 2018 From: shayan.moradkhani at gmail.com (shayan moradkhani) Date: Tue, 26 Jun 2018 03:51:26 -0700 (MST) Subject: [vtkusers] real-time simulation Message-ID: <1530010286739-0.post@n5.nabble.com> hi, i`m totally new to vtk and at the moment, i`m stuck in library configurations... i would like to know if vtk allows real-time simulation. im coding in c++ and im going to simulate an inverse kinematics of a 7-degrees of freedom robot. by real-time i mean, applying translation and rotation as soon as i give the inputs. Untitled.png im attaching a picture, not sure if its gonna work, but here is the scenario: im generating inputs using PLC every 5ms or my inputs are going to be via joystick, then i want to move the robot as soon as VTK receives it. PLC has interface with C++ and im coding in C++ for VTK as well. any help would be appreciated -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From pbergeron at spiria.com Tue Jun 26 08:27:38 2018 From: pbergeron at spiria.com (Patrick Bergeron) Date: Tue, 26 Jun 2018 12:27:38 +0000 Subject: [vtkusers] real-time simulation In-Reply-To: <1530010286739-0.post@n5.nabble.com> References: <1530010286739-0.post@n5.nabble.com> Message-ID: <5E4CFC88-96C3-47CF-9324-33627B3822AB@spiria.com> Hi Shayan, At 5 ms per frame, you're looking at 200 fps for the display. VTK can certainly compute 7 matrices quickly enough. The real question is, can the geometry of your robot be displayed at 200 fps just as-is? That depends more on the complexity of your geometry and your model than VTK's ability to compute 7 matrices. I would certainly give VTK a try. It sounds like VTK would be a good fit for this. Patrick. ?On 2018-06-26, 6:51 AM, "vtkusers on behalf of shayan moradkhani" wrote: hi, i`m totally new to vtk and at the moment, i`m stuck in library configurations... i would like to know if vtk allows real-time simulation. im coding in c++ and im going to simulate an inverse kinematics of a 7-degrees of freedom robot. by real-time i mean, applying translation and rotation as soon as i give the inputs. Untitled.png im attaching a picture, not sure if its gonna work, but here is the scenario: im generating inputs using PLC every 5ms or my inputs are going to be via joystick, then i want to move the robot as soon as VTK receives it. PLC has interface with C++ and im coding in C++ for VTK as well. any help would be appreciated -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers From shayan.moradkhani at gmail.com Tue Jun 26 08:40:21 2018 From: shayan.moradkhani at gmail.com (shayan moradkhani) Date: Tue, 26 Jun 2018 05:40:21 -0700 (MST) Subject: [vtkusers] real-time simulation In-Reply-To: <5E4CFC88-96C3-47CF-9324-33627B3822AB@spiria.com> References: <1530010286739-0.post@n5.nabble.com> <5E4CFC88-96C3-47CF-9324-33627B3822AB@spiria.com> Message-ID: <1530016821892-0.post@n5.nabble.com> hi, thank you very much for your reply. honestly i have no idea about these numbers or that VTK solving matrices. where should i start from? something like loading two very simple CAD models and moving them relatively. there is not much tutorials for c++. if i get the concept of how transformation works in VTK, i might be able to get going. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From pbergeron at spiria.com Tue Jun 26 08:57:35 2018 From: pbergeron at spiria.com (Patrick Bergeron) Date: Tue, 26 Jun 2018 12:57:35 +0000 Subject: [vtkusers] real-time simulation In-Reply-To: <1530016821892-0.post@n5.nabble.com> References: <1530010286739-0.post@n5.nabble.com> <5E4CFC88-96C3-47CF-9324-33627B3822AB@spiria.com>, <1530016821892-0.post@n5.nabble.com> Message-ID: Hi Shayan, It's true, using VTK for the first time can be a bit confusing. Getting the concept of the different data and transformation pipelines, as well as the rendering process, can be somewhat confusing, especially if you're new to 3D programming. If you are an experienced 3D developer, you should pick things up quickly, however. I would start here: https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TransformPipeline Regards Patrick. ________________________________ From: vtkusers on behalf of shayan moradkhani Sent: June 26, 2018 8:40:21 AM To: vtkusers at vtk.org Subject: Re: [vtkusers] real-time simulation hi, thank you very much for your reply. honestly i have no idea about these numbers or that VTK solving matrices. where should i start from? something like loading two very simple CAD models and moving them relatively. there is not much tutorials for c++. if i get the concept of how transformation works in VTK, i might be able to get going. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From marvin.huber at basf.com Tue Jun 26 09:16:32 2018 From: marvin.huber at basf.com (marf) Date: Tue, 26 Jun 2018 06:16:32 -0700 (MST) Subject: [vtkusers] Using vtk.js inside an angular project Message-ID: <1530018992136-0.post@n5.nabble.com> Hello, I'm trying to use vtk.js and angular together in a project and was just trying to get a basic setup running for now, but sadly whenever I try to build my project through npm run start it fails with the following errors, could anybody help me? I'm lost and couldn't really find anything. My guess would be that my webpack config is incomplete or anything, so I'll add that, too. But even if the error is in there, my knowledge in that topic is far to vague to figure the issue out myself. Error: WARNING in ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js 1293:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was not found in './ComputeGradients.worker.js' ERROR in ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeVS.glsl Module parse failed: Unexpected token (18:10) You may need an appropriate loader to handle this file type. | =========================================================================*/ | | attribute vec4 vertexDC; | | varying vec3 vertexVCVSOutput; ERROR in ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkPolyDataVS.glsl Module parse failed: Unexpected token (18:10) You may need an appropriate loader to handle this file type. | =========================================================================*/ | | attribute vec4 vertexMC; | | // frag position in VC ERROR in ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkSphereMapperVS.glsl Module parse failed: Unexpected token (19:10) You may need an appropriate loader to handle this file type. | // this shader implements imposters in OpenGL for Spheres | | attribute vec4 vertexMC; | attribute vec2 offsetMC; | ERROR in ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkStickMapperVS.glsl Module parse failed: Unexpected token (19:10) You may need an appropriate loader to handle this file type. | // this shader implements imposters in OpenGL for Sticks | | attribute vec4 vertexMC; | attribute vec3 orientMC; | attribute vec4 offsetMC; ERROR in ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkPolyDataFS.glsl Module parse failed: Unexpected token (19:8) You may need an appropriate loader to handle this file type. | // Template for the polydata mappers fragment shader | | uniform int PrimitiveIDOffset; | | // VC position of this fragment ERROR in ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeFS2.glsl Module parse failed: Unexpected token (22:8) You may need an appropriate loader to handle this file type. | //VTK::Output::Dec | | varying vec3 vertexVCVSOutput; | | // camera values ERROR in ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl Module parse failed: Unexpected token (22:8) You may need an appropriate loader to handle this file type. | //VTK::Output::Dec | | varying vec3 vertexVCVSOutput; | | // camera values webpack.config.js (I really didn't change anything in here since I barely get what the stuff is for... also this website didn't help me either: https://kitware.github.io/vtk-js/docs/intro_vtk_as_es6_dependency.html ) const webpack = require('webpack'); const path = require('path'); const entry = path.join(__dirname, './Source/index.js'); const sourcePath = path.join(__dirname, './Source'); const outputPath = path.join(__dirname, './dist'); const vtkRules = require('./Utilities/config/rules-vtk.js'); const linterRules = require('./Utilities/config/rules-linter.js'); module.exports = { entry, output: { path: outputPath, filename: 'vtk.js', libraryTarget: 'umd', }, module: { rules: [ { test: entry, loader: 'expose-loader?vtk' }, ].concat(linterRules, vtkRules), }, resolve: { modules: [ path.resolve(__dirname, 'node_modules'), sourcePath, ], alias: { 'vtk.js': __dirname, }, }, }; Thank you guys so much in advance -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From shayan.moradkhani at gmail.com Tue Jun 26 09:25:54 2018 From: shayan.moradkhani at gmail.com (shayan moradkhani) Date: Tue, 26 Jun 2018 06:25:54 -0700 (MST) Subject: [vtkusers] error Message-ID: <1530019554705-0.post@n5.nabble.com> does anyone know what these errors are for? vtk.JPG -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From pbergeron at spiria.com Tue Jun 26 09:35:59 2018 From: pbergeron at spiria.com (Patrick Bergeron) Date: Tue, 26 Jun 2018 13:35:59 +0000 Subject: [vtkusers] error In-Reply-To: <1530019554705-0.post@n5.nabble.com> References: <1530019554705-0.post@n5.nabble.com> Message-ID: Which version of VTK are you using? The latest? Since a while ago, VTK has a new OpenGL rendering backend. Try initializing OpenGL2 instead of OpenGL. (just add a "2") ________________________________ From: vtkusers on behalf of shayan moradkhani Sent: June 26, 2018 9:25:54 AM To: vtkusers at vtk.org Subject: [vtkusers] error does anyone know what these errors are for? vtk.JPG -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Jun 26 10:48:39 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 26 Jun 2018 08:48:39 -0600 Subject: [vtkusers] Using vtk.js inside an angular project In-Reply-To: <1530018992136-0.post@n5.nabble.com> References: <1530018992136-0.post@n5.nabble.com> Message-ID: Do you see the difference between the documentation doing this: var vtkRules = require('vtk.js/Utilities/config/dependency.js').webpack.v2.rules; [...] module: { rules: [ { test: entry, loader: "expose-loader?MyWebApp" }, { test: /\.html$/, loader: 'html-loader' }, ].concat(vtkRules), }, versus what you are doing below? const vtkRules = require('./Utilities/config/rules-vtk.js'); const linterRules = require('./Utilities/config/rules-linter.js'); [...] module: { rules: [ { test: entry, loader: 'expose-loader?vtk' }, ].concat(linterRules, vtkRules), }, The big difference in those two is the way the rules are defined to interpret specific files (glsl, WebWorkers...). In your case (taken from vtk.js webpack) you use rules that expect the vtk.js files to be in ./Sources/** while in the top case we expect to find the vtk.js files under ./node_modules/vtk.js/Sources/** as you are going to use vtk.js as a dependency not as a first class citizen of your project. HTH, Seb On Tue, Jun 26, 2018 at 7:16 AM marf wrote: > Hello, I'm trying to use vtk.js and angular together in a project and was > just trying to get a basic setup running for now, but sadly whenever I try > to build my project through > npm run start > it fails with the following errors, could anybody help me? I'm lost and > couldn't really find anything. My guess would be that my webpack config is > incomplete or anything, so I'll add that, too. But even if the error is in > there, my knowledge in that topic is far to vague to figure the issue out > myself. > > > > Error: > > WARNING in ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js > 1293:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was not > found in './ComputeGradients.worker.js' > > ERROR in > ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeVS.glsl > Module parse failed: Unexpected token (18:10) > You may need an appropriate loader to handle this file type. > | > =========================================================================*/ > | > | attribute vec4 vertexDC; > | > | varying vec3 vertexVCVSOutput; > ERROR in > ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkPolyDataVS.glsl > Module parse failed: Unexpected token (18:10) > You may need an appropriate loader to handle this file type. > | > =========================================================================*/ > | > | attribute vec4 vertexMC; > | > | // frag position in VC > ERROR in > ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkSphereMapperVS.glsl > Module parse failed: Unexpected token (19:10) > You may need an appropriate loader to handle this file type. > | // this shader implements imposters in OpenGL for Spheres > | > | attribute vec4 vertexMC; > | attribute vec2 offsetMC; > | > ERROR in > ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkStickMapperVS.glsl > Module parse failed: Unexpected token (19:10) > You may need an appropriate loader to handle this file type. > | // this shader implements imposters in OpenGL for Sticks > | > | attribute vec4 vertexMC; > | attribute vec3 orientMC; > | attribute vec4 offsetMC; > ERROR in > ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkPolyDataFS.glsl > Module parse failed: Unexpected token (19:8) > You may need an appropriate loader to handle this file type. > | // Template for the polydata mappers fragment shader > | > | uniform int PrimitiveIDOffset; > | > | // VC position of this fragment > ERROR in > ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeFS2.glsl > Module parse failed: Unexpected token (22:8) > You may need an appropriate loader to handle this file type. > | //VTK::Output::Dec > | > | varying vec3 vertexVCVSOutput; > | > | // camera values > ERROR in > ./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl > Module parse failed: Unexpected token (22:8) > You may need an appropriate loader to handle this file type. > | //VTK::Output::Dec > | > | varying vec3 vertexVCVSOutput; > | > | // camera values > > > > webpack.config.js (I really didn't change anything in here since I barely > get what the stuff is for... also this website didn't help me either: > https://kitware.github.io/vtk-js/docs/intro_vtk_as_es6_dependency.html ) > > const webpack = require('webpack'); > const path = require('path'); > > const entry = path.join(__dirname, './Source/index.js'); > const sourcePath = path.join(__dirname, './Source'); > const outputPath = path.join(__dirname, './dist'); > > const vtkRules = require('./Utilities/config/rules-vtk.js'); > const linterRules = require('./Utilities/config/rules-linter.js'); > > module.exports = { > entry, > output: { > path: outputPath, > filename: 'vtk.js', > libraryTarget: 'umd', > }, > module: { > rules: [ > { test: entry, loader: 'expose-loader?vtk' }, > ].concat(linterRules, vtkRules), > }, > resolve: { > modules: [ > path.resolve(__dirname, 'node_modules'), > sourcePath, > ], > alias: { > 'vtk.js': __dirname, > }, > }, > }; > > > > Thank you guys so much in advance > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivameline at gmail.com Tue Jun 26 11:29:44 2018 From: olivameline at gmail.com (Olivier Ameline) Date: Tue, 26 Jun 2018 08:29:44 -0700 (MST) Subject: [vtkusers] Problem with Crystal Eyes stereo and QVTKWidget Message-ID: <1530026984849-0.post@n5.nabble.com> Hello, I have a polydata that I want to render in stereo inside a QVTK Widget. For this I use the C++ code renderWindow->StereoCapableWindowOn(); renderWindow->SetStereoTypeToCrystalEyes(); renderWindow->SetStereoRender(1); renderWindow->StereoUpdate(); which does not work. There is no error message, but the polydata is not displayed in stereo. When I use renderWindow->SetStereoTypeToAnaglyph(); instead of renderWindow->SetStereoTypeToCrystalEyes(); the anaglyph type works. I'm in Linux Fedora with VTK 6.3 and a Nvidia Quadro card. I can run successfully stereo examples (like glxgears -stereo). Furthermore, the Crystal Eyes stereo works on my polydata when I use a vtkRenderWindowInteractor, but I would prefer to use the QVTK Widget. Do you know what's wrong with QVTK Widget and Crystal Eyes stereo in VTK 6.3 ? Thanks Olivier. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tsilveira1993 at gmail.com Tue Jun 26 12:04:34 2018 From: tsilveira1993 at gmail.com (mafiaskafia) Date: Tue, 26 Jun 2018 09:04:34 -0700 (MST) Subject: [vtkusers] Gridline as the background in VTK (Python) Message-ID: <1530029074557-0.post@n5.nabble.com> Hello, I would like to know if it's possible to have a gridline as the background of the vtkRenderer (instead of a blank color) like this: . I'm doing a program that does a 2D cross-section analysis using FEM (gives its centroid, inertias, etc), so i would need a gridline to display, for example, the centroids more efficiently. Is this possible with vtk? Thanks in advance, Cheers -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From andrew.slaughter at inl.gov Tue Jun 26 12:44:40 2018 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Tue, 26 Jun 2018 10:44:40 -0600 Subject: [vtkusers] Gridline as the background in VTK (Python) In-Reply-To: <1530029074557-0.post@n5.nabble.com> References: <1530029074557-0.post@n5.nabble.com> Message-ID: Here is a script that builds an empty plot, this should be a good starting point. #!/usr/bin/env python import vtk chart = vtk.vtkChartXY() plot = vtk.vtkPlotPoints() chart.AddPlot(plot) view = vtk.vtkContextActor() view.GetScene().AddItem(chart) renderer = vtk.vtkRenderer() renderer.AddActor(view) renderer.SetBackground(0.5,0.5,0.5) window = vtk.vtkRenderWindow() window.SetSize(500, 500) window.AddRenderer(renderer) interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(window) interactor.Initialize() window.Render() interactor.Start() On Tue, Jun 26, 2018 at 10:04 AM, mafiaskafia wrote: > Hello, I would like to know if it's possible to have a gridline as the > background of the vtkRenderer (instead of a blank color) like this: > 3A__vtk.1045678.n5.nabble.com_file_t342418_halpaa.png&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=oXz2Jh2vN4kLzvKkknrbCJz0YhnBRG > hw5Oytmjuqv4Q&s=TLZky1NKFTXcRhpwzuI0rtCdYor9i-XOTRQT_tXZTls&e=> . > I'm doing a program that does a 2D cross-section analysis using FEM (gives > its centroid, inertias, etc), so i would need a gridline to display, for > example, the centroids more efficiently. Is this possible with vtk? > > Thanks in advance, > > Cheers > > > > -- > Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__vtk. > 1045678.n5.nabble.com_VTK-2DUsers-2Df1224199.html&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=oXz2Jh2vN4kLzvKkknrbCJz0YhnBRG > hw5Oytmjuqv4Q&s=vqQZY9HpqApGkjO-xUu9-bSVQyT9CuBb_nbJGELav54&e= > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at https://urldefense.proofpoint. > com/v2/url?u=http-3A__www.kitware.com_opensource_ > opensource.html&d=DwICAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m= > oXz2Jh2vN4kLzvKkknrbCJz0YhnBRGhw5Oytmjuqv4Q&s= > bm9lMiY6joExtUXYwzqpu7xPGz7LiO51nameV0Yj-iQ&e= > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk. > org_Wiki_VTK-5FFAQ&d=DwICAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m= > oXz2Jh2vN4kLzvKkknrbCJz0YhnBRGhw5Oytmjuqv4Q&s= > udQgCHTjRSQUvCf1nmOocbHzgTS2Z5EB13hWSWkydnE&e= > > Search the list archives at: https://urldefense.proofpoint. > com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=oXz2Jh2vN4kLzvKkknrbCJz0YhnBRG > hw5Oytmjuqv4Q&s=ojtBttbLzoXPQuYZStnqlpuBAJhO_tK3LH4yON5Fn10&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__public. > kitware.com_mailman_listinfo_vtkusers&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=oXz2Jh2vN4kLzvKkknrbCJz0YhnBRG > hw5Oytmjuqv4Q&s=qH_Xrf6LTnD1ebDxNhFzLVSD_n-BF-4pJOHa1Z6uOTk&e= > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alican1812 at hotmail.com Tue Jun 26 13:38:37 2018 From: alican1812 at hotmail.com (alican) Date: Tue, 26 Jun 2018 10:38:37 -0700 (MST) Subject: [vtkusers] Letters of Support for VTK proposal In-Reply-To: References: Message-ID: <1530034717226-0.post@n5.nabble.com> Should this letter be in the paper form or can I send an e-mail? You mentioned that a scanned PDF is OK, but where to send? To which email address? Sorry, if I have missed something obvious. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mario at emmenlauer.de Tue Jun 26 14:12:47 2018 From: mario at emmenlauer.de (Mario Emmenlauer) Date: Tue, 26 Jun 2018 20:12:47 +0200 Subject: [vtkusers] Letters of Support for VTK proposal In-Reply-To: <1530034717226-0.post@n5.nabble.com> References: <1530034717226-0.post@n5.nabble.com> Message-ID: <85e86da7-d928-a6d0-741c-99b96f6f6b11@emmenlauer.de> On 26.06.2018 19:38, alican wrote: > Should this letter be in the paper form or can I send an e-mail? > You mentioned that a scanned PDF is OK, but where to send? To which email > address? > Sorry, if I have missed something obvious. The examples that Will Schroeder sent where all addressed to him personally. Therefore I think it is safe to assume that you can send the letter of support to him directly (off-list). All the best, Mario Emmenlauer -- BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203 Balanstr. 43 mailto: memmenlauer * biodataanalysis.de D-81669 M?nchen http://www.biodataanalysis.de/ From cganterh at gmail.com Tue Jun 26 15:41:00 2018 From: cganterh at gmail.com (=?UTF-8?Q?Crist=C3=B3bal_Ganter?=) Date: Tue, 26 Jun 2018 15:41:00 -0400 Subject: [vtkusers] Selecting GPU card to run VTK based software Message-ID: Hello, I need to select a graphics card that will be used to run VTK based software. From what I understand this is not an easy task since the performance of a GPU will depend on the specific application, drivers and other parameters of the machine. I have also read that different GPU brands can't be really compared and that rather than focusing on specific features of GPUs one should compare them in terms of specific benchmarks. While there is a benchmark for VTK (a sphere) I am not really sure if the benchmark and the results are up to date. I also don't think that benchmark would correctly approximate the characteristics of the application we want to run. Despite all, I was thinking there may be one or two parameters of GPUs that may correlate with an improvement of the rendering speed in VTK applications. I hope you may have this information or maybe some guidelines on how to proceed when selecting graphic cards. Best regards, Crist?bal -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Jun 26 16:06:47 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 26 Jun 2018 16:06:47 -0400 Subject: [vtkusers] Selecting GPU card to run VTK based software In-Reply-To: References: Message-ID: In general VTK's performance will generally align with most modern graphics benchmarks. A quick cheat sheet of 15 or so modern cards with relative performance score. memory size, and pricing is here https://www.tomshardware.com/reviews/gpu-hierarchy,4388.html Other considerations: if on linux you might want to look into who has better drivers. On windows AMD and nvidia are both pretty solid with a slight edge to nvidia. Scientific viz sometimes deals with large data so the memory of your GPU can make a big difference (where in gaming benchmarks it may not) So if you know you want to visualize large data then look for larger GPU memory. Some cards come in multiple varieties 2GB/4GB or 4GB/6GB etc so it might be worth it to go for a larger size. VTK generally does not require a "workstation" or "certified" card (unless doing shuttered glasses). A regular gaming card works fine for 99.9% of use cases. I'm sure if you provide some more specifics such as platform, budget, typical visualization size/task some folks might have specific recommendations. Ken On Tue, Jun 26, 2018 at 3:41 PM Crist?bal Ganter wrote: > Hello, > > I need to select a graphics card that will be used to run VTK based > software. From what I understand this is not an easy task since the > performance of a GPU will depend on the specific application, drivers and > other parameters of the machine. I have also read that different GPU brands > can't be really compared and that rather than focusing on specific features > of GPUs one should compare them in terms of specific benchmarks. > > While there is a benchmark for VTK (a sphere) I am not really sure if the > benchmark and the results are up to date. I also don't think that benchmark > would correctly approximate the characteristics of the application we want > to run. > > Despite all, I was thinking there may be one or two parameters of GPUs > that may correlate with an improvement of the rendering speed in VTK > applications. I hope you may have this information or maybe some guidelines > on how to proceed when selecting graphic cards. > > Best regards, > Crist?bal > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rubendibattista at gmail.com Tue Jun 26 16:34:07 2018 From: rubendibattista at gmail.com (Ruben Di Battista) Date: Tue, 26 Jun 2018 16:34:07 -0400 Subject: [vtkusers] Display different ImageData Scalar to different Viewport In-Reply-To: References: Message-ID: Hello David, I reali lurked in the Classes reference and in the documentation and I cannot find a method to select which data array to plot in a PolyDataMapper. So just to resume for other readers: I have a PolyData object that stores two PointData Double Arrays. I would like to know how, once I set up the PolyDataMapper, I choose which of the two ?scalars? I want to render in the RenderWindow. What I tried so far: - polydata_object.GetPointData().SetActiveScalars(i) - polydata_mapper_object.SetArrayName(array_names[i]) - polydata_mapper_object.ColorByArrayComponent(array_names[i], 0) # This seems to be for vector fields Thanks for your kind help, _ -. .? |???? ', ; |?????? ?? |????????? RdB ,., |?????? .' '. |???? -' `? http://rdb.is On 1 giugno 2018 a 09:13:33, David Gobbi (david.gobbi at gmail.com) scritto: There might be other settings for the mapper that are needed in addition to SetArrayName(). Take a look at the docs for vtkMapper, it has lots of methods related to scalars. On Fri, Jun 1, 2018 at 7:53 AM, Ruben Di Battista wrote: > Hello David, > > thanks for your answer. > > I changed my `show` method like this: > > def show(self): > # Render Window > rw = vtk.vtkRenderWindow() > rw.SetSize(800, 800) > > # Defining Bounds of Viewports > xmins = [0, 0.5] > xmaxs = [0.5, 1] > ymins = [0, 0] > ymaxs = [1, 1] > > # Curvature Types > curv_types = ['Mean_Curvature', 'Gauss_Curvature'] > > for i in six.moves.range(2): > > render = vtk.vtkRenderer() > rw.AddRenderer(render) > > # Mean Curvature View > render.SetViewport(xmins[i], ymins[i], xmaxs[i], ymaxs[i]) > > # Create mapper > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputData(self.surface) > mapper.Update() # Probably useless > mapper.SetScalarRange(-1, 1) > mapper.SetArrayName(curv_types[0]) > mapper.Update() > > # ColorBar > color_bar = vtk.vtkScalarBarActor() > color_bar.SetLookupTable(mapper.GetLookupTable()) > > # Surface Actor > actor = vtk.vtkActor() > actor.SetMapper(mapper) > actor.GetProperty().EdgeVisibilityOn() > > render.AddActor(actor) > render.AddActor2D(color_bar) > > import ipdb > ipdb.set_trace() > > # Render Window Interactor > rwi = vtk.vtkRenderWindowInteractor() > rwi.SetRenderWindow(rw) > > rwi.Initialize() > rwi.Start() > > but it's not working. > > Actually stopping the execution at the first iteration of the `for` loop, > and then triggering rwi.Initialize() and rwi.Start() just after the first > iteration still shows that the Mapper is rendering the last scalar added to > the `PolyData` and not the one specified by `mapper.SetArrayName`. > > In my previous email, at least, if I stopped the execution at the first > iteration and then manually triggering the rendering, was correctly showing > the first scalar (i.e. `Mean_Curvatures`). > > I'm still attaching the complete example. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Tue Jun 26 22:36:13 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Wed, 27 Jun 2018 04:36:13 +0200 Subject: [vtkusers] Problem with Crystal Eyes stereo and QVTKWidget In-Reply-To: <1530026984849-0.post@n5.nabble.com> References: <1530026984849-0.post@n5.nabble.com> Message-ID: Hello, They are a few bugs in QVTKWidget, which is now deprecated. A new Implementation as landed in VTK master recently. You may want to try the new QVTKOpenGLWidget in VTK master (ba5ccaba94c7681b7c95b7a38fac50f87ceb29a6). Best regards, Mathieu Westphal On Tue, Jun 26, 2018 at 5:29 PM, Olivier Ameline wrote: > Hello, > > I have a polydata that I want to render in stereo inside a QVTK Widget. > > For this I use the C++ code > > renderWindow->StereoCapableWindowOn(); > renderWindow->SetStereoTypeToCrystalEyes(); > renderWindow->SetStereoRender(1); > renderWindow->StereoUpdate(); > > which does not work. There is no error message, but the polydata is not > displayed in stereo. > > > When I use > > renderWindow->SetStereoTypeToAnaglyph(); > > instead of > > renderWindow->SetStereoTypeToCrystalEyes(); > > the anaglyph type works. > > > I'm in Linux Fedora with VTK 6.3 and a Nvidia Quadro card. > I can run successfully stereo examples (like glxgears -stereo). > > Furthermore, the Crystal Eyes stereo works on my polydata when I use a > vtkRenderWindowInteractor, but I would prefer to use the QVTK Widget. > > > Do you know what's wrong with QVTK Widget and Crystal Eyes stereo in VTK > 6.3 > ? > > Thanks > > Olivier. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shayan.moradkhani at gmail.com Wed Jun 27 05:14:14 2018 From: shayan.moradkhani at gmail.com (shayan moradkhani) Date: Wed, 27 Jun 2018 02:14:14 -0700 (MST) Subject: [vtkusers] vtkOBJReader example for C++ In-Reply-To: References: Message-ID: <1530090854298-0.post@n5.nabble.com> hi, what is the problem with this code snippet: Capture.JPG i followed the obj-reader link and only changed the file name. but still getting nothing -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From will.schroeder at kitware.com Wed Jun 27 07:32:19 2018 From: will.schroeder at kitware.com (Will Schroeder) Date: Wed, 27 Jun 2018 07:32:19 -0400 Subject: [vtkusers] Letters of Support for VTK proposal In-Reply-To: <1530034717226-0.post@n5.nabble.com> References: <1530034717226-0.post@n5.nabble.com> Message-ID: Email is fine. You can send it to me will.schroeder at kitware.com Thanks! On Tue, Jun 26, 2018 at 1:38 PM alican wrote: > Should this letter be in the paper form or can I send an e-mail? > You mentioned that a scanned PDF is OK, but where to send? To which email > address? > Sorry, if I have missed something obvious. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- William J. Schroeder, PhD Kitware, Inc. - Building the World's Technical Computing Software 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marvin.huber at basf.com Wed Jun 27 07:39:07 2018 From: marvin.huber at basf.com (marf) Date: Wed, 27 Jun 2018 04:39:07 -0700 (MST) Subject: [vtkusers] Using vtk.js inside an angular project In-Reply-To: References: <1530018992136-0.post@n5.nabble.com> Message-ID: <1530099547393-0.post@n5.nabble.com> Thank you soso much, I had to do some more tweaking but you pointed me in the exactly right direction. Now everything is kind of working, but I'm wonderting wether there is any alternative to running it all through webpack? Since it takes a lot of time to compile for me and I would love to be a little more flexible. If there isn't I guess I can still make it work Marvin -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From shayan.moradkhani at gmail.com Wed Jun 27 08:31:37 2018 From: shayan.moradkhani at gmail.com (shayan moradkhani) Date: Wed, 27 Jun 2018 05:31:37 -0700 (MST) Subject: [vtkusers] 3D object transformation Message-ID: <1530102697801-0.post@n5.nabble.com> hi, i have been following this link: https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TransformPipeline unfortunately i cant figure out how this transformations are working, why transformation happens with mouse input, and how to make it mouse-independent. if anyone has an idea, that would be very nice. i can see that using SetCenter positions the objects. how can i control this using either arrow keys or a timer?(i found a python example but cant figure out how c++ version would be) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From thomas_sgouros at brown.edu Wed Jun 27 09:06:29 2018 From: thomas_sgouros at brown.edu (Sgouros, Thomas) Date: Wed, 27 Jun 2018 09:06:29 -0400 Subject: [vtkusers] vtkOBJReader example for C++ In-Reply-To: <1530090854298-0.post@n5.nabble.com> References: <1530090854298-0.post@n5.nabble.com> Message-ID: Hi: I'm afraid I don't have any useful advice about your issue, but there are two OBJ readers in VTK, and I have found more satisfaction using objImporter, which has much more of the functionality I'd expect to find in an OBJ handling class. -Tom On Wed, Jun 27, 2018 at 5:14 AM, shayan moradkhani < shayan.moradkhani at gmail.com> wrote: > hi, > what is the problem with this code snippet: > Capture.JPG > > i followed the obj-reader link and only changed the file name. but still > getting nothing > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emonclus at cs.upc.edu Wed Jun 27 09:06:58 2018 From: emonclus at cs.upc.edu (=?UTF-8?Q?Eva_Moncl=c3=bas?=) Date: Wed, 27 Jun 2018 15:06:58 +0200 Subject: [vtkusers] Visualize a volume slice on a 3D plane (the acquisition plane of the images) Message-ID: <48c0dc5e-53e5-52f2-fc1c-b331f20bbbd2@cs.upc.edu> Hello everyone, I'm working with a volume dataset (temporal Dicom serie) and I?m able to visualize the? slices using the following vtk C++ classes: * vtkImageData: represents the volume dataset * vtkImageMapToColors: I use this class to define the transfer function to be used in the rendering * vtkImageActor: I use this class to render a specific slice of the volume dataset Until here everything it is fine. I can render the slice I want using the classes before mentioned changing the SetDisplayExtent of the vtkImageActor. Now I want to visualize the output of my vtkImageActor as a 2D texture in a free 3D plane.? Then, I consider to have the following classes: * ?I use a vtkPlaneSource to define the? 3D plane: orientation and position * a vtkTexture that has to be attached to the vtkPlaneSource. My problem comes out with the definition of the SetInputConnection of the vtkTexture. I want to define the? image as the output of the vtkImageActor. But? I do not get it. I am successful in visualizing the vtkPlane in black? color (due to the texture is not well defined) unfortunately, I can't get it to work properly? with a texture of a specific slice of the volume dataset. I have tried different ways of assigning the SetInputConnection of the vtkTexture using the vtkImageActor, but none of them worked well. Any help will be welcome.? Thank you very much in advance, ?? Eva -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Wed Jun 27 09:22:21 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 27 Jun 2018 09:22:21 -0400 Subject: [vtkusers] Visualize a volume slice on a 3D plane (the acquisition plane of the images) In-Reply-To: <48c0dc5e-53e5-52f2-fc1c-b331f20bbbd2@cs.upc.edu> References: <48c0dc5e-53e5-52f2-fc1c-b331f20bbbd2@cs.upc.edu> Message-ID: Hi Eva, vtkImageActor is a 2D textured plane in a 3D space. Make sure that you use the vtkImageMapper3D (default mapper) with it. If you?re just looking for 3D interaction with the actor, use an interactor style like vtkInteractorStyleTrackballCamera. Hope that helps. Thanks, Sankhesh ? On Wed, Jun 27, 2018 at 9:17 AM Eva Moncl?s wrote: > Hello everyone, > > I'm working with a volume dataset (temporal Dicom serie) and I?m able to > visualize the slices using the following vtk C++ classes: > > - vtkImageData: represents the volume dataset > - vtkImageMapToColors: I use this class to define the transfer > function to be used in the rendering > - vtkImageActor: I use this class to render a specific slice of the > volume dataset > > Until here everything it is fine. I can render the slice I want using the > classes before mentioned changing the SetDisplayExtent of the vtkImageActor. > > Now I want to visualize the output of my vtkImageActor as a 2D texture in > a free 3D plane. Then, I consider to have the following classes: > > - I use a vtkPlaneSource to define the 3D plane: orientation and > position > - a vtkTexture that has to be attached to the vtkPlaneSource. My > problem comes out with the definition of the SetInputConnection of the > vtkTexture. I want to define the image as the output of the vtkImageActor. > But I do not get it. > > I am successful in visualizing the vtkPlane in black color (due to the > texture is not well defined) unfortunately, I can't get it to work > properly with a texture of a specific slice of the volume dataset. I have > tried different ways of assigning the SetInputConnection of the vtkTexture > using the vtkImageActor, but none of them worked well. > > Any help will be welcome. Thank you very much in advance, > > Eva > > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From emonclus at cs.upc.edu Wed Jun 27 09:48:51 2018 From: emonclus at cs.upc.edu (=?UTF-8?Q?Eva_Moncl=c3=bas?=) Date: Wed, 27 Jun 2018 15:48:51 +0200 Subject: [vtkusers] Visualize a volume slice on a 3D plane (the acquisition plane of the images) In-Reply-To: References: <48c0dc5e-53e5-52f2-fc1c-b331f20bbbd2@cs.upc.edu> Message-ID: Thanks a lot for the quickly answer, but my problem is that I want to use the output of the vtkImageActor in a different graphic object (another 3D plane) and I do not know how to manage it. In very, very technical words, I want to get access to the unsigned char * that it is being rendering using the vtkImageActor. Thanks in advance, ??? Eva On 27/06/2018 15:22, Sankhesh Jhaveri wrote: > > Hi Eva, > > |vtkImageActor| is a 2D textured plane in a 3D space. Make sure that > you use the |vtkImageMapper3D| (default mapper) with it. > If you?re just looking for 3D interaction with the actor, use an > interactor style like |vtkInteractorStyleTrackballCamera|. > > Hope that helps. > > Thanks, > Sankhesh > > ? > > On Wed, Jun 27, 2018 at 9:17 AM Eva Moncl?s > wrote: > > Hello everyone, > > I'm working with a volume dataset (temporal Dicom serie) and I?m > able to visualize the? slices using the following vtk C++ classes: > > * vtkImageData: represents the volume dataset > * vtkImageMapToColors: I use this class to define the transfer > function to be used in the rendering > * vtkImageActor: I use this class to render a specific slice of > the volume dataset > > Until here everything it is fine. I can render the slice I want > using the classes before mentioned changing the SetDisplayExtent > of the vtkImageActor. > > Now I want to visualize the output of my vtkImageActor as a 2D > texture in a free 3D plane.? Then, I consider to have the > following classes: > > * ?I use a vtkPlaneSource to define the? 3D plane: orientation > and position > * a vtkTexture that has to be attached to the vtkPlaneSource. My > problem comes out with the definition of the > SetInputConnection of the vtkTexture. I want to define the? > image as the output of the vtkImageActor. But? I do not get it. > > I am successful in visualizing the vtkPlane in black? color (due > to the texture is not well defined) unfortunately, I can't get it > to work properly? with a texture of a specific slice of the volume > dataset. I have tried different ways of assigning the > SetInputConnection of the vtkTexture using the vtkImageActor, but > none of them worked well. > > Any help will be welcome.? Thank you very much in advance, > > ?? Eva > > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -- > > > Sankhesh Jhaveri > > > /Sr. Research & Development Engineer/ | Kitware > | (518) 881-4417 > > ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Wed Jun 27 10:12:06 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 27 Jun 2018 10:12:06 -0400 Subject: [vtkusers] Visualize a volume slice on a 3D plane (the acquisition plane of the images) In-Reply-To: References: <48c0dc5e-53e5-52f2-fc1c-b331f20bbbd2@cs.upc.edu> Message-ID: You should be able to get the output of the mapper as vtkImageData and then use GetScalarPointer() to access the raw data. ? On Wed, Jun 27, 2018 at 9:49 AM Eva Moncl?s wrote: > Thanks a lot for the quickly answer, but my problem is that I want to use > the output of the vtkImageActor in a different graphic object (another 3D > plane) and I do not know how to manage it. > > In very, very technical words, I want to get access to the unsigned char * > that it is being rendering using the vtkImageActor. > > Thanks in advance, > > Eva > > > > On 27/06/2018 15:22, Sankhesh Jhaveri wrote: > > Hi Eva, > > vtkImageActor is a 2D textured plane in a 3D space. Make sure that you > use the vtkImageMapper3D (default mapper) with it. > If you?re just looking for 3D interaction with the actor, use an > interactor style like vtkInteractorStyleTrackballCamera. > > Hope that helps. > > Thanks, > Sankhesh > ? > > On Wed, Jun 27, 2018 at 9:17 AM Eva Moncl?s wrote: > >> Hello everyone, >> >> I'm working with a volume dataset (temporal Dicom serie) and I?m able to >> visualize the slices using the following vtk C++ classes: >> >> - vtkImageData: represents the volume dataset >> - vtkImageMapToColors: I use this class to define the transfer >> function to be used in the rendering >> - vtkImageActor: I use this class to render a specific slice of the >> volume dataset >> >> Until here everything it is fine. I can render the slice I want using the >> classes before mentioned changing the SetDisplayExtent of the vtkImageActor. >> >> Now I want to visualize the output of my vtkImageActor as a 2D texture in >> a free 3D plane. Then, I consider to have the following classes: >> >> - I use a vtkPlaneSource to define the 3D plane: orientation and >> position >> - a vtkTexture that has to be attached to the vtkPlaneSource. My >> problem comes out with the definition of the SetInputConnection of the >> vtkTexture. I want to define the image as the output of the vtkImageActor. >> But I do not get it. >> >> I am successful in visualizing the vtkPlane in black color (due to the >> texture is not well defined) unfortunately, I can't get it to work >> properly with a texture of a specific slice of the volume dataset. I have >> tried different ways of assigning the SetInputConnection of the vtkTexture >> using the vtkImageActor, but none of them worked well. >> >> Any help will be welcome. Thank you very much in advance, >> >> Eva >> >> >> >> _______________________________________________ >> 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > > > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From konrad.ley at valeo.com Wed Jun 27 11:32:57 2018 From: konrad.ley at valeo.com (Konrad LEY) Date: Wed, 27 Jun 2018 17:32:57 +0200 Subject: [vtkusers] Run VTK with OpenGL ES 2.0 backend Message-ID: Hello, I'm trying to run VTK on a Ultra96 board, which has a Mali-400 MP2 gpu supporting OpenGL ES 2.0. According to https://blog.kitware.com/raspberry-pi-likes-vtk/ VTK has a OpenGL ES 2.0 backend and runs on EGL. So I installed the libmali-dev package of my petalinux linux distribution, which is providing me the following files: /usr/include/EGL/egl.h /usr/include/EGL/eglext.h /usr/include/EGL/eglplatform.h /usr/include/GLES/gl.h /usr/include/GLES/glext.h /usr/include/GLES/glplatform.h /usr/include/GLES2/gl2.h /usr/include/GLES2/gl2ext.h /usr/include/GLES2/gl2platform.h /usr/include/KHR/khrplatform.h /usr/lib/libEGL.so /usr/lib/libGLESv1_CM.so /usr/lib/libGLESv2.so /usr/lib/libMali.so /usr/lib/pkconfig/egl.pc /usr/lib/pkconfig/glesv1.pc /usr/lib/pkconfig/glesv1_cm.pc /usr/lib/pkgconfig/glesv2.pc I can compile and run examples using OpenGL ES 2.0 now. Then I downloaded latest VTK-8.1.1 and ran cmake in the build folder. It complained about not finding OpenGL so I also installed libgl-mesa-dev package which is providing me: /usr/include/GL/gl.h /usr/include/GL/gl_mangle.h /usr/include/GL/glcorearb.h /usr/include/GL/glext.h /usr/include/GL/interal/dri_interface.h /usr/include/GL/mesa_glinterop.h /usr/include/GL/osmesa.h /usr/include/GL/wglext.h /usr/lib/libGL.la /usr/lib/libGL.so /usr/lib/pkgconfig/gl.pc After that CMake configuration completed. In the CMakeCache.txt I found out that VTK_HAS_EGL was set to OFF. I turned it ON. Then cmake complained about not finding EGL. So I had to manually set EGL_INCLUDE_DIR=/usr/include/EGL EGL_LIBRARY=/usr/lib/libEGL.so EGL_opengl_LIBRARY=/usr/lib/libGLESv2.so Compiling and installing works fine, but when I run the Sphere example it returns the error: ~# ./Sphere libGL error: unable to load driver: xilinx_drm_dri.so libGL error: driver pointer missing libGL error: failed to load driver: xilinx_drm ERROR: In /home/root/Downloads/VTK-8.1.1/Rendering/OpenGL/vtkOpenGLRenderWindow.cxx, line 785 vtkXOpenGLRenderWindow (0x25503fc0): GLEW could not be initialized. Segmentation fault How can I build for OpenGL ES 2.0 only? Correct me but I think there's something wrong when I have to install OpenGL with the libgl-mesa-dev package. Also GLEW is for Desktop OpenGL only? -- Viele Gr??e / Best regards / Sinc?res salutations Konrad Ley System Engineer Software Comfort and Driving Assistance Systems (CDA) Driving Assistance Research (DAR) Site Kronach Hummendorfer Str. 72 96317 Kronach Phone: E-Mail: konrad.ley at valeo.com Valeo Schalter und Sensoren GmbH Laiernstrasse 12 74321 Bietigheim-Bissingen, Sitz der Gesellschaft: 74321 Bietigheim-Bissingen Handelsregister: Amtsgericht Stuttgart - HRB 301795 Vorsitzender des Aufsichtsrates: Derrick Zechmair Gesch?ftsf?hrer: Jens H?lker, Martin Mandry, Stiv Michael Smudja, Pierre-Yves Veltois *This e-mail message is intended only for the use of the intended recipient(s). The information contained therein may be confidential or privileged, and its disclosure or reproduction is strictly prohibited. If you are not the intended recipient, please return it immediately to its sender at the above address and destroy it. * -- *This e-mail message is intended for the internal use of the intended recipient(s) only. The information contained herein is confidential/privileged. Its disclosure or reproduction is strictly prohibited. If you are not the intended recipient, please inform the sender immediately, do not disclose it internally or to third parties and destroy it.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsilveira1993 at gmail.com Wed Jun 27 11:35:00 2018 From: tsilveira1993 at gmail.com (mafiaskafia) Date: Wed, 27 Jun 2018 08:35:00 -0700 (MST) Subject: [vtkusers] Gridline as the background in VTK (Python) In-Reply-To: References: <1530029074557-0.post@n5.nabble.com> Message-ID: <1530113700999-0.post@n5.nabble.com> Thank you! Altough i need to make some adjustments -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tsilveira1993 at gmail.com Wed Jun 27 11:37:01 2018 From: tsilveira1993 at gmail.com (mafiaskafia) Date: Wed, 27 Jun 2018 08:37:01 -0700 (MST) Subject: [vtkusers] VTK centering vtkChartXY on polydata (Python) Message-ID: <1530113821565-0.post@n5.nabble.com> I'm trying to implement a gridline behind a vtkPolydata Object that represents a 2D mesh, so it's easier for the end-user to see it's dimensions. I managed to implement a gridline using vtkChartXY, but i couldn't figure out how i could set the origin of the gridline to be on the center of the vtkPolyData object, and also how i could make the gridline appear before the Object and not after like this: This is the code i used to make the gridline: def openGL_Design(self): self.chart = vtk.vtkChartXY() self.plot = vtk.vtkPlotPoints() self.chart.AddPlot(self.plot) self.view = vtk.vtkContextActor() self.view.GetScene().AddItem(self.chart) #Create a Window interactor using the central frame object from Qt self.vtkDesign = QVTKRenderWindowInteractor(self.centralFrame) self.vl = Qt.QVBoxLayout() self.vl.setContentsMargins(0, 0, 0, 0) self.vl.setSpacing(0) self.vl.addWidget(self.vtkDesign) #Create a renderer and add it to the window self.renDesign = vtk.vtkRenderer() self.vtkDesign.GetRenderWindow().AddRenderer(self.renDesign) self.renDesign.SetBackground(.85, .85, .85) self.irenDesign = self.vtkDesign.GetRenderWindow().GetInteractor() #Set a dummy actor so i don't end up with repeated meshes self.MeshActor = vtk.vtkActor() self.centroidActor = vtk.vtkActor() self.renDesign.AddActor(self.view) self.renDesign.AddActor(self.MeshActor) self.renDesign.AddActor(self.centroidActor) self.centralFrame.setLayout(self.vl) self.show() self.irenDesign.Initialize() self.irenDesign.Start() And this is the code i used to make the "Mesh Actor" def addVisual_Mesh(self): self.renDesign.RemoveActor(self.MeshActor) #Removes the old actor def mkVtkIdList(it): vil = vtk.vtkIdList() for i in it: vil.InsertNextId(int(i)) return vil colors = vtk.vtkNamedColors() #Array of vectors containing the coordinates of each point nodes = self.Results.nodes #Array of tuples containing the nodes correspondent of each element elements = self.Results.elements #Make the building blocks of polyData attributes Mesh = vtk.vtkPolyData() Points = vtk.vtkPoints() Cells = vtk.vtkCellArray() #Load the point and cell's attributes for i in range(self.Results.numNodes): Points.InsertPoint(i, nodes[i]) for i in range(self.Results.numElements): Cells.InsertNextCell(mkVtkIdList(elements[i])) #Assign pieces to vtkPolyData Mesh.SetPoints(Points) Mesh.SetPolys(Cells) #Mapping the whole thing MeshMapper = vtk.vtkPolyDataMapper() if vtk.VTK_MAJOR_VERSION <= 5: MeshMapper.SetInput(Mesh) else: MeshMapper.SetInputData(Mesh) #Create an actor self.MeshActor = vtk.vtkActor() self.MeshActor.SetMapper(MeshMapper) #self.MeshActor.GetProperty().EdgeVisibilityOn() self.MeshActor.GetProperty().SetColor(colors.GetColor3d("Red")) #self.MeshActor.GetProperty().SetEdgeColor(colors.GetColor3d("Black")) self.renDesign.AddActor(self.MeshActor) #Camera Stuff camera = vtk.vtkCamera() camera.SetPosition(1,1,1000000) camera.SetFocalPoint(0,0,0) self.renDesign.SetActiveCamera(camera) self.renDesign.ResetCamera() self.vtkDesign.SetInteractorStyle(self.Interactor2D()) I would be very appreciated if anyone could help me out! Thanks in advance! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dave.demarle at kitware.com Wed Jun 27 11:45:29 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 27 Jun 2018 11:45:29 -0400 Subject: [vtkusers] Announce: Kitware is hiring Message-ID: Folks, If you enjoy working with VTK/ParaView/VTK-m and tools like these and love programming, why not be a part of the team? We are looking to hire visualization developers to our Scientific Computing team. If you are a talented visualization researcher and developer with strong C++ skills, please consider applying. You will join a great team and work on many interesting and challenging technical problems. Here is the job posting [1]. For a complete listing of open positions, checkout jobs.kitware.com [2] [1] https://hire.withgoogle.com/public/jobs/kitwarecom/view/P_AAAAAADAAADKG9Ea3a6iiv [2] https://jobs.kitware.com/ David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Wed Jun 27 11:45:23 2018 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 27 Jun 2018 09:45:23 -0600 Subject: [vtkusers] VTK centering vtkChartXY on polydata (Python) In-Reply-To: <1530113821565-0.post@n5.nabble.com> References: <1530113821565-0.post@n5.nabble.com> Message-ID: You can use two different vtkRenderer objects and use the "SetLayer" method to control which appears on top. I think you will also need to set the number of layers on the window: "vtkRenderWindow::SetNumberOfLayers". On Wed, Jun 27, 2018 at 9:37 AM, mafiaskafia wrote: > I'm trying to implement a gridline behind a vtkPolydata Object that > represents a 2D mesh, so it's easier for the end-user to see it's > dimensions. I managed to implement a gridline using vtkChartXY, but i > couldn't figure out how i could set the origin of the gridline to be on the > center of the vtkPolyData object, and also how i could make the gridline > appear before the Object and not after like this: > > 3A__vtk.1045678.n5.nabble.com_file_t342418_halppp.png&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=BABQFHs0jxxGdf8nxpi7I3bDZRMpEC > 4NFNnqRhnEbPw&s=vxGxgaNCkxP5q-nzL5RyEEFVx71Cw5A3BQcU_P1qzmo&e=> > > This is the code i used to make the gridline: > > def openGL_Design(self): > > self.chart = vtk.vtkChartXY() > self.plot = vtk.vtkPlotPoints() > self.chart.AddPlot(self.plot) > > self.view = vtk.vtkContextActor() > self.view.GetScene().AddItem(self.chart) > > #Create a Window interactor using the central frame object from > Qt > self.vtkDesign = QVTKRenderWindowInteractor(self.centralFrame) > self.vl = Qt.QVBoxLayout() > self.vl.setContentsMargins(0, 0, 0, 0) > self.vl.setSpacing(0) > self.vl.addWidget(self.vtkDesign) > > #Create a renderer and add it to the window > self.renDesign = vtk.vtkRenderer() > self.vtkDesign.GetRenderWindow().AddRenderer(self.renDesign) > self.renDesign.SetBackground(.85, .85, .85) > self.irenDesign = > self.vtkDesign.GetRenderWindow().GetInteractor() > > > #Set a dummy actor so i don't end up with repeated meshes > self.MeshActor = vtk.vtkActor() > self.centroidActor = vtk.vtkActor() > self.renDesign.AddActor(self.view) > self.renDesign.AddActor(self.MeshActor) > self.renDesign.AddActor(self.centroidActor) > > self.centralFrame.setLayout(self.vl) > > self.show() > self.irenDesign.Initialize() > self.irenDesign.Start() > > And this is the code i used to make the "Mesh Actor" > > def addVisual_Mesh(self): > > self.renDesign.RemoveActor(self.MeshActor) #Removes the old actor > > def mkVtkIdList(it): > vil = vtk.vtkIdList() > for i in it: > vil.InsertNextId(int(i)) > return vil > > colors = vtk.vtkNamedColors() > > #Array of vectors containing the coordinates of each point > nodes = self.Results.nodes > > #Array of tuples containing the nodes correspondent of each element > elements = self.Results.elements > > #Make the building blocks of polyData attributes > Mesh = vtk.vtkPolyData() > Points = vtk.vtkPoints() > Cells = vtk.vtkCellArray() > > #Load the point and cell's attributes > for i in range(self.Results.numNodes): > Points.InsertPoint(i, nodes[i]) > > for i in range(self.Results.numElements): > Cells.InsertNextCell(mkVtkIdList(elements[i])) > > #Assign pieces to vtkPolyData > Mesh.SetPoints(Points) > Mesh.SetPolys(Cells) > > #Mapping the whole thing > MeshMapper = vtk.vtkPolyDataMapper() > if vtk.VTK_MAJOR_VERSION <= 5: > MeshMapper.SetInput(Mesh) > else: > MeshMapper.SetInputData(Mesh) > > #Create an actor > self.MeshActor = vtk.vtkActor() > self.MeshActor.SetMapper(MeshMapper) > #self.MeshActor.GetProperty().EdgeVisibilityOn() > self.MeshActor.GetProperty().SetColor(colors.GetColor3d("Red")) > > #self.MeshActor.GetProperty().SetEdgeColor(colors.GetColor3d("Black")) > > self.renDesign.AddActor(self.MeshActor) > > #Camera Stuff > camera = vtk.vtkCamera() > camera.SetPosition(1,1,1000000) > camera.SetFocalPoint(0,0,0) > > self.renDesign.SetActiveCamera(camera) > self.renDesign.ResetCamera() > > self.vtkDesign.SetInteractorStyle(self.Interactor2D()) > > I would be very appreciated if anyone could help me out! Thanks in advance! > > > > -- > Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__vtk. > 1045678.n5.nabble.com_VTK-2DUsers-2Df1224199.html&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=BABQFHs0jxxGdf8nxpi7I3bDZRMpEC > 4NFNnqRhnEbPw&s=_rVA5V9ZjR6S9HFCvPDXsDZ6cPhFa29xy-q5fFR2VLE&e= > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at https://urldefense.proofpoint. > com/v2/url?u=http-3A__www.kitware.com_opensource_ > opensource.html&d=DwICAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m= > BABQFHs0jxxGdf8nxpi7I3bDZRMpEC4NFNnqRhnEbPw&s= > IOBcMazQV0OuHRsveg0B4Cn1alnxvbDGoXyFRV7li48&e= > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk. > org_Wiki_VTK-5FFAQ&d=DwICAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m= > BABQFHs0jxxGdf8nxpi7I3bDZRMpEC4NFNnqRhnEbPw&s=X517J-49oSESWpkye- > qXsuX6IDYPg7pG5WYSU-WU7Uk&e= > > Search the list archives at: https://urldefense.proofpoint. > com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=BABQFHs0jxxGdf8nxpi7I3bDZRMpEC > 4NFNnqRhnEbPw&s=Hp9usDPi61EkBCTLC8JtnDX3-Y-_ARqeNTA6xOAam28&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__public. > kitware.com_mailman_listinfo_vtkusers&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=BABQFHs0jxxGdf8nxpi7I3bDZRMpEC > 4NFNnqRhnEbPw&s=9EGrEaOM2rmrlz4QHDkxZHSjgJLH5GuUVSq3r3ENNKA&e= > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsilveira1993 at gmail.com Wed Jun 27 12:01:07 2018 From: tsilveira1993 at gmail.com (mafiaskafia) Date: Wed, 27 Jun 2018 09:01:07 -0700 (MST) Subject: [vtkusers] VTK centering vtkChartXY on polydata (Python) In-Reply-To: References: <1530113821565-0.post@n5.nabble.com> Message-ID: <1530115267121-0.post@n5.nabble.com> Thank you for your quick answer! But by creating two different layers, how can i "connect" the gridline with the vtkPolyData? For example, if i have a 2x2 square with its center on coordinates (0,0), how can i set the origin of the gridline to be on the center of the square? So that the range of the values on the gridline match the dimensions of the rectangle. Cheers! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From andrew.slaughter at inl.gov Wed Jun 27 12:30:40 2018 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 27 Jun 2018 10:30:40 -0600 Subject: [vtkusers] VTK centering vtkChartXY on polydata (Python) In-Reply-To: <1530115267121-0.post@n5.nabble.com> References: <1530113821565-0.post@n5.nabble.com> <1530115267121-0.post@n5.nabble.com> Message-ID: I don't know the answer to that question, it likely depends on the type of interactor you are using. It is possible to use the same camera across renderers, which might help. On Wed, Jun 27, 2018 at 10:01 AM, mafiaskafia wrote: > Thank you for your quick answer! But by creating two different layers, how > can i "connect" the gridline with the vtkPolyData? For example, if i have a > 2x2 square with its center on coordinates (0,0), how can i set the origin > of > the gridline to be on the center of the square? So that the range of the > values on the gridline match the dimensions of the rectangle. > > Cheers! > > > > -- > Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__vtk. > 1045678.n5.nabble.com_VTK-2DUsers-2Df1224199.html&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=2j4g900IFL_D3AFivfPLbqkz65XqiD76ofQ- > AO7mp6A&s=PiR0q-NraMaKXLlI5gcIo1S-iHIxX2PMBzcRSSybil8&e= > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at https://urldefense.proofpoint. > com/v2/url?u=http-3A__www.kitware.com_opensource_ > opensource.html&d=DwICAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=2j4g900IFL_ > D3AFivfPLbqkz65XqiD76ofQ-AO7mp6A&s=0yZJ-A6Cm4u6- > iPBwiomU3Yr9xTU4BB7ThiHLRES-fE&e= > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk. > org_Wiki_VTK-5FFAQ&d=DwICAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=2j4g900IFL_ > D3AFivfPLbqkz65XqiD76ofQ-AO7mp6A&s=F57D8uGRwGw2zhpdZZdyZLl32xobvQ > YaoCIelDkvBZ8&e= > > Search the list archives at: https://urldefense.proofpoint. > com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=2j4g900IFL_D3AFivfPLbqkz65XqiD76ofQ- > AO7mp6A&s=qjfhihukNZPudwgRmP2KYmUy8mZVMLCmn2OdgvC8JFM&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__public. > kitware.com_mailman_listinfo_vtkusers&d=DwICAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=2j4g900IFL_D3AFivfPLbqkz65XqiD76ofQ- > AO7mp6A&s=3-Xjzxou3AIXREldNVxDE9bGCFGmKPiCEKW_UzPzVWY&e= > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Jun 27 12:44:30 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 27 Jun 2018 10:44:30 -0600 Subject: [vtkusers] Using vtk.js inside an angular project In-Reply-To: <1530099547393-0.post@n5.nabble.com> References: <1530018992136-0.post@n5.nabble.com> <1530099547393-0.post@n5.nabble.com> Message-ID: You can load the vtk.js library itself since it is a UMD package. That way you don't have to built it. The object you will get will be similar to what we do here: https://kitware.github.io/vtk-js/docs/intro_vtk_as_external_script.html On Wed, Jun 27, 2018 at 5:39 AM marf wrote: > Thank you soso much, I had to do some more tweaking but you pointed me in > the > exactly right direction. Now everything is kind of working, but I'm > wonderting wether there is any alternative to running it all through > webpack? Since it takes a lot of time to compile for me and I would love to > be a little more flexible. > If there isn't I guess I can still make it work > > Marvin > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Wed Jun 27 12:59:50 2018 From: bebe0705 at colorado.edu (BBerco) Date: Wed, 27 Jun 2018 09:59:50 -0700 (MST) Subject: [vtkusers] Multiple input data in custom vtkPolydataFilter Message-ID: <1530118790364-0.post@n5.nabble.com> Hello all, I'm working on a filter that produces luminosity curves from shape models. I'm trying to extend its capability to the case of multiple-body systems, for instance that of a binary asteroid featuring a primary around which orbits a secondary object. To this end, I would need to allow my filter (inheriting from vtkPolyDataAlgorithm) to take in multiple polydata inputs (one for each body, with the first one being the primary, the second one the secondary (if any),...). I naively tried * myfilter-> SetInputData(0,primary_polydata) myfilter-> SetInputData(1,secondary_polydata) * but the method which I think should return the number of inputs (GetNumberOfInputPorts()) still returns 1. Obviously I'm being confused between the number of inputs and the number of input ports. This example presents another approach that is not as flexible as I would like because it relies on* SetInputConnection* and not * SetInputData*. Any advice? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Wed Jun 27 14:41:06 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 27 Jun 2018 12:41:06 -0600 Subject: [vtkusers] Multiple input data in custom vtkPolydataFilter In-Reply-To: <1530118790364-0.post@n5.nabble.com> References: <1530118790364-0.post@n5.nabble.com> Message-ID: Hi Ben, The filter has to be set up the same way regardless of whether you intend to use SetInputConnection() or SetInputData(). After all, SetInputData() always calls SetInputConnection() under the hood. So the example that you linked is the way to go. It looks like you want the second input to be optional. Since the port exists whether or not an input has been connected to it, what you need to do is check whether someone has connected an input to the port. This works regardless of whether the connection was done with SetInputConnection() or with SetInputData(): if (this->GetNumberOfInputConnections(1) != 0) { ... } The filter itself must set the second port as "optional" when it sets up the properties of the ports: int vtkMyMultiInputFilter::FillInputPortInformation(int port, vtkInformation* info) { if (port == 0) { info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPolyData"); } else if (port == 1) { info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPolyData"); info->Set(vtkAlgorithm::INPUT_IS_OPTIONAL(), true); } return 1; } - David On Wed, Jun 27, 2018 at 10:59 AM, BBerco wrote: > Hello all, > I'm working on a filter that produces luminosity curves from shape models. > I'm trying to extend its capability to the case of multiple-body systems, > for instance that of a binary asteroid featuring a primary around which > orbits a secondary object. > > To this end, I would need to allow my filter (inheriting from > vtkPolyDataAlgorithm) to take in multiple polydata inputs (one for each > body, with the first one being the primary, the second one the secondary > (if > any),...). > > I naively tried > * > myfilter-> SetInputData(0,primary_polydata) > myfilter-> SetInputData(1,secondary_polydata) > * > > but the method which I think should return the number of inputs > (GetNumberOfInputPorts()) still returns 1. Obviously I'm being confused > between the number of inputs and the number of input ports. > > This example > > > presents another approach that is not as flexible as I would like because > it > relies on* SetInputConnection* and not * SetInputData*. > > Any advice? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.ostroot at lickenbrocktech.com Wed Jun 27 15:39:02 2018 From: mark.ostroot at lickenbrocktech.com (mark.ostroot at lickenbrocktech.com) Date: Wed, 27 Jun 2018 12:39:02 -0700 Subject: [vtkusers] 3D volume camera clipping help Message-ID: <20180627123902.c7db654a879d86b78cfcacc46040d57b.f2adee8e7a.mailapi@email09.godaddy.com> Hello, I have a 3D volume of some CT Data that works fine at the original aspect Ratio. I have some code that adjusts the aspect ratio of the volume by using the VtkReSlicer. Which works well for applying a new aspect ratio. My issue is that whenever my aspect ratio is non-Cubic I get some clipping of my volume at certain angles when it is being rotated around. I have tried using the "ResetCameraClippingRange" function, but this seems to have no effect on my Rendered volume. I know that the clipping range bounds are computed from the actor dimensions and they don't seem to change when I change the aspect ratio. Does anyone have any ideas on what I may be missing? Some noteworthy information: C++ application VTK version 8.1.1 Render window is a QT openGL Widget Thanks in advance, Mark O -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Jun 27 15:48:50 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 27 Jun 2018 15:48:50 -0400 Subject: [vtkusers] 3D volume camera clipping help In-Reply-To: <20180627123902.c7db654a879d86b78cfcacc46040d57b.f2adee8e7a.mailapi@email09.godaddy.com> References: <20180627123902.c7db654a879d86b78cfcacc46040d57b.f2adee8e7a.mailapi@email09.godaddy.com> Message-ID: Dear Mark, We had a bug which could have resulted in what you are observing. Would it be possible for you to try current master and see if this goes away? - Aashish On Wed, Jun 27, 2018 at 3:39 PM wrote: > Hello, > > I have a 3D volume of some CT Data that works fine at the original aspect > Ratio. I have some code that adjusts the aspect ratio of the volume by > using the VtkReSlicer. Which works well for applying a new aspect ratio. My > issue is that whenever my aspect ratio is non-Cubic I get some clipping of > my volume at certain angles when it is being rotated around. I have tried > using the "ResetCameraClippingRange" function, but this seems to have no > effect on my Rendered volume. I know that the clipping range bounds are > computed from the actor dimensions and they don't seem to change when I > change the aspect ratio. Does anyone have any ideas on what I may be > missing? > > > Some noteworthy information: > C++ application > VTK version 8.1.1 > Render window is a QT openGL Widget > > Thanks in advance, > Mark O > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jun 27 15:50:14 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 27 Jun 2018 13:50:14 -0600 Subject: [vtkusers] 3D volume camera clipping help In-Reply-To: <20180627123902.c7db654a879d86b78cfcacc46040d57b.f2adee8e7a.mailapi@email09.godaddy.com> References: <20180627123902.c7db654a879d86b78cfcacc46040d57b.f2adee8e7a.mailapi@email09.godaddy.com> Message-ID: Hi Mark, One possible cause of this issue is that the background (or air) value in CT is -1000 while the default background value for vtkImageReslice is zero. Try using SetBackgroundLevel(-1000.0) when you reslice the data to see if that fixes the problem. - David On Wed, Jun 27, 2018 at 1:39 PM, wrote: > Hello, > > I have a 3D volume of some CT Data that works fine at the original aspect > Ratio. I have some code that adjusts the aspect ratio of the volume by > using the VtkReSlicer. Which works well for applying a new aspect ratio. My > issue is that whenever my aspect ratio is non-Cubic I get some clipping of > my volume at certain angles when it is being rotated around. I have tried > using the "ResetCameraClippingRange" function, but this seems to have no > effect on my Rendered volume. I know that the clipping range bounds are > computed from the actor dimensions and they don't seem to change when I > change the aspect ratio. Does anyone have any ideas on what I may be > missing? > > > Some noteworthy information: > C++ application > VTK version 8.1.1 > Render window is a QT openGL Widget > > Thanks in advance, > Mark O > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Wed Jun 27 16:15:59 2018 From: bebe0705 at colorado.edu (BBerco) Date: Wed, 27 Jun 2018 13:15:59 -0700 (MST) Subject: [vtkusers] Multiple input data in custom vtkPolydataFilter In-Reply-To: References: <1530118790364-0.post@n5.nabble.com> Message-ID: <1530130559149-0.post@n5.nabble.com> David, thanks for the quick reply! I'll give it a try -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Wed Jun 27 16:25:19 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 27 Jun 2018 14:25:19 -0600 Subject: [vtkusers] Multiple input data in custom vtkPolydataFilter In-Reply-To: <1530130559149-0.post@n5.nabble.com> References: <1530118790364-0.post@n5.nabble.com> <1530130559149-0.post@n5.nabble.com> Message-ID: For the second port, you might want to set INPUT_IS_REPEATABLE() in addition to INPUT_IS_OPTIONAL(). This will allow you to use AddInputData(1, data) to input as many secondary objects to the port as you desire. The number of input ports for a VTK filter is fixed, but repeatable ports can accept any number of inputs. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.ostroot at lickenbrocktech.com Wed Jun 27 16:39:59 2018 From: mark.ostroot at lickenbrocktech.com (mark.ostroot at lickenbrocktech.com) Date: Wed, 27 Jun 2018 13:39:59 -0700 Subject: [vtkusers] 3D volume camera clipping help In-Reply-To: Message-ID: <20180627133959.c7db654a879d86b78cfcacc46040d57b.b68d5fd3c9.mailapi@email09.godaddy.com> Dear Aashish, I am grabbing the latest from master and compiling from source, I will test to see if this fixes my issue and let you know. -Mark --------- Original Message --------- Subject: Re: [vtkusers] 3D volume camera clipping help From: "Aashish Chaudhary" Date: 6/27/18 12:48 pm To: mark.ostroot at lickenbrocktech.com Cc: vtkusers at vtk.org Dear Mark, We had a bug which could have resulted in what you are observing. Would it be possible for you to try current master and see if this goes away? - Aashish On Wed, Jun 27, 2018 at 3:39 PM wrote: Hello, I have a 3D volume of some CT Data that works fine at the original aspect Ratio. I have some code that adjusts the aspect ratio of the volume by using the VtkReSlicer. Which works well for applying a new aspect ratio. My issue is that whenever my aspect ratio is non-Cubic I get some clipping of my volume at certain angles when it is being rotated around. I have tried using the "ResetCameraClippingRange" function, but this seems to have no effect on my Rendered volume. I know that the clipping range bounds are computed from the actor dimensions and they don't seem to change when I change the aspect ratio. Does anyone have any ideas on what I may be missing? Some noteworthy information: C++ application VTK version 8.1.1 Render window is a QT openGL Widget Thanks in advance, Mark O _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.ostroot at lickenbrocktech.com Wed Jun 27 16:44:53 2018 From: mark.ostroot at lickenbrocktech.com (mark.ostroot at lickenbrocktech.com) Date: Wed, 27 Jun 2018 13:44:53 -0700 Subject: [vtkusers] 3D volume camera clipping help In-Reply-To: Message-ID: <20180627134453.c7db654a879d86b78cfcacc46040d57b.0100a38e0d.mailapi@email09.godaddy.com> Hello David, Thanks for the tip, but I don't believe this is the source of my issue in this case. I perform a shift and scale on the incoming data to effectively make everything a 16-bit unsigned integer and the Opacity function I am using is adjustable by the user, so you can make the air section transparent. The clipping still occurs regardless of the opacity applied to the volume though. Thanks, Mark Ostroot --------- Original Message --------- Subject: Re: [vtkusers] 3D volume camera clipping help From: "David Gobbi" Date: 6/27/18 12:50 pm To: mark.ostroot at lickenbrocktech.com Cc: "VTK Users" Hi Mark, One possible cause of this issue is that the background (or air) value in CT is -1000 while the default background value for vtkImageReslice is zero. Try using SetBackgroundLevel(-1000.0) when you reslice the data to see if that fixes the problem. - David On Wed, Jun 27, 2018 at 1:39 PM, wrote: Hello, I have a 3D volume of some CT Data that works fine at the original aspect Ratio. I have some code that adjusts the aspect ratio of the volume by using the VtkReSlicer. Which works well for applying a new aspect ratio. My issue is that whenever my aspect ratio is non-Cubic I get some clipping of my volume at certain angles when it is being rotated around. I have tried using the "ResetCameraClippingRange" function, but this seems to have no effect on my Rendered volume. I know that the clipping range bounds are computed from the actor dimensions and they don't seem to change when I change the aspect ratio. Does anyone have any ideas on what I may be missing? Some noteworthy information: C++ application VTK version 8.1.1 Render window is a QT openGL Widget Thanks in advance, Mark O -------------- next part -------------- An HTML attachment was scrubbed... URL: From mesheb82 at gmail.com Wed Jun 27 16:53:20 2018 From: mesheb82 at gmail.com (Steven Doyle) Date: Wed, 27 Jun 2018 13:53:20 -0700 Subject: [vtkusers] (no subject) Message-ID: I almost have my code functioning how I'd like it, but it's not quite there. I'd like to be able to take a vtkUnstructuredGrid and box pick a set of cells and points and then get their IDs. My code gets the cells correctly, but gets all the point ids associated with the picked cells instead of just the ones inside the box. I read that the AreaPicker is somewhat inaccurate for cells/points, but this behavior is independent of zoom level. I also read that using a selection is preferred, but I was unable to figure out how to implement this using a vtkSelection. I made an example that sets up a picker. There are two cells. If you box pick over a single point, I'd expect the code to print a single point ID. I suspect the error has to do with how I'm using the vtkExtractSelectedFrustum class, but I'm not positive. Any ideas? Thanks, Steve from __future__ import print_function, division import signal import numpy as np import vtk from vtk.util.numpy_support import vtk_to_numpy, numpy_to_vtk, numpy_to_vtkIdTypeArray # kills the program when you hit Cntl+C from the command line # doesn't save the current state as presumably there's been an error signal.signal(signal.SIGINT, signal.SIG_DFL) class AreaPickStyle(vtk.vtkInteractorStyleRubberBandZoom): """Picks nodes & elements with a visible box widget""" def __init__(self, parent, callback): """creates the AreaPickStyle instance""" self.AddObserver("LeftButtonPressEvent", self._left_button_press_event) self.AddObserver("LeftButtonReleaseEvent", self._left_button_release_event) self.AddObserver("RightButtonPressEvent", self.right_button_press_event) self.parent = parent self.picker_points = [] self.parent.area_picker.SetRenderer(self.parent.renderer) self.callback = callback def _left_button_press_event(self, obj, event): """ gets the first point """ self.OnLeftButtonDown() pixel_x, pixel_y = self.parent.render_window_interactor.GetEventPosition() self.picker_points.append((pixel_x, pixel_y)) def _left_button_release_event(self, obj, event): """ gets the second point and calls _pick_depth_ids """ pixel_x, pixel_y = self.parent.render_window_interactor.GetEventPosition() self.picker_points.append((pixel_x, pixel_y)) if len(self.picker_points) == 2: p1x, p1y = self.picker_points[0] p2x, p2y = self.picker_points[1] self.picker_points = [] xmin = min(p1x, p2x) ymin = min(p1y, p2y) xmax = max(p1x, p2x) ymax = max(p1y, p2y) dx = abs(p1x - p2x) dy = abs(p1y - p2y) self.picker_points = [] if dx > 0 and dy > 0: self._pick_depth_ids(xmin, ymin, xmax, ymax) self.parent.render_window_interactor.Render() self.picker_points = [] def _pick_depth_ids(self, xmin, ymin, xmax, ymax): """ Does an area pick of all the ids inside the box, even the ones behind the front elements """ area_picker = self.parent.area_picker area_picker.AreaPick(xmin, ymin, xmax, ymax, self.parent.renderer) frustum = area_picker.GetFrustum() # vtkPlanes grid = self.parent.grid idsname = "Ids" ids = vtk.vtkIdFilter() ids.SetInputData(grid) # default is on; just being explicit ids.CellIdsOn() ids.PointIdsOn() ids.SetIdsArrayName(idsname) # get the cells/points inside the frustum selected_frustum = vtk.vtkExtractSelectedFrustum() selected_frustum.SetFrustum(frustum) # we just want the ids; don't make an unstructured grid # return an unstructured grid anyways? # I think the error is in how I use vtkExtractSelectedFrustum selected_frustum.PreserveTopologyOn() selected_frustum.SetInputConnection(ids.GetOutputPort()) selected_frustum.Update() ugrid = selected_frustum.GetOutput() cell_ids = None cells = ugrid.GetCellData() if cells is not None: ids = cells.GetArray('Ids') if ids is not None: cell_ids = vtk_to_numpy(ids) assert len(cell_ids) == len(np.unique(cell_ids)) point_ids = None points = ugrid.GetPointData() if points is not None: ids = points.GetArray('Ids') if ids is not None: point_ids = vtk_to_numpy(ids) self.callback(cell_ids, point_ids) def right_button_press_event(self, obj, event): """cancels the button""" style = vtk.vtkInteractorStyleImage() self.parent.render_window_interactor.SetInteractorStyle(style) self.parent.render_window_interactor.Render() def mixed_type_unstructured_grid(): """A slightly more complex example of how to generate an unstructured grid with different cell types. Returns a created unstructured grid. """ pts = np.array([ [0,0,0], [1,0,0], [0,1,0], [0,0,1], # tetra [2,0,0], [3,0,0], [3,1,0], [2,1,0], [2,0,1], [3,0,1], [3,1,1], [2,1,1], # Hex ], dtype='float32') # shift the points so we can show both. pts[:,1] += 2.0 npoints = len(pts) # The cells must be int64 because numpy_to_vtkIdTypeArray requires that. # I think it depends on what vtkIdTypeArray() was built with. # nnodes_tetra, (nodes_tetra1) # nnodes_hexa, (nodes_hexa1) cells = np.array([ 4, 0, 1, 2, 3, # tetra 8, 4, 5, 6, 7, 8, 9, 10, 11 # hex ], dtype='int64') # The offsets for the cells (i.e., the indices where the cells start) # one for each element cell_offsets = np.array([0, 5], dtype='int32') # add one element_type for each element tetra_type = vtk.vtkTetra().GetCellType() # VTK_TETRA == 10 hex_type = vtk.vtkHexahedron().GetCellType() # VTK_HEXAHEDRON == 12 cell_types = np.array([tetra_type, hex_type], dtype='int32') # Create the array of cells vtk_cells = vtk.vtkCellArray() vtk_cells_id_type = numpy_to_vtkIdTypeArray(cells, deep=1) # ncells = 2 vtk_cells.SetCells(2, vtk_cells_id_type) # Now create the unstructured grid ugrid = vtk.vtkUnstructuredGrid() points_data = numpy_to_vtk(pts, deep=1) points = vtk.vtkPoints() points.SetNumberOfPoints(npoints) points.SetData(points_data) ugrid.SetPoints(points) # Now just set the cell types and reuse the ugrid locations and cells ugrid.SetCells( numpy_to_vtk( cell_types, deep=1, array_type=vtk.vtkUnsignedCharArray().GetDataType(), ), numpy_to_vtk( cell_offsets, deep=1, array_type=vtk.vtkIdTypeArray().GetDataType() ), vtk_cells, ) return ugrid class MyGUI(object): def __init__(self): self.area_picker = vtk.vtkAreaPicker() ugrid = mixed_type_unstructured_grid() self.grid = ugrid # Setup render window interactor self.render_window_interactor = vtk.vtkRenderWindowInteractor() grid_mapper = vtk.vtkDataSetMapper() vtk_version = int(vtk.VTK_VERSION[0]) if vtk_version == 5: grid_mapper.SetInput(ugrid) elif vtk_version in [6, 7, 8]: grid_mapper.SetInputData(ugrid) else: raise NotImplementedError(vtk.VTK_VERSION) geom_actor = vtk.vtkActor() geom_actor.SetMapper(grid_mapper) # Setup renderer self.renderer = vtk.vtkRenderer() self.renderer.AddActor(geom_actor) self.renderer.ResetCamera() self.renderer.SetBackground(0.7, 0.8, 1.0) # Setup render window render_window = vtk.vtkRenderWindow() render_window.AddRenderer(self.renderer) # Setup render window render_window = vtk.vtkRenderWindow() render_window.AddRenderer(self.renderer) def callback(cell_ids, point_ids): print('callback: cell_ids = %s' % cell_ids) print('callback: point_ids = %s' % point_ids) # Render and start interaction self.render_window_interactor.SetRenderWindow(render_window) self.render_window_interactor.Initialize() style = AreaPickStyle(self, callback) self.render_window_interactor.SetInteractorStyle(style) def start(self): self.render_window_interactor.Start() def main(): gui = MyGUI() gui.start() if __name__ == '__main__': main() -------------- next part -------------- An HTML attachment was scrubbed... URL: From shayan.moradkhani at gmail.com Thu Jun 28 02:21:47 2018 From: shayan.moradkhani at gmail.com (shayan moradkhani) Date: Wed, 27 Jun 2018 23:21:47 -0700 (MST) Subject: [vtkusers] Importing OBJ files with multiple objects In-Reply-To: References: Message-ID: <1530166907281-0.post@n5.nabble.com> hi, would you give me a hint about how to import .obj 3D CAD models from solidworks to vtk? i'm creating a .stl from solidworks and then having imported that in meshlab, i'll take and .obj from there. i had a look at vtkOBJReader, but it seems to be one ready.exe file, but how can i connect this code to my own project? i wanna load a model, get its location in which it is loaded and then move it. any hint would be appreciated -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From emonclus at cs.upc.edu Thu Jun 28 04:30:18 2018 From: emonclus at cs.upc.edu (=?UTF-8?Q?Eva_Moncl=c3=bas?=) Date: Thu, 28 Jun 2018 10:30:18 +0200 Subject: [vtkusers] Visualize a volume slice on a 3D plane (the acquisition plane of the images) In-Reply-To: References: <48c0dc5e-53e5-52f2-fc1c-b331f20bbbd2@cs.upc.edu> Message-ID: <33c99946-855c-775f-e72a-5258c8d98a15@cs.upc.edu> On 27/06/2018 16:12, Sankhesh Jhaveri wrote: > > You should be able to get the output of the mapper as vtkImageData and > then use GetScalarPointer() to access the raw data. > I have tried to bind the vtkImageData as the InputData of the vtkTexture, using: ??????????? vtkImageActor *saggital; ??????????? ......... ??? ??? ??? vtkImageData *image_data = sagittal->GetMapper()->GetInput(); ???? ??? ??? texture->SetInputData(image_data); but I get the following openGL error: /ERROR: In D:\workspace.64\VTK-7.0.0\Rendering\OpenGL2\vtkOpenGLTexture.cxx, line 224/ /vtkOpenGLTexture (000001EAAB506E60): 3D texture maps currently are not supported!/ I know that my vtkImageData is a 3D volume data but I hope that because the vtkImageActor is just rendering a 2D slice of the volume dataset, there was a way of obtaining it. Thanks in advance, ??? Eva > ? > > On Wed, Jun 27, 2018 at 9:49 AM Eva Moncl?s > wrote: > > Thanks a lot for the quickly answer, but my problem is that I want > to use the output of the vtkImageActor in a different graphic > object (another 3D plane) and I do not know how to manage it. > > In very, very technical words, I want to get access to the > unsigned char * that it is being rendering using the vtkImageActor. > > Thanks in advance, > > ??? Eva > > > > On 27/06/2018 15:22, Sankhesh Jhaveri wrote: >> >> Hi Eva, >> >> |vtkImageActor| is a 2D textured plane in a 3D space. Make sure >> that you use the |vtkImageMapper3D| (default mapper) with it. >> If you?re just looking for 3D interaction with the actor, use an >> interactor style like |vtkInteractorStyleTrackballCamera|. >> >> Hope that helps. >> >> Thanks, >> Sankhesh >> >> ? >> >> On Wed, Jun 27, 2018 at 9:17 AM Eva Moncl?s > > wrote: >> >> Hello everyone, >> >> I'm working with a volume dataset (temporal Dicom serie) and >> I?m able to visualize the? slices using the following vtk C++ >> classes: >> >> * vtkImageData: represents the volume dataset >> * vtkImageMapToColors: I use this class to define the >> transfer function to be used in the rendering >> * vtkImageActor: I use this class to render a specific >> slice of the volume dataset >> >> Until here everything it is fine. I can render the slice I >> want using the classes before mentioned changing the >> SetDisplayExtent of the vtkImageActor. >> >> Now I want to visualize the output of my vtkImageActor as a >> 2D texture in a free 3D plane. Then, I consider to have the >> following classes: >> >> * ?I use a vtkPlaneSource to define the? 3D plane: >> orientation and position >> * a vtkTexture that has to be attached to the >> vtkPlaneSource. My problem comes out with the definition >> of the SetInputConnection of the vtkTexture. I want to >> define the? image as the output of the vtkImageActor. >> But? I do not get it. >> >> I am successful in visualizing the vtkPlane in black? color >> (due to the texture is not well defined) unfortunately, I >> can't get it to work properly? with a texture of a specific >> slice of the volume dataset. I have tried different ways of >> assigning the SetInputConnection of the vtkTexture using the >> vtkImageActor, but none of them worked well. >> >> Any help will be welcome.? Thank you very much in advance, >> >> ?? Eva >> >> >> >> _______________________________________________ >> 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 >> >> Search the list archives at: >> http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> >> -- >> >> >> Sankhesh Jhaveri >> >> >> /Sr. Research & Development Engineer/ | Kitware >> | (518) 881-4417 >> >> >> ? > > -- > > > Sankhesh Jhaveri > > > /Sr. Research & Development Engineer/ | Kitware > | (518) 881-4417 > > ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From choko1201 at gmail.com Thu Jun 28 05:20:21 2018 From: choko1201 at gmail.com (Tatsunidas) Date: Thu, 28 Jun 2018 18:20:21 +0900 Subject: [vtkusers] Build/installation problem of VTK on Mac OSX High Sierra(10.13.5) Message-ID: Dear, the VTK (java wrapper) running on MacOSX users, Thank you for reading this message. I'm Jpanese. My english is odd, sorry. I have get following error, # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x0000000000000000, pid=744, tid=0x000000000001392b # # JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode bsd-amd64 compressed oops) # Problematic frame: # C 0x0000000000000000 # # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /Users/tatsunidas/Documents/I2WI/VTK/hs_err_pid744.log # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # My environment are, iMac (27-inch, Mid 2010) 2.8 GHz Intel Core i5 12 GB 1333 MHz DDR3 ATI Radeon HD 5750 1024 MB Java SE 8 131(64-bit) using, Cmake 3.7.1 GCC Defalut compilar(4.2.1) My procedure are, Download VTK-9.0 from git create blank "build" dir run Cmake, set src to VTK src set build to "build" dir then "configure" and... Add Entry CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib Add Entry CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE Add Entry CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib CMAKE_BUILD_TYPE Release Checked Java wrappers, then "configure" and set to some JDK's paths(to related to JDK 8_131), change 1.6 to 1.8 check JOGL then "configure" set jogl-all.jar and gluegen-rt.jar for JOGL path, then "configure" Uncheck related TEST, EXAMPLE then "configure" and Generate. cd build make make install Build and Install process are nothing with problem. Then, Run Eclipse oxygen (.3a), add external Jars(vtk.jar and joglamp's jar) Create my project and copy sample(SimpleVTK.java), vtkRender replace vtkJoglPanelComponent class run get error If you know that how to fix it, please tell me. Thank you. Tatsuaki -- ========================================== Tatsuaki KOBAYASHI e-mail:choko1201 at gmail.com TEL:080-1274-6433 Good Luck ========================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From marvin.huber at basf.com Thu Jun 28 05:52:56 2018 From: marvin.huber at basf.com (marf) Date: Thu, 28 Jun 2018 02:52:56 -0700 (MST) Subject: [vtkusers] Using vtk.js inside an angular project In-Reply-To: References: <1530018992136-0.post@n5.nabble.com> <1530099547393-0.post@n5.nabble.com> Message-ID: <1530179576696-0.post@n5.nabble.com> Works like a charm, again thank you very very much man -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From shayan.moradkhani at gmail.com Thu Jun 28 06:27:44 2018 From: shayan.moradkhani at gmail.com (shayan moradkhani) Date: Thu, 28 Jun 2018 03:27:44 -0700 (MST) Subject: [vtkusers] machining simulation and collision detection Message-ID: <1530181664677-0.post@n5.nabble.com> hi, is there any possibility to do collision detection in vtk? i want to simulation machining process in vtk that shows material removal -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From csaba.pinter at queensu.ca Thu Jun 28 06:31:53 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Thu, 28 Jun 2018 10:31:53 +0000 Subject: [vtkusers] machining simulation and collision detection In-Reply-To: <1530181664677-0.post@n5.nabble.com> References: <1530181664677-0.post@n5.nabble.com> Message-ID: Hi! Here is a collision detection filter implemented on VTK that works for us https://github.com/SlicerRt/SlicerRT/blob/master/SlicerRtCommon/vtkCollisionDetectionFilter.h Not sure if anything new emerged since we added this class, but it functions pretty well for our use case. Hth, csaba -----Original Message----- From: vtkusers On Behalf Of shayan moradkhani Sent: Thursday, June 28, 2018 11:28 To: vtkusers at vtk.org Subject: [vtkusers] machining simulation and collision detection hi, is there any possibility to do collision detection in vtk? i want to simulation machining process in vtk that shows material removal -- Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=QHgC3DbYvsCGUaE5KS%2B6UiV5jfoSB9ATTT6IvZuylyo%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=%2Bk3BLkWN%2Fi1iYZlwJxOXpOI8mCKd%2BTVkBp9dgvPDVb4%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=Eri9KGMPH9%2FsI2ZXpLN2nwJAEtu51G4NBKLfVcGbLPE%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=quA2KlllXOpgXLYEN7vG4CIV95vZfpQEl6Vsp1uJf0Y%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=dW27VLnFFlDuoOoz8TW%2FuugnNsnlQtt%2B808oDPm4ATg%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=5Y3PqqIlITxU08JgeslZsS89FilyNOiqUsfGW5QfXy0%3D&reserved=0 From trshash at gmail.com Thu Jun 28 10:11:33 2018 From: trshash at gmail.com (Shashwath T.R.) Date: Thu, 28 Jun 2018 19:41:33 +0530 Subject: [vtkusers] Visualize a volume slice on a 3D plane (the acquisition plane of the images) In-Reply-To: References: <48c0dc5e-53e5-52f2-fc1c-b331f20bbbd2@cs.upc.edu> Message-ID: Hi, If I?m not mistaken, you should be able to use the output of vtkImageMapToColors - that?s a 3 component char * image. Shash > On 27-Jun-2018, at 7:18 PM, Eva Moncl?s wrote: > > Thanks a lot for the quickly answer, but my problem is that I want to use the output of the vtkImageActor in a different graphic object (another 3D plane) and I do not know how to manage it. > In very, very technical words, I want to get access to the unsigned char * that it is being rendering using the vtkImageActor. > > Thanks in advance, > > Eva > > > >> On 27/06/2018 15:22, Sankhesh Jhaveri wrote: >> Hi Eva, >> >> vtkImageActor is a 2D textured plane in a 3D space. Make sure that you use the vtkImageMapper3D (default mapper) with it. >> If you?re just looking for 3D interaction with the actor, use an interactor style like vtkInteractorStyleTrackballCamera. >> >> Hope that helps. >> >> Thanks, >> Sankhesh >> >> >>> On Wed, Jun 27, 2018 at 9:17 AM Eva Moncl?s wrote: >>> Hello everyone, >>> >>> I'm working with a volume dataset (temporal Dicom serie) and I?m able to visualize the slices using the following vtk C++ classes: >>> >>> vtkImageData: represents the volume dataset >>> vtkImageMapToColors: I use this class to define the transfer function to be used in the rendering >>> vtkImageActor: I use this class to render a specific slice of the volume dataset >>> Until here everything it is fine. I can render the slice I want using the classes before mentioned changing the SetDisplayExtent of the vtkImageActor. >>> >>> Now I want to visualize the output of my vtkImageActor as a 2D texture in a free 3D plane. Then, I consider to have the following classes: >>> I use a vtkPlaneSource to define the 3D plane: orientation and position >>> a vtkTexture that has to be attached to the vtkPlaneSource. My problem comes out with the definition of the SetInputConnection of the vtkTexture. I want to define the image as the output of the vtkImageActor. But I do not get it. >>> I am successful in visualizing the vtkPlane in black color (due to the texture is not well defined) unfortunately, I can't get it to work properly with a texture of a specific slice of the volume dataset. I have tried different ways of assigning the SetInputConnection of the vtkTexture using the vtkImageActor, but none of them worked well. >>> >>> Any help will be welcome. Thank you very much in advance, >>> >>> Eva >>> >>> >>> >>> _______________________________________________ >>> 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 >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://public.kitware.com/mailman/listinfo/vtkusers >> -- >> Sankhesh Jhaveri >> >> Sr. Research & Development Engineer | Kitware | (518) 881-4417 >> > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Thu Jun 28 10:17:58 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 28 Jun 2018 08:17:58 -0600 Subject: [vtkusers] Build/installation problem of VTK on Mac OSX High Sierra(10.13.5) In-Reply-To: References: Message-ID: I'm not sure to see what you mean here > vtkRender replace vtkJoglPanelComponent class Otherwise you can find some information on how to build VTK with Java here: https://github.com/Kitware/VTK/blob/master/Wrapping/Java/README.txt Hope that helps, Seb On Thu, Jun 28, 2018 at 3:20 AM Tatsunidas wrote: > Dear, the VTK (java wrapper) running on MacOSX users, > > Thank you for reading this message. > I'm Jpanese. My english is odd, sorry. > > I have get following error, > > # > # A fatal error has been detected by the Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x0000000000000000, pid=744, tid=0x000000000001392b > # > # JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build > 1.8.0_131-b11) > # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode > bsd-amd64 compressed oops) > # Problematic frame: > # C 0x0000000000000000 > # > # Failed to write core dump. Core dumps have been disabled. To enable core > dumping, try "ulimit -c unlimited" before starting Java again > # > # An error report file with more information is saved as: > # /Users/tatsunidas/Documents/I2WI/VTK/hs_err_pid744.log > # > # If you would like to submit a bug report, please visit: > # http://bugreport.java.com/bugreport/crash.jsp > # The crash happened outside the Java Virtual Machine in native code. > # See problematic frame for where to report the bug. > # > > My environment are, > > iMac (27-inch, Mid 2010) > 2.8 GHz Intel Core i5 > 12 GB 1333 MHz DDR3 > ATI Radeon HD 5750 1024 MB > Java SE 8 131(64-bit) > > using, > > Cmake 3.7.1 > GCC Defalut compilar(4.2.1) > > My procedure are, > > Download VTK-9.0 from git > create blank "build" dir > run Cmake, > set src to VTK src > set build to "build" dir > > then "configure" > > and... > > Add Entry CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib > Add Entry CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE > Add Entry CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib > CMAKE_BUILD_TYPE Release > > Checked Java wrappers, then "configure" > > and > > set to some JDK's paths(to related to JDK 8_131), > change 1.6 to 1.8 > check JOGL > > then "configure" > > set jogl-all.jar and gluegen-rt.jar for JOGL path, > > then "configure" > > Uncheck related TEST, EXAMPLE > > then "configure" and Generate. > > cd build > make > make install > > Build and Install process are nothing with problem. > > Then, > > Run Eclipse oxygen (.3a), > add external Jars(vtk.jar and joglamp's jar) > Create my project and copy sample(SimpleVTK.java), > vtkRender replace vtkJoglPanelComponent class > run > > get error > > If you know that how to fix it, > please tell me. > > Thank you. > > Tatsuaki > > -- > ========================================== > Tatsuaki KOBAYASHI > e-mail:choko1201 at gmail.com > TEL:080-1274-6433 > Good Luck > ========================================== > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From trshash at gmail.com Thu Jun 28 10:18:42 2018 From: trshash at gmail.com (Shashwath T.R.) Date: Thu, 28 Jun 2018 19:48:42 +0530 Subject: [vtkusers] Visualize a volume slice on a 3D plane (the acquisition plane of the images) In-Reply-To: <33c99946-855c-775f-e72a-5258c8d98a15@cs.upc.edu> References: <48c0dc5e-53e5-52f2-fc1c-b331f20bbbd2@cs.upc.edu> <33c99946-855c-775f-e72a-5258c8d98a15@cs.upc.edu> Message-ID: For this, you should probably use something to slice the 3D volume to get a 2D slice. You can use vtkExtractVOI with the correct extents to pull out the slice and use that as your input. Probably a pipeline like this: Input -> vtkExtractVOI -> vtkImageMapToColors -> vtkTexture. For arbitrary slicing (not on the X, Y or Z axes), you would use vtkImageReslice. Shash > On 28-Jun-2018, at 2:00 PM, Eva Moncl?s wrote: > > > >> On 27/06/2018 16:12, Sankhesh Jhaveri wrote: >> You should be able to get the output of the mapper as vtkImageData and then use GetScalarPointer() to access the raw data. >> > I have tried to bind the vtkImageData as the InputData of the vtkTexture, using: > vtkImageActor *saggital; > ......... > vtkImageData *image_data = sagittal->GetMapper()->GetInput(); > texture->SetInputData(image_data); > > but I get the following openGL error: > ERROR: In D:\workspace.64\VTK-7.0.0\Rendering\OpenGL2\vtkOpenGLTexture.cxx, line 224 > vtkOpenGLTexture (000001EAAB506E60): 3D texture maps currently are not supported! > I know that my vtkImageData is a 3D volume data but I hope that because the vtkImageActor is just rendering a 2D slice of the volume dataset, there was a way of obtaining it. > > Thanks in advance, > Eva > > >> >>> On Wed, Jun 27, 2018 at 9:49 AM Eva Moncl?s wrote: >>> Thanks a lot for the quickly answer, but my problem is that I want to use the output of the vtkImageActor in a different graphic object (another 3D plane) and I do not know how to manage it. >>> In very, very technical words, I want to get access to the unsigned char * that it is being rendering using the vtkImageActor. >>> >>> Thanks in advance, >>> >>> Eva >>> >>> >>> >>>> On 27/06/2018 15:22, Sankhesh Jhaveri wrote: >>>> Hi Eva, >>>> >>>> vtkImageActor is a 2D textured plane in a 3D space. Make sure that you use the vtkImageMapper3D (default mapper) with it. >>>> If you?re just looking for 3D interaction with the actor, use an interactor style like vtkInteractorStyleTrackballCamera. >>>> >>>> Hope that helps. >>>> >>>> Thanks, >>>> Sankhesh >>>> >>>> >>>>> On Wed, Jun 27, 2018 at 9:17 AM Eva Moncl?s wrote: >>>>> Hello everyone, >>>>> >>>>> I'm working with a volume dataset (temporal Dicom serie) and I?m able to visualize the slices using the following vtk C++ classes: >>>>> >>>>> vtkImageData: represents the volume dataset >>>>> vtkImageMapToColors: I use this class to define the transfer function to be used in the rendering >>>>> vtkImageActor: I use this class to render a specific slice of the volume dataset >>>>> Until here everything it is fine. I can render the slice I want using the classes before mentioned changing the SetDisplayExtent of the vtkImageActor. >>>>> >>>>> Now I want to visualize the output of my vtkImageActor as a 2D texture in a free 3D plane. Then, I consider to have the following classes: >>>>> I use a vtkPlaneSource to define the 3D plane: orientation and position >>>>> a vtkTexture that has to be attached to the vtkPlaneSource. My problem comes out with the definition of the SetInputConnection of the vtkTexture. I want to define the image as the output of the vtkImageActor. But I do not get it. >>>>> I am successful in visualizing the vtkPlane in black color (due to the texture is not well defined) unfortunately, I can't get it to work properly with a texture of a specific slice of the volume dataset. I have tried different ways of assigning the SetInputConnection of the vtkTexture using the vtkImageActor, but none of them worked well. >>>>> >>>>> Any help will be welcome. Thank you very much in advance, >>>>> >>>>> Eva >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> https://public.kitware.com/mailman/listinfo/vtkusers >>>> -- >>>> Sankhesh Jhaveri >>>> >>>> Sr. Research & Development Engineer | Kitware | (518) 881-4417 >>>> >>> >> -- >> Sankhesh Jhaveri >> >> Sr. Research & Development Engineer | Kitware | (518) 881-4417 >> > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Jun 28 10:49:14 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 28 Jun 2018 07:49:14 -0700 Subject: [vtkusers] machining simulation and collision detection In-Reply-To: References: <1530181664677-0.post@n5.nabble.com> Message-ID: I've started to work on adding the Slicrer collision detection. On Thu, Jun 28, 2018, 3:32 AM Csaba Pinter wrote: > Hi! > > Here is a collision detection filter implemented on VTK that works for us > > https://github.com/SlicerRt/SlicerRT/blob/master/SlicerRtCommon/vtkCollisionDetectionFilter.h > > Not sure if anything new emerged since we added this class, but it > functions pretty well for our use case. > > Hth, > csaba > > -----Original Message----- > From: vtkusers On Behalf Of shayan > moradkhani > Sent: Thursday, June 28, 2018 11:28 > To: vtkusers at vtk.org > Subject: [vtkusers] machining simulation and collision detection > > hi, > is there any possibility to do collision detection in vtk? > i want to simulation machining process in vtk that shows material removal > > > > -- > Sent from: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=QHgC3DbYvsCGUaE5KS%2B6UiV5jfoSB9ATTT6IvZuylyo%3D&reserved=0 > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=%2Bk3BLkWN%2Fi1iYZlwJxOXpOI8mCKd%2BTVkBp9dgvPDVb4%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=Eri9KGMPH9%2FsI2ZXpLN2nwJAEtu51G4NBKLfVcGbLPE%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=quA2KlllXOpgXLYEN7vG4CIV95vZfpQEl6Vsp1uJf0Y%3D&reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=dW27VLnFFlDuoOoz8TW%2FuugnNsnlQtt%2B808oDPm4ATg%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=5Y3PqqIlITxU08JgeslZsS89FilyNOiqUsfGW5QfXy0%3D&reserved=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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaba.pinter at queensu.ca Thu Jun 28 11:20:26 2018 From: csaba.pinter at queensu.ca (Csaba Pinter) Date: Thu, 28 Jun 2018 15:20:26 +0000 Subject: [vtkusers] machining simulation and collision detection In-Reply-To: References: <1530181664677-0.post@n5.nabble.com> Message-ID: Excellent! Indeed it would be a useful addition. Thank you, Bill! csaba On June 28, 2018 15:49:30 Bill Lorensen wrote: I've started to work on adding the Slicrer collision detection. On Thu, Jun 28, 2018, 3:32 AM Csaba Pinter > wrote: Hi! Here is a collision detection filter implemented on VTK that works for us https://github.com/SlicerRt/SlicerRT/blob/master/SlicerRtCommon/vtkCollisionDetectionFilter.h Not sure if anything new emerged since we added this class, but it functions pretty well for our use case. Hth, csaba -----Original Message----- From: vtkusers > On Behalf Of shayan moradkhani Sent: Thursday, June 28, 2018 11:28 To: vtkusers at vtk.org Subject: [vtkusers] machining simulation and collision detection hi, is there any possibility to do collision detection in vtk? i want to simulation machining process in vtk that shows material removal -- Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=QHgC3DbYvsCGUaE5KS%2B6UiV5jfoSB9ATTT6IvZuylyo%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=%2Bk3BLkWN%2Fi1iYZlwJxOXpOI8mCKd%2BTVkBp9dgvPDVb4%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=Eri9KGMPH9%2FsI2ZXpLN2nwJAEtu51G4NBKLfVcGbLPE%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=quA2KlllXOpgXLYEN7vG4CIV95vZfpQEl6Vsp1uJf0Y%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=dW27VLnFFlDuoOoz8TW%2FuugnNsnlQtt%2B808oDPm4ATg%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=5Y3PqqIlITxU08JgeslZsS89FilyNOiqUsfGW5QfXy0%3D&reserved=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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsilveira1993 at gmail.com Thu Jun 28 12:00:06 2018 From: tsilveira1993 at gmail.com (mafiaskafia) Date: Thu, 28 Jun 2018 09:00:06 -0700 (MST) Subject: [vtkusers] VTK centering vtkChartXY on polydata (Python) In-Reply-To: References: <1530113821565-0.post@n5.nabble.com> <1530115267121-0.post@n5.nabble.com> Message-ID: <1530201606123-0.post@n5.nabble.com> ok, thanks anyway! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mark.ostroot at lickenbrocktech.com Thu Jun 28 14:07:16 2018 From: mark.ostroot at lickenbrocktech.com (mark.ostroot at lickenbrocktech.com) Date: Thu, 28 Jun 2018 11:07:16 -0700 Subject: [vtkusers] 3D volume camera clipping help In-Reply-To: <20180627133959.c7db654a879d86b78cfcacc46040d57b.b68d5fd3c9.mailapi@email09.godaddy.com> Message-ID: <20180628110716.c7db654a879d86b78cfcacc46040d57b.9954acf74a.mailapi@email09.godaddy.com> Hello Aashish, I am getting some unresolved external symbols from the new libraries, specifically some issues with vtk volume set property and qvtkopenglwidget. I'm fairly certain I'm linking to the new libraries correctly, maybe I'm missing something obvious? Some excerpts from visual studio: error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl vtkVolume::SetProperty(class vtkVolumeProperty *)" (__imp_?SetProperty at vtkVolume@@QEAAXPEAVvtkVolumeProperty@@@Z) referenced in function "private: void __cdecl QTVTKRender::InitializeRendering(void)" (?InitializeRendering at QTVTKRender@@AEAAXXZ) error LNK2019: unresolved external symbol "__declspec(dllimport) public: class vtkVolumeProperty * __cdecl vtkVolume::GetProperty(void)" (__imp_?GetProperty at vtkVolume@@QEAAPEAVvtkVolumeProperty@@XZ) referenced in function "public: void __cdecl QTVTKRender::updateShading(class QAction *)" (?updateShading at QTVTKRender@@QEAAXPEAVQAction@@@Z) error LNK2001: unresolved external symbol "public: virtual class QVTKInteractor * __cdecl QVTKOpenGLWidget::GetInteractor(void)" (?GetInteractor at QVTKOpenGLWidget@@UEAAPEAVQVTKInteractor@@XZ) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::cleanupContext(void)" (?cleanupContext at QVTKOpenGLWidget@@MEAAXXZ) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::initializeGL(void)" (?initializeGL at QVTKOpenGLWidget@@MEAAXXZ) 2> SelectionTool.cpp error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::mouseDoubleClickEvent(class QMouseEvent *)" (?mouseDoubleClickEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::mousePressEvent(class QMouseEvent *)" (?mousePressEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::paintGL(void)" (?paintGL at QVTKOpenGLWidget@@MEAAXXZ) error LNK2001: unresolved external symbol "protected: virtual bool __cdecl QVTKOpenGLWidget::renderVTK(void)" (?renderVTK at QVTKOpenGLWidget@@MEAA_NXZ) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::resizeGL(int,int)" (?resizeGL at QVTKOpenGLWidget@@MEAAXHH at Z) Thanks in advance, Mark O --------- Original Message --------- Subject: RE: Re: [vtkusers] 3D volume camera clipping help From: mark.ostroot at lickenbrocktech.com Date: 6/27/18 1:39 pm To: "Aashish Chaudhary" Cc: vtkusers at vtk.org Dear Aashish, I am grabbing the latest from master and compiling from source, I will test to see if this fixes my issue and let you know. -Mark --------- Original Message --------- Subject: Re: [vtkusers] 3D volume camera clipping help From: "Aashish Chaudhary" Date: 6/27/18 12:48 pm To: mark.ostroot at lickenbrocktech.com Cc: vtkusers at vtk.org Dear Mark, We had a bug which could have resulted in what you are observing. Would it be possible for you to try current master and see if this goes away? - Aashish On Wed, Jun 27, 2018 at 3:39 PM wrote: Hello, I have a 3D volume of some CT Data that works fine at the original aspect Ratio. I have some code that adjusts the aspect ratio of the volume by using the VtkReSlicer. Which works well for applying a new aspect ratio. My issue is that whenever my aspect ratio is non-Cubic I get some clipping of my volume at certain angles when it is being rotated around. I have tried using the "ResetCameraClippingRange" function, but this seems to have no effect on my Rendered volume. I know that the clipping range bounds are computed from the actor dimensions and they don't seem to change when I change the aspect ratio. Does anyone have any ideas on what I may be missing? Some noteworthy information: C++ application VTK version 8.1.1 Render window is a QT openGL Widget Thanks in advance, Mark O _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Jun 28 14:36:18 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 28 Jun 2018 14:36:18 -0400 Subject: [vtkusers] 3D volume camera clipping help In-Reply-To: <20180628110716.c7db654a879d86b78cfcacc46040d57b.9954acf74a.mailapi@email09.godaddy.com> References: <20180627133959.c7db654a879d86b78cfcacc46040d57b.b68d5fd3c9.mailapi@email09.godaddy.com> <20180628110716.c7db654a879d86b78cfcacc46040d57b.9954acf74a.mailapi@email09.godaddy.com> Message-ID: would it be possible for you to do clear build (remove any other cache) and get rid of old build files? On Thu, Jun 28, 2018 at 2:07 PM wrote: > Hello Aashish, > > I am getting some unresolved external symbols from the new libraries, > specifically some issues with vtk volume set property and qvtkopenglwidget. > I'm fairly certain I'm linking to the new libraries correctly, maybe I'm > missing something obvious? > > Some excerpts from visual studio: > > error LNK2019: unresolved external symbol "__declspec(dllimport) public: > void __cdecl vtkVolume::SetProperty(class vtkVolumeProperty *)" > (__imp_?SetProperty at vtkVolume@@QEAAXPEAVvtkVolumeProperty@@@Z) referenced > in function "private: void __cdecl QTVTKRender::InitializeRendering(void)" > (?InitializeRendering at QTVTKRender@@AEAAXXZ) > > error LNK2019: unresolved external symbol "__declspec(dllimport) public: > class vtkVolumeProperty * __cdecl vtkVolume::GetProperty(void)" > (__imp_?GetProperty at vtkVolume@@QEAAPEAVvtkVolumeProperty@@XZ) referenced > in function "public: void __cdecl QTVTKRender::updateShading(class QAction > *)" (?updateShading at QTVTKRender@@QEAAXPEAVQAction@@@Z) > > error LNK2001: unresolved external symbol "public: virtual class > QVTKInteractor * __cdecl QVTKOpenGLWidget::GetInteractor(void)" > (?GetInteractor at QVTKOpenGLWidget@@UEAAPEAVQVTKInteractor@@XZ) > error LNK2001: unresolved external symbol "protected: virtual void __cdecl > QVTKOpenGLWidget::cleanupContext(void)" (?cleanupContext at QVTKOpenGLWidget > @@MEAAXXZ) > error LNK2001: unresolved external symbol "protected: virtual void __cdecl > QVTKOpenGLWidget::initializeGL(void)" (?initializeGL at QVTKOpenGLWidget > @@MEAAXXZ) > 2> SelectionTool.cpp > > error LNK2001: unresolved external symbol "protected: virtual void __cdecl > QVTKOpenGLWidget::mouseDoubleClickEvent(class QMouseEvent *)" > (?mouseDoubleClickEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) > > error LNK2001: unresolved external symbol "protected: virtual void __cdecl > QVTKOpenGLWidget::mouseMoveEvent(class QMouseEvent *)" > (?mouseMoveEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) > error LNK2001: unresolved external symbol "protected: virtual void __cdecl > QVTKOpenGLWidget::mousePressEvent(class QMouseEvent *)" > (?mousePressEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) > error LNK2001: unresolved external symbol "protected: virtual void __cdecl > QVTKOpenGLWidget::mouseReleaseEvent(class QMouseEvent *)" > (?mouseReleaseEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) > error LNK2001: unresolved external symbol "protected: virtual void __cdecl > QVTKOpenGLWidget::paintGL(void)" (?paintGL at QVTKOpenGLWidget@@MEAAXXZ) > error LNK2001: unresolved external symbol "protected: virtual bool __cdecl > QVTKOpenGLWidget::renderVTK(void)" (?renderVTK at QVTKOpenGLWidget@@MEAA_NXZ) > error LNK2001: unresolved external symbol "protected: virtual void __cdecl > QVTKOpenGLWidget::resizeGL(int,int)" (?resizeGL at QVTKOpenGLWidget > @@MEAAXHH at Z) > > Thanks in advance, > > Mark O > > --------- Original Message --------- > Subject: RE: Re: [vtkusers] 3D volume camera clipping help > From: mark.ostroot at lickenbrocktech.com > Date: 6/27/18 1:39 pm > To: "Aashish Chaudhary" > Cc: vtkusers at vtk.org > > Dear Aashish, > I am grabbing the latest from master and compiling from source, I will > test to see if this fixes my issue and let you know. > > -Mark > > > --------- Original Message --------- > Subject: Re: [vtkusers] 3D volume camera clipping help > From: "Aashish Chaudhary" > Date: 6/27/18 12:48 pm > To: mark.ostroot at lickenbrocktech.com > Cc: vtkusers at vtk.org > > Dear Mark, > > We had a bug which could have resulted in what you are observing. Would it > be possible for you to try current master and see if this goes away? > > - Aashish > > On Wed, Jun 27, 2018 at 3:39 PM wrote: > >> Hello, >> >> I have a 3D volume of some CT Data that works fine at the original aspect >> Ratio. I have some code that adjusts the aspect ratio of the volume by >> using the VtkReSlicer. Which works well for applying a new aspect ratio. My >> issue is that whenever my aspect ratio is non-Cubic I get some clipping of >> my volume at certain angles when it is being rotated around. I have tried >> using the "ResetCameraClippingRange" function, but this seems to have no >> effect on my Rendered volume. I know that the clipping range bounds are >> computed from the actor dimensions and they don't seem to change when I >> change the aspect ratio. Does anyone have any ideas on what I may be >> missing? >> >> >> Some noteworthy information: >> C++ application >> VTK version 8.1.1 >> Render window is a QT openGL Widget >> >> Thanks in advance, >> Mark O >> >> >> _______________________________________________ >> 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.ostroot at lickenbrocktech.com Thu Jun 28 15:46:59 2018 From: mark.ostroot at lickenbrocktech.com (mark.ostroot at lickenbrocktech.com) Date: Thu, 28 Jun 2018 12:46:59 -0700 Subject: [vtkusers] 3D volume camera clipping help In-Reply-To: Message-ID: <20180628124659.c7db654a879d86b78cfcacc46040d57b.bf74ba9286.mailapi@email09.godaddy.com> I'm not quite certain what you mean, but I have cleaned the project I'm running so there shouldn't be anything old left over. Additionally the master branch of vtk is installed to a new directory, which is where all of my code is now linking to. --------- Original Message --------- Subject: Re: Re: [vtkusers] 3D volume camera clipping help From: "Aashish Chaudhary" Date: 6/28/18 11:36 am To: mark.ostroot at lickenbrocktech.com Cc: vtkusers at vtk.org would it be possible for you to do clear build (remove any other cache) and get rid of old build files? On Thu, Jun 28, 2018 at 2:07 PM wrote: Hello Aashish, I am getting some unresolved external symbols from the new libraries, specifically some issues with vtk volume set property and qvtkopenglwidget. I'm fairly certain I'm linking to the new libraries correctly, maybe I'm missing something obvious? Some excerpts from visual studio: error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl vtkVolume::SetProperty(class vtkVolumeProperty *)" (__imp_?SetProperty at vtkVolume@@QEAAXPEAVvtkVolumeProperty@@@Z) referenced in function "private: void __cdecl QTVTKRender::InitializeRendering(void)" (?InitializeRendering at QTVTKRender@@AEAAXXZ) error LNK2019: unresolved external symbol "__declspec(dllimport) public: class vtkVolumeProperty * __cdecl vtkVolume::GetProperty(void)" (__imp_?GetProperty at vtkVolume@@QEAAPEAVvtkVolumeProperty@@XZ) referenced in function "public: void __cdecl QTVTKRender::updateShading(class QAction *)" (?updateShading at QTVTKRender@@QEAAXPEAVQAction@@@Z) error LNK2001: unresolved external symbol "public: virtual class QVTKInteractor * __cdecl QVTKOpenGLWidget::GetInteractor(void)" (?GetInteractor at QVTKOpenGLWidget@@UEAAPEAVQVTKInteractor@@XZ) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::cleanupContext(void)" (?cleanupContext at QVTKOpenGLWidget@@MEAAXXZ) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::initializeGL(void)" (?initializeGL at QVTKOpenGLWidget@@MEAAXXZ) 2> SelectionTool.cpp error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::mouseDoubleClickEvent(class QMouseEvent *)" (?mouseDoubleClickEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::mousePressEvent(class QMouseEvent *)" (?mousePressEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent at QVTKOpenGLWidget@@MEAAXPEAVQMouseEvent@@@Z) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::paintGL(void)" (?paintGL at QVTKOpenGLWidget@@MEAAXXZ) error LNK2001: unresolved external symbol "protected: virtual bool __cdecl QVTKOpenGLWidget::renderVTK(void)" (?renderVTK at QVTKOpenGLWidget@@MEAA_NXZ) error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKOpenGLWidget::resizeGL(int,int)" (?resizeGL at QVTKOpenGLWidget@@MEAAXHH at Z) Thanks in advance, Mark O --------- Original Message --------- Subject: RE: Re: [vtkusers] 3D volume camera clipping help From: mark.ostroot at lickenbrocktech.com Date: 6/27/18 1:39 pm To: "Aashish Chaudhary" Cc: vtkusers at vtk.org Dear Aashish, I am grabbing the latest from master and compiling from source, I will test to see if this fixes my issue and let you know. -Mark --------- Original Message --------- Subject: Re: [vtkusers] 3D volume camera clipping help From: "Aashish Chaudhary" Date: 6/27/18 12:48 pm To: mark.ostroot at lickenbrocktech.com Cc: vtkusers at vtk.org Dear Mark, We had a bug which could have resulted in what you are observing. Would it be possible for you to try current master and see if this goes away? - Aashish On Wed, Jun 27, 2018 at 3:39 PM wrote: Hello, I have a 3D volume of some CT Data that works fine at the original aspect Ratio. I have some code that adjusts the aspect ratio of the volume by using the VtkReSlicer. Which works well for applying a new aspect ratio. My issue is that whenever my aspect ratio is non-Cubic I get some clipping of my volume at certain angles when it is being rotated around. I have tried using the "ResetCameraClippingRange" function, but this seems to have no effect on my Rendered volume. I know that the clipping range bounds are computed from the actor dimensions and they don't seem to change when I change the aspect ratio. Does anyone have any ideas on what I may be missing? Some noteworthy information: C++ application VTK version 8.1.1 Render window is a QT openGL Widget Thanks in advance, Mark O _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From minpu.code at gmail.com Thu Jun 28 20:15:17 2018 From: minpu.code at gmail.com (pnt1614) Date: Thu, 28 Jun 2018 17:15:17 -0700 (MST) Subject: [vtkusers] How to build VTK 8.1.1 with vtkGUISupportMFC? Message-ID: <1530231317519-0.post@n5.nabble.com> I am trying to build VTK 8.1.1 with vtkGUISupportMFC option on Windows 10 64bit using CMake 3.11.4 and visual studio 2015 (64 bit). Everything is okay in CMake, but in the visual studio 2015 I cannot build "ALL_BUILD" project because of two following messsages: 1. "no instance of overloaded function "vtkWin32OpenGLRenderWindow::GetPixelData" matches the argument list" 2. "vtkWin32OpenGLRenderWindow::GetPixelData": no overloaded function takes 5 arguments. Is there anyone experienced this problem? Please, help me. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From shandoosheri at gmail.com Thu Jun 28 23:13:51 2018 From: shandoosheri at gmail.com (Shady Nawara) Date: Thu, 28 Jun 2018 22:13:51 -0500 Subject: [vtkusers] vtkInteractorStyleDrawPolygon in c# Message-ID: Hi, I have been trying to use the vtkInteractorStyleDrawPolygon to select points in an actor. however, the method GetPolygonPoints () does not exist, is there another way to get points selected by the drawn polygon. I am using Activiz vtk 7.1.1. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From shandoosheri at gmail.com Fri Jun 29 01:05:23 2018 From: shandoosheri at gmail.com (Shady Nawara) Date: Fri, 29 Jun 2018 00:05:23 -0500 Subject: [vtkusers] vtkInteractorStyleDrawPolygon in c# In-Reply-To: References: Message-ID: I fixed it by listening to the mouse move event and using a point picker to record all the perimeter points. works good so far. On Thu, Jun 28, 2018 at 10:13 PM Shady Nawara wrote: > Hi, > I have been trying to use the vtkInteractorStyleDrawPolygon to select > points in an actor. however, the method GetPolygonPoints > > () does not exist, is there another way to get points selected by the > drawn polygon. I am using Activiz vtk 7.1.1. > > Thank you > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vacingforo at gmail.com Fri Jun 29 04:32:01 2018 From: vacingforo at gmail.com (sergio campo) Date: Fri, 29 Jun 2018 10:32:01 +0200 Subject: [vtkusers] Convert STL file to OBJ with VTK? Message-ID: Convert STL file to OBJ file with VTK? -------------- next part -------------- An HTML attachment was scrubbed... URL: From shayan.moradkhani at gmail.com Fri Jun 29 04:34:31 2018 From: shayan.moradkhani at gmail.com (shayan moradkhani) Date: Fri, 29 Jun 2018 01:34:31 -0700 (MST) Subject: [vtkusers] Learning VTK with Python In-Reply-To: <5ce676911001270851x49ca84e9h96d844e7aaef21a3@mail.gmail.com> References: <5ce676911001270851x49ca84e9h96d844e7aaef21a3@mail.gmail.com> Message-ID: <1530261271730-0.post@n5.nabble.com> hi, i'm coding in c++ and i want to simulation a machining process, like a simple drilling machine and a whole which its diameter and depth are varying. do you have any idea of how to do that? i looked into slicer and slider examples, but not so much hint from them regards Shayan -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Zoltan.Kovacs at esi-group.com Fri Jun 29 05:42:12 2018 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Fri, 29 Jun 2018 09:42:12 +0000 Subject: [vtkusers] Update of multiple clipping planes. Message-ID: Dear all, I have the a code for clipping 3D glyphs with there planes: the normal vectors of the planes point to the directions of the coordinate axes and the code clips with these three planes through given origins. It clips the glyphs properly with three planes and if I remove comments on the section which uses only one of the planes (with the normal vector pointing in the y-direction) the code clips with only one plane. If modify the origin of the plane in the version using only one plane it updates the clipping filter and the mapper automatically and I can see the new clipping with the modified origin of the clipping plane. However, when I modify the origin of one of the planes in the version using three planes nothing changes even if update the clipper or/and the mapper. Does anyone have a good idea how to implement plane position modification for clipping with multiple planes? The relevant part of the code is the following: clipPlaneOrigins = vtkSmartPointer::New(); clipPlaneNormals = vtkSmartPointer::New(); clipPlaneY = vtkSmartPointer::New(); clipPlanes = vtkSmartPointer::New(); clipper = vtkSmartPointer::New(); double origin[3], normal[3]; origin[0] = bounds[0]; origin[1] = bounds[2]; origin[2] = bounds[4]; clipPlaneOrigins->SetNumberOfPoints(3); clipPlaneOrigins->InsertPoint(0, origin); clipPlaneOrigins->InsertPoint(1, origin); clipPlaneOrigins->InsertPoint(2, origin); clipPlaneNormals->SetNumberOfComponents(3); clipPlaneNormals->SetNumberOfTuples(3); // set the normal of the first clipping plane along the x-axis normal[0] = 1; normal[1] = 0; normal[2] = 0; clipPlaneNormals->SetTuple(0, normal); // set the normal of the second clipping plane along the y-axis normal[0] = 0; normal[1] = 1; normal[2] = 0; clipPlaneNormals->SetTuple(1, normal); // set the normal of the third clipping plane along the z-axis normal[0] = 0; normal[1] = 0; normal[2] = 1; clipPlaneNormals->SetTuple(2, normal); clipPlanes->SetPoints(clipPlaneOrigins); clipPlanes->SetNormals(clipPlaneNormals); clipper->SetInputConnection(glyph->GetOutputPort()); clipper->SetClipFunction(clipPlanes); /* normal[0] = 0; normal[1] = 1; normal[2] = 0; clipPlaneY->SetOrigin(origin[0],origin[1],origin[2]); clipPlaneY->SetNormal(normal[0],normal[1],normal[2]); clipper->SetClipFunction(clipPlaneY); */ // connect the output of clipper to the input of the data set mapper mapper->SetInputConnection(clipper->GetOutputPort()); mapper->Update(); Thanks a for the help! Regards Zoltan -------------- next part -------------- An HTML attachment was scrubbed... URL: From shayan.moradkhani at gmail.com Fri Jun 29 07:02:29 2018 From: shayan.moradkhani at gmail.com (shayan moradkhani) Date: Fri, 29 Jun 2018 04:02:29 -0700 (MST) Subject: [vtkusers] real-time simulation In-Reply-To: <5E4CFC88-96C3-47CF-9324-33627B3822AB@spiria.com> References: <1530010286739-0.post@n5.nabble.com> <5E4CFC88-96C3-47CF-9324-33627B3822AB@spiria.com> Message-ID: <1530270149653-0.post@n5.nabble.com> hi, the model is already designed in solidworks and i'll have to import it to VTK and adjust the 7 degrees of freedom. the robot is going to carry out machining process. so i have to be able to first import the model, then find a way to control the model, simulating machining process using the collision detection that you sent me. i'm not sure how to describe the complexity of the model. so do you think with vtk it is gonna work out? i appreciate your help Shayan -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From goodwin.lawlor.lists at gmail.com Fri Jun 29 09:55:38 2018 From: goodwin.lawlor.lists at gmail.com (Goodwin Lawlor) Date: Fri, 29 Jun 2018 14:55:38 +0100 Subject: [vtkusers] machining simulation and collision detection In-Reply-To: References: <1530181664677-0.post@n5.nabble.com> Message-ID: Hi Bill, The class has been updated for the new pipline in VTK6 by Ben Hopfer. See here: http://benjaminhopfer.com/2015/09/16/vtkbioeng-for-vtk-6-2/ Are you thinking of adding to VTK? Thanks, Goodwin On Thu, Jun 28, 2018 at 3:49 PM Bill Lorensen wrote: > I've started to work on adding the Slicrer collision detection. > > On Thu, Jun 28, 2018, 3:32 AM Csaba Pinter > wrote: > >> Hi! >> >> Here is a collision detection filter implemented on VTK that works for us >> >> https://github.com/SlicerRt/SlicerRT/blob/master/SlicerRtCommon/vtkCollisionDetectionFilter.h >> >> Not sure if anything new emerged since we added this class, but it >> functions pretty well for our use case. >> >> Hth, >> csaba >> >> -----Original Message----- >> From: vtkusers On Behalf Of shayan >> moradkhani >> Sent: Thursday, June 28, 2018 11:28 >> To: vtkusers at vtk.org >> Subject: [vtkusers] machining simulation and collision detection >> >> hi, >> is there any possibility to do collision detection in vtk? >> i want to simulation machining process in vtk that shows material removal >> >> >> >> -- >> Sent from: >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=QHgC3DbYvsCGUaE5KS%2B6UiV5jfoSB9ATTT6IvZuylyo%3D&reserved=0 >> _______________________________________________ >> Powered by >> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=%2Bk3BLkWN%2Fi1iYZlwJxOXpOI8mCKd%2BTVkBp9dgvPDVb4%3D&reserved=0 >> >> Visit other Kitware open-source projects at >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=Eri9KGMPH9%2FsI2ZXpLN2nwJAEtu51G4NBKLfVcGbLPE%3D&reserved=0 >> >> Please keep messages on-topic and check the VTK FAQ at: >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=quA2KlllXOpgXLYEN7vG4CIV95vZfpQEl6Vsp1uJf0Y%3D&reserved=0 >> >> Search the list archives at: >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=dW27VLnFFlDuoOoz8TW%2FuugnNsnlQtt%2B808oDPm4ATg%3D&reserved=0 >> >> Follow this link to subscribe/unsubscribe: >> >> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=5Y3PqqIlITxU08JgeslZsS89FilyNOiqUsfGW5QfXy0%3D&reserved=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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From choko1201 at gmail.com Fri Jun 29 10:32:55 2018 From: choko1201 at gmail.com (Tatsunidas) Date: Fri, 29 Jun 2018 23:32:55 +0900 Subject: [vtkusers] Build/installation problem of VTK on Mac OSX High Sierra(10.13.5) In-Reply-To: References: Message-ID: Dear, Mr Sebastien, Thank you for your kind. Sorry to my response delay. I tried to install these jogl related jars through this readme file, but, still I get same error. I have attempt an error text. My windows10, working well with VTK-9.0 without errors. But macOS is not. ...very sad. > vtkRender This is my typo. I would be type tvkPanel. This purpose that avoid a "Cocoa AWT: Not running on AppKit thread 0 when expected' error. Thanks. Tatsuaki 2018-06-28 23:17 GMT+09:00 Sebastien Jourdain < sebastien.jourdain at kitware.com>: > I'm not sure to see what you mean here > > > vtkRender replace vtkJoglPanelComponent class > > Otherwise you can find some information on how to build VTK with Java here: > https://github.com/Kitware/VTK/blob/master/Wrapping/Java/README.txt > > Hope that helps, > > Seb > > On Thu, Jun 28, 2018 at 3:20 AM Tatsunidas wrote: > >> Dear, the VTK (java wrapper) running on MacOSX users, >> >> Thank you for reading this message. >> I'm Jpanese. My english is odd, sorry. >> >> I have get following error, >> >> # >> # A fatal error has been detected by the Java Runtime Environment: >> # >> # SIGSEGV (0xb) at pc=0x0000000000000000, pid=744, tid=0x000000000001392b >> # >> # JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build >> 1.8.0_131-b11) >> # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode >> bsd-amd64 compressed oops) >> # Problematic frame: >> # C 0x0000000000000000 >> # >> # Failed to write core dump. Core dumps have been disabled. To enable >> core dumping, try "ulimit -c unlimited" before starting Java again >> # >> # An error report file with more information is saved as: >> # /Users/tatsunidas/Documents/I2WI/VTK/hs_err_pid744.log >> # >> # If you would like to submit a bug report, please visit: >> # http://bugreport.java.com/bugreport/crash.jsp >> # The crash happened outside the Java Virtual Machine in native code. >> # See problematic frame for where to report the bug. >> # >> >> My environment are, >> >> iMac (27-inch, Mid 2010) >> 2.8 GHz Intel Core i5 >> 12 GB 1333 MHz DDR3 >> ATI Radeon HD 5750 1024 MB >> Java SE 8 131(64-bit) >> >> using, >> >> Cmake 3.7.1 >> GCC Defalut compilar(4.2.1) >> >> My procedure are, >> >> Download VTK-9.0 from git >> create blank "build" dir >> run Cmake, >> set src to VTK src >> set build to "build" dir >> >> then "configure" >> >> and... >> >> Add Entry CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib >> Add Entry CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE >> Add Entry CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib >> CMAKE_BUILD_TYPE Release >> >> Checked Java wrappers, then "configure" >> >> and >> >> set to some JDK's paths(to related to JDK 8_131), >> change 1.6 to 1.8 >> check JOGL >> >> then "configure" >> >> set jogl-all.jar and gluegen-rt.jar for JOGL path, >> >> then "configure" >> >> Uncheck related TEST, EXAMPLE >> >> then "configure" and Generate. >> >> cd build >> make >> make install >> >> Build and Install process are nothing with problem. >> >> Then, >> >> Run Eclipse oxygen (.3a), >> add external Jars(vtk.jar and joglamp's jar) >> Create my project and copy sample(SimpleVTK.java), >> vtkRender replace vtkJoglPanelComponent class >> run >> >> get error >> >> If you know that how to fix it, >> please tell me. >> >> Thank you. >> >> Tatsuaki >> >> -- >> ========================================== >> Tatsuaki KOBAYASHI >> e-mail:choko1201 at gmail.com >> TEL:080-1274-6433 >> Good Luck >> ========================================== >> _______________________________________________ >> 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > -- ========================================== Tatsuaki KOBAYASHI e-mail:choko1201 at gmail.com TEL:080-1274-6433 Good Luck ========================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hs_err_pid59581.log Type: application/octet-stream Size: 61804 bytes Desc: not available URL: From bill.lorensen at gmail.com Fri Jun 29 10:40:40 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 29 Jun 2018 07:40:40 -0700 Subject: [vtkusers] machining simulation and collision detection In-Reply-To: References: <1530181664677-0.post@n5.nabble.com> Message-ID: Yes. I'm almost there. I need to write a couple of tests. On Fri, Jun 29, 2018, 6:55 AM Goodwin Lawlor wrote: > Hi Bill, > > The class has been updated for the new pipline in VTK6 by Ben Hopfer. > > See here: http://benjaminhopfer.com/2015/09/16/vtkbioeng-for-vtk-6-2/ > > Are you thinking of adding to VTK? > > Thanks, > > Goodwin > > > > On Thu, Jun 28, 2018 at 3:49 PM Bill Lorensen > wrote: > >> I've started to work on adding the Slicrer collision detection. >> >> On Thu, Jun 28, 2018, 3:32 AM Csaba Pinter >> wrote: >> >>> Hi! >>> >>> Here is a collision detection filter implemented on VTK that works for us >>> >>> https://github.com/SlicerRt/SlicerRT/blob/master/SlicerRtCommon/vtkCollisionDetectionFilter.h >>> >>> Not sure if anything new emerged since we added this class, but it >>> functions pretty well for our use case. >>> >>> Hth, >>> csaba >>> >>> -----Original Message----- >>> From: vtkusers On Behalf Of >>> shayan moradkhani >>> Sent: Thursday, June 28, 2018 11:28 >>> To: vtkusers at vtk.org >>> Subject: [vtkusers] machining simulation and collision detection >>> >>> hi, >>> is there any possibility to do collision detection in vtk? >>> i want to simulation machining process in vtk that shows material removal >>> >>> >>> >>> -- >>> Sent from: >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=QHgC3DbYvsCGUaE5KS%2B6UiV5jfoSB9ATTT6IvZuylyo%3D&reserved=0 >>> _______________________________________________ >>> Powered by >>> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=%2Bk3BLkWN%2Fi1iYZlwJxOXpOI8mCKd%2BTVkBp9dgvPDVb4%3D&reserved=0 >>> >>> Visit other Kitware open-source projects at >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=Eri9KGMPH9%2FsI2ZXpLN2nwJAEtu51G4NBKLfVcGbLPE%3D&reserved=0 >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=quA2KlllXOpgXLYEN7vG4CIV95vZfpQEl6Vsp1uJf0Y%3D&reserved=0 >>> >>> Search the list archives at: >>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=dW27VLnFFlDuoOoz8TW%2FuugnNsnlQtt%2B808oDPm4ATg%3D&reserved=0 >>> >>> Follow this link to subscribe/unsubscribe: >>> >>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=5Y3PqqIlITxU08JgeslZsS89FilyNOiqUsfGW5QfXy0%3D&reserved=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 >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://public.kitware.com/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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor.lists at gmail.com Fri Jun 29 11:27:07 2018 From: goodwin.lawlor.lists at gmail.com (Goodwin Lawlor) Date: Fri, 29 Jun 2018 16:27:07 +0100 Subject: [vtkusers] machining simulation and collision detection In-Reply-To: References: <1530181664677-0.post@n5.nabble.com> Message-ID: FWIW , there's a couple here: https://github.com/glawlor/vtkbioeng/tree/master/Testing/Cxx On Fri, Jun 29, 2018 at 3:40 PM Bill Lorensen wrote: > Yes. I'm almost there. I need to write a couple of tests. > > On Fri, Jun 29, 2018, 6:55 AM Goodwin Lawlor < > goodwin.lawlor.lists at gmail.com> wrote: > >> Hi Bill, >> >> The class has been updated for the new pipline in VTK6 by Ben Hopfer. >> >> See here: http://benjaminhopfer.com/2015/09/16/vtkbioeng-for-vtk-6-2/ >> >> Are you thinking of adding to VTK? >> >> Thanks, >> >> Goodwin >> >> >> >> On Thu, Jun 28, 2018 at 3:49 PM Bill Lorensen >> wrote: >> >>> I've started to work on adding the Slicrer collision detection. >>> >>> On Thu, Jun 28, 2018, 3:32 AM Csaba Pinter >>> wrote: >>> >>>> Hi! >>>> >>>> Here is a collision detection filter implemented on VTK that works for >>>> us >>>> >>>> https://github.com/SlicerRt/SlicerRT/blob/master/SlicerRtCommon/vtkCollisionDetectionFilter.h >>>> >>>> Not sure if anything new emerged since we added this class, but it >>>> functions pretty well for our use case. >>>> >>>> Hth, >>>> csaba >>>> >>>> -----Original Message----- >>>> From: vtkusers On Behalf Of >>>> shayan moradkhani >>>> Sent: Thursday, June 28, 2018 11:28 >>>> To: vtkusers at vtk.org >>>> Subject: [vtkusers] machining simulation and collision detection >>>> >>>> hi, >>>> is there any possibility to do collision detection in vtk? >>>> i want to simulation machining process in vtk that shows material >>>> removal >>>> >>>> >>>> >>>> -- >>>> Sent from: >>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=QHgC3DbYvsCGUaE5KS%2B6UiV5jfoSB9ATTT6IvZuylyo%3D&reserved=0 >>>> _______________________________________________ >>>> Powered by >>>> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=%2Bk3BLkWN%2Fi1iYZlwJxOXpOI8mCKd%2BTVkBp9dgvPDVb4%3D&reserved=0 >>>> >>>> Visit other Kitware open-source projects at >>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=Eri9KGMPH9%2FsI2ZXpLN2nwJAEtu51G4NBKLfVcGbLPE%3D&reserved=0 >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=quA2KlllXOpgXLYEN7vG4CIV95vZfpQEl6Vsp1uJf0Y%3D&reserved=0 >>>> >>>> Search the list archives at: >>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=dW27VLnFFlDuoOoz8TW%2FuugnNsnlQtt%2B808oDPm4ATg%3D&reserved=0 >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> >>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7C143559c585fa476fc27008d5dce1cd75%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636657784756540937&sdata=5Y3PqqIlITxU08JgeslZsS89FilyNOiqUsfGW5QfXy0%3D&reserved=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 >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> https://public.kitware.com/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 >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://public.kitware.com/mailman/listinfo/vtkusers >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Fri Jun 29 17:15:24 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 29 Jun 2018 15:15:24 -0600 Subject: [vtkusers] Build/installation problem of VTK on Mac OSX High Sierra(10.13.5) In-Reply-To: References: Message-ID: vtkPanel does not work in OS X On Fri, Jun 29, 2018 at 8:32 AM Tatsunidas wrote: > Dear, Mr Sebastien, > > Thank you for your kind. > Sorry to my response delay. > > I tried to install these jogl related jars through this readme file, > but, still I get same error. > I have attempt an error text. > > My windows10, working well with VTK-9.0 without errors. > But macOS is not. ...very sad. > > > vtkRender > > This is my typo. I would be type tvkPanel. > This purpose that avoid a "Cocoa AWT: Not running on AppKit thread 0 when > expected' error. > > Thanks. > > Tatsuaki > > > > 2018-06-28 23:17 GMT+09:00 Sebastien Jourdain < > sebastien.jourdain at kitware.com>: > >> I'm not sure to see what you mean here >> >> > vtkRender replace vtkJoglPanelComponent class >> >> Otherwise you can find some information on how to build VTK with Java >> here: >> https://github.com/Kitware/VTK/blob/master/Wrapping/Java/README.txt >> >> Hope that helps, >> >> Seb >> >> On Thu, Jun 28, 2018 at 3:20 AM Tatsunidas wrote: >> >>> Dear, the VTK (java wrapper) running on MacOSX users, >>> >>> Thank you for reading this message. >>> I'm Jpanese. My english is odd, sorry. >>> >>> I have get following error, >>> >>> # >>> # A fatal error has been detected by the Java Runtime Environment: >>> # >>> # SIGSEGV (0xb) at pc=0x0000000000000000, pid=744, >>> tid=0x000000000001392b >>> # >>> # JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build >>> 1.8.0_131-b11) >>> # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode >>> bsd-amd64 compressed oops) >>> # Problematic frame: >>> # C 0x0000000000000000 >>> # >>> # Failed to write core dump. Core dumps have been disabled. To enable >>> core dumping, try "ulimit -c unlimited" before starting Java again >>> # >>> # An error report file with more information is saved as: >>> # /Users/tatsunidas/Documents/I2WI/VTK/hs_err_pid744.log >>> # >>> # If you would like to submit a bug report, please visit: >>> # http://bugreport.java.com/bugreport/crash.jsp >>> # The crash happened outside the Java Virtual Machine in native code. >>> # See problematic frame for where to report the bug. >>> # >>> >>> My environment are, >>> >>> iMac (27-inch, Mid 2010) >>> 2.8 GHz Intel Core i5 >>> 12 GB 1333 MHz DDR3 >>> ATI Radeon HD 5750 1024 MB >>> Java SE 8 131(64-bit) >>> >>> using, >>> >>> Cmake 3.7.1 >>> GCC Defalut compilar(4.2.1) >>> >>> My procedure are, >>> >>> Download VTK-9.0 from git >>> create blank "build" dir >>> run Cmake, >>> set src to VTK src >>> set build to "build" dir >>> >>> then "configure" >>> >>> and... >>> >>> Add Entry CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib >>> Add Entry CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE >>> Add Entry CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib >>> CMAKE_BUILD_TYPE Release >>> >>> Checked Java wrappers, then "configure" >>> >>> and >>> >>> set to some JDK's paths(to related to JDK 8_131), >>> change 1.6 to 1.8 >>> check JOGL >>> >>> then "configure" >>> >>> set jogl-all.jar and gluegen-rt.jar for JOGL path, >>> >>> then "configure" >>> >>> Uncheck related TEST, EXAMPLE >>> >>> then "configure" and Generate. >>> >>> cd build >>> make >>> make install >>> >>> Build and Install process are nothing with problem. >>> >>> Then, >>> >>> Run Eclipse oxygen (.3a), >>> add external Jars(vtk.jar and joglamp's jar) >>> Create my project and copy sample(SimpleVTK.java), >>> vtkRender replace vtkJoglPanelComponent class >>> run >>> >>> get error >>> >>> If you know that how to fix it, >>> please tell me. >>> >>> Thank you. >>> >>> Tatsuaki >>> >>> -- >>> ========================================== >>> Tatsuaki KOBAYASHI >>> e-mail:choko1201 at gmail.com >>> TEL:080-1274-6433 >>> Good Luck >>> ========================================== >>> _______________________________________________ >>> 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 >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://public.kitware.com/mailman/listinfo/vtkusers >>> >> > > > -- > ========================================== > Tatsuaki KOBAYASHI > e-mail:choko1201 at gmail.com > TEL:080-1274-6433 > Good Luck > ========================================== > -------------- next part -------------- An HTML attachment was scrubbed... URL: From choko1201 at gmail.com Fri Jun 29 18:49:06 2018 From: choko1201 at gmail.com (Tatsunidas) Date: Sat, 30 Jun 2018 07:49:06 +0900 Subject: [vtkusers] Build/installation problem of VTK on Mac OSX High Sierra(10.13.5) Message-ID: Dear, Mr. Sebastien, Yes, I know. I had replaced "vtkPanel" to "vtkJoglPanelComponent" in my sample code. I am sorry that my English is so bad. Do you have any suggestion what to do next? Tatsuaki 2018-06-30 6:15 GMT+09:00 Sebastien Jourdain : > vtkPanel does not work in OS X > > On Fri, Jun 29, 2018 at 8:32 AM Tatsunidas wrote: > >> Dear, Mr Sebastien, >> >> Thank you for your kind. >> Sorry to my response delay. >> >> I tried to install these jogl related jars through this readme file, >> but, still I get same error. >> I have attempt an error text. >> >> My windows10, working well with VTK-9.0 without errors. >> But macOS is not. ...very sad. >> >> > vtkRender >> >> This is my typo. I would be type tvkPanel. >> This purpose that avoid a "Cocoa AWT: Not running on AppKit thread 0 when >> expected' error. >> >> Thanks. >> >> Tatsuaki >> >> >> >> 2018-06-28 23:17 GMT+09:00 Sebastien Jourdain < >> sebastien.jourdain at kitware.com>: >> >>> I'm not sure to see what you mean here >>> >>> > vtkRender replace vtkJoglPanelComponent class >>> >>> Otherwise you can find some information on how to build VTK with Java >>> here: >>> https://github.com/Kitware/VTK/blob/master/Wrapping/Java/README.txt >>> >>> Hope that helps, >>> >>> Seb >>> >>> On Thu, Jun 28, 2018 at 3:20 AM Tatsunidas wrote: >>> >>>> Dear, the VTK (java wrapper) running on MacOSX users, >>>> >>>> Thank you for reading this message. >>>> I'm Jpanese. My english is odd, sorry. >>>> >>>> I have get following error, >>>> >>>> # >>>> # A fatal error has been detected by the Java Runtime Environment: >>>> # >>>> # SIGSEGV (0xb) at pc=0x0000000000000000, pid=744, >>>> tid=0x000000000001392b >>>> # >>>> # JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build >>>> 1.8.0_131-b11) >>>> # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode >>>> bsd-amd64 compressed oops) >>>> # Problematic frame: >>>> # C 0x0000000000000000 >>>> # >>>> # Failed to write core dump. Core dumps have been disabled. To enable >>>> core dumping, try "ulimit -c unlimited" before starting Java again >>>> # >>>> # An error report file with more information is saved as: >>>> # /Users/tatsunidas/Documents/I2WI/VTK/hs_err_pid744.log >>>> # >>>> # If you would like to submit a bug report, please visit: >>>> # http://bugreport.java.com/bugreport/crash.jsp >>>> # The crash happened outside the Java Virtual Machine in native code. >>>> # See problematic frame for where to report the bug. >>>> # >>>> >>>> My environment are, >>>> >>>> iMac (27-inch, Mid 2010) >>>> 2.8 GHz Intel Core i5 >>>> 12 GB 1333 MHz DDR3 >>>> ATI Radeon HD 5750 1024 MB >>>> Java SE 8 131(64-bit) >>>> >>>> using, >>>> >>>> Cmake 3.7.1 >>>> GCC Defalut compilar(4.2.1) >>>> >>>> My procedure are, >>>> >>>> Download VTK-9.0 from git >>>> create blank "build" dir >>>> run Cmake, >>>> set src to VTK src >>>> set build to "build" dir >>>> >>>> then "configure" >>>> >>>> and... >>>> >>>> Add Entry CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib >>>> Add Entry CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE >>>> Add Entry CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib >>>> CMAKE_BUILD_TYPE Release >>>> >>>> Checked Java wrappers, then "configure" >>>> >>>> and >>>> >>>> set to some JDK's paths(to related to JDK 8_131), >>>> change 1.6 to 1.8 >>>> check JOGL >>>> >>>> then "configure" >>>> >>>> set jogl-all.jar and gluegen-rt.jar for JOGL path, >>>> >>>> then "configure" >>>> >>>> Uncheck related TEST, EXAMPLE >>>> >>>> then "configure" and Generate. >>>> >>>> cd build >>>> make >>>> make install >>>> >>>> Build and Install process are nothing with problem. >>>> >>>> Then, >>>> >>>> Run Eclipse oxygen (.3a), >>>> add external Jars(vtk.jar and joglamp's jar) >>>> Create my project and copy sample(SimpleVTK.java), >>>> vtkRender replace vtkJoglPanelComponent class >>>> run >>>> >>>> get error >>>> >>>> If you know that how to fix it, >>>> please tell me. >>>> >>>> Thank you. >>>> >>>> Tatsuaki >>>> >>>> -- >>>> ========================================== >>>> Tatsuaki KOBAYASHI >>>> e-mail:choko1201 at gmail.com >>>> TEL:080-1274-6433 >>>> Good Luck >>>> ========================================== >>>> _______________________________________________ >>>> 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 >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> https://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> >> >> >> -- >> ========================================== >> Tatsuaki KOBAYASHI >> e-mail:choko1201 at gmail.com >> TEL:080-1274-6433 >> Good Luck >> ========================================== >> > -- ========================================== Tatsuaki KOBAYASHI e-mail:choko1201 at gmail.com TEL:080-1274-6433 Good Luck ========================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: