From zeinsalah at gmail.com Wed Oct 1 04:31:59 2014 From: zeinsalah at gmail.com (Zein Salah) Date: Wed, 1 Oct 2014 10:31:59 +0200 Subject: [vtkusers] Data type of vtkImageData Message-ID: Hi, I am wondering it there is a default data type for entries in a vtkImageData? Thanks. Zeno -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Oct 1 14:10:15 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 1 Oct 2014 14:10:15 -0400 Subject: [vtkusers] Offscreen GPU Volume Rendering Mac OS X generates black images In-Reply-To: References: Message-ID: Hi Chris, I got carried away by new volume rendering code but now I am back to your issue. I will report back. thanks On Tue, Sep 30, 2014 at 5:04 PM, Chris Hafey wrote: > Hi Aashish and vtkusers, > Just checking in to see if anyone has been able to reproduce this issue > or see anything I am doing wrong. I would love to get this working on Mac > OS X - thanks for any assistance! > > Chris > > On Sep 25, 2014, at 8:39 AM, Chris Hafey wrote: > > The follow code will reproduce the problem - change the line commented out > near the top to switch between GPU and RayCast rendering to see it working > and not working. Let me know if you need a CMakefile and DICOM files (I > assume you have DICOM files and can plug this code into an existing project > if needed ) > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > > int main(int argc, char** argv) > > { > > > //int renderMode =vtkSmartVolumeMapper::RayCastRenderMode; // this > works > > int renderMode =vtkSmartVolumeMapper::GPURenderMode; // this > generates black image > > > // Read the DICOM Data > > vtkSmartPointer reader = vtkSmartPointer< > vtkDICOMImageReader>::New(); > > reader->SetDirectoryName("/Users/chafey/DICOM/Volume3"); > > reader->Update(); > > vtkSmartPointer imageData(reader->GetOutput()); > > > // Translate origin to center of volume > > double xSpacing, ySpacing, zSpacing; > > imageData->GetSpacing(xSpacing, ySpacing, zSpacing); > > int* dims = imageData->GetDimensions(); > > double xCenter = dims[0] * xSpacing / 2.0; > > double yCenter = dims[1] * ySpacing / 2.0; > > double zCenter = dims[2] * zSpacing / 2.0; > > imageData->SetOrigin(-xCenter, -yCenter, -zCenter); > > > // Setup the renderer for offscreen rendering > > vtkSmartPointer renderer = vtkSmartPointer >::New(); > > > // Setup the render window > > vtkSmartPointer render_window = vtkSmartPointer< > vtkRenderWindow>::New(); > > render_window->SetOffScreenRendering(1); > > render_window->AddRenderer(renderer); > > render_window->SetSize(512, 512); > > > // Setup the volume mapper > > vtkSmartPointer volume_mapper = vtkSmartPointer< > vtkSmartVolumeMapper>::New(); > > volume_mapper->SetRequestedRenderMode(renderMode); > > volume_mapper->SetInputData(imageData); > > > > // Setup the volume > > vtkSmartPointer volume = vtkSmartPointer::New(); > > volume->SetMapper(volume_mapper); > > renderer->AddViewProp(volume); > > > // Render the image > > render_window->Render(); > > vtkSmartPointer windowToImageFilter = > vtkSmartPointer::New(); > > windowToImageFilter->SetInput(render_window); > > windowToImageFilter->Update(); > > > // Create a JPEG in memory > > vtkSmartPointer writer = vtkSmartPointer >::New(); > > writer->WriteToMemoryOn(); > > writer->SetInputConnection(windowToImageFilter->GetOutputPort()); > > writer->Write(); > > vtkSmartPointer dataPtr = writer->GetResult(); > > dataPtr->Squeeze(); > > > // write the jpeg to disk > > ofstream myFile ("image.jpg", ios::out | ios::binary); > > myFile.write ((const char*)dataPtr->GetPointer(0), dataPtr->GetSize > ()); > > > return 0; > > } > > On Thu, Sep 25, 2014 at 7:42 AM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> On Thu, Sep 25, 2014 at 8:38 AM, Chris Hafey wrote: >> >>> No errors on the console. I will work on a standalone example. Can you >>> please clarify whether or not I should be using mesa / osmesa for GPU >>> rendering on Mac OS X? >>> >> >> In theory your regular driver should work with the offscreen rendering >> setting. As per my understanding, that will just not open the window but >> will create a context in which the rendering is performed. But if the >> image is black and if it is not if you don't set that flag then it means >> the context was not created properly. VTK should have given you a error but >> may be it is fooled by the system itself. >> >> You can try osmesa, make sure that VTK detects it, and see if that works. >> >> - Aashish >> >>> >>> Chris >>> >>> On Thu, Sep 25, 2014 at 7:37 AM, Aashish Chaudhary < >>> aashish.chaudhary at kitware.com> wrote: >>> >>>> This is good to know. Do you get any errors on the console? A >>>> standalone example will be nice. >>>> >>>> - Aashish >>>> >>>> On Thu, Sep 25, 2014 at 8:32 AM, Chris Hafey wrote: >>>> >>>>> I am enabling off screen rendering by calling SetOffScreenRendering(1) >>>>> on the vtkRenderWindow. Should I be using osmesa? I can create a >>>>> standalone example to reproduce if needed. >>>>> >>>>> Chris >>>>> >>>>> On Thu, Sep 25, 2014 at 7:21 AM, Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com> wrote: >>>>> >>>>>> No problem. How did you enable the offscreen? Can you post your code >>>>>> somewhere? >>>>>> >>>>>> Thanks, >>>>>> Aashish >>>>>> >>>>>> On Thu, Sep 25, 2014 at 8:05 AM, Chris Hafey >>>>>> wrote: >>>>>> >>>>>>> Hi Aashish, >>>>>>> Forgive my ignorance but I don't know much about osmesa or whether >>>>>>> I am using it. I am using VTK as built by homebrew and don't see any >>>>>>> options related to osmesa. I have not installed osmesa on the machine. No >>>>>>> errors or warnings are issued on the console. >>>>>>> >>>>>>> Chris >>>>>>> >>>>>>> On Thu, Sep 25, 2014 at 6:46 AM, Aashish Chaudhary < >>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>> >>>>>>>> Hi Chris, >>>>>>>> >>>>>>>> Are you using osmesa for the offscreen rendering? Are you getting >>>>>>>> any error on the console? >>>>>>>> >>>>>>>> Thanks >>>>>>>> >>>>>>>> >>>>>>>> On Thu, Sep 25, 2014 at 7:32 AM, Chris Hafey >>>>>>>> wrote: >>>>>>>> >>>>>>>>> VTK 6.1.0 >>>>>>>>> Mac OS X Mavericks 10.9.5 >>>>>>>>> Macbook Pro 2012 Retina with nVidia GeForce GT 650M 1024 MB >>>>>>>>> >>>>>>>>> My program uses VTK to do off screen volume rendering of medical >>>>>>>>> images. I suspect this is a bug in VTK and not my software because: >>>>>>>>> 1) GPURenderMode works fine on Windows (both in a VM running on >>>>>>>>> same Mac and on two other Windows 7 boxes with an nVidia GPUs) >>>>>>>>> 2) RayCastRenderMode works fine on Mac OS X >>>>>>>>> 3) TextureRenderMode works fine on Mac OS X >>>>>>>>> >>>>>>>>> I tried searching the mailing list and google and couldn't find >>>>>>>>> anything. The rendering code is about as basic as it can be - it simply >>>>>>>>> sets the color, opacity, clip planes and matrix. Any ideas on what I might >>>>>>>>> be doing wrong or how I can debug? >>>>>>>>> >>>>>>>>> Thanks >>>>>>>>> >>>>>>>>> Chris Hafey >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>> * >>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>> * >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenchu at cse.ohio-state.edu Thu Oct 2 21:17:07 2014 From: chenchu at cse.ohio-state.edu (Chun-Ming (Jimmy) Chen) Date: Thu, 2 Oct 2014 21:17:07 -0400 Subject: [vtkusers] VTKData 6.1 Files Broken? Message-ID: Hi, The VTK example data files v6.1.0 seem to be broken on http://www.vtk.org/VTK/resources/software.html The download links are: http://www.vtk.org/files/release/6.1/VTKData-6.1.0.zip http://www.vtk.org/files/release/6.1/VTKData-6.1.0.tar.gz These archived files are 90MB, but when you decompress them you only get an empty folder. We have tried to decompress these files on Mac and Linux. We have seen this problem since this summer. Maybe someone has reported this problem but it is still not solved for us. Thanks and regards, Chun-Ming From somada141 at gmail.com Fri Oct 3 07:53:06 2014 From: somada141 at gmail.com (Adamos Kyriakou) Date: Fri, 3 Oct 2014 21:53:06 +1000 Subject: [vtkusers] Python .egg packaging and installation with VTK v6.1.0 Message-ID: <9A5A72BD-FF14-42CD-B1AB-B45F1ED349B4@gmail.com> Hi all, I?ve managed to build VTK v6.1.0 (release branch) against the Anaconda Python 2.7.8 under Windows 8.1 with Visual Studio 2012 without a hitch. However, as I can see from the changelog VTK no longer ships with a ?setup.py? to allow for the installation and packaging of the build. So: 1) How do you go about packaging to an .egg now for distribution? 2) How do you install it to a given ?site-packages? directory? As far as I could tell I just needed to build the ?INSTALL? upon setting the ?VTK_INSTALL_PYTHON_MODULE_DIR? variable under CMake to the ?lib\site-packages? directory of my Python installation. I should mention that during ?Install? all the ?bin?, ?include?, etc directories end up under ?Program Files?. However, when trying to import VTK through python under the Python installation I just installed it in, the import fails with a: ``` from vtkCommonCorePython import * Import Error: DLL load failed: The specified module could not be found ``` even though the vtkCommonCorePython.pyd file in under the same directory as all the others. Any ideas? Thanks a lot! Adam From samantrv at mail.uc.edu Fri Oct 3 10:07:25 2014 From: samantrv at mail.uc.edu (Samant, Rutuja (samantrv)) Date: Fri, 3 Oct 2014 14:07:25 +0000 Subject: [vtkusers] Boundary detection between 2 3D vtkImageData files Message-ID: <993d76ac93564478b6fb892c817b8c0f@CO1PR01MB190.prod.exchangelabs.com> Hey, I want to superimpose two 3D vtkImageData entities and identify the boundary at which these two images come in contact with each other. Is there any particular function that will help me get this information? Regards, Rutuja Samant Graduate Student, Mechanical Engineering University of Cincinnati -------------- next part -------------- An HTML attachment was scrubbed... URL: From 15891495523 at 126.com Fri Oct 3 11:36:38 2014 From: 15891495523 at 126.com (zhq) Date: Fri, 3 Oct 2014 08:36:38 -0700 (PDT) Subject: [vtkusers] Is there some class to generate cpr and mrp image ? Message-ID: <1412350598158-5728981.post@n5.nabble.com> Dear all : I want to generate some cpr/mpr image with VTK . Does VTK has some class to generate cpr/mpr Image ? Thanks in advance ! zhq -- View this message in context: http://vtk.1045678.n5.nabble.com/Is-there-some-class-to-generate-cpr-and-mrp-image-tp5728981.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Oct 3 12:40:01 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 3 Oct 2014 10:40:01 -0600 Subject: [vtkusers] Python .egg packaging and installation with VTK v6.1.0 In-Reply-To: <9A5A72BD-FF14-42CD-B1AB-B45F1ED349B4@gmail.com> References: <9A5A72BD-FF14-42CD-B1AB-B45F1ED349B4@gmail.com> Message-ID: Hi Adamos, In order to use the modules, all of the VTK DLLs must be in the PATH (or you can copy them into the same directory as the .pyd files). - David On Fri, Oct 3, 2014 at 5:53 AM, Adamos Kyriakou wrote: > Hi all, > > I've managed to build VTK v6.1.0 (release branch) against the Anaconda Python 2.7.8 under Windows 8.1 with Visual Studio 2012 without a hitch. However, as I can see from the changelog VTK no longer ships with a 'setup.py' to allow for the installation and packaging of the build. So: > > 1) How do you go about packaging to an .egg now for distribution? > 2) How do you install it to a given 'site-packages' directory? As far as I could tell I just needed to build the 'INSTALL' upon setting the 'VTK_INSTALL_PYTHON_MODULE_DIR' variable under CMake to the 'lib\site-packages' directory of my Python installation. I should mention that during 'Install' all the 'bin', 'include', etc directories end up under 'Program Files'. However, when trying to import VTK through python under the Python installation I just installed it in, the import fails with a: > > ``` > from vtkCommonCorePython import * > Import Error: DLL load failed: The specified module could not be found > ``` > > even though the vtkCommonCorePython.pyd file in under the same directory as all the others. > > Any ideas? > > Thanks a lot! > Adam From greg.schussman at gmail.com Fri Oct 3 21:53:57 2014 From: greg.schussman at gmail.com (Greg Schussman) Date: Fri, 3 Oct 2014 18:53:57 -0700 Subject: [vtkusers] How does one remove keypress events? Message-ID: Hi. I'm having trouble getting rid of default keypress behavior. I've had considerably less luck with the documentation/examples and with google than usual. I'm using python 2.6.8 and vtk-5.10.1. I've been working from the example here: http://www.vtk.org/Wiki/index.php?title=VTK/Examples/Python/Interaction/MouseEventsObserver If I run that directly, it works, and hit 'w, it switches to wireframe. I want to disconnect any default key handling so that eventually I can substitute my own. That is, eventually, I want to make 'w' do something completely different. If I edit the end of that example to look like this: interactor.RemoveObservers('KeyPressEvent') # <-- I ADDED THIS interactor.RemoveObservers('LeftButtonPressEvent') interactor.AddObserver('LeftButtonPressEvent', DummyFunc1, 1.0) interactor.AddObserver('LeftButtonPressEvent', DummyFunc2, -1.0) interactor.Initialize() interactor.Start() and run again, pressing 'w' still switches to wireframe. I was hoping that by removing all KeyPressEvent observers, the program would no longer respond to keypresses. Why does 'w' still produce a wireframe image, and how do I disable 'w' (so I can override it with my own action)? In trying to debug this, I figured I'd check whether 'KeyPressEvent' really is the correct name. If I go back to the original example code, and change the end to look like this: def keypress(obj, ev): # <-- I ADDED THIS print "keypress!" # < -- I ADDED THIS interactor.AddObserver('KeyPressEvent', keypress) # <-- I ADDED THIS interactor.RemoveObservers('LeftButtonPressEvent') interactor.AddObserver('LeftButtonPressEvent', DummyFunc1, 1.0) interactor.AddObserver('LeftButtonPressEvent', DummyFunc2, -1.0) interactor.Initialize() interactor.Start() then I see "keypress!" every time I press a key. This tells me that 'KeyPressEvent' is the correct name. So I'm baffled. I think I'm removing all 'KeyPressEvent' observers, yet 'w' still switches to wireframe. What am I doing wrong? Many thanks for any help. Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Sat Oct 4 12:52:11 2014 From: DLRdave at aol.com (David Cole) Date: Sat, 4 Oct 2014 12:52:11 -0400 Subject: [vtkusers] How does one remove keypress events? In-Reply-To: References: Message-ID: The keypresses VTK handles by default are documented here: http://www.vtk.org/doc/release/5.10/html/classvtkInteractorStyle.html#details (The 5.10 documentation, since that's the version you said you're using...) The implementation for handling those keys is in the method vtkInteractorStyle::OnChar, which is documented here: http://www.vtk.org/doc/release/5.10/html/classvtkInteractorStyle.html#a4357cd197cdf5c2d9ff8821cb4a50d82 The event triggering OnChar is the CharEvent, though, not the KeyPressEvent. Try removing observers for CharEvent instead. HTH, David C. On Fri, Oct 3, 2014 at 9:53 PM, Greg Schussman wrote: > Hi. > > I'm having trouble getting rid of default keypress behavior. I've had > considerably less luck with the documentation/examples and with google than > usual. > > I'm using python 2.6.8 and vtk-5.10.1. I've been working from the example > here: > > http://www.vtk.org/Wiki/index.php?title=VTK/Examples/Python/Interaction/MouseEventsObserver > > If I run that directly, it works, and hit 'w, it switches to wireframe. I > want to disconnect any default key handling so that eventually I can > substitute my own. That is, eventually, I want to make 'w' do something > completely different. > > If I edit the end of that example to look like this: > > interactor.RemoveObservers('KeyPressEvent') # <-- I ADDED THIS > interactor.RemoveObservers('LeftButtonPressEvent') > interactor.AddObserver('LeftButtonPressEvent', DummyFunc1, 1.0) > interactor.AddObserver('LeftButtonPressEvent', DummyFunc2, -1.0) > interactor.Initialize() > interactor.Start() > > and run again, pressing 'w' still switches to wireframe. I was hoping that > by removing all KeyPressEvent observers, the program would no longer respond > to keypresses. Why does 'w' still produce a wireframe image, and how do I > disable 'w' (so I can override it with my own action)? > > In trying to debug this, I figured I'd check whether 'KeyPressEvent' really > is the correct name. If I go back to the original example code, and change > the end to look like this: > > def keypress(obj, ev): # <-- I ADDED THIS > print "keypress!" # < -- I ADDED THIS > > interactor.AddObserver('KeyPressEvent', keypress) # <-- I ADDED THIS > interactor.RemoveObservers('LeftButtonPressEvent') > interactor.AddObserver('LeftButtonPressEvent', DummyFunc1, 1.0) > interactor.AddObserver('LeftButtonPressEvent', DummyFunc2, -1.0) > interactor.Initialize() > interactor.Start() > > then I see "keypress!" every time I press a key. This tells me that > 'KeyPressEvent' is the correct name. So I'm baffled. I think I'm removing > all 'KeyPressEvent' observers, yet 'w' still switches to wireframe. What > am I doing wrong? > > Many thanks for any help. > > Greg > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From dave.demarle at kitware.com Sun Oct 5 09:20:00 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Sun, 5 Oct 2014 09:20:00 -0400 Subject: [vtkusers] VTKData 6.1 Files Broken? In-Reply-To: References: Message-ID: Howdy, The files are there, but they are hard to find and interpret. Look inside the .ExternalData/MD5 directory and you will see lots of files named by their checksum. If you want human readable format: download the 6.0 data tarballs (there are few data changes in-between releases), or download the data from our cache at http://midas3.kitware.com/midas/community/27 Details: In release 6.1 we moved to CMake's ExternalData facility to keep the regression test data perfectly synchronized with the source code. To use the tarballs, download and untar the source code then _optionally_ download and untar the data into your source tree. This way you don't need network access to compile VTK. If you skip the data (and of course leave BUILD_TESTING on), cmake downloads each data file in turn at build time. cheers In 6.1 we moved to using CMake's ExternalData feature to keep our regression test data synchronized with the source code. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Oct 2, 2014 at 9:17 PM, Chun-Ming (Jimmy) Chen < chenchu at cse.ohio-state.edu> wrote: > Hi, > > The VTK example data files v6.1.0 seem to be broken on > http://www.vtk.org/VTK/resources/software.html > > The download links are: > http://www.vtk.org/files/release/6.1/VTKData-6.1.0.zip > http://www.vtk.org/files/release/6.1/VTKData-6.1.0.tar.gz > > These archived files are 90MB, but when you decompress them you only > get an empty folder. We have tried to decompress these files on Mac > and Linux. > We have seen this problem since this summer. Maybe someone has > reported this problem but it is still not solved for us. > > Thanks and regards, > Chun-Ming > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fraser.callaghan at sydney.edu.au Sun Oct 5 10:08:13 2014 From: fraser.callaghan at sydney.edu.au (Fraser Callaghan) Date: Sun, 5 Oct 2014 14:08:13 +0000 Subject: [vtkusers] Generating path lines Message-ID: <220BE31773B69D4C985CA5660D992DB16D5CA9B5@ex-mbx-pro-03> Hello, Are there any examples available for generating particle pathlines in VTK? I have previously been working via the paraview interface (see example below) but would like to migrate to a pure VTK alternative and am having trouble understanding the process. Thanks for you help, Fraser vol = pvs.PVDReader(FileName=pvdFile) source = pvs.XMLPolyDataReader(FileName=sourceVtpFile) pvs.SetActiveSource(vol) outputPaths = pvs.ParticlePath( SeedSource=source ) outputPaths.SelectInputVectors = ['POINTS', 'Velocity'] outputPaths.TerminationTime = terminationTime outputPaths.UpdatePipeline() From wumengda at gmail.com Sun Oct 5 13:54:09 2014 From: wumengda at gmail.com (Wei Xiong) Date: Sun, 5 Oct 2014 19:54:09 +0200 Subject: [vtkusers] From: Wei Xiong Message-ID: <3782381448-222781440@mail.rocketdesignltd.co.uk> Good afternoon vtkusers http://rochii.md/natural.php?race=ueucgnfu3503qbkz Wei Xiong From Mandar.Mhatre at karlstorz.com Mon Oct 6 02:32:43 2014 From: Mandar.Mhatre at karlstorz.com (Mhatre, Mandar) Date: Mon, 6 Oct 2014 06:32:43 +0000 Subject: [vtkusers] Continuous updating tubefilter data Message-ID: Hello everyone I am working on a project to visualize a tube structure. I have a working program for fixed points. Now I want to adapt the same for continuous application. My algorithm reads sensors and calculate 3D coordinates in C++. I want to feed this data to my visualization block in order to continuous visualization. (I can visualize an actor continuously, where I could only change some properties of actor. e.g. SetPosition, Rotate, SetFontSize). Please guide, how should I proceed to do so ? I tried updating vtkPoints and then interpolate these points and eventually tried rendering. Somehow my window shows nothing. once I saw a tube, which was showing some unrealistic shapes when I continued. Any kind of guidance or help will be helpful. Thank you in advance for your time taken. (P.S. I am using TubesFromSplines from wiki as base to create visualization.) With regards, Mandar Mhatre -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.schussman at gmail.com Mon Oct 6 13:58:01 2014 From: greg.schussman at gmail.com (Greg Schussman) Date: Mon, 6 Oct 2014 10:58:01 -0700 Subject: [vtkusers] How does one remove keypress events? In-Reply-To: References: Message-ID: Hi, David. Many, many thanks! That's exactly what I needed, and it's working perfectly. Greg On Sat, Oct 4, 2014 at 9:52 AM, David Cole wrote: > The keypresses VTK handles by default are documented here: > > > http://www.vtk.org/doc/release/5.10/html/classvtkInteractorStyle.html#details > > (The 5.10 documentation, since that's the version you said you're using...) > > The implementation for handling those keys is in the method > vtkInteractorStyle::OnChar, which is documented here: > > > http://www.vtk.org/doc/release/5.10/html/classvtkInteractorStyle.html#a4357cd197cdf5c2d9ff8821cb4a50d82 > > The event triggering OnChar is the CharEvent, though, not the > KeyPressEvent. Try removing observers for CharEvent instead. > > > HTH, > David C. > > On Fri, Oct 3, 2014 at 9:53 PM, Greg Schussman > wrote: > > Hi. > > > > I'm having trouble getting rid of default keypress behavior. I've had > > considerably less luck with the documentation/examples and with google > than > > usual. > > > > I'm using python 2.6.8 and vtk-5.10.1. I've been working from the > example > > here: > > > > > http://www.vtk.org/Wiki/index.php?title=VTK/Examples/Python/Interaction/MouseEventsObserver > > > > If I run that directly, it works, and hit 'w, it switches to wireframe. > I > > want to disconnect any default key handling so that eventually I can > > substitute my own. That is, eventually, I want to make 'w' do something > > completely different. > > > > If I edit the end of that example to look like this: > > > > interactor.RemoveObservers('KeyPressEvent') # <-- I ADDED THIS > > interactor.RemoveObservers('LeftButtonPressEvent') > > interactor.AddObserver('LeftButtonPressEvent', DummyFunc1, 1.0) > > interactor.AddObserver('LeftButtonPressEvent', DummyFunc2, -1.0) > > interactor.Initialize() > > interactor.Start() > > > > and run again, pressing 'w' still switches to wireframe. I was hoping > that > > by removing all KeyPressEvent observers, the program would no longer > respond > > to keypresses. Why does 'w' still produce a wireframe image, and how do > I > > disable 'w' (so I can override it with my own action)? > > > > In trying to debug this, I figured I'd check whether 'KeyPressEvent' > really > > is the correct name. If I go back to the original example code, and > change > > the end to look like this: > > > > def keypress(obj, ev): # <-- I ADDED THIS > > print "keypress!" # < -- I ADDED THIS > > > > interactor.AddObserver('KeyPressEvent', keypress) # <-- I ADDED THIS > > interactor.RemoveObservers('LeftButtonPressEvent') > > interactor.AddObserver('LeftButtonPressEvent', DummyFunc1, 1.0) > > interactor.AddObserver('LeftButtonPressEvent', DummyFunc2, -1.0) > > interactor.Initialize() > > interactor.Start() > > > > then I see "keypress!" every time I press a key. This tells me that > > 'KeyPressEvent' is the correct name. So I'm baffled. I think I'm > removing > > all 'KeyPressEvent' observers, yet 'w' still switches to wireframe. > What > > am I doing wrong? > > > > Many thanks for any help. > > > > Greg > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ra.corredor at gmail.com Mon Oct 6 14:05:31 2014 From: ra.corredor at gmail.com (Ricardo A Corredor) Date: Mon, 6 Oct 2014 11:05:31 -0700 (PDT) Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <1411145224024-5728814.post@n5.nabble.com> Message-ID: <1412618731423-5728996.post@n5.nabble.com> Hi David, I just made a test using my data and your patch. It seems it is working well, but I still don't get how the tolerance should be selected. I explain myself with the following image and description: I'm using a very simple modified version of the VTK Cxx example, PolyDataToImageData (code and data are here: http://git.io/s49TIA). I used two polydata (the cells of both polydata are polylines, i.e. closed contours along Z axis, that could be seen in the image in white), one reasonably bigger than the other one (in the image you will see the body and a structure inside), but keeping same properties. When using the Tolerance (0.001) by default in the big polydata (the body), the 'raster' image is generated correctly. When using the same code in the small structure, the output image still has strange blank lines (left part of the image). However, if I decrease considerably the Tolerance (0.00001), the result is correct (right part of the image). Does it makes sense to you? Is that normal? Thanks! Regards, Ricardo RaC -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5728996.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon Oct 6 15:44:39 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 6 Oct 2014 13:44:39 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: <1412618731423-5728996.post@n5.nabble.com> References: <1411145224024-5728814.post@n5.nabble.com> <1412618731423-5728996.post@n5.nabble.com> Message-ID: I suspect there are problems with the way that the tolerance is applied during the rasterization part of the algorithm, and the larger the tolerance, the more likely it is that problems will occur. For best results you should use a tolerance of zero. The patch is still sitting in the queue because I haven't had time to test it properly. If it is at all possible for you to provide data sets or test code, that would be a big help. - David On Mon, Oct 6, 2014 at 12:05 PM, Ricardo A Corredor wrote: > Hi David, > > I just made a test using my data and your patch. It seems it is working > well, but I still don't get how the tolerance should be selected. I explain > myself with the following image and description: > > > I'm using a very simple modified version of the VTK Cxx example, > PolyDataToImageData (code and data are here: http://git.io/s49TIA). I used > two polydata (the cells of both polydata are polylines, i.e. closed contours > along Z axis, that could be seen in the image in white), one reasonably > bigger than the other one (in the image you will see the body and a > structure inside), but keeping same properties. When using the Tolerance > (0.001) by default in the big polydata (the body), the 'raster' image is > generated correctly. When using the same code in the small structure, the > output image still has strange blank lines (left part of the image). > However, if I decrease considerably the Tolerance (0.00001), the result is > correct (right part of the image). > > Does it makes sense to you? Is that normal? > > Thanks! > > Regards, > > Ricardo > RaC > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5728996.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From david.gobbi at gmail.com Mon Oct 6 15:48:25 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 6 Oct 2014 13:48:25 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <1411145224024-5728814.post@n5.nabble.com> <1412618731423-5728996.post@n5.nabble.com> Message-ID: Also, just in case you are using the patch that was attached to the bug report, that patch is no longer up to date. The most recent code can always be found on the gerrit submission page: http://review.source.kitware.com/#/c/17021/ On Mon, Oct 6, 2014 at 1:44 PM, David Gobbi wrote: > I suspect there are problems with the way that the tolerance is > applied during the rasterization part of the algorithm, and the larger > the tolerance, the more likely it is that problems will occur. For > best results you should use a tolerance of zero. > > The patch is still sitting in the queue because I haven't had time to > test it properly. If it is at all possible for you to provide data > sets or test code, that would be a big help. > > - David > > On Mon, Oct 6, 2014 at 12:05 PM, Ricardo A Corredor > wrote: >> Hi David, >> >> I just made a test using my data and your patch. It seems it is working >> well, but I still don't get how the tolerance should be selected. I explain >> myself with the following image and description: >> >> >> I'm using a very simple modified version of the VTK Cxx example, >> PolyDataToImageData (code and data are here: http://git.io/s49TIA). I used >> two polydata (the cells of both polydata are polylines, i.e. closed contours >> along Z axis, that could be seen in the image in white), one reasonably >> bigger than the other one (in the image you will see the body and a >> structure inside), but keeping same properties. When using the Tolerance >> (0.001) by default in the big polydata (the body), the 'raster' image is >> generated correctly. When using the same code in the small structure, the >> output image still has strange blank lines (left part of the image). >> However, if I decrease considerably the Tolerance (0.00001), the result is >> correct (right part of the image). >> >> Does it makes sense to you? Is that normal? >> >> Thanks! >> >> Regards, >> >> Ricardo >> RaC From david.gobbi at gmail.com Mon Oct 6 15:50:18 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 6 Oct 2014 13:50:18 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <1411145224024-5728814.post@n5.nabble.com> <1412618731423-5728996.post@n5.nabble.com> Message-ID: Never mind my earlier comment about the data. I clicked around on the github link you sent and found it. Thanks muchly. On Mon, Oct 6, 2014 at 1:48 PM, David Gobbi wrote: > Also, just in case you are using the patch that was attached to > the bug report, that patch is no longer up to date. The most > recent code can always be found on the gerrit submission page: > http://review.source.kitware.com/#/c/17021/ > > On Mon, Oct 6, 2014 at 1:44 PM, David Gobbi wrote: >> I suspect there are problems with the way that the tolerance is >> applied during the rasterization part of the algorithm, and the larger >> the tolerance, the more likely it is that problems will occur. For >> best results you should use a tolerance of zero. >> >> The patch is still sitting in the queue because I haven't had time to >> test it properly. If it is at all possible for you to provide data >> sets or test code, that would be a big help. >> >> - David >> >> On Mon, Oct 6, 2014 at 12:05 PM, Ricardo A Corredor >> wrote: >>> Hi David, >>> >>> I just made a test using my data and your patch. It seems it is working >>> well, but I still don't get how the tolerance should be selected. I explain >>> myself with the following image and description: >>> >>> >>> I'm using a very simple modified version of the VTK Cxx example, >>> PolyDataToImageData (code and data are here: http://git.io/s49TIA). I used >>> two polydata (the cells of both polydata are polylines, i.e. closed contours >>> along Z axis, that could be seen in the image in white), one reasonably >>> bigger than the other one (in the image you will see the body and a >>> structure inside), but keeping same properties. When using the Tolerance >>> (0.001) by default in the big polydata (the body), the 'raster' image is >>> generated correctly. When using the same code in the small structure, the >>> output image still has strange blank lines (left part of the image). >>> However, if I decrease considerably the Tolerance (0.00001), the result is >>> correct (right part of the image). >>> >>> Does it makes sense to you? Is that normal? >>> >>> Thanks! >>> >>> Regards, >>> >>> Ricardo >>> RaC From trash001 at odu.edu Mon Oct 6 15:57:04 2014 From: trash001 at odu.edu (TANWEER RASHID) Date: Mon, 6 Oct 2014 15:57:04 -0400 Subject: [vtkusers] Build error for vtk-5.10.1 Message-ID: Hi, I am trying to build VTK-5.10.1, but I keep getting an error. My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to build shared libs. The error is as follows: -- Tanweer Rashid MSVE Dept. Old Dominion University -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher.mullins at kitware.com Mon Oct 6 15:58:06 2014 From: christopher.mullins at kitware.com (Christopher Mullins) Date: Mon, 6 Oct 2014 15:58:06 -0400 Subject: [vtkusers] Build error for vtk-5.10.1 In-Reply-To: References: Message-ID: Please post the error so that we can help you. On Mon, Oct 6, 2014 at 3:57 PM, TANWEER RASHID wrote: > Hi, > > I am trying to build VTK-5.10.1, but I keep getting an error. > My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to build > shared libs. > > The error is as follows: > > > -- > Tanweer Rashid > MSVE Dept. > Old Dominion University > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Christopher Mullins R&D Engineer Kitware Inc., 919.869.8871 -------------- next part -------------- An HTML attachment was scrubbed... URL: From trash001 at odu.edu Mon Oct 6 16:04:39 2014 From: trash001 at odu.edu (TANWEER RASHID) Date: Mon, 6 Oct 2014 16:04:39 -0400 Subject: [vtkusers] Build error for vtk-5.10.1 In-Reply-To: References: Message-ID: Sorry about that. I accidentally sent before I could finish. Hi, I am trying to build VTK-5.10.1, but I keep getting an error. My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to build shared libs. When I build static libs, I don't encounter any problems. During Cmake configuration, I am getting the following warnings (for both static and shared): The target name "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5Edefin.h" is unknown in this context. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:614 (ADD_CUSTOM_COMMAND): Policy CMP0040 is not set: The target in the TARGET signature of add_custom_command() must exist. Run "cmake --help-policy CMP0040" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The target name "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5version.h" is unknown in this context. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:621 (ADD_CUSTOM_COMMAND): Policy CMP0040 is not set: The target in the TARGET signature of add_custom_command() must exist. Run "cmake --help-policy CMP0040" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The target name "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5overflow.h" is unknown in this context. This warning is for project developers. Use -Wno-dev to suppress it. Could not find extension loader. Extensions disabled. Configuring done The build error (for building shared libs) is as follows: [ 30%] Built target vtkEncodeString [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyph.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyphRenderOpenGL.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTCharmap.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFace.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFont.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFont.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFontRenderOpenGL.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFont.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFontRenderOpenGL.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyph.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyphContainer.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTLibrary.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyph.cpp.o [ 30%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyphRenderOpenGL.cpp.o [ 31%] Building CXX object Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTSize.cpp.o make[2]: *** No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so', needed by `bin/libvtkftgl.so.5.10.1'. Stop. make[1]: *** [Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2 make: *** [all] Error 2 trash001 at MSVEDE09:~/Downloads/VTK5.10.1-build$ -- Tanweer Rashid MSVE Dept. Old Dominion University On Mon, Oct 6, 2014 at 3:58 PM, Christopher Mullins < christopher.mullins at kitware.com> wrote: > Please post the error so that we can help you. > > On Mon, Oct 6, 2014 at 3:57 PM, TANWEER RASHID wrote: > >> Hi, >> >> I am trying to build VTK-5.10.1, but I keep getting an error. >> My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to build >> shared libs. >> >> The error is as follows: >> >> >> -- >> Tanweer Rashid >> MSVE Dept. >> Old Dominion University >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Christopher Mullins > R&D Engineer > Kitware Inc., > 919.869.8871 > ------------------------------ > > Spam > > Not spam > > Forget previous vote > > -- Tanweer Rashid MSVE Dept. Old Dominion University -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Oct 6 22:49:10 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 6 Oct 2014 20:49:10 -0600 Subject: [vtkusers] Build error for vtk-5.10.1 In-Reply-To: References: Message-ID: Hi Tanweer, I suspect that you are missing some of the ubuntu dev packages. For libGL.so, get libgl1-mesa-dev: sudo apt-get install libgl1-mesa-dev - David On Mon, Oct 6, 2014 at 2:04 PM, TANWEER RASHID wrote: > Sorry about that. I accidentally sent before I could finish. > > Hi, > > I am trying to build VTK-5.10.1, but I keep getting an error. > My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to build > shared libs. When I build static libs, I don't encounter any problems. > > During Cmake configuration, I am getting the following warnings (for both > static and shared): > > The target name > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5Edefin.h" is > unknown in this context. > This warning is for project developers. Use -Wno-dev to suppress it. > > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:614 > (ADD_CUSTOM_COMMAND): > Policy CMP0040 is not set: The target in the TARGET signature of > add_custom_command() must exist. Run "cmake --help-policy CMP0040" for > policy details. Use the cmake_policy command to set the policy and > suppress this warning. > > The target name > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5version.h" is > unknown in this context. > This warning is for project developers. Use -Wno-dev to suppress it. > > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:621 > (ADD_CUSTOM_COMMAND): > Policy CMP0040 is not set: The target in the TARGET signature of > add_custom_command() must exist. Run "cmake --help-policy CMP0040" for > policy details. Use the cmake_policy command to set the policy and > suppress this warning. > > The target name > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5overflow.h" > is unknown in this context. > This warning is for project developers. Use -Wno-dev to suppress it. > > Could not find extension loader. Extensions disabled. > > Configuring done > > > > > The build error (for building shared libs) is as follows: > > [ 30%] Built target vtkEncodeString > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyph.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyphRenderOpenGL.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTCharmap.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFace.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFont.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFont.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFontRenderOpenGL.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFont.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFontRenderOpenGL.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyph.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyphContainer.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTLibrary.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyph.cpp.o > [ 30%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyphRenderOpenGL.cpp.o > [ 31%] Building CXX object > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTSize.cpp.o > make[2]: *** No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so', > needed by `bin/libvtkftgl.so.5.10.1'. Stop. > make[1]: *** [Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2 > make: *** [all] Error 2 > trash001 at MSVEDE09:~/Downloads/VTK5.10.1-build$ > > > > -- > Tanweer Rashid > MSVE Dept. > Old Dominion University From g.bogle at auckland.ac.nz Tue Oct 7 03:30:38 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Tue, 7 Oct 2014 07:30:38 +0000 Subject: [vtkusers] Integer overflow in vtkImageAccumulate Message-ID: Hi all, I encountered a problem in 3DSlicer with the auto calculation of window/level. This may be a well-known issue. For some big 3D tiffs, the algorithm gives bad w/l values, i.e. < 0. I have tracked this to vtkImageAccumulate() in vtkImageAccumulate.cxx, where the histogram is computed. The problem is that the voxel counts are stored in an int array (outPtr), and it's possible to have more than 2^31 voxels with the same value (e.g. 0). I admit that these are unusual tiffs - they are binary and big - so it's a rather extreme case, but it seems that this is going to bite others as image sizes increase. Cheers Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From severin at volumental.com Tue Oct 7 05:13:04 2014 From: severin at volumental.com (Severin Holzer-Graf) Date: Tue, 7 Oct 2014 11:13:04 +0200 Subject: [vtkusers] Job offers in 3D Computer Vision Startup Volumental Message-ID: Hi guys, I'm working for a 3D Computer Vision Startup in Stockholm, Sweden. We're working hard to develop cutting edge mass customization and 3D reconstruction technology. Recently we've been rated as one of the top Startups in Sweden. We just received a several million funding and were on the stage with Intel at IDF '14 in San Francisco. Together with them we presented our newest innovation for mass customization using Intel's RealSense technology (new generation depth camera). At Volumental we're a young and dynamic team of more than 5 different nationalities. Everybody counts, shapes and makes the company what it is and it will become. I joined them a year ago and moved from Austria to Sweden. During my time working here I often used VTK for various purposes and I saw that the people on the VTK mailinglist were very skilled and awesome. That is why I would love some of you to join us! The company is currently looking for: * Mobile Computer Vision Specialist * Senior R&D Engineer * Software Engineer * Technical Team Lead If you're amazing, committed and driven, but do not fit perfectly into the roles above, just send us an application anyway and tell us why you want to join us! You find more information at https://www.volumental.com/jobs/ Best Severin From ra.corredor at gmail.com Tue Oct 7 05:22:05 2014 From: ra.corredor at gmail.com (Ricardo A Corredor) Date: Tue, 7 Oct 2014 02:22:05 -0700 (PDT) Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <1411145224024-5728814.post@n5.nabble.com> <1412618731423-5728996.post@n5.nabble.com> Message-ID: <1412673725108-5729006.post@n5.nabble.com> Hi, Yes, the tolerance 0 works with the data I have (the case on the github project). However, I haven't had the time to check exactly the effect of this parameter in the calculation (I imagine that lower tolerance implies more time, specially in big meshes but not sure). Just to confirm, I'm using the last version of the patch. Good day RaC -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729006.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Oct 7 08:23:38 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 7 Oct 2014 06:23:38 -0600 Subject: [vtkusers] Integer overflow in vtkImageAccumulate In-Reply-To: References: Message-ID: Hi Gib, For VTK 5.10 and later, I added a new class called vtkImageHistogram that uses vtkIdType for the histogram, and another class called vtkImageHistogramStatistics that can automatically compute window/level. These new classes should work fine on large images. Perhaps vtkImageAccumulate should also use vtkIdType (or should have a selectable output type.) - David On Tue, Oct 7, 2014 at 1:30 AM, Gib Bogle wrote: > Hi all, > > I encountered a problem in 3DSlicer with the auto calculation of > window/level. This may be a well-known issue. For some big 3D tiffs, the > algorithm gives bad w/l values, i.e. < 0. I have tracked this to > vtkImageAccumulate() in vtkImageAccumulate.cxx, where the histogram is > computed. The problem is that the voxel counts are stored in an int array > (outPtr), and it's possible to have more than 2^31 voxels with the same > value (e.g. 0). I admit that these are unusual tiffs - they are binary and > big - so it's a rather extreme case, but it seems that this is going to bite > others as image sizes increase. > > Cheers > Gib From david.gobbi at gmail.com Tue Oct 7 08:30:11 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 7 Oct 2014 06:30:11 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: <1412673725108-5729006.post@n5.nabble.com> References: <1411145224024-5728814.post@n5.nabble.com> <1412618731423-5728996.post@n5.nabble.com> <1412673725108-5729006.post@n5.nabble.com> Message-ID: Hi Ricardo, The tolerance has no impact on speed. The only things that effect the speed are the complexity of the input and the resolution of the output. - David On Tue, Oct 7, 2014 at 3:22 AM, Ricardo A Corredor wrote: > Hi, > > Yes, the tolerance 0 works with the data I have (the case on the github > project). However, I haven't had the time to check exactly the effect of > this parameter in the calculation (I imagine that lower tolerance implies > more time, specially in big meshes but not sure). Just to confirm, I'm using > the last version of the patch. > > Good day > > RaC From bill.lorensen at gmail.com Tue Oct 7 08:44:10 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 7 Oct 2014 08:44:10 -0400 Subject: [vtkusers] Integer overflow in vtkImageAccumulate In-Reply-To: References: Message-ID: Gib and David, I am working on a gerrit patch to address Gib's problem. I add you guys to the reviewer list once I complete it. Bill On Tue, Oct 7, 2014 at 8:23 AM, David Gobbi wrote: > Hi Gib, > > For VTK 5.10 and later, I added a new class called vtkImageHistogram > that uses vtkIdType for the histogram, and another class called > vtkImageHistogramStatistics that can automatically compute > window/level. These new classes should work fine on large images. > > Perhaps vtkImageAccumulate should also use vtkIdType (or should > have a selectable output type.) > > - David > > > > On Tue, Oct 7, 2014 at 1:30 AM, Gib Bogle wrote: >> Hi all, >> >> I encountered a problem in 3DSlicer with the auto calculation of >> window/level. This may be a well-known issue. For some big 3D tiffs, the >> algorithm gives bad w/l values, i.e. < 0. I have tracked this to >> vtkImageAccumulate() in vtkImageAccumulate.cxx, where the histogram is >> computed. The problem is that the voxel counts are stored in an int array >> (outPtr), and it's possible to have more than 2^31 voxels with the same >> value (e.g. 0). I admit that these are unusual tiffs - they are binary and >> big - so it's a rather extreme case, but it seems that this is going to bite >> others as image sizes increase. >> >> Cheers >> Gib > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From trash001 at odu.edu Tue Oct 7 09:58:29 2014 From: trash001 at odu.edu (TANWEER RASHID) Date: Tue, 7 Oct 2014 09:58:29 -0400 Subject: [vtkusers] Build error for vtk-5.10.1 In-Reply-To: References: Message-ID: Hi David, Thanks, but I already have libgl1-mesa-dev installed. - - - TR On Mon, Oct 6, 2014 at 10:49 PM, David Gobbi wrote: > Hi Tanweer, > > I suspect that you are missing some of the ubuntu dev packages. > For libGL.so, get libgl1-mesa-dev: > > sudo apt-get install libgl1-mesa-dev > > - David > > > > On Mon, Oct 6, 2014 at 2:04 PM, TANWEER RASHID wrote: > > Sorry about that. I accidentally sent before I could finish. > > > > Hi, > > > > I am trying to build VTK-5.10.1, but I keep getting an error. > > My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to build > > shared libs. When I build static libs, I don't encounter any problems. > > > > During Cmake configuration, I am getting the following warnings (for both > > static and shared): > > > > The target name > > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5Edefin.h" > is > > unknown in this context. > > This warning is for project developers. Use -Wno-dev to suppress it. > > > > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:614 > > (ADD_CUSTOM_COMMAND): > > Policy CMP0040 is not set: The target in the TARGET signature of > > add_custom_command() must exist. Run "cmake --help-policy CMP0040" for > > policy details. Use the cmake_policy command to set the policy and > > suppress this warning. > > > > The target name > > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5version.h" > is > > unknown in this context. > > This warning is for project developers. Use -Wno-dev to suppress it. > > > > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:621 > > (ADD_CUSTOM_COMMAND): > > Policy CMP0040 is not set: The target in the TARGET signature of > > add_custom_command() must exist. Run "cmake --help-policy CMP0040" for > > policy details. Use the cmake_policy command to set the policy and > > suppress this warning. > > > > The target name > > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5overflow.h" > > is unknown in this context. > > This warning is for project developers. Use -Wno-dev to suppress it. > > > > Could not find extension loader. Extensions disabled. > > > > Configuring done > > > > > > > > > > The build error (for building shared libs) is as follows: > > > > [ 30%] Built target vtkEncodeString > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyph.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyphRenderOpenGL.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTCharmap.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFace.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFont.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFont.cpp.o > > [ 30%] Building CXX object > > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFontRenderOpenGL.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFont.cpp.o > > [ 30%] Building CXX object > > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFontRenderOpenGL.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyph.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyphContainer.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTLibrary.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyph.cpp.o > > [ 30%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyphRenderOpenGL.cpp.o > > [ 31%] Building CXX object > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTSize.cpp.o > > make[2]: *** No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so', > > needed by `bin/libvtkftgl.so.5.10.1'. Stop. > > make[1]: *** [Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2 > > make: *** [all] Error 2 > > trash001 at MSVEDE09:~/Downloads/VTK5.10.1-build$ > > > > > > > > -- > > Tanweer Rashid > > MSVE Dept. > > Old Dominion University > > > -- > BEGIN-ANTISPAM-VOTING-LINKS > ------------------------------------------------------ > > NOTE: This message was trained as non-spam. If this is wrong, > please correct the training as soon as possible. > > Teach CanIt if this mail (ID 03N02OfoR) is spam: > Spam: > https://www.spamtrap.odu.edu/canit/b.php?i=03N02OfoR&m=4c44c7e7eac9&t=20141006&c=s > Not spam: > https://www.spamtrap.odu.edu/canit/b.php?i=03N02OfoR&m=4c44c7e7eac9&t=20141006&c=n > Forget vote: > https://www.spamtrap.odu.edu/canit/b.php?i=03N02OfoR&m=4c44c7e7eac9&t=20141006&c=f > ------------------------------------------------------ > END-ANTISPAM-VOTING-LINKS > > -- Tanweer Rashid MSVE Dept. Old Dominion University -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Oct 7 10:02:52 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 7 Oct 2014 08:02:52 -0600 Subject: [vtkusers] Build error for vtk-5.10.1 In-Reply-To: References: Message-ID: So, if I can ask the obvious question, what do you get when you do this: ls -l /usr/lib/x86_64-linux-gnu/libGL.so Is it missing? Is it a broken link? On Tue, Oct 7, 2014 at 7:58 AM, TANWEER RASHID wrote: > Hi David, > > Thanks, but I already have libgl1-mesa-dev installed. > > - - - TR > > > On Mon, Oct 6, 2014 at 10:49 PM, David Gobbi wrote: >> >> Hi Tanweer, >> >> I suspect that you are missing some of the ubuntu dev packages. >> For libGL.so, get libgl1-mesa-dev: >> >> sudo apt-get install libgl1-mesa-dev >> >> - David >> >> >> >> On Mon, Oct 6, 2014 at 2:04 PM, TANWEER RASHID wrote: >> > Sorry about that. I accidentally sent before I could finish. >> > >> > Hi, >> > >> > I am trying to build VTK-5.10.1, but I keep getting an error. >> > My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to build >> > shared libs. When I build static libs, I don't encounter any problems. >> > >> > During Cmake configuration, I am getting the following warnings (for >> > both >> > static and shared): >> > >> > The target name >> > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5Edefin.h" >> > is >> > unknown in this context. >> > This warning is for project developers. Use -Wno-dev to suppress it. >> > >> > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:614 >> > (ADD_CUSTOM_COMMAND): >> > Policy CMP0040 is not set: The target in the TARGET signature of >> > add_custom_command() must exist. Run "cmake --help-policy CMP0040" for >> > policy details. Use the cmake_policy command to set the policy and >> > suppress this warning. >> > >> > The target name >> > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5version.h" >> > is >> > unknown in this context. >> > This warning is for project developers. Use -Wno-dev to suppress it. >> > >> > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:621 >> > (ADD_CUSTOM_COMMAND): >> > Policy CMP0040 is not set: The target in the TARGET signature of >> > add_custom_command() must exist. Run "cmake --help-policy CMP0040" for >> > policy details. Use the cmake_policy command to set the policy and >> > suppress this warning. >> > >> > The target name >> > >> > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5overflow.h" >> > is unknown in this context. >> > This warning is for project developers. Use -Wno-dev to suppress it. >> > >> > Could not find extension loader. Extensions disabled. >> > >> > Configuring done >> > >> > >> > >> > >> > The build error (for building shared libs) is as follows: >> > >> > [ 30%] Built target vtkEncodeString >> > [ 30%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyph.cpp.o >> > [ 30%] Building CXX object >> > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyphRenderOpenGL.cpp.o >> > [ 30%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTCharmap.cpp.o >> > [ 30%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFace.cpp.o >> > [ 30%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFont.cpp.o >> > [ 30%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFont.cpp.o >> > [ 30%] Building CXX object >> > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFontRenderOpenGL.cpp.o >> > [ 30%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFont.cpp.o >> > [ 30%] Building CXX object >> > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFontRenderOpenGL.cpp.o >> > [ 30%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyph.cpp.o >> > [ 30%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyphContainer.cpp.o >> > [ 30%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTLibrary.cpp.o >> > [ 30%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyph.cpp.o >> > [ 30%] Building CXX object >> > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyphRenderOpenGL.cpp.o >> > [ 31%] Building CXX object >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTSize.cpp.o >> > make[2]: *** No rule to make target >> > `/usr/lib/x86_64-linux-gnu/libGL.so', >> > needed by `bin/libvtkftgl.so.5.10.1'. Stop. >> > make[1]: *** [Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2 >> > make: *** [all] Error 2 >> > trash001 at MSVEDE09:~/Downloads/VTK5.10.1-build$ >> > >> > >> > >> > -- >> > Tanweer Rashid >> > MSVE Dept. >> > Old Dominion University From trash001 at odu.edu Tue Oct 7 10:09:40 2014 From: trash001 at odu.edu (TANWEER RASHID) Date: Tue, 7 Oct 2014 10:09:40 -0400 Subject: [vtkusers] Build error for vtk-5.10.1 In-Reply-To: References: Message-ID: This is what I get for "ls -l /usr/lib/x86_64-linux-gnu/libGL.so" *lrwxrwxrwx 1 root root 13 May 15 05:41 /usr/lib/x86_64-linux-gnu/libGL.so -> mesa/libGL.so* On Tue, Oct 7, 2014 at 10:02 AM, David Gobbi wrote: > So, if I can ask the obvious question, what do you get when you do this: > > ls -l /usr/lib/x86_64-linux-gnu/libGL.so > > Is it missing? Is it a broken link? > > > On Tue, Oct 7, 2014 at 7:58 AM, TANWEER RASHID wrote: > > Hi David, > > > > Thanks, but I already have libgl1-mesa-dev installed. > > > > - - - TR > > > > > > On Mon, Oct 6, 2014 at 10:49 PM, David Gobbi > wrote: > >> > >> Hi Tanweer, > >> > >> I suspect that you are missing some of the ubuntu dev packages. > >> For libGL.so, get libgl1-mesa-dev: > >> > >> sudo apt-get install libgl1-mesa-dev > >> > >> - David > >> > >> > >> > >> On Mon, Oct 6, 2014 at 2:04 PM, TANWEER RASHID > wrote: > >> > Sorry about that. I accidentally sent before I could finish. > >> > > >> > Hi, > >> > > >> > I am trying to build VTK-5.10.1, but I keep getting an error. > >> > My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to build > >> > shared libs. When I build static libs, I don't encounter any problems. > >> > > >> > During Cmake configuration, I am getting the following warnings (for > >> > both > >> > static and shared): > >> > > >> > The target name > >> > > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5Edefin.h" > >> > is > >> > unknown in this context. > >> > This warning is for project developers. Use -Wno-dev to suppress it. > >> > > >> > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:614 > >> > (ADD_CUSTOM_COMMAND): > >> > Policy CMP0040 is not set: The target in the TARGET signature of > >> > add_custom_command() must exist. Run "cmake --help-policy CMP0040" for > >> > policy details. Use the cmake_policy command to set the policy and > >> > suppress this warning. > >> > > >> > The target name > >> > > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5version.h" > >> > is > >> > unknown in this context. > >> > This warning is for project developers. Use -Wno-dev to suppress it. > >> > > >> > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:621 > >> > (ADD_CUSTOM_COMMAND): > >> > Policy CMP0040 is not set: The target in the TARGET signature of > >> > add_custom_command() must exist. Run "cmake --help-policy CMP0040" for > >> > policy details. Use the cmake_policy command to set the policy and > >> > suppress this warning. > >> > > >> > The target name > >> > > >> > > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5overflow.h" > >> > is unknown in this context. > >> > This warning is for project developers. Use -Wno-dev to suppress it. > >> > > >> > Could not find extension loader. Extensions disabled. > >> > > >> > Configuring done > >> > > >> > > >> > > >> > > >> > The build error (for building shared libs) is as follows: > >> > > >> > [ 30%] Built target vtkEncodeString > >> > [ 30%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyph.cpp.o > >> > [ 30%] Building CXX object > >> > > >> > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyphRenderOpenGL.cpp.o > >> > [ 30%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTCharmap.cpp.o > >> > [ 30%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFace.cpp.o > >> > [ 30%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFont.cpp.o > >> > [ 30%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFont.cpp.o > >> > [ 30%] Building CXX object > >> > > >> > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFontRenderOpenGL.cpp.o > >> > [ 30%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFont.cpp.o > >> > [ 30%] Building CXX object > >> > > >> > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFontRenderOpenGL.cpp.o > >> > [ 30%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyph.cpp.o > >> > [ 30%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyphContainer.cpp.o > >> > [ 30%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTLibrary.cpp.o > >> > [ 30%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyph.cpp.o > >> > [ 30%] Building CXX object > >> > > >> > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyphRenderOpenGL.cpp.o > >> > [ 31%] Building CXX object > >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTSize.cpp.o > >> > make[2]: *** No rule to make target > >> > `/usr/lib/x86_64-linux-gnu/libGL.so', > >> > needed by `bin/libvtkftgl.so.5.10.1'. Stop. > >> > make[1]: *** [Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2 > >> > make: *** [all] Error 2 > >> > trash001 at MSVEDE09:~/Downloads/VTK5.10.1-build$ > >> > > >> > > >> > > >> > -- > >> > Tanweer Rashid > >> > MSVE Dept. > >> > Old Dominion University > > > -- > BEGIN-ANTISPAM-VOTING-LINKS > ------------------------------------------------------ > > Teach CanIt if this mail (ID 03N0e40R4) is spam: > Spam: > https://www.spamtrap.odu.edu/canit/b.php?i=03N0e40R4&m=9fea1e8b3202&t=20141007&c=s > Not spam: > https://www.spamtrap.odu.edu/canit/b.php?i=03N0e40R4&m=9fea1e8b3202&t=20141007&c=n > Forget vote: > https://www.spamtrap.odu.edu/canit/b.php?i=03N0e40R4&m=9fea1e8b3202&t=20141007&c=f > ------------------------------------------------------ > END-ANTISPAM-VOTING-LINKS > > -- Tanweer Rashid MSVE Dept. Old Dominion University -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Oct 7 10:47:33 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 7 Oct 2014 08:47:33 -0600 Subject: [vtkusers] Build error for vtk-5.10.1 In-Reply-To: References: Message-ID: And is it a broken link? Does the file that it is pointing to exist? On Tue, Oct 7, 2014 at 8:09 AM, TANWEER RASHID wrote: > This is what I get for "ls -l /usr/lib/x86_64-linux-gnu/libGL.so" > > lrwxrwxrwx 1 root root 13 May 15 05:41 /usr/lib/x86_64-linux-gnu/libGL.so -> > mesa/libGL.so > > On Tue, Oct 7, 2014 at 10:02 AM, David Gobbi wrote: >> >> So, if I can ask the obvious question, what do you get when you do this: >> >> ls -l /usr/lib/x86_64-linux-gnu/libGL.so >> >> Is it missing? Is it a broken link? >> >> >> On Tue, Oct 7, 2014 at 7:58 AM, TANWEER RASHID wrote: >> > Hi David, >> > >> > Thanks, but I already have libgl1-mesa-dev installed. >> > >> > - - - TR >> > >> > >> > On Mon, Oct 6, 2014 at 10:49 PM, David Gobbi >> > wrote: >> >> >> >> Hi Tanweer, >> >> >> >> I suspect that you are missing some of the ubuntu dev packages. >> >> For libGL.so, get libgl1-mesa-dev: >> >> >> >> sudo apt-get install libgl1-mesa-dev >> >> >> >> - David >> >> >> >> >> >> >> >> On Mon, Oct 6, 2014 at 2:04 PM, TANWEER RASHID >> >> wrote: >> >> > Sorry about that. I accidentally sent before I could finish. >> >> > >> >> > Hi, >> >> > >> >> > I am trying to build VTK-5.10.1, but I keep getting an error. >> >> > My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to >> >> > build >> >> > shared libs. When I build static libs, I don't encounter any >> >> > problems. >> >> > >> >> > During Cmake configuration, I am getting the following warnings (for >> >> > both >> >> > static and shared): >> >> > >> >> > The target name >> >> > >> >> > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5Edefin.h" >> >> > is >> >> > unknown in this context. >> >> > This warning is for project developers. Use -Wno-dev to suppress it. >> >> > >> >> > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:614 >> >> > (ADD_CUSTOM_COMMAND): >> >> > Policy CMP0040 is not set: The target in the TARGET signature of >> >> > add_custom_command() must exist. Run "cmake --help-policy CMP0040" >> >> > for >> >> > policy details. Use the cmake_policy command to set the policy and >> >> > suppress this warning. >> >> > >> >> > The target name >> >> > >> >> > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5version.h" >> >> > is >> >> > unknown in this context. >> >> > This warning is for project developers. Use -Wno-dev to suppress it. >> >> > >> >> > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:621 >> >> > (ADD_CUSTOM_COMMAND): >> >> > Policy CMP0040 is not set: The target in the TARGET signature of >> >> > add_custom_command() must exist. Run "cmake --help-policy CMP0040" >> >> > for >> >> > policy details. Use the cmake_policy command to set the policy and >> >> > suppress this warning. >> >> > >> >> > The target name >> >> > >> >> > >> >> > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5overflow.h" >> >> > is unknown in this context. >> >> > This warning is for project developers. Use -Wno-dev to suppress it. >> >> > >> >> > Could not find extension loader. Extensions disabled. >> >> > >> >> > Configuring done >> >> > >> >> > >> >> > >> >> > >> >> > The build error (for building shared libs) is as follows: >> >> > >> >> > [ 30%] Built target vtkEncodeString >> >> > [ 30%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyph.cpp.o >> >> > [ 30%] Building CXX object >> >> > >> >> > >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyphRenderOpenGL.cpp.o >> >> > [ 30%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTCharmap.cpp.o >> >> > [ 30%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFace.cpp.o >> >> > [ 30%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFont.cpp.o >> >> > [ 30%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFont.cpp.o >> >> > [ 30%] Building CXX object >> >> > >> >> > >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFontRenderOpenGL.cpp.o >> >> > [ 30%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFont.cpp.o >> >> > [ 30%] Building CXX object >> >> > >> >> > >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFontRenderOpenGL.cpp.o >> >> > [ 30%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyph.cpp.o >> >> > [ 30%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyphContainer.cpp.o >> >> > [ 30%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTLibrary.cpp.o >> >> > [ 30%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyph.cpp.o >> >> > [ 30%] Building CXX object >> >> > >> >> > >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyphRenderOpenGL.cpp.o >> >> > [ 31%] Building CXX object >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTSize.cpp.o >> >> > make[2]: *** No rule to make target >> >> > `/usr/lib/x86_64-linux-gnu/libGL.so', >> >> > needed by `bin/libvtkftgl.so.5.10.1'. Stop. >> >> > make[1]: *** [Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2 >> >> > make: *** [all] Error 2 >> >> > trash001 at MSVEDE09:~/Downloads/VTK5.10.1-build$ >> >> > >> >> > >> >> > >> >> > -- >> >> > Tanweer Rashid >> >> > MSVE Dept. >> >> > Old Dominion University From dave.demarle at kitware.com Tue Oct 7 11:09:57 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 7 Oct 2014 11:09:57 -0400 Subject: [vtkusers] announce: VTK and ParaView scripting training October 21 at Kitware's North Carolina office In-Reply-To: References: Message-ID: Just a quick reminder, tomorrow is the last day for early registration for the next VTK and ParaView scripting course held in the US. Hope to see you in Carrboro, David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Sep 22, 2014 at 11:48 AM, David E DeMarle wrote: > Kitware is hosting a VTK-ParaView training course in Carrboro, NC. The > course will be held on October 21, 2014. Attendees will gain practical > experience in both ParaView, a scalable application for general purpose > scientific visualization, and The Visualization Toolkit (VTK), the > underlying open-source library from which ParaView is built. > > The training mixes theory and application to guide attendees through a set > of exercises, which are all given in the python programming language. Upon > completion of this course, attendees will not only know how to use ParaView > and VTK, but they will also know how to extend ParaView at run time, use it > in concert with other Python capable applications, and run it in batch > processing HPC contexts. Additional details and registration information > are available on the Kitware website > . > > The price of the course via early registration is $650. Early registration > is available through October 8, 2014. The price of the course via regular > registration is $815. > > In addition, Kitware will be hosting a ?Project Lifecycle Management with > the CMake Family of Tools? training course on October 20, 2014. This course > will also be hosted in Carrboro. For more information, please visit > http://www.kitware.com/products/protraining.php. > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Oct 7 11:59:25 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 7 Oct 2014 09:59:25 -0600 Subject: [vtkusers] Build error for vtk-5.10.1 In-Reply-To: References: Message-ID: So, this isn't specifically related to VTK anymore, but here are the things that might be wrong with your system: - you might be missing the libgl1-mesa-glx package, which provides /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2 - the links might have been broken during the installation of third-party OpenGL drivers (in which case you should hunt down all the broken links and fix them as best you can). If you discover exactly what was wrong, please post your solution on the list in case other linux users encounter similar problems. - David On Tue, Oct 7, 2014 at 9:43 AM, TANWEER RASHID wrote: > Yes, the link appears to be broken. > > - - - TR > > > > On Tuesday, October 7, 2014, David Gobbi wrote: >> >> And is it a broken link? Does the file that it is pointing to exist? >> >> >> On Tue, Oct 7, 2014 at 8:09 AM, TANWEER RASHID wrote: >> > This is what I get for "ls -l /usr/lib/x86_64-linux-gnu/libGL.so" >> > >> > lrwxrwxrwx 1 root root 13 May 15 05:41 >> > /usr/lib/x86_64-linux-gnu/libGL.so -> >> > mesa/libGL.so >> > >> > On Tue, Oct 7, 2014 at 10:02 AM, David Gobbi >> > wrote: >> >> >> >> So, if I can ask the obvious question, what do you get when you do >> >> this: >> >> >> >> ls -l /usr/lib/x86_64-linux-gnu/libGL.so >> >> >> >> Is it missing? Is it a broken link? >> >> >> >> >> >> On Tue, Oct 7, 2014 at 7:58 AM, TANWEER RASHID >> >> wrote: >> >> > Hi David, >> >> > >> >> > Thanks, but I already have libgl1-mesa-dev installed. >> >> > >> >> > - - - TR >> >> > >> >> > >> >> > On Mon, Oct 6, 2014 at 10:49 PM, David Gobbi >> >> > wrote: >> >> >> >> >> >> Hi Tanweer, >> >> >> >> >> >> I suspect that you are missing some of the ubuntu dev packages. >> >> >> For libGL.so, get libgl1-mesa-dev: >> >> >> >> >> >> sudo apt-get install libgl1-mesa-dev >> >> >> >> >> >> - David >> >> >> >> >> >> >> >> >> >> >> >> On Mon, Oct 6, 2014 at 2:04 PM, TANWEER RASHID >> >> >> wrote: >> >> >> > Sorry about that. I accidentally sent before I could finish. >> >> >> > >> >> >> > Hi, >> >> >> > >> >> >> > I am trying to build VTK-5.10.1, but I keep getting an error. >> >> >> > My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to >> >> >> > build >> >> >> > shared libs. When I build static libs, I don't encounter any >> >> >> > problems. >> >> >> > >> >> >> > During Cmake configuration, I am getting the following warnings >> >> >> > (for >> >> >> > both >> >> >> > static and shared): >> >> >> > >> >> >> > The target name >> >> >> > >> >> >> > >> >> >> > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5Edefin.h" >> >> >> > is >> >> >> > unknown in this context. >> >> >> > This warning is for project developers. Use -Wno-dev to suppress >> >> >> > it. >> >> >> > >> >> >> > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:614 >> >> >> > (ADD_CUSTOM_COMMAND): >> >> >> > Policy CMP0040 is not set: The target in the TARGET signature of >> >> >> > add_custom_command() must exist. Run "cmake --help-policy CMP0040" >> >> >> > for >> >> >> > policy details. Use the cmake_policy command to set the policy and >> >> >> > suppress this warning. >> >> >> > >> >> >> > The target name >> >> >> > >> >> >> > >> >> >> > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5version.h" >> >> >> > is >> >> >> > unknown in this context. >> >> >> > This warning is for project developers. Use -Wno-dev to suppress >> >> >> > it. >> >> >> > >> >> >> > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:621 >> >> >> > (ADD_CUSTOM_COMMAND): >> >> >> > Policy CMP0040 is not set: The target in the TARGET signature of >> >> >> > add_custom_command() must exist. Run "cmake --help-policy CMP0040" >> >> >> > for >> >> >> > policy details. Use the cmake_policy command to set the policy and >> >> >> > suppress this warning. >> >> >> > >> >> >> > The target name >> >> >> > >> >> >> > >> >> >> > >> >> >> > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5overflow.h" >> >> >> > is unknown in this context. >> >> >> > This warning is for project developers. Use -Wno-dev to suppress >> >> >> > it. >> >> >> > >> >> >> > Could not find extension loader. Extensions disabled. >> >> >> > >> >> >> > Configuring done >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > The build error (for building shared libs) is as follows: >> >> >> > >> >> >> > [ 30%] Built target vtkEncodeString >> >> >> > [ 30%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyph.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > >> >> >> > >> >> >> > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyphRenderOpenGL.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTCharmap.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFace.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFont.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFont.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > >> >> >> > >> >> >> > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFontRenderOpenGL.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFont.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > >> >> >> > >> >> >> > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFontRenderOpenGL.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyph.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyphContainer.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTLibrary.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyph.cpp.o >> >> >> > [ 30%] Building CXX object >> >> >> > >> >> >> > >> >> >> > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyphRenderOpenGL.cpp.o >> >> >> > [ 31%] Building CXX object >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTSize.cpp.o >> >> >> > make[2]: *** No rule to make target >> >> >> > `/usr/lib/x86_64-linux-gnu/libGL.so', >> >> >> > needed by `bin/libvtkftgl.so.5.10.1'. Stop. >> >> >> > make[1]: *** [Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2 >> >> >> > make: *** [all] Error 2 >> >> >> > trash001 at MSVEDE09:~/Downloads/VTK5.10.1-build$ >> >> >> > >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > Tanweer Rashid >> >> >> > MSVE Dept. >> >> >> > Old Dominion University >> >> >> -- >> BEGIN-ANTISPAM-VOTING-LINKS >> ------------------------------------------------------ >> >> Teach CanIt if this mail (ID 01N0eMDLD) is spam: >> Spam: >> https://www.spamtrap.odu.edu/canit/b.php?i=01N0eMDLD&m=f516e9e46eeb&t=20141007&c=s >> Not spam: >> https://www.spamtrap.odu.edu/canit/b.php?i=01N0eMDLD&m=f516e9e46eeb&t=20141007&c=n >> Forget vote: >> https://www.spamtrap.odu.edu/canit/b.php?i=01N0eMDLD&m=f516e9e46eeb&t=20141007&c=f >> ------------------------------------------------------ >> END-ANTISPAM-VOTING-LINKS >> > > > -- > Tanweer Rashid > MSVE Dept. > Old Dominion University > From amikstcyr at gmail.com Tue Oct 7 13:00:40 2014 From: amikstcyr at gmail.com (Amik St-Cyr) Date: Tue, 7 Oct 2014 19:00:40 +0200 Subject: [vtkusers] Compiling from source 6.0.0 but reproducible with 6.1.0 Message-ID: Hi, I've compiled various versions of VTK on various machines & compilers etc. I'm trying a new compiler from Intel. CXXFLAGS=-openmp CFLAGS=-openmp CC=mpiicc CXX=mpiicpc LDFLAGS=-mt_mpi cmake ../ -DBUILD_SHARED_LIBS=ON -DVTK_Group_MPI=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/home/myhome/local -DVTK_USE_SYSTEM_HDF5:BOOL=ON -DVTK_Group_Rendering:BOOL=ON It always bombs at a xml2 lib : [ 57%] make[2]: *** No rule to make target `lib/libvtklibxml2-6.0.so.1', needed by `lib/libvtkIOInfovis-6.0.so.1'. Stop. make[1]: *** [IO/Infovis/CMakeFiles/vtkIOInfovis.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... bash-3.2$ ls /usr/lib/libxml2.* /usr/lib/libxml2.a /usr/lib/libxml2.so.2 /usr/lib/libxml2.so /usr/lib/libxml2.so.2.6.26 & obviously LD_LIBRARY_PATH is set correctly. Guidelines on how to avoid this would be greatly appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.maynard at kitware.com Tue Oct 7 16:19:11 2014 From: robert.maynard at kitware.com (Robert Maynard) Date: Tue, 7 Oct 2014 16:19:11 -0400 Subject: [vtkusers] Compiling from source 6.0.0 but reproducible with 6.1.0 In-Reply-To: References: Message-ID: VTK's by default tries to build a built-in version of libxml2 and doesn't link to the system version. The question that needs solving is why isn't vtk building vtklibxml2. What is the state of VTK_USE_SYSTEM_LIBXML2 in your CMakeCache.txt? On Tue, Oct 7, 2014 at 1:00 PM, Amik St-Cyr wrote: > Hi, > > I've compiled various versions of VTK on various machines & compilers etc. > > I'm trying a new compiler from Intel. > > CXXFLAGS=-openmp CFLAGS=-openmp CC=mpiicc CXX=mpiicpc LDFLAGS=-mt_mpi cmake > ../ -DBUILD_SHARED_LIBS=ON -DVTK_Group_MPI=ON -DCMAKE_BUILD_TYPE=Release > -DCMAKE_INSTALL_PREFIX:PATH=/home/myhome/local > -DVTK_USE_SYSTEM_HDF5:BOOL=ON -DVTK_Group_Rendering:BOOL=ON > > It always bombs at a xml2 lib : > > [ 57%] make[2]: *** No rule to make target `lib/libvtklibxml2-6.0.so.1', > needed by `lib/libvtkIOInfovis-6.0.so.1'. Stop. > make[1]: *** [IO/Infovis/CMakeFiles/vtkIOInfovis.dir/all] Error 2 > make[1]: *** Waiting for unfinished jobs.... > > bash-3.2$ ls /usr/lib/libxml2.* > /usr/lib/libxml2.a /usr/lib/libxml2.so.2 > /usr/lib/libxml2.so /usr/lib/libxml2.so.2.6.26 > > & obviously LD_LIBRARY_PATH is set correctly. > > Guidelines on how to avoid this would be greatly appreciated. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From trash001 at odu.edu Tue Oct 7 21:03:20 2014 From: trash001 at odu.edu (TANWEER RASHID) Date: Tue, 7 Oct 2014 21:03:20 -0400 Subject: [vtkusers] Build error for vtk-5.10.1 In-Reply-To: References: Message-ID: Problem resolved. Basically, the problem occurred because I used third party drivers (from amd.com) to install my AMD graphics card. Most Ubuntu forums recommend that you install repository drivers from the "Additional Drivers" tab/option in Ubuntu Settings. Third party drivers apparently somehow destroy/damage/corrupt the libGL.so link. It is probably possible to somehow repair/reinstall libgl.so and other relevant files, but in my case, I did a clean install of Ubuntu, and then installed the drivers from "Additional Drivers". After that, VTK building and installation gave me no problems. - - - TR On Tue, Oct 7, 2014 at 11:59 AM, David Gobbi wrote: > So, this isn't specifically related to VTK anymore, but here are the > things that might be wrong with your system: > > - you might be missing the libgl1-mesa-glx package, which > provides /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2 > > - the links might have been broken during the installation of > third-party OpenGL drivers (in which case you should > hunt down all the broken links and fix them as best you can). > > If you discover exactly what was wrong, please post your solution > on the list in case other linux users encounter similar problems. > > - David > > > On Tue, Oct 7, 2014 at 9:43 AM, TANWEER RASHID wrote: > > Yes, the link appears to be broken. > > > > - - - TR > > > > > > > > On Tuesday, October 7, 2014, David Gobbi wrote: > >> > >> And is it a broken link? Does the file that it is pointing to exist? > >> > >> > >> On Tue, Oct 7, 2014 at 8:09 AM, TANWEER RASHID > wrote: > >> > This is what I get for "ls -l /usr/lib/x86_64-linux-gnu/libGL.so" > >> > > >> > lrwxrwxrwx 1 root root 13 May 15 05:41 > >> > /usr/lib/x86_64-linux-gnu/libGL.so -> > >> > mesa/libGL.so > >> > > >> > On Tue, Oct 7, 2014 at 10:02 AM, David Gobbi > >> > wrote: > >> >> > >> >> So, if I can ask the obvious question, what do you get when you do > >> >> this: > >> >> > >> >> ls -l /usr/lib/x86_64-linux-gnu/libGL.so > >> >> > >> >> Is it missing? Is it a broken link? > >> >> > >> >> > >> >> On Tue, Oct 7, 2014 at 7:58 AM, TANWEER RASHID > >> >> wrote: > >> >> > Hi David, > >> >> > > >> >> > Thanks, but I already have libgl1-mesa-dev installed. > >> >> > > >> >> > - - - TR > >> >> > > >> >> > > >> >> > On Mon, Oct 6, 2014 at 10:49 PM, David Gobbi < > david.gobbi at gmail.com> > >> >> > wrote: > >> >> >> > >> >> >> Hi Tanweer, > >> >> >> > >> >> >> I suspect that you are missing some of the ubuntu dev packages. > >> >> >> For libGL.so, get libgl1-mesa-dev: > >> >> >> > >> >> >> sudo apt-get install libgl1-mesa-dev > >> >> >> > >> >> >> - David > >> >> >> > >> >> >> > >> >> >> > >> >> >> On Mon, Oct 6, 2014 at 2:04 PM, TANWEER RASHID > >> >> >> wrote: > >> >> >> > Sorry about that. I accidentally sent before I could finish. > >> >> >> > > >> >> >> > Hi, > >> >> >> > > >> >> >> > I am trying to build VTK-5.10.1, but I keep getting an error. > >> >> >> > My OS is 64 bit Ubuntu 14.04 running on Intel i7. I am trying to > >> >> >> > build > >> >> >> > shared libs. When I build static libs, I don't encounter any > >> >> >> > problems. > >> >> >> > > >> >> >> > During Cmake configuration, I am getting the following warnings > >> >> >> > (for > >> >> >> > both > >> >> >> > static and shared): > >> >> >> > > >> >> >> > The target name > >> >> >> > > >> >> >> > > >> >> >> > > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5Edefin.h" > >> >> >> > is > >> >> >> > unknown in this context. > >> >> >> > This warning is for project developers. Use -Wno-dev to suppress > >> >> >> > it. > >> >> >> > > >> >> >> > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:614 > >> >> >> > (ADD_CUSTOM_COMMAND): > >> >> >> > Policy CMP0040 is not set: The target in the TARGET signature of > >> >> >> > add_custom_command() must exist. Run "cmake --help-policy > CMP0040" > >> >> >> > for > >> >> >> > policy details. Use the cmake_policy command to set the policy > and > >> >> >> > suppress this warning. > >> >> >> > > >> >> >> > The target name > >> >> >> > > >> >> >> > > >> >> >> > > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5version.h" > >> >> >> > is > >> >> >> > unknown in this context. > >> >> >> > This warning is for project developers. Use -Wno-dev to suppress > >> >> >> > it. > >> >> >> > > >> >> >> > CMake Warning (dev) at Utilities/vtkhdf5/src/CMakeLists.txt:621 > >> >> >> > (ADD_CUSTOM_COMMAND): > >> >> >> > Policy CMP0040 is not set: The target in the TARGET signature of > >> >> >> > add_custom_command() must exist. Run "cmake --help-policy > CMP0040" > >> >> >> > for > >> >> >> > policy details. Use the cmake_policy command to set the policy > and > >> >> >> > suppress this warning. > >> >> >> > > >> >> >> > The target name > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > "/home/trash001/Downloads/VTK5.10.1-build/Utilities/vtkhdf5/H5overflow.h" > >> >> >> > is unknown in this context. > >> >> >> > This warning is for project developers. Use -Wno-dev to suppress > >> >> >> > it. > >> >> >> > > >> >> >> > Could not find extension loader. Extensions disabled. > >> >> >> > > >> >> >> > Configuring done > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > The build error (for building shared libs) is as follows: > >> >> >> > > >> >> >> > [ 30%] Built target vtkEncodeString > >> >> >> > [ 30%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyph.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTBitmapGlyphRenderOpenGL.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTCharmap.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFace.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTFont.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFont.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLBitmapFontRenderOpenGL.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFont.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGLPixmapFontRenderOpenGL.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyph.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTGlyphContainer.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTLibrary.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyph.cpp.o > >> >> >> > [ 30%] Building CXX object > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTPixmapGlyphRenderOpenGL.cpp.o > >> >> >> > [ 31%] Building CXX object > >> >> >> > Utilities/ftgl/CMakeFiles/vtkftgl.dir/src/FTSize.cpp.o > >> >> >> > make[2]: *** No rule to make target > >> >> >> > `/usr/lib/x86_64-linux-gnu/libGL.so', > >> >> >> > needed by `bin/libvtkftgl.so.5.10.1'. Stop. > >> >> >> > make[1]: *** [Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2 > >> >> >> > make: *** [all] Error 2 > >> >> >> > trash001 at MSVEDE09:~/Downloads/VTK5.10.1-build$ > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > -- > >> >> >> > Tanweer Rashid > >> >> >> > MSVE Dept. > >> >> >> > Old Dominion University > >> > >> > >> -- > >> > > > > > > -- > > Tanweer Rashid > > MSVE Dept. > > Old Dominion University > > > > > -- > BEGIN-ANTISPAM-VOTING-LINKS > ------------------------------------------------------ > > Teach CanIt if this mail (ID 01N0g0vL3) is spam: > Spam: > https://www.spamtrap.odu.edu/canit/b.php?i=01N0g0vL3&m=dec686daf946&t=20141007&c=s > Not spam: > https://www.spamtrap.odu.edu/canit/b.php?i=01N0g0vL3&m=dec686daf946&t=20141007&c=n > Forget vote: > https://www.spamtrap.odu.edu/canit/b.php?i=01N0g0vL3&m=dec686daf946&t=20141007&c=f > ------------------------------------------------------ > END-ANTISPAM-VOTING-LINKS > > -- Tanweer Rashid MSVE Dept. Old Dominion University -------------- next part -------------- An HTML attachment was scrubbed... URL: From 75779910 at qq.com Tue Oct 7 21:29:05 2014 From: 75779910 at qq.com (Simon) Date: Tue, 7 Oct 2014 18:29:05 -0700 (PDT) Subject: [vtkusers] How to know a coordinate inside or outside a vtkPolyData? Message-ID: <1412731745096-5729019.post@n5.nabble.com> Hi, I have read a *.stl to a vtkPolyData, and I checked it is Not Surface Closed, is it possible to know a coordinate like (x:1.232323, y:2.232323, z: 3.1232323) is inside or outside this vtkPolyData? Thankx! -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-know-a-coordinate-inside-or-outside-a-vtkPolyData-tp5729019.html Sent from the VTK - Users mailing list archive at Nabble.com. From somada141 at gmail.com Tue Oct 7 21:36:04 2014 From: somada141 at gmail.com (Adamos Kyriakou) Date: Wed, 8 Oct 2014 12:36:04 +1100 Subject: [vtkusers] How to know a coordinate inside or outside a vtkPolyData? In-Reply-To: <1412731745096-5729019.post@n5.nabble.com> References: <1412731745096-5729019.post@n5.nabble.com> Message-ID: Hmm first thing that comes to mind is using the vtkOBBTree, feed the polydata, use ?BuildLocator? and then use the 'InsideOrOutside? method. Cheers, Adam On Oct 8, 2014, at 12:29 PM, Simon <75779910 at qq.com> wrote: > Hi, I have read a *.stl to a vtkPolyData, and I checked it is Not Surface > Closed, is it possible to know a coordinate like (x:1.232323, y:2.232323, z: > 3.1232323) is inside or outside this vtkPolyData? > > Thankx! > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-know-a-coordinate-inside-or-outside-a-vtkPolyData-tp5729019.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From 75779910 at qq.com Tue Oct 7 21:58:17 2014 From: 75779910 at qq.com (Simon) Date: Tue, 7 Oct 2014 18:58:17 -0700 (PDT) Subject: [vtkusers] How to know a coordinate inside or outside a vtkPolyData? In-Reply-To: References: <1412731745096-5729019.post@n5.nabble.com> Message-ID: <1412733497486-5729021.post@n5.nabble.com> thankx, I have tested vtkOBBTree and vtkSelectEnclosedPoints before, the result are strange, because The data must be a closed surface, my data is not a closed surface, so I can not use them. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-know-a-coordinate-inside-or-outside-a-vtkPolyData-tp5729019p5729021.html Sent from the VTK - Users mailing list archive at Nabble.com. From somada141 at gmail.com Tue Oct 7 22:05:30 2014 From: somada141 at gmail.com (Adamos Kyriakou) Date: Wed, 8 Oct 2014 13:05:30 +1100 Subject: [vtkusers] How to know a coordinate inside or outside a vtkPolyData? In-Reply-To: <1412733497486-5729021.post@n5.nabble.com> References: <1412731745096-5729019.post@n5.nabble.com> <1412733497486-5729021.post@n5.nabble.com> Message-ID: Sorry wasn?t careful with your question, maybe someone else will have a decent idea. Not even sure what ?point inside polydata? would then mean to an open surface. I haven?t tried it but what about vtkCellLocator or vtkPointLocator? On Oct 8, 2014, at 12:58 PM, Simon <75779910 at qq.com> wrote: > thankx, I have tested vtkOBBTree and vtkSelectEnclosedPoints before, the > result are strange, because The data must be a closed surface, my data is > not a closed surface, so I can not use them. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-know-a-coordinate-inside-or-outside-a-vtkPolyData-tp5729019p5729021.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From 75779910 at qq.com Tue Oct 7 22:39:12 2014 From: 75779910 at qq.com (Simon) Date: Tue, 7 Oct 2014 19:39:12 -0700 (PDT) Subject: [vtkusers] How to know a coordinate inside or outside a vtkPolyData? In-Reply-To: References: <1412731745096-5729019.post@n5.nabble.com> <1412733497486-5729021.post@n5.nabble.com> Message-ID: <1412735952360-5729023.post@n5.nabble.com> Never mind.I have checked them before, they mainly find the closest point, maybe it is not fit for my case. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-know-a-coordinate-inside-or-outside-a-vtkPolyData-tp5729019p5729023.html Sent from the VTK - Users mailing list archive at Nabble.com. From tossin at gmail.com Tue Oct 7 23:21:08 2014 From: tossin at gmail.com (Evan Kao) Date: Tue, 7 Oct 2014 20:21:08 -0700 Subject: [vtkusers] Extract block from Multi-block data by name? Message-ID: Hello vtkusers, I want to extract a block from a Multi-block dataset (read in using the Ensight reader) using the block's name, but I had trouble finding such a method in the documentation. I found this thread about the same topic (but in Paraview), which suggested there was no method at the time, but since it's from 3-4 years ago, I was wondering if something in vtk had been written by now. Thanks, Evan Kao -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Wed Oct 8 02:51:11 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Tue, 7 Oct 2014 23:51:11 -0700 (PDT) Subject: [vtkusers] offscreen rendering on linux Message-ID: <1412751071756-5729025.post@n5.nabble.com> I have used the attached code to test offscreen rendering.I works well on windows os,but on linux a blank window will always appear.I have searched the relevant topics on the VTK forum,everyone has different opinion,I have tried some methods but it failed. Has someone used the VTK to develop offscreen rendering and GPU accelerated rendering ? Can you give me some suggestions? Best wishes! The following is the test code : vtkDICOMImageReader *dicomReader = vtkDICOMImageReader::New(); dicomReader->SetDirectoryName("D:/image/SER25"); dicomReader->Update(); // Create the renderer, render window and interactor vtkRenderer *renderer = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(renderer); // Connect it all. Note that funny arithematic on the // SetDesiredUpdateRate - the vtkRenderWindow divides it // allocated time across all renderers, and the renderer // divides it time across all props. If clip is // true then there are two props vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); // Create our volume and mapper vtkVolume *volume = vtkVolume::New(); vtkSmartVolumeMapper *mapper = vtkSmartVolumeMapper::New(); mapper->SetInputConnection( dicomReader->GetOutputPort() ); // Create our transfer function vtkColorTransferFunction *colorFun = vtkColorTransferFunction::New(); colorFun->AddRGBSegment(0.0, 1.0, 1.0, 1.0, 255.0, 1.0, 1.0, 1.0 ); vtkPiecewiseFunction *opacityFun = vtkPiecewiseFunction::New(); opacityFun->AddSegment( -500 - 0.5*1500, 0.0, -500 + 0.5*1500, 1.0 ); // Create the property and attach the transfer functions vtkVolumeProperty *property = vtkVolumeProperty::New(); property->SetIndependentComponents(true); property->SetColor( colorFun ); property->SetScalarOpacity( opacityFun ); property->SetInterpolationTypeToLinear(); // connect up the volume to the property and the mapper volume->SetProperty( property ); volume->SetMapper( mapper ); mapper->SetBlendModeToMaximumIntensity(); // Set the default window size renWin->SetSize(600,600); renWin->Render(); // Add the volume to the scene renderer->AddVolume( volume ); renderer->ResetCamera(); // interact with data renWin->Render(); iren->Start(); opacityFun->Delete(); colorFun->Delete(); property->Delete(); volume->Delete(); mapper->Delete(); renderer->Delete(); renWin->Delete(); iren->Delete(); return 0; -- View this message in context: http://vtk.1045678.n5.nabble.com/offscreen-rendering-on-linux-tp5729025.html Sent from the VTK - Users mailing list archive at Nabble.com. From Mike.Taverne at bristol.ac.uk Wed Oct 8 06:30:44 2014 From: Mike.Taverne at bristol.ac.uk (Mike Taverne) Date: Wed, 08 Oct 2014 11:30:44 +0100 Subject: [vtkusers] How to know a coordinate inside or outside a vtkPolyData? In-Reply-To: <1412731745096-5729019.post@n5.nabble.com> References: <1412731745096-5729019.post@n5.nabble.com> Message-ID: <54351254.3020807@bristol.ac.uk> Hi, You can do it using the vtkImplicitPolyDataDistance class (available from VTK 6.1.0): implicit_function = vtk.vtkImplicitPolyDataDistance() implicit_function.SetInput(polydata) if implicit_function.FunctionValue([x,y,z]) <= 0: # inside else: # outside There might be cases where it does not work, since in reality what it does is calculate the distance to the closest point of the polydata projected onto the surface normal at that point. One case where I had problems was with two solids joined a one vertex, leading to a normal vector at that point close to the null vector and therefore incorrect inside/outside determinations. But otherwise it tends to generally work, even with non-closed solids like a simple plane, in which case it will consider one side of the plane to be inside and the other outside. I'm currently using it in a set of python scripts to create files in the HDF5 format from geometries defined in .stl files for use with the MIT MPB and MEEP simulation tools. Another option, used in OpenEMS for instance, is to use the CGAL library and count the number of intersections of a ray going from the point towards the outside. Code from 3D printing/slicing tools might also be worth looking into, but I'm happy with my current vtkImplicitPolyDataDistance system. On 08/10/14 02:29, Simon wrote: > Hi, I have read a *.stl to a vtkPolyData, and I checked it is Not Surface > Closed, is it possible to know a coordinate like (x:1.232323, y:2.232323, z: > 3.1232323) is inside or outside this vtkPolyData? > > Thankx! > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-know-a-coordinate-inside-or-outside-a-vtkPolyData-tp5729019.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From berk.geveci at kitware.com Wed Oct 8 07:45:18 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Wed, 8 Oct 2014 07:45:18 -0400 Subject: [vtkusers] Extract block from Multi-block data by name? In-Reply-To: References: Message-ID: There is still no specific method. You have to iterate over the blocks and do a linear search. Best, -berk On Tue, Oct 7, 2014 at 11:21 PM, Evan Kao wrote: > Hello vtkusers, > > I want to extract a block from a Multi-block dataset (read in using the > Ensight reader) using the block's name, but I had trouble finding such a > method in the documentation. I found this thread > > about the same topic (but in Paraview), which suggested there was no method > at the time, but since it's from 3-4 years ago, I was wondering if > something in vtk had been written by now. > > Thanks, > Evan Kao > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hobbsk at ohio.edu Wed Oct 8 08:24:31 2014 From: hobbsk at ohio.edu (Kevin H. Hobbs) Date: Wed, 08 Oct 2014 08:24:31 -0400 Subject: [vtkusers] offscreen rendering on linux In-Reply-To: <1412751071756-5729025.post@n5.nabble.com> References: <1412751071756-5729025.post@n5.nabble.com> Message-ID: <54352CFF.6000405@ohio.edu> On 10/08/2014 02:51 AM, Emptystack wrote: > I have used the attached code to test offscreen rendering.I works well on > windows os,but on linux a blank window will always appear.I have searched > the relevant topics on the VTK forum,everyone has different opinion,I have > tried some methods but it failed. Has someone used the VTK to develop > offscreen rendering and GPU accelerated rendering ? Can you give me some > suggestions? > > Best wishes! I build VTK against Mesa with OSMesa every night for the dashboard. Almost all tests pass for the offscreen builds and the DISPLAY environment variable is not even set ( any attempt to open a window will fail. ) I build my own Mesa with the update_mesa.sh script. I build VTK with the CMake configuration in vtk_osmesa.cmake. -------------- next part -------------- A non-text attachment was scrubbed... Name: update_mesa.sh Type: application/x-shellscript Size: 929 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_osmesa.cmake Type: text/x-cmake Size: 1425 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 173 bytes Desc: OpenPGP digital signature URL: From cory.quammen at kitware.com Wed Oct 8 08:35:17 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 8 Oct 2014 08:35:17 -0400 Subject: [vtkusers] offscreen rendering on linux In-Reply-To: <1412751071756-5729025.post@n5.nabble.com> References: <1412751071756-5729025.post@n5.nabble.com> Message-ID: I don't see anything in your code that tries to enable offscreen rendering. Can you add renWin->OffScreenRenderingOn(); and give that a try? Also, if you have built the VTK tests on linux, can you run ctest -R vtkRenderingCoreCxx-TestOSConeCxx That test does not show a window on my linux virtual machine that uses Mesa for rendering. Let us know if that tests pops up a window for you on linux with GPU-accelerated rendering. Thanks, Cory On Wed, Oct 8, 2014 at 2:51 AM, Emptystack wrote: > I have used the attached code to test offscreen rendering.I works well on > windows os,but on linux a blank window will always appear.I have searched > the relevant topics on the VTK forum,everyone has different opinion,I have > tried some methods but it failed. Has someone used the VTK to develop > offscreen rendering and GPU accelerated rendering ? Can you give me some > suggestions? > > Best wishes! > > The following is the test code : > > vtkDICOMImageReader *dicomReader = vtkDICOMImageReader::New(); > dicomReader->SetDirectoryName("D:/image/SER25"); > dicomReader->Update(); > > // Create the renderer, render window and interactor > vtkRenderer *renderer = vtkRenderer::New(); > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(renderer); > > // Connect it all. Note that funny arithematic on the > // SetDesiredUpdateRate - the vtkRenderWindow divides it > // allocated time across all renderers, and the renderer > // divides it time across all props. If clip is > // true then there are two props > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > > > // Create our volume and mapper > vtkVolume *volume = vtkVolume::New(); > vtkSmartVolumeMapper *mapper = vtkSmartVolumeMapper::New(); > mapper->SetInputConnection( dicomReader->GetOutputPort() ); > > > > // Create our transfer function > vtkColorTransferFunction *colorFun = vtkColorTransferFunction::New(); > colorFun->AddRGBSegment(0.0, 1.0, 1.0, 1.0, 255.0, 1.0, 1.0, 1.0 ); > vtkPiecewiseFunction *opacityFun = vtkPiecewiseFunction::New(); > opacityFun->AddSegment( -500 - 0.5*1500, 0.0, -500 + 0.5*1500, 1.0 ); > > // Create the property and attach the transfer functions > vtkVolumeProperty *property = vtkVolumeProperty::New(); > property->SetIndependentComponents(true); > property->SetColor( colorFun ); > property->SetScalarOpacity( opacityFun ); > property->SetInterpolationTypeToLinear(); > > // connect up the volume to the property and the mapper > volume->SetProperty( property ); > volume->SetMapper( mapper ); > > > mapper->SetBlendModeToMaximumIntensity(); > > > > > // Set the default window size > renWin->SetSize(600,600); > renWin->Render(); > > // Add the volume to the scene > renderer->AddVolume( volume ); > > renderer->ResetCamera(); > > // interact with data > renWin->Render(); > > iren->Start(); > > opacityFun->Delete(); > colorFun->Delete(); > property->Delete(); > > volume->Delete(); > mapper->Delete(); > > renderer->Delete(); > renWin->Delete(); > iren->Delete(); > > return 0; > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/offscreen-rendering-on-linux-tp5729025.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From scbiradar at gmail.com Wed Oct 8 09:23:12 2014 From: scbiradar at gmail.com (santosh) Date: Wed, 8 Oct 2014 06:23:12 -0700 (PDT) Subject: [vtkusers] How to use vtkBooleanOperationPolyDataFilter correctly In-Reply-To: References: <1411464425998-5728839.post@n5.nabble.com> Message-ID: <1412774592086-5729039.post@n5.nabble.com> Hi Cory, I tried the vtkBooleanOperationPolyDataFilter on two closed surfaces which are intersecting with each other. I made sure that the normals of both the closed surfaces point outwards. After i perform a union operation using the vtkBooleanOperationPolyDataFilter, I get holes in the final result. I am attaching the two individual STL files and the result of the union operation. I am aslo attaching an image that shows the holes in the resultant STL file. Is this expected behavior ? Can I do something to get a surface without any holes? input_1.stl input_2.stl output.stl union.png Cheers, Santosh -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkBooleanOperationPolyDataFilter-correctly-tp5728839p5729039.html Sent from the VTK - Users mailing list archive at Nabble.com. From sid.murthy at gmail.com Wed Oct 8 11:12:14 2014 From: sid.murthy at gmail.com (Sid Murthy) Date: Wed, 8 Oct 2014 09:12:14 -0600 Subject: [vtkusers] Rendering performance of vtkAssembly Message-ID: I have 25 assemblies with 3 parts (3 cylinders) each.. Rendering performance degrades going from 1 to 25. Is there a way to improve vtkAssembly rendering performance or should I be using something like vtkPropAssembly instead? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan45 at uab.edu Wed Oct 8 11:14:35 2014 From: ryan45 at uab.edu (ryan45) Date: Wed, 8 Oct 2014 08:14:35 -0700 (PDT) Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: Message-ID: <1412781275831-5729043.post@n5.nabble.com> Hello David, It looks like I'm still receiving the random bad lines artifact with some of my data: -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729043.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Oct 8 11:22:49 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 8 Oct 2014 09:22:49 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: <1412781275831-5729043.post@n5.nabble.com> References: <1412781275831-5729043.post@n5.nabble.com> Message-ID: Thanks for the feedback, Ryan. What is your tolerance set to? If it wasn't set to zero, can you try it again with a tolerance of zero? Also, a description of the data set (or even better, the data itself) would be very useful. - David On Wed, Oct 8, 2014 at 9:14 AM, ryan45 wrote: > Hello David, > > It looks like I'm still receiving the random bad lines artifact with some of > my data: > > From ryan45 at uab.edu Wed Oct 8 11:36:41 2014 From: ryan45 at uab.edu (ryan45) Date: Wed, 8 Oct 2014 08:36:41 -0700 (PDT) Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <1412781275831-5729043.post@n5.nabble.com> Message-ID: <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> David, My tolerance was set to 0 in this example. I?m attaching the data set that generated the image. It was generated by using vtkCutter to slice a surface with a plane, followed by vtkStripper. My volume spacing was set to 1.5 in all directions. Regards, - Ryan On Oct 8, 2014, at 10:23 AM, David Gobbi [via VTK] > wrote: Thanks for the feedback, Ryan. What is your tolerance set to? If it wasn't set to zero, can you try it again with a tolerance of zero? Also, a description of the data set (or even better, the data itself) would be very useful. - David On Wed, Oct 8, 2014 at 9:14 AM, ryan45 <[hidden email]> wrote: > Hello David, > > It looks like I'm still receiving the random bad lines artifact with some of > my data: > > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ________________________________ If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729044.html To unsubscribe from Fixing vtkPolyDataToImageStencil, click here. NAML contour.vtk (517K) -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729045.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Wed Oct 8 11:53:44 2014 From: tossin at gmail.com (Evan Kao) Date: Wed, 8 Oct 2014 08:53:44 -0700 Subject: [vtkusers] Extract block from Multi-block data by name? In-Reply-To: References: Message-ID: Is there a way to get the name of a block when iterating (with ExtractBlock I assume)? It wasn't clear to me in the documentation what method or sequence of methods I could use to get the name of the data itself. Thanks, Evan Kao On Wed, Oct 8, 2014 at 4:45 AM, Berk Geveci wrote: > There is still no specific method. You have to iterate over the blocks and > do a linear search. > > Best, > -berk > > On Tue, Oct 7, 2014 at 11:21 PM, Evan Kao wrote: > >> Hello vtkusers, >> >> I want to extract a block from a Multi-block dataset (read in using the >> Ensight reader) using the block's name, but I had trouble finding such a >> method in the documentation. I found this thread >> >> about the same topic (but in Paraview), which suggested there was no method >> at the time, but since it's from 3-4 years ago, I was wondering if >> something in vtk had been written by now. >> >> Thanks, >> Evan Kao >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan45 at uab.edu Wed Oct 8 11:49:55 2014 From: ryan45 at uab.edu (Ryan A Whitley) Date: Wed, 8 Oct 2014 15:49:55 +0000 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> References: <1412781275831-5729043.post@n5.nabble.com> <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> Message-ID: David, I have noticed that if I run my data through vtkCleanPolyData with a tolerance of 1e-3, then this will removes the artifact. I should also note that this artifact is also seemingly random throughout my dataset. - Ryan On Oct 8, 2014, at 10:36 AM, ryan45 > wrote: David, My tolerance was set to 0 in this example. I?m attaching the data set that generated the image. It was generated by using vtkCutter to slice a surface with a plane, followed by vtkStripper. My volume spacing was set to 1.5 in all directions. Regards, - Ryan On Oct 8, 2014, at 10:23 AM, David Gobbi [via VTK] <[hidden email]> wrote: Thanks for the feedback, Ryan. What is your tolerance set to? If it wasn't set to zero, can you try it again with a tolerance of zero? Also, a description of the data set (or even better, the data itself) would be very useful. - David On Wed, Oct 8, 2014 at 9:14 AM, ryan45 <[hidden email]> wrote: > Hello David, > > It looks like I'm still receiving the random bad lines artifact with some of > my data: > > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ________________________________ If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729044.html To unsubscribe from Fixing vtkPolyDataToImageStencil, click here. NAML [http://vtk.1045678.n5.nabble.com/images/icon_attachment.gif] contour.vtk (517K) Download Attachment ________________________________ View this message in context: Re: Fixing vtkPolyDataToImageStencil 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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Oct 8 12:37:54 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 8 Oct 2014 10:37:54 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <1412781275831-5729043.post@n5.nabble.com> <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> Message-ID: On Wed, Oct 8, 2014 at 9:49 AM, Ryan A Whitley wrote: > David, > > I have noticed that if I run my data through vtkCleanPolyData with a > tolerance of 1e-3, then this will removes the artifact. I should also note > that this artifact is also seemingly random throughout my dataset. > That's very useful info. It suggests that my code isn't handling degeneracies properly yet. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From ra.corredor at gmail.com Wed Oct 8 13:09:47 2014 From: ra.corredor at gmail.com (Ricardo A Corredor) Date: Wed, 8 Oct 2014 10:09:47 -0700 (PDT) Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <1412781275831-5729043.post@n5.nabble.com> <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> Message-ID: <1412788187655-5729049.post@n5.nabble.com> Are those type of polydata handled by the PolyDataToImageStencil as well, i.e. a polydata having two polylines, one polyline inside the other one in the same slice? (The image shows that the answer seems to be affirmative, but I don't know if it is what the documentation of that class says). I have always worked with closed contours or surfaces but not having some other polydata/polylines inside. -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729049.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Oct 8 13:16:12 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 8 Oct 2014 11:16:12 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: <1412788187655-5729049.post@n5.nabble.com> References: <1412781275831-5729043.post@n5.nabble.com> <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> <1412788187655-5729049.post@n5.nabble.com> Message-ID: Yes, vtkPolyDataToImageStencil works with nested contours. This is true both for polylines and surfaces. Inner contours are treated as holes (and contours inside those "hole" contours are filled, etc.). I'll update the documentation. Formally, it is as if the interior of each contour is drawn with an XOR operation. - David On Wed, Oct 8, 2014 at 11:09 AM, Ricardo A Corredor wrote: > > Are those type of polydata handled by the PolyDataToImageStencil as well, > i.e. a polydata having two polylines, one polyline inside the other one in > the same slice? (The image shows that the answer seems to be affirmative, > but I don't know if it is what the documentation of that class says). I have > always worked with closed contours or surfaces but not having some other > polydata/polylines inside. > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729049.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From cory.quammen at kitware.com Wed Oct 8 13:18:58 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 8 Oct 2014 13:18:58 -0400 Subject: [vtkusers] How to use vtkBooleanOperationPolyDataFilter correctly In-Reply-To: <1412774592086-5729039.post@n5.nabble.com> References: <1411464425998-5728839.post@n5.nabble.com> <1412774592086-5729039.post@n5.nabble.com> Message-ID: Hi Santosh, Your input geometries are fine. I, too, see missing polygons from the output. This is definitely not expected. These missing triangles are apparently being misclassified as to whether they belong to the union or intersection surface. I'll take a look to see if there is a quick fix for this. Cory On Wed, Oct 8, 2014 at 9:23 AM, santosh wrote: > Hi Cory, > I tried the vtkBooleanOperationPolyDataFilter on two closed surfaces which > are intersecting with each other. > I made sure that the normals of both the closed surfaces point outwards. > After i perform a union operation using the > vtkBooleanOperationPolyDataFilter, I get holes in the > final result. I am attaching the two individual STL files and the result of > the union operation. I am aslo attaching an image that shows the holes in > the resultant STL file. Is this expected behavior ? Can I do something to > get a surface without any holes? > input_1.stl > input_2.stl > output.stl > union.png > Cheers, > Santosh > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkBooleanOperationPolyDataFilter-correctly-tp5728839p5729039.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From ra.corredor at gmail.com Wed Oct 8 13:45:15 2014 From: ra.corredor at gmail.com (Ricardo A Corredor) Date: Wed, 8 Oct 2014 10:45:15 -0700 (PDT) Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <1412781275831-5729043.post@n5.nabble.com> <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> <1412788187655-5729049.post@n5.nabble.com> Message-ID: <1412790315356-5729052.post@n5.nabble.com> That's good to know! Just an additional info, I could reproduce @ryan45 error. In this data, this problem happens with a relatively small spacing: around 2.5 (included) and below; with higher values the result is correct. Polydata bounds> X: 2.32e+03 to 4.16e+03 (delta: 1.84e+03), Y: 2.47e+03 to 4.47e+03 (2e+03) -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729052.html Sent from the VTK - Users mailing list archive at Nabble.com. From ingvarpg at yahoo.com Wed Oct 8 13:45:03 2014 From: ingvarpg at yahoo.com (ingvar john) Date: Wed, 8 Oct 2014 17:45:03 +0000 (UTC) Subject: [vtkusers] vtkWindowToImageFilter - black image Message-ID: <1536134458.469803.1412790303683.JavaMail.yahoo@jws10091.mail.ne1.yahoo.com> Hello everyone. This is my first time with VTK and first time I am posting to this list. Does anyone have an idea why this code produces black image as a screenshot (attached). I installed vtk 6.1 on Ubuntu 14.04 (on virtual machine). This is just the example I found on http://www.cmake.org/Wiki/VTK/Examples/Cxx/Utilities/Screenshot for saving a screenshot of the render window. I looked around during 2 days but I haven't find a solution. ? Thanks a lot. #include #include #include #include #include #include #include #include #include #include ? int main(int, char *[]) { ? vtkSmartPointer sphereSource = ??? vtkSmartPointer::New(); ? sphereSource->SetCenter(0.0, 0.0, 0.0); ? sphereSource->SetRadius(5.0); ? sphereSource->Update(); ? ? // Visualize ? vtkSmartPointer mapper = ??? vtkSmartPointer::New(); ? mapper->SetInputConnection(sphereSource->GetOutputPort()); ? ? vtkSmartPointer actor = ??? vtkSmartPointer::New(); ? actor->SetMapper(mapper); ? ? vtkSmartPointer renderer = ??? vtkSmartPointer::New(); ? vtkSmartPointer renderWindow = ??? vtkSmartPointer::New(); ? renderWindow->AddRenderer(renderer); ? renderWindow->SetAlphaBitPlanes(1); //enable usage of alpha channel ? ? vtkSmartPointer renderWindowInteractor = ??? vtkSmartPointer::New(); ? renderWindowInteractor->SetRenderWindow(renderWindow); ? ? renderer->AddActor(actor); ? renderer->SetBackground(1,1,1); // Background color white ? ? renderWindow->Render(); ? ? // Screenshot ? ? vtkSmartPointer windowToImageFilter = ??? vtkSmartPointer::New(); ? windowToImageFilter->SetInput(renderWindow); ? windowToImageFilter->SetMagnification(1); //set the resolution of the output image (3 times the current resolution of vtk render window) ? windowToImageFilter->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel ? windowToImageFilter->Update(); ? ? vtkSmartPointer writer = ??? vtkSmartPointer::New(); ? writer->SetFileName("screenshot2.png"); ? writer->SetInputConnection(windowToImageFilter->GetOutputPort()); ? writer->Write(); ? ? renderWindow->Render(); ? ? renderer->ResetCamera(); ? renderWindow->Render(); ? renderWindowInteractor->Start(); ? ? return EXIT_SUCCESS; } -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot2.png Type: image/png Size: 429 bytes Desc: not available URL: From szilardszaloki at gmail.com Wed Oct 8 14:12:08 2014 From: szilardszaloki at gmail.com (=?UTF-8?B?U3ppbMOhcmQgU3phbMOza2k=?=) Date: Wed, 8 Oct 2014 20:12:08 +0200 Subject: [vtkusers] Creating the dual of a graph - planar face traversal - vtkBoostGraphAdapter Message-ID: Hi All, I'm trying to write an algorithm which creates the dual of a graph. To check whether the graph is planar or not I use the *Boyer-Myrvold planarity test* (Boost implementation) through the vtkBoostGraphAdapter. That works fine (only on vtkUndirectedGraph-s but that's OK for now). (http://www.boost.org/doc/libs/1_56_0/libs/graph/doc/boyer_myrvold.html) To create the dual I need to traverse the faces of the planar graph for which I also have a Boost tool called the planar_face_traversal_visitor. ( http://www.boost.org/doc/libs/1_56_0/libs/graph/doc/planar_face_traversal.html ) There's a guy, Aaron Windsor who implemented the appropriate visitor class that is able to create the dual of a graph in Boost. (https://github.com/aaw/boost_planar_graph_dual) That also works fine using only Boost but I'd like to adapt this feature as well using vtkBoostGraphAdapter. Here's my code: http://pastebin.com/g0Mtw6Ph These are my errors: - *vtkDualGraph.cpp*:44:9: No matching function for call to 'put' - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:302:19: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > > *>, boost::vtkGraphIndexMap, std::__1::map, std::__1::allocator > >, std::__1::map, std::__1::allocator > > &>' - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:309:5: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > > *>, boost::vtkGraphIndexMap, std::__1::map, std::__1::allocator > >, std::__1::map, std::__1::allocator > > &>' - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:302:19: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > *>, boost::vtkGraphIndexMap, std::__1::set, std::__1::allocator >, std::__1::set, std::__1::allocator > &>' - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:309:5: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > *>, boost::vtkGraphIndexMap, std::__1::set, std::__1::allocator >, std::__1::set, std::__1::allocator > &>' - /usr/local/boost_1_56_0/boost/*planar_dual.hpp*:38:38: No viable overloaded operator[] for type 'edge_to_face_map_t' (aka 'iterator_property_map') It seems I cannot provide an appropriate EdgeIndexMap parameter to the put function in the 44th line. The vtkBoostGraphAdapter says that we can use VTK arrays as property maps, I tried that one as well, with no success. I've been dealing with this, reading the source code really deep and trying a couple of things in the past few days but I can't really figure out what the problem is. Is the vtkBoostGraphAdapter properly prepared for this kind of usage? Any kind of help appreciated! Thanks in advance! Szilard -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Wed Oct 8 14:29:25 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Wed, 8 Oct 2014 14:29:25 -0400 Subject: [vtkusers] Extract block from Multi-block data by name? In-Reply-To: References: Message-ID: In Python, you can do this: iter = mb.NewIterator() while not iter.IsDoneWithTraversal(): print iter.GetCurrentMetaData().Get(vtk.vtkCompositeDataSet.NAME()) iter.GoToNextItem() The C++ code is almost identical. The name is stored in the MetaData of each block with the vtkCompositeDataSet::NAME() key. Best, -berk On Wed, Oct 8, 2014 at 11:53 AM, Evan Kao wrote: > Is there a way to get the name of a block when iterating (with > ExtractBlock I assume)? It wasn't clear to me in the documentation what > method or sequence of methods I could use to get the name of the data > itself. > > Thanks, > Evan Kao > > On Wed, Oct 8, 2014 at 4:45 AM, Berk Geveci > wrote: > >> There is still no specific method. You have to iterate over the blocks >> and do a linear search. >> >> Best, >> -berk >> >> On Tue, Oct 7, 2014 at 11:21 PM, Evan Kao wrote: >> >>> Hello vtkusers, >>> >>> I want to extract a block from a Multi-block dataset (read in using the >>> Ensight reader) using the block's name, but I had trouble finding such a >>> method in the documentation. I found this thread >>> >>> about the same topic (but in Paraview), which suggested there was no method >>> at the time, but since it's from 3-4 years ago, I was wondering if >>> something in vtk had been written by now. >>> >>> Thanks, >>> Evan Kao >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.baumes at kitware.com Wed Oct 8 15:13:26 2014 From: jeff.baumes at kitware.com (Jeff Baumes) Date: Wed, 8 Oct 2014 15:13:26 -0400 Subject: [vtkusers] Creating the dual of a graph - planar face traversal - vtkBoostGraphAdapter In-Reply-To: References: Message-ID: In your code, you are retrieving a vtkGraphIndexMap with: property_map::type e_index = get(edge_index, in); vtkGraphIndexMap is intended to be read-only and is already populated with indices 0 through N-1, which are accessed with get(). It's actually an identity map by index since indices are always in order, as you can see here: https://github.com/Kitware/VTK/blob/master/Infovis/BoostGraphAlgorithms/vtkBoostGraphAdapter.h#L1032-L1049 So I would suggest leaving out your initialization loop on lines 43-45. Now, the remaining errors seem to require an operator[] on the EdgeIndexMap, which is not currently implemented in vtkBoostGraphAdapter.h. The needed code would be to replace the definition of vtkGraphPropertyMap with something like this (not tested): struct vtkGraphIndexMap; // forward declaration template <> struct property_traits { typedef vtkIdType value_type; typedef vtkIdType reference; typedef vtkIdType key_type; typedef readable_property_map_tag category; }; struct vtkGraphIndexMap { property_traits::reference operator[](const property_traits::key_type& b) { return key; } }; HTH, Jeff On Wed, Oct 8, 2014 at 2:12 PM, Szil?rd Szal?ki wrote: > Hi All, > > I'm trying to write an algorithm which creates the dual of a graph. To > check whether the graph is planar or not I use the *Boyer-Myrvold > planarity test* (Boost implementation) through the vtkBoostGraphAdapter. > That works fine (only on vtkUndirectedGraph-s but that's OK for now). > (http://www.boost.org/doc/libs/1_56_0/libs/graph/doc/boyer_myrvold.html) > > To create the dual I need to traverse the faces of the planar graph for > which I also have a Boost tool called the planar_face_traversal_visitor. > ( > http://www.boost.org/doc/libs/1_56_0/libs/graph/doc/planar_face_traversal.html > ) > There's a guy, Aaron Windsor who implemented the appropriate visitor class > that is able to create the dual of a graph in Boost. > (https://github.com/aaw/boost_planar_graph_dual) > That also works fine using only Boost but I'd like to adapt this feature > as well using vtkBoostGraphAdapter. > > Here's my code: http://pastebin.com/g0Mtw6Ph > > These are my errors: > > - *vtkDualGraph.cpp*:44:9: No matching function for call to 'put' > - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:302:19: > No viable overloaded operator[] for type 'const > boost::iterator_property_map vtkEdgeType, std::__1::less, > std::__1::allocator > > *>, > boost::vtkGraphIndexMap, std::__1::map std::__1::less, std::__1::allocator long, vtkEdgeType> > >, std::__1::map std::__1::less, std::__1::allocator long, vtkEdgeType> > > &>' > - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:309:5: > No viable overloaded operator[] for type 'const > boost::iterator_property_map vtkEdgeType, std::__1::less, > std::__1::allocator > > *>, > boost::vtkGraphIndexMap, std::__1::map std::__1::less, std::__1::allocator long, vtkEdgeType> > >, std::__1::map std::__1::less, std::__1::allocator long, vtkEdgeType> > > &>' > - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:302:19: > No viable overloaded operator[] for type 'const > boost::iterator_property_map std::__1::less, std::__1::allocator > *>, > boost::vtkGraphIndexMap, std::__1::set long>, std::__1::allocator >, std::__1::set std::__1::less, std::__1::allocator > &>' > - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:309:5: > No viable overloaded operator[] for type 'const > boost::iterator_property_map std::__1::less, std::__1::allocator > *>, > boost::vtkGraphIndexMap, std::__1::set long>, std::__1::allocator >, std::__1::set std::__1::less, std::__1::allocator > &>' > - /usr/local/boost_1_56_0/boost/*planar_dual.hpp*:38:38: No viable > overloaded operator[] for type 'edge_to_face_map_t' (aka > 'iterator_property_map boost::vtkGraphIndexMap>') > > It seems I cannot provide an appropriate EdgeIndexMap parameter to the > put function in the 44th line. The vtkBoostGraphAdapter says that we can > use VTK arrays as property maps, I tried that one as well, with no success. > I've been dealing with this, reading the source code really deep and trying > a couple of things in the past few days but I can't really figure out what > the problem is. Is the vtkBoostGraphAdapter properly prepared for this > kind of usage? > > Any kind of help appreciated! > > Thanks in advance! > > Szilard > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Oct 8 15:19:18 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 8 Oct 2014 15:19:18 -0400 Subject: [vtkusers] vtkWindowToImageFilter - black image In-Reply-To: <1536134458.469803.1412790303683.JavaMail.yahoo@jws10091.mail.ne1.yahoo.com> References: <1536134458.469803.1412790303683.JavaMail.yahoo@jws10091.mail.ne1.yahoo.com> Message-ID: I see the same problem. I'll look into it... Bill On Wed, Oct 8, 2014 at 1:45 PM, ingvar john via vtkusers wrote: > Hello everyone. > > This is my first time with VTK and first time I am posting to this list. > Does anyone have an idea why this code produces black image as a screenshot > (attached). I installed vtk 6.1 on Ubuntu 14.04 (on virtual machine). This > is just the example I found on > http://www.cmake.org/Wiki/VTK/Examples/Cxx/Utilities/Screenshot for saving a > screenshot of the render window. I looked around during 2 days but I haven't > find a solution. > > Thanks a lot. > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > > > int main(int, char *[]) > { > vtkSmartPointer sphereSource = > vtkSmartPointer::New(); > sphereSource->SetCenter(0.0, 0.0, 0.0); > sphereSource->SetRadius(5.0); > sphereSource->Update(); > > // Visualize > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(sphereSource->GetOutputPort()); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > renderWindow->SetAlphaBitPlanes(1); //enable usage of alpha channel > > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > renderer->AddActor(actor); > renderer->SetBackground(1,1,1); // Background color white > > renderWindow->Render(); > > // Screenshot > vtkSmartPointer windowToImageFilter = > vtkSmartPointer::New(); > windowToImageFilter->SetInput(renderWindow); > windowToImageFilter->SetMagnification(1); //set the resolution of the > output image (3 times the current resolution of vtk render window) > windowToImageFilter->SetInputBufferTypeToRGBA(); //also record the alpha > (transparency) channel > windowToImageFilter->Update(); > > vtkSmartPointer writer = > vtkSmartPointer::New(); > writer->SetFileName("screenshot2.png"); > writer->SetInputConnection(windowToImageFilter->GetOutputPort()); > writer->Write(); > > renderWindow->Render(); > renderer->ResetCamera(); > renderWindow->Render(); > renderWindowInteractor->Start(); > > return EXIT_SUCCESS; > } > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Wed Oct 8 15:42:41 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 8 Oct 2014 15:42:41 -0400 Subject: [vtkusers] vtkWindowToImageFilter - black image In-Reply-To: References: <1536134458.469803.1412790303683.JavaMail.yahoo@jws10091.mail.ne1.yahoo.com> Message-ID: Try windowToImageFilter->ReadFrontBufferOff(); I need to look into why this is required... On Wed, Oct 8, 2014 at 3:19 PM, Bill Lorensen wrote: > I see the same problem. I'll look into it... > > Bill > > > On Wed, Oct 8, 2014 at 1:45 PM, ingvar john via vtkusers > wrote: >> Hello everyone. >> >> This is my first time with VTK and first time I am posting to this list. >> Does anyone have an idea why this code produces black image as a screenshot >> (attached). I installed vtk 6.1 on Ubuntu 14.04 (on virtual machine). This >> is just the example I found on >> http://www.cmake.org/Wiki/VTK/Examples/Cxx/Utilities/Screenshot for saving a >> screenshot of the render window. I looked around during 2 days but I haven't >> find a solution. >> >> Thanks a lot. >> >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> >> >> >> int main(int, char *[]) >> { >> vtkSmartPointer sphereSource = >> vtkSmartPointer::New(); >> sphereSource->SetCenter(0.0, 0.0, 0.0); >> sphereSource->SetRadius(5.0); >> sphereSource->Update(); >> >> // Visualize >> vtkSmartPointer mapper = >> vtkSmartPointer::New(); >> mapper->SetInputConnection(sphereSource->GetOutputPort()); >> >> vtkSmartPointer actor = >> vtkSmartPointer::New(); >> actor->SetMapper(mapper); >> >> vtkSmartPointer renderer = >> vtkSmartPointer::New(); >> vtkSmartPointer renderWindow = >> vtkSmartPointer::New(); >> renderWindow->AddRenderer(renderer); >> renderWindow->SetAlphaBitPlanes(1); //enable usage of alpha channel >> >> vtkSmartPointer renderWindowInteractor = >> vtkSmartPointer::New(); >> renderWindowInteractor->SetRenderWindow(renderWindow); >> >> renderer->AddActor(actor); >> renderer->SetBackground(1,1,1); // Background color white >> >> renderWindow->Render(); >> >> // Screenshot >> vtkSmartPointer windowToImageFilter = >> vtkSmartPointer::New(); >> windowToImageFilter->SetInput(renderWindow); >> windowToImageFilter->SetMagnification(1); //set the resolution of the >> output image (3 times the current resolution of vtk render window) >> windowToImageFilter->SetInputBufferTypeToRGBA(); //also record the alpha >> (transparency) channel >> windowToImageFilter->Update(); >> >> vtkSmartPointer writer = >> vtkSmartPointer::New(); >> writer->SetFileName("screenshot2.png"); >> writer->SetInputConnection(windowToImageFilter->GetOutputPort()); >> writer->Write(); >> >> renderWindow->Render(); >> renderer->ResetCamera(); >> renderWindow->Render(); >> renderWindowInteractor->Start(); >> >> return EXIT_SUCCESS; >> } >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From szilardszaloki at gmail.com Wed Oct 8 16:06:51 2014 From: szilardszaloki at gmail.com (=?UTF-8?B?U3ppbMOhcmQgU3phbMOza2k=?=) Date: Wed, 8 Oct 2014 22:06:51 +0200 Subject: [vtkusers] Creating the dual of a graph - planar face traversal - vtkBoostGraphAdapter In-Reply-To: References: Message-ID: Thank you for replying so fast! I edited the vtkBoostGraphAdapter.h: struct vtkGraphIndexMap; template <> struct property_traits { typedef vtkIdType value_type; typedef vtkIdType reference; typedef vtkIdType key_type; typedef readable_property_map_tag category; }; struct vtkGraphIndexMap { property_traits::reference operator[](const property_traits::key_type& key) { return key; } }; inline property_traits::reference get( vtkGraphIndexMap vtkNotUsed(arr), property_traits::key_type key) { return key; } I deleted the lines that fill the index map also. Unfortunately I still get these errors: - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:302:19: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > > *>, boost::vtkGraphIndexMap, std::__1::map, std::__1::allocator > >, std::__1::map, std::__1::allocator > > &>' - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:309:5: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > > *>, boost::vtkGraphIndexMap, std::__1::map, std::__1::allocator > >, std::__1::map, std::__1::allocator > > &>' - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:302:19: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > *>, boost::vtkGraphIndexMap, std::__1::set, std::__1::allocator >, std::__1::set, std::__1::allocator > &>' - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:309:5: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > *>, boost::vtkGraphIndexMap, std::__1::set, std::__1::allocator >, std::__1::set, std::__1::allocator > &>' - /usr/local/boost_1_56_0/boost/*planar_dual.hpp*:38:38: No viable overloaded operator[] for type 'edge_to_face_map_t' (aka 'iterator_property_map') It seems to me that there's no operator[] for the iterator_property_map. Am I missing something? Thanks again! Szilard 2014-10-08 21:13 GMT+02:00 Jeff Baumes : > In your code, you are retrieving a vtkGraphIndexMap with: > > property_map::type e_index = > get(edge_index, in); > > vtkGraphIndexMap is intended to be read-only and is already populated with > indices 0 through N-1, which are accessed with get(). It's actually an > identity map by index since indices are always in order, as you can see > here: > > > https://github.com/Kitware/VTK/blob/master/Infovis/BoostGraphAlgorithms/vtkBoostGraphAdapter.h#L1032-L1049 > > So I would suggest leaving out your initialization loop on lines 43-45. > > Now, the remaining errors seem to require an operator[] on the > EdgeIndexMap, which is not currently implemented in vtkBoostGraphAdapter.h. > The needed code would be to replace the definition of vtkGraphPropertyMap > with something like this (not tested): > > struct vtkGraphIndexMap; // forward declaration > > template <> > struct property_traits > { > typedef vtkIdType value_type; > typedef vtkIdType reference; > typedef vtkIdType key_type; > typedef readable_property_map_tag category; > }; > > struct vtkGraphIndexMap > { > property_traits::reference operator[](const > property_traits::key_type& b) > { > return key; > } > }; > > > HTH, > Jeff > > On Wed, Oct 8, 2014 at 2:12 PM, Szil?rd Szal?ki > wrote: > >> Hi All, >> >> I'm trying to write an algorithm which creates the dual of a graph. To >> check whether the graph is planar or not I use the *Boyer-Myrvold >> planarity test* (Boost implementation) through the vtkBoostGraphAdapter. >> That works fine (only on vtkUndirectedGraph-s but that's OK for now). >> (http://www.boost.org/doc/libs/1_56_0/libs/graph/doc/boyer_myrvold.html) >> >> To create the dual I need to traverse the faces of the planar graph for >> which I also have a Boost tool called the planar_face_traversal_visitor. >> ( >> http://www.boost.org/doc/libs/1_56_0/libs/graph/doc/planar_face_traversal.html >> ) >> There's a guy, Aaron Windsor who implemented the appropriate visitor >> class that is able to create the dual of a graph in Boost. >> (https://github.com/aaw/boost_planar_graph_dual) >> That also works fine using only Boost but I'd like to adapt this feature >> as well using vtkBoostGraphAdapter. >> >> Here's my code: http://pastebin.com/g0Mtw6Ph >> >> These are my errors: >> >> - *vtkDualGraph.cpp*:44:9: No matching function for call to 'put' >> - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:302:19: >> No viable overloaded operator[] for type 'const >> boost::iterator_property_map> vtkEdgeType, std::__1::less, >> std::__1::allocator > > *>, >> boost::vtkGraphIndexMap, std::__1::map> std::__1::less, std::__1::allocator> long, vtkEdgeType> > >, std::__1::map> std::__1::less, std::__1::allocator> long, vtkEdgeType> > > &>' >> - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:309:5: >> No viable overloaded operator[] for type 'const >> boost::iterator_property_map> vtkEdgeType, std::__1::less, >> std::__1::allocator > > *>, >> boost::vtkGraphIndexMap, std::__1::map> std::__1::less, std::__1::allocator> long, vtkEdgeType> > >, std::__1::map> std::__1::less, std::__1::allocator> long, vtkEdgeType> > > &>' >> - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:302:19: >> No viable overloaded operator[] for type 'const >> boost::iterator_property_map> std::__1::less, std::__1::allocator > *>, >> boost::vtkGraphIndexMap, std::__1::set> long>, std::__1::allocator >, std::__1::set> std::__1::less, std::__1::allocator > &>' >> - /usr/local/boost_1_56_0/boost/property_map/*property_map.hpp*:309:5: >> No viable overloaded operator[] for type 'const >> boost::iterator_property_map> std::__1::less, std::__1::allocator > *>, >> boost::vtkGraphIndexMap, std::__1::set> long>, std::__1::allocator >, std::__1::set> std::__1::less, std::__1::allocator > &>' >> - /usr/local/boost_1_56_0/boost/*planar_dual.hpp*:38:38: No viable >> overloaded operator[] for type 'edge_to_face_map_t' (aka >> 'iterator_property_map> boost::vtkGraphIndexMap>') >> >> It seems I cannot provide an appropriate EdgeIndexMap parameter to the >> put function in the 44th line. The vtkBoostGraphAdapter says that we can >> use VTK arrays as property maps, I tried that one as well, with no success. >> I've been dealing with this, reading the source code really deep and trying >> a couple of things in the past few days but I can't really figure out what >> the problem is. Is the vtkBoostGraphAdapter properly prepared for this >> kind of usage? >> >> Any kind of help appreciated! >> >> Thanks in advance! >> >> Szilard >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Wed Oct 8 17:38:17 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Wed, 8 Oct 2014 17:38:17 -0400 Subject: [vtkusers] ANNOUNCE: Kitware is hiring Message-ID: Hi folks, 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 - always aiming to deliver robust and widely used software solutions. For the full posting see: http://tinyurl.com/l8sgvzw JOB DESCRIPTION Kitware is seeking to hire highly skilled Research and Development Engineers (R&D Engineers) to join our Scientific Computing team and contribute to our scientific and information visualization efforts. Candidates will work to develop and improve leading visualization software solutions. Kitware collaborates on a multitude of basic and applied research and development projects. Our collaborators include the top universities from around the world, national research labs, medical device manufacturers, car manufacturers, oil and gas companies, financial institutes, and many others. The projects range from extending our open source C++ libraries and applications, such as VTK, ParaView, and CMake, to developing proprietary domain-specific vertical applications for a wide array of platforms including web and mobile devices. By joining our team you will participate in a dynamic work environment with exceptionally talented and friendly coworkers who are committed to high-quality development practices. You will collaborate with esteemed researchers from around the world by: * Designing and developing scalable data analysis and visualization tools for use by researchers and professionals from various domains; * Solving a wide array of problems ranging from developing distributed memory parallel algorithms for data analysis, optimizing distributed parallel codes to compiling and maintaining software on supercomputers. * Designing and developing tools to improve scientific data analysis workflows; * Contributing to and supporting our dynamic open source communities built around several of our open source tools. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Wed Oct 8 18:37:36 2014 From: tossin at gmail.com (Evan Kao) Date: Wed, 8 Oct 2014 15:37:36 -0700 Subject: [vtkusers] Extract block from Multi-block data by name? In-Reply-To: References: Message-ID: Great, thanks a lot. On Wed, Oct 8, 2014 at 11:29 AM, Berk Geveci wrote: > In Python, you can do this: > > iter = mb.NewIterator() > > while not iter.IsDoneWithTraversal(): > print iter.GetCurrentMetaData().Get(vtk.vtkCompositeDataSet.NAME()) > iter.GoToNextItem() > > > The C++ code is almost identical. The name is stored in the MetaData of > each block with the vtkCompositeDataSet::NAME() key. > > Best, > -berk > > On Wed, Oct 8, 2014 at 11:53 AM, Evan Kao wrote: > >> Is there a way to get the name of a block when iterating (with >> ExtractBlock I assume)? It wasn't clear to me in the documentation what >> method or sequence of methods I could use to get the name of the data >> itself. >> >> Thanks, >> Evan Kao >> >> On Wed, Oct 8, 2014 at 4:45 AM, Berk Geveci >> wrote: >> >>> There is still no specific method. You have to iterate over the blocks >>> and do a linear search. >>> >>> Best, >>> -berk >>> >>> On Tue, Oct 7, 2014 at 11:21 PM, Evan Kao wrote: >>> >>>> Hello vtkusers, >>>> >>>> I want to extract a block from a Multi-block dataset (read in using the >>>> Ensight reader) using the block's name, but I had trouble finding such a >>>> method in the documentation. I found this thread >>>> >>>> about the same topic (but in Paraview), which suggested there was no method >>>> at the time, but since it's from 3-4 years ago, I was wondering if >>>> something in vtk had been written by now. >>>> >>>> Thanks, >>>> Evan Kao >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Wed Oct 8 21:03:54 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Wed, 8 Oct 2014 18:03:54 -0700 (PDT) Subject: [vtkusers] offscreen rendering on linux In-Reply-To: <54352CFF.6000405@ohio.edu> References: <1412751071756-5729025.post@n5.nabble.com> <54352CFF.6000405@ohio.edu> Message-ID: <1412816634555-5729068.post@n5.nabble.com> Thanks for your reply! But I don't want to use Mesa! So I need to seek other solutions! -- View this message in context: http://vtk.1045678.n5.nabble.com/offscreen-rendering-on-linux-tp5729025p5729068.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Wed Oct 8 21:05:37 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 8 Oct 2014 21:05:37 -0400 Subject: [vtkusers] How to use vtkBooleanOperationPolyDataFilter correctly In-Reply-To: References: <1411464425998-5728839.post@n5.nabble.com> <1412774592086-5729039.post@n5.nabble.com> Message-ID: This particular problem looks like it stems from the distance computation from one of the surfaces to another, which is computed in vtkImplicitPolyData. It looks like the normal used in this calculation is being flipped for the missing triangles. I'm tracking it down. Best, Cory On Wed, Oct 8, 2014 at 1:18 PM, Cory Quammen wrote: > Hi Santosh, > > Your input geometries are fine. I, too, see missing polygons from the > output. This is definitely not expected. These missing triangles are > apparently being misclassified as to whether they belong to the union > or intersection surface. > > I'll take a look to see if there is a quick fix for this. > > Cory > > On Wed, Oct 8, 2014 at 9:23 AM, santosh wrote: >> Hi Cory, >> I tried the vtkBooleanOperationPolyDataFilter on two closed surfaces which >> are intersecting with each other. >> I made sure that the normals of both the closed surfaces point outwards. >> After i perform a union operation using the >> vtkBooleanOperationPolyDataFilter, I get holes in the >> final result. I am attaching the two individual STL files and the result of >> the union operation. I am aslo attaching an image that shows the holes in >> the resultant STL file. Is this expected behavior ? Can I do something to >> get a surface without any holes? >> input_1.stl >> input_2.stl >> output.stl >> union.png >> Cheers, >> Santosh >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkBooleanOperationPolyDataFilter-correctly-tp5728839p5729039.html >> 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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers From wulihouxiaoshuai at 163.com Wed Oct 8 21:12:04 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Wed, 8 Oct 2014 18:12:04 -0700 (PDT) Subject: [vtkusers] offscreen rendering on linux In-Reply-To: References: <1412751071756-5729025.post@n5.nabble.com> Message-ID: <1412817124585-5729070.post@n5.nabble.com> Sorry, I have made a mistake and uploaded the wrong code! Just like you said the code should have the following line: renWin->OffScreenRenderingOn(); A blank window still pops up. what I forgotten to say is I don't want to use mesa! So I need to seek other solutions! -- View this message in context: http://vtk.1045678.n5.nabble.com/offscreen-rendering-on-linux-tp5729025p5729070.html Sent from the VTK - Users mailing list archive at Nabble.com. From 75779910 at qq.com Wed Oct 8 23:41:36 2014 From: 75779910 at qq.com (Simon) Date: Wed, 8 Oct 2014 20:41:36 -0700 (PDT) Subject: [vtkusers] How to know a coordinate inside or outside a vtkPolyData? In-Reply-To: <54351254.3020807@bristol.ac.uk> References: <1412731745096-5729019.post@n5.nabble.com> <54351254.3020807@bristol.ac.uk> Message-ID: <1412826096709-5729071.post@n5.nabble.com> Thankx, very Helpful. vtkImplicitFunction specifies an abstract interface for implicit functions. Implicit functions are real valued functions defined in 3D space, w = F(x,y,z). Two primitive operations are required: the ability to evaluate the function, and the function gradient at a given point. The implicit function divides space into three regions: on the surface (F(x,y,z)=w), outside of the surface (F(x,y,z)>c), and inside the surface (F(x,y,z) Hi, I am having profound issues regarding understanding the transformations involved in VTK. OpenGL has fairly good documentation and I was of the impression that VTK is verym similar to OpenGL (it is, in many ways). But when it comes to transformations, it seems to be an entirely different story. This is a good OpenGL documentation about transforms involved: The perspective projection matrix in OpenGL is: I wanted to see if this formula applied in VTK will give me the projection matrix of VTK (by cross-checking with VTK projection matrix). *Relevant Camera and Renderer Parameters:* camera->SetPosition(0,0,20); camera->SetFocalPoint(0,0,0); double crSet[2] = {10, 1000}; renderer->GetActiveCamera()->SetClippingRange(crSet); double windowSize[2]; renderWindow->SetSize(1280,720); renderWindowInteractor->GetSize(windowSize); proj = renderer->GetActiveCamera()->GetProjectionTransformMatrix(windowSize[0]/windowSize[1], crSet[0], crSet[1]); The projection transform matrix I got for this configuration is: The (3,3) and (3,4) values of the projection matrix (lets say it is indexed 1 to 4 for rows and columns) should be - (f+n)/(f-n) and -2*f*n/(f-n) respectively. In my VTK camera settings, the nearz is 10 and farz is 1000 and hence I should get -1.020 and -20.20 respectively in the (3,3) and (3,4) locations of the matrix. But it is -1010 and -10000. I have changed my clipping range values to see the changes and the (3,3) position is always nearz+farz which makes no sense to me. Also, it would be great if someone can explain why it is 3.7320 in the (1,1) and (2,2) positions. And this value DOES NOT change when I change the window size of the renderer window. Quite perplexing to me. I see in VTKCamera class reference that GetProjectionTransformMatrix() returns the transformation matrix that maps from camera coordinates to viewport coordinates. http://www.vtk.org/doc/nightly/html/classvtkCamera.html OpenGL Projection Matrix is the matrix that maps from eye coordinates to clip coordinates. It is beyond doubt that eye coordinates in OpenGL is the same as camera coordinates in VTK. But is the clip coordinates in OpenGL same as viewport coordinates of VTK? -- View this message in context: http://vtk.1045678.n5.nabble.com/What-is-the-difference-between-ProjectionTransformMatrix-of-VTK-and-GL-PROJECTION-of-OpenGL-tp5729072.html Sent from the VTK - Users mailing list archive at Nabble.com. From Mandar.Mhatre at karlstorz.com Thu Oct 9 07:19:54 2014 From: Mandar.Mhatre at karlstorz.com (Mhatre, Mandar) Date: Thu, 9 Oct 2014 11:19:54 +0000 Subject: [vtkusers] Inactive render window Message-ID: Hello Everyone, I moved a step ahead of the problem I had asked before, I can update vtkPoints and can do the rendering using some features of vtkTimerCallback2 . As I moved ahead, I am facing next hurdle. Though everything works fine, pipeline seems to be working correct, my render window stays inactive and doesn't update until I move mouse, to get continuous visualization of the moving sensors I had to keep the mouse moving over the render window (that's really stupid). Can anyone suggest what can be the possible problem ? and how to overcome this ? One more info, as I run the project, command window pops out. I used it earlier to debug the code using cout function, but now everything is removed as I reach the final stage. Still command promt happens to stay there, totally blank . I dnt know if that's somehow related to my issue. Looking forward for your experienced advices. Thanks in Advance. With regards, Mandar Mhatre -------------- next part -------------- An HTML attachment was scrubbed... URL: From beekmaarten at yahoo.com Thu Oct 9 12:28:26 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Thu, 9 Oct 2014 09:28:26 -0700 Subject: [vtkusers] check for pipeline without input data? Message-ID: <1412872106.35890.YahooMailNeo@web121306.mail.ne1.yahoo.com> Hi all, Is there a way to check whether a vtk pipeline has data to render? Many VTK algorithms display an error when they don't have input data. And these errors are harmless (don't crash the app), I would like to avoid them. I currently am doing this as follows: vtkMapper* mapper = actor->GetMapper(); if( 0 < mapper->GetTotalNumberOfInputConnections() && 0 < mapper->GetInputAlgortihm(0,0)->GetTotalNumberOfInputConnections() && 0 < mapper->GetInputAlgortihm(0,0)->GetInputAlgortihm(0,0)->GetTotalNumberOfInputConnections() && .... ) { actor->VisibilityOn() } else { actor->VisibilityOff(); } One can easily imagine I would like to have a more convenient if statement, because currently I need to know exactly how long the pipeline is. For those interested: This issue pops up, when when the rendering pipeline is created at the beginning a running the app, before the data is loaded Or when the data is unloaded in order to load new data. Thank - Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Oct 9 15:49:46 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 9 Oct 2014 15:49:46 -0400 Subject: [vtkusers] How to use vtkBooleanOperationPolyDataFilter correctly In-Reply-To: References: <1411464425998-5728839.post@n5.nabble.com> <1412774592086-5729039.post@n5.nabble.com> Message-ID: Santosh, I looked at this problem in some depth today. The cylinder shape in input_2.stl is not a water-tight object. It looks like the end cap tessellation does not match the tessellation of the cylinder body. Attached is an image showing this where we are looking down the cylinder from one end. Note that parts of the end cap sticks out past the cylinder. Why does this matter? The signed distance computation from a query point on one polydata to another finds the closest point on the other polydata, then computes the dot product of the surface normal at the closest point with the vector in the direction from the query point to the closest point. The dot product determines the sign of the distance, positive if outside the queried object, negative if inside. Since that little part of the end cap sticks out past the side of the cylinder, it is closer to the query point than the side of the cylinder, the normal of the end cap at that point is used as the surface normal. This causes the dot product for that query point to be the sign opposite of what it would be if a point on the cylinder wall was selected, hence the missing triangles. My recommendation is to make your cylinder end cap tessellation match the cylinder body tessellation and give this a try again. Thanks, Cory On Wed, Oct 8, 2014 at 9:05 PM, Cory Quammen wrote: > This particular problem looks like it stems from the distance > computation from one of the surfaces to another, which is computed in > vtkImplicitPolyData. It looks like the normal used in this calculation > is being flipped for the missing triangles. I'm tracking it down. > > Best, > Cory > > On Wed, Oct 8, 2014 at 1:18 PM, Cory Quammen wrote: >> Hi Santosh, >> >> Your input geometries are fine. I, too, see missing polygons from the >> output. This is definitely not expected. These missing triangles are >> apparently being misclassified as to whether they belong to the union >> or intersection surface. >> >> I'll take a look to see if there is a quick fix for this. >> >> Cory >> >> On Wed, Oct 8, 2014 at 9:23 AM, santosh wrote: >>> Hi Cory, >>> I tried the vtkBooleanOperationPolyDataFilter on two closed surfaces which >>> are intersecting with each other. >>> I made sure that the normals of both the closed surfaces point outwards. >>> After i perform a union operation using the >>> vtkBooleanOperationPolyDataFilter, I get holes in the >>> final result. I am attaching the two individual STL files and the result of >>> the union operation. I am aslo attaching an image that shows the holes in >>> the resultant STL file. Is this expected behavior ? Can I do something to >>> get a surface without any holes? >>> input_1.stl >>> input_2.stl >>> output.stl >>> union.png >>> Cheers, >>> Santosh >>> >>> >>> >>> -- >>> View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkBooleanOperationPolyDataFilter-correctly-tp5728839p5729039.html >>> 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 >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- A non-text attachment was scrubbed... Name: SantoshCylinder.png Type: image/png Size: 9115 bytes Desc: not available URL: From rahul.vedic at gmail.com Thu Oct 9 16:32:02 2014 From: rahul.vedic at gmail.com (rkhare) Date: Thu, 9 Oct 2014 13:32:02 -0700 (PDT) Subject: [vtkusers] Problems with multiple vtkSphereWidgets Message-ID: <1412886722189-5729098.post@n5.nabble.com> Hi, I have an application where I place sphere widgets to mark points in a 3D volume. Whenever I slice through the volume, I change the visibility of the widgets by turning them on and off. It works fine if there are only 1 or 2 widgets. However, once the number of widgets go up, the slicing becomes real slow. Has anyone else come across this problem? Can anyone suggest a solution? Thank you. Rahul. -- View this message in context: http://vtk.1045678.n5.nabble.com/Problems-with-multiple-vtkSphereWidgets-tp5729098.html Sent from the VTK - Users mailing list archive at Nabble.com. From lurbano at usb.ve Thu Oct 9 16:40:28 2014 From: lurbano at usb.ve (Luis Urbano) Date: Thu, 9 Oct 2014 16:10:28 -0430 Subject: [vtkusers] Problems with multiple vtkSphereWidgets In-Reply-To: <1412886722189-5729098.post@n5.nabble.com> References: <1412886722189-5729098.post@n5.nabble.com> Message-ID: <9FD12639-D23A-4144-9F72-AB7F808BE47B@usb.ve> Enviado desde mi iPhone El 09/10/2014, a las 16:02, rkhare escribi?: > Hi, > > I have an application where I place sphere widgets to mark points in a 3D > volume. Whenever I slice through the volume, I change the visibility of the > widgets by turning them on and off. It works fine if there are only 1 or 2 > widgets. However, once the number of widgets go up, the slicing becomes real > slow. Has anyone else come across this problem? Can anyone suggest a > solution? > > Thank you. > Rahul. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Problems-with-multiple-vtkSphereWidgets-tp5729098.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From alok.theanomaly at gmail.com Thu Oct 9 17:03:06 2014 From: alok.theanomaly at gmail.com (junior) Date: Thu, 9 Oct 2014 14:03:06 -0700 (PDT) Subject: [vtkusers] Change mouse cursor while hovering on vtkSphereWidget Message-ID: <1412888586008-5729100.post@n5.nabble.com> Hi, I want the mouse cursor to change to a 'hand' when the mouse is hovering over a vtkSphereWidget. Is there any out of box solution for this or do I need to subclass? I tried using vtkSphereWidget2 and setting ManagesCursorOn() to true but that did not help. I see that the vtkAngleWidget exhibits the said behavior when mouse hovers above one of the three control points which in my understanding are vtkHandleWidgets. Any suggestions?? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Change-mouse-cursor-while-hovering-on-vtkSphereWidget-tp5729100.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Thu Oct 9 17:03:33 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 9 Oct 2014 17:03:33 -0400 Subject: [vtkusers] Problems with multiple vtkSphereWidgets In-Reply-To: <1412886722189-5729098.post@n5.nabble.com> References: <1412886722189-5729098.post@n5.nabble.com> Message-ID: Rahul, VTK does not perform well with many actors, so if you have a separate vtkActor for each sphere, performance can get very slow. You might want to try vtkGlyph3D with your marker points set as the input. See http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D for an example of how this is done with box glyphs. You can change the vtkCubeSource to vtkSphereSource for your application. Hope that helps, Cory On Thu, Oct 9, 2014 at 4:32 PM, rkhare wrote: > Hi, > > I have an application where I place sphere widgets to mark points in a 3D > volume. Whenever I slice through the volume, I change the visibility of the > widgets by turning them on and off. It works fine if there are only 1 or 2 > widgets. However, once the number of widgets go up, the slicing becomes real > slow. Has anyone else come across this problem? Can anyone suggest a > solution? > > Thank you. > Rahul. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Problems-with-multiple-vtkSphereWidgets-tp5729098.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From cory.quammen at kitware.com Thu Oct 9 17:13:00 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 9 Oct 2014 17:13:00 -0400 Subject: [vtkusers] Change mouse cursor while hovering on vtkSphereWidget In-Reply-To: <1412888586008-5729100.post@n5.nabble.com> References: <1412888586008-5729100.post@n5.nabble.com> Message-ID: I think you will have to subclass vtkSphereWidget2 and override the SetCursor() method. The SetCursor() method for vtkHandleWidget is //------------------------------------------------------------------------- void vtkHandleWidget::SetCursor(int cState) { if ( this->ManagesCursor ) { switch (cState) { case vtkHandleRepresentation::Outside: this->RequestCursorShape(VTK_CURSOR_DEFAULT); break; default: this->RequestCursorShape(VTK_CURSOR_HAND); } } } I imagine you would want the same in your subclass. HTH, Cory On Thu, Oct 9, 2014 at 5:03 PM, junior wrote: > Hi, > > I want the mouse cursor to change to a 'hand' when the mouse is hovering > over a vtkSphereWidget. > Is there any out of box solution for this or do I need to subclass? I tried > using vtkSphereWidget2 and setting ManagesCursorOn() to true but that did > not help. > > I see that the vtkAngleWidget exhibits the said behavior when mouse hovers > above one of the three control points which in my understanding are > vtkHandleWidgets. > > Any suggestions?? > Thanks > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Change-mouse-cursor-while-hovering-on-vtkSphereWidget-tp5729100.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From DLRdave at aol.com Thu Oct 9 17:14:13 2014 From: DLRdave at aol.com (David Cole) Date: Thu, 9 Oct 2014 17:14:13 -0400 Subject: [vtkusers] vtkPolyData projected to a 2D plane, and then outlined/silhouetted... Message-ID: Is there already a VTK filter that does this? I can't seem to find just the right thing, and I don't want to write it unless I really have to. What I want is a filter that projects all the points of a polydata to a 2D plane, and then connects the set of outermost points to produce the outline of the projected polydata - like a shadow of it... (the output should be another polydata which is a single closed polygon, or the line segments that make up such a polygon.) I tried vtkPolyDataSilhouette, which is close, but it's still a 3D polydata, and it does not produce a closed outline. Does anybody know the name of a filter that will do this? Thanks, David C. From cory.quammen at kitware.com Thu Oct 9 17:28:55 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 9 Oct 2014 17:28:55 -0400 Subject: [vtkusers] vtkPolyData projected to a 2D plane, and then outlined/silhouetted... In-Reply-To: References: Message-ID: David, I don't know a filter that does exactly what you want, but could you just take the output of the vtkPolyDataSilhouette filter, scale the z-axis by 0 with vtkTransformPolyDataFilter, then run vtkCleanPolyData on the output to get a closed 2D outline? - Cory On Thu, Oct 9, 2014 at 5:14 PM, David Cole via vtkusers wrote: > Is there already a VTK filter that does this? I can't seem to find > just the right thing, and I don't want to write it unless I really > have to. > > What I want is a filter that projects all the points of a polydata to > a 2D plane, and then connects the set of outermost points to produce > the outline of the projected polydata - like a shadow of it... (the > output should be another polydata which is a single closed polygon, or > the line segments that make up such a polygon.) > > I tried vtkPolyDataSilhouette, which is close, but it's still a 3D > polydata, and it does not produce a closed outline. > > Does anybody know the name of a filter that will do this? > > > Thanks, > David C. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From prashanth.dumpuri at gmail.com Thu Oct 9 19:47:16 2014 From: prashanth.dumpuri at gmail.com (Prashanth) Date: Thu, 9 Oct 2014 16:47:16 -0700 Subject: [vtkusers] error adding Kitware.vtk.dll from ActiViz.NET 5.8 x64 to Visual Studio 2012 Message-ID: All, I downloaded and installed ActiViz.NET 5.8 x64 version for my 64-bit machine running Windows 8.1. I get an error when I add Kitware.VTK.dll to Visual Studio 2012. Here's what I did Visual Studio 2012 -> Tools -> Choose Toolbox Items -> myPath/Kitware.VTK.dll I get the following error : The file myPath/Kitware.dll is not valid I saw a similar post but with no solution posted. Any help will be appreciated. Thanks Prashanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Thu Oct 9 21:41:19 2014 From: DLRdave at aol.com (David Cole) Date: Thu, 9 Oct 2014 21:41:19 -0400 Subject: [vtkusers] error adding Kitware.vtk.dll from ActiViz.NET 5.8 x64 to Visual Studio 2012 In-Reply-To: References: Message-ID: Use the 32-bit x86 version for design mode in Visual Studio. VS is a 32-bit app, and can only load 32-bit (or "Any CPU") controls... Since the x64 is a 64-bit only control, it cannot work within the 32-bit Visual Studio environment. Once you have a project that works as 32-bit, you can easily build a 64-bit version of it.... but inside VS you always need a reference to the 32-bit one for things to work as you expect. HTH, David C. On Thu, Oct 9, 2014 at 7:47 PM, Prashanth wrote: > All, > > I downloaded and installed ActiViz.NET 5.8 x64 version for my 64-bit machine > running Windows 8.1. I get an error when I add Kitware.VTK.dll to Visual > Studio 2012. > > Here's what I did > > Visual Studio 2012 -> Tools -> Choose Toolbox Items -> > myPath/Kitware.VTK.dll > > I get the following error : The file myPath/Kitware.dll is not valid > > I saw a similar post but with no solution posted. Any help will be > appreciated. > > Thanks > Prashanth > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From alok.theanomaly at gmail.com Fri Oct 10 09:53:02 2014 From: alok.theanomaly at gmail.com (Alok) Date: Fri, 10 Oct 2014 09:53:02 -0400 Subject: [vtkusers] Change mouse cursor while hovering on vtkSphereWidget In-Reply-To: References: <1412888586008-5729100.post@n5.nabble.com> Message-ID: Thanks Cory I dont have experience with subclassing vtk classes yet. Is there any other class that you can suggest as a reference to look at while going about this? On Thu, Oct 9, 2014 at 5:13 PM, Cory Quammen wrote: > I think you will have to subclass vtkSphereWidget2 and override the > SetCursor() method. The SetCursor() method for vtkHandleWidget is > > //------------------------------------------------------------------------- > void vtkHandleWidget::SetCursor(int cState) > { > if ( this->ManagesCursor ) > { > switch (cState) > { > case vtkHandleRepresentation::Outside: > this->RequestCursorShape(VTK_CURSOR_DEFAULT); > break; > default: > this->RequestCursorShape(VTK_CURSOR_HAND); > } > } > } > > I imagine you would want the same in your subclass. > > HTH, > Cory > > On Thu, Oct 9, 2014 at 5:03 PM, junior wrote: > > Hi, > > > > I want the mouse cursor to change to a 'hand' when the mouse is hovering > > over a vtkSphereWidget. > > Is there any out of box solution for this or do I need to subclass? I > tried > > using vtkSphereWidget2 and setting ManagesCursorOn() to true but that did > > not help. > > > > I see that the vtkAngleWidget exhibits the said behavior when mouse > hovers > > above one of the three control points which in my understanding are > > vtkHandleWidgets. > > > > Any suggestions?? > > Thanks > > > > > > > > -- > > View this message in context: > http://vtk.1045678.n5.nabble.com/Change-mouse-cursor-while-hovering-on-vtkSphereWidget-tp5729100.html > > 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 > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > -- I live a simple life... in 0s and 1s ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Oct 10 09:53:33 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 10 Oct 2014 09:53:33 -0400 Subject: [vtkusers] Overhaul of the rendering subsystem in VTK: Volume Rendering update Message-ID: Friends, As reported back in July, we are in the process of a major overhaul of the rendering subsystem in VTK. The July article ( http://www.kitware.com/source/home/post/144) focused primarily on our efforts to move to OpenGL 2.1+ to support faster polygonal rendering. The October Source will contain an article focused on our rewrite of the vtkGPURayCastMapper class to provide a faster, more portable and more easily extensible volume mapper for regular rectilinear grids. VTK has a long history of volume rendering, and unfortunately that history is evident in the large selection of classes available to render volumes. Each of these methods was state-of-the-art at the time, but given VTK?s 20+ year history many of these methods are now quite obsolete. One goal of this effort is to reduce the number of volume mappers to ideally just two - one that supports accelerated rendering on graphics hardware and another that works in parallel on the CPU. In addition, the vtkSmartVolumeMapper would help application developers by automatically choosing between these techniques based on system performance. In this first phase, we have created a replacement for vtkGPURayCastMapper. Currently, this is available for testing from the VTK git repository (in master branch, disabled by default). General instructions on how to build VTK from the source is available at this URL: http://www.vtk.org/Wiki/VTK/Git*. *In order to build the new mapper, enable the Module_vtkRenderingVolumeOpenGLNew module in cmake (via -D *Module_vtkRenderingVolumeOpenGL=ON*), in ccmake or cmake-gui. Once built, it can be used via vtkSmartVolumeMapper or used directly. Once sufficient testing by the community has been performed, this class will replace the old vtkGPURayCastMapper. In addition, we are adding this new mapper to the OpenGL2 module. Availability of the new mapper with OpenGL2 module will improve the management of textures in the mapper and eventually benefitting both forms of rendering (geometry and volume) by sharing common code between them. Please contact us if you have any questions or encounter any issues. Thanks, -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Oct 10 10:15:02 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 10 Oct 2014 10:15:02 -0400 Subject: [vtkusers] Change mouse cursor while hovering on vtkSphereWidget In-Reply-To: References: <1412888586008-5729100.post@n5.nabble.com> Message-ID: Alok, What I usually do is copy and paste an existing class and then modify it appropriately, e.g., renamed the class, change the parent class, remove unneeded member variables, methods, change the comments for the class, etc. In your case, I would copy the vtkSphereWidget2 class to a new class (vtkSphereWidget3?) and copy in the implementation for SetCursor() in vtkHandleWidget, then be sure to declare this method in your classes header file. - Cory On Fri, Oct 10, 2014 at 9:53 AM, Alok wrote: > Thanks Cory > I dont have experience with subclassing vtk classes yet. Is there any other > class that you can suggest as a reference to look at while going about this? > > > > On Thu, Oct 9, 2014 at 5:13 PM, Cory Quammen > wrote: >> >> I think you will have to subclass vtkSphereWidget2 and override the >> SetCursor() method. The SetCursor() method for vtkHandleWidget is >> >> >> //------------------------------------------------------------------------- >> void vtkHandleWidget::SetCursor(int cState) >> { >> if ( this->ManagesCursor ) >> { >> switch (cState) >> { >> case vtkHandleRepresentation::Outside: >> this->RequestCursorShape(VTK_CURSOR_DEFAULT); >> break; >> default: >> this->RequestCursorShape(VTK_CURSOR_HAND); >> } >> } >> } >> >> I imagine you would want the same in your subclass. >> >> HTH, >> Cory >> >> On Thu, Oct 9, 2014 at 5:03 PM, junior wrote: >> > Hi, >> > >> > I want the mouse cursor to change to a 'hand' when the mouse is hovering >> > over a vtkSphereWidget. >> > Is there any out of box solution for this or do I need to subclass? I >> > tried >> > using vtkSphereWidget2 and setting ManagesCursorOn() to true but that >> > did >> > not help. >> > >> > I see that the vtkAngleWidget exhibits the said behavior when mouse >> > hovers >> > above one of the three control points which in my understanding are >> > vtkHandleWidgets. >> > >> > Any suggestions?? >> > Thanks >> > >> > >> > >> > -- >> > View this message in context: >> > http://vtk.1045678.n5.nabble.com/Change-mouse-cursor-while-hovering-on-vtkSphereWidget-tp5729100.html >> > 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 >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > I live a simple life... in 0s and 1s ! From rahul.vedic at gmail.com Fri Oct 10 11:54:01 2014 From: rahul.vedic at gmail.com (rkhare) Date: Fri, 10 Oct 2014 08:54:01 -0700 (PDT) Subject: [vtkusers] Problems with multiple vtkSphereWidgets In-Reply-To: References: <1412886722189-5729098.post@n5.nabble.com> Message-ID: <1412956441456-5729113.post@n5.nabble.com> Hi Cory, Thank you very much for your response. The reason I chose to go with vtkSphereWidget was that I wanted interactivity with each point. Rahul. -- View this message in context: http://vtk.1045678.n5.nabble.com/Problems-with-multiple-vtkSphereWidgets-tp5729098p5729113.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Oct 10 13:32:56 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 10 Oct 2014 13:32:56 -0400 Subject: [vtkusers] VTK6 migration and vtkImageData: "No scalar values found for texture input!" error in vtkOpenGLTexture In-Reply-To: <542B1A5E.7000609@gmail.com> References: <542979E6.6090304@gmail.com> <542B1A5E.7000609@gmail.com> Message-ID: Sebastian, Perhaps in your problem code, you could invoke one of the SetInputArrayToProcess() variants on your vtkImageResliceMapper: http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html#a6bea16e1329609dbccce0ff8d2367484 I believe the name of the scalars in the output of itkImageToVTKImageFilter is "scalars". Cory On Tue, Sep 30, 2014 at 5:02 PM, Sebastian Ordas wrote: > Hi Cory, > > I set up an example code, but I could not reproduce the error :-( > The example is attached anyway, in case someone wants to have a look at it > > I will keep searching the source of the error in my application and will > come back to the list with any finding > > thank you! > sebastian > > > On 29/09/2014 12:32 p.m., Cory Quammen wrote: >> >> Sebastian, >> >> Could you post a small, working example program that demonstrates the >> problem? >> >> Thank you, >> Cory >> >> On Mon, Sep 29, 2014 at 11:25 AM, Sebastian Ordas >> wrote: >>> >>> Dear List, >>> >>> (I just realized I sent my message to ITK list instead of VTK!) >>> >>> I have started getting the error "No scalar values found for texture >>> input!" >>> coming from vtkOpenGLTexture, while porting my code to VTK6 >>> >>> More precisely, I have a vtkImageData, generated by >>> itkImageToVTKImageFilter, which is mapped through vtkImageResliceMapper >>> >>> I have tried adding the following to itkImageToVTKImageFilter: >>> >>> m_Importer->UpdateInformation(); >>> vtkStreamingDemandDrivenPipeline::SetUpdateExtent( >>> m_Importer->GetOutputInformation(0 /*port number*/), >>> 0 /*piece*/, >>> 2 /*number of pieces*/, >>> 0 /*number of ghost levels*/); >>> m_Importer->Update(); >>> >>> .. but no luck! >>> >>> I have also tried: >>> >>> m_ImageData->GetPointData()->SetActiveAttribute (0, >>> vtkPointData::SCALARS); >>> >>> didn?t work either... >>> >>> Any hint? >>> >>> thank you, >>> sebastian >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> > From tossin at gmail.com Fri Oct 10 18:56:31 2014 From: tossin at gmail.com (Evan Kao) Date: Fri, 10 Oct 2014 15:56:31 -0700 Subject: [vtkusers] Extracting "feature surfaces" in VTK Message-ID: Hello all, I'm trying to extract feature surfaces (e.g. inlets, outlets, etc.) in VTK as briefly described in this fairly old mailing list exchange , but since I'm inexperienced with VTK, I need a little more detail. I've tried the corresponding filters in Paraview, which was pretty straightforward, but I'd like to be able to do it in VTK, which seems a lot less straightforward. The sequence of filters in Paraview that I used is (starting from an unstructured grid volume) : 1. Extract Surface 2. Generate Surface Normals 3. Connectivity 4. Threshold (for each surface) I believe the corresponding filters in VTK are: 1. vtkGeometryFilter 2. vtkPolyDataNormals 3. vtkPolyDataConnectivityFilter (or vtkConnectivityFilter) 4. vtkThreshold I'm currently having trouble with the connectivity filters. In Paraview, the connectivity filter conveniently adds a "RegionId" array to the data, which can then be used to separate the surfaces using the Threshold filter, but this doesn't seem to be the case in VTK. If I print the output of the connectivity filter, there are no new arrays. I believe the filter is working though since GetNumberOfExtractedRegions() gives 3 (1 inlet, 1 outlet, 1 wall). This brings me to a few questions: 1. Is there a way to access each individual region? And if so, is vtkThreshold even necessary? 2. Is there a way to get the "RegionId" array in VTK and add it to the data? I also had a question about how the connectivity filter works. The Feature Angle option in Generate Surface Normals dictates which edges of the object that are rendered and seems to change the calculated point normals, but not the cell normals. Are these edges actually stored anywhere or are they just implicit in the calculated point normals? And the description for the connectivity filter suggests that it simply looks for shared points between cells, which doesn't seem like it would be affected by calculating point normals. So what does it use as criteria for separating surfaces when performed after Generate Surface Normals/vtkPolyDataNormals? Thanks, Evan Kao -------------- next part -------------- An HTML attachment was scrubbed... URL: From karsten.tausche at student.hpi.uni-potsdam.de Sat Oct 11 08:10:54 2014 From: karsten.tausche at student.hpi.uni-potsdam.de (Karsten Tausche) Date: Sat, 11 Oct 2014 14:10:54 +0200 Subject: [vtkusers] Missing update extent request in vtkExtractVOI? Message-ID: <54391E4E.8050907@student.hpi.uni-potsdam.de> Hi everyone, I tried to use vtkExtractVOI to decrease the resolution of a vtkImageData/vtkStructuredPoints data set. This works fine when I set the sample rate before I connect the filter to the pipeline. But changing the sample rate while rendering always results in an error like this: "ERROR: In ..\..\..\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, line 857 vtkCompositeDataPipeline (0000000005D6E1A0): The update extent specified in the information for output port 0 on algorithm vtkExtractVOI(0000000005D92710) is 0 10 0 10 0 0, which is outside the whole extent 0 9 0 10 0 0." This behavior also depends on the initial sample rate. With the defaults (1, 1, 1), the error message pops up after changing the rate, and the filter seems produce the expected result. When I set different initial values and increase them while rendering, I get the error message above, but the filter result seems correct. When decreasing the sample rate, I don't get an error, but the filter decreases the size of the rendered image. I'm using the current VTK master. I appended a small example the produces this error; it doesn't render any visible points but I didn't know how to enforce the required updates without adding the filter to a rendering pipeline. BTW the error also occurs with vtkStructuredGrid+vtkExtractGrid. Thanks, Karsten -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #define VTK_CREATE(CLASS, NAME) vtkSmartPointer NAME = vtkSmartPointer::New(); int main() { VTK_CREATE(vtkStructuredPoints, grid); grid->SetExtent(0, 10, 0, 10, 0, 0); VTK_CREATE(vtkExtractVOI, extract); extract->SetInputData(grid); VTK_CREATE(vtkImageToPolyDataFilter, polyData); polyData->SetInputConnection(extract->GetOutputPort()); VTK_CREATE(vtkPolyDataMapper, mapper); mapper->SetInputConnection(polyData->GetOutputPort()); VTK_CREATE(vtkActor, actor); actor->SetMapper(mapper); VTK_CREATE(vtkRenderer, renderer); renderer->AddActor(actor); VTK_CREATE(vtkRenderWindow, rw); rw->AddRenderer(renderer); VTK_CREATE(vtkRenderWindowInteractor, interactor); rw->SetInteractor(interactor); interactor->Initialize(); interactor->Render(); extract->SetSampleRate(5, 1, 1); interactor->Start(); return 0; } From pattersonnp at gmail.com Sat Oct 11 13:39:33 2014 From: pattersonnp at gmail.com (Nick Patterson) Date: Sat, 11 Oct 2014 18:39:33 +0100 Subject: [vtkusers] QVTKWidget and Interacting with Image Message-ID: <4FF6C7E8-0F23-45FF-8F56-6FBEF4A04AD8@gmail.com> VTK Users, I would like to take the example for visualising a DICOM series in VTK (http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOMSeries) as outlined in the example I have linked to, but I want to render this within a QVTKWidget. I have quite happily rendered the DICOM series in a QVTKWidget and can scroll through the image slices using something like a QSlider widget. But I simply cannot determine a way to interact with the image in the same way as the example shows, effectively being able to scroll through the images use the mouse wheel. There seems to be a lack of documentation of how to interact with the rendered window with a QVTKWidget and I hoped that someone with experience of this can advise on how I can interact with the image (as per the example I linked to above) but when it is rendered within the QT widget. Regards, Nick. From sebastian.ordas at gmail.com Sat Oct 11 20:42:06 2014 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Sat, 11 Oct 2014 21:42:06 -0300 Subject: [vtkusers] VTK6 migration and vtkImageData: "No scalar values found for texture input!" error in vtkOpenGLTexture In-Reply-To: References: <542979E6.6090304@gmail.com> <542B1A5E.7000609@gmail.com> Message-ID: <5439CE5E.8080609@gmail.com> thank you, but it is still throwing the same error this is killing me ... I will keep trying best regards, sebastian On 10/10/2014 02:32 p.m., Cory Quammen wrote: > Sebastian, > > Perhaps in your problem code, you could invoke one of the > SetInputArrayToProcess() variants on your vtkImageResliceMapper: > > http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html#a6bea16e1329609dbccce0ff8d2367484 > > I believe the name of the scalars in the output of > itkImageToVTKImageFilter is "scalars". > > Cory > > On Tue, Sep 30, 2014 at 5:02 PM, Sebastian Ordas > wrote: >> Hi Cory, >> >> I set up an example code, but I could not reproduce the error :-( >> The example is attached anyway, in case someone wants to have a look at it >> >> I will keep searching the source of the error in my application and will >> come back to the list with any finding >> >> thank you! >> sebastian >> >> >> On 29/09/2014 12:32 p.m., Cory Quammen wrote: >>> Sebastian, >>> >>> Could you post a small, working example program that demonstrates the >>> problem? >>> >>> Thank you, >>> Cory >>> >>> On Mon, Sep 29, 2014 at 11:25 AM, Sebastian Ordas >>> wrote: >>>> Dear List, >>>> >>>> (I just realized I sent my message to ITK list instead of VTK!) >>>> >>>> I have started getting the error "No scalar values found for texture >>>> input!" >>>> coming from vtkOpenGLTexture, while porting my code to VTK6 >>>> >>>> More precisely, I have a vtkImageData, generated by >>>> itkImageToVTKImageFilter, which is mapped through vtkImageResliceMapper >>>> >>>> I have tried adding the following to itkImageToVTKImageFilter: >>>> >>>> m_Importer->UpdateInformation(); >>>> vtkStreamingDemandDrivenPipeline::SetUpdateExtent( >>>> m_Importer->GetOutputInformation(0 /*port number*/), >>>> 0 /*piece*/, >>>> 2 /*number of pieces*/, >>>> 0 /*number of ghost levels*/); >>>> m_Importer->Update(); >>>> >>>> .. but no luck! >>>> >>>> I have also tried: >>>> >>>> m_ImageData->GetPointData()->SetActiveAttribute (0, >>>> vtkPointData::SCALARS); >>>> >>>> didn?t work either... >>>> >>>> Any hint? >>>> >>>> thank you, >>>> sebastian >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> From david.gobbi at gmail.com Sat Oct 11 21:00:55 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 11 Oct 2014 19:00:55 -0600 Subject: [vtkusers] VTK6 migration and vtkImageData: "No scalar values found for texture input!" error in vtkOpenGLTexture In-Reply-To: <5439CE5E.8080609@gmail.com> References: <542979E6.6090304@gmail.com> <542B1A5E.7000609@gmail.com> <5439CE5E.8080609@gmail.com> Message-ID: Hi Sebastian, Your first email said that the error is coming from vtkOpenGLTexture. Are you using vtkTexture anywhere in your code? Or maybe the vtkTextMapper, which uses vtkTexture for rendering text? You can test by temporarily removing all actors from your program that display tex to see if this stops the error. The vtkImageResliceMapper itself does not use vtkOpenGLTexture, so it cannot be the source of the error. - David On Sat, Oct 11, 2014 at 6:42 PM, Sebastian Ordas wrote: > thank you, but it is still throwing the same error > this is killing me ... > > I will keep trying > > best regards, > sebastian > > > On 10/10/2014 02:32 p.m., Cory Quammen wrote: >> >> Sebastian, >> >> Perhaps in your problem code, you could invoke one of the >> SetInputArrayToProcess() variants on your vtkImageResliceMapper: >> >> >> http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html#a6bea16e1329609dbccce0ff8d2367484 >> >> I believe the name of the scalars in the output of >> itkImageToVTKImageFilter is "scalars". >> >> Cory >> >> On Tue, Sep 30, 2014 at 5:02 PM, Sebastian Ordas >> wrote: >>> >>> Hi Cory, >>> >>> I set up an example code, but I could not reproduce the error :-( >>> The example is attached anyway, in case someone wants to have a look at >>> it >>> >>> I will keep searching the source of the error in my application and will >>> come back to the list with any finding >>> >>> thank you! >>> sebastian >>> >>> >>> On 29/09/2014 12:32 p.m., Cory Quammen wrote: >>>> >>>> Sebastian, >>>> >>>> Could you post a small, working example program that demonstrates the >>>> problem? >>>> >>>> Thank you, >>>> Cory >>>> >>>> On Mon, Sep 29, 2014 at 11:25 AM, Sebastian Ordas >>>> wrote: >>>>> >>>>> Dear List, >>>>> >>>>> (I just realized I sent my message to ITK list instead of VTK!) >>>>> >>>>> I have started getting the error "No scalar values found for texture >>>>> input!" >>>>> coming from vtkOpenGLTexture, while porting my code to VTK6 >>>>> >>>>> More precisely, I have a vtkImageData, generated by >>>>> itkImageToVTKImageFilter, which is mapped through vtkImageResliceMapper >>>>> >>>>> I have tried adding the following to itkImageToVTKImageFilter: >>>>> >>>>> m_Importer->UpdateInformation(); >>>>> vtkStreamingDemandDrivenPipeline::SetUpdateExtent( >>>>> m_Importer->GetOutputInformation(0 /*port number*/), >>>>> 0 /*piece*/, >>>>> 2 /*number of pieces*/, >>>>> 0 /*number of ghost levels*/); >>>>> m_Importer->Update(); >>>>> >>>>> .. but no luck! >>>>> >>>>> I have also tried: >>>>> >>>>> m_ImageData->GetPointData()->SetActiveAttribute (0, >>>>> vtkPointData::SCALARS); >>>>> >>>>> didn?t work either... >>>>> >>>>> Any hint? >>>>> >>>>> thank you, >>>>> sebastian >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From karsten.tausche at student.hpi.uni-potsdam.de Sun Oct 12 14:06:45 2014 From: karsten.tausche at student.hpi.uni-potsdam.de (Karsten Tausche) Date: Sun, 12 Oct 2014 20:06:45 +0200 Subject: [vtkusers] Missing update extent request in vtkExtractVOI? In-Reply-To: <54391E4E.8050907@student.hpi.uni-potsdam.de> References: <54391E4E.8050907@student.hpi.uni-potsdam.de> Message-ID: <543AC335.2040607@student.hpi.uni-potsdam.de> I just realized that calling SetUpdateExtentToWholeExtent() on a downstream algorithm (polyData in the example code) "fixes" this error. On 2014-10-11 14:10, Karsten Tausche wrote: > Hi everyone, > > I tried to use vtkExtractVOI to decrease the resolution of a > vtkImageData/vtkStructuredPoints data set. This works fine when I set > the sample rate before I connect the filter to the pipeline. But > changing the sample rate while rendering always results in an error > like this: > > "ERROR: In > ..\..\..\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, > line 857 > vtkCompositeDataPipeline (0000000005D6E1A0): The update extent > specified in the information for output port 0 on algorithm > vtkExtractVOI(0000000005D92710) is 0 10 0 10 0 0, which is outside the > whole extent 0 9 0 10 0 0." > > This behavior also depends on the initial sample rate. With the > defaults (1, 1, 1), the error message pops up after changing the rate, > and the filter seems produce the expected result. When I set different > initial values and increase them while rendering, I get the error > message above, but the filter result seems correct. When decreasing > the sample rate, I don't get an error, but the filter decreases the > size of the rendered image. > > I'm using the current VTK master. I appended a small example the > produces this error; it doesn't render any visible points but I didn't > know how to enforce the required updates without adding the filter to > a rendering pipeline. > > BTW the error also occurs with vtkStructuredGrid+vtkExtractGrid. > > Thanks, > Karsten > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From sid.murthy at gmail.com Sun Oct 12 19:38:25 2014 From: sid.murthy at gmail.com (Sid Murthy) Date: Sun, 12 Oct 2014 17:38:25 -0600 Subject: [vtkusers] Rendering performance of vtkAssembly In-Reply-To: References: Message-ID: I combined the 3 parts' polydata with vtkAppendPolydata and got rid of the vtkAssembly which helps with performance but that leads me to another issue with texturing: One of the three cylinders of the previous assembly had a texture applied to it. Combining the polydata and applying texture applies the image to the entire cylinder rather than the smaller section. Given a Cylinder - Is there a way to apply a texture to only a portion of it's surface -- for example the bottom half? On Wed, Oct 8, 2014 at 9:12 AM, Sid Murthy wrote: > I have 25 assemblies with 3 parts (3 cylinders) each.. Rendering > performance degrades going from 1 to 25. > > Is there a way to improve vtkAssembly rendering performance or should I be > using something like vtkPropAssembly instead? > > thanks > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastian.ordas at gmail.com Sun Oct 12 20:24:36 2014 From: sebastian.ordas at gmail.com (Sebastian Ordas) Date: Sun, 12 Oct 2014 21:24:36 -0300 Subject: [vtkusers] VTK6 migration and vtkImageData: "No scalar values found for texture input!" error in vtkOpenGLTexture In-Reply-To: References: <542979E6.6090304@gmail.com> <542B1A5E.7000609@gmail.com> <5439CE5E.8080609@gmail.com> Message-ID: <543B1BC4.4040903@gmail.com> you were right! The error was an empty vtkTextActor on the opposite corner of my application! problem solved. thank you David and Cory sebastian On 11/10/2014 10:00 p.m., David Gobbi wrote: > Hi Sebastian, > > Your first email said that the error is coming from vtkOpenGLTexture. > Are you using vtkTexture anywhere in your code? Or maybe the > vtkTextMapper, which uses vtkTexture for rendering text? You can > test by temporarily removing all actors from your program that display > tex to see if this stops the error. The vtkImageResliceMapper itself > does not use vtkOpenGLTexture, so it cannot be the source of the error. > > - David > > > On Sat, Oct 11, 2014 at 6:42 PM, Sebastian Ordas > wrote: >> thank you, but it is still throwing the same error >> this is killing me ... >> >> I will keep trying >> >> best regards, >> sebastian >> >> >> On 10/10/2014 02:32 p.m., Cory Quammen wrote: >>> Sebastian, >>> >>> Perhaps in your problem code, you could invoke one of the >>> SetInputArrayToProcess() variants on your vtkImageResliceMapper: >>> >>> >>> http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html#a6bea16e1329609dbccce0ff8d2367484 >>> >>> I believe the name of the scalars in the output of >>> itkImageToVTKImageFilter is "scalars". >>> >>> Cory >>> >>> On Tue, Sep 30, 2014 at 5:02 PM, Sebastian Ordas >>> wrote: >>>> Hi Cory, >>>> >>>> I set up an example code, but I could not reproduce the error :-( >>>> The example is attached anyway, in case someone wants to have a look at >>>> it >>>> >>>> I will keep searching the source of the error in my application and will >>>> come back to the list with any finding >>>> >>>> thank you! >>>> sebastian >>>> >>>> >>>> On 29/09/2014 12:32 p.m., Cory Quammen wrote: >>>>> Sebastian, >>>>> >>>>> Could you post a small, working example program that demonstrates the >>>>> problem? >>>>> >>>>> Thank you, >>>>> Cory >>>>> >>>>> On Mon, Sep 29, 2014 at 11:25 AM, Sebastian Ordas >>>>> wrote: >>>>>> Dear List, >>>>>> >>>>>> (I just realized I sent my message to ITK list instead of VTK!) >>>>>> >>>>>> I have started getting the error "No scalar values found for texture >>>>>> input!" >>>>>> coming from vtkOpenGLTexture, while porting my code to VTK6 >>>>>> >>>>>> More precisely, I have a vtkImageData, generated by >>>>>> itkImageToVTKImageFilter, which is mapped through vtkImageResliceMapper >>>>>> >>>>>> I have tried adding the following to itkImageToVTKImageFilter: >>>>>> >>>>>> m_Importer->UpdateInformation(); >>>>>> vtkStreamingDemandDrivenPipeline::SetUpdateExtent( >>>>>> m_Importer->GetOutputInformation(0 /*port number*/), >>>>>> 0 /*piece*/, >>>>>> 2 /*number of pieces*/, >>>>>> 0 /*number of ghost levels*/); >>>>>> m_Importer->Update(); >>>>>> >>>>>> .. but no luck! >>>>>> >>>>>> I have also tried: >>>>>> >>>>>> m_ImageData->GetPointData()->SetActiveAttribute (0, >>>>>> vtkPointData::SCALARS); >>>>>> >>>>>> didn?t work either... >>>>>> >>>>>> Any hint? >>>>>> >>>>>> thank you, >>>>>> sebastian >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers From safna.royal10 at gmail.com Mon Oct 13 07:44:39 2014 From: safna.royal10 at gmail.com (safna) Date: Mon, 13 Oct 2014 04:44:39 -0700 (PDT) Subject: [vtkusers] vtk line In-Reply-To: <1411642778490-5728871.post@n5.nabble.com> References: <1411642778490-5728871.post@n5.nabble.com> Message-ID: <1413200679551-5729129.post@n5.nabble.com> vtkLineWidget may help you,check this example http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/LineWidget2 -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-line-tp5728871p5729129.html Sent from the VTK - Users mailing list archive at Nabble.com. From ilhanozhamur at gmail.com Mon Oct 13 08:31:06 2014 From: ilhanozhamur at gmail.com (=?UTF-8?B?xLBsaGFuIMOWemhhbXVy?=) Date: Mon, 13 Oct 2014 15:31:06 +0300 Subject: [vtkusers] intersection of two actors Message-ID: Hi all, I try to indicate the intersection region of 2 different actors I have used poldydata filter to draw the intersection (intersection is a actor too). But i couldn't make it dynamic. When i move the actors to different positions, intersection actor's initial state remains same. How can i create intersection actor and change it dynamically? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Mon Oct 13 10:16:43 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 13 Oct 2014 10:16:43 -0400 Subject: [vtkusers] Missing update extent request in vtkExtractVOI? In-Reply-To: <543AC335.2040607@student.hpi.uni-potsdam.de> References: <54391E4E.8050907@student.hpi.uni-potsdam.de> <543AC335.2040607@student.hpi.uni-potsdam.de> Message-ID: We completely rewrote vtkExtractVOI a few months ago and it doesn't look like we didn't do a great job in fully evaluating it. I will spend some quality time with it in the next few weeks. Best, -berk On Sun, Oct 12, 2014 at 2:06 PM, Karsten Tausche < karsten.tausche at student.hpi.uni-potsdam.de> wrote: > I just realized that calling SetUpdateExtentToWholeExtent() on a > downstream algorithm (polyData in the example code) "fixes" this error. > > > On 2014-10-11 14:10, Karsten Tausche wrote: > > Hi everyone, > > I tried to use vtkExtractVOI to decrease the resolution of a > vtkImageData/vtkStructuredPoints data set. This works fine when I set the > sample rate before I connect the filter to the pipeline. But changing the > sample rate while rendering always results in an error like this: > > "ERROR: In > ..\..\..\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, line > 857 > vtkCompositeDataPipeline (0000000005D6E1A0): The update extent specified > in the information for output port 0 on algorithm > vtkExtractVOI(0000000005D92710) is 0 10 0 10 0 0, which is outside the > whole extent 0 9 0 10 0 0." > > This behavior also depends on the initial sample rate. With the defaults > (1, 1, 1), the error message pops up after changing the rate, and the > filter seems produce the expected result. When I set different initial > values and increase them while rendering, I get the error message above, > but the filter result seems correct. When decreasing the sample rate, I > don't get an error, but the filter decreases the size of the rendered > image. > > I'm using the current VTK master. I appended a small example the produces > this error; it doesn't render any visible points but I didn't know how to > enforce the required updates without adding the filter to a rendering > pipeline. > > BTW the error also occurs with vtkStructuredGrid+vtkExtractGrid. > > Thanks, > Karsten > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe:http://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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Oct 13 11:14:53 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 13 Oct 2014 11:14:53 -0400 Subject: [vtkusers] intersection of two actors In-Reply-To: References: Message-ID: It sounds like you have three vtkActors, one for two polydata and one for the intersection of the polydata. You don't say how you are moving the actors, but I assume you are calling the SetPosition() method on the actors to move them. If that's the case, it's important to know that this translation only affects the apparent position of the actors, not the positions of the underlying data. Hence, your intersection is not being updated because your polydata objects aren't changing. Instead, you need to change the actual positions of the polydata with a filter such as vtkTransformPolyData. Then the output of vtkTransformPolyData should be set as the input to the intersection filter (I assume you are using vtkIntersectionPolyDataFilter) and the vtkMappers that feed into the actors. Hope that helps, Cory On Mon, Oct 13, 2014 at 8:31 AM, ?lhan ?zhamur wrote: > Hi all, > > I try to indicate the intersection region of 2 different actors I have used > poldydata filter to draw the intersection (intersection is a actor too). But > i couldn't make it dynamic. When i move the actors to different positions, > intersection actor's initial state remains same. How can i create > intersection actor and change it dynamically? > > Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From jamie.wright at nhs.net Mon Oct 13 12:51:57 2014 From: jamie.wright at nhs.net (Wright James (NHS Greater Glasgow & Clyde)) Date: Mon, 13 Oct 2014 17:51:57 +0100 Subject: [vtkusers] Resizing dicom files to same volume Message-ID: <20141013165159.680A744825E@nhs-pd1e-esg103.ad1.nhs.net> VTK'ers I have multiple DICOM datasets with different spacing and dimensions. I am using vtkImagePlaneWidget() to view them I want to resample the datasets so they occupy the same volume in space, to then use e.g. vtkImageBlend to merge the images by opacity. I have tried vtkImageResample and vtkImageReslice (in the documentation for this class it even mentions the method SetInformationInput() as the way to go for matching voxel sampling. However whatever I try still results in the final output having image slices of different scales on the screen. Could anyone guide me as to what pipeline to use with to get the datasets aligned? ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- import vtk def orthoPlane(imageData, orientation, dimension, volPicker, renderer, interactor, lut, opacity, displayText = 1, enabled = 1): ''' a function to take care of rendering an image plane on the scene - we use the vtk provided vtkImagePlaneWidget to handle this ''' ipwx = vtk.vtkImagePlaneWidget() ipwx.SetInput(imageData) ipwx.SetPicker(volPicker) ipwx.GetTexturePlaneProperty().SetOpacity(opacity) ipwx.GetColorMap().SetLookupTable(lut) ipwx.SetCurrentRenderer(renderer) ipwx.SetInteractor(interactor) ipwx.PlaceWidget() if orientation == "sagittal": ipwx.SetPlaneOrientationToXAxes() elif orientation == "coronal": ipwx.SetPlaneOrientationToYAxes() elif orientation == "axial": ipwx.SetPlaneOrientationToZAxes() ipwx.SetSliceIndex(dimension/2) ipwx.SetDisplayText(displayText) ipwx.SetEnabled(enabled) return ipwx def MoveCallback(obj,event): ''' function that forces the two modalities to move together from one user interaction ''' coronalSPECT.SetSlicePosition(coronalCT.GetSlicePosition()) coronalSPECT.UpdatePlacement() ''' the vtk pipeline from here ''' if __name__ == "__main__" : # read the data folder1 = "/home/jamie/VTK/vtkPython/vtk_python/brain_data/CT" reader1 = vtk.vtkDICOMImageReader() reader1.SetDirectoryName(folder1) reader1.Update() W1,H1,D1 = reader1.GetOutput().GetDimensions() a1,b1 = reader1.GetOutput().GetScalarRange() #print "Range of image (Houndsfield units): %d--%d" %(a1,b1) folder2 = "/home/jamie/VTK/vtkPython/vtk_python/brain_data/SPECT" reader2 = vtk.vtkDICOMImageReader() reader2.SetDirectoryName(folder2) #reader2.SetDataSpacing(0.59,0.59,2.5) #reader2.SetDataDimensions(512,512,61) reader2.Update() #### ---- resample SPECT data to CT dimensions here ---- #### #reader2.GetOutput().SetSpacing((0.59,0.59,2.5)) #reader2.GetOutput().SetDimensions((512,512,61)) #reader2.Update() # # resize the data # resize = vtk.vtkImageResize() # resize.SetInputConnection(reader2.GetOuputPort()) # resize.SetResizeMethodToMagnificationFactors() # resize.SetMagnificationFactors(0.5,0.5,1) # resize.InterpolateOn() # resize.Update() # # # reslice the PET data to line up with the CT volume # reslice = vtk.vtkImageReslice() # #reslice.SetInformationInput(reader1.GetOutput()) # reslice.SetInputConnection(reader2.GetOutputPort()) # #reslice.SetOutputDimensionality(2) # reslice.SetInterpolationModeToLinear() # resize the data # magnify = vtk.vtkImageResample() # magnify.SetDimensionality(3) # magnify.SetInput(reader2.GetOutput()) # #magnify.SetAxisOutputSpacing(0,0.59) # #magnify.SetAxisOutputSpacing(1,0.59) # magnify.SetAxisMagnificationFactor(1,2) # magnify.SetAxisMagnificationFactor(0,3) # magnify.SetAxisMagnificationFactor(2,2) # #magnify.SetAxisOutputSpacing(2,2.5) # #magnify.ReleaseDataFlagOff() # magnify.Update() W2,H2,D2 = reader2.GetOutput().GetDimensions() a2,b2 = reader2.GetOutput().GetScalarRange() # create the color transfer functions for the datasets # greyscale table for the CT lutCT = vtk.vtkColorTransferFunction() lutCT.AddRGBPoint(a1 , 0.0, 0.0, 0.0) lutCT.AddRGBPoint(b1 , 1.0, 1.0, 1.0) # basic rgb colortable/lut for the PET data lutPET = vtk.vtkColorTransferFunction() lutPET.AddRGBPoint(a2, 0.0, 0.0, 0.0) lutPET.AddRGBPoint(a2+(b2-a2)/4, 0.0, 0.5, 0.5) lutPET.AddRGBPoint(a2+(b2-a2)/2, 0.0, 1.0, 0.0) lutPET.AddRGBPoint(b2-(b2-a2)/4, 0.5, 0.5, 0.0) lutPET.AddRGBPoint(b2, 1.0, 0.2, 0.0) # renderer and render window ren = vtk.vtkRenderer() ren.SetBackground(.2, .2, .2) renWin = vtk.vtkRenderWindow() renWin.SetSize( 512, 512 ) renWin.AddRenderer( ren ) # render window interactor iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow( renWin ) # interactor style style = vtk.vtkInteractorStyleTrackballCamera() iren.SetInteractorStyle(style) # mouse picker to select info from the data - will be displayed on image picker=vtk.vtkCellPicker() picker.SetTolerance(0.005) # coronal actors - do the same for the other planes coronalCT = orthoPlane(reader1.GetOutput(), "coronal", H1, picker, ren, iren,lutPET, 0.65) coronalSPECT = orthoPlane(reader2.GetOutput(), "coronal", H2, picker, ren, iren,lutPET, 0.25) # create an outline of the dataset outline = vtk.vtkOutlineFilter() outline.SetInput( reader1.GetOutput() ) outlineMapper = vtk.vtkPolyDataMapper() outlineMapper.SetInput( outline.GetOutput() ) outlineActor = vtk.vtkActor() outlineActor.SetMapper( outlineMapper ) # add the outline actor to the scene and render it ren.AddActor( outlineActor ) renWin.Render() # position camera to create a nice starting viewing angle. Note: the order # of operations on the camera is important, i.e. a Roll,Elevation,Flip # gives a different orientation if we change the sequence of operations # i.e do the Roll second camera = ren.GetActiveCamera() camera.Roll(-30) camera.Elevation(110) camera.SetViewUp((0,0,-1)) # add an observer to the event of one of the planes, using a priority 1 so # that it overrides the standard event. We then want to use the event to # update the one that is not being interacted with with the origin, point1 # and point2 coordinates of the moving one. coronalCT.GetInteractor().AddObserver("MouseMoveEvent",MoveCallback,1) # initialize, and start the interactor iren.Initialize() iren.Start() ******************************************************************************************************************** This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere ******************************************************************************************************************** From alok.theanomaly at gmail.com Mon Oct 13 15:12:24 2014 From: alok.theanomaly at gmail.com (Alok) Date: Mon, 13 Oct 2014 15:12:24 -0400 Subject: [vtkusers] Change mouse cursor while hovering on vtkSphereWidget In-Reply-To: References: <1412888586008-5729100.post@n5.nabble.com> Message-ID: Hi, I sub-classed vtkAbstractWidget and created a vtkSphereWidget3. It seems to be working as expected when I use it in this example : http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/SphereWidget2 I think that 'mouse cursor change on hover' feature is a desirable one since it indicates to the user that interaction with a sphere is possible and expected. I would like to know how I can commit this piece of code for review and inclusion into the vtk repository. Thanks On Fri, Oct 10, 2014 at 10:15 AM, Cory Quammen wrote: > Alok, > > What I usually do is copy and paste an existing class and then modify > it appropriately, e.g., renamed the class, change the parent class, > remove unneeded member variables, methods, change the comments for the > class, etc. In your case, I would copy the vtkSphereWidget2 class to a > new class (vtkSphereWidget3?) and copy in the implementation for > SetCursor() in vtkHandleWidget, then be sure to declare this method in > your classes header file. > > - Cory > > On Fri, Oct 10, 2014 at 9:53 AM, Alok wrote: > > Thanks Cory > > I dont have experience with subclassing vtk classes yet. Is there any > other > > class that you can suggest as a reference to look at while going about > this? > > > > > > > > On Thu, Oct 9, 2014 at 5:13 PM, Cory Quammen > > wrote: > >> > >> I think you will have to subclass vtkSphereWidget2 and override the > >> SetCursor() method. The SetCursor() method for vtkHandleWidget is > >> > >> > >> > //------------------------------------------------------------------------- > >> void vtkHandleWidget::SetCursor(int cState) > >> { > >> if ( this->ManagesCursor ) > >> { > >> switch (cState) > >> { > >> case vtkHandleRepresentation::Outside: > >> this->RequestCursorShape(VTK_CURSOR_DEFAULT); > >> break; > >> default: > >> this->RequestCursorShape(VTK_CURSOR_HAND); > >> } > >> } > >> } > >> > >> I imagine you would want the same in your subclass. > >> > >> HTH, > >> Cory > >> > >> On Thu, Oct 9, 2014 at 5:03 PM, junior > wrote: > >> > Hi, > >> > > >> > I want the mouse cursor to change to a 'hand' when the mouse is > hovering > >> > over a vtkSphereWidget. > >> > Is there any out of box solution for this or do I need to subclass? I > >> > tried > >> > using vtkSphereWidget2 and setting ManagesCursorOn() to true but that > >> > did > >> > not help. > >> > > >> > I see that the vtkAngleWidget exhibits the said behavior when mouse > >> > hovers > >> > above one of the three control points which in my understanding are > >> > vtkHandleWidgets. > >> > > >> > Any suggestions?? > >> > Thanks > >> > > >> > > >> > > >> > -- > >> > View this message in context: > >> > > http://vtk.1045678.n5.nabble.com/Change-mouse-cursor-while-hovering-on-vtkSphereWidget-tp5729100.html > >> > 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 > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > > > > > -- > > I live a simple life... in 0s and 1s ! > -- I live a simple life... in 0s and 1s ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Oct 13 15:48:34 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 13 Oct 2014 15:48:34 -0400 Subject: [vtkusers] Change mouse cursor while hovering on vtkSphereWidget In-Reply-To: References: <1412888586008-5729100.post@n5.nabble.com> Message-ID: Alok, This is the standard way for developers to contribute to VTK: On Mon, Oct 13, 2014 at 3:12 PM, Alok wrote: > Hi, > > I sub-classed vtkAbstractWidget and created a vtkSphereWidget3. > It seems to be working as expected when I use it in this example : > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/SphereWidget2 > > I think that 'mouse cursor change on hover' feature is a desirable one since > it indicates to the user that interaction with a sphere is possible and > expected. > > I would like to know how I can commit this piece of code for review and > inclusion into the vtk repository. > > Thanks > > > On Fri, Oct 10, 2014 at 10:15 AM, Cory Quammen > wrote: >> >> Alok, >> >> What I usually do is copy and paste an existing class and then modify >> it appropriately, e.g., renamed the class, change the parent class, >> remove unneeded member variables, methods, change the comments for the >> class, etc. In your case, I would copy the vtkSphereWidget2 class to a >> new class (vtkSphereWidget3?) and copy in the implementation for >> SetCursor() in vtkHandleWidget, then be sure to declare this method in >> your classes header file. >> >> - Cory >> >> On Fri, Oct 10, 2014 at 9:53 AM, Alok wrote: >> > Thanks Cory >> > I dont have experience with subclassing vtk classes yet. Is there any >> > other >> > class that you can suggest as a reference to look at while going about >> > this? >> > >> > >> > >> > On Thu, Oct 9, 2014 at 5:13 PM, Cory Quammen >> > wrote: >> >> >> >> I think you will have to subclass vtkSphereWidget2 and override the >> >> SetCursor() method. The SetCursor() method for vtkHandleWidget is >> >> >> >> >> >> >> >> //------------------------------------------------------------------------- >> >> void vtkHandleWidget::SetCursor(int cState) >> >> { >> >> if ( this->ManagesCursor ) >> >> { >> >> switch (cState) >> >> { >> >> case vtkHandleRepresentation::Outside: >> >> this->RequestCursorShape(VTK_CURSOR_DEFAULT); >> >> break; >> >> default: >> >> this->RequestCursorShape(VTK_CURSOR_HAND); >> >> } >> >> } >> >> } >> >> >> >> I imagine you would want the same in your subclass. >> >> >> >> HTH, >> >> Cory >> >> >> >> On Thu, Oct 9, 2014 at 5:03 PM, junior >> >> wrote: >> >> > Hi, >> >> > >> >> > I want the mouse cursor to change to a 'hand' when the mouse is >> >> > hovering >> >> > over a vtkSphereWidget. >> >> > Is there any out of box solution for this or do I need to subclass? I >> >> > tried >> >> > using vtkSphereWidget2 and setting ManagesCursorOn() to true but that >> >> > did >> >> > not help. >> >> > >> >> > I see that the vtkAngleWidget exhibits the said behavior when mouse >> >> > hovers >> >> > above one of the three control points which in my understanding are >> >> > vtkHandleWidgets. >> >> > >> >> > Any suggestions?? >> >> > Thanks >> >> > >> >> > >> >> > >> >> > -- >> >> > View this message in context: >> >> > >> >> > http://vtk.1045678.n5.nabble.com/Change-mouse-cursor-while-hovering-on-vtkSphereWidget-tp5729100.html >> >> > 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 >> >> > >> >> > Follow this link to subscribe/unsubscribe: >> >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> > >> > >> > >> > -- >> > I live a simple life... in 0s and 1s ! > > > > > -- > I live a simple life... in 0s and 1s ! From cory.quammen at kitware.com Mon Oct 13 15:49:36 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 13 Oct 2014 15:49:36 -0400 Subject: [vtkusers] Change mouse cursor while hovering on vtkSphereWidget In-Reply-To: References: <1412888586008-5729100.post@n5.nabble.com> Message-ID: (previous message sent too early on accident) Alok, This is the standard way for developers to contribute to VTK: http://www.vtk.org/Wiki/VTK/Git/Develop Please let us know if any of these instructions need clarification. Thanks, Cory On Mon, Oct 13, 2014 at 3:48 PM, Cory Quammen wrote: > Alok, > > This is the standard way for developers to contribute to VTK: > > > On Mon, Oct 13, 2014 at 3:12 PM, Alok wrote: >> Hi, >> >> I sub-classed vtkAbstractWidget and created a vtkSphereWidget3. >> It seems to be working as expected when I use it in this example : >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/SphereWidget2 >> >> I think that 'mouse cursor change on hover' feature is a desirable one since >> it indicates to the user that interaction with a sphere is possible and >> expected. >> >> I would like to know how I can commit this piece of code for review and >> inclusion into the vtk repository. >> >> Thanks >> >> >> On Fri, Oct 10, 2014 at 10:15 AM, Cory Quammen >> wrote: >>> >>> Alok, >>> >>> What I usually do is copy and paste an existing class and then modify >>> it appropriately, e.g., renamed the class, change the parent class, >>> remove unneeded member variables, methods, change the comments for the >>> class, etc. In your case, I would copy the vtkSphereWidget2 class to a >>> new class (vtkSphereWidget3?) and copy in the implementation for >>> SetCursor() in vtkHandleWidget, then be sure to declare this method in >>> your classes header file. >>> >>> - Cory >>> >>> On Fri, Oct 10, 2014 at 9:53 AM, Alok wrote: >>> > Thanks Cory >>> > I dont have experience with subclassing vtk classes yet. Is there any >>> > other >>> > class that you can suggest as a reference to look at while going about >>> > this? >>> > >>> > >>> > >>> > On Thu, Oct 9, 2014 at 5:13 PM, Cory Quammen >>> > wrote: >>> >> >>> >> I think you will have to subclass vtkSphereWidget2 and override the >>> >> SetCursor() method. The SetCursor() method for vtkHandleWidget is >>> >> >>> >> >>> >> >>> >> //------------------------------------------------------------------------- >>> >> void vtkHandleWidget::SetCursor(int cState) >>> >> { >>> >> if ( this->ManagesCursor ) >>> >> { >>> >> switch (cState) >>> >> { >>> >> case vtkHandleRepresentation::Outside: >>> >> this->RequestCursorShape(VTK_CURSOR_DEFAULT); >>> >> break; >>> >> default: >>> >> this->RequestCursorShape(VTK_CURSOR_HAND); >>> >> } >>> >> } >>> >> } >>> >> >>> >> I imagine you would want the same in your subclass. >>> >> >>> >> HTH, >>> >> Cory >>> >> >>> >> On Thu, Oct 9, 2014 at 5:03 PM, junior >>> >> wrote: >>> >> > Hi, >>> >> > >>> >> > I want the mouse cursor to change to a 'hand' when the mouse is >>> >> > hovering >>> >> > over a vtkSphereWidget. >>> >> > Is there any out of box solution for this or do I need to subclass? I >>> >> > tried >>> >> > using vtkSphereWidget2 and setting ManagesCursorOn() to true but that >>> >> > did >>> >> > not help. >>> >> > >>> >> > I see that the vtkAngleWidget exhibits the said behavior when mouse >>> >> > hovers >>> >> > above one of the three control points which in my understanding are >>> >> > vtkHandleWidgets. >>> >> > >>> >> > Any suggestions?? >>> >> > Thanks >>> >> > >>> >> > >>> >> > >>> >> > -- >>> >> > View this message in context: >>> >> > >>> >> > http://vtk.1045678.n5.nabble.com/Change-mouse-cursor-while-hovering-on-vtkSphereWidget-tp5729100.html >>> >> > 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 >>> >> > >>> >> > Follow this link to subscribe/unsubscribe: >>> >> > http://public.kitware.com/mailman/listinfo/vtkusers >>> > >>> > >>> > >>> > >>> > -- >>> > I live a simple life... in 0s and 1s ! >> >> >> >> >> -- >> I live a simple life... in 0s and 1s ! From david.gobbi at gmail.com Mon Oct 13 18:19:43 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 13 Oct 2014 16:19:43 -0600 Subject: [vtkusers] Resizing dicom files to same volume In-Reply-To: <20141013165159.680A744825E@nhs-pd1e-esg103.ad1.nhs.net> References: <20141013165159.680A744825E@nhs-pd1e-esg103.ad1.nhs.net> Message-ID: Hi Jamie, Have you verified that the image data produced by the reader has the correct spacing, i.e. the same spacing as specified in the DICOM metadata for your files? You should definitely verify that the reader is producing accurate data before investigating the rest of the pipeline. As long as the spacing is correct, VTK should at least be able to display the images with the correct relative scale. The vtkImageResize and vtkImageResample filters do not change the physical size of the images, they just change the spacing between the data samples. If the image was 150mm across before resampling, it will still be 150mm across after resampling. The way to change the physical size of an image (and to perform alignment) is to provide a ResliceTransform for vtkImageReslice. Note that when I say "physical size" I mean size in mm, not size in voxels. - David On Mon, Oct 13, 2014 at 10:51 AM, Wright James (NHS Greater Glasgow & Clyde) wrote: > VTK'ers > > I have multiple DICOM datasets with different spacing and dimensions. I am using vtkImagePlaneWidget() to view them > > I want to resample the datasets so they occupy the same volume in space, to then use e.g. vtkImageBlend to merge the images by opacity. I have tried vtkImageResample and vtkImageReslice (in the documentation for this class it even mentions the method SetInformationInput() as the way to go for matching voxel sampling. However whatever I try still results in the final output having image slices of different scales on the screen. Could anyone guide me as to what pipeline to use with to get the datasets aligned? From dominik at itis.ethz.ch Tue Oct 14 02:54:26 2014 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Tue, 14 Oct 2014 08:54:26 +0200 Subject: [vtkusers] Construct UnstructuredGrid from numpy connectivity array In-Reply-To: References: Message-ID: Hi, I am still unable to resolve this issue. Is anyone able to help? Thanks Dominik 2014-06-07 13:29 GMT+02:00 Dominik Szczerba : > I read my point and cell datasets as numpy arrays: > > points = numpy.array(file1["/Points"]) > cells = numpy.array(file1["/Cells"]) #, dtype=numpy.int32) > cellTypes = numpy.array(file1["/CellTypes"]) > > Without any problems I can set the points: > > grid = vtk.vtkUnstructuredGrid() > vpoints = vtk.vtkPoints() > vpoints.SetData(numpy_support.numpy_to_vtk(points)) > grid.SetPoints(vpoints) > > but not cells: > > grid.GetCells().SetCells(NC, numpy_support.numpy_to_vtk(cells)) > > > I get the error: > > TypeError: SetCells argument 2: method requires a vtkIdTypeArray, a > vtkLongArray was provided > > I tried to cast/convert it, but had no luck. Is there a way to do it? Please > help. > > Regards, > Dominik From inglis.dl at gmail.com Tue Oct 14 09:43:52 2014 From: inglis.dl at gmail.com (DL I) Date: Tue, 14 Oct 2014 09:43:52 -0400 Subject: [vtkusers] QVTKWidget and Interacting with Image In-Reply-To: <4FF6C7E8-0F23-45FF-8F56-6FBEF4A04AD8@gmail.com> References: <4FF6C7E8-0F23-45FF-8F56-6FBEF4A04AD8@gmail.com> Message-ID: Hi Nick, can you post some of your source code showing how you set up the QVTKWidget with the vtkImageViewer2, if you use that class? Have a look at the documentation for vtkImageViewer2 as well as the source code. I expect you may not be initializing the viewer's render window correctly. Dean On Sat, Oct 11, 2014 at 1:39 PM, Nick Patterson wrote: > VTK Users, > > I would like to take the example for visualising a DICOM series in VTK (http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOMSeries) as outlined in the example I have linked to, but I want to render this within a QVTKWidget. > > I have quite happily rendered the DICOM series in a QVTKWidget and can scroll through the image slices using something like a QSlider widget. But I simply cannot determine a way to interact with the image in the same way as the example shows, effectively being able to scroll through the images use the mouse wheel. > > There seems to be a lack of documentation of how to interact with the rendered window with a QVTKWidget and I hoped that someone with experience of this can advise on how I can interact with the image (as per the example I linked to above) but when it is rendered within the QT widget. > > > Regards, Nick. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From inglis.dl at gmail.com Tue Oct 14 10:25:21 2014 From: inglis.dl at gmail.com (DL I) Date: Tue, 14 Oct 2014 10:25:21 -0400 Subject: [vtkusers] QVTKWidget and Interacting with Image In-Reply-To: <8F767D41-12F6-4AB1-BD04-EDBCA46E5AEA@gmail.com> References: <4FF6C7E8-0F23-45FF-8F56-6FBEF4A04AD8@gmail.com> <8F767D41-12F6-4AB1-BD04-EDBCA46E5AEA@gmail.com> Message-ID: Hi Nick, I would set up the rendering environment first before setting any data inputs: in TestInterface.cpp, get the vtkRenderWindow from your QVTKWidget, and get its vtkRenderWindowInteractor: vtkRenderWindow* renwin = ui->vtkWidget->GetRenderWindow() //get the windows interactor: vtkRenderWindowInteractor* iact = renwin->GetInteractor(); //set your custom interactor style iact->SetInteractorStyle(myInteractorStyle); // init the image viewer: imageViewer->SetRenderWindow(renwin); imageViewer->SetupInteractor(iact); then set up all your other mappers and actors and finally, imageViewer->SetInputConnection(reader->GetOutputPort()); let me 9and vtkusers cc'd) know if that worked regards, Dean On Tue, Oct 14, 2014 at 9:48 AM, Nick Patterson wrote: > Dear Dean, > > Thanks for getting in touch. I have some contact from another member of the user group, but have heard nothing since. I had made an example project in Qt which I shared, and have attached for you to look at. I effectively am trying to interact with the QVTKWidget (to scroll through the DICOM images as an example) in the same way as you can in the example shown at the web link I provided. > > If you think you can explain how to do this, I would greatly appreciate any input. I have attached some test code to this message. > > Regards, Nick. > > > > > On 14 Oct 2014, at 14:43, DL I wrote: > >> Hi Nick, >> >> can you post some of your source code showing how you set up the QVTKWidget with >> the vtkImageViewer2, if you use that class? Have a look at the >> documentation for vtkImageViewer2 as >> well as the source code. I expect you may not be initializing the >> viewer's render window correctly. >> >> Dean >> >> On Sat, Oct 11, 2014 at 1:39 PM, Nick Patterson wrote: >>> VTK Users, >>> >>> I would like to take the example for visualising a DICOM series in VTK (http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOMSeries) as outlined in the example I have linked to, but I want to render this within a QVTKWidget. >>> >>> I have quite happily rendered the DICOM series in a QVTKWidget and can scroll through the image slices using something like a QSlider widget. But I simply cannot determine a way to interact with the image in the same way as the example shows, effectively being able to scroll through the images use the mouse wheel. >>> >>> There seems to be a lack of documentation of how to interact with the rendered window with a QVTKWidget and I hoped that someone with experience of this can advise on how I can interact with the image (as per the example I linked to above) but when it is rendered within the QT widget. >>> >>> >>> Regards, Nick. >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers > > From jamie.wright at nhs.net Tue Oct 14 10:58:03 2014 From: jamie.wright at nhs.net (Wright James (NHS Greater Glasgow & Clyde)) Date: Tue, 14 Oct 2014 15:58:03 +0100 Subject: [vtkusers] Resizing dicom files to same volume In-Reply-To: <20141013222005.9688D4484C9@nhs-pd1e-esg008.ad1.nhs.net> References: <20141013165159.680A744825E@nhs-pd1e-esg103.ad1.nhs.net>, <20141013222005.9688D4484C9@nhs-pd1e-esg008.ad1.nhs.net> Message-ID: <20141014145803.D34AF448016@nhs-pd1e-esg106.ad1.nhs.net> Hi David, Thanks for your insight. Yes without applying a reslice transform all I was managing to do with vtkImageReslice was pad the bounding box with zeros or chop off part of the data when I was attempting to align the datasets. So I have to apply SetResliceTransform() to vtkImageReslice passing in a vtkAbstractTransform to go from one coordinate space to the other. I will only require a linear transform as there shouldn't be any deformation between them. I have the origin of both datasets (0,0,0), the spacing of the voxels in each dataset and the dimensions of the images. Could you tell me what kind of transform I should be applying to shrink one dataset (or expand the other) so they match? Or a reference to documentation would be helpful thanks Jamie Wright ________________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: 13 October 2014 23:19 To: Wright James (NHS Greater Glasgow & Clyde) Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Resizing dicom files to same volume Hi Jamie, Have you verified that the image data produced by the reader has the correct spacing, i.e. the same spacing as specified in the DICOM metadata for your files? You should definitely verify that the reader is producing accurate data before investigating the rest of the pipeline. As long as the spacing is correct, VTK should at least be able to display the images with the correct relative scale. The vtkImageResize and vtkImageResample filters do not change the physical size of the images, they just change the spacing between the data samples. If the image was 150mm across before resampling, it will still be 150mm across after resampling. The way to change the physical size of an image (and to perform alignment) is to provide a ResliceTransform for vtkImageReslice. Note that when I say "physical size" I mean size in mm, not size in voxels. - David On Mon, Oct 13, 2014 at 10:51 AM, Wright James (NHS Greater Glasgow & Clyde) wrote: > VTK'ers > > I have multiple DICOM datasets with different spacing and dimensions. I am using vtkImagePlaneWidget() to view them > > I want to resample the datasets so they occupy the same volume in space, to then use e.g. vtkImageBlend to merge the images by opacity. I have tried vtkImageResample and vtkImageReslice (in the documentation for this class it even mentions the method SetInformationInput() as the way to go for matching voxel sampling. However whatever I try still results in the final output having image slices of different scales on the screen. Could anyone guide me as to what pipeline to use with to get the datasets aligned? ******************************************************************************************************************** This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere ******************************************************************************************************************** From cjayjones at gmail.com Tue Oct 14 19:11:25 2014 From: cjayjones at gmail.com (Cory Jones) Date: Tue, 14 Oct 2014 17:11:25 -0600 Subject: [vtkusers] Volume Rendering Message-ID: I am using vtkSmartVolumeMapper to render a volume and it is only rendering a portion of the volume when the volume is not moving. When I click to rotate the volume, the entire area of interest becomes visible, but as soon as I stop the rotation, the majority of the volume disappears. Has anyone encountered an issue like this before? Previously I was getting an error about using more than one thread causing inconsistent rendering from vtkFixedPointVolumeRayCastMapper but have since forced it to use only one thread and the problem persists. My rendering code is below. vtkSmartPointer aRenderer = vtkSmartPointer::New(); vtkSmartPointer renWin = vtkSmartPointer::New(); renWin->AddRenderer(aRenderer); vtkSmartPointer iren = vtkSmartPointer::New(); iren->SetRenderWindow(renWin); vtkSmartPointer testImage; testImage = mrc.GetRegionImageDesc(); vtkSmartPointer volumeMapper = vtkSmartPointer::New(); volumeMapper->SetBlendModeToComposite(); // composite first volumeMapper->SetInputData(testImage); vtkSmartPointer volumeProperty = vtkSmartPointer::New(); volumeProperty->ShadeOff(); volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); volumeProperty->IndependentComponentsOff(); vtkSmartPointer compositeOpacity = vtkSmartPointer::New(); compositeOpacity->AddPoint(0,0.5); compositeOpacity->AddPoint(254.0,0.5); compositeOpacity->AddPoint(255.0,0.0); volumeProperty->SetScalarOpacity(compositeOpacity); vtkSmartPointer volume = vtkSmartPointer::New(); volume->SetMapper(volumeMapper); volume->SetProperty(volumeProperty); vtkSmartPointer cam3D; cam3D = vtkSmartPointer::New(); cam3D->SetViewUp (0, 0, -1); cam3D->SetPosition (0, 0, 1); cam3D->SetFocalPoint (0, 0, 0); cam3D->ComputeViewPlaneNormal(); cam3D->Azimuth(30.0); cam3D->Elevation(30.0); cam3D->ParallelProjectionOn(); aRenderer->AddViewProp(volume); aRenderer->SetActiveCamera(cam3D); aRenderer->ResetCamera (); aRenderer->SetBackground(1,1,1); aRenderer->TwoSidedLightingOn(); renWin->Render(); iren->Initialize(); iren->Start(); -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.sambin at gmail.com Wed Oct 15 05:04:59 2014 From: m.sambin at gmail.com (Marco Sambin) Date: Wed, 15 Oct 2014 11:04:59 +0200 Subject: [vtkusers] How to prevent out-of-memory crash with vtkImageReader from Java Message-ID: Hi all. In my VTK-based Java application, I am reading a "raw volume file" (containing a set of CT slices) through some Java code looking like this: [...] vtkImageReader imageReaderVTK = new vtkImageReader(); imageReaderVTK.FileLowerLeftOn(); imageReaderVTK.SetFileDimensionality(3); imageReaderVTK.SetFileName(curRawVolFile.getAbsolutePath()); imageReaderVTK.SetDataExtent(0, sliceCols - 1, 0, sliceRows - 1, 0, numOfUsedImages - 1); imageReaderVTK.SetDataSpacing(xSpacing, ySpacing, zSpacing); imageReaderVTK.SetDataOrigin(0.0, 0.0, 0.0); imageReaderVTK.SetDataScalarTypeToUnsignedShort(); imageReaderVTK.SetDataByteOrderToBigEndian(); // The following call may cause a process crash due to out-of-memory imageReaderVTK.UpdateWholeExtent(); [...] I am then passing this volume to a vtkImagePlaneWidget for some reslicing. As the last comment (in the code fragment above) suggests, in some cases I get a crash of the JVM process, due to the fact the reader goes out of memory while actually reading and allocating the whole volume in memory. This especially happens when using a 32-bit JRE. I understand that I cannot read a huge volume in memory if just a small amount of memory is available to the process, but my question is: is there a way to manage "more gracefully" this out-of-memory from Java code, in such a way to be able to inform the user that "Not enough memory is available to read this volume", instead of causing a JVM crash? I am using VTK 6.1.0. Thanks for any hint/suggestion about this topic. Best regards, Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From tanstry at gmail.com Wed Oct 15 08:38:32 2014 From: tanstry at gmail.com (Trystan Louboutin) Date: Wed, 15 Oct 2014 14:38:32 +0200 Subject: [vtkusers] Rendering problem using Qt5 In-Reply-To: <1406712879.52468.YahooMailNeo@web171506.mail.ir2.yahoo.com> References: <1406712879.52468.YahooMailNeo@web171506.mail.ir2.yahoo.com> Message-ID: Hi, I am facing the same problem on Linux + Intel graphics card, it apparently works with nvidia graphics cards I tried on Windows and Mac OS: it works fine. A simple example using only a VTK scene: rendering is fine. Same example using QVTKWidget failed. Any idea ? Thanks. 2014-07-30 11:34 GMT+02:00 Malsoaz James : > Same problem here. > > I'm using Qt 5.3.0 with VTK 6.1.0. > I have a problem with the depth (zbuffer) on my QVTKWidget. The problem > appears only on Linux with specific graphical cards (ati or intel chipsets). > > Is there a solution to this problem ? > > Best. > > > Le Mercredi 16 avril 2014 19h12, Luca Tersi a > ?crit : > > > Hi all, > I've managed to compile VTK and my project against Qt5, unfortunately on > my Linux environment I get a weird rendering problem when using QVTKWidget. > It seems that it cannot understand properly the order of the actors > (zbuffer?) displaying sometimes also the actors backfaces. > If I use a regular vtk rendering pipeline, I'm not getting any trouble. > I compiled it also on a Mac and it is working correctly. > Do you have any hint on how to solve the issue? > Thanks a lot > Luca > > --- > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Oct 15 10:30:04 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 15 Oct 2014 08:30:04 -0600 Subject: [vtkusers] How to prevent out-of-memory crash with vtkImageReader from Java In-Reply-To: References: Message-ID: Hi Marco, I don't have the answer but if there is no solution as today, maybe adding another method on the reader that could first validate that enough memory is available, might be an option. Specially in Java when such call make the JVM crash. That change will need to happen on the C++ side. But at that point I'm not sure how to check that on the C++ side either. Maybe Berk, Dave or Brad might have some insight. Thanks, Seb On Wed, Oct 15, 2014 at 3:04 AM, Marco Sambin wrote: > Hi all. > In my VTK-based Java application, I am reading a "raw volume file" > (containing a set of CT slices) through some Java code looking like this: > > [...] > vtkImageReader imageReaderVTK = new vtkImageReader(); > imageReaderVTK.FileLowerLeftOn(); > imageReaderVTK.SetFileDimensionality(3); > imageReaderVTK.SetFileName(curRawVolFile.getAbsolutePath()); > imageReaderVTK.SetDataExtent(0, sliceCols - 1, > 0, sliceRows - 1, > 0, numOfUsedImages - 1); > imageReaderVTK.SetDataSpacing(xSpacing, ySpacing, zSpacing); > imageReaderVTK.SetDataOrigin(0.0, 0.0, 0.0); > imageReaderVTK.SetDataScalarTypeToUnsignedShort(); > imageReaderVTK.SetDataByteOrderToBigEndian(); > > // The following call may cause a process crash due to out-of-memory > imageReaderVTK.UpdateWholeExtent(); > [...] > > I am then passing this volume to a vtkImagePlaneWidget for some reslicing. > > As the last comment (in the code fragment above) suggests, in some cases I > get a crash of the JVM process, due to the fact the reader goes out of > memory while actually reading and allocating the whole volume in memory. > This especially happens when using a 32-bit JRE. > I understand that I cannot read a huge volume in memory if just a small > amount of memory is available to the process, but my question is: > is there a way to manage "more gracefully" this out-of-memory from Java > code, in such a way to be able to inform the user that "Not enough memory > is available to read this volume", instead of causing a JVM crash? > > I am using VTK 6.1.0. > > Thanks for any hint/suggestion about this topic. > > Best regards, > > Marco > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From isimtic at gmail.com Wed Oct 15 22:40:06 2014 From: isimtic at gmail.com (=?UTF-8?B?QWhtZXQgRG/En2Fu?=) Date: Thu, 16 Oct 2014 05:40:06 +0300 Subject: [vtkusers] 1D texture Message-ID: <543F3006.9090105@gmail.com> Is there any way to load my own 1d small texture(rgba in an array like unsigned char bug[16*4] ) in vtk? If you answer me, I will be more than happy to solve this nasty problem :). Kind Regards From scbiradar at gmail.com Thu Oct 16 03:01:05 2014 From: scbiradar at gmail.com (santosh) Date: Thu, 16 Oct 2014 00:01:05 -0700 (PDT) Subject: [vtkusers] How to use vtkBooleanOperationPolyDataFilter correctly In-Reply-To: References: <1411464425998-5728839.post@n5.nabble.com> <1412774592086-5729039.post@n5.nabble.com> Message-ID: <1413442865146-5729161.post@n5.nabble.com> Hi Cory, I tried by matching the cylinder end cap tessellation with the cylinder body tessellation. I have got rid of some of the big triangles which were missing. Still, I have few holes at the intersection of the two surfaces. I have attached the input files and images showing the behavior. input_1.stl input_2.stl output.stl union.png union_holes.png Thanks, Santosh -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkBooleanOperationPolyDataFilter-correctly-tp5728839p5729161.html Sent from the VTK - Users mailing list archive at Nabble.com. From ilhanozhamur at gmail.com Thu Oct 16 04:01:21 2014 From: ilhanozhamur at gmail.com (=?UTF-8?B?xLBsaGFuIMOWemhhbXVy?=) Date: Thu, 16 Oct 2014 11:01:21 +0300 Subject: [vtkusers] intersection of two actors In-Reply-To: References: Message-ID: Hi again, > It sounds like you have three vtkActors, one for two polydata and one > for the intersection of the polydata. Yes you are right. We have three vtkActors, two Spheres and one for intersection of Spheres. > You don't say how you are moving > the actors, but I assume you are calling the SetPosition() method on > the actors to move them. We move actors with using keyboard interaction. We use TrackballActor. > If that's the case, it's important to know > that this translation only affects the apparent position of the > actors, not the positions of the underlying data. Hence, your > intersection is not being updated because your polydata objects aren't > changing. In this case, does translation only affects apparent postion of the actors? > Instead, you need to change the actual positions of the polydata with > a filter such as vtkTransformPolyData. Then the output of > vtkTransformPolyData should be set as the input to the intersection > filter (I assume you are using vtkIntersectionPolyDataFilter) and the > vtkMappers that feed into the actors. So how can we use vtkTransformPolyData and keyboard interactions together? > Hope that helps, > Cory Thank you for your help. 2014-10-13 18:14 GMT+03:00 Cory Quammen : > It sounds like you have three vtkActors, one for two polydata and one > for the intersection of the polydata. You don't say how you are moving > the actors, but I assume you are calling the SetPosition() method on > the actors to move them. If that's the case, it's important to know > that this translation only affects the apparent position of the > actors, not the positions of the underlying data. Hence, your > intersection is not being updated because your polydata objects aren't > changing. > > Instead, you need to change the actual positions of the polydata with > a filter such as vtkTransformPolyData. Then the output of > vtkTransformPolyData should be set as the input to the intersection > filter (I assume you are using vtkIntersectionPolyDataFilter) and the > vtkMappers that feed into the actors. > > Hope that helps, > Cory > > > On Mon, Oct 13, 2014 at 8:31 AM, ?lhan ?zhamur > wrote: > > Hi all, > > > > I try to indicate the intersection region of 2 different actors I have > used > > poldydata filter to draw the intersection (intersection is a actor too). > But > > i couldn't make it dynamic. When i move the actors to different > positions, > > intersection actor's initial state remains same. How can i create > > intersection actor and change it dynamically? > > > > Thank you. > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeinsalah at gmail.com Thu Oct 16 06:18:29 2014 From: zeinsalah at gmail.com (Zein Salah) Date: Thu, 16 Oct 2014 12:18:29 +0200 Subject: [vtkusers] vtk image iterator Message-ID: Hi, I have an understanding problem, I think I am missing something. what is a span iterator within the vtk image iterator? what is it needed for? I need to only iterate over an extent in the image and access data values within it. How should I move the iterator to the next position? how to access the underlying data? thx -------------- next part -------------- An HTML attachment was scrubbed... URL: From josp.jorge at gmail.com Thu Oct 16 10:31:27 2014 From: josp.jorge at gmail.com (Jorge Perez) Date: Thu, 16 Oct 2014 16:31:27 +0200 Subject: [vtkusers] vtk image iterator In-Reply-To: References: Message-ID: Hi Zein, attached is the example I have modified (there are some errors in the wiki example). In TestImageInterpolator.cxx you can see that there are 2 loops one for spans and the inner along the span. If you execute the example you should obtain the following output. In this sample image there two slices with size 4x3. val: 0 0 0 0 val: 0 0 0 0 val: 0 0 0 0 val: 1 1 1 1 val: 1 1 1 1 val: 1 1 1 1 best regards, Jorge 2014-10-16 13:07 GMT+02:00 Zein Salah : > well Jorge, > > this is actually what I am trying to understand. > > it seems the example works for 2d images. since I am using a similar code > and it does not iterate in the third dimension, > > are spans meat to be slices? > > On Thu, Oct 16, 2014 at 12:23 PM, Jorge Perez > wrote: > >> Hi, you can see how it is used in this example >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/ImageData/vtkImageIterator >> >> regards, >> >> Jorge >> >> 2014-10-16 12:18 GMT+02:00 Zein Salah : >> >>> Hi, >>> >>> I have an understanding problem, I think I am missing something. >>> what is a span iterator within the vtk image iterator? what is it needed >>> for? >>> I need to only iterate over an extent in the image and access data values >>> within it. How should I move the iterator to the next position? how to >>> access >>> the underlying data? >>> >>> thx >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include #include #include int main(int, char *[]) { // Create an image data vtkSmartPointer imageData = vtkSmartPointer::New(); // Specify the size of the image data imageData->SetDimensions(4,3,2); #if VTK_MAJOR_VERSION <= 5 imageData->SetNumberOfScalarComponents(1); imageData->SetScalarTypeToDouble(); #else imageData->AllocateScalars(VTK_DOUBLE,1); #endif // Fill every entry of the image data with "2.0" int* dims = imageData->GetDimensions(); for (int z=0; zSetScalarComponentFromDouble(x,y,z,0,double(z)); } } } int extent[6]; imageData->GetExtent(extent); // Retrieve the entries from the image data and print them to the screen vtkImageIterator it(imageData, extent); for(double* val = it.BeginSpan(); !it.IsAtEnd(); it.NextSpan()) { std::cout << "val:"; for(; val != it.EndSpan(); ++val) { std::cout << " " << *val; } std::cout << std::endl; } return EXIT_SUCCESS; } From aashish.chaudhary at kitware.com Thu Oct 16 12:31:37 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 16 Oct 2014 12:31:37 -0400 Subject: [vtkusers] Overhaul of the rendering subsystem in VTK: Volume Rendering update In-Reply-To: References: Message-ID: Friends, As referred earlier, we are continuously working on improving the volume rendering. As part of next set of delivery, we are going to bring our first OpenGL2 volume mapper to the OpenGL2 backend. We have a branch that will get merged today and* it should only affect the dashboards and code base switched to OpenGL2 backend*. We will continue to improve the integration and will use and improve the existing OpenGL2 backend code as necessary. If you have any questions of concerns or if you find in any ways its affecting your regular builds that uses OpenGL(default, and not OpenGL2) backend then let us know as soon as possible. Thanks, On Fri, Oct 10, 2014 at 9:53 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Friends, > > > As reported back in July, we are in the process of a major overhaul of the > rendering subsystem in VTK. The July article ( > http://www.kitware.com/source/home/post/144) focused primarily on our > efforts to move to OpenGL 2.1+ to support faster polygonal rendering. The > October Source will contain an article focused on our rewrite of the > vtkGPURayCastMapper class to provide a faster, more portable and more > easily extensible volume mapper for regular rectilinear grids. > > > > VTK has a long history of volume rendering, and unfortunately that history > is evident in the large selection of classes available to render volumes. > Each of these methods was state-of-the-art at the time, but given VTK?s 20+ > year history many of these methods are now quite obsolete. One goal of this > effort is to reduce the number of volume mappers to ideally just two - one > that supports accelerated rendering on graphics hardware and another that > works in parallel on the CPU. In addition, the vtkSmartVolumeMapper would > help application developers by automatically choosing between these > techniques based on system performance. > > > > In this first phase, we have created a replacement for > vtkGPURayCastMapper. Currently, this is available for testing from the VTK > git repository (in master branch, disabled by default). General > instructions on how to build VTK from the source is available at this URL: > http://www.vtk.org/Wiki/VTK/Git*. *In order to build the new mapper, > enable the Module_vtkRenderingVolumeOpenGLNew module in cmake (via -D > *Module_vtkRenderingVolumeOpenGL=ON*), in ccmake or cmake-gui. Once > built, it can be used via vtkSmartVolumeMapper or used directly. Once > sufficient testing by the community has been performed, this class will > replace the old vtkGPURayCastMapper. In addition, we are adding this new > mapper to the OpenGL2 module. Availability of the new mapper with OpenGL2 > module will improve the management of textures in the mapper and eventually > benefitting both forms of rendering (geometry and volume) by sharing common > code between them. > > > Please contact us if you have any questions or encounter any issues. > > > Thanks, > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Oct 16 12:48:26 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 16 Oct 2014 12:48:26 -0400 Subject: [vtkusers] vtk image iterator In-Reply-To: References: Message-ID: I have fixed the bad image iterator example on the wiki. You can find it here: http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/ImageIterator Bill On Thu, Oct 16, 2014 at 10:31 AM, Jorge Perez wrote: > Hi Zein, attached is the example I have modified (there are some errors in > the wiki example). In TestImageInterpolator.cxx you can see that there are 2 > loops one for spans and the inner along the span. If you execute the example > you should obtain the following output. In this sample image there two > slices with size 4x3. > > val: 0 0 0 0 > val: 0 0 0 0 > val: 0 0 0 0 > val: 1 1 1 1 > val: 1 1 1 1 > val: 1 1 1 1 > > best regards, > > > Jorge > > > 2014-10-16 13:07 GMT+02:00 Zein Salah : >> >> well Jorge, >> >> this is actually what I am trying to understand. >> >> it seems the example works for 2d images. since I am using a similar code >> and it does not iterate in the third dimension, >> >> are spans meat to be slices? >> >> On Thu, Oct 16, 2014 at 12:23 PM, Jorge Perez >> wrote: >>> >>> Hi, you can see how it is used in this example >>> >>> >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/ImageData/vtkImageIterator >>> >>> regards, >>> >>> Jorge >>> >>> 2014-10-16 12:18 GMT+02:00 Zein Salah : >>>> >>>> Hi, >>>> >>>> I have an understanding problem, I think I am missing something. >>>> what is a span iterator within the vtk image iterator? what is it needed >>>> for? >>>> I need to only iterate over an extent in the image and access data >>>> values >>>> within it. How should I move the iterator to the next position? how to >>>> access >>>> the underlying data? >>>> >>>> thx >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From arekfu at yahoo.it Fri Oct 17 10:14:35 2014 From: arekfu at yahoo.it (Davide Mancusi) Date: Fri, 17 Oct 2014 16:14:35 +0200 Subject: [vtkusers] using vtkPlaybackWidget in Python code Message-ID: Hello, I have written a Python application that relies on VTK to do some scientific visualization. I would like to use the vtkPlaybackWidget but I have the impression that the Python binding is useless. I am supposed to override the virtual methods in the vtkPlaybackRepresentation base class, but the Python bindings do not allow that. I thought to add an observer that reacts to the "EndInteractionEvent" when the widget is clicked, but I cannot figure out how to extract the coordinates of the clicked point. Can anyone please help me? Cheers, Davide From chasank at gmail.com Sat Oct 18 14:34:46 2014 From: chasank at gmail.com (chasank) Date: Sat, 18 Oct 2014 11:34:46 -0700 (PDT) Subject: [vtkusers] intersection of two actors In-Reply-To: References: Message-ID: <1413657286757-5729171.post@n5.nabble.com> Hi Ilhan, First of all, you should write a class that inherits the TrackballActor class. Then you should override the Execute() function to have a full control of your interaction. With this kind of implementation you should assign another key(s) for example move actors left, up, right or left. Do the necessary calculation of your actors ( with calculating their world / display coordinates to extract the intersection of spheres ) and finally update / set your actors position and do not forget to call the Render() function of your vtkRenderWindow instance. -- View this message in context: http://vtk.1045678.n5.nabble.com/intersection-of-two-actors-tp5729131p5729171.html Sent from the VTK - Users mailing list archive at Nabble.com. From g.bogle at auckland.ac.nz Sat Oct 18 22:18:40 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 19 Oct 2014 02:18:40 +0000 Subject: [vtkusers] Polygon colouring Message-ID: I'm rendering a shape using vtkPolyData, i.e. as a collection of polygons. Is there a way to colour each polygon separately? polygonPolyData = vtkSmartPointer::New(); polygonPolyData->SetPoints(points); polygonPolyData->SetPolys(polygons); hexmapper = vtkSmartPointer::New(); hexmapper->SetInput(polygonPolyData); hexactor = vtkSmartPointer::New(); hexactor->SetMapper(hexmapper); ren->AddActor(hexactor); Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Oct 18 22:27:29 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 18 Oct 2014 20:27:29 -0600 Subject: [vtkusers] Polygon colouring In-Reply-To: References: Message-ID: polyData->GetCellData()->SetScalars(array); On Sat, Oct 18, 2014 at 8:18 PM, Gib Bogle wrote: > I'm rendering a shape using vtkPolyData, i.e. as a collection of > polygons. Is there a way to colour each polygon separately? > > polygonPolyData = vtkSmartPointer::New(); > polygonPolyData->SetPoints(points); > polygonPolyData->SetPolys(polygons); > hexmapper = vtkSmartPointer::New(); > hexmapper->SetInput(polygonPolyData); > hexactor = vtkSmartPointer::New(); > hexactor->SetMapper(hexmapper); > > ren->AddActor(hexactor); > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sun Oct 19 01:22:15 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 19 Oct 2014 05:22:15 +0000 Subject: [vtkusers] Polygon colouring In-Reply-To: References: , Message-ID: Great! Thanks Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Sunday, 19 October 2014 3:27 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Polygon colouring polyData->GetCellData()->SetScalars(array); On Sat, Oct 18, 2014 at 8:18 PM, Gib Bogle > wrote: I'm rendering a shape using vtkPolyData, i.e. as a collection of polygons. Is there a way to colour each polygon separately? polygonPolyData = vtkSmartPointer::New(); polygonPolyData->SetPoints(points); polygonPolyData->SetPolys(polygons); hexmapper = vtkSmartPointer::New(); hexmapper->SetInput(polygonPolyData); hexactor = vtkSmartPointer::New(); hexactor->SetMapper(hexmapper); ren->AddActor(hexactor); -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sun Oct 19 07:39:25 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 19 Oct 2014 07:39:25 -0400 Subject: [vtkusers] Polygon colouring In-Reply-To: References: Message-ID: Gib, Here are a couple of examples: http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCells Bill On Sat, Oct 18, 2014 at 10:18 PM, Gib Bogle wrote: > I'm rendering a shape using vtkPolyData, i.e. as a collection of polygons. > Is there a way to colour each polygon separately? > > polygonPolyData = vtkSmartPointer::New(); > polygonPolyData->SetPoints(points); > polygonPolyData->SetPolys(polygons); > hexmapper = vtkSmartPointer::New(); > hexmapper->SetInput(polygonPolyData); > hexactor = vtkSmartPointer::New(); > hexactor->SetMapper(hexmapper); > > ren->AddActor(hexactor); > > > Thanks > Gib > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From g.bogle at auckland.ac.nz Sun Oct 19 20:27:40 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Mon, 20 Oct 2014 00:27:40 +0000 Subject: [vtkusers] Polygon colouring In-Reply-To: References: , Message-ID: Thanks Bill. Following David Gobbi's suggestion, I got something working in a similar way to the ColorCellsWithRGB example. But I can't say I fully understand it. Specifically, I don't see why this statement aPlane->GetOutput()->GetCellData()->SetScalars(cellData); or in my code polygonPolyData->GetCellData()->SetScalars(colors); sets the colours. How is it that the vtkUnsignedCharArray is interpreted as providing colours? Cheers Gib ________________________________________ From: Bill Lorensen [bill.lorensen at gmail.com] Sent: Monday, 20 October 2014 12:39 a.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Polygon colouring Gib, Here are a couple of examples: http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCells Bill On Sat, Oct 18, 2014 at 10:18 PM, Gib Bogle wrote: > I'm rendering a shape using vtkPolyData, i.e. as a collection of polygons. > Is there a way to colour each polygon separately? > > polygonPolyData = vtkSmartPointer::New(); > polygonPolyData->SetPoints(points); > polygonPolyData->SetPolys(polygons); > hexmapper = vtkSmartPointer::New(); > hexmapper->SetInput(polygonPolyData); > hexactor = vtkSmartPointer::New(); > hexactor->SetMapper(hexmapper); > > ren->AddActor(hexactor); > > > Thanks > Gib > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From david.thompson at kitware.com Sun Oct 19 20:40:39 2014 From: david.thompson at kitware.com (David Thompson) Date: Sun, 19 Oct 2014 20:40:39 -0400 Subject: [vtkusers] Polygon colouring In-Reply-To: References: Message-ID: Hi Gib, VTK's mappers treat unsigned char scalars as a special case because long ago colors had to be sent to the rendering API as 3-tuples of red, green, and blue unsigned char values. The VTK mappers are hardwired to deal with this case. David On Oct 19, 2014, at 20:27, Gib Bogle wrote: > Thanks Bill. Following David Gobbi's suggestion, I got something working in a similar way to the ColorCellsWithRGB example. But I can't say I fully understand it. Specifically, I don't see why this statement > > aPlane->GetOutput()->GetCellData()->SetScalars(cellData); > or in my code > polygonPolyData->GetCellData()->SetScalars(colors); > > sets the colours. How is it that the vtkUnsignedCharArray is interpreted as providing colours? > > Cheers > Gib > ________________________________________ > From: Bill Lorensen [bill.lorensen at gmail.com] > Sent: Monday, 20 October 2014 12:39 a.m. > To: Gib Bogle > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Polygon colouring > > Gib, > > Here are a couple of examples: > http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB > http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCells > > Bill > > On Sat, Oct 18, 2014 at 10:18 PM, Gib Bogle wrote: >> I'm rendering a shape using vtkPolyData, i.e. as a collection of polygons. >> Is there a way to colour each polygon separately? >> >> polygonPolyData = vtkSmartPointer::New(); >> polygonPolyData->SetPoints(points); >> polygonPolyData->SetPolys(polygons); >> hexmapper = vtkSmartPointer::New(); >> hexmapper->SetInput(polygonPolyData); >> hexactor = vtkSmartPointer::New(); >> hexactor->SetMapper(hexmapper); >> >> ren->AddActor(hexactor); >> >> >> Thanks >> Gib >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From g.bogle at auckland.ac.nz Sun Oct 19 20:43:04 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Mon, 20 Oct 2014 00:43:04 +0000 Subject: [vtkusers] Polygon colouring In-Reply-To: References: , Message-ID: OK, thanks. Gib ________________________________________ From: David Thompson [david.thompson at kitware.com] Sent: Monday, 20 October 2014 1:40 p.m. To: Gib Bogle Cc: Bill Lorensen; vtkusers at vtk.org Subject: Re: [vtkusers] Polygon colouring Hi Gib, VTK's mappers treat unsigned char scalars as a special case because long ago colors had to be sent to the rendering API as 3-tuples of red, green, and blue unsigned char values. The VTK mappers are hardwired to deal with this case. David On Oct 19, 2014, at 20:27, Gib Bogle wrote: > Thanks Bill. Following David Gobbi's suggestion, I got something working in a similar way to the ColorCellsWithRGB example. But I can't say I fully understand it. Specifically, I don't see why this statement > > aPlane->GetOutput()->GetCellData()->SetScalars(cellData); > or in my code > polygonPolyData->GetCellData()->SetScalars(colors); > > sets the colours. How is it that the vtkUnsignedCharArray is interpreted as providing colours? > > Cheers > Gib > ________________________________________ > From: Bill Lorensen [bill.lorensen at gmail.com] > Sent: Monday, 20 October 2014 12:39 a.m. > To: Gib Bogle > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Polygon colouring > > Gib, > > Here are a couple of examples: > http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB > http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCells > > Bill > > On Sat, Oct 18, 2014 at 10:18 PM, Gib Bogle wrote: >> I'm rendering a shape using vtkPolyData, i.e. as a collection of polygons. >> Is there a way to colour each polygon separately? >> >> polygonPolyData = vtkSmartPointer::New(); >> polygonPolyData->SetPoints(points); >> polygonPolyData->SetPolys(polygons); >> hexmapper = vtkSmartPointer::New(); >> hexmapper->SetInput(polygonPolyData); >> hexactor = vtkSmartPointer::New(); >> hexactor->SetMapper(hexmapper); >> >> ren->AddActor(hexactor); >> >> >> Thanks >> Gib >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From david.gobbi at gmail.com Mon Oct 20 11:34:04 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 20 Oct 2014 09:34:04 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: <1412790315356-5729052.post@n5.nabble.com> References: <1412781275831-5729043.post@n5.nabble.com> <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> <1412788187655-5729049.post@n5.nabble.com> <1412790315356-5729052.post@n5.nabble.com> Message-ID: Hi Richard, Ryan, I have modified vtkPolyDataToImageStencil so that it works with the data sets that you provided (thanks for making them available to me). Richard's data used to fail because it had several short horizontal line segments, and there was a bug in the code when horizontal line segments were close to a pixel boundary. Ryan's data set had some short "spurs" (tiny line segments branching off of the main contour) that confused the algorithm, but I've extended the algorithm so that it removes short branches. The most recent code is at the following URL. It will hopefully be merged into VTK sometime this week. Thanks again for the test code and the data, it made it much easier for me to pinpoint the bugs. http://review.source.kitware.com/#/c/17021/ - David On Wed, Oct 8, 2014 at 11:45 AM, Ricardo A Corredor wrote: > That's good to know! > > Just an additional info, I could reproduce @ryan45 error. In this data, > this > problem happens with a relatively small spacing: around 2.5 (included) and > below; with higher values the result is correct. Polydata bounds> X: > 2.32e+03 to 4.16e+03 (delta: 1.84e+03), Y: 2.47e+03 to 4.47e+03 (2e+03) > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729052.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan45 at uab.edu Mon Oct 20 14:16:32 2014 From: ryan45 at uab.edu (ryan45) Date: Mon, 20 Oct 2014 11:16:32 -0700 (PDT) Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <1412781275831-5729043.post@n5.nabble.com> <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> <1412788187655-5729049.post@n5.nabble.com> <1412790315356-5729052.post@n5.nabble.com> Message-ID: Thanks David. I have tested and it?s working great. Also, the overall speed of my program is much faster since I no longer have to use vtkCleanPolyData. - Ryan On Oct 20, 2014, at 10:35 AM, David Gobbi [via VTK] > wrote: Hi Richard, Ryan, I have modified vtkPolyDataToImageStencil so that it works with the data sets that you provided (thanks for making them available to me). Richard's data used to fail because it had several short horizontal line segments, and there was a bug in the code when horizontal line segments were close to a pixel boundary. Ryan's data set had some short "spurs" (tiny line segments branching off of the main contour) that confused the algorithm, but I've extended the algorithm so that it removes short branches. The most recent code is at the following URL. It will hopefully be merged into VTK sometime this week. Thanks again for the test code and the data, it made it much easier for me to pinpoint the bugs. http://review.source.kitware.com/#/c/17021/ - David On Wed, Oct 8, 2014 at 11:45 AM, Ricardo A Corredor <[hidden email]> wrote: That's good to know! Just an additional info, I could reproduce @ryan45 error. In this data, this problem happens with a relatively small spacing: around 2.5 (included) and below; with higher values the result is correct. Polydata bounds> X: 2.32e+03 to 4.16e+03 (delta: 1.84e+03), Y: 2.47e+03 to 4.47e+03 (2e+03) -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729052.html 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 Follow this link to subscribe/unsubscribe: http://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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ________________________________ If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729180.html To unsubscribe from Fixing vtkPolyDataToImageStencil, click here. NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729181.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Mon Oct 20 14:32:17 2014 From: tossin at gmail.com (Evan Kao) Date: Mon, 20 Oct 2014 11:32:17 -0700 Subject: [vtkusers] Extracting "feature surfaces" in VTK In-Reply-To: References: Message-ID: Hey vtk-users, Sorry if the above is a bit long-winded. It pretty much boils down to a couple questions: 1. How do I extract each individual surface created by vtkPolyDataConnectivityFilter? 2. How are the edges created by vtkPolyDataNormals stored in the poly data object? Thanks, Evan Kao On Fri, Oct 10, 2014 at 3:56 PM, Evan Kao wrote: > Hello all, > > I'm trying to extract feature surfaces (e.g. inlets, outlets, etc.) in VTK > as briefly described in this fairly old mailing list exchange > , > but since I'm inexperienced with VTK, I need a little more detail. > > I've tried the corresponding filters in Paraview, which was pretty > straightforward, but I'd like to be able to do it in VTK, which seems a lot > less straightforward. The sequence of filters in Paraview that I used is > (starting from an unstructured grid volume) : > > 1. Extract Surface > 2. Generate Surface Normals > 3. Connectivity > 4. Threshold (for each surface) > > I believe the corresponding filters in VTK are: > > 1. vtkGeometryFilter > 2. vtkPolyDataNormals > 3. vtkPolyDataConnectivityFilter (or vtkConnectivityFilter) > 4. vtkThreshold > > I'm currently having trouble with the connectivity filters. In Paraview, > the connectivity filter conveniently adds a "RegionId" array to the data, > which can then be used to separate the surfaces using the Threshold filter, > but this doesn't seem to be the case in VTK. If I print the output of the > connectivity filter, there are no new arrays. I believe the filter is > working though since GetNumberOfExtractedRegions() gives 3 (1 inlet, 1 > outlet, 1 wall). This brings me to a few questions: > > 1. Is there a way to access each individual region? And if so, is > vtkThreshold even necessary? > 2. Is there a way to get the "RegionId" array in VTK and add it to the > data? > > I also had a question about how the connectivity filter works. The > Feature Angle option in Generate Surface Normals dictates which edges of > the object that are rendered and seems to change the calculated point > normals, but not the cell normals. Are these edges actually stored > anywhere or are they just implicit in the calculated point normals? And > the description for the connectivity filter suggests that it simply looks > for shared points between cells, which doesn't seem like it would be > affected by calculating point normals. So what does it use as criteria for > separating surfaces when performed after Generate Surface > Normals/vtkPolyDataNormals? > > Thanks, > Evan Kao > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Oct 20 18:11:22 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 20 Oct 2014 16:11:22 -0600 Subject: [vtkusers] Extracting "feature surfaces" in VTK In-Reply-To: References: Message-ID: Hi Evan, I think that you can make vtkPolyDataConnectivityFilter generate the RegionId array by calling ColorRegionsOn(). After that, the threshold filter should be able to separate the regions. - David On Mon, Oct 20, 2014 at 12:32 PM, Evan Kao wrote: > Hey vtk-users, > > Sorry if the above is a bit long-winded. It pretty much boils down to a > couple questions: > > 1. How do I extract each individual surface created by > vtkPolyDataConnectivityFilter? > 2. How are the edges created by vtkPolyDataNormals stored in the poly data > object? > > Thanks, > Evan Kao > > On Fri, Oct 10, 2014 at 3:56 PM, Evan Kao wrote: > >> Hello all, >> >> I'm trying to extract feature surfaces (e.g. inlets, outlets, etc.) in >> VTK as briefly described in this fairly old mailing list exchange >> , >> but since I'm inexperienced with VTK, I need a little more detail. >> >> I've tried the corresponding filters in Paraview, which was pretty >> straightforward, but I'd like to be able to do it in VTK, which seems a lot >> less straightforward. The sequence of filters in Paraview that I used is >> (starting from an unstructured grid volume) : >> >> 1. Extract Surface >> 2. Generate Surface Normals >> 3. Connectivity >> 4. Threshold (for each surface) >> >> I believe the corresponding filters in VTK are: >> >> 1. vtkGeometryFilter >> 2. vtkPolyDataNormals >> 3. vtkPolyDataConnectivityFilter (or vtkConnectivityFilter) >> 4. vtkThreshold >> >> I'm currently having trouble with the connectivity filters. In Paraview, >> the connectivity filter conveniently adds a "RegionId" array to the data, >> which can then be used to separate the surfaces using the Threshold filter, >> but this doesn't seem to be the case in VTK. If I print the output of the >> connectivity filter, there are no new arrays. I believe the filter is >> working though since GetNumberOfExtractedRegions() gives 3 (1 inlet, 1 >> outlet, 1 wall). This brings me to a few questions: >> >> 1. Is there a way to access each individual region? And if so, is >> vtkThreshold even necessary? >> 2. Is there a way to get the "RegionId" array in VTK and add it to >> the data? >> >> I also had a question about how the connectivity filter works. The >> Feature Angle option in Generate Surface Normals dictates which edges of >> the object that are rendered and seems to change the calculated point >> normals, but not the cell normals. Are these edges actually stored >> anywhere or are they just implicit in the calculated point normals? And >> the description for the connectivity filter suggests that it simply looks >> for shared points between cells, which doesn't seem like it would be >> affected by calculating point normals. So what does it use as criteria for >> separating surfaces when performed after Generate Surface >> Normals/vtkPolyDataNormals? >> >> Thanks, >> Evan Kao >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Oct 20 18:17:31 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 20 Oct 2014 16:17:31 -0600 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <1412781275831-5729043.post@n5.nabble.com> <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> <1412788187655-5729049.post@n5.nabble.com> <1412790315356-5729052.post@n5.nabble.com> Message-ID: On Mon, Oct 20, 2014 at 12:16 PM, ryan45 wrote: > > > I have tested and it's working great. Also, the overall speed of my > program is much faster since I no longer have to use vtkCleanPolyData. > Thanks for confirming that the fix works. Out of curiosity, was your contour produced by a VTK filter? (e.g. vtkCutter, vtkContourFilter, etc.). Or did you read it into VTK directly? - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Mon Oct 20 18:43:22 2014 From: tossin at gmail.com (Evan Kao) Date: Mon, 20 Oct 2014 15:43:22 -0700 Subject: [vtkusers] Extracting "feature surfaces" in VTK In-Reply-To: References: Message-ID: Thanks a lot, I believe that worked. - Evan On Mon, Oct 20, 2014 at 3:11 PM, David Gobbi wrote: > Hi Evan, > > I think that you can make vtkPolyDataConnectivityFilter generate the > RegionId array by calling ColorRegionsOn(). After that, the threshold > filter should be able to separate the regions. > > - David > > > On Mon, Oct 20, 2014 at 12:32 PM, Evan Kao wrote: > >> Hey vtk-users, >> >> Sorry if the above is a bit long-winded. It pretty much boils down to a >> couple questions: >> >> 1. How do I extract each individual surface created by >> vtkPolyDataConnectivityFilter? >> 2. How are the edges created by vtkPolyDataNormals stored in the poly >> data object? >> >> Thanks, >> Evan Kao >> >> On Fri, Oct 10, 2014 at 3:56 PM, Evan Kao wrote: >> >>> Hello all, >>> >>> I'm trying to extract feature surfaces (e.g. inlets, outlets, etc.) in >>> VTK as briefly described in this fairly old mailing list exchange >>> , >>> but since I'm inexperienced with VTK, I need a little more detail. >>> >>> I've tried the corresponding filters in Paraview, which was pretty >>> straightforward, but I'd like to be able to do it in VTK, which seems a lot >>> less straightforward. The sequence of filters in Paraview that I used is >>> (starting from an unstructured grid volume) : >>> >>> 1. Extract Surface >>> 2. Generate Surface Normals >>> 3. Connectivity >>> 4. Threshold (for each surface) >>> >>> I believe the corresponding filters in VTK are: >>> >>> 1. vtkGeometryFilter >>> 2. vtkPolyDataNormals >>> 3. vtkPolyDataConnectivityFilter (or vtkConnectivityFilter) >>> 4. vtkThreshold >>> >>> I'm currently having trouble with the connectivity filters. In >>> Paraview, the connectivity filter conveniently adds a "RegionId" array to >>> the data, which can then be used to separate the surfaces using the >>> Threshold filter, but this doesn't seem to be the case in VTK. If I print >>> the output of the connectivity filter, there are no new arrays. I believe >>> the filter is working though since GetNumberOfExtractedRegions() gives 3 (1 >>> inlet, 1 outlet, 1 wall). This brings me to a few questions: >>> >>> 1. Is there a way to access each individual region? And if so, is >>> vtkThreshold even necessary? >>> 2. Is there a way to get the "RegionId" array in VTK and add it to >>> the data? >>> >>> I also had a question about how the connectivity filter works. The >>> Feature Angle option in Generate Surface Normals dictates which edges of >>> the object that are rendered and seems to change the calculated point >>> normals, but not the cell normals. Are these edges actually stored >>> anywhere or are they just implicit in the calculated point normals? And >>> the description for the connectivity filter suggests that it simply looks >>> for shared points between cells, which doesn't seem like it would be >>> affected by calculating point normals. So what does it use as criteria for >>> separating surfaces when performed after Generate Surface >>> Normals/vtkPolyDataNormals? >>> >>> Thanks, >>> Evan Kao >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan45 at uab.edu Mon Oct 20 20:26:12 2014 From: ryan45 at uab.edu (ryan45) Date: Mon, 20 Oct 2014 17:26:12 -0700 (PDT) Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: References: <33A96CE7-11CE-4ED1-A032-B82AD8A05675@uab.edu> <1412788187655-5729049.post@n5.nabble.com> <1412790315356-5729052.post@n5.nabble.com> Message-ID: Yes. I read in an STL surface using vtkSTLReader and then cut with a plane it using vtkCutter. - Ryan ________________________________ From: David Gobbi [via VTK] [ml-node+s1045678n5729184h56 at n5.nabble.com] Sent: Monday, October 20, 2014 5:18 PM To: Ryan A Whitley Subject: Re: Fixing vtkPolyDataToImageStencil On Mon, Oct 20, 2014 at 12:16 PM, ryan45 <[hidden email]> wrote: I have tested and it?s working great. Also, the overall speed of my program is much faster since I no longer have to use vtkCleanPolyData. Thanks for confirming that the fix works. Out of curiosity, was your contour produced by a VTK filter? (e.g. vtkCutter, vtkContourFilter, etc.). Or did you read it into VTK directly? - David _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ________________________________ If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729184.html To unsubscribe from Fixing vtkPolyDataToImageStencil, click here. NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729186.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From icembakir at gmail.com Tue Oct 21 05:08:15 2014 From: icembakir at gmail.com (=?UTF-8?B?xLBzbWFpbCBDZW0gQmFrxLFy?=) Date: Tue, 21 Oct 2014 12:08:15 +0300 Subject: [vtkusers] Use of undefined type 'vtkTransform' Message-ID: Hi all, I try to compile this vtk project on Qt:http://www.paraview.org/Wiki/VTK/Examples/Cxx/PolyData/TransformOrderDemo I took many errors about vtkTransform. One of them: C:\vtk\x64\6.0.0\install\include\vtk-6.0\vtkHomogeneousTransform.h:22: error: C2027: use of undefined type 'vtkTransform' see declaration of 'vtkTransform' I use qt 5.3.1 and 64 bit win7 os. I could successfully compiled the project another computer. I suppose there is a problem with vtkTransform.h library on my directory but I don't know what to do. Thanks, - Cem From josp.jorge at gmail.com Tue Oct 21 06:21:58 2014 From: josp.jorge at gmail.com (Jorge Perez) Date: Tue, 21 Oct 2014 12:21:58 +0200 Subject: [vtkusers] Use of undefined type 'vtkTransform' In-Reply-To: References: Message-ID: That example compiles without errors for me with VTK_VERSION "6.1.0". Could you try that version? 2014-10-21 11:08 GMT+02:00 ?smail Cem Bak?r : > Hi all, > > I try to compile this vtk project on > Qt: > http://www.paraview.org/Wiki/VTK/Examples/Cxx/PolyData/TransformOrderDemo > > I took many errors about vtkTransform. One of them: > C:\vtk\x64\6.0.0\install\include\vtk-6.0\vtkHomogeneousTransform.h:22: > error: C2027: use of undefined type 'vtkTransform' see declaration of > 'vtkTransform' > > I use qt 5.3.1 and 64 bit win7 os. I could successfully compiled the > project another computer. I suppose there is a problem with > vtkTransform.h library on my directory but I don't know what to do. > > Thanks, > - Cem > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From icembakir at gmail.com Tue Oct 21 07:22:28 2014 From: icembakir at gmail.com (=?UTF-8?B?xLBzbWFpbCBDZW0gQmFrxLFy?=) Date: Tue, 21 Oct 2014 14:22:28 +0300 Subject: [vtkusers] Use of undefined type 'vtkTransform' In-Reply-To: References: Message-ID: Should i update my VTK_VERSION to 6.1.0? May it be a problem with libraries in the directory so i can find a solution depends on this? 2014-10-21 13:21 GMT+03:00 Jorge Perez : > That example compiles without errors for me with VTK_VERSION "6.1.0". > Could you try that version? > > 2014-10-21 11:08 GMT+02:00 ?smail Cem Bak?r : > >> Hi all, >> >> I try to compile this vtk project on >> Qt: >> http://www.paraview.org/Wiki/VTK/Examples/Cxx/PolyData/TransformOrderDemo >> >> I took many errors about vtkTransform. One of them: >> C:\vtk\x64\6.0.0\install\include\vtk-6.0\vtkHomogeneousTransform.h:22: >> error: C2027: use of undefined type 'vtkTransform' see declaration of >> 'vtkTransform' >> >> I use qt 5.3.1 and 64 bit win7 os. I could successfully compiled the >> project another computer. I suppose there is a problem with >> vtkTransform.h library on my directory but I don't know what to do. >> >> Thanks, >> - Cem >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > -- ?smail Cem BAKIR ?T? Bilgisayar M?hendisli?i icembakir at gmail.com Tel: 0534 867 66 91 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Oct 21 08:12:19 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 21 Oct 2014 08:12:19 -0400 Subject: [vtkusers] Use of undefined type 'vtkTransform' In-Reply-To: References: Message-ID: Are you using CMake tp configure your project? On Tue, Oct 21, 2014 at 5:08 AM, ?smail Cem Bak?r wrote: > Hi all, > > I try to compile this vtk project on > Qt:http://www.paraview.org/Wiki/VTK/Examples/Cxx/PolyData/TransformOrderDemo > > I took many errors about vtkTransform. One of them: > C:\vtk\x64\6.0.0\install\include\vtk-6.0\vtkHomogeneousTransform.h:22: > error: C2027: use of undefined type 'vtkTransform' see declaration of > 'vtkTransform' > > I use qt 5.3.1 and 64 bit win7 os. I could successfully compiled the > project another computer. I suppose there is a problem with > vtkTransform.h library on my directory but I don't know what to do. > > Thanks, > - Cem > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From icembakir at gmail.com Tue Oct 21 09:21:31 2014 From: icembakir at gmail.com (=?UTF-8?B?xLBzbWFpbCBDZW0gQmFrxLFy?=) Date: Tue, 21 Oct 2014 16:21:31 +0300 Subject: [vtkusers] Use of undefined type 'vtkTransform' In-Reply-To: References: Message-ID: I use qmake to configure. 2014-10-21 15:12 GMT+03:00 Bill Lorensen : > Are you using CMake tp configure your project? > > On Tue, Oct 21, 2014 at 5:08 AM, ?smail Cem Bak?r > wrote: > > Hi all, > > > > I try to compile this vtk project on > > Qt: > http://www.paraview.org/Wiki/VTK/Examples/Cxx/PolyData/TransformOrderDemo > > > > I took many errors about vtkTransform. One of them: > > C:\vtk\x64\6.0.0\install\include\vtk-6.0\vtkHomogeneousTransform.h:22: > > error: C2027: use of undefined type 'vtkTransform' see declaration of > > 'vtkTransform' > > > > I use qt 5.3.1 and 64 bit win7 os. I could successfully compiled the > > project another computer. I suppose there is a problem with > > vtkTransform.h library on my directory but I don't know what to do. > > > > Thanks, > > - Cem > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com > -- ?smail Cem BAKIR ?T? Bilgisayar M?hendisli?i icembakir at gmail.com Tel: 0534 867 66 91 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.PNG Type: image/png Size: 5229 bytes Desc: not available URL: From bill.lorensen at gmail.com Tue Oct 21 10:33:26 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 21 Oct 2014 10:33:26 -0400 Subject: [vtkusers] Use of undefined type 'vtkTransform' In-Reply-To: References: Message-ID: That explains your issues. It is possible to configure with qmake, but it will require that you provide proper includes and libraries. With cmake it is much easier. Is there a reason you are using qmake versus cmake? On Tue, Oct 21, 2014 at 9:21 AM, ?smail Cem Bak?r wrote: > I use qmake to configure. > > 2014-10-21 15:12 GMT+03:00 Bill Lorensen : >> >> Are you using CMake tp configure your project? >> >> On Tue, Oct 21, 2014 at 5:08 AM, ?smail Cem Bak?r >> wrote: >> > Hi all, >> > >> > I try to compile this vtk project on >> > >> > Qt:http://www.paraview.org/Wiki/VTK/Examples/Cxx/PolyData/TransformOrderDemo >> > >> > I took many errors about vtkTransform. One of them: >> > C:\vtk\x64\6.0.0\install\include\vtk-6.0\vtkHomogeneousTransform.h:22: >> > error: C2027: use of undefined type 'vtkTransform' see declaration of >> > 'vtkTransform' >> > >> > I use qt 5.3.1 and 64 bit win7 os. I could successfully compiled the >> > project another computer. I suppose there is a problem with >> > vtkTransform.h library on my directory but I don't know what to do. >> > >> > Thanks, >> > - Cem >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > > -- > ?smail Cem BAKIR > ?T? Bilgisayar M?hendisli?i > icembakir at gmail.com > Tel: 0534 867 66 91 > > -- Unpaid intern in BillsBasement at noware dot com From icembakir at gmail.com Tue Oct 21 11:28:54 2014 From: icembakir at gmail.com (=?UTF-8?B?xLBzbWFpbCBDZW0gQmFrxLFy?=) Date: Tue, 21 Oct 2014 18:28:54 +0300 Subject: [vtkusers] Use of undefined type 'vtkTransform' In-Reply-To: References: Message-ID: No actually. Vtk had been configured by this way in the office where i work. I think necessary includes and headers were provided in this example. Is there anything to do using this environment? Thanks for all answers. 21 Eki 2014 17:33 tarihinde "Bill Lorensen" yazd?: > That explains your issues. It is possible to configure with qmake, but > it will require that you provide proper includes and libraries. With > cmake it is much easier. Is there a reason you are using qmake versus > cmake? > > > On Tue, Oct 21, 2014 at 9:21 AM, ?smail Cem Bak?r > wrote: > > I use qmake to configure. > > > > 2014-10-21 15:12 GMT+03:00 Bill Lorensen : > >> > >> Are you using CMake tp configure your project? > >> > >> On Tue, Oct 21, 2014 at 5:08 AM, ?smail Cem Bak?r > >> wrote: > >> > Hi all, > >> > > >> > I try to compile this vtk project on > >> > > >> > Qt: > http://www.paraview.org/Wiki/VTK/Examples/Cxx/PolyData/TransformOrderDemo > >> > > >> > I took many errors about vtkTransform. One of them: > >> > C:\vtk\x64\6.0.0\install\include\vtk-6.0\vtkHomogeneousTransform.h:22: > >> > error: C2027: use of undefined type 'vtkTransform' see declaration of > >> > 'vtkTransform' > >> > > >> > I use qt 5.3.1 and 64 bit win7 os. I could successfully compiled the > >> > project another computer. I suppose there is a problem with > >> > vtkTransform.h library on my directory but I don't know what to do. > >> > > >> > Thanks, > >> > - Cem > >> > _______________________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Please keep messages on-topic and check the VTK FAQ at: > >> > http://www.vtk.org/Wiki/VTK_FAQ > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/vtkusers > >> > >> > >> > >> -- > >> Unpaid intern in BillsBasement at noware dot com > > > > > > > > > > -- > > ?smail Cem BAKIR > > ?T? Bilgisayar M?hendisli?i > > icembakir at gmail.com > > Tel: 0534 867 66 91 > > > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alok.theanomaly at gmail.com Tue Oct 21 11:32:55 2014 From: alok.theanomaly at gmail.com (junior) Date: Tue, 21 Oct 2014 08:32:55 -0700 (PDT) Subject: [vtkusers] Displaying the degree symbol "\u00B0" in vtkCornerAnnotation Message-ID: <1413905575866-5729197.post@n5.nabble.com> Hey, This is a silly question. I have been trying for a while to display a degree symbol in vtkCornerAnnotation. The way I am trying to do it is like this: std;:string angle = computeAngle()+"\u00B0"; cornerAnnotation->SetText(3,angle.c_str()); //where cornerAnnotation if of type vtkCornerAnnotation. This displays something like 50A&circ° -- View this message in context: http://vtk.1045678.n5.nabble.com/Displaying-the-degree-symbol-u00B0-in-vtkCornerAnnotation-tp5729197.html Sent from the VTK - Users mailing list archive at Nabble.com. From alok.theanomaly at gmail.com Tue Oct 21 12:46:15 2014 From: alok.theanomaly at gmail.com (Alok) Date: Tue, 21 Oct 2014 12:46:15 -0400 Subject: [vtkusers] Displaying the degree symbol "\u00B0" in vtkCornerAnnotation In-Reply-To: <1413905575866-5729197.post@n5.nabble.com> References: <1413905575866-5729197.post@n5.nabble.com> Message-ID: I accidently hit post too quick earlier: Here's the completed and corrected post: Hey, This is a silly question. I have been trying for a while to display a degree symbol in vtkCornerAnnotation. The way I am trying to do it is like this: std;:string angle = computeAngle()+"\u00B0"; cornerAnnotation->SetText(3,angle.c_str()); //where cornerAnnotation if of type vtkCornerAnnotation. This displays something like 50?? rather than 50? When I display the string on a terminal it works as expected. Am I missing something here? On Tue, Oct 21, 2014 at 11:32 AM, junior wrote: > Hey, > > This is a silly question. > I have been trying for a while to display a degree symbol in > vtkCornerAnnotation. > > The way I am trying to do it is like this: > std;:string angle = computeAngle()+"\u00B0"; > cornerAnnotation->SetText(3,angle.c_str()); //where cornerAnnotation if of > type vtkCornerAnnotation. > > This displays something like 50A&circ° > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Displaying-the-degree-symbol-u00B0-in-vtkCornerAnnotation-tp5729197.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- I live a simple life... in 0s and 1s ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Tue Oct 21 16:49:24 2014 From: sean at rogue-research.com (Sean McBride) Date: Tue, 21 Oct 2014 16:49:24 -0400 Subject: [vtkusers] Displaying the degree symbol "\u00B0" in vtkCornerAnnotation In-Reply-To: References: <1413905575866-5729197.post@n5.nabble.com> Message-ID: <20141021204924.1182207007@mail.rogue-research.com> On Tue, 21 Oct 2014 12:46:15 -0400, Alok said: >I have been trying for a while to display a degree symbol in >vtkCornerAnnotation. > >The way I am trying to do it is like this: >std;:string angle = computeAngle()+"\u00B0"; >cornerAnnotation->SetText(3,angle.c_str()); //where cornerAnnotation if of >type vtkCornerAnnotation. > >This displays something like 50?? rather than 50? >When I display the string on a terminal it works as expected. In the past, VTK hasn't had very good Unicode support. I'm not sure where it stands today actually. What version of VTK are you using? You'll have the best results with the newest version I expect. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From jcplatt at dsl.pipex.com Tue Oct 21 17:05:44 2014 From: jcplatt at dsl.pipex.com (John Platt) Date: Tue, 21 Oct 2014 22:05:44 +0100 Subject: [vtkusers] Displaying the degree symbol "\u00B0" invtkCornerAnnotation References: <1413905575866-5729197.post@n5.nabble.com> Message-ID: Hi, In VTK 5.10, I have only had success with vtkUnicodeString text arguments ... std::ostringstream ostr; ostr << ang; vtkUnicodeString label(vtkUnicodeString::from_utf8( ostr.str().c_str() )); vtkUnicodeString deg( 1, 0xb0 ); label += deg; Not much help with vtkCornerAnnotation::SetText(). John. ----- Original Message ----- From: Alok To: vtkusers at vtk.org Sent: Tuesday, October 21, 2014 5:46 PM Subject: Re: [vtkusers] Displaying the degree symbol "\u00B0" invtkCornerAnnotation I accidently hit post too quick earlier: Here's the completed and corrected post: Hey, This is a silly question. I have been trying for a while to display a degree symbol in vtkCornerAnnotation. The way I am trying to do it is like this: std;:string angle = computeAngle()+"\u00B0"; cornerAnnotation->SetText(3,angle.c_str()); //where cornerAnnotation if of type vtkCornerAnnotation. This displays something like 50?? rather than 50? When I display the string on a terminal it works as expected. Am I missing something here? On Tue, Oct 21, 2014 at 11:32 AM, junior wrote: Hey, This is a silly question. I have been trying for a while to display a degree symbol in vtkCornerAnnotation. The way I am trying to do it is like this: std;:string angle = computeAngle()+"\u00B0"; cornerAnnotation->SetText(3,angle.c_str()); //where cornerAnnotation if of type vtkCornerAnnotation. This displays something like 50A&circ° -- View this message in context: http://vtk.1045678.n5.nabble.com/Displaying-the-degree-symbol-u00B0-in-vtkCornerAnnotation-tp5729197.html 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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- I live a simple life... in 0s and 1s ! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From alok.theanomaly at gmail.com Tue Oct 21 17:04:58 2014 From: alok.theanomaly at gmail.com (Alok) Date: Tue, 21 Oct 2014 17:04:58 -0400 Subject: [vtkusers] Displaying the degree symbol "\u00B0" in vtkCornerAnnotation In-Reply-To: <20141021204924.1182207007@mail.rogue-research.com> References: <1413905575866-5729197.post@n5.nabble.com> <20141021204924.1182207007@mail.rogue-research.com> Message-ID: I cloned the git repo some time time back and built from source The vtkTextActor/vtkTextWidget seem to be working fine with unicode but I see some other problems which make them unusable for me. Any recommendations on how to check the difference between vtkCornerAnnotation and the vtkTextActor will be great. Seems like an easy fix Thanks On Tue, Oct 21, 2014 at 4:49 PM, Sean McBride wrote: > On Tue, 21 Oct 2014 12:46:15 -0400, Alok said: > > >I have been trying for a while to display a degree symbol in > >vtkCornerAnnotation. > > > >The way I am trying to do it is like this: > >std;:string angle = computeAngle()+"\u00B0"; > >cornerAnnotation->SetText(3,angle.c_str()); //where cornerAnnotation if of > >type vtkCornerAnnotation. > > > >This displays something like 50?? rather than 50? > >When I display the string on a terminal it works as expected. > > In the past, VTK hasn't had very good Unicode support. I'm not sure where > it stands today actually. What version of VTK are you using? You'll have > the best results with the newest version I expect. > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > -- I live a simple life... in 0s and 1s ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.sambin at gmail.com Wed Oct 22 06:39:45 2014 From: m.sambin at gmail.com (Marco Sambin) Date: Wed, 22 Oct 2014 12:39:45 +0200 Subject: [vtkusers] How to prevent out-of-memory crash with vtkImageReader from Java Message-ID: Hi Seb, first of all, thanks for your feedback. I have taken a look at the C++ code of vtkImageReader: it seems to me that main allocation happens inside ExecuteDataWithInformation() method, which in turn calls vtkImageData::AllocateScalars(), which in turn calls vtkDataArray::CreateDataArray(), which finally I think ends up calling ::New() on the typed data array (probably, vtkUnsignedShortArray in my case). If I were to write my own image reader, for instance, I am not sure how I could detect eventual out-of-memory errors, since they would actually happen inside other VTK classes. Maybe some try-catch blocks in my own image reader may help me? Any suggestion would be greatly appreciated. I am looking forward to hearing from you. Thanks and best regards, Marco Sambin On Wed, Oct 15, 2014 at 4:30 PM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > Hi Marco, > > I don't have the answer but if there is no solution as today, maybe adding > another method on the reader that could first validate that enough memory > is available, might be an option. Specially in Java when such call make the > JVM crash. > > That change will need to happen on the C++ side. But at that point I'm not > sure how to check that on the C++ side either. Maybe Berk, Dave or Brad > might have some insight. > > Thanks, > > Seb > > > > On Wed, Oct 15, 2014 at 3:04 AM, Marco Sambin wrote: > >> Hi all. >> In my VTK-based Java application, I am reading a "raw volume file" >> (containing a set of CT slices) through some Java code looking like this: >> >> [...] >> vtkImageReader imageReaderVTK = new vtkImageReader(); >> imageReaderVTK.FileLowerLeftOn(); >> imageReaderVTK.SetFileDimensionality(3); >> imageReaderVTK.SetFileName(curRawVolFile.getAbsolutePath()); >> imageReaderVTK.SetDataExtent(0, sliceCols - 1, >> 0, sliceRows - 1, >> 0, numOfUsedImages - 1); >> imageReaderVTK.SetDataSpacing(xSpacing, ySpacing, zSpacing); >> imageReaderVTK.SetDataOrigin(0.0, 0.0, 0.0); >> imageReaderVTK.SetDataScalarTypeToUnsignedShort(); >> imageReaderVTK.SetDataByteOrderToBigEndian(); >> >> // The following call may cause a process crash due to out-of-memory >> imageReaderVTK.UpdateWholeExtent(); >> [...] >> >> I am then passing this volume to a vtkImagePlaneWidget for some reslicing. >> >> As the last comment (in the code fragment above) suggests, in some cases >> I get a crash of the JVM process, due to the fact the reader goes out of >> memory while actually reading and allocating the whole volume in memory. >> This especially happens when using a 32-bit JRE. >> I understand that I cannot read a huge volume in memory if just a small >> amount of memory is available to the process, but my question is: >> is there a way to manage "more gracefully" this out-of-memory from Java >> code, in such a way to be able to inform the user that "Not enough memory >> is available to read this volume", instead of causing a JVM crash? >> >> I am using VTK 6.1.0. >> >> Thanks for any hint/suggestion about this topic. >> >> Best regards, >> >> Marco >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Oct 22 11:25:54 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 22 Oct 2014 09:25:54 -0600 Subject: [vtkusers] How to prevent out-of-memory crash with vtkImageReader from Java In-Reply-To: References: Message-ID: Hi Marco, I'm not an expert in that area, but if you try on your C++ end to allocate the estimate memory amount and free it, you might be able to catch and handle any kind of error feedback the way you want. But also another approach which will be less exact will be to check what remaining memory is available on the system and base on the file size, pre-decide if that file will fit in or not. That option can probably just live in Java. In fact, you can just let the user know, that loading such a file may result of a crash as not enough memory might not be available. Seb On Wed, Oct 22, 2014 at 4:39 AM, Marco Sambin wrote: > Hi Seb, > > first of all, thanks for your feedback. > > I have taken a look at the C++ code of vtkImageReader: it seems to me that > main allocation happens inside ExecuteDataWithInformation() method, which > in turn calls vtkImageData::AllocateScalars(), which in turn > calls vtkDataArray::CreateDataArray(), which finally I think ends up > calling ::New() on the typed data array (probably, vtkUnsignedShortArray in > my case). > > If I were to write my own image reader, for instance, I am not sure how I > could detect eventual out-of-memory errors, since they would actually > happen inside other VTK classes. Maybe some try-catch blocks in my own > image reader may help me? > Any suggestion would be greatly appreciated. > > I am looking forward to hearing from you. > Thanks and best regards, > > Marco Sambin > > > On Wed, Oct 15, 2014 at 4:30 PM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> Hi Marco, >> >> I don't have the answer but if there is no solution as today, maybe >> adding another method on the reader that could first validate that enough >> memory is available, might be an option. Specially in Java when such call >> make the JVM crash. >> >> That change will need to happen on the C++ side. But at that point I'm >> not sure how to check that on the C++ side either. Maybe Berk, Dave or Brad >> might have some insight. >> >> Thanks, >> >> Seb >> >> >> >> On Wed, Oct 15, 2014 at 3:04 AM, Marco Sambin wrote: >> >>> Hi all. >>> In my VTK-based Java application, I am reading a "raw volume file" >>> (containing a set of CT slices) through some Java code looking like this: >>> >>> [...] >>> vtkImageReader imageReaderVTK = new vtkImageReader(); >>> imageReaderVTK.FileLowerLeftOn(); >>> imageReaderVTK.SetFileDimensionality(3); >>> imageReaderVTK.SetFileName(curRawVolFile.getAbsolutePath()); >>> imageReaderVTK.SetDataExtent(0, sliceCols - 1, >>> 0, sliceRows - 1, >>> 0, numOfUsedImages - 1); >>> imageReaderVTK.SetDataSpacing(xSpacing, ySpacing, zSpacing); >>> imageReaderVTK.SetDataOrigin(0.0, 0.0, 0.0); >>> imageReaderVTK.SetDataScalarTypeToUnsignedShort(); >>> imageReaderVTK.SetDataByteOrderToBigEndian(); >>> >>> // The following call may cause a process crash due to out-of-memory >>> imageReaderVTK.UpdateWholeExtent(); >>> [...] >>> >>> I am then passing this volume to a vtkImagePlaneWidget for some >>> reslicing. >>> >>> As the last comment (in the code fragment above) suggests, in some cases >>> I get a crash of the JVM process, due to the fact the reader goes out of >>> memory while actually reading and allocating the whole volume in memory. >>> This especially happens when using a 32-bit JRE. >>> I understand that I cannot read a huge volume in memory if just a small >>> amount of memory is available to the process, but my question is: >>> is there a way to manage "more gracefully" this out-of-memory from Java >>> code, in such a way to be able to inform the user that "Not enough memory >>> is available to read this volume", instead of causing a JVM crash? >>> >>> I am using VTK 6.1.0. >>> >>> Thanks for any hint/suggestion about this topic. >>> >>> Best regards, >>> >>> Marco >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Wed Oct 22 11:36:28 2014 From: david.lonie at kitware.com (David Lonie) Date: Wed, 22 Oct 2014 11:36:28 -0400 Subject: [vtkusers] Displaying the degree symbol "\u00B0" in vtkCornerAnnotation In-Reply-To: References: <1413905575866-5729197.post@n5.nabble.com> <20141021204924.1182207007@mail.rogue-research.com> Message-ID: Hi Alok, As for the differences between vtkCornerAnnotation and vtkTextActor, vtkCornerAnnotation uses the vtkTextMapper under the covers, which hasn't seen as much attention lately as the other classes. I don't have time at the moment to track down why the "\u00b0" literal is getting garbled, but I did notice that using "\xb0" instead seems to be work fine. It seems to be something screwy in the utf8 --> utf16 conversion before rendering... Try using "\xb0" instead and let me know if that works for you. Hope this helps, Dave On Tue, Oct 21, 2014 at 5:04 PM, Alok wrote: > I cloned the git repo some time time back and built from source > The vtkTextActor/vtkTextWidget seem to be working fine with unicode but I > see some other problems which make them unusable for me. > > Any recommendations on how to check the difference between > vtkCornerAnnotation and the vtkTextActor will be great. Seems like an easy > fix > > Thanks > > On Tue, Oct 21, 2014 at 4:49 PM, Sean McBride > wrote: > >> On Tue, 21 Oct 2014 12:46:15 -0400, Alok said: >> >> >I have been trying for a while to display a degree symbol in >> >vtkCornerAnnotation. >> > >> >The way I am trying to do it is like this: >> >std;:string angle = computeAngle()+"\u00B0"; >> >cornerAnnotation->SetText(3,angle.c_str()); //where cornerAnnotation if >> of >> >type vtkCornerAnnotation. >> > >> >This displays something like 50?? rather than 50? >> >When I display the string on a terminal it works as expected. >> >> In the past, VTK hasn't had very good Unicode support. I'm not sure >> where it stands today actually. What version of VTK are you using? You'll >> have the best results with the newest version I expect. >> >> Cheers, >> >> -- >> ____________________________________________________________ >> Sean McBride, B. Eng sean at rogue-research.com >> Rogue Research www.rogue-research.com >> Mac Software Developer Montr?al, Qu?bec, Canada >> >> >> > > > -- > I live a simple life... in 0s and 1s ! > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Oct 22 14:27:24 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 22 Oct 2014 14:27:24 -0400 Subject: [vtkusers] Overhaul of the rendering subsystem in VTK: Volume Rendering update In-Reply-To: References: Message-ID: Friends, Some more good news on the rendering side of things. In the last few days, we have worked on porting two more volume mappers to OpenGL2 (FixedPoint and Bunyk) and this noon we merged that code into VTK master. This change should not affect the code that is using the OpenGL (and not OpenGL2) backend. We will keep an eye on the dashboards and fix any issue that we may find. Also, we have updated the vtkSmartVolumeMapper to deal with the OpenGL and OpenGL2 backend. Please let us know if you have any questions or if you encounter any issues in the current master related to this change. Thanks, On Thu, Oct 16, 2014 at 12:31 PM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Friends, > > As referred earlier, we are continuously working on improving the volume > rendering. As part of next set of delivery, we are going to bring our > first OpenGL2 volume mapper to the OpenGL2 backend. > We have a branch that will get merged today and* it should only affect > the dashboards and code base switched to OpenGL2 backend*. We will > continue to improve the integration and will use and improve the > existing OpenGL2 backend code as necessary. > > If you have any questions of concerns or if you find in any ways its > affecting your regular builds that uses OpenGL(default, and not OpenGL2) > backend then let us know as soon as possible. > > Thanks, > > > On Fri, Oct 10, 2014 at 9:53 AM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> Friends, >> >> >> As reported back in July, we are in the process of a major overhaul of >> the rendering subsystem in VTK. The July article ( >> http://www.kitware.com/source/home/post/144) focused primarily on our >> efforts to move to OpenGL 2.1+ to support faster polygonal rendering. The >> October Source will contain an article focused on our rewrite of the >> vtkGPURayCastMapper class to provide a faster, more portable and more >> easily extensible volume mapper for regular rectilinear grids. >> >> >> >> VTK has a long history of volume rendering, and unfortunately that >> history is evident in the large selection of classes available to render >> volumes. Each of these methods was state-of-the-art at the time, but given >> VTK?s 20+ year history many of these methods are now quite obsolete. One >> goal of this effort is to reduce the number of volume mappers to ideally >> just two - one that supports accelerated rendering on graphics hardware and >> another that works in parallel on the CPU. In addition, the >> vtkSmartVolumeMapper would help application developers by automatically >> choosing between these techniques based on system performance. >> >> >> >> In this first phase, we have created a replacement for >> vtkGPURayCastMapper. Currently, this is available for testing from the VTK >> git repository (in master branch, disabled by default). General >> instructions on how to build VTK from the source is available at this URL: >> http://www.vtk.org/Wiki/VTK/Git*. *In order to build the new mapper, >> enable the Module_vtkRenderingVolumeOpenGLNew module in cmake (via -D >> *Module_vtkRenderingVolumeOpenGL=ON*), in ccmake or cmake-gui. Once >> built, it can be used via vtkSmartVolumeMapper or used directly. Once >> sufficient testing by the community has been performed, this class will >> replace the old vtkGPURayCastMapper. In addition, we are adding this new >> mapper to the OpenGL2 module. Availability of the new mapper with OpenGL2 >> module will improve the management of textures in the mapper and eventually >> benefitting both forms of rendering (geometry and volume) by sharing common >> code between them. >> >> >> Please contact us if you have any questions or encounter any issues. >> >> >> Thanks, >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From alok.theanomaly at gmail.com Wed Oct 22 14:40:34 2014 From: alok.theanomaly at gmail.com (Alok) Date: Wed, 22 Oct 2014 14:40:34 -0400 Subject: [vtkusers] Displaying the degree symbol "\u00B0" in vtkCornerAnnotation In-Reply-To: References: <1413905575866-5729197.post@n5.nabble.com> <20141021204924.1182207007@mail.rogue-research.com> Message-ID: That worked! Worked like a charm I cannot wrap my head around why I didnt try that myself Thanks Dave Much Appreciated On Wed, Oct 22, 2014 at 11:36 AM, David Lonie wrote: > Hi Alok, > > As for the differences between vtkCornerAnnotation and vtkTextActor, > vtkCornerAnnotation uses the vtkTextMapper under the covers, which hasn't > seen as much attention lately as the other classes. > > I don't have time at the moment to track down why the "\u00b0" literal is > getting garbled, but I did notice that using "\xb0" instead seems to be > work fine. It seems to be something screwy in the utf8 --> utf16 conversion > before rendering... > > Try using "\xb0" instead and let me know if that works for you. > > Hope this helps, > Dave > > On Tue, Oct 21, 2014 at 5:04 PM, Alok wrote: > >> I cloned the git repo some time time back and built from source >> The vtkTextActor/vtkTextWidget seem to be working fine with unicode but I >> see some other problems which make them unusable for me. >> >> Any recommendations on how to check the difference between >> vtkCornerAnnotation and the vtkTextActor will be great. Seems like an easy >> fix >> >> Thanks >> >> On Tue, Oct 21, 2014 at 4:49 PM, Sean McBride >> wrote: >> >>> On Tue, 21 Oct 2014 12:46:15 -0400, Alok said: >>> >>> >I have been trying for a while to display a degree symbol in >>> >vtkCornerAnnotation. >>> > >>> >The way I am trying to do it is like this: >>> >std;:string angle = computeAngle()+"\u00B0"; >>> >cornerAnnotation->SetText(3,angle.c_str()); //where cornerAnnotation if >>> of >>> >type vtkCornerAnnotation. >>> > >>> >This displays something like 50?? rather than 50? >>> >When I display the string on a terminal it works as expected. >>> >>> In the past, VTK hasn't had very good Unicode support. I'm not sure >>> where it stands today actually. What version of VTK are you using? You'll >>> have the best results with the newest version I expect. >>> >>> Cheers, >>> >>> -- >>> ____________________________________________________________ >>> Sean McBride, B. Eng sean at rogue-research.com >>> Rogue Research www.rogue-research.com >>> Mac Software Developer Montr?al, Qu?bec, Canada >>> >>> >>> >> >> >> -- >> I live a simple life... in 0s and 1s ! >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -- I live a simple life... in 0s and 1s ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdrummon at csir.co.za Fri Oct 24 13:09:02 2014 From: mdrummon at csir.co.za (Malcolm Drummond) Date: stn, 03 : 2000 10:01:45 +0200 Subject: Q: What is the sense in vtkGlyph3D, if it does not support custom-made source objects? Message-ID: Hi Mirco You could use vtkProgrammableGlyphFilter. There's a demo progGlyphs.tcl in the graphics directory >>> Mirco M?ller 03/31 4:20 PM >>> Greetings vtkusers-list! For the last couple of weeks I have been trying almost everything I can think of to force vtkGlyph3D to use a two-colored line as glyph for some vector values attached to some points. But the original colors (gradient from blue to white) I set for the line (this is a vtkPolyData) are always overridden by vtkGlyph3D. I simply cannot prevent vtkGlyph3D to do a "color-by-scalar/vector/scale" sort of thing. I do not want vtkGlyph3D to act like this. Is there really no other way than to customize the class vtkGlyph3D myself? Thanks in advance for your time and kind advice! Best regards... Mirco -------------------------------------------------------------------- This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to . For help, send message body containing "info vtkusers" to the same address. -------------------------------------------------------------------- -------------------------------------------------------------------- This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to . For help, send message body containing "info vtkusers" to the same address. -------------------------------------------------------------------- From matimontg at gmail.com Sat Oct 25 12:06:26 2014 From: matimontg at gmail.com (Matias Montroull) Date: Sat, 25 Oct 2014 13:06:26 -0300 Subject: [vtkusers] MRI-CT image fusion Message-ID: Hi, are there any examples of MR-CT Dicom image fusion? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From rabysam28 at gmail.com Sat Oct 25 12:15:21 2014 From: rabysam28 at gmail.com (Sam Raby) Date: Sat, 25 Oct 2014 11:15:21 -0500 Subject: [vtkusers] MRI-CT image fusion In-Reply-To: References: Message-ID: You may first read DICOM using this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOMSeries and then blend (or fuse) them using this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/CombineImages You may also need to resample (or more ideally register) them as well, depending on your dataset and depending on what you want. -S On Sat, Oct 25, 2014 at 11:06 AM, Matias Montroull wrote: > Hi, > > are there any examples of MR-CT Dicom image fusion? > > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sat Oct 25 12:16:41 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 25 Oct 2014 12:16:41 -0400 Subject: [vtkusers] MRI-CT image fusion In-Reply-To: References: Message-ID: I suggest you look at 3DSlicer. It is built on top of ITK and VTK. http://www.slicer.org/ On Sat, Oct 25, 2014 at 12:06 PM, Matias Montroull wrote: > Hi, > > are there any examples of MR-CT Dicom image fusion? > > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From rabysam28 at gmail.com Sat Oct 25 18:11:51 2014 From: rabysam28 at gmail.com (Sam Raby) Date: Sat, 25 Oct 2014 17:11:51 -0500 Subject: [vtkusers] units in VTK Message-ID: Hi, Consider an instant of vtkTubeFilter which has a method named "SetRadius". I was wondering how this Radius is related to millimeter? I am using vtkTubeFilter as an example but in general I wanted to know how units are involved in actors. -S -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Oct 25 18:43:33 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 25 Oct 2014 16:43:33 -0600 Subject: [vtkusers] units in VTK In-Reply-To: References: Message-ID: On Sat, Oct 25, 2014 at 4:11 PM, Sam Raby wrote: > Hi, > > Consider an instant of vtkTubeFilter which has a method named "SetRadius". > I was wondering how this Radius is related to millimeter? > > I am using vtkTubeFilter as an example but in general I wanted to know how > units are involved in actors. > The VTK filters have no units. It's the same as looking at the equation y = m*x + b and asking what the units are: all you can tell for certain is that 'y' and 'b' have the same units, and that 'm' has units of 'y/x'. Other than that, it's up to whoever is using the equation to decide on the units. VTK is the same. If you want to use millimeters, then set the radius in millimeters. Just make sure that you use millimeters everywhere else, too. Also make sure that all the files you load use millimeters. If they don't, you'll have to convert their units before you use them in your pipeline. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From rabysam28 at gmail.com Sat Oct 25 19:15:58 2014 From: rabysam28 at gmail.com (Sam Raby) Date: Sat, 25 Oct 2014 18:15:58 -0500 Subject: [vtkusers] units in VTK In-Reply-To: References: Message-ID: Thanks David. If a slice of DICOM is shown in 3D scene, and a tube actor is shown along with it, now I am not sure how to set the radius of the tube to be actually 5 mm, because DICOM image is also present there in the same scene and DICOM has a sense of unit. Should I "calibrate" the unit of the Tube? For example, I may end up concluding that if I set the radius of Tube to 1.4 then it is equal to 1 mm in DICOM image. -S On Sat, Oct 25, 2014 at 5:43 PM, David Gobbi wrote: > On Sat, Oct 25, 2014 at 4:11 PM, Sam Raby wrote: > >> Hi, >> >> Consider an instant of vtkTubeFilter which has a method named >> "SetRadius". I was wondering how this Radius is related to millimeter? >> >> I am using vtkTubeFilter as an example but in general I wanted to know >> how units are involved in actors. >> > > The VTK filters have no units. It's the same as looking at the > equation y = m*x + b and asking what the units are: all you can > tell for certain is that 'y' and 'b' have the same units, and that 'm' > has units of 'y/x'. Other than that, it's up to whoever is using the > equation to decide on the units. VTK is the same. > > If you want to use millimeters, then set the radius in millimeters. > Just make sure that you use millimeters everywhere else, too. > > Also make sure that all the files you load use millimeters. If they > don't, you'll have to convert their units before you use them in your > pipeline. > > - David > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Oct 25 19:52:25 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 25 Oct 2014 17:52:25 -0600 Subject: [vtkusers] units in VTK In-Reply-To: References: Message-ID: Hi Sam, You shouldn't have to perform any size calibration. If you load a DICOM file that uses millimeter units into VTK, then VTK ipso facto measures all physical distances in millimeters. If you have to set the radius to 1.4 in order to make it "fit" one millimeter, that suggests that the DICOM metadata has become corrupted somehow, either before being loaded into VTK, or after being loading into VTK. Make sure that the DICOM PixelSpacing is correct, and make sure that the after the DICOM is loaded into VTK, that the image data "Spacing" is also correct. - David On Sat, Oct 25, 2014 at 5:15 PM, Sam Raby wrote: > Thanks David. > If a slice of DICOM is shown in 3D scene, and a tube actor is shown along > with it, now I am not sure how to set the radius of the tube to be actually > 5 mm, because DICOM image is also present there in the same scene and DICOM > has a sense of unit. > > Should I "calibrate" the unit of the Tube? For example, I may end up > concluding that if I set the radius of Tube to 1.4 then it is equal to 1 mm > in DICOM image. > > -S > > On Sat, Oct 25, 2014 at 5:43 PM, David Gobbi > wrote: > >> On Sat, Oct 25, 2014 at 4:11 PM, Sam Raby wrote: >> >>> Hi, >>> >>> Consider an instant of vtkTubeFilter which has a method named >>> "SetRadius". I was wondering how this Radius is related to millimeter? >>> >>> I am using vtkTubeFilter as an example but in general I wanted to know >>> how units are involved in actors. >>> >> >> The VTK filters have no units. It's the same as looking at the >> equation y = m*x + b and asking what the units are: all you can >> tell for certain is that 'y' and 'b' have the same units, and that 'm' >> has units of 'y/x'. Other than that, it's up to whoever is using the >> equation to decide on the units. VTK is the same. >> >> If you want to use millimeters, then set the radius in millimeters. >> Just make sure that you use millimeters everywhere else, too. >> >> Also make sure that all the files you load use millimeters. If they >> don't, you'll have to convert their units before you use them in your >> pipeline. >> >> - David >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rabysam28 at gmail.com Sat Oct 25 22:51:05 2014 From: rabysam28 at gmail.com (Sam Raby) Date: Sat, 25 Oct 2014 21:51:05 -0500 Subject: [vtkusers] units in VTK In-Reply-To: References: Message-ID: Thanks David. OK. Then, if the actor is not coming from a VTK class such as vtkTubeFilter, but instead it is coming from an STL file (for example it is a model of catheter designed in SolidWork), then once this actor is shown in 3D scene next to the DICOM slice, the size of the actor (which is from the STL file) should make sense without having to be worried about any sort of calibration (unless the DICOM is corrupted). Did I get it right? -S On Sat, Oct 25, 2014 at 6:52 PM, David Gobbi wrote: > Hi Sam, > > You shouldn't have to perform any size calibration. If you load a DICOM > file that uses millimeter units into VTK, then VTK ipso facto measures all > physical distances in millimeters. > > If you have to set the radius to 1.4 in order to make it "fit" one > millimeter, > that suggests that the DICOM metadata has become corrupted somehow, > either before being loaded into VTK, or after being loading into VTK. > > Make sure that the DICOM PixelSpacing is correct, and make sure that > the after the DICOM is loaded into VTK, that the image data "Spacing" > is also correct. > > - David > > > > On Sat, Oct 25, 2014 at 5:15 PM, Sam Raby wrote: > >> Thanks David. >> If a slice of DICOM is shown in 3D scene, and a tube actor is shown along >> with it, now I am not sure how to set the radius of the tube to be actually >> 5 mm, because DICOM image is also present there in the same scene and DICOM >> has a sense of unit. >> >> Should I "calibrate" the unit of the Tube? For example, I may end up >> concluding that if I set the radius of Tube to 1.4 then it is equal to 1 mm >> in DICOM image. >> >> -S >> >> On Sat, Oct 25, 2014 at 5:43 PM, David Gobbi >> wrote: >> >>> On Sat, Oct 25, 2014 at 4:11 PM, Sam Raby wrote: >>> >>>> Hi, >>>> >>>> Consider an instant of vtkTubeFilter which has a method named >>>> "SetRadius". I was wondering how this Radius is related to millimeter? >>>> >>>> I am using vtkTubeFilter as an example but in general I wanted to know >>>> how units are involved in actors. >>>> >>> >>> The VTK filters have no units. It's the same as looking at the >>> equation y = m*x + b and asking what the units are: all you can >>> tell for certain is that 'y' and 'b' have the same units, and that 'm' >>> has units of 'y/x'. Other than that, it's up to whoever is using the >>> equation to decide on the units. VTK is the same. >>> >>> If you want to use millimeters, then set the radius in millimeters. >>> Just make sure that you use millimeters everywhere else, too. >>> >>> Also make sure that all the files you load use millimeters. If they >>> don't, you'll have to convert their units before you use them in your >>> pipeline. >>> >>> - David >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Oct 25 23:16:25 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 25 Oct 2014 21:16:25 -0600 Subject: [vtkusers] units in VTK In-Reply-To: References: Message-ID: Hi Sam, Yes, your summary is correct, with one caveat: the STL file format (unlike DICOM) does not specify units, so you have to trust that whoever created the file was using millimeters as their units. - David On Sat, Oct 25, 2014 at 8:51 PM, Sam Raby wrote: > Thanks David. > > OK. Then, if the actor is not coming from a VTK class such as > vtkTubeFilter, but instead it is coming from an STL file (for example it is > a model of catheter designed in SolidWork), then once this actor is shown > in 3D scene next to the DICOM slice, the size of the actor (which is from > the STL file) should make sense without having to be worried about any sort > of calibration (unless the DICOM is corrupted). > > Did I get it right? > > -S > > On Sat, Oct 25, 2014 at 6:52 PM, David Gobbi > wrote: > >> Hi Sam, >> >> You shouldn't have to perform any size calibration. If you load a DICOM >> file that uses millimeter units into VTK, then VTK ipso facto measures all >> physical distances in millimeters. >> >> If you have to set the radius to 1.4 in order to make it "fit" one >> millimeter, >> that suggests that the DICOM metadata has become corrupted somehow, >> either before being loaded into VTK, or after being loading into VTK. >> >> Make sure that the DICOM PixelSpacing is correct, and make sure that >> the after the DICOM is loaded into VTK, that the image data "Spacing" >> is also correct. >> >> - David >> >> >> >> On Sat, Oct 25, 2014 at 5:15 PM, Sam Raby wrote: >> >>> Thanks David. >>> If a slice of DICOM is shown in 3D scene, and a tube actor is shown >>> along with it, now I am not sure how to set the radius of the tube to be >>> actually 5 mm, because DICOM image is also present there in the same scene >>> and DICOM has a sense of unit. >>> >>> Should I "calibrate" the unit of the Tube? For example, I may end up >>> concluding that if I set the radius of Tube to 1.4 then it is equal to 1 mm >>> in DICOM image. >>> >>> -S >>> >>> On Sat, Oct 25, 2014 at 5:43 PM, David Gobbi >>> wrote: >>> >>>> On Sat, Oct 25, 2014 at 4:11 PM, Sam Raby wrote: >>>> >>>>> Hi, >>>>> >>>>> Consider an instant of vtkTubeFilter which has a method named >>>>> "SetRadius". I was wondering how this Radius is related to millimeter? >>>>> >>>>> I am using vtkTubeFilter as an example but in general I wanted to know >>>>> how units are involved in actors. >>>>> >>>> >>>> The VTK filters have no units. It's the same as looking at the >>>> equation y = m*x + b and asking what the units are: all you can >>>> tell for certain is that 'y' and 'b' have the same units, and that 'm' >>>> has units of 'y/x'. Other than that, it's up to whoever is using the >>>> equation to decide on the units. VTK is the same. >>>> >>>> If you want to use millimeters, then set the radius in millimeters. >>>> Just make sure that you use millimeters everywhere else, too. >>>> >>>> Also make sure that all the files you load use millimeters. If they >>>> don't, you'll have to convert their units before you use them in your >>>> pipeline. >>>> >>>> - David >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rabysam28 at gmail.com Sat Oct 25 23:34:45 2014 From: rabysam28 at gmail.com (Sam Raby) Date: Sat, 25 Oct 2014 22:34:45 -0500 Subject: [vtkusers] units in VTK In-Reply-To: References: Message-ID: Very helpful! Thank you! -S On Sat, Oct 25, 2014 at 10:16 PM, David Gobbi wrote: > Hi Sam, > > Yes, your summary is correct, with one caveat: the STL file format (unlike > DICOM) does not specify units, so you have to trust that whoever created > the file was using millimeters as their units. > > - David > > > On Sat, Oct 25, 2014 at 8:51 PM, Sam Raby wrote: > >> Thanks David. >> >> OK. Then, if the actor is not coming from a VTK class such as >> vtkTubeFilter, but instead it is coming from an STL file (for example it is >> a model of catheter designed in SolidWork), then once this actor is shown >> in 3D scene next to the DICOM slice, the size of the actor (which is from >> the STL file) should make sense without having to be worried about any sort >> of calibration (unless the DICOM is corrupted). >> >> Did I get it right? >> >> -S >> >> On Sat, Oct 25, 2014 at 6:52 PM, David Gobbi >> wrote: >> >>> Hi Sam, >>> >>> You shouldn't have to perform any size calibration. If you load a DICOM >>> file that uses millimeter units into VTK, then VTK ipso facto measures >>> all >>> physical distances in millimeters. >>> >>> If you have to set the radius to 1.4 in order to make it "fit" one >>> millimeter, >>> that suggests that the DICOM metadata has become corrupted somehow, >>> either before being loaded into VTK, or after being loading into VTK. >>> >>> Make sure that the DICOM PixelSpacing is correct, and make sure that >>> the after the DICOM is loaded into VTK, that the image data "Spacing" >>> is also correct. >>> >>> - David >>> >>> >>> >>> On Sat, Oct 25, 2014 at 5:15 PM, Sam Raby wrote: >>> >>>> Thanks David. >>>> If a slice of DICOM is shown in 3D scene, and a tube actor is shown >>>> along with it, now I am not sure how to set the radius of the tube to be >>>> actually 5 mm, because DICOM image is also present there in the same scene >>>> and DICOM has a sense of unit. >>>> >>>> Should I "calibrate" the unit of the Tube? For example, I may end up >>>> concluding that if I set the radius of Tube to 1.4 then it is equal to 1 mm >>>> in DICOM image. >>>> >>>> -S >>>> >>>> On Sat, Oct 25, 2014 at 5:43 PM, David Gobbi >>>> wrote: >>>> >>>>> On Sat, Oct 25, 2014 at 4:11 PM, Sam Raby wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Consider an instant of vtkTubeFilter which has a method named >>>>>> "SetRadius". I was wondering how this Radius is related to millimeter? >>>>>> >>>>>> I am using vtkTubeFilter as an example but in general I wanted to >>>>>> know how units are involved in actors. >>>>>> >>>>> >>>>> The VTK filters have no units. It's the same as looking at the >>>>> equation y = m*x + b and asking what the units are: all you can >>>>> tell for certain is that 'y' and 'b' have the same units, and that 'm' >>>>> has units of 'y/x'. Other than that, it's up to whoever is using the >>>>> equation to decide on the units. VTK is the same. >>>>> >>>>> If you want to use millimeters, then set the radius in millimeters. >>>>> Just make sure that you use millimeters everywhere else, too. >>>>> >>>>> Also make sure that all the files you load use millimeters. If they >>>>> don't, you'll have to convert their units before you use them in your >>>>> pipeline. >>>>> >>>>> - David >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.grabietz at img-online.de Sun Oct 26 03:23:13 2014 From: michael.grabietz at img-online.de (Michael Grabietz) Date: Sun, 26 Oct 2014 08:23:13 +0100 Subject: [vtkusers] Structured Grid: strange view of surface+edges Message-ID: <544CA161.4090000@img-online.de> Hello, I have a structured grid which seems to be well formed. If I load the vtk file with ParaView 4.2 some strange lines appear if the display mode surface+edges is selected. The modes surface, wireframe or points are looking good. I checked the data again and again. I cannot find any issue in the structured grid. I have attached the vtk file and some screenshots. I also viewed the grid with a small python application using VTK 6.1.0. It shows the same behaviour as ParaView 4.2. At the moment I do not have any idea how to go on. Any help is appreciated. Michael -------------- next part -------------- A non-text attachment was scrubbed... Name: surface+edges_2.jpg Type: image/jpeg Size: 125009 bytes Desc: not available URL: -------------- next part -------------- # vtk DataFile Version 3.0 vtk output ASCII DATASET STRUCTURED_GRID DIMENSIONS 21 19 1 POINTS 399 float 521.142 0 164.25 572.07 0 164.25 622.998 0 164.25 673.925 0 164.25 724.853 0 164.25 775.78 0 164.25 826.708 0 164.25 877.636 0 164.25 928.563 0 164.25 979.491 0 164.25 1030.42 0 164.25 1081.35 0 164.25 1132.27 0 164.25 1183.2 0 164.25 1234.13 0 164.25 1285.06 0 164.25 1335.98 0 164.25 1386.91 0 164.25 1437.84 0 164.25 1488.77 0 164.25 1539.69 0 164.25 521.142 446.332 164.25 572.07 446.332 164.25 622.998 446.332 164.25 673.925 446.332 164.25 724.853 446.332 164.25 775.78 446.332 164.25 826.708 446.332 164.25 877.636 446.332 164.25 928.563 446.332 164.25 979.491 446.332 164.25 1030.42 446.332 164.25 1081.35 446.332 164.25 1132.27 446.332 164.25 1183.2 446.332 164.25 1234.13 446.332 164.25 1285.06 446.332 164.25 1335.98 446.332 164.25 1386.91 446.332 164.25 1437.84 446.332 164.25 1488.77 446.332 164.25 1539.69 446.332 164.25 466.689 738.05 158 523.497 738.05 158 580.305 738.05 158 637.113 738.05 158 693.921 738.05 158 750.729 738.05 158 807.536 738.05 158 864.344 738.05 158 921.152 738.05 158 977.96 738.05 158 1034.77 738.05 158 1091.58 738.05 158 1148.38 738.05 158 1205.19 738.05 158 1262 738.05 158 1318.81 738.05 158 1375.62 738.05 158 1432.42 738.05 158 1489.23 738.05 158 1546.04 738.05 158 1602.85 738.05 158 411.408 1034.2 150.125 474.186 1034.2 150.125 536.963 1034.2 150.125 599.741 1034.2 150.125 662.518 1034.2 150.125 725.296 1034.2 150.125 788.074 1034.2 150.125 850.851 1034.2 150.125 913.629 1034.2 150.125 976.407 1034.2 150.125 1039.18 1034.2 150.125 1101.96 1034.2 150.125 1164.74 1034.2 150.125 1227.52 1034.2 150.125 1290.29 1034.2 150.125 1353.07 1034.2 150.125 1415.85 1034.2 150.125 1478.63 1034.2 150.125 1541.41 1034.2 150.125 1604.18 1034.2 150.125 1666.96 1034.2 150.125 356.976 1325.8 143.25 425.632 1325.8 143.25 494.288 1325.8 143.25 562.943 1325.8 143.25 631.599 1325.8 143.25 700.254 1325.8 143.25 768.91 1325.8 143.25 837.566 1325.8 143.25 906.221 1325.8 143.25 974.877 1325.8 143.25 1043.53 1325.8 143.25 1112.19 1325.8 143.25 1180.84 1325.8 143.25 1249.5 1325.8 143.25 1318.16 1325.8 143.25 1386.81 1325.8 143.25 1455.47 1325.8 143.25 1524.12 1325.8 143.25 1592.78 1325.8 143.25 1661.43 1325.8 143.25 1730.09 1325.8 143.25 339.852 1417.54 141.391 410.357 1417.54 141.391 480.862 1417.54 141.391 551.367 1417.54 141.391 621.871 1417.54 141.391 692.376 1417.54 141.391 762.881 1417.54 141.391 833.386 1417.54 141.391 903.891 1417.54 141.391 974.396 1417.54 141.391 1044.9 1417.54 141.391 1115.41 1417.54 141.391 1185.91 1417.54 141.391 1256.42 1417.54 141.391 1326.92 1417.54 141.391 1397.42 1417.54 141.391 1467.93 1417.54 141.391 1538.43 1417.54 141.391 1608.94 1417.54 141.391 1679.44 1417.54 141.391 1749.95 1417.54 141.391 346.891 1621.62 137.257 419.253 1621.62 137.257 491.615 1621.62 137.257 563.977 1621.62 137.257 636.339 1621.62 137.257 708.701 1621.62 137.257 781.063 1621.62 137.257 853.425 1621.62 137.257 925.787 1621.62 137.257 998.149 1621.62 137.257 1070.51 1621.62 137.257 1142.87 1621.62 137.257 1215.23 1621.62 137.257 1287.6 1621.62 137.257 1359.96 1621.62 137.257 1432.32 1621.62 137.257 1504.68 1621.62 137.257 1577.04 1621.62 137.257 1649.41 1621.62 137.257 1721.77 1621.62 137.257 1794.13 1621.62 137.257 346.936 1621.95 137.25 419.292 1621.95 137.25 491.648 1621.95 137.25 564.004 1621.95 137.25 636.36 1621.95 137.25 708.716 1621.95 137.25 781.073 1621.95 137.25 853.429 1621.95 137.25 925.785 1621.95 137.25 998.141 1621.95 137.25 1070.5 1621.95 137.25 1142.85 1621.95 137.25 1215.21 1621.95 137.25 1287.57 1621.95 137.25 1359.92 1621.95 137.25 1432.28 1621.95 137.25 1504.63 1621.95 137.25 1576.99 1621.95 137.25 1649.35 1621.95 137.25 1721.7 1621.95 137.25 1794.06 1621.95 137.25 409.784 2086.65 122.625 473.905 2086.65 122.625 538.026 2086.65 122.625 602.147 2086.65 122.625 666.269 2086.65 122.625 730.39 2086.65 122.625 794.511 2086.65 122.625 858.632 2086.65 122.625 922.753 2086.65 122.625 986.874 2086.65 122.625 1050.99 2086.65 122.625 1115.12 2086.65 122.625 1179.24 2086.65 122.625 1243.36 2086.65 122.625 1307.48 2086.65 122.625 1371.6 2086.65 122.625 1435.72 2086.65 122.625 1499.84 2086.65 122.625 1563.96 2086.65 122.625 1628.08 2086.65 122.625 1692.21 2086.65 122.625 475.101 2569.6 113.75 530.664 2569.6 113.75 586.226 2569.6 113.75 641.789 2569.6 113.75 697.351 2569.6 113.75 752.914 2569.6 113.75 808.477 2569.6 113.75 864.039 2569.6 113.75 919.602 2569.6 113.75 975.164 2569.6 113.75 1030.73 2569.6 113.75 1086.29 2569.6 113.75 1141.85 2569.6 113.75 1197.41 2569.6 113.75 1252.98 2569.6 113.75 1308.54 2569.6 113.75 1364.1 2569.6 113.75 1419.67 2569.6 113.75 1475.23 2569.6 113.75 1530.79 2569.6 113.75 1586.35 2569.6 113.75 551.169 3132.04 114.87 596.764 3132.04 114.87 642.36 3132.04 114.87 687.955 3132.04 114.87 733.551 3132.04 114.87 779.146 3132.04 114.87 824.741 3132.04 114.87 870.337 3132.04 114.87 915.932 3132.04 114.87 961.527 3132.04 114.87 1007.12 3132.04 114.87 1052.72 3132.04 114.87 1098.31 3132.04 114.87 1143.91 3132.04 114.87 1189.5 3132.04 114.87 1235.1 3132.04 114.87 1280.7 3132.04 114.87 1326.29 3132.04 114.87 1371.89 3132.04 114.87 1417.48 3132.04 114.87 1463.08 3132.04 114.87 551.501 3134.5 114.875 597.053 3134.5 114.875 642.605 3134.5 114.875 688.157 3134.5 114.875 733.708 3134.5 114.875 779.26 3134.5 114.875 824.812 3134.5 114.875 870.364 3134.5 114.875 915.916 3134.5 114.875 961.468 3134.5 114.875 1007.02 3134.5 114.875 1052.57 3134.5 114.875 1098.12 3134.5 114.875 1143.68 3134.5 114.875 1189.23 3134.5 114.875 1234.78 3134.5 114.875 1280.33 3134.5 114.875 1325.88 3134.5 114.875 1371.43 3134.5 114.875 1416.99 3134.5 114.875 1462.54 3134.5 114.875 567.419 3252.2 115.578 610.885 3252.2 115.578 654.352 3252.2 115.578 697.818 3252.2 115.578 741.284 3252.2 115.578 784.75 3252.2 115.578 828.216 3252.2 115.578 871.682 3252.2 115.578 915.148 3252.2 115.578 958.614 3252.2 115.578 1002.08 3252.2 115.578 1045.55 3252.2 115.578 1089.01 3252.2 115.578 1132.48 3252.2 115.578 1175.94 3252.2 115.578 1219.41 3252.2 115.578 1262.88 3252.2 115.578 1306.34 3252.2 115.578 1349.81 3252.2 115.578 1393.28 3252.2 115.578 1436.74 3252.2 115.578 642.081 3804.25 118.875 680.909 3804.25 118.875 719.736 3804.25 118.875 758.563 3804.25 118.875 797.39 3804.25 118.875 836.218 3804.25 118.875 875.045 3804.25 118.875 913.872 3804.25 118.875 952.699 3804.25 118.875 991.527 3804.25 118.875 1030.35 3804.25 118.875 1069.18 3804.25 118.875 1108.01 3804.25 118.875 1146.84 3804.25 118.875 1185.66 3804.25 118.875 1224.49 3804.25 118.875 1263.32 3804.25 118.875 1302.14 3804.25 118.875 1340.97 3804.25 118.875 1379.8 3804.25 118.875 1418.63 3804.25 118.875 743.75 4556 122.5 776.26 4556 122.5 808.771 4556 122.5 841.281 4556 122.5 873.791 4556 122.5 906.302 4556 122.5 938.812 4556 122.5 971.322 4556 122.5 1003.83 4556 122.5 1036.34 4556 122.5 1068.85 4556 122.5 1101.36 4556 122.5 1133.87 4556 122.5 1166.38 4556 122.5 1198.89 4556 122.5 1231.41 4556 122.5 1263.92 4556 122.5 1296.43 4556 122.5 1328.94 4556 122.5 1361.45 4556 122.5 1393.96 4556 122.5 743.75 4794.4 122.5 774.783 4794.4 122.5 805.816 4794.4 122.5 836.849 4794.4 122.5 867.881 4794.4 122.5 898.914 4794.4 122.5 929.947 4794.4 122.5 960.98 4794.4 122.5 992.013 4794.4 122.5 1023.05 4794.4 122.5 1054.08 4794.4 122.5 1085.11 4794.4 122.5 1116.14 4794.4 122.5 1147.18 4794.4 122.5 1178.21 4794.4 122.5 1209.24 4794.4 122.5 1240.28 4794.4 122.5 1271.31 4794.4 122.5 1302.34 4794.4 122.5 1333.37 4794.4 122.5 1364.41 4794.4 122.5 743.75 4827.31 122.5 774.783 4827.31 122.5 805.816 4827.31 122.5 836.849 4827.31 122.5 867.881 4827.31 122.5 898.914 4827.31 122.5 929.947 4827.31 122.5 960.98 4827.31 122.5 992.013 4827.31 122.5 1023.05 4827.31 122.5 1054.08 4827.31 122.5 1085.11 4827.31 122.5 1116.14 4827.31 122.5 1147.18 4827.31 122.5 1178.21 4827.31 122.5 1209.24 4827.31 122.5 1240.28 4827.31 122.5 1271.31 4827.31 122.5 1302.34 4827.31 122.5 1333.37 4827.31 122.5 1364.41 4827.31 122.5 743.75 4929.28 122.5 774.783 4929.28 122.5 805.816 4929.28 122.5 836.849 4929.28 122.5 867.881 4929.28 122.5 898.914 4929.28 122.5 929.947 4929.28 122.5 960.98 4929.28 122.5 992.013 4929.28 122.5 1023.05 4929.28 122.5 1054.08 4929.28 122.5 1085.11 4929.28 122.5 1116.14 4929.28 122.5 1147.18 4929.28 122.5 1178.21 4929.28 122.5 1209.24 4929.28 122.5 1240.28 4929.28 122.5 1271.31 4929.28 122.5 1302.34 4929.28 122.5 1333.37 4929.28 122.5 1364.41 4929.28 122.5 743.75 5000 122.5 774.783 5000 122.5 805.816 5000 122.5 836.849 5000 122.5 867.881 5000 122.5 898.914 5000 122.5 929.947 5000 122.5 960.98 5000 122.5 992.013 5000 122.5 1023.05 5000 122.5 1054.08 5000 122.5 1085.11 5000 122.5 1116.14 5000 122.5 1147.18 5000 122.5 1178.21 5000 122.5 1209.24 5000 122.5 1240.28 5000 122.5 1271.31 5000 122.5 1302.34 5000 122.5 1333.37 5000 122.5 1364.41 5000 122.5 From info at rriskml.com Sun Oct 26 11:43:24 2014 From: info at rriskml.com (Vall Herard) Date: Sun, 26 Oct 2014 15:43:24 +0000 Subject: [vtkusers] Experienced cmake, ccmake, and ctest consultant needed In-Reply-To: <1414265482675.62118@rriskml.com> References: <1414265482675.62118@rriskml.com> Message-ID: <1414338215102.43384@rriskml.com> ?Hi, Need an experienced cake and ccmake build master. Must be able to demonstrate skill set through a small problem we will assign to you before awarding the contract. This is a short term project that may lead to more work down the road. It requires linux (ubuntu) experience, CMake, CCmake, CTest, and C++ experience. You will be responsible for finishing the automation of the current semi-automated build environment on a linux server (ubuntu). To get the contract we will give you a third party library that you will be responsible for building for multiple OS (linux mac, and windows) using cmake/ccmake, integrate the build environment with svn and integrate an automated QA process through CTest. More information will be provided once you have provide evidence of your skill set. We need for this work to be done in a very short time hence why you need to have prior experience the cmake environment. Please reply to this email if you are interested. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Susanne.Schulz at dlr.de Mon Oct 27 05:49:37 2014 From: Susanne.Schulz at dlr.de (Susanne.Schulz at dlr.de) Date: Mon, 27 Oct 2014 09:49:37 +0000 Subject: [vtkusers] vtk with python Message-ID: <77D60934A6BDE84B81E99B02B43334AC173EF2F4@DLREXMBX01.intra.dlr.de> Hi, I downloaded vtkpython-6.1.0-Windows-64bit.exe and want to use it with Python 2.7 Where do I have to install VTK (or store ) ? In the Python-folder in Lib/site-packages ? Or in an extra folder? What else do I have to do before I can import vtk from a python script? Thanks in advance! Susanne Schulz -------------------------- Deutsches Zentrum f?r Luft- und Raumfahrt e.V. (DLR) Institut f?r Flugsystemtechnik | Unbemannte Luftfahrzeuge | Lilienthalplatz 7 | 38108 Braunschweig Susanne Schulz Telefon 0531 295-2683 | susanne.schulz at dlr.de DLR.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanie.gross18 at googlemail.com Mon Oct 27 07:00:20 2014 From: stefanie.gross18 at googlemail.com (Yuki) Date: Mon, 27 Oct 2014 04:00:20 -0700 (PDT) Subject: [vtkusers] Problems with VTK and Matlab Message-ID: <1414407620412-5729242.post@n5.nabble.com> Hi, I want to export some data generated in Matlab into a vtk file format. I want to visualize it using Paraview. The data in Matlab contains a grid and some scalar values. The export works for the grid however the scalar values are distorted and don't match their position on the grid. For the export I use an unstructured grid containing: points, cell-data, cell-type (tetrahedron) and scalars. Does anybody know why the scalar values don't match? -- View this message in context: http://vtk.1045678.n5.nabble.com/Problems-with-VTK-and-Matlab-tp5729242.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Mon Oct 27 07:13:58 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 27 Oct 2014 07:13:58 -0400 Subject: [vtkusers] Problems with VTK and Matlab In-Reply-To: <1414407620412-5729242.post@n5.nabble.com> References: <1414407620412-5729242.post@n5.nabble.com> Message-ID: Without seeing your data or code, my first thought is that indexing in MATLAB is based at 1 while VTK data structures are based at 0. Might that be the source of the problem? Thanks, Cory On Mon, Oct 27, 2014 at 7:00 AM, Yuki wrote: > Hi, > > I want to export some data generated in Matlab into a vtk file format. I > want to visualize it using Paraview. The data in Matlab contains a grid and > some scalar values. The export works for the grid however the scalar values > are distorted and don't match their position on the grid. > > For the export I use an unstructured grid containing: points, cell-data, > cell-type (tetrahedron) and scalars. Does anybody know why the scalar > values > don't match? > > > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Problems-with-VTK-and-Matlab-tp5729242.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tanakas at gmx.ch Mon Oct 27 09:57:44 2014 From: tanakas at gmx.ch (Tanaka Simon) Date: Mon, 27 Oct 2014 14:57:44 +0100 Subject: [vtkusers] [vtk] reading vtkMultiBlockDataSet Message-ID: <544E4F58.8030805@gmx.ch> Hello, I want to read a vtkMultiBlockDataSet and append some more blocks (vtkPolyData). How do I have to extract the blocks from the reader and how can I add new blocks? the (pseudo) code looks like this. Please have a look at the line with the red comment, the rest should be fine: vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("vtkMultiBlockDataSetWriter_output.vtm");{ reader->Update(); vtkSmartPointer linePolyData = vtkSmartPointer::New(); /* add some vtkLine to linePolyData */ vtkSmartPointer multiBDS_read = vtkSmartPointer::New (); multiBDS_read->SETBLOCKS(reader->GETBLOCKS()); // HOW CAN I TRANSFER THE BLOCKS FROM READER TO MULTIBDS_READER? multiBDS_read->(multiBDS->GetNumberOfBlocks(),linePolyData); // append one more block vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("vtkMultiBlockDataSetWriter_output.vtm"); writer->SetInput(multiBDS_read); writer->Write(); thanks s -------------- next part -------------- An HTML attachment was scrubbed... URL: From tanakas at gmx.ch Mon Oct 27 10:17:41 2014 From: tanakas at gmx.ch (Tanaka Simon) Date: Mon, 27 Oct 2014 15:17:41 +0100 Subject: [vtkusers] [vtk] reading vtkMultiBlockDataSet In-Reply-To: <544E4F58.8030805@gmx.ch> References: <544E4F58.8030805@gmx.ch> Message-ID: <544E5405.9030905@gmx.ch> i think found the solution: vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("vtkMultiBlockDataSetWriter_output.vtm");{ reader->Update(); vtkSmartPointer linePolyData = vtkSmartPointer::New(); /* add some vtkLine to linePolyData */ vtkSmartPointer multiBDS_read = vtkSmartPointer::New (); multiBDS_read->ShallowCopy(reader->GetOutput()); multiBDS_read->(multiBDS->GetNumberOfBlocks(),linePolyData); // append one more block vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("vtkMultiBlockDataSetWriter_output.vtm"); writer->SetInput(multiBDS_read); writer->Write(); On 27.10.2014 14:57, Tanaka Simon wrote: > Hello, I want to read a vtkMultiBlockDataSet and append some more > blocks (vtkPolyData). How do I have to extract the blocks from the > reader and how can I add new blocks? > > > > the (pseudo) code looks like this. Please have a look at the line with > the red comment, the rest should be fine: > > > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName("vtkMultiBlockDataSetWriter_output.vtm");{ > reader->Update(); > > vtkSmartPointer linePolyData = > vtkSmartPointer::New(); > /* add some vtkLine to linePolyData */ > > vtkSmartPointer multiBDS_read = > vtkSmartPointer::New (); > multiBDS_read->SETBLOCKS(reader->GETBLOCKS()); // HOW CAN I TRANSFER > THE BLOCKS FROM READER TO MULTIBDS_READER? > multiBDS_read->(multiBDS->GetNumberOfBlocks(),linePolyData); // append > one more block > > vtkSmartPointer writer = > vtkSmartPointer::New(); > writer->SetFileName("vtkMultiBlockDataSetWriter_output.vtm"); > writer->SetInput(multiBDS_read); > writer->Write(); > > > thanks > s > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From weifeng0715 at gmail.com Mon Oct 27 10:51:21 2014 From: weifeng0715 at gmail.com (weifeng0715) Date: Mon, 27 Oct 2014 07:51:21 -0700 (PDT) Subject: [vtkusers] How to automatically update render when the input data is changed? Message-ID: <1414421481476-5729250.post@n5.nabble.com> Dear All, I have the following program .h header file: class SimpleView : public QMainWindow { SimpleView(); ~SimpleView(); virtual void slotExecute(); vtkSmartPointer m_renderer; } .cpp source file: SimpleView::SimpleView() { m_renderer = vtkSmartPointer::New(); this->ui->qvtkWidget->GetRenderWindow()->AddRenderer(m_renderer); connect(this->ui->actionExecute, SIGNAL(triggered()), this, SLOT(slotExecute())); } void SimpleView::slotExecute() { VTK_CREATE(vtkAssembly,stlAssembly); m_renderer->AddActor(stlAssembly); m_renderer->AddActor2D(scalarBar); } So, slotExecute is triggered whenever I click the actionExecute button. What I want to do is to update the m_renderer whenever the content of stlAssembly is changed. The problem is that m_renderer would add many vtkAssembly files and scalarbar many times. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-automatically-update-render-when-the-input-data-is-changed-tp5729250.html Sent from the VTK - Users mailing list archive at Nabble.com. From dominik at itis.ethz.ch Mon Oct 27 12:23:54 2014 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Mon, 27 Oct 2014 17:23:54 +0100 Subject: [vtkusers] vtkLocal Message-ID: Hi, 1. In vtkLocal example I believe there is an error in the CMakeLists.txt: find_package(VTK vtkCommonCore) should be: find_package(VTK 6.1 COMPONENTS vtkCommonCore) or at least only so can I only configure the project using MSVC2012, else I get a cmake error that vtkCommonCore is invalid/not found. 2. README says "Also add any VTK modules used by your classes to the modules.cmake dependency list." Which modules.cmake do you mean? There is no such file in VTK source tree. Many thanks for clarifications. Best regards, Dominik From DLRdave at aol.com Mon Oct 27 14:28:48 2014 From: DLRdave at aol.com (David Cole) Date: Mon, 27 Oct 2014 14:28:48 -0400 Subject: [vtkusers] Fuzzy cuboid wireframe? Message-ID: It's easy to add an actor that displays a cuboid with a wireframe representation. Is it easy to make that wireframe look "fuzzy" instead of a sharp line? Thanks, David C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From majcjc at gmail.com Mon Oct 27 23:39:14 2014 From: majcjc at gmail.com (Lin M) Date: Tue, 28 Oct 2014 11:39:14 +0800 Subject: [vtkusers] questions about renderwindow size Message-ID: Hi guys, I met a problem which confused me. I tried to specify the window size by myself. But when I checked it later, the GetSize() always returned a value a little bit different from what I set before. I put the code below. I only called the renderwin to Render() before I checked the window size. It seems the Render() changes the window size. But I don't get why is that. Does anyone can help me about that? Thanks very much! vtkSmartPointer< vtkRenderWindow > _imgRenderWin = vtkSmartPointer< vtkRenderWindow >::New(); int _size[2] = { 700, 500 }; _imgRenderWin->SetSize(_size); _imgRenderWin->AddRenderer(_renderer); _imgRenderWin->Render(); int *_dim; _dim = _imgRenderWin->GetSize(); int _dimx = _dim[0]; int _dimy = _dim[1]; Best, Lin -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Oct 27 23:53:50 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 27 Oct 2014 21:53:50 -0600 Subject: [vtkusers] questions about renderwindow size In-Reply-To: References: Message-ID: Hi Lin, Calling Render() should not change the window size, and in fact if it did, then many of the nightly VTK tests would fail. This means that there must be something different about your computer as compared to the computers that are used to test VTK. So, the more information that you can provide about your system, the better! 1) What operating system are you using (be as specific as possible)? 2) What version of VTK are you using? 3) What size did GetSize() return? The exact numbers can be useful in figuring out what is causing the problem. 4) If possible, run "ctest" to test your VTK for other problems. - David On Mon, Oct 27, 2014 at 9:39 PM, Lin M wrote: > Hi guys, > > I met a problem which confused me. I tried to specify the window size by > myself. But when I checked it later, the GetSize() always returned a value > a little bit different from what I set before. I put the code below. I only > called the renderwin to Render() before I checked the window size. It seems > the Render() changes the window size. But I don't get why is that. Does > anyone can help me about that? Thanks very much! > > vtkSmartPointer< vtkRenderWindow > _imgRenderWin = vtkSmartPointer< > vtkRenderWindow >::New(); > int _size[2] = { 700, 500 }; > _imgRenderWin->SetSize(_size); > _imgRenderWin->AddRenderer(_renderer); > _imgRenderWin->Render(); > int *_dim; > _dim = _imgRenderWin->GetSize(); > int _dimx = _dim[0]; > int _dimy = _dim[1]; > > Best, > Lin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Oct 28 00:16:36 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 27 Oct 2014 22:16:36 -0600 Subject: [vtkusers] Fuzzy cuboid wireframe? In-Reply-To: References: Message-ID: On Mon, Oct 27, 2014 at 12:28 PM, David Cole via vtkusers wrote: > It's easy to add an actor that displays a cuboid with a wireframe > representation. > > Is it easy to make that wireframe look "fuzzy" instead of a sharp line? > You mean fuzzy as in furry, or fuzzy as in blurry? Or jittery? If you want jittery, here's how you can add jitter to any VTK polydata: Use a random point source e.g. vtkPointSource as the input to vtkGlyph3D, and use your polydata as the glyph. The output will be jittered polydata. You might be able to make it look fuzzy by tessellating it and then rendering it as points. For example: tessellate the frame, and then use it as the input to vtkGlyph3D while using random points from vtkPointSource as the glyph. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From majcjc at gmail.com Tue Oct 28 02:15:25 2014 From: majcjc at gmail.com (Lin M) Date: Tue, 28 Oct 2014 14:15:25 +0800 Subject: [vtkusers] questions about renderwindow size In-Reply-To: References: Message-ID: Hi David, 1) I'm using Win 8.1 pro 2) VTK version 5.10.1 3) It returned 692, 492 if I set size to 700, 500 Thank you. On Tue, Oct 28, 2014 at 11:53 AM, David Gobbi wrote: > Hi Lin, > > Calling Render() should not change the window size, and in fact if it did, > then many of the nightly VTK tests would fail. This means that there must > be something different about your computer as compared to the computers > that are used to test VTK. So, the more information that you can provide > about your system, the better! > > 1) What operating system are you using (be as specific as possible)? > 2) What version of VTK are you using? > 3) What size did GetSize() return? The exact numbers can be useful > in figuring out what is causing the problem. > 4) If possible, run "ctest" to test your VTK for other problems. > > - David > > > On Mon, Oct 27, 2014 at 9:39 PM, Lin M wrote: > >> Hi guys, >> >> I met a problem which confused me. I tried to specify the window size by >> myself. But when I checked it later, the GetSize() always returned a value >> a little bit different from what I set before. I put the code below. I only >> called the renderwin to Render() before I checked the window size. It seems >> the Render() changes the window size. But I don't get why is that. Does >> anyone can help me about that? Thanks very much! >> >> vtkSmartPointer< vtkRenderWindow > _imgRenderWin = vtkSmartPointer< >> vtkRenderWindow >::New(); >> int _size[2] = { 700, 500 }; >> _imgRenderWin->SetSize(_size); >> _imgRenderWin->AddRenderer(_renderer); >> _imgRenderWin->Render(); >> int *_dim; >> _dim = _imgRenderWin->GetSize(); >> int _dimx = _dim[0]; >> int _dimy = _dim[1]; >> >> Best, >> Lin >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars.bilke at ufz.de Tue Oct 28 04:20:06 2014 From: lars.bilke at ufz.de (Lars Bilke) Date: Tue, 28 Oct 2014 09:20:06 +0100 Subject: [vtkusers] Cast vtkTypedDataArrayIterator to vtkArrayIterator? Message-ID: I have a similar implementation of a vtkMappedDataArray as in vtkCPExodusIIResultsArrayTemplate (https://github.com/Kitware/VTK/blob/master/IO/Exodus/vtkCPExodusIIResultsArrayTemplate.txx). The mapped data array is part of a vtkMappedUnstructuredGrid as in https://github.com/gahansen/Albany/blob/master/src/disc/catalyst/Albany_Catalyst_Grid.hpp and so on. It works fine. Now I try to write the unstructured grid to a file which also works fine in binary mode. But when I switch the vtkXMLUnstructuredGridWriter to ascii mode the member vtkArrayIterator* NewIterator() of my vtkMappedDataArray needs to be implemented. I did not found an example of such an implementation. For now I came up with this: template vtkArrayIterator* VtkMappedElementDataArrayTemplate::NewIterator() { vtkTypedDataArrayIterator tdaBegin = vtkTypedDataArray::FastDownCast(this)->Begin(); return tdaBegin; } But compilation fails with error: no viable conversion from 'vtkTypedDataArrayIterator' to 'vtkArrayIterator *? If you want to have a look at my code: https://github.com/ufz/ogs/tree/master/InSituLib Thanks, Lars From DLRdave at aol.com Tue Oct 28 07:54:59 2014 From: DLRdave at aol.com (David Cole) Date: Tue, 28 Oct 2014 07:54:59 -0400 Subject: [vtkusers] Fuzzy cuboid wireframe? In-Reply-To: References: Message-ID: Thanks for the ideas. We're just looking for a way to make a sharp outline a little less "the focus of the scene" than it appears to be with the plain old line rendering. We were thinking blurry or diffuse. We'll give some of these a try. D On Tue, Oct 28, 2014 at 12:16 AM, David Gobbi wrote: > On Mon, Oct 27, 2014 at 12:28 PM, David Cole via vtkusers < > vtkusers at vtk.org> wrote: > >> It's easy to add an actor that displays a cuboid with a wireframe >> representation. >> >> Is it easy to make that wireframe look "fuzzy" instead of a sharp line? >> > > You mean fuzzy as in furry, or fuzzy as in blurry? Or jittery? > > If you want jittery, here's how you can add jitter to any VTK polydata: > > Use a random point source e.g. vtkPointSource as the input to vtkGlyph3D, > and use your polydata as the glyph. The output will be jittered polydata. > > You might be able to make it look fuzzy by tessellating it and then > rendering > it as points. For example: tessellate the frame, and then use it as the > input > to vtkGlyph3D while using random points from vtkPointSource as the glyph. > > - David > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Oct 28 09:18:03 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 28 Oct 2014 09:18:03 -0400 Subject: [vtkusers] Fuzzy cuboid wireframe? In-Reply-To: References: Message-ID: David, Channeling Tufte, it sounds like you have a case of chartjunk. Two potential solutions: 1). Remove the chartjunk. 2). Use the thinnest lines possible and pick a color that contrasts just slightly with the background. HTH, Cory On Tue, Oct 28, 2014 at 7:54 AM, David Cole via vtkusers wrote: > Thanks for the ideas. We're just looking for a way to make a sharp outline > a little less "the focus of the scene" than it appears to be with the plain > old line rendering. We were thinking blurry or diffuse. > > We'll give some of these a try. > > D > > > On Tue, Oct 28, 2014 at 12:16 AM, David Gobbi > wrote: > >> On Mon, Oct 27, 2014 at 12:28 PM, David Cole via vtkusers < >> vtkusers at vtk.org> wrote: >> >>> It's easy to add an actor that displays a cuboid with a wireframe >>> representation. >>> >>> Is it easy to make that wireframe look "fuzzy" instead of a sharp line? >>> >> >> You mean fuzzy as in furry, or fuzzy as in blurry? Or jittery? >> >> If you want jittery, here's how you can add jitter to any VTK polydata: >> >> Use a random point source e.g. vtkPointSource as the input to vtkGlyph3D, >> and use your polydata as the glyph. The output will be jittered polydata. >> >> You might be able to make it look fuzzy by tessellating it and then >> rendering >> it as points. For example: tessellate the frame, and then use it as the >> input >> to vtkGlyph3D while using random points from vtkPointSource as the glyph. >> >> - David >> >> >> >> >> >> >> >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlee1549 at gmail.com Tue Oct 28 09:18:22 2014 From: jlee1549 at gmail.com (Jeff Lee) Date: Tue, 28 Oct 2014 09:18:22 -0400 Subject: [vtkusers] Fuzzy cuboid wireframe? In-Reply-To: References: Message-ID: you probably want to make sure you get an opengl context that supports antialiasing, used to be renWin->SetMultiSamples(1) prior to first render so that you get the right context. On Tue, Oct 28, 2014 at 7:54 AM, David Cole via vtkusers wrote: > Thanks for the ideas. We're just looking for a way to make a sharp outline > a little less "the focus of the scene" than it appears to be with the plain > old line rendering. We were thinking blurry or diffuse. > > We'll give some of these a try. > > D > > > On Tue, Oct 28, 2014 at 12:16 AM, David Gobbi > wrote: > >> On Mon, Oct 27, 2014 at 12:28 PM, David Cole via vtkusers < >> vtkusers at vtk.org> wrote: >> >>> It's easy to add an actor that displays a cuboid with a wireframe >>> representation. >>> >>> Is it easy to make that wireframe look "fuzzy" instead of a sharp line? >>> >> >> You mean fuzzy as in furry, or fuzzy as in blurry? Or jittery? >> >> If you want jittery, here's how you can add jitter to any VTK polydata: >> >> Use a random point source e.g. vtkPointSource as the input to vtkGlyph3D, >> and use your polydata as the glyph. The output will be jittered polydata. >> >> You might be able to make it look fuzzy by tessellating it and then >> rendering >> it as points. For example: tessellate the frame, and then use it as the >> input >> to vtkGlyph3D while using random points from vtkPointSource as the glyph. >> >> - David >> >> >> >> >> >> >> >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Oct 28 09:25:40 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 28 Oct 2014 07:25:40 -0600 Subject: [vtkusers] questions about renderwindow size In-Reply-To: References: Message-ID: Hi Lin, It looks like this was a problem with VTK 5 on Windows 8. This was fixed in VTK 6.1, see the following patch: http://vtk.org/gitweb?p=VTK.git;a=commit;h=5f8b3c0c - David On Tue, Oct 28, 2014 at 12:15 AM, Lin M wrote: > Hi David, > > 1) I'm using Win 8.1 pro > 2) VTK version 5.10.1 > 3) It returned 692, 492 if I set size to 700, 500 > > Thank you. > > On Tue, Oct 28, 2014 at 11:53 AM, David Gobbi > wrote: > >> Hi Lin, >> >> Calling Render() should not change the window size, and in fact if it did, >> then many of the nightly VTK tests would fail. This means that there must >> be something different about your computer as compared to the computers >> that are used to test VTK. So, the more information that you can provide >> about your system, the better! >> >> 1) What operating system are you using (be as specific as possible)? >> 2) What version of VTK are you using? >> 3) What size did GetSize() return? The exact numbers can be useful >> in figuring out what is causing the problem. >> 4) If possible, run "ctest" to test your VTK for other problems. >> >> - David >> >> >> On Mon, Oct 27, 2014 at 9:39 PM, Lin M wrote: >> >>> Hi guys, >>> >>> I met a problem which confused me. I tried to specify the window size by >>> myself. But when I checked it later, the GetSize() always returned a value >>> a little bit different from what I set before. I put the code below. I only >>> called the renderwin to Render() before I checked the window size. It seems >>> the Render() changes the window size. But I don't get why is that. Does >>> anyone can help me about that? Thanks very much! >>> >>> vtkSmartPointer< vtkRenderWindow > _imgRenderWin = vtkSmartPointer< >>> vtkRenderWindow >::New(); >>> int _size[2] = { 700, 500 }; >>> _imgRenderWin->SetSize(_size); >>> _imgRenderWin->AddRenderer(_renderer); >>> _imgRenderWin->Render(); >>> int *_dim; >>> _dim = _imgRenderWin->GetSize(); >>> int _dimx = _dim[0]; >>> int _dimy = _dim[1]; >>> >>> Best, >>> Lin >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Tue Oct 28 10:30:28 2014 From: david.lonie at kitware.com (David Lonie) Date: Tue, 28 Oct 2014 10:30:28 -0400 Subject: [vtkusers] Cast vtkTypedDataArrayIterator to vtkArrayIterator? In-Reply-To: References: Message-ID: Hi Lars, The vtkArrayIterator class is very different from the vtkTypedDataArrayIterator. See the APIs in vtkTypedDataArrayIterator.h and vtkArrayIteratorTemplate.h. The former is an STL style iterator, while the latter uses a custom API for retrieving data. At this point, you'd need to write a new iterator implementation that matches the vtkArrayIterator API and somehow shoehorn some extra logic into vtkArrayIteratorTemplateMacro in vtkSetGet.h. This would be hacky, and to properly fix this the writer would likely need to be rewritten, since the vtkArrayIterator plumbing seems intrinsically tied to the vtkArrayIteratorTemplate class, which relies heavily on the horrible vtkDataArray::GetVoidPointer method. Is ascii mode required for your use case? If not, it would likely be much simpler to just use binary mode. Hope this helps, Dave On Tue, Oct 28, 2014 at 4:20 AM, Lars Bilke wrote: > I have a similar implementation of a vtkMappedDataArray as in > > vtkCPExodusIIResultsArrayTemplate ( > https://github.com/Kitware/VTK/blob/master/IO/Exodus/vtkCPExodusIIResultsArrayTemplate.txx > ). > > The mapped data array is part of a vtkMappedUnstructuredGrid as in > > > https://github.com/gahansen/Albany/blob/master/src/disc/catalyst/Albany_Catalyst_Grid.hpp > > and so on. It works fine. Now I try to write the unstructured grid to a > file which also works fine in binary mode. But when I switch the > vtkXMLUnstructuredGridWriter to ascii mode the member vtkArrayIterator* > NewIterator() of my vtkMappedDataArray needs to be implemented. I did not > found an example of such an implementation. For now I came up with this: > > template vtkArrayIterator* > VtkMappedElementDataArrayTemplate::NewIterator() > { > vtkTypedDataArrayIterator tdaBegin = > vtkTypedDataArray::FastDownCast(this)->Begin(); > return tdaBegin; > } > > But compilation fails with > > error: no viable conversion from 'vtkTypedDataArrayIterator' > to 'vtkArrayIterator *? > > If you want to have a look at my code: > > https://github.com/ufz/ogs/tree/master/InSituLib > > Thanks, > Lars > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominik at itis.ethz.ch Tue Oct 28 11:22:50 2014 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Tue, 28 Oct 2014 16:22:50 +0100 Subject: [vtkusers] vtkLocal In-Reply-To: References: Message-ID: I have located yet another problem. My VTK 6.1 is built with python wrapping, but when I build vtkLocalExample, no python wrapping is performed, even though the README promises it being done automatically. What is happening? Thanks for any hints 2014-10-27 17:23 GMT+01:00 Dominik Szczerba : > Hi, > > 1. In vtkLocal example I believe there is an error in the CMakeLists.txt: > > find_package(VTK vtkCommonCore) > > should be: > > find_package(VTK 6.1 COMPONENTS vtkCommonCore) > > or at least only so can I only configure the project using MSVC2012, > else I get a cmake error that vtkCommonCore is invalid/not found. > > 2. README says "Also add any VTK modules used by your classes to the > modules.cmake > dependency list." Which modules.cmake do you mean? There is no such > file in VTK source tree. > > Many thanks for clarifications. > > Best regards, > Dominik From DLRdave at aol.com Tue Oct 28 11:31:48 2014 From: DLRdave at aol.com (David Cole) Date: Tue, 28 Oct 2014 11:31:48 -0400 Subject: [vtkusers] Fuzzy cuboid wireframe? In-Reply-To: References: Message-ID: Thanks for the further advice. It's actually an interactive widget that allows the user to adjust something temporarily, so I'm not convinced chartjunk is quite right for it. ;-) Jeff Lee: I thought we already were multi-sampling, but it's possible we're not... I'll look into that first. Thanks, David C. On Tue, Oct 28, 2014 at 9:18 AM, Cory Quammen wrote: > David, > > Channeling Tufte, it sounds like you have a case of chartjunk. Two > potential solutions: > > 1). Remove the chartjunk. > > 2). Use the thinnest lines possible and pick a color that contrasts just > slightly with the background. > > HTH, > Cory > > On Tue, Oct 28, 2014 at 7:54 AM, David Cole via vtkusers > wrote: > >> Thanks for the ideas. We're just looking for a way to make a sharp >> outline a little less "the focus of the scene" than it appears to be with >> the plain old line rendering. We were thinking blurry or diffuse. >> >> We'll give some of these a try. >> >> D >> >> >> On Tue, Oct 28, 2014 at 12:16 AM, David Gobbi >> wrote: >> >>> On Mon, Oct 27, 2014 at 12:28 PM, David Cole via vtkusers < >>> vtkusers at vtk.org> wrote: >>> >>>> It's easy to add an actor that displays a cuboid with a wireframe >>>> representation. >>>> >>>> Is it easy to make that wireframe look "fuzzy" instead of a sharp line? >>>> >>> >>> You mean fuzzy as in furry, or fuzzy as in blurry? Or jittery? >>> >>> If you want jittery, here's how you can add jitter to any VTK polydata: >>> >>> Use a random point source e.g. vtkPointSource as the input to vtkGlyph3D, >>> and use your polydata as the glyph. The output will be jittered >>> polydata. >>> >>> You might be able to make it look fuzzy by tessellating it and then >>> rendering >>> it as points. For example: tessellate the frame, and then use it as the >>> input >>> to vtkGlyph3D while using random points from vtkPointSource as the glyph. >>> >>> - David >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Oct 28 11:53:58 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 28 Oct 2014 11:53:58 -0400 Subject: [vtkusers] Fuzzy cuboid wireframe? In-Reply-To: References: Message-ID: How about just making them translucent and increasing the line width a tad? David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Oct 28, 2014 at 9:18 AM, Jeff Lee wrote: > you probably want to make sure you get an opengl context that supports > antialiasing, used to be renWin->SetMultiSamples(1) prior to first render > so that you get the right context. > > On Tue, Oct 28, 2014 at 7:54 AM, David Cole via vtkusers > wrote: > >> Thanks for the ideas. We're just looking for a way to make a sharp >> outline a little less "the focus of the scene" than it appears to be with >> the plain old line rendering. We were thinking blurry or diffuse. >> >> We'll give some of these a try. >> >> D >> >> >> On Tue, Oct 28, 2014 at 12:16 AM, David Gobbi >> wrote: >> >>> On Mon, Oct 27, 2014 at 12:28 PM, David Cole via vtkusers < >>> vtkusers at vtk.org> wrote: >>> >>>> It's easy to add an actor that displays a cuboid with a wireframe >>>> representation. >>>> >>>> Is it easy to make that wireframe look "fuzzy" instead of a sharp line? >>>> >>> >>> You mean fuzzy as in furry, or fuzzy as in blurry? Or jittery? >>> >>> If you want jittery, here's how you can add jitter to any VTK polydata: >>> >>> Use a random point source e.g. vtkPointSource as the input to vtkGlyph3D, >>> and use your polydata as the glyph. The output will be jittered >>> polydata. >>> >>> You might be able to make it look fuzzy by tessellating it and then >>> rendering >>> it as points. For example: tessellate the frame, and then use it as the >>> input >>> to vtkGlyph3D while using random points from vtkPointSource as the glyph. >>> >>> - David >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Tue Oct 28 13:17:55 2014 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 28 Oct 2014 14:17:55 -0300 Subject: [vtkusers] MRI-CT image fusion In-Reply-To: References: Message-ID: Thanks Sam and Bill, I will try the suggestions and let you know what I come up with. On Sat, Oct 25, 2014 at 1:16 PM, Bill Lorensen wrote: > I suggest you look at 3DSlicer. It is built on top of ITK and VTK. > http://www.slicer.org/ > > > On Sat, Oct 25, 2014 at 12:06 PM, Matias Montroull > wrote: > > Hi, > > > > are there any examples of MR-CT Dicom image fusion? > > > > 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 > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Oct 28 13:59:56 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 28 Oct 2014 13:59:56 -0400 Subject: [vtkusers] vtkLocal In-Reply-To: References: Message-ID: Dominik, vtkLocal was overlooked back when modularization happened. There were some recent fixes in master a few weeks ago that may fix the problems you see. - Cory On Tue, Oct 28, 2014 at 11:22 AM, Dominik Szczerba wrote: > I have located yet another problem. My VTK 6.1 is built with python > wrapping, but when I build vtkLocalExample, no python wrapping is > performed, even though the README promises it being done > automatically. What is happening? > Thanks for any hints > > 2014-10-27 17:23 GMT+01:00 Dominik Szczerba : > > Hi, > > > > 1. In vtkLocal example I believe there is an error in the CMakeLists.txt: > > > > find_package(VTK vtkCommonCore) > > > > should be: > > > > find_package(VTK 6.1 COMPONENTS vtkCommonCore) > > > > or at least only so can I only configure the project using MSVC2012, > > else I get a cmake error that vtkCommonCore is invalid/not found. > > > > 2. README says "Also add any VTK modules used by your classes to the > > modules.cmake > > dependency list." Which modules.cmake do you mean? There is no such > > file in VTK source tree. > > > > Many thanks for clarifications. > > > > Best regards, > > Dominik > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Tue Oct 28 16:23:45 2014 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Tue, 28 Oct 2014 16:23:45 -0400 Subject: [vtkusers] display a thick shell of volume Message-ID: <544FFB51.6060906@rhpcs.mcmaster.ca> Hi VTK users, I want to volume render (using 3D texture mapper) a shell with specified thickness. Previously, I used vtkClipVolume twice, one clipped away the inner portion of a regular volume data, the other clipped away outer portion. The only problem is slow rendering speed because the resultant data is no longer a regular volume data. Can anyone suggest a better solution? Would it be faster if I used several spheres with texture mapped on them and alpha-blending? Thanks. Best, Weiguang From david.gobbi at gmail.com Tue Oct 28 17:20:27 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 28 Oct 2014 15:20:27 -0600 Subject: [vtkusers] display a thick shell of volume In-Reply-To: <544FFB51.6060906@rhpcs.mcmaster.ca> References: <544FFB51.6060906@rhpcs.mcmaster.ca> Message-ID: Hi Weiguang, You definitely want to avoid using vtkClipVolume before volume rendering, because it produces vtkUnstructuredGrid data instead of image data. If you need a shell, you can use vtkImageGaussianSource to create an image of a Gaussian, and then threshold it with lower and upper thresholds to create a shell. A Gaussian has radial symmetry, so thresholding will create a binary image of a spherical shell. You can then multiply this shell by your image. Or, instead of using vtkClipVolume, you can use vtkImplicitFunctionToImageStencil with vtkImageStencil. The output will be a vtkImageData. Or, for greater efficiency, use vtkROIStencilSource to create a spherical (ellipsoidal) stencil for vtkImageStencil. Or, possibly the easiest "quick fix" would be to convert the vtkUnstructuredGrid that you already have into a vtkImageData by using vtkProbeFilter. The vtkProbeFilter is a generic filter for copying (or interpolating) scalar data from one kind of data set onto another kind of data set. - David On Tue, Oct 28, 2014 at 2:23 PM, Weiguang Guan wrote: > Hi VTK users, > > I want to volume render (using 3D texture mapper) a shell with specified > thickness. Previously, I used vtkClipVolume twice, one clipped away the > inner portion of a regular volume data, the other clipped away outer > portion. The only problem is slow rendering speed because the resultant > data is no longer a regular volume data. > > Can anyone suggest a better solution? Would it be faster if I used several > spheres with texture mapped on them and alpha-blending? Thanks. > > Best, > Weiguang > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karanovicm at gmail.com Tue Oct 28 22:59:36 2014 From: karanovicm at gmail.com (KM) Date: Tue, 28 Oct 2014 19:59:36 -0700 (PDT) Subject: [vtkusers] ActiViz 5.8.0 recurring random AccessViolationException In-Reply-To: References: Message-ID: <1414551576904-5729273.post@n5.nabble.com> Hi I'm having the same issue in my application, any chance you found what was the problem Thanks MK -- View this message in context: http://vtk.1045678.n5.nabble.com/ActiViz-5-8-0-recurring-random-AccessViolationException-tp5728668p5729273.html Sent from the VTK - Users mailing list archive at Nabble.com. From lars.bilke at ufz.de Wed Oct 29 03:14:39 2014 From: lars.bilke at ufz.de (Lars Bilke) Date: Wed, 29 Oct 2014 08:14:39 +0100 Subject: [vtkusers] Cast vtkTypedDataArrayIterator to vtkArrayIterator? In-Reply-To: References: Message-ID: Hi David, thanks a lot for your explanation! I already assumed that this would not be an easy task ... But I found an easy workaround: If I write ascii files then I deep copy the mapped grid to a regular vtkUnstructuredGrid and write out this temporary. This fits our needs because ascii files will just be written out for debugging purposes and if the grid is relatively small. Best, Lars > Am 28.10.2014 um 15:30 schrieb David Lonie : > > Hi Lars, > > The vtkArrayIterator class is very different from the vtkTypedDataArrayIterator. See the APIs in vtkTypedDataArrayIterator.h and vtkArrayIteratorTemplate.h. The former is an STL style iterator, while the latter uses a custom API for retrieving data. > > At this point, you'd need to write a new iterator implementation that matches the vtkArrayIterator API and somehow shoehorn some extra logic into vtkArrayIteratorTemplateMacro in vtkSetGet.h. This would be hacky, and to properly fix this the writer would likely need to be rewritten, since the vtkArrayIterator plumbing seems intrinsically tied to the vtkArrayIteratorTemplate class, which relies heavily on the horrible vtkDataArray::GetVoidPointer method. > > Is ascii mode required for your use case? If not, it would likely be much simpler to just use binary mode. > > Hope this helps, > Dave > > On Tue, Oct 28, 2014 at 4:20 AM, Lars Bilke wrote: > I have a similar implementation of a vtkMappedDataArray as in > > vtkCPExodusIIResultsArrayTemplate (https://github.com/Kitware/VTK/blob/master/IO/Exodus/vtkCPExodusIIResultsArrayTemplate.txx). > > The mapped data array is part of a vtkMappedUnstructuredGrid as in > > https://github.com/gahansen/Albany/blob/master/src/disc/catalyst/Albany_Catalyst_Grid.hpp > > and so on. It works fine. Now I try to write the unstructured grid to a file which also works fine in binary mode. But when I switch the vtkXMLUnstructuredGridWriter to ascii mode the member vtkArrayIterator* NewIterator() of my vtkMappedDataArray needs to be implemented. I did not found an example of such an implementation. For now I came up with this: > > template vtkArrayIterator* > VtkMappedElementDataArrayTemplate::NewIterator() > { > vtkTypedDataArrayIterator tdaBegin = vtkTypedDataArray::FastDownCast(this)->Begin(); > return tdaBegin; > } > > But compilation fails with > > error: no viable conversion from 'vtkTypedDataArrayIterator' to 'vtkArrayIterator *? > > If you want to have a look at my code: > > https://github.com/ufz/ogs/tree/master/InSituLib > > Thanks, > Lars > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From pattersonnp at gmail.com Wed Oct 29 07:11:33 2014 From: pattersonnp at gmail.com (Nick Patterson) Date: Wed, 29 Oct 2014 11:11:33 +0000 Subject: [vtkusers] Multiple vtkPolygons in a vtkPolyData Message-ID: <5F7A6891-FE79-48F9-972F-E9C292A6B723@gmail.com> Dear VTK Users, I have been having some trouble with handling polygons in VTK and hoped that someone can offer some guidance. I wish to do the following:- 1) Read some contours (structures) from a DICOM file - these are essentially polygons drawn on 2D slices. ( I have completed this task and have the ability to extract the x,y,z point of each vertex from a DICOM RTStruct) There are approximately 250 polygons. 2) I want to add these coordinate positions to create a vtkPolygon 3) I want add each vtkPolygon object to a vtkPolyData 4) Render the polygons. ( I can probably deal with this ). Up until now I have been using the http://www.itk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Polygon example and trying to adapt it. Can anyone advise how I would modify this segment of code (taken straight from the code in the link above) so that it would be generic that I can add multiple independent polygons (in the example I am working with there are approximately 250 polygons) to the vtkPolyData. vtkSmartPointer points = vtkSmartPointer::New(); points->InsertNextPoint(0.0, 0.0, 0.0); points->InsertNextPoint(1.0, 0.0, 0.0); points->InsertNextPoint(1.0, 1.0, 0.0); points->InsertNextPoint(0.0, 1.0, 0.0); // Create the polygon vtkSmartPointer polygon = vtkSmartPointer::New(); polygon->GetPointIds()->SetNumberOfIds(4); //make a quad polygon->GetPointIds()->SetId(0, 0); polygon->GetPointIds()->SetId(1, 1); polygon->GetPointIds()->SetId(2, 2); polygon->GetPointIds()->SetId(3, 3); // Add the polygon to a list of polygons vtkSmartPointer polygons = vtkSmartPointer::New(); polygons->InsertNextCell(polygon); // Create a PolyData vtkSmartPointer polygonPolyData = vtkSmartPointer::New(); polygonPolyData->SetPoints(points); polygonPolyData->SetPolys(polygons); I hope my problem is clear, but am happy to clarify if you think you are able to offer guidance which would be much appreciated. Regards, Nick. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tanakas at gmx.ch Wed Oct 29 08:25:25 2014 From: tanakas at gmx.ch (Tanaka Simon) Date: Wed, 29 Oct 2014 13:25:25 +0100 Subject: [vtkusers] [vtk] reading vtkMultiBlockDataSet In-Reply-To: <544E5405.9030905@gmx.ch> References: <544E4F58.8030805@gmx.ch> <544E5405.9030905@gmx.ch> Message-ID: <5450DCB5.5010404@gmx.ch> Hello, i have one more question: why does the following line work (see below for the context)? multiBDS_read->ShallowCopy(reader->GetOutput()); why does ShallowCopy copies all the content to multiBDS_read (as compared to DeepCopy)? thanks simon On 27.10.2014 15:17, Tanaka Simon wrote > i think found the solution: > > > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName("vtkMultiBlockDataSetWriter_output.vtm");{ > reader->Update(); > > vtkSmartPointer linePolyData = > vtkSmartPointer::New(); > /* add some vtkLine to linePolyData */ > > vtkSmartPointer multiBDS_read = > vtkSmartPointer::New (); > multiBDS_read->ShallowCopy(reader->GetOutput()); > multiBDS_read->(multiBDS->GetNumberOfBlocks(),linePolyData); // append > one more block > > vtkSmartPointer writer = > vtkSmartPointer::New(); > writer->SetFileName("vtkMultiBlockDataSetWriter_output.vtm"); > writer->SetInput(multiBDS_read); > writer->Write(); > > > > > On 27.10.2014 14:57, Tanaka Simon wrote: >> Hello, I want to read a vtkMultiBlockDataSet and append some more >> blocks (vtkPolyData). How do I have to extract the blocks from the >> reader and how can I add new blocks? >> >> >> >> the (pseudo) code looks like this. Please have a look at the line >> with the red comment, the rest should be fine: >> >> >> vtkSmartPointer reader = >> vtkSmartPointer::New(); >> reader->SetFileName("vtkMultiBlockDataSetWriter_output.vtm");{ >> reader->Update(); >> >> vtkSmartPointer linePolyData = >> vtkSmartPointer::New(); >> /* add some vtkLine to linePolyData */ >> >> vtkSmartPointer multiBDS_read = >> vtkSmartPointer::New (); >> multiBDS_read->SETBLOCKS(reader->GETBLOCKS()); // HOW CAN I TRANSFER >> THE BLOCKS FROM READER TO MULTIBDS_READER? >> multiBDS_read->(multiBDS->GetNumberOfBlocks(),linePolyData); // >> append one more block >> >> vtkSmartPointer writer = >> vtkSmartPointer::New(); >> writer->SetFileName("vtkMultiBlockDataSetWriter_output.vtm"); >> writer->SetInput(multiBDS_read); >> writer->Write(); >> >> >> thanks >> s >> >> >> >> >> >> >> >> _______________________________________________ >> Powered bywww.kitware.com >> >> Visit other Kitware open-source projects athttp://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at:http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From geeta_kapse at yahoo.com Wed Oct 29 08:45:41 2014 From: geeta_kapse at yahoo.com (Geeta) Date: Wed, 29 Oct 2014 05:45:41 -0700 (PDT) Subject: [vtkusers] Need help to use vtkAxesTransformWidget class Message-ID: <1414586741161-5729277.post@n5.nabble.com> Want to use vtkAxesTransformWidget class. Added following code in Simple C exe.. int main (int, char *[]) { // A renderer and render window vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow =vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); // An interactor vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderWindow->Render(); vtkSmartPointer axesTransWidget = vtkSmartPointer::New(); axesTransWidget->SetInteractor(renderWindowInteractor); axesTransWidget->CreateDefaultRepresentation(); axesTransWidget->On(); renderWindowInteractor->Initialize(); renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } But getting following error at line " renderWindow->Render()" ERROR: In ..\..\VTK\Hybrid\vtkVectorText.cxx, line 1728 vtkVectorText (05D2B040): Text is not set! ERROR: In ..\..\VTK\Filtering\vtkExecutive.cxx, line 756 vtkStreamingDemandDrivenPipeline (05D2BA48): Algorithm vtkVectorText(05D2B040) returned failure for request: vtkInformation (05D496B8) Debug: Off Modified Time: 3052 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA FROM_OUTPUT_PORT: 0 ALGORITHM_AFTER_FORWARD: 1 FORWARD_DIRECTION: 0 -- View this message in context: http://vtk.1045678.n5.nabble.com/Need-help-to-use-vtkAxesTransformWidget-class-tp5729277.html Sent from the VTK - Users mailing list archive at Nabble.com. From DLRdave at aol.com Wed Oct 29 08:56:03 2014 From: DLRdave at aol.com (David Cole) Date: Wed, 29 Oct 2014 08:56:03 -0400 Subject: [vtkusers] Multiple vtkPolygons in a vtkPolyData In-Reply-To: <5F7A6891-FE79-48F9-972F-E9C292A6B723@gmail.com> References: <5F7A6891-FE79-48F9-972F-E9C292A6B723@gmail.com> Message-ID: You should be able to put all of the points and all of the polygons into your existing "points" and "polygons" variables, and have just one polydata that refers to all of them at once. Or: See this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/CombinePolyData And the documentation for the append and clean polydata filters: http://www.vtk.org/doc/nightly/html/classvtkAppendPolyData.html http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html The vtkAppendPolyData filter produces a single polydata output from many input polydata objects. HTH, David C. On Wed, Oct 29, 2014 at 7:11 AM, Nick Patterson wrote: > Dear VTK Users, > > I have been having some trouble with handling polygons in VTK and hoped > that someone can offer some guidance. > > I wish to do the following:- > 1) Read some contours (structures) from a DICOM file - these are > essentially polygons drawn on 2D slices. *( I have completed this task > and have the ability to extract the x,y,z point of each vertex from a DICOM > RTStruct)* There are approximately 250 polygons. > > 2) I want to add these coordinate positions to create a vtkPolygon > > 3) I want add each vtkPolygon object to a vtkPolyData > > 4) Render the polygons. ( I can probably deal with this ). > > Up until now I have been using the > http://www.itk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Polygon example > and trying to adapt it. > > Can anyone advise how I would modify this segment of code (taken straight > from the code in the link above) so that it would be generic that I can add > multiple independent polygons (in the example I am working with there are > approximately 250 polygons) to the vtkPolyData. > > vtkSmartPointer points = > vtkSmartPointer::New(); > points->InsertNextPoint(0.0, 0.0, 0.0); > points->InsertNextPoint(1.0, 0.0, 0.0); > points->InsertNextPoint(1.0, 1.0, 0.0); > points->InsertNextPoint(0.0, 1.0, 0.0); > > // Create the polygon > vtkSmartPointer polygon = > vtkSmartPointer::New(); > polygon->GetPointIds()->SetNumberOfIds(4); //make a quad > polygon->GetPointIds()->SetId(0, 0); > polygon->GetPointIds()->SetId(1, 1); > polygon->GetPointIds()->SetId(2, 2); > polygon->GetPointIds()->SetId(3, 3); > > // Add the polygon to a list of polygons > vtkSmartPointer polygons = > vtkSmartPointer::New(); > polygons->InsertNextCell(polygon); > > // Create a PolyData > vtkSmartPointer polygonPolyData = > vtkSmartPointer::New(); > polygonPolyData->SetPoints(points); > polygonPolyData->SetPolys(polygons); > > > > I hope my problem is clear, but am happy to clarify if you think you are > able to offer guidance which would be much appreciated. > > Regards, Nick. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Wed Oct 29 09:42:27 2014 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Wed, 29 Oct 2014 09:42:27 -0400 Subject: [vtkusers] display a thick shell of volume In-Reply-To: References: <544FFB51.6060906@rhpcs.mcmaster.ca> Message-ID: <5450EEC3.4060309@rhpcs.mcmaster.ca> David, you have suggested the best solution to my problem. Thank you very much. Best, Weiguang On 28/10/2014 5:20 PM, David Gobbi wrote: > Hi Weiguang, > > You definitely want to avoid using vtkClipVolume before volume > rendering, because it produces vtkUnstructuredGrid data instead of > image data. > > If you need a shell, you can use vtkImageGaussianSource to create an > image of a Gaussian, and then threshold it with lower and upper > thresholds to create a shell. A Gaussian has radial symmetry, so > thresholding will create a binary image of a spherical shell. You > can then multiply this shell by your image. > > Or, instead of using vtkClipVolume, you can use > vtkImplicitFunctionToImageStencil with vtkImageStencil. The output > will be a vtkImageData. Or, for greater efficiency, use > vtkROIStencilSource to create a spherical (ellipsoidal) stencil for > vtkImageStencil. > > Or, possibly the easiest "quick fix" would be to convert the > vtkUnstructuredGrid that you already have into a vtkImageData by using > vtkProbeFilter. The vtkProbeFilter is a generic filter for copying > (or interpolating) scalar data from one kind of data set onto another > kind of data set. > > - David > > > > On Tue, Oct 28, 2014 at 2:23 PM, Weiguang Guan > > wrote: > > Hi VTK users, > > I want to volume render (using 3D texture mapper) a shell with > specified thickness. Previously, I used vtkClipVolume twice, one > clipped away the inner portion of a regular volume data, the other > clipped away outer portion. The only problem is slow rendering > speed because the resultant data is no longer a regular volume data. > > Can anyone suggest a better solution? Would it be faster if I used > several spheres with texture mapped on them and alpha-blending? > Thanks. > > Best, > Weiguang > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Oct 29 12:21:49 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 29 Oct 2014 10:21:49 -0600 Subject: [vtkusers] display a thick shell of volume In-Reply-To: <54511153.407@rhpcs.mcmaster.ca> References: <544FFB51.6060906@rhpcs.mcmaster.ca> <54511153.407@rhpcs.mcmaster.ca> Message-ID: Hi Weiguang, There aren't any filters for combining vtkImageStencilData (there should be!), so instead you will need to use two vtkImageStencil filters in series: one for the first vtkImplicitFunctionToImageStencil output, and then another for the second. - David On Wed, Oct 29, 2014 at 10:09 AM, Weiguang Guan wrote: > Hi David, > > How to combine the outputs from two vtkImplicitFunctionToImageStencil > instances as I need to use two spheres to define a shell? Thanks. > > Best, > Weiguang > > On 28/10/2014 5:20 PM, David Gobbi wrote: > > Hi Weiguang, > > You definitely want to avoid using vtkClipVolume before volume > rendering, because it produces vtkUnstructuredGrid data instead of image > data. > > If you need a shell, you can use vtkImageGaussianSource to create an > image of a Gaussian, and then threshold it with lower and upper thresholds > to create a shell. A Gaussian has radial symmetry, so thresholding will > create a binary image of a spherical shell. You can then multiply this > shell by your image. > > Or, instead of using vtkClipVolume, you can use > vtkImplicitFunctionToImageStencil with vtkImageStencil. The output will be > a vtkImageData. Or, for greater efficiency, use vtkROIStencilSource to > create a spherical (ellipsoidal) stencil for vtkImageStencil. > > Or, possibly the easiest "quick fix" would be to convert the > vtkUnstructuredGrid that you already have into a vtkImageData by using > vtkProbeFilter. The vtkProbeFilter is a generic filter for copying (or > interpolating) scalar data from one kind of data set onto another kind of > data set. > > - David > > > > On Tue, Oct 28, 2014 at 2:23 PM, Weiguang Guan > wrote: > >> Hi VTK users, >> >> I want to volume render (using 3D texture mapper) a shell with specified >> thickness. Previously, I used vtkClipVolume twice, one clipped away the >> inner portion of a regular volume data, the other clipped away outer >> portion. The only problem is slow rendering speed because the resultant >> data is no longer a regular volume data. >> >> Can anyone suggest a better solution? Would it be faster if I used >> several spheres with texture mapped on them and alpha-blending? Thanks. >> >> Best, >> Weiguang >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Wed Oct 29 12:09:55 2014 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Wed, 29 Oct 2014 12:09:55 -0400 Subject: [vtkusers] display a thick shell of volume In-Reply-To: References: <544FFB51.6060906@rhpcs.mcmaster.ca> Message-ID: <54511153.407@rhpcs.mcmaster.ca> Hi David, How to combine the outputs from two vtkImplicitFunctionToImageStencil instances as I need to use two spheres to define a shell? Thanks. Best, Weiguang On 28/10/2014 5:20 PM, David Gobbi wrote: > Hi Weiguang, > > You definitely want to avoid using vtkClipVolume before volume > rendering, because it produces vtkUnstructuredGrid data instead of > image data. > > If you need a shell, you can use vtkImageGaussianSource to create an > image of a Gaussian, and then threshold it with lower and upper > thresholds to create a shell. A Gaussian has radial symmetry, so > thresholding will create a binary image of a spherical shell. You > can then multiply this shell by your image. > > Or, instead of using vtkClipVolume, you can use > vtkImplicitFunctionToImageStencil with vtkImageStencil. The output > will be a vtkImageData. Or, for greater efficiency, use > vtkROIStencilSource to create a spherical (ellipsoidal) stencil for > vtkImageStencil. > > Or, possibly the easiest "quick fix" would be to convert the > vtkUnstructuredGrid that you already have into a vtkImageData by using > vtkProbeFilter. The vtkProbeFilter is a generic filter for copying > (or interpolating) scalar data from one kind of data set onto another > kind of data set. > > - David > > > > On Tue, Oct 28, 2014 at 2:23 PM, Weiguang Guan > > wrote: > > Hi VTK users, > > I want to volume render (using 3D texture mapper) a shell with > specified thickness. Previously, I used vtkClipVolume twice, one > clipped away the inner portion of a regular volume data, the other > clipped away outer portion. The only problem is slow rendering > speed because the resultant data is no longer a regular volume data. > > Can anyone suggest a better solution? Would it be faster if I used > several spheres with texture mapped on them and alpha-blending? > Thanks. > > Best, > Weiguang > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Wed Oct 29 13:00:10 2014 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Wed, 29 Oct 2014 13:00:10 -0400 Subject: [vtkusers] display a thick shell of volume In-Reply-To: References: <544FFB51.6060906@rhpcs.mcmaster.ca> <54511153.407@rhpcs.mcmaster.ca> Message-ID: <54511D1A.8070402@rhpcs.mcmaster.ca> Thanks again, David, have a great day! Best, Weiguang On 29/10/2014 12:21 PM, David Gobbi wrote: > Hi Weiguang, > > There aren't any filters for combining vtkImageStencilData (there > should be!), so instead you will need to use two vtkImageStencil > filters in series: one for the first vtkImplicitFunctionToImageStencil > output, and then another for the second. > > - David > > On Wed, Oct 29, 2014 at 10:09 AM, Weiguang Guan > > wrote: > > Hi David, > > How to combine the outputs from two > vtkImplicitFunctionToImageStencil instances as I need to use two > spheres to define a shell? Thanks. > > Best, > Weiguang > > On 28/10/2014 5:20 PM, David Gobbi wrote: >> Hi Weiguang, >> >> You definitely want to avoid using vtkClipVolume before volume >> rendering, because it produces vtkUnstructuredGrid data instead >> of image data. >> >> If you need a shell, you can use vtkImageGaussianSource to create >> an image of a Gaussian, and then threshold it with lower and >> upper thresholds to create a shell. A Gaussian has radial >> symmetry, so thresholding will create a binary image of a >> spherical shell. You can then multiply this shell by your image. >> >> Or, instead of using vtkClipVolume, you can use >> vtkImplicitFunctionToImageStencil with vtkImageStencil. The >> output will be a vtkImageData. Or, for greater efficiency, use >> vtkROIStencilSource to create a spherical (ellipsoidal) stencil >> for vtkImageStencil. >> >> Or, possibly the easiest "quick fix" would be to convert the >> vtkUnstructuredGrid that you already have into a vtkImageData by >> using vtkProbeFilter. The vtkProbeFilter is a generic filter for >> copying (or interpolating) scalar data from one kind of data set >> onto another kind of data set. >> >> - David >> >> >> >> On Tue, Oct 28, 2014 at 2:23 PM, Weiguang Guan >> > wrote: >> >> Hi VTK users, >> >> I want to volume render (using 3D texture mapper) a shell >> with specified thickness. Previously, I used vtkClipVolume >> twice, one clipped away the inner portion of a regular volume >> data, the other clipped away outer portion. The only problem >> is slow rendering speed because the resultant data is no >> longer a regular volume data. >> >> Can anyone suggest a better solution? Would it be faster if I >> used several spheres with texture mapped on them and >> alpha-blending? Thanks. >> >> Best, >> Weiguang >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jds0447 at unt.edu Wed Oct 29 14:55:39 2014 From: jds0447 at unt.edu (abstracted) Date: Wed, 29 Oct 2014 11:55:39 -0700 (PDT) Subject: [vtkusers] VTK widget "border" width Message-ID: <1414608939269-5729287.post@n5.nabble.com> Some quick background: I have been developing a program that integrates VTK into a GUI designed with Qt. Thus I have been using the QVTKRenderWindowInteractor for Qt integration. Below is a code snippet that shows how I initialize all of the VTK business. class modelView(QMainWindow): ... def setupUi(self): ... self.frame = QFrame() self.frame.setLineWidth(0) self.frame.setFrameStyle(QFrame.NoFrame) self.vl = QVBoxLayout() self.vtkWidget = QVTKRenderWindowInteractor(self.frame) self.vl.addWidget(self.vtkWidget) self.ren = vtkRenderer() self.vtkWidget.GetRenderWindow().AddRenderer(self.ren) self.iren = self.vtkWidget.GetRenderWindow().GetInteractor() self.ren.ResetCamera() self.frame.setLayout(self.vl) self.setCentralWidget(self.frame) self.show() self.iren.Initialize() self.iren.Start() ... Now for my actual question, it appears as though the render window has a border around it. I.e. the outline is offset by some amount. The image below shows what I am attempting to say. The top cropped image comes from a different program written in Qt, the two left widgets are dockwidgets and the right is a QGraphicsView (I think). The bottom image is cropped from my program, the same setup but thee right widget is a VTK render window. You can see the difference in "border width", if that's a thing. My curiosity got the best of me, and I am now curious as to how this happens and if you change it (it looks odd to me). -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-widget-border-width-tp5729287.html Sent from the VTK - Users mailing list archive at Nabble.com. From michael.j.redmond at gmail.com Wed Oct 29 19:32:48 2014 From: michael.j.redmond at gmail.com (redmod79) Date: Wed, 29 Oct 2014 16:32:48 -0700 (PDT) Subject: [vtkusers] pick vtkCell that is behind other vtkCells Message-ID: <1414625568927-5729288.post@n5.nabble.com> Hi, I've looked through past posts and saw a related post but no one replied to it, so I'm making a new one. My problem is I have a finite element model with shell elements, bar elements, and nodes. I would like to be able to pick a shell element that is behind other elements. I've tried vtkCellPicker, but this only returns the first cell that the ray passes through. I would like to be able to pick from all cells that the ray passes through and pick the cell whose center is closest to the ray. Once the cell is picked, I would like to highlight its edges. This means if it is behind other cells, I would like to force its edges to be drawn so that the user can see them instead of them behind hidden due to being behind other cells. I've made a workaround for both of these, but I assume there's a better way of doing it. I've created points at the center of all the cells and simply used a vtkPointPicker, and then determined the corresponding cell. I then draw a new cell on top of the screen close to the camera to force it in front of all other cells. This seems like a bad hack and inefficient. I'm pretty new to VTK. I've searched through many examples and bought the VTK User's guide, but haven't found anything that can help me with this. If it's in an example somewhere, I haven't been able to find it, or I simply didn't recognize its applicability. Any help would be greatly appreciated. Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/pick-vtkCell-that-is-behind-other-vtkCells-tp5729288.html Sent from the VTK - Users mailing list archive at Nabble.com. From majcjc at gmail.com Wed Oct 29 22:33:29 2014 From: majcjc at gmail.com (Lin M) Date: Thu, 30 Oct 2014 10:33:29 +0800 Subject: [vtkusers] How to vis normal vectors of polydata as arrows ? Message-ID: Hi all, I'm trying to vis the normal vectos of polydata as arrows. Is there any convenient way to achieve this? I read the example http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/OrientedArrow here, but I still don't understand how to do this. It seems to vis one arrow we need to follow quite a lot steps. I think my problem is the same with http://vtk.1045678.n5.nabble.com/vtkglyph3D-with-arrowsource-td1247920.html , though there is no answer below. :-( Can anyone give me some advice? Thank you very much! Best, Lin -------------- next part -------------- An HTML attachment was scrubbed... URL: From somada141 at gmail.com Wed Oct 29 22:52:39 2014 From: somada141 at gmail.com (Adamos Kyriakou) Date: Thu, 30 Oct 2014 13:52:39 +1100 Subject: [vtkusers] How to vis normal vectors of polydata as arrows ? In-Reply-To: References: Message-ID: <265865E2-06AF-4EEA-86CD-5FC2BA5A85F1@gmail.com> I wrote a blog post which shows how to do that. Take a look at http://pyscience.wordpress.com/2014/10/05/from-ray-casting-to-ray-tracing-with-python-and-vtk/ Cheers, Adam > On Oct 30, 2014, at 1:33 PM, Lin M wrote: > > Hi all, > > I'm trying to vis the normal vectos of polydata as arrows. Is there any convenient way to achieve this? I read the example http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/OrientedArrow here, but I still don't understand how to do this. It seems to vis one arrow we need to follow quite a lot steps. I think my problem is the same with http://vtk.1045678.n5.nabble.com/vtkglyph3D-with-arrowsource-td1247920.html , though there is no answer below. :-( > > Can anyone give me some advice? Thank you very much! > > Best, > Lin > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From pattersonnp at gmail.com Thu Oct 30 03:31:55 2014 From: pattersonnp at gmail.com (Nick Patterson) Date: Thu, 30 Oct 2014 07:31:55 +0000 Subject: [vtkusers] Multiple vtkPolygons in a vtkPolyData In-Reply-To: References: <5F7A6891-FE79-48F9-972F-E9C292A6B723@gmail.com> Message-ID: <2E84464E-C7A4-4786-AB33-D38D8B52112E@gmail.com> Dear David, Thanks for getting in touch. I think this was a good starting point but still not entirely sure that it?s what I need. I created N slices of simple 2D squares, equally spaced on the Z axis - the it was like a stack of contours. But when I add the polygons and points to the vtkPolyData and then render using vtkPolyDataMapper it is one image, but the square slices are connected in some way? (please see the image attached). Realistically the slices are not attached, they are contours drawn on individual z-positions. Ultimately I want to visualise DICOM images (transverse plane, effectively slice-by-slice) and on each individual slice I would want to overlay a contour/polygon which defines different organ regions. I would also want to be able to check if a voxel (from the dicom image) lies within the bounds of the polygon. Would the approach of creating N independent vtkPolygon objects and then adding each on to a vtkCellArray be along the correct lines for doing this do you think? Regards, Nick. > On 29 Oct 2014, at 12:56, David Cole wrote: > > You should be able to put all of the points and all of the polygons into your existing "points" and "polygons" variables, and have just one polydata that refers to all of them at once. > > Or: > > See this example: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/CombinePolyData > > And the documentation for the append and clean polydata filters: > http://www.vtk.org/doc/nightly/html/classvtkAppendPolyData.html > http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html > > The vtkAppendPolyData filter produces a single polydata output from many input polydata objects. > > > HTH, > David C. > > > On Wed, Oct 29, 2014 at 7:11 AM, Nick Patterson > wrote: > Dear VTK Users, > > I have been having some trouble with handling polygons in VTK and hoped that someone can offer some guidance. > > I wish to do the following:- > 1) Read some contours (structures) from a DICOM file - these are essentially polygons drawn on 2D slices. ( I have completed this task and have the ability to extract the x,y,z point of each vertex from a DICOM RTStruct) There are approximately 250 polygons. > > 2) I want to add these coordinate positions to create a vtkPolygon > > 3) I want add each vtkPolygon object to a vtkPolyData > > 4) Render the polygons. ( I can probably deal with this ). > > Up until now I have been using the http://www.itk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Polygon example and trying to adapt it. > > Can anyone advise how I would modify this segment of code (taken straight from the code in the link above) so that it would be generic that I can add multiple independent polygons (in the example I am working with there are approximately 250 polygons) to the vtkPolyData. > > vtkSmartPointer points = > vtkSmartPointer::New(); > points->InsertNextPoint(0.0, 0.0, 0.0); > points->InsertNextPoint(1.0, 0.0, 0.0); > points->InsertNextPoint(1.0, 1.0, 0.0); > points->InsertNextPoint(0.0, 1.0, 0.0); > > // Create the polygon > vtkSmartPointer polygon = > vtkSmartPointer::New(); > polygon->GetPointIds()->SetNumberOfIds(4); //make a quad > polygon->GetPointIds()->SetId(0, 0); > polygon->GetPointIds()->SetId(1, 1); > polygon->GetPointIds()->SetId(2, 2); > polygon->GetPointIds()->SetId(3, 3); > > // Add the polygon to a list of polygons > vtkSmartPointer polygons = > vtkSmartPointer::New(); > polygons->InsertNextCell(polygon); > > // Create a PolyData > vtkSmartPointer polygonPolyData = > vtkSmartPointer::New(); > polygonPolyData->SetPoints(points); > polygonPolyData->SetPolys(polygons); > > > I hope my problem is clear, but am happy to clarify if you think you are able to offer guidance which would be much appreciated. > > Regards, Nick. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-10-30 at 07.30.02.png Type: image/png Size: 35387 bytes Desc: not available URL: From DLRdave at aol.com Thu Oct 30 08:04:56 2014 From: DLRdave at aol.com (David Cole) Date: Thu, 30 Oct 2014 08:04:56 -0400 Subject: [vtkusers] How to vis normal vectors of polydata as arrows ? In-Reply-To: <265865E2-06AF-4EEA-86CD-5FC2BA5A85F1@gmail.com> References: <265865E2-06AF-4EEA-86CD-5FC2BA5A85F1@gmail.com> Message-ID: Also, this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs contains much more than what you're asking for, but also does contain exactly what you're asking for. Visualizing normal vectors with arrow glyphs. HTH, David C. On Wed, Oct 29, 2014 at 10:52 PM, Adamos Kyriakou wrote: > I wrote a blog post which shows how to do that. Take a look at > http://pyscience.wordpress.com/2014/10/05/from-ray-casting-to-ray-tracing-with-python-and-vtk/ > > Cheers, > Adam > > On Oct 30, 2014, at 1:33 PM, Lin M wrote: > > Hi all, > > I'm trying to vis the normal vectos of polydata as arrows. Is there any > convenient way to achieve this? I read the example > http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/OrientedArrow > here, but I still don't understand how to do this. It seems to vis one > arrow we need to follow quite a lot steps. I think my problem is the same > with > http://vtk.1045678.n5.nabble.com/vtkglyph3D-with-arrowsource-td1247920.html > , though there is no answer below. :-( > > Can anyone give me some advice? Thank you very much! > > Best, > Lin > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.j.redmond at gmail.com Thu Oct 30 19:50:59 2014 From: michael.j.redmond at gmail.com (redmod79) Date: Thu, 30 Oct 2014 16:50:59 -0700 (PDT) Subject: [vtkusers] pick vtkCell that is behind other vtkCells In-Reply-To: <1414625568927-5729288.post@n5.nabble.com> References: <1414625568927-5729288.post@n5.nabble.com> Message-ID: <1414713059826-5729295.post@n5.nabble.com> Thanks to Susan (), I was able to use vtkCellLocator::FindCellsAlongLine to pick behind cells. Thank you! This leads me to the next part of my problem... how to choose the element whose center is closest to the line? I probably need to use vtkCellCenters? I wasn't able to figure that part out today, so I manually calculated the centers and then found the closest cell. I wouldn't be surprised if there as a vtk method for this. The last part of the problem is how do I highlight cells that are behind other cells so that the highlight is visible to the user? I currently draw new edges on top of the screen close to the camera, but I doubt this is the best method. Thanks again! -- View this message in context: http://vtk.1045678.n5.nabble.com/pick-vtkCell-that-is-behind-other-vtkCells-tp5729288p5729295.html Sent from the VTK - Users mailing list archive at Nabble.com. From 925345468 at qq.com Fri Oct 31 04:37:08 2014 From: 925345468 at qq.com (=?utf-8?B?anVzdF9yb29raWU=?=) Date: Fri, 31 Oct 2014 16:37:08 +0800 Subject: [vtkusers] how to project curve to a planar or sample curve and get sampled points? Message-ID: Hi all, I have used the vtkDijkstraGraphGeodesicPath class to find the shortest path between two points on a mesh, and my next step is to project the path(curve) to a planar. Is there a class or function in vtk to project curve to planar? And the other way is to sample the path(curve) and then project the sampled points to the planar, so how to sample the curve and get sampled points? Thank you in advance!? -------------- next part -------------- An HTML attachment was scrubbed... URL: From 925345468 at qq.com Fri Oct 31 05:26:52 2014 From: 925345468 at qq.com (just_rookie) Date: Fri, 31 Oct 2014 02:26:52 -0700 (PDT) Subject: [vtkusers] How to project a curve onto surface In-Reply-To: <1385614169330-5724690.post@n5.nabble.com> References: <1385614169330-5724690.post@n5.nabble.com> Message-ID: <1414747612533-5729298.post@n5.nabble.com> Hi, Have you solved this problem? I am facing the same problem. Thank you in advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-project-a-curve-onto-surface-tp5724690p5729298.html Sent from the VTK - Users mailing list archive at Nabble.com. From thomas.barusseau at epita.fr Fri Oct 31 05:32:03 2014 From: thomas.barusseau at epita.fr (Nephophobic) Date: Fri, 31 Oct 2014 02:32:03 -0700 (PDT) Subject: [vtkusers] Represent particles (as a set of points) and associate a scalar to them? Message-ID: <1414747923304-5729299.post@n5.nabble.com> Hello. I'm working on an old project, and the vtk format used is the legacy ASCII one. I need to display particles in ParaView, and the code already there generates .particles files, which use the PARTICLES dataset. First of all, I can't find anything on the Internet about that dataset. Second of all, here is the content : > # vtk DataFile Version 3.6.2 > Particle file, current time (s) = 1 > > DATASET PARTICLES > POINTS 2 float > 0.003 0.815 0.026 > 0.241 0.508 0.053 > > POINT_DATA 2 > SCALARS identity float 1 > LOOKUP_TABLE default > 1 > 2 Now this looks good : it's two particles, represented by (x, y, z) values, and each of them has a scalar `identity` associated. However, when opening this in ParaView, I don't get 2 points, I get 4. Also the values are all messed up, and I can't even color them according to their `identity` value. So, it sucks. And since I can't find anything about the PARTICLES dataset, I guess I shouldn't use it. Can someone help me in any way ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Represent-particles-as-a-set-of-points-and-associate-a-scalar-to-them-tp5729299.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Fri Oct 31 11:49:04 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Fri, 31 Oct 2014 08:49:04 -0700 (PDT) Subject: [vtkusers] Exploded view Message-ID: <1414770544927-5729301.post@n5.nabble.com> I have just started a PhD looking at a brain cancers. I am currently hoping to create an applet that will display the areas of interest around the cancer. Just after surgery, the cancerous area is empty, so I was contemplating the idea of doing edge detection of a CT DICOM to find where the air meets tissue to visualise where the tumour was. After I have found the volume, it should be simple enough to calculate the centre of mass of the tumour. Following this, I think I would like to create 3 orthogonal cutting planes going through the brain so that the brain is split into 8 parts, centered around the tumour. I would hope to show this all as an exploded view so that I can display the tumor, and the 8 other segments all side by side. I want to do this so that I can run GATE simulations on the uptake of activity in the tumourous area and the healthy sections touching it and see the results as a function of colour. Is this feasible? If I haven't explained how I envisage the final visualisation, imagine a peach - take out the stone and cut the rest into 8ths (half it, half those, and half all those). I want to show the stone and the 8ths with specific focus on the areas of the peach that were touching the stone. Thanks in advance for the help -- View this message in context: http://vtk.1045678.n5.nabble.com/Exploded-view-tp5729301.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Oct 31 13:01:59 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 31 Oct 2014 13:01:59 -0400 Subject: [vtkusers] Represent particles (as a set of points) and associate a scalar to them? In-Reply-To: <1414747923304-5729299.post@n5.nabble.com> References: <1414747923304-5729299.post@n5.nabble.com> Message-ID: Try to change PARTICLES to POLYDATA in your file, and it should load. See http://www.vtk.org/VTK/img/file-formats.pdf for details on the legacy format. On Fri, Oct 31, 2014 at 5:32 AM, Nephophobic wrote: > Hello. > > I'm working on an old project, and the vtk format used is the legacy ASCII > one. > I need to display particles in ParaView, and the code already there > generates .particles files, which use the PARTICLES dataset. First of all, > I > can't find anything on the Internet about that dataset. Second of all, here > is the content : > > > # vtk DataFile Version 3.6.2 > > Particle file, current time (s) = 1 > > > > DATASET PARTICLES > > POINTS 2 float > > 0.003 0.815 0.026 > > 0.241 0.508 0.053 > > > > POINT_DATA 2 > > SCALARS identity float 1 > > LOOKUP_TABLE default > > 1 > > 2 > > Now this looks good : it's two particles, represented by (x, y, z) values, > and each of them has a scalar `identity` associated. > > However, when opening this in ParaView, I don't get 2 points, I get 4. Also > the values are all messed up, and I can't even color them according to > their > `identity` value. So, it sucks. And since I can't find anything about the > PARTICLES dataset, I guess I shouldn't use it. > > Can someone help me in any way ? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Represent-particles-as-a-set-of-points-and-associate-a-scalar-to-them-tp5729299.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tanakas at gmx.ch Fri Oct 31 19:48:38 2014 From: tanakas at gmx.ch (Tanaka Simon) Date: Sat, 01 Nov 2014 00:48:38 +0100 Subject: [vtkusers] weird vtkXMLMultiBlockDataWriter segfaults in binary mode Message-ID: <54541FD6.8050807@gmx.ch> Hello VTK users and developers, I attached a simple program which segfaults. please also have a look at the comments in the code. i want to: 1) write a vtkMultiBlockDataSet to a file 2) load it 3) add some more Blocks 4) write it again it only segfaults if the writers are set to binary mode, and only if the data exceeds a certain size. in ascii mode, everything is fine. this might be related: http://www.paraview.org/Bug/print_bug_page.php?bug_id=13294 can you confirm that behaviour? what am i doing wrong? and if it is a bug, how can i work around? thank you very much simon -------------- next part -------------- cmake_minimum_required(VERSION 2.8) PROJECT(vtk_weird_segfault) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(vtk_weird_segfault MACOSX_BUNDLE vtk_weird_segfault) if(VTK_LIBRARIES) target_link_libraries(vtk_weird_segfault ${VTK_LIBRARIES}) else() target_link_libraries(vtk_weird_segfault vtkHybrid vtkWidgets) endif() -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_weird_segfault.cxx Type: text/x-c++src Size: 3342 bytes Desc: not available URL: From somada141 at gmail.com Fri Oct 31 20:57:38 2014 From: somada141 at gmail.com (Adamos Kyriakou) Date: Sat, 1 Nov 2014 11:57:38 +1100 Subject: [vtkusers] Exploded view In-Reply-To: <1414770544927-5729301.post@n5.nabble.com> References: <1414770544927-5729301.post@n5.nabble.com> Message-ID: <7C53F86C-4FBA-4371-A874-3CE6AF8F6B71@gmail.com> Hey there, I?ll try to go through you description: > I have just started a PhD looking at a brain cancers. I am currently hoping > to create an applet that will display the areas of interest around the > cancer. Not sure how you envision said applet but if you?re referring to a web-applet then you could take a look at VTK Web or ParaviewWeb which you allow in-browser visualization of your scene > Just after surgery, the cancerous area is empty, so I was contemplating the > idea of doing edge detection of a CT DICOM to find where the air meets > tissue to visualise where the tumour was. You could easily do some basic segmentation based on the CT Hounsfield units using thresholding in VTK and create labelfields and 3D surfaces (check this blog post on surface extraction: http://pyscience.wordpress.com/2014/09/11/surface-extraction-creating-a-mesh-from-pixel-data-using-python-and-vtk/ ). I can?t vouch for the availability or ease-of-use of advanced segmentation algorithms in VTK but ITK/SimpleITK has all that functionality (check this other blog post on SimpleITK and image segmentation: http://pyscience.wordpress.com/2014/10/19/image-segmentation-with-python-and-simpleitk/ ). SimpleITK also allows you to load compressed DICOM data through GDCM which AFAIK VTK doesn?t. > After I have found the volume, it should be simple enough to calculate the > centre of mass of the tumour. Following this, I think I would like to create > 3 orthogonal cutting planes going through the brain so that the brain is > split into 8 parts, centered around the tumour. That?s actually easy in VTK. After you?ve extracted the tumor surface as vtkPolyData (again, surface extraction) you can use vtkCenterOfMass to find that point. Then you just need 3 cross-sections through the vtkImageData (containing the DICOM data) through the vtkImageSliceMapper (check this gist ? haven?t written a blog post on that yet: https://gist.github.com/somada141/3d426b181ce202933950 ). If you actually want to visualize the extracted surfaces as split you can clip them > Is this feasible? AFAI understand by your description I?d say a combination of VTK and ITK/SimpleITK gives you all the tools you need so I dare say it is feasible if not completely straightforward. You probably know better, but I was under the impression that after extravasation the tumor-hole is filled with cotton to soak up fluid so I?m not 100% sure you will get a clearly demarcated air-hole there. Segmentation might be a lil? more tricky then. Anyway, good luck with the PhD, sound interesting :) Cheers, Adam > On Nov 1, 2014, at 2:49 AM, mbcx9rb9 wrote: > > I have just started a PhD looking at a brain cancers. I am currently hoping > to create an applet that will display the areas of interest around the > cancer. > > Just after surgery, the cancerous area is empty, so I was contemplating the > idea of doing edge detection of a CT DICOM to find where the air meets > tissue to visualise where the tumour was. > > After I have found the volume, it should be simple enough to calculate the > centre of mass of the tumour. Following this, I think I would like to create > 3 orthogonal cutting planes going through the brain so that the brain is > split into 8 parts, centered around the tumour. > > I would hope to show this all as an exploded view so that I can display the > tumor, and the 8 other segments all side by side. I want to do this so that > I can run GATE simulations on the uptake of activity in the tumourous area > and the healthy sections touching it and see the results as a function of > colour. > > Is this feasible? > > If I haven't explained how I envisage the final visualisation, imagine a > peach - take out the stone and cut the rest into 8ths (half it, half those, > and half all those). I want to show the stone and the 8ths with specific > focus on the areas of the peach that were touching the stone. > > Thanks in advance for the help > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Exploded-view-tp5729301.html > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: