From pablo.hernandez.cerdan at outlook.com Mon Dec 1 00:36:33 2014 From: pablo.hernandez.cerdan at outlook.com (Pablo Hernandez-Cerdan) Date: Sun, 30 Nov 2014 22:36:33 -0700 (MST) Subject: [vtkusers] vtkTiffWriter does not write 3d volume In-Reply-To: References: <1401890290576-5727324.post@n5.nabble.com> <1401898290877-5727325.post@n5.nabble.com> <818877DBC4894266BF41D5BBAB448C5C@HomePC2> <1402024501619-5727360.post@n5.nabble.com> Message-ID: <1417412193266-5729599.post@n5.nabble.com> How is this implementation going? Is it in any development branch? I have to write a 3D Tiff, and this feature isn't available in vtk-6.2. ITK is a valid solution, right? Cheers, Pablo -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkTiffWriter-does-not-write-3d-volume-tp5727049p5729599.html Sent from the VTK - Users mailing list archive at Nabble.com. From royalmatador at gmail.com Mon Dec 1 02:33:38 2014 From: royalmatador at gmail.com (AIs) Date: Mon, 1 Dec 2014 00:33:38 -0700 (MST) Subject: [vtkusers] converting edges in an image data to polydata Message-ID: <1417419218830-5729601.post@n5.nabble.com> Hi everyone, I have an image obtained using vtkImageGradientMagnitude on an DICOM image. The output of this process is an edge only image. I would now like to convert the edges into a polydata i.e. all the edges ( all white lines) in the image data should be converted into a polydata for further use. Can anyone please give some suggestion as to how I can go about this. I would like the edges to be similar to the output of vtkContourFilter. Any help appreciated. I have also attached the image. Kind regards AIs -- View this message in context: http://vtk.1045678.n5.nabble.com/converting-edges-in-an-image-data-to-polydata-tp5729601.html Sent from the VTK - Users mailing list archive at Nabble.com. From jd379252 at gmail.com Mon Dec 1 07:51:28 2014 From: jd379252 at gmail.com (Pof) Date: Mon, 1 Dec 2014 13:51:28 +0100 Subject: [vtkusers] vtk6.1 : Main thread no longer exits upon program closure Message-ID: Hi all, I've been upgrading my application (VS-C++2010) from vtk5.1 to vtk6.1. Everything works fine, except one point: now when the application is closed, the main thread is no longer destroyed, i.e. I still can see the executable process working in the task manager, and I have to kill it "by hand". As this was working perfectly fine with the previous vtk 5.10.1, I am wondering whether an obvious modification in vtk6.1 could be invoked to explain this change in behaviour ? Any idea or tip is welcome ! Thanks in advance JD -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Mon Dec 1 12:00:58 2014 From: andy.bauer at kitware.com (Andy Bauer) Date: Mon, 1 Dec 2014 12:00:58 -0500 Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: Hi Paul, Thanks for sending your patch. I hope to be able to take a look at it later this week. And yes, my patch does make some assumptions that maybe shouldn't be made. It's definitely needs more looking over if it were to get merged into VTK master, which I'm not sure it even should. Regards, Andy On Thu, Nov 27, 2014 at 6:52 AM, Paul Edwards wrote: > BTW there would be a problem with your implementation if > vtkPolyData::InsertNextCell was called after a call to > vtkPolyData::DeleteCell (and before vtkPolyData::RemoveDeletedCells) > as it would not append to vtkPolyData::CellsCopy. I'm not sure if > that is allowed but your implementation would result in a index out of > bounds. > > On 27 November 2014 at 11:23, Paul Edwards > wrote: > > Hi Andy, > > > > I've attached a patch that uses a slightly different approach which > > only changes vtkPolyData::RemoveDeletedCells. The code looks simpler > > and it passes your new test although I am assuming it is ok to > > ShallowCopy the vtkPolyData at the top of the function. I'll let you > > decide if it is better! > > > > Note: the patch is for the VTK with the current ParaView master > > (v6.1.0-2506-g2e5a3c9) > > > > Best regards, > > Paul > > > > On 23 November 2014 at 17:37, Andy Bauer wrote: > >> Hi Paul, > >> > >> I have a potential fix for this bug at > >> http://review.source.kitware.com/#/t/5040/. It feels like a hack but I > >> couldn't figure out a better way to do it yet. I also modified a test to > >> verify that the proper cells were getting removed, based on the cell's > >> points. > >> > >> If you see a better way to do this, please let me know. > >> > >> Thanks, > >> Andy > >> > >> On Mon, Nov 17, 2014 at 5:37 PM, Andy Bauer > wrote: > >>> > >>> Hi Paul, > >>> > >>> Thanks for the input. I'm at SC14 right now so I won't be able to look > at > >>> this until I get back. > >>> > >>> Cheers, > >>> Andy > >>> > >>> On Mon, Nov 17, 2014 at 4:26 AM, Paul Edwards < > paul.m.edwards at gmail.com> > >>> wrote: > >>>> > >>>> Hi Andy, > >>>> > >>>> I've attached a sample program demonstrating the issue. The example > >>>> just loads the sphere.vtk file, removes all cells where the "Result" > >>>> value is not 0 and writes the result to output.vtk. The tar file also > >>>> contains the correct and incorrect output. > >>>> > >>>> Best regards, > >>>> Paul > >>>> > >>>> On 15 November 2014 02:59, Andy Bauer wrote: > >>>> > Hi Paul, > >>>> > > >>>> > I was part of that fix and I think it's correct. There may have been > >>>> > more to > >>>> > that fix though since it took a couple of shots before getting it > >>>> > correct so > >>>> > the git history may not be as pristine as desired. If you can give > me > >>>> > more > >>>> > specifics on the bug though I can try to see what's going on with > it. > >>>> > If I > >>>> > remember correctly though, that fix had to do with the fact that > some > >>>> > places > >>>> > thought that the order of iterating through cells in a vtkPolyData > was > >>>> > first > >>>> > through all vertex cells, then all line cells, then all polys and > >>>> > finally > >>>> > through all triangle strips, irregardless of the order that cells > got > >>>> > inserted in (i.e. using InsertNextCell()). The reality is that for > >>>> > polydata > >>>> > that cells are indeed iterated through in their insertion order. The > >>>> > test > >>>> > that was added for those changes hopefully shows the proper > >>>> > functionality > >>>> > along with associated cell data manipulations as well. > >>>> > > >>>> > Regards, > >>>> > Andy > >>>> > > >>>> > > >>>> > > >>>> > On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards > >>>> > > >>>> > wrote: > >>>> >> > >>>> >> Hi, > >>>> >> > >>>> >> I've just noticed an issue with vtkPolyData. I had been calling > >>>> >> vtkPolyData::DeleteCell to remove the unwanted cells, followed by a > >>>> >> call to vtkPolyData::RemoveDeletedCells. The result is not as it > >>>> >> should be in the latest version. To fix I just started reverting > >>>> >> previous commits. I tracked it down to the following: > >>>> >> > >>>> >> bugfix 14459: Iterating through polydata cells incorrectly. > >>>> >> commit: 44131c6d05375692af8b6b38cf4291983bdd8f45 > >>>> >> > >>>> >> Sorry but I do not have time to provide a test case or track where > in > >>>> >> this commit lies the problem. I just thought I would give details > >>>> >> here in case anyone else notices the same problem and is searching > for > >>>> >> a solution. > >>>> >> > >>>> >> Best regards, > >>>> >> Paul > >>>> >> _______________________________________________ > >>>> >> Powered by www.kitware.com > >>>> >> > >>>> >> Visit other Kitware open-source projects at > >>>> >> http://www.kitware.com/opensource/opensource.html > >>>> >> > >>>> >> Please 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 dhoppes at mbfbioscience.com Mon Dec 1 14:03:46 2014 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Mon, 1 Dec 2014 19:03:46 +0000 Subject: [vtkusers] Trying out the new vtkGPUVolumeRayCastMapper null pointer Message-ID: <46CB11F12B9DC24D860D4082451B318A12C934FF@exchange3.microbrightfield.com> Hi all, I got the latest nightly build and trying out the new vtkGPUVolumeRayCastMapper. The build works fine but when I try to call m_pMapper = vtkSmartPointer::New(); I get an immediate crash. Inside of the vtk code, the crash happens when it tries to instantiate the GPUMapper and then set the MaxMemoryInBytes, it crashes because the GPUMapper instantiation is null (vtkSmartVolumeMapper.cxx line 66). Any idea why? For my vtk library builds, I made sure that the Module_vtkRenderingVolumeOpenGLNew = 1). Doug Doug Hoppes I Senior Software Engineer I [cid:image007.png at 01CEF686.037AE7C0] T: 802-288-9290 E: dhoppes at mbfbioscience.com MBF Bioscience 185 Allen Brook Lane Williston, VT 05495 USA www.mbfbioscience.com http://www.mbfbioscience.com/blog [cid:image008.png at 01CEF686.037AE7C0] [cid:image011.png at 01CEF686.037AE7C0] [cid:image012.png at 01CEF686.037AE7C0] [cid:image014.png at 01CEF686.037AE7C0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 2645 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 787 bytes Desc: image002.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 927 bytes Desc: image003.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 1170 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 870 bytes Desc: image005.png URL: From julio.hoffimann at gmail.com Mon Dec 1 17:18:06 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Mon, 1 Dec 2014 14:18:06 -0800 Subject: [vtkusers] How to rotate the scene? Message-ID: Dear all, 1. Whenever I render the scene the Y axis is pointing up. How to make the Z axis to point up? 2. What is the difference between QVTKWidget and QVTKWidget2? 3. What is the advantage of using QVTKApplication over QApplication? -J?lio -------------- next part -------------- An HTML attachment was scrubbed... URL: From castellanoslizan at gmail.com Mon Dec 1 19:23:55 2014 From: castellanoslizan at gmail.com (Lizeth Castellanos) Date: Mon, 1 Dec 2014 22:23:55 -0200 Subject: [vtkusers] vtk window closes unexpectedly in vtkImageAccumulate Message-ID: Hello vtk-users! I'm using the TestAccumulate.py from http://vtk.org/gitweb?p=VTK.git;a=blob;f=Imaging/Core/Testing/Python/TestAccumulate.py;h=40054f0e43dbf7914f911815172d8c02378826ee;hb=HEAD I don't get see the result. The test ran without compilation errors, but the vtk window closes unexpectedly. Any idea? Thanks! -Lizeth My Code here: #!/usr/bin/env python import vtk from vtk.test import Testing reader = vtk.vtkPNGReader() reader.SetFileName("/home/user/Downloads/fullhead15.png") smooth = vtk.vtkImageGaussianSmooth() smooth.SetDimensionality(2) smooth.SetStandardDeviations(1,1) smooth.SetInputConnection(reader.GetOutputPort()) imageAppend = vtk.vtkImageAppendComponents() imageAppend.AddInputConnection(reader.GetOutputPort()) imageAppend.AddInputConnection(smooth.GetOutputPort()) clip = vtk.vtkImageClip() clip.SetInputConnection(imageAppend.GetOutputPort()) clip.SetOutputWholeExtent(0,255,0,255,20,22) accum = vtk.vtkImageAccumulate() accum.SetInputConnection(clip.GetOutputPort()) accum.SetComponentExtent(0,255,0,255,0,0) accum.SetComponentSpacing(12,12,0.0) accum.Update() viewer = vtk.vtkImageViewer() viewer.SetInputConnection(accum.GetOutputPort()) viewer.SetColorWindow(4) viewer.SetColorLevel(2) viewer.Render() -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Dec 1 19:34:25 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 1 Dec 2014 17:34:25 -0700 Subject: [vtkusers] vtk window closes unexpectedly in vtkImageAccumulate In-Reply-To: References: Message-ID: Hi Lizeth, Many (most?) of the tests are written to exit as soon as the window pops up, because that's all the testing system needs. The easiest way to get the program to stick around is to run python with the "-i" option: python -i TestAccumulate.py To make the program stick around without the "-i" option, you have to connect a vtkRenderWindowInteractor and then call interactor.Start() at the end of the code. - David On Mon, Dec 1, 2014 at 5:23 PM, Lizeth Castellanos < castellanoslizan at gmail.com> wrote: > Hello vtk-users! > > > I'm using the TestAccumulate.py from > http://vtk.org/gitweb?p=VTK.git;a=blob;f=Imaging/Core/Testing/Python/TestAccumulate.py;h=40054f0e43dbf7914f911815172d8c02378826ee;hb=HEAD > > I don't get see the result. The test ran without compilation errors, but > the vtk window closes unexpectedly. > > Any idea? > > Thanks! > > -Lizeth > > My Code here: > > #!/usr/bin/env python > import vtk > from vtk.test import Testing > > reader = vtk.vtkPNGReader() > reader.SetFileName("/home/user/Downloads/fullhead15.png") > > smooth = vtk.vtkImageGaussianSmooth() > smooth.SetDimensionality(2) > smooth.SetStandardDeviations(1,1) > smooth.SetInputConnection(reader.GetOutputPort()) > > imageAppend = vtk.vtkImageAppendComponents() > imageAppend.AddInputConnection(reader.GetOutputPort()) > imageAppend.AddInputConnection(smooth.GetOutputPort()) > > clip = vtk.vtkImageClip() > clip.SetInputConnection(imageAppend.GetOutputPort()) > clip.SetOutputWholeExtent(0,255,0,255,20,22) > > accum = vtk.vtkImageAccumulate() > accum.SetInputConnection(clip.GetOutputPort()) > accum.SetComponentExtent(0,255,0,255,0,0) > accum.SetComponentSpacing(12,12,0.0) > accum.Update() > > viewer = vtk.vtkImageViewer() > viewer.SetInputConnection(accum.GetOutputPort()) > viewer.SetColorWindow(4) > viewer.SetColorLevel(2) > viewer.Render() > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablo.hernandez.cerdan at outlook.com Mon Dec 1 23:50:56 2014 From: pablo.hernandez.cerdan at outlook.com (=?iso-8859-1?B?UGFibG8gSGVybuFuZGV6?=) Date: Tue, 2 Dec 2014 05:50:56 +0100 Subject: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK ) Message-ID: I have compiled ITK with the use_vtk option. And now ITK overrides the VTK_LIBRARIES, with a really small list of libraries. find_package(ITK 4.5 REQUIRED) message (status "** ITK FOUND: USE_FILES ${ITK_USE_FILE}") message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") find_package(VTK 6.2 REQUIRED) message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") Output: status** ITK FOUND: USE_FILES /home/phc/Software/ITK/install-debug-nocuda-v461/lib/cmake/ITK-4.7/UseITK.cmake status** VTK FOUND: USE_FILES /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake status** VTK FOUND: VTK_LIBRARIES vtkCommonCore;vtksys;vtkRenderingCore;vtkCommonExecutionModel; vtkCommonDataModel;vtkCommonMath;vtkCommonMisc;vtkCommonSystem; vtkCommonTransforms;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry; vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingOpenGL; vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg;vtkpng;vtktiff;vtkRenderingFreeType; vtkfreetype;vtkftgl;vtkInteractionStyle;vtkImagingSources status** VTK FOUND: USE_FILES /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake status** VTK FOUND: VTK_LIBRARIES vtkCommonCore;vtksys;vtkRenderingCore;vtkCommonExecutionModel; vtkCommonDataModel;vtkCommonMath;vtkCommonMisc;vtkCommonSystem; vtkCommonTransforms;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry; vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingOpenGL; vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg;vtkpng;vtktiff;vtkRenderingFreeType; vtkfreetype;vtkftgl;vtkInteractionStyle;vtkImagingSources --Same output TWICE ...-- If I find VTK first and then ITK I got the same results. But if I don't find ITK, ie. with VTK alone I get the triple amount of libraries, and I need those libraries to compile my code. Is this a bug in ITK (or cmake, or VTK) or am I doing something wrong in my CMakeLists.txt? find_package(VTK 6.2 REQUIRED) message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") Output: status** VTK FOUND: USE_FILES /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake status** VTK FOUND: VTK_LIBRARIES vtkIOMPIImage;vtkIOImage;vtkCommonDataModel; vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem; vtkCommonTransforms;vtkCommonExecutionModel;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg; vtkpng;vtktiff;vtkParallelMPI;vtkParallelCore;vtkIOLegacy;vtkfreetype;vtkIOVideo;vtkImagingColor;vtkImagingCore; vtkRenderingLIC;vtkIOXML;vtkIOGeometry;vtkjsoncpp;vtkIOXMLParser;vtkexpat;vtkImagingSources;vtkRenderingOpenGL; vtkImagingHybrid;vtkRenderingCore;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry; vtkFiltersStatistics;vtkImagingFourier;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkInteractionStyle;vtkRenderingQt; vtkFiltersTexture;vtkGUISupportQt;vtkRenderingLabel;vtkRenderingFreeType;vtkftgl;vtkRenderingContext2D;vtkViewsQt; vtkViewsInfovis;vtkChartsCore;vtkCommonColor;vtkInfovisCore;vtkFiltersImaging;vtkImagingGeneral;vtkFiltersModeling; vtkInfovisLayout;vtkViewsCore;vtkInteractionWidgets;vtkFiltersHybrid;vtkRenderingAnnotation;vtkRenderingVolume;vtkDomainsChemistry; vtkIOParallel;vtkFiltersParallel;vtkIONetCDF;vtkNetCDF;vtkNetCDF_cxx;vtkhdf5_hl;vtkhdf5;vtkexoIIc;vtklibxml2;vtkRenderingFreeTypeOpenGL; vtkTestingRendering;vtkFiltersProgrammable;vtkRenderingGL2PS;vtkRenderingContextOpenGL;vtkgl2ps;vtkFiltersHyperTree;vtkIOMPIParallel; vtkIOMovie;vtkIOExodus;vtkTestingIOSQL;vtkIOSQL;vtksqlite;vtkFiltersSelection;vtkFiltersVerdict;verdict;vtkIOMINC;vtkImagingStencil;vtkInteractionImage; vtkIOLSDyna;vtkRenderingLOD;vtkFiltersParallelImaging;vtkIOPLY;vtkViewsGeovis;vtkGeovisCore;vtkproj4;vtkRenderingImage;vtkIOInfovis;vtkIOEnSight; vtkRenderingVolumeOpenGL;vtkImagingStatistics;vtkFiltersFlowPaths;vtkIOParallelNetCDF;vtkIOAMR;vtkFiltersAMR;vtkViewsContext2D; vtkFiltersParallelGeometry;vtkIOParallelXML;vtkIOExport;vtkGUISupportQtSQL;vtkInfovisBoostGraphAlgorithms;vtkFiltersParallelMPI; vtkGUISupportQtWebkit;vtkGUISupportQtOpenGL;vtkFiltersSMP;vtkImagingMorphological;vtkIOImport;vtkTestingGenericBridge; vtkImagingMath;vtkFiltersGeneric;vtkRenderingVolumeAMR -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Dec 2 00:12:56 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 2 Dec 2014 00:12:56 -0500 Subject: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK ) In-Reply-To: References: Message-ID: This is normal usage: find_package(ITK REQUIRED) include(${ITK_USE_FILE}) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) I do not see the include's in your example. Please show the entire CMakeList.txt file On Mon, Dec 1, 2014 at 11:50 PM, Pablo Hern?ndez wrote: > I have compiled ITK with the use_vtk option. And now ITK overrides the > VTK_LIBRARIES, with a really small list of libraries. > > find_package(ITK 4.5 REQUIRED) > message (status "** ITK FOUND: USE_FILES ${ITK_USE_FILE}") > message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") > message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") > > find_package(VTK 6.2 REQUIRED) > message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") > message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") > > Output: > status** ITK FOUND: USE_FILES > /home/phc/Software/ITK/install-debug-nocuda-v461/lib/cmake/ITK-4.7/UseITK.cmake > status** VTK FOUND: USE_FILES > /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake > status** VTK FOUND: VTK_LIBRARIES > vtkCommonCore;vtksys;vtkRenderingCore;vtkCommonExecutionModel; > vtkCommonDataModel;vtkCommonMath;vtkCommonMisc;vtkCommonSystem; > vtkCommonTransforms;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry; > vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingOpenGL; > vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg;vtkpng;vtktiff;vtkRenderingFreeType; > vtkfreetype;vtkftgl;vtkInteractionStyle;vtkImagingSources > > status** VTK FOUND: USE_FILES > /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake > status** VTK FOUND: VTK_LIBRARIES > vtkCommonCore;vtksys;vtkRenderingCore;vtkCommonExecutionModel; > vtkCommonDataModel;vtkCommonMath;vtkCommonMisc;vtkCommonSystem; > vtkCommonTransforms;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry; > vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingOpenGL; > vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg;vtkpng;vtktiff;vtkRenderingFreeType; > vtkfreetype;vtkftgl;vtkInteractionStyle;vtkImagingSources > > > --Same output TWICE ...-- > > If I find VTK first and then ITK I got the same results. > > But if I don't find ITK, ie. with VTK alone I get the triple amount of > libraries, and I need those libraries to compile my code. > Is this a bug in ITK (or cmake, or VTK) or am I doing something wrong in my > CMakeLists.txt? > > find_package(VTK 6.2 REQUIRED) > message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") > message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") > > Output: > status** VTK FOUND: USE_FILES > /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake > status** VTK FOUND: VTK_LIBRARIES > vtkIOMPIImage;vtkIOImage;vtkCommonDataModel; > vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem; > vtkCommonTransforms;vtkCommonExecutionModel;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg; > vtkpng;vtktiff;vtkParallelMPI;vtkParallelCore;vtkIOLegacy;vtkfreetype;vtkIOVideo;vtkImagingColor;vtkImagingCore; > vtkRenderingLIC;vtkIOXML;vtkIOGeometry;vtkjsoncpp;vtkIOXMLParser;vtkexpat;vtkImagingSources;vtkRenderingOpenGL; > vtkImagingHybrid;vtkRenderingCore;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry; > vtkFiltersStatistics;vtkImagingFourier;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkInteractionStyle;vtkRenderingQt; > vtkFiltersTexture;vtkGUISupportQt;vtkRenderingLabel;vtkRenderingFreeType;vtkftgl;vtkRenderingContext2D;vtkViewsQt; > vtkViewsInfovis;vtkChartsCore;vtkCommonColor;vtkInfovisCore;vtkFiltersImaging;vtkImagingGeneral;vtkFiltersModeling; > vtkInfovisLayout;vtkViewsCore;vtkInteractionWidgets;vtkFiltersHybrid;vtkRenderingAnnotation;vtkRenderingVolume;vtkDomainsChemistry; > vtkIOParallel;vtkFiltersParallel;vtkIONetCDF;vtkNetCDF;vtkNetCDF_cxx;vtkhdf5_hl;vtkhdf5;vtkexoIIc;vtklibxml2;vtkRenderingFreeTypeOpenGL; > vtkTestingRendering;vtkFiltersProgrammable;vtkRenderingGL2PS;vtkRenderingContextOpenGL;vtkgl2ps;vtkFiltersHyperTree;vtkIOMPIParallel; > vtkIOMovie;vtkIOExodus;vtkTestingIOSQL;vtkIOSQL;vtksqlite;vtkFiltersSelection;vtkFiltersVerdict;verdict;vtkIOMINC;vtkImagingStencil;vtkInteractionImage; > vtkIOLSDyna;vtkRenderingLOD;vtkFiltersParallelImaging;vtkIOPLY;vtkViewsGeovis;vtkGeovisCore;vtkproj4;vtkRenderingImage;vtkIOInfovis;vtkIOEnSight; > vtkRenderingVolumeOpenGL;vtkImagingStatistics;vtkFiltersFlowPaths;vtkIOParallelNetCDF;vtkIOAMR;vtkFiltersAMR;vtkViewsContext2D; > vtkFiltersParallelGeometry;vtkIOParallelXML;vtkIOExport;vtkGUISupportQtSQL;vtkInfovisBoostGraphAlgorithms;vtkFiltersParallelMPI; > vtkGUISupportQtWebkit;vtkGUISupportQtOpenGL;vtkFiltersSMP;vtkImagingMorphological;vtkIOImport;vtkTestingGenericBridge; > vtkImagingMath;vtkFiltersGeneric;vtkRenderingVolumeAMR > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please 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 pablo.hernandez.cerdan at outlook.com Tue Dec 2 00:26:28 2014 From: pablo.hernandez.cerdan at outlook.com (=?iso-8859-1?B?UGFibG8gSGVybuFuZGV6?=) Date: Tue, 2 Dec 2014 06:26:28 +0100 Subject: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK ) In-Reply-To: References: , Message-ID: I have a running/compiling CMakeLists.txt when using VTK only, this is the related VTK part: find_package(VTK 6.2 REQUIRED) message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") include(${VTK_USE_FILE}) include_directories( ${VTK_INCLUDE_DIRS}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) add_executable(VTKNodesEdgesEXE main.cpp ${source_files} ${QT_UI_HEADERS} ${QT_RESOURCES}) target_link_libraries(VTKNodesEdgesEXE ${VTK_LIBRARIES}) target_link_libraries(VTKNodesEdgesEXE Qt5::Widgets Qt5::PrintSupport) The problem is that if I add find_package(ITK) anywhere, ${VTK_LIBRARIES} gets overrides by a tiny list selected by ITK. > Date: Tue, 2 Dec 2014 00:12:56 -0500 > Subject: Re: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK ) > From: bill.lorensen at gmail.com > To: pablo.hernandez.cerdan at outlook.com > CC: vtkusers at vtk.org > > This is normal usage: > > find_package(ITK REQUIRED) > include(${ITK_USE_FILE}) > > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > > I do not see the include's in your example. Please show the entire > CMakeList.txt file > > > On Mon, Dec 1, 2014 at 11:50 PM, Pablo Hern?ndez > wrote: > > I have compiled ITK with the use_vtk option. And now ITK overrides the > > VTK_LIBRARIES, with a really small list of libraries. > > > > find_package(ITK 4.5 REQUIRED) > > message (status "** ITK FOUND: USE_FILES ${ITK_USE_FILE}") > > message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") > > message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") > > > > find_package(VTK 6.2 REQUIRED) > > message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") > > message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") > > > > Output: > > status** ITK FOUND: USE_FILES > > /home/phc/Software/ITK/install-debug-nocuda-v461/lib/cmake/ITK-4.7/UseITK.cmake > > status** VTK FOUND: USE_FILES > > /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake > > status** VTK FOUND: VTK_LIBRARIES > > vtkCommonCore;vtksys;vtkRenderingCore;vtkCommonExecutionModel; > > vtkCommonDataModel;vtkCommonMath;vtkCommonMisc;vtkCommonSystem; > > vtkCommonTransforms;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry; > > vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingOpenGL; > > vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg;vtkpng;vtktiff;vtkRenderingFreeType; > > vtkfreetype;vtkftgl;vtkInteractionStyle;vtkImagingSources > > > > status** VTK FOUND: USE_FILES > > /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake > > status** VTK FOUND: VTK_LIBRARIES > > vtkCommonCore;vtksys;vtkRenderingCore;vtkCommonExecutionModel; > > vtkCommonDataModel;vtkCommonMath;vtkCommonMisc;vtkCommonSystem; > > vtkCommonTransforms;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry; > > vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingOpenGL; > > vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg;vtkpng;vtktiff;vtkRenderingFreeType; > > vtkfreetype;vtkftgl;vtkInteractionStyle;vtkImagingSources > > > > > > --Same output TWICE ...-- > > > > If I find VTK first and then ITK I got the same results. > > > > But if I don't find ITK, ie. with VTK alone I get the triple amount of > > libraries, and I need those libraries to compile my code. > > Is this a bug in ITK (or cmake, or VTK) or am I doing something wrong in my > > CMakeLists.txt? > > > > find_package(VTK 6.2 REQUIRED) > > message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") > > message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") > > > > Output: > > status** VTK FOUND: USE_FILES > > /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake > > status** VTK FOUND: VTK_LIBRARIES > > vtkIOMPIImage;vtkIOImage;vtkCommonDataModel; > > vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem; > > vtkCommonTransforms;vtkCommonExecutionModel;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg; > > vtkpng;vtktiff;vtkParallelMPI;vtkParallelCore;vtkIOLegacy;vtkfreetype;vtkIOVideo;vtkImagingColor;vtkImagingCore; > > vtkRenderingLIC;vtkIOXML;vtkIOGeometry;vtkjsoncpp;vtkIOXMLParser;vtkexpat;vtkImagingSources;vtkRenderingOpenGL; > > vtkImagingHybrid;vtkRenderingCore;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry; > > vtkFiltersStatistics;vtkImagingFourier;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkInteractionStyle;vtkRenderingQt; > > vtkFiltersTexture;vtkGUISupportQt;vtkRenderingLabel;vtkRenderingFreeType;vtkftgl;vtkRenderingContext2D;vtkViewsQt; > > vtkViewsInfovis;vtkChartsCore;vtkCommonColor;vtkInfovisCore;vtkFiltersImaging;vtkImagingGeneral;vtkFiltersModeling; > > vtkInfovisLayout;vtkViewsCore;vtkInteractionWidgets;vtkFiltersHybrid;vtkRenderingAnnotation;vtkRenderingVolume;vtkDomainsChemistry; > > vtkIOParallel;vtkFiltersParallel;vtkIONetCDF;vtkNetCDF;vtkNetCDF_cxx;vtkhdf5_hl;vtkhdf5;vtkexoIIc;vtklibxml2;vtkRenderingFreeTypeOpenGL; > > vtkTestingRendering;vtkFiltersProgrammable;vtkRenderingGL2PS;vtkRenderingContextOpenGL;vtkgl2ps;vtkFiltersHyperTree;vtkIOMPIParallel; > > vtkIOMovie;vtkIOExodus;vtkTestingIOSQL;vtkIOSQL;vtksqlite;vtkFiltersSelection;vtkFiltersVerdict;verdict;vtkIOMINC;vtkImagingStencil;vtkInteractionImage; > > vtkIOLSDyna;vtkRenderingLOD;vtkFiltersParallelImaging;vtkIOPLY;vtkViewsGeovis;vtkGeovisCore;vtkproj4;vtkRenderingImage;vtkIOInfovis;vtkIOEnSight; > > vtkRenderingVolumeOpenGL;vtkImagingStatistics;vtkFiltersFlowPaths;vtkIOParallelNetCDF;vtkIOAMR;vtkFiltersAMR;vtkViewsContext2D; > > vtkFiltersParallelGeometry;vtkIOParallelXML;vtkIOExport;vtkGUISupportQtSQL;vtkInfovisBoostGraphAlgorithms;vtkFiltersParallelMPI; > > vtkGUISupportQtWebkit;vtkGUISupportQtOpenGL;vtkFiltersSMP;vtkImagingMorphological;vtkIOImport;vtkTestingGenericBridge; > > vtkImagingMath;vtkFiltersGeneric;vtkRenderingVolumeAMR > > > > > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please 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 david.gobbi at gmail.com Tue Dec 2 00:39:17 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 1 Dec 2014 22:39:17 -0700 Subject: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK ) In-Reply-To: References: Message-ID: Hi Pablo, It's best to only link to the VTK libraries that you need, rather than trying to link to them all via ${VTK_LIBRARIES}. The reason for the short list is probably that when ITK calls find_package(), it only requests the small set of VTK components that ITK uses: http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:find_package - David On Mon, Dec 1, 2014 at 10:26 PM, Pablo Hern?ndez < pablo.hernandez.cerdan at outlook.com> wrote: > I have a running/compiling CMakeLists.txt when using VTK only, this is > the related VTK part: > find_package(VTK 6.2 REQUIRED) > message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") > message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") > > include(${VTK_USE_FILE}) > include_directories( ${VTK_INCLUDE_DIRS}) > include_directories(${CMAKE_CURRENT_SOURCE_DIR}) > > add_executable(VTKNodesEdgesEXE main.cpp ${source_files} ${QT_UI_HEADERS} > ${QT_RESOURCES}) > target_link_libraries(VTKNodesEdgesEXE ${VTK_LIBRARIES}) > target_link_libraries(VTKNodesEdgesEXE Qt5::Widgets Qt5::PrintSupport) > > > The problem is that if I add find_package(ITK) anywhere, ${VTK_LIBRARIES} > gets overrides by a tiny list selected by ITK. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Tue Dec 2 07:03:46 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Tue, 02 Dec 2014 13:03:46 +0100 Subject: [vtkusers] vtkConvexHull2D not in VTK installation any more? Message-ID: <547DAAA2.606@mh-hannover.de> Dear mailing list members, To get vtkConvexHull2D into my VTK installation, I need to apply the following changes to cmake-files: diff -aur vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt --- vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt 2014-01-22 16:55:41.000000000 +0100 +++ vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt 2014-07-07 14:32:25.074469342 +0200 @@ -1,4 +1,5 @@ set(Module_SRCS + vtkConvexHull2D.cxx vtkAddMembershipArray.cxx vtkAdjacencyMatrixToEdgeTable.cxx vtkArrayNorm.cxx diff -aur vtk-6.1.0_vanilla/Infovis/Core/module.cmake vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake --- vtk-6.1.0_vanilla/Infovis/Core/module.cmake 2014-01-22 16:55:41.000000000 +0100 +++ vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake 2014-07-07 14:39:59.525609602 +0200 @@ -2,6 +2,7 @@ GROUPS StandAlone DEPENDS + vtkRenderingCore vtkCommonDataModel vtkCommonSystem vtkFiltersExtraction Is there a reason vtkConvexHull2D is not included in the default installation with Infovis enabled or do I have to enable something else in cmake? Thanks for any help or hints. Roman -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 From bill.lorensen at gmail.com Tue Dec 2 08:36:54 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 2 Dec 2014 08:36:54 -0500 Subject: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK ) In-Reply-To: References: Message-ID: As David said you can explicitly list the modules that your app uses. Or, reset the vtk modules that itk sets using: set(VTK_MODULES_REQUESTED "") before find_package(VTK REQUIRED) On Tue, Dec 2, 2014 at 12:39 AM, David Gobbi wrote: > Hi Pablo, > > It's best to only link to the VTK libraries that you need, rather than > trying to > link to them all via ${VTK_LIBRARIES}. > > The reason for the short list is probably that when ITK calls > find_package(), > it only requests the small set of VTK components that ITK uses: > http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:find_package > > - David > > > On Mon, Dec 1, 2014 at 10:26 PM, Pablo Hern?ndez > wrote: >> >> I have a running/compiling CMakeLists.txt when using VTK only, this is >> the related VTK part: >> find_package(VTK 6.2 REQUIRED) >> message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") >> message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") >> >> include(${VTK_USE_FILE}) >> include_directories( ${VTK_INCLUDE_DIRS}) >> include_directories(${CMAKE_CURRENT_SOURCE_DIR}) >> >> add_executable(VTKNodesEdgesEXE main.cpp ${source_files} ${QT_UI_HEADERS} >> ${QT_RESOURCES}) >> target_link_libraries(VTKNodesEdgesEXE ${VTK_LIBRARIES}) >> target_link_libraries(VTKNodesEdgesEXE Qt5::Widgets Qt5::PrintSupport) >> >> >> The problem is that if I add find_package(ITK) anywhere, ${VTK_LIBRARIES} >> gets overrides by a tiny list selected by ITK. > > -- Unpaid intern in BillsBasement at noware dot com From pattersonnp at gmail.com Tue Dec 2 08:40:04 2014 From: pattersonnp at gmail.com (Nick Patterson) Date: Tue, 2 Dec 2014 14:40:04 +0100 Subject: [vtkusers] QVTKWidget and MacOS problems References: Message-ID: <31F9D879-B625-4371-9473-F21A684BCB75@gmail.com> Dear all, To demonstrate the issue that I am having, I will refer to the FourPaneViewer example that is bundled with VTK. This example replicates the issue that I am experiencing in my own application but only on the MacOS platform. The attached image shows that the CT renders in the windows, but noticeably they only occupy the botton left corner of the QVTKWidget. This is not seen when compiling this example on Linux, but is a problem on MacOS. The ouput on the command line that accompanies this behaviour is:- ERROR: In /opt/SOURCE/VTK/6.10.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 1202 vtkOpenGLRenderer (0x7fe502289a90): failed after Clear 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /opt/SOURCE/VTK/6.10.0/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x7fe5022b0c40): failed after RenderInternal 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /opt/SOURCE/VTK/6.10.0/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x7fe500f1ae00): failed after RenderInternal 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /opt/SOURCE/VTK/6.10.0/Common/ExecutionModel/vtkTrivialProducer.cxx, line 279 vtkTrivialProducer (0x7fe5022861b0): This data object does not contain the requested extent. Nickys-MacBook-Pro:FourPaneViewer-build nppatt$ ./QtVTKRenderWindows ~/ClinicalData/LiverInsertPhantom/CT/ ERROR: In /opt/SOURCE/VTK/6.10.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 1202 vtkOpenGLRenderer (0x7fee4ae52be0): failed after Clear 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /opt/SOURCE/VTK/6.10.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 574 vtkOpenGLImageSliceMapper (0x7fee4ae08b10): failed after RenderPolygon 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /opt/SOURCE/VTK/6.10.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 574 vtkOpenGLImageSliceMapper (0x7fee4ae08b10): failed after RenderPolygon 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /opt/SOURCE/VTK/6.10.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 1202 vtkOpenGLRenderer (0x7fee4ae98e60): failed after Clear 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /opt/SOURCE/VTK/6.10.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 574 vtkOpenGLImageSliceMapper (0x7fee4ae94f90): failed after RenderPolygon 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation All of this behaviour also affects mouse interactions (i.e. if I try to maniulate the cross-hairs, the mouse position is completely off. Can anyone provide advice on the this, specifically for MacOS? Regards, Nick. ======================================================================== Dr Nick Patterson MPhys PhD PGCE AMInstP Department of Medical Physics Velindre Cancer Centre Whitchurch Cardiff CF24 2TL NHS-email: nick.patterson at wales.nhs.uk Preferred email (off-site access/regularly accessed): pattersonnp.work at gmail.com ========================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-12-02 at 14.22.22.png Type: image/png Size: 153693 bytes Desc: not available URL: From bill.lorensen at gmail.com Tue Dec 2 10:16:07 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 2 Dec 2014 10:16:07 -0500 Subject: [vtkusers] vtkConvexHull2D not in VTK installation any more? In-Reply-To: <547DAAA2.606@mh-hannover.de> References: <547DAAA2.606@mh-hannover.de> Message-ID: Roman, This is definitely a bug. There are other missing also. I'll look into it. Thanks, Bill On Tue, Dec 2, 2014 at 7:03 AM, Dr. Roman Grothausmann wrote: > Dear mailing list members, > > > To get vtkConvexHull2D into my VTK installation, I need to apply the > following changes to cmake-files: > > diff -aur vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt > vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt > --- vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt 2014-01-22 > 16:55:41.000000000 +0100 > +++ vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt > 2014-07-07 14:32:25.074469342 +0200 > @@ -1,4 +1,5 @@ > set(Module_SRCS > + vtkConvexHull2D.cxx > vtkAddMembershipArray.cxx > vtkAdjacencyMatrixToEdgeTable.cxx > vtkArrayNorm.cxx > diff -aur vtk-6.1.0_vanilla/Infovis/Core/module.cmake > vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake > --- vtk-6.1.0_vanilla/Infovis/Core/module.cmake 2014-01-22 > 16:55:41.000000000 +0100 > +++ vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake > 2014-07-07 14:39:59.525609602 +0200 > @@ -2,6 +2,7 @@ > GROUPS > StandAlone > DEPENDS > + vtkRenderingCore > vtkCommonDataModel > vtkCommonSystem > vtkFiltersExtraction > > Is there a reason vtkConvexHull2D is not included in the default > installation with Infovis enabled or do I have to enable something else in > cmake? > > Thanks for any help or hints. > Roman > > > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-9574 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please 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 grothausmann.roman at mh-hannover.de Tue Dec 2 10:42:54 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Tue, 02 Dec 2014 16:42:54 +0100 Subject: [vtkusers] vtkConvexHull2D not in VTK installation any more? In-Reply-To: References: <547DAAA2.606@mh-hannover.de> Message-ID: <547DDDFE.6080706@mh-hannover.de> Many thanks Bill for the quick reply. It seems vtkConvexHull2D is barley used, as my old notes show this problem already existed around a year ago, I can't say though which VTK version I was using then. On 02/12/14 16:16, Bill Lorensen wrote: > Roman, > > This is definitely a bug. There are other missing also. I'll look into it. > > Thanks, > > Bill > > On Tue, Dec 2, 2014 at 7:03 AM, Dr. Roman Grothausmann > wrote: >> Dear mailing list members, >> >> >> To get vtkConvexHull2D into my VTK installation, I need to apply the >> following changes to cmake-files: >> >> diff -aur vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt >> vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt >> --- vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt 2014-01-22 >> 16:55:41.000000000 +0100 >> +++ vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt >> 2014-07-07 14:32:25.074469342 +0200 >> @@ -1,4 +1,5 @@ >> set(Module_SRCS >> + vtkConvexHull2D.cxx >> vtkAddMembershipArray.cxx >> vtkAdjacencyMatrixToEdgeTable.cxx >> vtkArrayNorm.cxx >> diff -aur vtk-6.1.0_vanilla/Infovis/Core/module.cmake >> vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake >> --- vtk-6.1.0_vanilla/Infovis/Core/module.cmake 2014-01-22 >> 16:55:41.000000000 +0100 >> +++ vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake >> 2014-07-07 14:39:59.525609602 +0200 >> @@ -2,6 +2,7 @@ >> GROUPS >> StandAlone >> DEPENDS >> + vtkRenderingCore >> vtkCommonDataModel >> vtkCommonSystem >> vtkFiltersExtraction >> >> Is there a reason vtkConvexHull2D is not included in the default >> installation with Infovis enabled or do I have to enable something else in >> cmake? >> >> Thanks for any help or hints. >> Roman >> >> >> -- >> Dr. Roman Grothausmann >> >> Tomographie und Digitale Bildverarbeitung >> Tomography and Digital Image Analysis >> >> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >> Medizinische Hochschule Hannover >> Carl-Neuberg-Str. 1 >> D-30625 Hannover >> >> Tel. +49 511 532-9574 >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please 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 > > > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 From bill.lorensen at gmail.com Tue Dec 2 10:49:27 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 2 Dec 2014 10:49:27 -0500 Subject: [vtkusers] vtkConvexHull2D not in VTK installation any more? In-Reply-To: <547DDDFE.6080706@mh-hannover.de> References: <547DAAA2.606@mh-hannover.de> <547DDDFE.6080706@mh-hannover.de> Message-ID: Are you using vtkConvexHull2D? On Tue, Dec 2, 2014 at 10:42 AM, Dr. Roman Grothausmann wrote: > Many thanks Bill for the quick reply. It seems vtkConvexHull2D is barley > used, as my old notes show this problem already existed around a year ago, I > can't say though which VTK version I was using then. > > > On 02/12/14 16:16, Bill Lorensen wrote: >> >> Roman, >> >> This is definitely a bug. There are other missing also. I'll look into it. >> >> Thanks, >> >> Bill >> >> On Tue, Dec 2, 2014 at 7:03 AM, Dr. Roman Grothausmann >> wrote: >>> >>> Dear mailing list members, >>> >>> >>> To get vtkConvexHull2D into my VTK installation, I need to apply the >>> following changes to cmake-files: >>> >>> diff -aur vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt >>> vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt >>> --- vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt 2014-01-22 >>> 16:55:41.000000000 +0100 >>> +++ vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt >>> 2014-07-07 14:32:25.074469342 +0200 >>> @@ -1,4 +1,5 @@ >>> set(Module_SRCS >>> + vtkConvexHull2D.cxx >>> vtkAddMembershipArray.cxx >>> vtkAdjacencyMatrixToEdgeTable.cxx >>> vtkArrayNorm.cxx >>> diff -aur vtk-6.1.0_vanilla/Infovis/Core/module.cmake >>> vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake >>> --- vtk-6.1.0_vanilla/Infovis/Core/module.cmake 2014-01-22 >>> 16:55:41.000000000 +0100 >>> +++ vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake >>> 2014-07-07 14:39:59.525609602 +0200 >>> @@ -2,6 +2,7 @@ >>> GROUPS >>> StandAlone >>> DEPENDS >>> + vtkRenderingCore >>> vtkCommonDataModel >>> vtkCommonSystem >>> vtkFiltersExtraction >>> >>> Is there a reason vtkConvexHull2D is not included in the default >>> installation with Infovis enabled or do I have to enable something else >>> in >>> cmake? >>> >>> Thanks for any help or hints. >>> Roman >>> >>> >>> -- >>> Dr. Roman Grothausmann >>> >>> Tomographie und Digitale Bildverarbeitung >>> Tomography and Digital Image Analysis >>> >>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>> Medizinische Hochschule Hannover >>> Carl-Neuberg-Str. 1 >>> D-30625 Hannover >>> >>> Tel. +49 511 532-9574 >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please 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 >> >> >> >> > > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-9574 -- Unpaid intern in BillsBasement at noware dot com From cory.quammen at kitware.com Tue Dec 2 11:34:20 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 2 Dec 2014 11:34:20 -0500 Subject: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK ) In-Reply-To: References: Message-ID: Pablo, I was just looking into this myself after encountering the same behavior. If you want to include the VTK libraries needed for ITK and specify an additional set of VTK modules in your project, I suggest the following: find_package(ITK REQUIRED) include(${ITK_USE_FILE}) set(VTK_MODULES_REQUESTED ${VTK_MODULES_REQUESTED} [additional VTK modules]) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) This should work. VTK_LIBRARIES should be set to only the VTK libraries needed for the modules requested by ITK and by you, plus their dependencies. Let us know if it doesn't. Thanks, Cory On Tue, Dec 2, 2014 at 8:36 AM, Bill Lorensen wrote: > As David said you can explicitly list the modules that your app uses. > > Or, reset the vtk modules that itk sets using: > set(VTK_MODULES_REQUESTED "") > before > find_package(VTK REQUIRED) > > On Tue, Dec 2, 2014 at 12:39 AM, David Gobbi wrote: >> Hi Pablo, >> >> It's best to only link to the VTK libraries that you need, rather than >> trying to >> link to them all via ${VTK_LIBRARIES}. >> >> The reason for the short list is probably that when ITK calls >> find_package(), >> it only requests the small set of VTK components that ITK uses: >> http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:find_package >> >> - David >> >> >> On Mon, Dec 1, 2014 at 10:26 PM, Pablo Hern?ndez >> wrote: >>> >>> I have a running/compiling CMakeLists.txt when using VTK only, this is >>> the related VTK part: >>> find_package(VTK 6.2 REQUIRED) >>> message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") >>> message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") >>> >>> include(${VTK_USE_FILE}) >>> include_directories( ${VTK_INCLUDE_DIRS}) >>> include_directories(${CMAKE_CURRENT_SOURCE_DIR}) >>> >>> add_executable(VTKNodesEdgesEXE main.cpp ${source_files} ${QT_UI_HEADERS} >>> ${QT_RESOURCES}) >>> target_link_libraries(VTKNodesEdgesEXE ${VTK_LIBRARIES}) >>> target_link_libraries(VTKNodesEdgesEXE Qt5::Widgets Qt5::PrintSupport) >>> >>> >>> The problem is that if I add find_package(ITK) anywhere, ${VTK_LIBRARIES} >>> gets overrides by a tiny list selected by ITK. >> >> > > > > -- > 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 qt.itk.vtk.help at gmail.com Tue Dec 2 12:23:41 2014 From: qt.itk.vtk.help at gmail.com (QtITK VTKHelp) Date: Tue, 2 Dec 2014 22:53:41 +0530 Subject: [vtkusers] VTK + Qt integration In-Reply-To: References: <1BC8F13A-142A-4C08-B1B7-3CA17E02F471@gmail.com> <9F48B586-88C2-4A12-BD6D-91791E17E0A9@gmail.com> <5D6CD617-30AC-48D6-AD2E-C056A0738EF3@gmail.com> <9FC6E677-A824-4282-AA85-154B280E19D8@gmail.com> Message-ID: check this link http://qtitkvtkhelp.blogspot.in/2012/12/vtk-with-qvtk-configuration.html . They have shown for 5.10 version completely. On Wed, Nov 19, 2014 at 5:22 PM, Bill Lorensen wrote: > I mean the cmake command or CMakeLists.txt file you use to build your > application. > > On Tue, Nov 18, 2014 at 7:57 PM, Nima Ajam Gard > wrote: > > It is what I used to build CMake: > > > > ./configure --prefix=$HOME/software > > make > > make install > > > > And, it is how I configured VTK with CMake: > > > > mkdir $HOME/projects/VTK-build > > cd $HOME/projects/VTK-build > > > > ccmake $HOME/projects/VTK > > > > is it what you mean by cmake command? > > > > On Nov 18, 2014, at 4:30 PM, Bill Lorensen > wrote: > > > > So, what is the cmake command you are using? > > > > > > On Tue, Nov 18, 2014 at 4:06 PM, Nima Ajam Gard > wrote: > > > > Thanks Bill for your help. Pages are updated as you can see it has a > ?new? > > subscript. > > > > On Nov 18, 2014, at 4:02 PM, Bill Lorensen > wrote: > > > > Please keep the users list in this conversation. > > > > It is possible that those pages have not been updated for vtk6. > > > > There are some wiki examples that use Qt. For example see: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx#Qt > > > > Bill > > > > On Tue, Nov 18, 2014 at 3:44 PM, Nima Ajam Gard > wrote: > > > > I exactly followed http://www.vtk.org/Wiki/VTK/Configure_and_Build. > > All the commands I used came from above webpage. > > > > On Nov 18, 2014, at 3:21 PM, Bill Lorensen > wrote: > > > > The cmake you showed is for vtk 5.x. > > > > Many people use VTK and Qt. Can you be more specific by providing the > > exact cmake command line you are using? > > > > > > On Tue, Nov 18, 2014 at 3:15 PM, Nima Ajam Gard > wrote: > > > > Hi Bill, > > > > Since, I could not use VTK-6.1 properly, I changed to VTK-6.0 but still I > > have same problems. > > > > > > On Nov 18, 2014, at 3:11 PM, Bill Lorensen > wrote: > > > > What version vtk are you using? > > > > > > On Tue, Nov 18, 2014 at 2:51 PM, Nima Ajam Gard > wrote: > > > > Hi, > > > > I am trying to integrate VTK and Qt but unfortunately for some reasons I > > cannot. Currently, I can run VTK's examples except those using Qt's user > > interface. For example, examples in tutorial work but examples in infovis > > cannot be run. > > > > I followed the guide on http://www.vtk.org/Wiki/VTK/Configure_and_Build. > All > > parts were done successfully except : > > > > cmake > > > -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake > > \ > > -DVTK_Group_Qt:BOOL=ON \ > > -DBUILD_SHARED_LIBRARIES:BOOL=ON \ > > /path/to/VTK > > > > when I was in VTK-build directory, it said that there was no path/to/VTK. > > So, I changed to VTK and removed /path/to/VTK and it worked. > > > > Whenever I tried to build an aforementioned example, Qt says : > > > > error:cannot find -lQVTK > > > > error: cannot find -lvtkRendering .... > > > > I really appreciate any help you can provide. > > > > > > Bests, > > Nima > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please 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 > > > > > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > > > > > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > > > > > > > > -- > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablo.hernandez.cerdan at outlook.com Tue Dec 2 17:02:04 2014 From: pablo.hernandez.cerdan at outlook.com (=?iso-8859-1?B?UGFibG8gSGVybuFuZGV6?=) Date: Tue, 2 Dec 2014 23:02:04 +0100 Subject: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK ) In-Reply-To: References: , , , , , Message-ID: Thanks a lot, I have tested Bill suggestion and it worked: > Or, reset the vtk modules that itk sets using: > set(VTK_MODULES_REQUESTED "") > before > find_package(VTK REQUIRED) And thanks for pointing out that linking all the libraries is not good, but I've some problems knowing what module corresponds to my #include header. Is there any wiki page to discover that or any map linking module-library? Thanks all for the solutions, Pablo > Date: Tue, 2 Dec 2014 11:34:20 -0500 > Subject: Re: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK ) > From: cory.quammen at kitware.com > To: bill.lorensen at gmail.com > CC: david.gobbi at gmail.com; vtkusers at vtk.org; pablo.hernandez.cerdan at outlook.com > > Pablo, > > I was just looking into this myself after encountering the same behavior. > > If you want to include the VTK libraries needed for ITK and specify an > additional set of VTK modules in your project, I suggest the > following: > > find_package(ITK REQUIRED) > include(${ITK_USE_FILE}) > > set(VTK_MODULES_REQUESTED ${VTK_MODULES_REQUESTED} [additional VTK modules]) > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > > This should work. VTK_LIBRARIES should be set to only the VTK > libraries needed for the modules requested by ITK and by you, plus > their dependencies. Let us know if it doesn't. > > Thanks, > Cory > > > On Tue, Dec 2, 2014 at 8:36 AM, Bill Lorensen wrote: > > As David said you can explicitly list the modules that your app uses. > > > > Or, reset the vtk modules that itk sets using: > > set(VTK_MODULES_REQUESTED "") > > before > > find_package(VTK REQUIRED) > > > > On Tue, Dec 2, 2014 at 12:39 AM, David Gobbi wrote: > >> Hi Pablo, > >> > >> It's best to only link to the VTK libraries that you need, rather than > >> trying to > >> link to them all via ${VTK_LIBRARIES}. > >> > >> The reason for the short list is probably that when ITK calls > >> find_package(), > >> it only requests the small set of VTK components that ITK uses: > >> http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:find_package > >> > >> - David > >> > >> > >> On Mon, Dec 1, 2014 at 10:26 PM, Pablo Hern?ndez > >> wrote: > >>> > >>> I have a running/compiling CMakeLists.txt when using VTK only, this is > >>> the related VTK part: > >>> find_package(VTK 6.2 REQUIRED) > >>> message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") > >>> message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") > >>> > >>> include(${VTK_USE_FILE}) > >>> include_directories( ${VTK_INCLUDE_DIRS}) > >>> include_directories(${CMAKE_CURRENT_SOURCE_DIR}) > >>> > >>> add_executable(VTKNodesEdgesEXE main.cpp ${source_files} ${QT_UI_HEADERS} > >>> ${QT_RESOURCES}) > >>> target_link_libraries(VTKNodesEdgesEXE ${VTK_LIBRARIES}) > >>> target_link_libraries(VTKNodesEdgesEXE Qt5::Widgets Qt5::PrintSupport) > >>> > >>> > >>> The problem is that if I add find_package(ITK) anywhere, ${VTK_LIBRARIES} > >>> gets overrides by a tiny list selected by ITK. > >> > >> > > > > > > > > -- > > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Dec 2 17:10:32 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 2 Dec 2014 17:10:32 -0500 Subject: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK ) In-Reply-To: References: Message-ID: There is a python script in: Utilities/Maintenance/WhatModulesVTK.py that gives a good first cut at the modules that your app uses. On Tue, Dec 2, 2014 at 5:02 PM, Pablo Hern?ndez wrote: > Thanks a lot, I have tested Bill suggestion and it worked: >> Or, reset the vtk modules that itk sets using: >> set(VTK_MODULES_REQUESTED "") >> before >> find_package(VTK REQUIRED) > > And thanks for pointing out that linking all the libraries is not good, but > I've some problems knowing what module corresponds to my #include > header. Is there any wiki page to discover that or any map linking > module-library? > > Thanks all for the solutions, > Pablo > >> Date: Tue, 2 Dec 2014 11:34:20 -0500 >> Subject: Re: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} >> from find_package( VTK ) >> From: cory.quammen at kitware.com >> To: bill.lorensen at gmail.com >> CC: david.gobbi at gmail.com; vtkusers at vtk.org; >> pablo.hernandez.cerdan at outlook.com > >> >> Pablo, >> >> I was just looking into this myself after encountering the same behavior. >> >> If you want to include the VTK libraries needed for ITK and specify an >> additional set of VTK modules in your project, I suggest the >> following: >> >> find_package(ITK REQUIRED) >> include(${ITK_USE_FILE}) >> >> set(VTK_MODULES_REQUESTED ${VTK_MODULES_REQUESTED} [additional VTK >> modules]) >> find_package(VTK REQUIRED) >> include(${VTK_USE_FILE}) >> >> This should work. VTK_LIBRARIES should be set to only the VTK >> libraries needed for the modules requested by ITK and by you, plus >> their dependencies. Let us know if it doesn't. >> >> Thanks, >> Cory >> >> >> On Tue, Dec 2, 2014 at 8:36 AM, Bill Lorensen >> wrote: >> > As David said you can explicitly list the modules that your app uses. >> > >> > Or, reset the vtk modules that itk sets using: >> > set(VTK_MODULES_REQUESTED "") >> > before >> > find_package(VTK REQUIRED) >> > >> > On Tue, Dec 2, 2014 at 12:39 AM, David Gobbi >> > wrote: >> >> Hi Pablo, >> >> >> >> It's best to only link to the VTK libraries that you need, rather than >> >> trying to >> >> link to them all via ${VTK_LIBRARIES}. >> >> >> >> The reason for the short list is probably that when ITK calls >> >> find_package(), >> >> it only requests the small set of VTK components that ITK uses: >> >> http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:find_package >> >> >> >> - David >> >> >> >> >> >> On Mon, Dec 1, 2014 at 10:26 PM, Pablo Hern?ndez >> >> wrote: >> >>> >> >>> I have a running/compiling CMakeLists.txt when using VTK only, this is >> >>> the related VTK part: >> >>> find_package(VTK 6.2 REQUIRED) >> >>> message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}") >> >>> message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}") >> >>> >> >>> include(${VTK_USE_FILE}) >> >>> include_directories( ${VTK_INCLUDE_DIRS}) >> >>> include_directories(${CMAKE_CURRENT_SOURCE_DIR}) >> >>> >> >>> add_executable(VTKNodesEdgesEXE main.cpp ${source_files} >> >>> ${QT_UI_HEADERS} >> >>> ${QT_RESOURCES}) >> >>> target_link_libraries(VTKNodesEdgesEXE ${VTK_LIBRARIES}) >> >>> target_link_libraries(VTKNodesEdgesEXE Qt5::Widgets Qt5::PrintSupport) >> >>> >> >>> >> >>> The problem is that if I add find_package(ITK) anywhere, >> >>> ${VTK_LIBRARIES} >> >>> gets overrides by a tiny list selected by ITK. >> >> >> >> >> > >> > >> > >> > -- >> > 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 -- Unpaid intern in BillsBasement at noware dot com From richard.j.brown at live.co.uk Wed Dec 3 04:45:33 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 3 Dec 2014 02:45:33 -0700 (MST) Subject: [vtkusers] vtkStringArray problem Message-ID: <1417599933439-5729638.post@n5.nabble.com> Hi all, I'm trying to put all DICOM files within a directory into a vtkStringArray so that I can check how many series there are. The problem, however, seems to be that InsertNexValue() and SetNumberOfValues() followed by SetValue() don't insert anything into the array. So, after a for loop of 160 vtkStdStrings, GetNumberOfValues() returns 160, but each value is empty. Furthermore, GetValue() causes the program to crash. Any ideas? I need to use vtkStringArray (as opposed to a vector of std::string etc.), as this is the required argument for vtkDICOMSorter ( link ). Any help greatly appreciated, Rich -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Wed Dec 3 04:48:43 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 3 Dec 2014 02:48:43 -0700 (MST) Subject: [vtkusers] imageViewer size within QVTKWidget In-Reply-To: References: <1417175172257-5729578.post@n5.nabble.com> <4B7FB8C0-759E-4A46-B274-8A0F5DAEA102@gmail.com> Message-ID: <1417600123022-5729639.post@n5.nabble.com> David, Thanks for the advice. To change the cxx file, do I need to edit the source code, then rebuild and install? Rich -- View this message in context: http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-tp5729578p5729639.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Wed Dec 3 05:52:53 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 3 Dec 2014 03:52:53 -0700 (MST) Subject: [vtkusers] QVTKWidget and MacOS problems In-Reply-To: <31F9D879-B625-4371-9473-F21A684BCB75@gmail.com> References: <31F9D879-B625-4371-9473-F21A684BCB75@gmail.com> Message-ID: <1417603973950-5729641.post@n5.nabble.com> Nick, Can confirm same problem. QVTKWidget is quarter size when program is on macbook pro screen, but not on thunderbolt display. However, I get the terminal errors regardless of which screen it's on. If the size of the QVTKWidget depends on screen size but the OpenGL errors happen regardless, it seems to me that they could be two separate problems. No idea how to remedy either problem though. Rich -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-and-MacOS-problems-tp5729620p5729641.html Sent from the VTK - Users mailing list archive at Nabble.com. From pattersonnp at gmail.com Wed Dec 3 05:55:50 2014 From: pattersonnp at gmail.com (Nick Patterson) Date: Wed, 3 Dec 2014 11:55:50 +0100 Subject: [vtkusers] QVTKWidget and MacOS problems In-Reply-To: <1417603973950-5729641.post@n5.nabble.com> References: <31F9D879-B625-4371-9473-F21A684BCB75@gmail.com> <1417603973950-5729641.post@n5.nabble.com> Message-ID: <4CEA8D4A-BBBD-4158-BF60-EBACC83178DF@gmail.com> > Rich, > Thanks for the confirmation. Hopefully someone understands this problem and will comment soon. Currently any application I write on the MacOS platform is useless until I can get a remedy for this problem. > > Nick. > On 3 Dec 2014, at 11:52, mbcx9rb9 wrote: > > Nick, > > Can confirm same problem. QVTKWidget is quarter size when program is on > macbook pro screen, but not on thunderbolt display. However, I get the > terminal errors regardless of which screen it's on. > > If the size of the QVTKWidget depends on screen size but the OpenGL errors > happen regardless, it seems to me that they could be two separate problems. > No idea how to remedy either problem though. > > Rich > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-and-MacOS-problems-tp5729620p5729641.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 pattersonnp at gmail.com Wed Dec 3 06:07:37 2014 From: pattersonnp at gmail.com (Nick Patterson) Date: Wed, 3 Dec 2014 12:07:37 +0100 Subject: [vtkusers] QVTKWidget and MacOS problems In-Reply-To: References: <31F9D879-B625-4371-9473-F21A684BCB75@gmail.com> <1417603973950-5729641.post@n5.nabble.com> <4CEA8D4A-BBBD-4158-BF60-EBACC83178DF@gmail.com> Message-ID: Rich, I believe this has always been a problem (on Mac - possibly something to do with Retina screens ONLY?) as far as I?m aware. Certainly, if the VTK examples throw up errors without any amendment from the user? there is an underlying issue that needs to be looked at. Nick. > On 3 Dec 2014, at 12:03, Richard Brown wrote: > > Nick, > > No problem, we can?t be the only two using MacBooks. Is this a recent problem for you? I only got mine the other week so I don?t know how long it has been like this. > > Rich > >> On 03 Dec 2014, at 11:55, Nick Patterson wrote: >> >>> Rich, >>> Thanks for the confirmation. Hopefully someone understands this problem and will comment soon. Currently any application I write on the MacOS platform is useless until I can get a remedy for this problem. >>> >>> Nick. >> >> >> >>> On 3 Dec 2014, at 11:52, mbcx9rb9 wrote: >>> >>> Nick, >>> >>> Can confirm same problem. QVTKWidget is quarter size when program is on >>> macbook pro screen, but not on thunderbolt display. However, I get the >>> terminal errors regardless of which screen it's on. >>> >>> If the size of the QVTKWidget depends on screen size but the OpenGL errors >>> happen regardless, it seems to me that they could be two separate problems. >>> No idea how to remedy either problem though. >>> >>> Rich >>> >>> >>> >>> -- >>> View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-and-MacOS-problems-tp5729620p5729641.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 > From cory.quammen at kitware.com Wed Dec 3 07:14:14 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 3 Dec 2014 07:14:14 -0500 Subject: [vtkusers] vtkStringArray problem In-Reply-To: <1417599933439-5729638.post@n5.nabble.com> References: <1417599933439-5729638.post@n5.nabble.com> Message-ID: Hi Rich, Can you post the relevant section of code where you are setting up the vtkStringArray and adding values? Thanks, Cory On Wed, Dec 3, 2014 at 4:45 AM, mbcx9rb9 wrote: > Hi all, > > I'm trying to put all DICOM files within a directory into a vtkStringArray > so that I can check how many series there are. The problem, however, seems > to be that InsertNexValue() and SetNumberOfValues() followed by SetValue() > don't insert anything into the array. So, after a for loop of 160 > vtkStdStrings, GetNumberOfValues() returns 160, but each value is empty. > Furthermore, GetValue() causes the program to crash. Any ideas? > > I need to use vtkStringArray (as opposed to a vector of std::string etc.), > as this is the required argument for vtkDICOMSorter ( link > > ). > > Any help greatly appreciated, > Rich > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638.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 richard.j.brown at live.co.uk Wed Dec 3 07:29:48 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 3 Dec 2014 05:29:48 -0700 (MST) Subject: [vtkusers] vtkStringArray problem In-Reply-To: References: <1417599933439-5729638.post@n5.nabble.com> Message-ID: <1417609788446-5729646.post@n5.nabble.com> Cory, It is written in Qt but the first 4 lines of code create a list of DICOM filenames. The part in the for loop is the relevant bit, when I try to write in entry by entry into the vtkStringArray. I could just as easily comment out the lines: filenames->SetNumberOfValues(list.size()); filenames->SetValue(i,temp.c_str()); and uncomment the line: filenames->InsertNextValue(temp); however neither work. I have tried various combinations of insert temp as a vtkStdString etc. but to no avail. Cheers, Rich void MainWindow::listFiles(QString path) { // set path to user chosen folder QDir dir = QDir(path); // set filter to only search for dicom files QStringList filters; filters << "*.dcm"; dir.setNameFilters(filters); // Create list of all *.dcm filenames QStringList list = dir.entryList(); if (list.size() == 0) { QMessageToScreen("Error. No DICOM files found in this directory"); } else { // if there exist DICOM files in directory, create vector containing them all vtkSmartPointer filenames = vtkSmartPointer::New(); filenames->SetNumberOfValues(list.size()); filenames->SetName("List_of_Filenames"); for (int i=0; iSetValue(i,temp.c_str()); //filenames->InsertNextValue(temp); } QMessageToScreen(QString::number(filenames->GetNumberOfValues())); // vktDICOMSorter is used to find out how many series exist in a directory //vtkSmartPointer sorter = vtkSmartPointer::New(); //sorter->SetInputFileNames(filenames); //sorter->Update(); } } -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638p5729646.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Dec 3 08:37:13 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 3 Dec 2014 06:37:13 -0700 Subject: [vtkusers] imageViewer size within QVTKWidget In-Reply-To: <1417600123022-5729639.post@n5.nabble.com> References: <1417175172257-5729578.post@n5.nabble.com> <4B7FB8C0-759E-4A46-B274-8A0F5DAEA102@gmail.com> <1417600123022-5729639.post@n5.nabble.com> Message-ID: Hi Rich, Yes to "edit" and "rebuild", but installation is usually not part of the edit/compile/debug cycle. You can build your app against the VTK build directory, rather than doing an install. - David On Wed, Dec 3, 2014 at 2:48 AM, mbcx9rb9 wrote: > David, > > Thanks for the advice. To change the cxx file, do I need to edit the source > code, then rebuild and install? > > Rich > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-tp5729578p5729639.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 ich_daniel at habmalnefrage.de Wed Dec 3 09:26:41 2014 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Wed, 3 Dec 2014 07:26:41 -0700 (MST) Subject: [vtkusers] problems in the volume calculation with vtkMassProperties Message-ID: <1417616801762-5729649.post@n5.nabble.com> Hi, I try to calculate volumes with vtkMassProperties. Here, I noticed the following. Look on the screenshot the sphere (radius of 10) has a volume of 4.178 and the colored Polydata has a volume of 12.454 . Actually, the sphere should have a much larger volume (visual seen). Is it because that the colored object is not closed? How can I calculate the correct volume-result of the colored object ? -- View this message in context: http://vtk.1045678.n5.nabble.com/problems-in-the-volume-calculation-with-vtkMassProperties-tp5729649.html Sent from the VTK - Users mailing list archive at Nabble.com. From curator at gmx.de Wed Dec 3 09:25:27 2014 From: curator at gmx.de (CuRaToR) Date: Wed, 03 Dec 2014 15:25:27 +0100 Subject: [vtkusers] build latest activiz in linux (mono) In-Reply-To: References: <1417599933439-5729638.post@n5.nabble.com> Message-ID: <547F1D57.5010706@gmx.de> Hey there, I am currently trying to use VTK in C# with mono in Linux. To do so, I found out that it would be a good idea to install activiz. I downloaded the latest VTK and activiz sources from git and installed mummy and gccxml. I have build VTK t) defaul(and tried to configure activiz. However, I got the following error message, which I don't understand really. CMake Error at CMakeLists.txt:1008 (ADD_DEPENDENCIES): Cannot add target-level dependencies to non-existent target "vtkCommonGenerateWrappers". The add_dependencies works for top-level logical targets created by the add_executable, add_library, or add_custom_target commands. If you want to add file-level dependencies see the DEPENDS option of the add_custom_target and add_custom_command commands. Any ideas how to overcome this issue? kind regards, curator -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Wed Dec 3 09:35:48 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Wed, 03 Dec 2014 15:35:48 +0100 Subject: [vtkusers] tool for CTest testing of new vtkFilters with vtkPolyData output Message-ID: <547F1FC4.4050602@mh-hannover.de> Dear mailing list members, Is there a tool to use for CTest testing as incorporated in the VTK-Journal of new vtkFilters with vtkPolyData output? There is Image Compare for images (http://www.vtkjournal.org/help/submission) but I could not find any examples for the testing of filters producing vtkPolyData. Instead of providing an expected output image I'd want to provide an expected output vtk-file for the test in the VTK-Journal. Would vtkHausdorffDistancePointSetFilter (http://www.vtkjournal.org/browse/publication/839) be a good choice for such comparison instead of just comparing number of Points and Cells? Where can I find some general instructions on how to design tests for contributions of filters for the VTK-Journal? E.g. how to set up the section in CMakeLists.txt with varying test parameters? Thanks for any help or hints. Roman -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 From aaahaaah at yandex.ru Wed Dec 3 09:40:07 2014 From: aaahaaah at yandex.ru (=?koi8-r?B?4cjSycXXIOHM2MLF0tQ=?=) Date: Wed, 03 Dec 2014 17:40:07 +0300 Subject: [vtkusers] test failure on Redhat Message-ID: <82781417617607@web15j.yandex.ru> An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Dec 3 10:25:55 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 3 Dec 2014 10:25:55 -0500 Subject: [vtkusers] vtkStringArray problem In-Reply-To: <1417609788446-5729646.post@n5.nabble.com> References: <1417599933439-5729638.post@n5.nabble.com> <1417609788446-5729646.post@n5.nabble.com> Message-ID: Rich, Hmm, I don't see anything obviously wrong with your code. I have attached a sample program that creates a vtkStringArray like you are doing and it runs fine. Could you try running your code through a memory checker such as valgrind to see if there might be memory errors elsewhere that manifest in this section of the code? Thanks, Cory On Wed, Dec 3, 2014 at 7:29 AM, mbcx9rb9 wrote: > Cory, > > It is written in Qt but the first 4 lines of code create a list of DICOM > filenames. The part in the for loop is the relevant bit, when I try to write > in entry by entry into the vtkStringArray. I could just as easily comment > out the lines: > > filenames->SetNumberOfValues(list.size()); > filenames->SetValue(i,temp.c_str()); > > and uncomment the line: > > filenames->InsertNextValue(temp); > > however neither work. I have tried various combinations of insert temp as a > vtkStdString etc. but to no avail. > > Cheers, > Rich > > > void MainWindow::listFiles(QString path) > > { > // set path to user chosen folder > QDir dir = QDir(path); > > // set filter to only search for dicom files > QStringList filters; > filters << "*.dcm"; > dir.setNameFilters(filters); > > // Create list of all *.dcm filenames > QStringList list = dir.entryList(); > > if (list.size() == 0) { QMessageToScreen("Error. No DICOM files found in > this directory"); } > else > { > // if there exist DICOM files in directory, create vector containing > them all > vtkSmartPointer filenames = > vtkSmartPointer::New(); > filenames->SetNumberOfValues(list.size()); > filenames->SetName("List_of_Filenames"); > for (int i=0; i { > std::string temp = dir.absolutePath().toStdString() + > "/" + list.at(i).toStdString(); > std::cout <<temp.c_str()<<std::endl; > > //to assign data use setnumberofvalues and setvalue or > insertnextvalue > filenames->SetValue(i,temp.c_str()); > > //filenames->InsertNextValue(temp); > } > > QMessageToScreen(QString::number(filenames->GetNumberOfValues())); > > // vktDICOMSorter is used to find out how many series exist in a > directory > //vtkSmartPointer sorter = > vtkSmartPointer::New(); > //sorter->SetInputFileNames(filenames); > //sorter->Update(); > } > } > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638p5729646.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 -------------- project(StringArrayTest) cmake_minimum_required(VERSION 2.8) find_package(VTK COMPONENTS vtkCommonCore REQUIRED) include(${VTK_USE_FILE}) #message(STATUS ${VTK_LIBRARIES}) add_executable(StringArrayTest StringArrayTest.cxx) target_link_libraries(StringArrayTest ${VTK_LIBRARIES}) -------------- next part -------------- A non-text attachment was scrubbed... Name: StringArrayTest.cxx Type: text/x-c++src Size: 540 bytes Desc: not available URL: From grothausmann.roman at mh-hannover.de Wed Dec 3 10:52:58 2014 From: grothausmann.roman at mh-hannover.de (Dr. Roman Grothausmann) Date: Wed, 03 Dec 2014 16:52:58 +0100 Subject: [vtkusers] vtkStringArray problem In-Reply-To: <1417609788446-5729646.post@n5.nabble.com> References: <1417599933439-5729638.post@n5.nabble.com> <1417609788446-5729646.post@n5.nabble.com> Message-ID: <547F31DA.5020803@mh-hannover.de> Hi Rich, I recently had problems with getting/reading/accessing values in vtkStringArray. It tourned out that my problems were related to the fact that vtkStringArray is NOT a vtkDataArray, it is a vtkAbstractArray (as vtkDataArray is). Joachim Pouderoux gave me the hint to use e.g. input->GetPointData()->GetAbstractArray(j) instead. Perhaps Your problem is also related to the different array types. Hope this helps Roman On 03/12/14 13:29, mbcx9rb9 wrote: > Cory, > > It is written in Qt but the first 4 lines of code create a list of DICOM > filenames. The part in the for loop is the relevant bit, when I try to write > in entry by entry into the vtkStringArray. I could just as easily comment > out the lines: > > filenames->SetNumberOfValues(list.size()); > filenames->SetValue(i,temp.c_str()); > > and uncomment the line: > > filenames->InsertNextValue(temp); > > however neither work. I have tried various combinations of insert temp as a > vtkStdString etc. but to no avail. > > Cheers, > Rich > > > void MainWindow::listFiles(QString path) > > { > // set path to user chosen folder > QDir dir = QDir(path); > > // set filter to only search for dicom files > QStringList filters; > filters << "*.dcm"; > dir.setNameFilters(filters); > > // Create list of all *.dcm filenames > QStringList list = dir.entryList(); > > if (list.size() == 0) { QMessageToScreen("Error. No DICOM files found in > this directory"); } > else > { > // if there exist DICOM files in directory, create vector containing > them all > vtkSmartPointer filenames = > vtkSmartPointer::New(); > filenames->SetNumberOfValues(list.size()); > filenames->SetName("List_of_Filenames"); > for (int i=0; i { > std::string temp = dir.absolutePath().toStdString() + > "/" + list.at(i).toStdString(); > std::cout <<temp.c_str()<<std::endl; > > //to assign data use setnumberofvalues and setvalue or > insertnextvalue > filenames->SetValue(i,temp.c_str()); > > //filenames->InsertNextValue(temp); > } > > QMessageToScreen(QString::number(filenames->GetNumberOfValues())); > > // vktDICOMSorter is used to find out how many series exist in a > directory > //vtkSmartPointer sorter = > vtkSmartPointer::New(); > //sorter->SetInputFileNames(filenames); > //sorter->Update(); > } > } > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638p5729646.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 > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-9574 From richard.j.brown at live.co.uk Wed Dec 3 11:04:29 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 3 Dec 2014 09:04:29 -0700 (MST) Subject: [vtkusers] vtkStringArray problem In-Reply-To: <547F31DA.5020803@mh-hannover.de> References: <1417599933439-5729638.post@n5.nabble.com> <1417609788446-5729646.post@n5.nabble.com> <547F31DA.5020803@mh-hannover.de> Message-ID: <1417622669993-5729657.post@n5.nabble.com> Cory, Valgrind output looks like this (I omitted test1->test158): ==17464== Memcheck, a memory error detector ==17464== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==17464== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info ==17464== Command: ./StringArrayTest ==17464== --17464-- ./StringArrayTest: --17464-- dSYM directory is missing; consider using --dsymutil=yes --17464-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option --17464-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2 times) --17464-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4 times) ==17464== Conditional jump or move depends on uninitialised value(s) ==17464== at 0x10085EC3F: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib) ==17464== by 0x100652BB6: __sfvwrite (in /usr/lib/system/libsystem_c.dylib) ==17464== by 0x1006530CA: fwrite (in /usr/lib/system/libsystem_c.dylib) ==17464== by 0x10039ED29: std::__1::__stdoutbuf::overflow(int) (in /usr/lib/libc++.1.dylib) ==17464== by 0x10039491C: std::__1::basic_streambuf >::xsputn(char const*, long) (in /usr/lib/libc++.1.dylib) ==17464== by 0x10002B135: std::__1::ostreambuf_iterator > std::__1::__pad_and_output >(std::__1::ostreambuf_iterator >, char const*, char const*, char const*, std::__1::ios_base&, char) (in /usr/local/lib/libvtkCommonCore-6.1.1.dylib) ==17464== by 0x10002AFAC: std::__1::basic_ostream >& std::__1::__put_character_sequence >(std::__1::basic_ostream >&, char const*, unsigned long) (in /usr/local/lib/libvtkCommonCore-6.1.1.dylib) ==17464== by 0x100001F06: main (in ./StringArrayTest) ==17464== test0 ... test159 ==17464== ==17464== HEAP SUMMARY: ==17464== in use at exit: 41,598 bytes in 421 blocks ==17464== total heap usage: 637 allocs, 216 frees, 82,544 bytes allocated ==17464== ==17464== LEAK SUMMARY: ==17464== definitely lost: 16 bytes in 1 blocks ==17464== indirectly lost: 0 bytes in 0 blocks ==17464== possibly lost: 13,122 bytes in 116 blocks ==17464== still reachable: 28,460 bytes in 304 blocks ==17464== suppressed: 0 bytes in 0 blocks ==17464== Rerun with --leak-check=full to see details of leaked memory ==17464== ==17464== For counts of detected and suppressed errors, rerun with: -v ==17464== Use --track-origins=yes to see where uninitialised values come from ==17464== ERROR SUMMARY: 1010 errors from 1 contexts (suppressed: 0 from 0) -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638p5729657.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Wed Dec 3 11:11:07 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 3 Dec 2014 09:11:07 -0700 (MST) Subject: [vtkusers] vtkStringArray problem In-Reply-To: <1417622669993-5729657.post@n5.nabble.com> References: <1417599933439-5729638.post@n5.nabble.com> <1417609788446-5729646.post@n5.nabble.com> <547F31DA.5020803@mh-hannover.de> <1417622669993-5729657.post@n5.nabble.com> Message-ID: <1417623067166-5729658.post@n5.nabble.com> Roman, It's possible I'm wrong, but when I run the program in Debugger, on each iteration the array seems to be empty. I think my problem may be with writing to the array rather than reading it afterwards. Rich -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638p5729658.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Wed Dec 3 11:12:55 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 3 Dec 2014 11:12:55 -0500 Subject: [vtkusers] vtkStringArray problem In-Reply-To: <1417622669993-5729657.post@n5.nabble.com> References: <1417599933439-5729638.post@n5.nabble.com> <1417609788446-5729646.post@n5.nabble.com> <547F31DA.5020803@mh-hannover.de> <1417622669993-5729657.post@n5.nabble.com> Message-ID: Rich, It looks like valgrind thinks it identified something in a system library and not VTK. I'm on Ubuntu 12.04 and my valgrind run on this example gives cory at cory-ubuntu-14:~/code/bin/StringArrayTest$ valgrind ./StringArrayTest ==26715== Memcheck, a memory error detector ==26715== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==26715== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info ==26715== Command: ./StringArrayTest [snip] ==26715== ==26715== HEAP SUMMARY: ==26715== in use at exit: 0 bytes in 0 blocks ==26715== total heap usage: 481 allocs, 481 frees, 50,362 bytes allocated ==26715== ==26715== All heap blocks were freed -- no leaks are possible ==26715== ==26715== For counts of detected and suppressed errors, rerun with: -v ==26715== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) On Wed, Dec 3, 2014 at 11:04 AM, mbcx9rb9 wrote: > Cory, > > Valgrind output looks like this (I omitted test1->test158): > > ==17464== Memcheck, a memory error detector > ==17464== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. > ==17464== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright > info > ==17464== Command: ./StringArrayTest > ==17464== > --17464-- ./StringArrayTest: > --17464-- dSYM directory is missing; consider using --dsymutil=yes > --17464-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option > --17464-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2 > times) > --17464-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4 > times) > ==17464== Conditional jump or move depends on uninitialised value(s) > ==17464== at 0x10085EC3F: _platform_memchr$VARIANT$Haswell (in > /usr/lib/system/libsystem_platform.dylib) > ==17464== by 0x100652BB6: __sfvwrite (in > /usr/lib/system/libsystem_c.dylib) > ==17464== by 0x1006530CA: fwrite (in /usr/lib/system/libsystem_c.dylib) > ==17464== by 0x10039ED29: std::__1::__stdoutbuf::overflow(int) (in > /usr/lib/libc++.1.dylib) > ==17464== by 0x10039491C: std::__1::basic_streambuf std::__1::char_traits<char> >::xsputn(char const*, long) (in > /usr/lib/libc++.1.dylib) > ==17464== by 0x10002B135: std::__1::ostreambuf_iterator std::__1::char_traits<char> > std::__1::__pad_and_output std::__1::char_traits<char> >(std::__1::ostreambuf_iterator std::__1::char_traits<char> >, char const*, char const*, char const*, > std::__1::ios_base&, char) (in /usr/local/lib/libvtkCommonCore-6.1.1.dylib) > ==17464== by 0x10002AFAC: std::__1::basic_ostream std::__1::char_traits<char> >& std::__1::__put_character_sequence std::__1::char_traits<char> >(std::__1::basic_ostream std::__1::char_traits<char> >&, char const*, unsigned long) (in > /usr/local/lib/libvtkCommonCore-6.1.1.dylib) > ==17464== by 0x100001F06: main (in ./StringArrayTest) > ==17464== > test0 > ... > test159 > ==17464== > ==17464== HEAP SUMMARY: > ==17464== in use at exit: 41,598 bytes in 421 blocks > ==17464== total heap usage: 637 allocs, 216 frees, 82,544 bytes allocated > ==17464== > ==17464== LEAK SUMMARY: > ==17464== definitely lost: 16 bytes in 1 blocks > ==17464== indirectly lost: 0 bytes in 0 blocks > ==17464== possibly lost: 13,122 bytes in 116 blocks > ==17464== still reachable: 28,460 bytes in 304 blocks > ==17464== suppressed: 0 bytes in 0 blocks > ==17464== Rerun with --leak-check=full to see details of leaked memory > ==17464== > ==17464== For counts of detected and suppressed errors, rerun with: -v > ==17464== Use --track-origins=yes to see where uninitialised values come > from > ==17464== ERROR SUMMARY: 1010 errors from 1 contexts (suppressed: 0 from 0) > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638p5729657.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 sean at rogue-research.com Wed Dec 3 11:30:46 2014 From: sean at rogue-research.com (Sean McBride) Date: Wed, 3 Dec 2014 11:30:46 -0500 Subject: [vtkusers] QVTKWidget and MacOS problems In-Reply-To: <1417603973950-5729641.post@n5.nabble.com> References: <31F9D879-B625-4371-9473-F21A684BCB75@gmail.com> <1417603973950-5729641.post@n5.nabble.com> Message-ID: <20141203163046.1573236997@mail.rogue-research.com> On Wed, 3 Dec 2014 03:52:53 -0700, mbcx9rb9 said: >Can confirm same problem. QVTKWidget is quarter size when program is on >macbook pro screen, but not on thunderbolt display. However, I get the >terminal errors regardless of which screen it's on. That does sound related to "retina displays", or more specifically "HiDPI mode". With non-retina displays, 1 point = 1 pixel, but with retina 1 point = 2x2 pixels. Is your thunderbolt display retina? Could you test on a non-retina Mac? You can also enable HiDPI mode on non-retina Macs using Quartz Debug, or maybe even SystemPreferences>Displays these days. These tests should at least be enough to confirm HiDPI mode is the issue here. 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 bill.lorensen at gmail.com Wed Dec 3 12:29:35 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 3 Dec 2014 12:29:35 -0500 Subject: [vtkusers] problems in the volume calculation with vtkMassProperties In-Reply-To: <1417616801762-5729649.post@n5.nabble.com> References: <1417616801762-5729649.post@n5.nabble.com> Message-ID: 1) What is the resolution of your sphere? 2) You cannot compute the volume of an open object. On Wed, Dec 3, 2014 at 9:26 AM, -Daniel- wrote: > Hi, > I try to calculate volumes with vtkMassProperties. > Here, I noticed the following. Look on the screenshot the sphere (radius of > 10) has a volume of 4.178 and the colored Polydata has a volume of 12.454 . > > > > > Actually, the sphere should have a much larger volume (visual seen). > Is it because that the colored object is not closed? > How can I calculate the correct volume-result of the colored object ? > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/problems-in-the-volume-calculation-with-vtkMassProperties-tp5729649.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 -- Unpaid intern in BillsBasement at noware dot com From david.gobbi at gmail.com Wed Dec 3 14:40:24 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 3 Dec 2014 12:40:24 -0700 Subject: [vtkusers] vtkStringArray problem In-Reply-To: References: <1417599933439-5729638.post@n5.nabble.com> <1417609788446-5729646.post@n5.nabble.com> <547F31DA.5020803@mh-hannover.de> <1417622669993-5729657.post@n5.nabble.com> Message-ID: Hi Rich, Your use of vtkStringArray is correct, so I suspect the conversion from QString is where the problem is occurring. In my own apps, I've standardized on using utf8 and my QString conversion would be as follows: QString fpath = dir.absoluteFilePath(list.at(i)); QByteArray text = fpath.toUtf8(); stringArray->InsertNextValue(text.data()); I avoid using toStdString() because it is lossy (it forces conversion to ASCII). - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Wed Dec 3 14:52:10 2014 From: andy.bauer at kitware.com (Andy Bauer) Date: Wed, 3 Dec 2014 14:52:10 -0500 Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: Hi Paul, I looked at your fix for this and it looks better than mine. There a gerrit change set at http://review.source.kitware.com/#/c/18235/. I apologize that it currently lists me as the author of this fix instead of you -- I'm trying to get this done quickly and overlooked that before I pushed it to gerrit. If everyone is happy with this fix I'll make sure to have the author changed to you. Regards, Andy On Mon, Dec 1, 2014 at 12:00 PM, Andy Bauer wrote: > Hi Paul, > > Thanks for sending your patch. I hope to be able to take a look at it > later this week. > > And yes, my patch does make some assumptions that maybe shouldn't be made. > It's definitely needs more looking over if it were to get merged into VTK > master, which I'm not sure it even should. > > Regards, > Andy > > On Thu, Nov 27, 2014 at 6:52 AM, Paul Edwards > wrote: > >> BTW there would be a problem with your implementation if >> vtkPolyData::InsertNextCell was called after a call to >> vtkPolyData::DeleteCell (and before vtkPolyData::RemoveDeletedCells) >> as it would not append to vtkPolyData::CellsCopy. I'm not sure if >> that is allowed but your implementation would result in a index out of >> bounds. >> >> On 27 November 2014 at 11:23, Paul Edwards >> wrote: >> > Hi Andy, >> > >> > I've attached a patch that uses a slightly different approach which >> > only changes vtkPolyData::RemoveDeletedCells. The code looks simpler >> > and it passes your new test although I am assuming it is ok to >> > ShallowCopy the vtkPolyData at the top of the function. I'll let you >> > decide if it is better! >> > >> > Note: the patch is for the VTK with the current ParaView master >> > (v6.1.0-2506-g2e5a3c9) >> > >> > Best regards, >> > Paul >> > >> > On 23 November 2014 at 17:37, Andy Bauer >> wrote: >> >> Hi Paul, >> >> >> >> I have a potential fix for this bug at >> >> http://review.source.kitware.com/#/t/5040/. It feels like a hack but I >> >> couldn't figure out a better way to do it yet. I also modified a test >> to >> >> verify that the proper cells were getting removed, based on the cell's >> >> points. >> >> >> >> If you see a better way to do this, please let me know. >> >> >> >> Thanks, >> >> Andy >> >> >> >> On Mon, Nov 17, 2014 at 5:37 PM, Andy Bauer >> wrote: >> >>> >> >>> Hi Paul, >> >>> >> >>> Thanks for the input. I'm at SC14 right now so I won't be able to >> look at >> >>> this until I get back. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> On Mon, Nov 17, 2014 at 4:26 AM, Paul Edwards < >> paul.m.edwards at gmail.com> >> >>> wrote: >> >>>> >> >>>> Hi Andy, >> >>>> >> >>>> I've attached a sample program demonstrating the issue. The example >> >>>> just loads the sphere.vtk file, removes all cells where the "Result" >> >>>> value is not 0 and writes the result to output.vtk. The tar file >> also >> >>>> contains the correct and incorrect output. >> >>>> >> >>>> Best regards, >> >>>> Paul >> >>>> >> >>>> On 15 November 2014 02:59, Andy Bauer >> wrote: >> >>>> > Hi Paul, >> >>>> > >> >>>> > I was part of that fix and I think it's correct. There may have >> been >> >>>> > more to >> >>>> > that fix though since it took a couple of shots before getting it >> >>>> > correct so >> >>>> > the git history may not be as pristine as desired. If you can give >> me >> >>>> > more >> >>>> > specifics on the bug though I can try to see what's going on with >> it. >> >>>> > If I >> >>>> > remember correctly though, that fix had to do with the fact that >> some >> >>>> > places >> >>>> > thought that the order of iterating through cells in a vtkPolyData >> was >> >>>> > first >> >>>> > through all vertex cells, then all line cells, then all polys and >> >>>> > finally >> >>>> > through all triangle strips, irregardless of the order that cells >> got >> >>>> > inserted in (i.e. using InsertNextCell()). The reality is that for >> >>>> > polydata >> >>>> > that cells are indeed iterated through in their insertion order. >> The >> >>>> > test >> >>>> > that was added for those changes hopefully shows the proper >> >>>> > functionality >> >>>> > along with associated cell data manipulations as well. >> >>>> > >> >>>> > Regards, >> >>>> > Andy >> >>>> > >> >>>> > >> >>>> > >> >>>> > On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards >> >>>> > >> >>>> > wrote: >> >>>> >> >> >>>> >> Hi, >> >>>> >> >> >>>> >> I've just noticed an issue with vtkPolyData. I had been calling >> >>>> >> vtkPolyData::DeleteCell to remove the unwanted cells, followed by >> a >> >>>> >> call to vtkPolyData::RemoveDeletedCells. The result is not as it >> >>>> >> should be in the latest version. To fix I just started reverting >> >>>> >> previous commits. I tracked it down to the following: >> >>>> >> >> >>>> >> bugfix 14459: Iterating through polydata cells incorrectly. >> >>>> >> commit: 44131c6d05375692af8b6b38cf4291983bdd8f45 >> >>>> >> >> >>>> >> Sorry but I do not have time to provide a test case or track >> where in >> >>>> >> this commit lies the problem. I just thought I would give details >> >>>> >> here in case anyone else notices the same problem and is >> searching for >> >>>> >> a solution. >> >>>> >> >> >>>> >> Best regards, >> >>>> >> Paul >> >>>> >> _______________________________________________ >> >>>> >> Powered by www.kitware.com >> >>>> >> >> >>>> >> Visit other Kitware open-source projects at >> >>>> >> http://www.kitware.com/opensource/opensource.html >> >>>> >> >> >>>> >> Please 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 Dan.Huantes at tasc.com Wed Dec 3 16:17:56 2014 From: Dan.Huantes at tasc.com (Huantes, Dan F (TASC)) Date: Wed, 3 Dec 2014 21:17:56 +0000 Subject: [vtkusers] TimeRenderer and Other Examples with Errors Message-ID: <0F30CC23E95EB94FA4C9E18D23DD77421597D710@TSEAMB01> Excuse the Newbie Question.... But.... I just cloned VTK and ran cmake for Visual Studio 2012 (i.e. Generator = "Visual Studio 11 Win64) and both Debug and Release build with no errors. yay!!.. I tried to run several of the examples and the vast majority of them display a vtkOutputWindow and give the following errors: Generic Warning: In ..\..\..\Rendering\Core\vtkProperty.cxx, line 45 Error: no override found for 'vtkProperty'. Generic Warning: In ..\..\..\Rendering\Core\vtkRenderer.cxx, line 46 Error: no override found for 'vtkRenderer'. Walking through the problem, it looks like I haven't set the VTK_AUTOLOAD_PATH environmental variable. I'm going to look and see what this should be set to... Don't recall being prompted for this one by the configuration process. But I could be wrong.... Any insights would be appreciated. Thank you. Dan CONFIDENTIALITY NOTICE: This message and any attachments or files transmitted with it (collectively, the "Message") are intended only for the addressee and may contain information that is privileged, proprietary and/or prohibited from disclosure by law or contract. If you are not the intended recipient: (a) please do not read, copy or retransmit the Message; (b) permanently delete and/or destroy all electronic and hard copies of the Message; (c) notify us by return email; and (d) you are hereby notified that any dissemination, distribution or copying of the Message is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Wed Dec 3 17:45:34 2014 From: zarko at kg.ac.rs (zarko.milosevic) Date: Wed, 3 Dec 2014 15:45:34 -0700 (MST) Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: References: <1409751520521-5728555.post@n5.nabble.com> <1410184498184-5728608.post@n5.nabble.com> <1416350401054-5729498.post@n5.nabble.com> <051501d00384$8272c370$87584a50$@kg.ac.rs> <05aa01d003d7$ab9931a0$02cb94e0$@kg.ac.rs> Message-ID: <1417646734871-5729669.post@n5.nabble.com> Dear David, I have encountered on some class vtkSplineDrivenImageSlicer which implements everything that i need for the my task. Actually that class is facade (wrapper) class which uses vtkImageReslice for reslicing and vtkFrenetSerretFrame for generating resliceAxes of vtkImageReslice. http://www.vtkjournal.org/browse/publication/838 To sum up. This class as input requires image data and path in form of poly line. Using the path class generates three orthogonal vector representing the local coordinate frame in every point of the polyline. For those purposes this class uses Frenet Serret formula implemented in class vtkFrenetSerretFrame. Using those vectors resliceAxes are generated and new slices are extracted. I have problem with one piece of code from that class to understand. This is where i`m stuck: for ( int comp = 0; comp < 3; comp++ ) { // Here reslice matrix is built using thre ortogonal vectors generated in previous step from path resliceAxes->SetElement(0,comp,binormal[comp]); resliceAxes->SetElement(1,comp,normal[comp]); resliceAxes->SetElement(2,comp,tangent[comp]); // Here is calculated orgin of the slice so it would not be in the origin of the frame (resliceaxes) but in in // lower left corner of the slice because sliceExtent is from 0, sliceExtent[0] and etc. origin[comp] = center[comp] - normal[comp]*this->SliceExtent[1]*this->SliceSpacing[1]/2.0 - binormal[comp]*this->SliceExtent[0]*this->SliceSpacing[0]/2.0; } //! Transform the origin in the homogeneous coordinate space. Is that necessary in this way ? origin[3] = 1.0; double originXYZW[4]; resliceAxes->MultiplyPoint(origin, originXYZW); //! Get the new origin from the transposed matrix. resliceAxes->Transpose(); double neworiginXYZW[4]; resliceAxes->MultiplyPoint(originXYZW, neworiginXYZW); resliceAxes->SetElement(0,3,neworiginXYZW[0]); resliceAxes->SetElement(1,3,neworiginXYZW[1]); resliceAxes->SetElement(2,3,neworiginXYZW[2]); this->reslicer->SetResliceAxes( resliceAxes ); Creating the newOriginXYZW in this way does not have any sense. newOriginXYZW is the same as Origin. Transposing the resliceaxes where only rotation matrix elements are present have same result as inverting the rotation matrix. originXYZW = resliceAxes(onlyRotation) * origin neworiginXYZW = resliceAxes(onlyRotation)^-1 * originXYZW => origin But that is not main problem. Main question is do you have idea why transposed (inverted rotation) is passed to reslicer ? Results with including Transposed matrix is little bit better than without it. Images are little bit better aligned but nothing significant. Best regards Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageReslice-and-appending-slices-tp5728537p5729669.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Dec 4 01:35:40 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 3 Dec 2014 23:35:40 -0700 Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: <1417646734871-5729669.post@n5.nabble.com> References: <1409751520521-5728555.post@n5.nabble.com> <1410184498184-5728608.post@n5.nabble.com> <1416350401054-5729498.post@n5.nabble.com> <051501d00384$8272c370$87584a50$@kg.ac.rs> <05aa01d003d7$ab9931a0$02cb94e0$@kg.ac.rs> <1417646734871-5729669.post@n5.nabble.com> Message-ID: Hi Zarko, Good question. My own approach would be to build the matrix with the binormal, normal, and tangent as the matrix columns from the very beginning. That way, no transpose is required: resliceAxes->SetElement(comp, 0, binormal[comp]); resliceAxes->SetElement(comp, 1, normal[comp]); resliceAxes->SetElement(comp, 2, tangent[comp]); And you're correct that the code was simply transforming the origin back and forth. It makes more sense to just use the origin as-is: resliceAxes->SetElement(0, 3, origin[0]); resliceAxes->SetElement(1, 3, origin[1]); resliceAxes->SetElement(2, 3, origin[2]); this->reslicer->SetResliceAxes(resliceAxes); Now the best way to think of the rotation is as follows. The output of vtkImageReslice is (in this case) an XY plane with a given extent and sample spacing. The job of the ResliceAxes is to rotate that plane so that it "cuts" (or "slices") the input data at the correct angles. The way that the vtkImageReslice algorithm works is this: it loops through the output points, and for each of these points it 1) computes (x,y,z) according to the OutputSpacing and OutputOrigin 2) applies the ResliceAxes matrix to (x,y,z,1) to get (x',y',z',1) 3) samples (i.e. interpolates) the input image at (x',y',z') to get the value to use for the output voxel at (x,y,z) - David On Wed, Dec 3, 2014 at 3:45 PM, zarko.milosevic wrote: > Dear David, > > I have encountered on some class vtkSplineDrivenImageSlicer which > implements > everything that i need for the my task. Actually that class is facade > (wrapper) class which uses vtkImageReslice for reslicing and > vtkFrenetSerretFrame for generating resliceAxes of vtkImageReslice. > http://www.vtkjournal.org/browse/publication/838 > > To sum up. This class as input requires image data and path in form of poly > line. Using the path class generates three orthogonal vector representing > the local coordinate frame in every point of the polyline. For those > purposes this class uses Frenet Serret formula implemented in class > vtkFrenetSerretFrame. Using those vectors resliceAxes are generated and new > slices are extracted. > > I have problem with one piece of code from that class to understand. This > is > where i`m stuck: > > for ( int comp = 0; comp < 3; comp++ ) > { > // Here reslice matrix is built using thre ortogonal vectors generated in > previous step from path > resliceAxes->SetElement(0,comp,binormal[comp]); > resliceAxes->SetElement(1,comp,normal[comp]); > resliceAxes->SetElement(2,comp,tangent[comp]); > > // Here is calculated orgin of the slice so it would not be in the origin > of > the frame (resliceaxes) but in in // lower left corner of the slice > because > sliceExtent is from 0, sliceExtent[0] and etc. > origin[comp] = center[comp] - > normal[comp]*this->SliceExtent[1]*this->SliceSpacing[1]/2.0 > - > binormal[comp]*this->SliceExtent[0]*this->SliceSpacing[0]/2.0; > } > > //! Transform the origin in the homogeneous coordinate space. Is that > necessary in this way ? > origin[3] = 1.0; > double originXYZW[4]; > resliceAxes->MultiplyPoint(origin, originXYZW); > > //! Get the new origin from the transposed matrix. > resliceAxes->Transpose(); > double neworiginXYZW[4]; > resliceAxes->MultiplyPoint(originXYZW, neworiginXYZW); > > resliceAxes->SetElement(0,3,neworiginXYZW[0]); > resliceAxes->SetElement(1,3,neworiginXYZW[1]); > resliceAxes->SetElement(2,3,neworiginXYZW[2]); > this->reslicer->SetResliceAxes( resliceAxes ); > > Creating the newOriginXYZW in this way does not have any sense. > newOriginXYZW is the same as Origin. > Transposing the resliceaxes where only rotation matrix elements are present > have same result as inverting the rotation matrix. > originXYZW = resliceAxes(onlyRotation) * origin > neworiginXYZW = resliceAxes(onlyRotation)^-1 * originXYZW => origin > But that is not main problem. > > Main question is do you have idea why transposed (inverted rotation) is > passed to reslicer ? > Results with including Transposed matrix is little bit better than without > it. Images are little bit better aligned but nothing significant. > > Best regards > Zarko > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Thu Dec 4 01:47:29 2014 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Wed, 3 Dec 2014 23:47:29 -0700 (MST) Subject: [vtkusers] problems in the volume calculation with vtkMassProperties In-Reply-To: References: <1417616801762-5729649.post@n5.nabble.com> Message-ID: <1417675649754-5729671.post@n5.nabble.com> 1) the sphere resolution (theta and phi) is 60. 2) I thought as much. Is there a way to use the scalar values for volume calculation? -- View this message in context: http://vtk.1045678.n5.nabble.com/problems-in-the-volume-calculation-with-vtkMassProperties-tp5729649p5729671.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Thu Dec 4 04:58:56 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Thu, 4 Dec 2014 02:58:56 -0700 (MST) Subject: [vtkusers] QVTKWidget and MacOS problems In-Reply-To: <20141203163046.1573236997@mail.rogue-research.com> References: <31F9D879-B625-4371-9473-F21A684BCB75@gmail.com> <1417603973950-5729641.post@n5.nabble.com> <20141203163046.1573236997@mail.rogue-research.com> Message-ID: <1417687136470-5729672.post@n5.nabble.com> You are right, the problem is caused by the retina display having four times the resolution. Qt has it right, but VTK seems to display to the bottom left pixel group. I have managed to get around this by running the created .app in low resolution mode. To do this: Right click on the *.app file Get Info Open in low resolution mode Close the Get Info window and run program Let me know if this works for you, Nick. This is an annoying workaround since it means I can no longer run the program from Qt Creator directory, but at least it works. Rich -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-and-MacOS-problems-tp5729620p5729672.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Thu Dec 4 05:15:01 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Thu, 4 Dec 2014 03:15:01 -0700 (MST) Subject: [vtkusers] vtkStringArray problem In-Reply-To: References: <1417599933439-5729638.post@n5.nabble.com> <1417609788446-5729646.post@n5.nabble.com> <547F31DA.5020803@mh-hannover.de> <1417622669993-5729657.post@n5.nabble.com> Message-ID: <1417688101621-5729673.post@n5.nabble.com> David, Thanks you were right. Using your method works for me. Cheers, Rich -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638p5729673.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Thu Dec 4 07:51:54 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 4 Dec 2014 07:51:54 -0500 Subject: [vtkusers] problems in the volume calculation with vtkMassProperties In-Reply-To: <1417675649754-5729671.post@n5.nabble.com> References: <1417616801762-5729649.post@n5.nabble.com> <1417675649754-5729671.post@n5.nabble.com> Message-ID: Increase the sphere resolution to and you'll get closer. Fo example: 500x500 then 1000x1000 On Thu, Dec 4, 2014 at 1:47 AM, -Daniel- wrote: > 1) the sphere resolution (theta and phi) is 60. > 2) I thought as much. Is there a way to use the scalar values for volume > calculation? > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/problems-in-the-volume-calculation-with-vtkMassProperties-tp5729649p5729671.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 -- Unpaid intern in BillsBasement at noware dot com From cdvolko at gmail.com Thu Dec 4 11:05:03 2014 From: cdvolko at gmail.com (Claus-Dieter Volko) Date: Thu, 4 Dec 2014 17:05:03 +0100 Subject: [vtkusers] Cross hair Message-ID: To whom it may concern, I have wondered how to display a cross hair using Kitware.VTK and stumbled across this thread: http://www.cmake.org/pipermail/igstk-developers/2007-August/001498.html The thread is from 2007. Has the cross hair functionality been implemented in Kitware.VTK meanwhile? I would like to permanently display a cross hair at the position of a given probe point. This seems to be difficult to achieve with vtkImagePlaneWidget, since it only displays a cross hair unless the left mouse button is released. Since, as I see, you already discussed this problem back in 2007, I wonder whether a solution has been implemented in Kitware.VTK meanwhile? Best regards Claus Volko -- http://www.hugi.scene.org/adok/ From ra.corredor at gmail.com Thu Dec 4 11:17:22 2014 From: ra.corredor at gmail.com (Ricardo A Corredor) Date: Thu, 4 Dec 2014 09:17:22 -0700 (MST) 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: <1417709842689-5729677.post@n5.nabble.com> Hi David, I didn't reply when you submit this change, but I confirm that it works well !! Thanks However, I still have a question. Please look the following image: There are some voxels inside the polydata that are not included in the final mask. Is it a problem on the way they are calculated? Probably a shift when considering the voxel inside the contour (something like what is shown here http://guy-grave.developpez.com/tutoriels/hardware/les-cartes-graphiques/pipeline-non-programmable/rasterization/images/Polygon_scan-conversion.svg)? Thank you again and have a good day. Ricardo RaC -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729677.html Sent from the VTK - Users mailing list archive at Nabble.com. From paul.m.edwards at gmail.com Thu Dec 4 11:27:50 2014 From: paul.m.edwards at gmail.com (Paul Edwards) Date: Thu, 4 Dec 2014 16:27:50 +0000 Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: Hi Andy, The page shows the files as completely new - not sure why it might be difficult for anyone to review as they will not see the differences (or am I looking at the wrong thing in gerrit?) Anyway, thanks for looking at the patch and don't worry about the author - you did all the hard work creating the test, finding the bug and putting it on gerrit! It's much appreciated. Thanks, Paul On 3 December 2014 at 19:52, Andy Bauer wrote: > Hi Paul, > > I looked at your fix for this and it looks better than mine. There a > gerrit change set at http://review.source.kitware.com/#/c/18235/. I > apologize that it currently lists me as the author of this fix instead of > you -- I'm trying to get this done quickly and overlooked that before I > pushed it to gerrit. If everyone is happy with this fix I'll make sure to > have the author changed to you. > > Regards, > Andy > > On Mon, Dec 1, 2014 at 12:00 PM, Andy Bauer > wrote: > >> Hi Paul, >> >> Thanks for sending your patch. I hope to be able to take a look at it >> later this week. >> >> And yes, my patch does make some assumptions that maybe shouldn't be >> made. It's definitely needs more looking over if it were to get merged into >> VTK master, which I'm not sure it even should. >> >> Regards, >> Andy >> >> On Thu, Nov 27, 2014 at 6:52 AM, Paul Edwards >> wrote: >> >>> BTW there would be a problem with your implementation if >>> vtkPolyData::InsertNextCell was called after a call to >>> vtkPolyData::DeleteCell (and before vtkPolyData::RemoveDeletedCells) >>> as it would not append to vtkPolyData::CellsCopy. I'm not sure if >>> that is allowed but your implementation would result in a index out of >>> bounds. >>> >>> On 27 November 2014 at 11:23, Paul Edwards >>> wrote: >>> > Hi Andy, >>> > >>> > I've attached a patch that uses a slightly different approach which >>> > only changes vtkPolyData::RemoveDeletedCells. The code looks simpler >>> > and it passes your new test although I am assuming it is ok to >>> > ShallowCopy the vtkPolyData at the top of the function. I'll let you >>> > decide if it is better! >>> > >>> > Note: the patch is for the VTK with the current ParaView master >>> > (v6.1.0-2506-g2e5a3c9) >>> > >>> > Best regards, >>> > Paul >>> > >>> > On 23 November 2014 at 17:37, Andy Bauer >>> wrote: >>> >> Hi Paul, >>> >> >>> >> I have a potential fix for this bug at >>> >> http://review.source.kitware.com/#/t/5040/. It feels like a hack but >>> I >>> >> couldn't figure out a better way to do it yet. I also modified a test >>> to >>> >> verify that the proper cells were getting removed, based on the cell's >>> >> points. >>> >> >>> >> If you see a better way to do this, please let me know. >>> >> >>> >> Thanks, >>> >> Andy >>> >> >>> >> On Mon, Nov 17, 2014 at 5:37 PM, Andy Bauer >>> wrote: >>> >>> >>> >>> Hi Paul, >>> >>> >>> >>> Thanks for the input. I'm at SC14 right now so I won't be able to >>> look at >>> >>> this until I get back. >>> >>> >>> >>> Cheers, >>> >>> Andy >>> >>> >>> >>> On Mon, Nov 17, 2014 at 4:26 AM, Paul Edwards < >>> paul.m.edwards at gmail.com> >>> >>> wrote: >>> >>>> >>> >>>> Hi Andy, >>> >>>> >>> >>>> I've attached a sample program demonstrating the issue. The example >>> >>>> just loads the sphere.vtk file, removes all cells where the "Result" >>> >>>> value is not 0 and writes the result to output.vtk. The tar file >>> also >>> >>>> contains the correct and incorrect output. >>> >>>> >>> >>>> Best regards, >>> >>>> Paul >>> >>>> >>> >>>> On 15 November 2014 02:59, Andy Bauer >>> wrote: >>> >>>> > Hi Paul, >>> >>>> > >>> >>>> > I was part of that fix and I think it's correct. There may have >>> been >>> >>>> > more to >>> >>>> > that fix though since it took a couple of shots before getting it >>> >>>> > correct so >>> >>>> > the git history may not be as pristine as desired. If you can >>> give me >>> >>>> > more >>> >>>> > specifics on the bug though I can try to see what's going on with >>> it. >>> >>>> > If I >>> >>>> > remember correctly though, that fix had to do with the fact that >>> some >>> >>>> > places >>> >>>> > thought that the order of iterating through cells in a >>> vtkPolyData was >>> >>>> > first >>> >>>> > through all vertex cells, then all line cells, then all polys and >>> >>>> > finally >>> >>>> > through all triangle strips, irregardless of the order that cells >>> got >>> >>>> > inserted in (i.e. using InsertNextCell()). The reality is that for >>> >>>> > polydata >>> >>>> > that cells are indeed iterated through in their insertion order. >>> The >>> >>>> > test >>> >>>> > that was added for those changes hopefully shows the proper >>> >>>> > functionality >>> >>>> > along with associated cell data manipulations as well. >>> >>>> > >>> >>>> > Regards, >>> >>>> > Andy >>> >>>> > >>> >>>> > >>> >>>> > >>> >>>> > On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards >>> >>>> > >>> >>>> > wrote: >>> >>>> >> >>> >>>> >> Hi, >>> >>>> >> >>> >>>> >> I've just noticed an issue with vtkPolyData. I had been calling >>> >>>> >> vtkPolyData::DeleteCell to remove the unwanted cells, followed >>> by a >>> >>>> >> call to vtkPolyData::RemoveDeletedCells. The result is not as it >>> >>>> >> should be in the latest version. To fix I just started reverting >>> >>>> >> previous commits. I tracked it down to the following: >>> >>>> >> >>> >>>> >> bugfix 14459: Iterating through polydata cells incorrectly. >>> >>>> >> commit: 44131c6d05375692af8b6b38cf4291983bdd8f45 >>> >>>> >> >>> >>>> >> Sorry but I do not have time to provide a test case or track >>> where in >>> >>>> >> this commit lies the problem. I just thought I would give >>> details >>> >>>> >> here in case anyone else notices the same problem and is >>> searching for >>> >>>> >> a solution. >>> >>>> >> >>> >>>> >> Best regards, >>> >>>> >> Paul >>> >>>> >> _______________________________________________ >>> >>>> >> Powered by www.kitware.com >>> >>>> >> >>> >>>> >> Visit other Kitware open-source projects at >>> >>>> >> http://www.kitware.com/opensource/opensource.html >>> >>>> >> >>> >>>> >> Please 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 Thu Dec 4 11:32:16 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 4 Dec 2014 09:32:16 -0700 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: <1417709842689-5729677.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> <1417709842689-5729677.post@n5.nabble.com> Message-ID: Hi Ricardo, Thanks for the feedback. In the image that you attached, the pixels are twice as large as the "jaggies" of the contour, so I'm not sure how it would be possible for them to match exactly? That diagram for polygon scan conversion is an accurate depiction of what vtkPolyDataToImageStencil does if you call SetTolerance(0.0) and the contour passes exactly through the centre of a voxel. If the tolerance is greater than zero, then leftmost and topmost pixels would also be included. - David On Thu, Dec 4, 2014 at 9:17 AM, Ricardo A Corredor wrote: > Hi David, > > I didn't reply when you submit this change, but I confirm that it works > well > !! Thanks > > However, I still have a question. Please look the following image: > > > > There are some voxels inside the polydata that are not included in the > final > mask. Is it a problem on the way they are calculated? Probably a shift when > considering the voxel inside the contour (something like what is shown here > > http://guy-grave.developpez.com/tutoriels/hardware/les-cartes-graphiques/pipeline-non-programmable/rasterization/images/Polygon_scan-conversion.svg > )? > > Thank you again and have a good day. > > > Ricardo > RaC > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729677.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 david.gobbi at gmail.com Thu Dec 4 11:36:34 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 4 Dec 2014 09:36:34 -0700 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> <1417709842689-5729677.post@n5.nabble.com> Message-ID: I made a mistake in my last email, it should be "rightmost and topmost pixels". On Thu, Dec 4, 2014 at 9:32 AM, David Gobbi wrote: > Hi Ricardo, > > Thanks for the feedback. In the image that you attached, the pixels are > twice as large as the "jaggies" of the contour, so I'm not sure how it > would be possible for them to match exactly? > > That diagram for polygon scan conversion is an accurate depiction of what > vtkPolyDataToImageStencil does if you call SetTolerance(0.0) and the > contour passes exactly through the centre of a voxel. If the tolerance is > greater than zero, then leftmost and topmost pixels would also be included. > > - David > > > On Thu, Dec 4, 2014 at 9:17 AM, Ricardo A Corredor > wrote: > >> Hi David, >> >> I didn't reply when you submit this change, but I confirm that it works >> well >> !! Thanks >> >> However, I still have a question. Please look the following image: >> >> >> >> There are some voxels inside the polydata that are not included in the >> final >> mask. Is it a problem on the way they are calculated? Probably a shift >> when >> considering the voxel inside the contour (something like what is shown >> here >> >> http://guy-grave.developpez.com/tutoriels/hardware/les-cartes-graphiques/pipeline-non-programmable/rasterization/images/Polygon_scan-conversion.svg >> )? >> >> Thank you again and have a good day. >> >> >> Ricardo >> RaC >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729677.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 b.mayer1 at gmail.com Thu Dec 4 11:51:37 2014 From: b.mayer1 at gmail.com (b.mayer1) Date: Thu, 4 Dec 2014 11:51:37 -0500 Subject: [vtkusers] vtkConvexHull2D not in VTK installation any more? In-Reply-To: References: <547DAAA2.606@mh-hannover.de> <547DDDFE.6080706@mh-hannover.de> Message-ID: Just today I went to use vtkConvexHull2D for the first time and ran into this problem as well. On Tue, Dec 2, 2014 at 10:49 AM, Bill Lorensen wrote: > Are you using vtkConvexHull2D? > > On Tue, Dec 2, 2014 at 10:42 AM, Dr. Roman Grothausmann > wrote: > > Many thanks Bill for the quick reply. It seems vtkConvexHull2D is barley > > used, as my old notes show this problem already existed around a year > ago, I > > can't say though which VTK version I was using then. > > > > > > On 02/12/14 16:16, Bill Lorensen wrote: > >> > >> Roman, > >> > >> This is definitely a bug. There are other missing also. I'll look into > it. > >> > >> Thanks, > >> > >> Bill > >> > >> On Tue, Dec 2, 2014 at 7:03 AM, Dr. Roman Grothausmann > >> wrote: > >>> > >>> Dear mailing list members, > >>> > >>> > >>> To get vtkConvexHull2D into my VTK installation, I need to apply the > >>> following changes to cmake-files: > >>> > >>> diff -aur vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt > >>> vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt > >>> --- vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt 2014-01-22 > >>> 16:55:41.000000000 +0100 > >>> +++ > vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt > >>> 2014-07-07 14:32:25.074469342 +0200 > >>> @@ -1,4 +1,5 @@ > >>> set(Module_SRCS > >>> + vtkConvexHull2D.cxx > >>> vtkAddMembershipArray.cxx > >>> vtkAdjacencyMatrixToEdgeTable.cxx > >>> vtkArrayNorm.cxx > >>> diff -aur vtk-6.1.0_vanilla/Infovis/Core/module.cmake > >>> vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake > >>> --- vtk-6.1.0_vanilla/Infovis/Core/module.cmake 2014-01-22 > >>> 16:55:41.000000000 +0100 > >>> +++ vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake > >>> 2014-07-07 14:39:59.525609602 +0200 > >>> @@ -2,6 +2,7 @@ > >>> GROUPS > >>> StandAlone > >>> DEPENDS > >>> + vtkRenderingCore > >>> vtkCommonDataModel > >>> vtkCommonSystem > >>> vtkFiltersExtraction > >>> > >>> Is there a reason vtkConvexHull2D is not included in the default > >>> installation with Infovis enabled or do I have to enable something else > >>> in > >>> cmake? > >>> > >>> Thanks for any help or hints. > >>> Roman > >>> > >>> > >>> -- > >>> Dr. Roman Grothausmann > >>> > >>> Tomographie und Digitale Bildverarbeitung > >>> Tomography and Digital Image Analysis > >>> > >>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > >>> Medizinische Hochschule Hannover > >>> Carl-Neuberg-Str. 1 > >>> D-30625 Hannover > >>> > >>> Tel. +49 511 532-9574 > >>> _______________________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at > >>> http://www.kitware.com/opensource/opensource.html > >>> > >>> Please 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 > >> > >> > >> > >> > > > > -- > > Dr. Roman Grothausmann > > > > Tomographie und Digitale Bildverarbeitung > > Tomography and Digital Image Analysis > > > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > > Medizinische Hochschule Hannover > > Carl-Neuberg-Str. 1 > > D-30625 Hannover > > > > Tel. +49 511 532-9574 > > > > -- > 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 > -- Brandon Mayer b.mayer1 at gmail.com 516.672.0551 -------------- next part -------------- An HTML attachment was scrubbed... URL: From artem.paraview at googlemail.com Thu Dec 4 12:09:43 2014 From: artem.paraview at googlemail.com (Artem Babayan) Date: Thu, 4 Dec 2014 17:09:43 +0000 Subject: [vtkusers] Assign 2 colors to surface (one per each side) Message-ID: Hello, I have a triangulated surface (3D surface assembled from many triangles). What I want is for this surface to have 2 colors. For example I want it to be green on one side and red on another. Is it possible? Best wishes Artem -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Dec 4 13:03:42 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 4 Dec 2014 13:03:42 -0500 Subject: [vtkusers] Assign 2 colors to surface (one per each side) In-Reply-To: References: Message-ID: Artem, You can set separate properties, including colors, for front and back faces. See http://www.vtk.org/doc/nightly/html/classvtkActor.html#a67e6053de538c91fd20a496b24172dbd - Cory On Thu, Dec 4, 2014 at 12:09 PM, Artem Babayan wrote: > Hello, > > I have a triangulated surface (3D surface assembled from many triangles). > What I want is for this surface to have 2 colors. For example I want it to > be green on one side and red on another. Is it possible? > > Best wishes > Artem > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please 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 Thu Dec 4 13:17:56 2014 From: ra.corredor at gmail.com (Ricardo A Corredor) Date: Thu, 4 Dec 2014 11:17:56 -0700 (MST) Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: <1417709842689-5729677.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> <1417709842689-5729677.post@n5.nabble.com> Message-ID: <1417717076869-5729685.post@n5.nabble.com> Well, actually it seems that it doesn't happen with every polydata or polyline. I have some similar polylines and it works as it should; others that has not the same result. Let me verify and I will share with you the cases where it has this behavior. RaC -- View this message in context: http://vtk.1045678.n5.nabble.com/Fixing-vtkPolyDataToImageStencil-tp5728811p5729685.html Sent from the VTK - Users mailing list archive at Nabble.com. From sean at rogue-research.com Thu Dec 4 13:50:22 2014 From: sean at rogue-research.com (Sean McBride) Date: Thu, 4 Dec 2014 13:50:22 -0500 Subject: [vtkusers] QVTKWidget and MacOS problems In-Reply-To: <1417687136470-5729672.post@n5.nabble.com> References: <31F9D879-B625-4371-9473-F21A684BCB75@gmail.com> <1417603973950-5729641.post@n5.nabble.com> <20141203163046.1573236997@mail.rogue-research.com> <1417687136470-5729672.post@n5.nabble.com> Message-ID: <20141204185022.506570771@mail.rogue-research.com> On Thu, 4 Dec 2014 02:58:56 -0700, mbcx9rb9 said: >You are right, the problem is caused by the retina display having four times >the resolution. Qt has it right, but VTK seems to display to the bottom left >pixel group. I have managed to get around this by running the created .app >in low resolution mode. To do this: > >Right click on the *.app file >Get Info >Open in low resolution mode >Close the Get Info window and run program > >Let me know if this works for you, Nick. This is an annoying workaround >since it means I can no longer run the program from Qt Creator directory, >but at least it works. Can you repro the issue with one of VTK's C++ examples? Or must Qt be involved? You could try setting NSHighResolutionCapable to NO in your Info.plist, see here: 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 bill.lorensen at gmail.com Thu Dec 4 14:05:54 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 4 Dec 2014 14:05:54 -0500 Subject: [vtkusers] vtkConvexHull2D not in VTK installation any more? In-Reply-To: References: <547DAAA2.606@mh-hannover.de> <547DDDFE.6080706@mh-hannover.de> Message-ID: I pushed a patch through gerrit. vtkConvexHull2D is now in the git repo master. On Thu, Dec 4, 2014 at 11:51 AM, b.mayer1 wrote: > Just today I went to use vtkConvexHull2D for the first time and ran into > this problem as well. > > On Tue, Dec 2, 2014 at 10:49 AM, Bill Lorensen > wrote: >> >> Are you using vtkConvexHull2D? >> >> On Tue, Dec 2, 2014 at 10:42 AM, Dr. Roman Grothausmann >> wrote: >> > Many thanks Bill for the quick reply. It seems vtkConvexHull2D is barley >> > used, as my old notes show this problem already existed around a year >> > ago, I >> > can't say though which VTK version I was using then. >> > >> > >> > On 02/12/14 16:16, Bill Lorensen wrote: >> >> >> >> Roman, >> >> >> >> This is definitely a bug. There are other missing also. I'll look into >> >> it. >> >> >> >> Thanks, >> >> >> >> Bill >> >> >> >> On Tue, Dec 2, 2014 at 7:03 AM, Dr. Roman Grothausmann >> >> wrote: >> >>> >> >>> Dear mailing list members, >> >>> >> >>> >> >>> To get vtkConvexHull2D into my VTK installation, I need to apply the >> >>> following changes to cmake-files: >> >>> >> >>> diff -aur vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt >> >>> vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt >> >>> --- vtk-6.1.0_vanilla/Infovis/Core/CMakeLists.txt 2014-01-22 >> >>> 16:55:41.000000000 +0100 >> >>> +++ >> >>> vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/CMakeLists.txt >> >>> 2014-07-07 14:32:25.074469342 +0200 >> >>> @@ -1,4 +1,5 @@ >> >>> set(Module_SRCS >> >>> + vtkConvexHull2D.cxx >> >>> vtkAddMembershipArray.cxx >> >>> vtkAdjacencyMatrixToEdgeTable.cxx >> >>> vtkArrayNorm.cxx >> >>> diff -aur vtk-6.1.0_vanilla/Infovis/Core/module.cmake >> >>> vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake >> >>> --- vtk-6.1.0_vanilla/Infovis/Core/module.cmake 2014-01-22 >> >>> 16:55:41.000000000 +0100 >> >>> +++ >> >>> vtk-6.1.0_splat+vtkImplicitModeller-patch/Infovis/Core/module.cmake >> >>> 2014-07-07 14:39:59.525609602 +0200 >> >>> @@ -2,6 +2,7 @@ >> >>> GROUPS >> >>> StandAlone >> >>> DEPENDS >> >>> + vtkRenderingCore >> >>> vtkCommonDataModel >> >>> vtkCommonSystem >> >>> vtkFiltersExtraction >> >>> >> >>> Is there a reason vtkConvexHull2D is not included in the default >> >>> installation with Infovis enabled or do I have to enable something >> >>> else >> >>> in >> >>> cmake? >> >>> >> >>> Thanks for any help or hints. >> >>> Roman >> >>> >> >>> >> >>> -- >> >>> Dr. Roman Grothausmann >> >>> >> >>> Tomographie und Digitale Bildverarbeitung >> >>> Tomography and Digital Image Analysis >> >>> >> >>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >> >>> Medizinische Hochschule Hannover >> >>> Carl-Neuberg-Str. 1 >> >>> D-30625 Hannover >> >>> >> >>> Tel. +49 511 532-9574 >> >>> _______________________________________________ >> >>> Powered by www.kitware.com >> >>> >> >>> Visit other Kitware open-source projects at >> >>> http://www.kitware.com/opensource/opensource.html >> >>> >> >>> Please 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 >> >> >> >> >> >> >> >> >> > >> > -- >> > Dr. Roman Grothausmann >> > >> > Tomographie und Digitale Bildverarbeitung >> > Tomography and Digital Image Analysis >> > >> > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >> > Medizinische Hochschule Hannover >> > Carl-Neuberg-Str. 1 >> > D-30625 Hannover >> > >> > Tel. +49 511 532-9574 >> >> >> >> -- >> 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 > > > > > -- > Brandon Mayer > b.mayer1 at gmail.com > 516.672.0551 -- Unpaid intern in BillsBasement at noware dot com From pattersonnp at gmail.com Thu Dec 4 14:21:06 2014 From: pattersonnp at gmail.com (Nick Patterson) Date: Thu, 4 Dec 2014 19:21:06 +0000 Subject: [vtkusers] QVTKWidget and MacOS problems In-Reply-To: <20141204185022.506570771@mail.rogue-research.com> References: <31F9D879-B625-4371-9473-F21A684BCB75@gmail.com> <1417603973950-5729641.post@n5.nabble.com> <20141203163046.1573236997@mail.rogue-research.com> <1417687136470-5729672.post@n5.nabble.com> <20141204185022.506570771@mail.rogue-research.com> Message-ID: <7EEB2CC0-D8A7-4BB7-B9C5-5A64845D7F5B@gmail.com> Sean, This is something that only affects QVTKWidget (any of the VTK only examples? i.e. doesn?t involved QVTKWidget) work perfectly well. I will look through your link to see if there is any solution there. Nick. > On 4 Dec 2014, at 18:50, Sean McBride wrote: > > On Thu, 4 Dec 2014 02:58:56 -0700, mbcx9rb9 said: > >> You are right, the problem is caused by the retina display having four times >> the resolution. Qt has it right, but VTK seems to display to the bottom left >> pixel group. I have managed to get around this by running the created .app >> in low resolution mode. To do this: >> >> Right click on the *.app file >> Get Info >> Open in low resolution mode >> Close the Get Info window and run program >> >> Let me know if this works for you, Nick. This is an annoying workaround >> since it means I can no longer run the program from Qt Creator directory, >> but at least it works. > > Can you repro the issue with one of VTK's C++ examples? Or must Qt be involved? > > You could try setting NSHighResolutionCapable to NO in your Info.plist, see here: > > > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please 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 90yobi90 at gmail.com Thu Dec 4 14:34:29 2014 From: 90yobi90 at gmail.com (Yosbanis Vicente Gonzalez) Date: Thu, 4 Dec 2014 19:34:29 +0000 Subject: [vtkusers] problem to convert type signed to unsigned Message-ID: hi i am new to working with vtk. I'm trying to render a volume of a DICOM image. I was able to open a single file with vtkGDCMImageReader (using SetFileName), but when I render with vtkVolumeRayCastIsosurfaceFunction and vtkVolumeRayCastMapper gives me the following error: ERROR: In /../vtk/VTK5.10.1/VolumeRendering/vtkVolumeRayCastMapper.cxx, line 326 vtkVolumeRayCastMapper (0x247bbe0): Can not render volume data of type short , only unsigned char or unsigned short. Do some research and use the vtkImageCast filter to convert from short to unsigned short type, but not solved the problem. This is the code for what I did to see if anyone can tell me what I did wrong. Thank you ------------------------------------------------------ reader = vtkgdcm.vtkGDCMImageReader() reader.FileLowerLeftOn() reader.SetFileName('/home/yosbanis/images/d_david/cd1/dicom/14040312/31200000/24479448') reader.Update() # orientaciones #---------------------------------------------------------------- orientations = { gdcm.Orientation.SAGITTAL: 0, gdcm.Orientation.CORONAL: 1, gdcm.Orientation.AXIAL: 2 } orientacion_gdcm = gdcm.Orientation() orientation = orientations[orientacion_gdcm.GetType(reader.GetImageOrientationPatient())] image = reader.GetOutput() origin = list(reader.GetOutput().GetOrigin()) extent = list(reader.GetOutput().GetExtent()) spacing = list(reader.GetOutput().GetSpacing()) axial = vtk.vtkMatrix4x4() axial.DeepCopy(( 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 )) coronal = vtk.vtkMatrix4x4() coronal.DeepCopy(( 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1 )) sagittal = vtk.vtkMatrix4x4() sagittal.DeepCopy(( 0, 0, -1, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1 )) axes = { 0: sagittal, 1: coronal, 2: axial } dc = reader.GetDirectionCosines() # obtener las coordenadas del cursor #------------------------------------------- def get_coordinate_cursor(): # Find position x, y, z = pick.GetPickPosition() bounds = [0, 0, 0, 0, 0, 0] volume.GetBounds(bounds) if bounds[0] == bounds[1]: print 'X' x = bounds[0] elif bounds[2] == bounds[3]: print 'Y' y = bounds[2] elif bounds[4] == bounds[5]: print 'Z' z = bounds[4] return x, y, z def center_image(): image = reader.GetOutput() origin = image.GetOrigin() extent = image.GetExtent() spacing = image.GetSpacing() xc = origin[0] + 0.5 * (extent[0] + extent[1]) * spacing[0] yc = origin[1] + 0.5 * (extent[2] + extent[3]) * spacing[1] zc = origin[2] + 0.5 * (extent[4] + extent[5]) * spacing[2] camera = renderer.GetActiveCamera() focal_point = camera.GetFocalPoint() dist = camera.GetDistance() if orientation == 0: camera.SetFocalPoint(focal_point[0], yc, zc) camera.SetPosition(dist, yc, zc) elif orientation == 1: camera.SetFocalPoint(xc, focal_point[1], zc) camera.SetPosition(xc, -dist, zc) else: camera.SetFocalPoint(xc, yc, focal_point[2]) camera.SetPosition(xc, yc, -dist) renderer.ResetCamera() renderer.ResetCameraClippingRange() render_window.Render() def fit_image(): image = reader.GetOutput() extent = image.GetExtent() spacing = image.GetSpacing() xd = (extent[1] - extent[0] + 1) * spacing[0] yd = (extent[3] - extent[2] + 1) * spacing[1] zd = (extent[5] - extent[4] + 1) * spacing[2] center_image() camera = renderer.GetActiveCamera() if orientation == 2: camera.SetParallelScale(0.5 * yd) elif orientation == 1: camera.SetParallelScale(0.5 * zd) elif orientation == 0: camera.SetParallelScale(0.5 * xd) render_window.Render() def set_view_plane(view_plane): if view_plane == 0: left_to_right = [0, 1, 0, 0] view_up = [0, 0, 1, 0] elif view_plane == 1: left_to_right = [1, 0, 0, 0] view_up = [0, 0, 1, 0] else: left_to_right = [1, 0, 0, 0] view_up = [0, -1, 0, 0] m = axial center_image() style.SetImageOrientation(left_to_right[:3], view_up[:3]) bounds = [0, 0, 0, 0, 0, 0] volume.GetBounds(bounds) c.SetModelBounds(bounds) render_window.Render() global orientation orientation = view_plane def flip_horizontal(): cam = renderer.GetActiveCamera() position = cam.GetPosition() factor = [1, 1, 1] factor[orientation] = -1; cam.SetPosition(factor[0]*position[0],factor[1]*position[1],factor[2]*position[2]) renderer.ResetCameraClippingRange() render_window.Render() def key_press(sender, event): global focal_point, orientation key = interactor.GetKeySym() style.SetCurrentRenderer(renderer) if key == 'a': set_view_plane(2) elif key == 'c': set_view_plane(1) elif key == 's': set_view_plane(0) elif key == 'f': fit_image() elif key == 'h': flip_horizontal() elif key == 'v': cam = renderer.GetActiveCamera() # flip horizontal position = cam.GetPosition() factor = [1, 1, 1] factor[orientation] = -1; cam.SetPosition(factor[0]*position[0],factor[1]*position[1],factor[2]*position[2]) # now vertical viewup = cam.GetViewUp(); cam.SetViewUp(-viewup[0], -viewup[1], -viewup[2]) renderer.ResetCameraClippingRange() render_window.Render() elif key == 'w': print volumeProperty.GetColorWindow() #----------- trabajo del cursor y eventos ----------------------- state = 0 def start_cursor(orientation, e): global state state = True _last_position = orientation.GetInteractor().GetEventPosition() def move_cursor(orientation, e): if not state: return # pick the point interactor = orientation.GetInteractor() x, y = interactor.GetEventPosition() interactor.GetPicker().Pick(x, y, 0, renderer) x, y, z = interactor.GetPicker().GetPickPosition() bounds = [0, 0, 0, 0, 0, 0] volumeMapper.GetInput().GetBounds(bounds) if bounds[0] == bounds[1]: x = bounds[0] elif bounds[2] == bounds[3]: y = bounds[2] elif bounds[4] == bounds[5]: z = bounds[4] cursor_coordinates = (x, y, z) c.SetFocalPoint(cursor_coordinates) render_window.Render() def stop_cursor(orientation, e): global state state = False interactor = vtk.vtkRenderWindowInteractor() render_window = vtk.vtkRenderWindow() render_window.SetNumberOfLayers(2) render_window.SetSize(800, 600) interactor.SetRenderWindow(render_window) style = vtk.vtkInteractorStyleImage() style.SetInteractionModeToImageSlicing() interactor.SetInteractorStyle(style) style.AddObserver('CharEvent', key_press) style.AddObserver('LeftButtonPressEvent', start_cursor) style.AddObserver('LeftButtonReleaseEvent', stop_cursor) style.AddObserver('MouseMoveEvent', move_cursor) c = vtk.vtkCursor3D() c.AllOff() c.AxesOn() volumeColor = vtk.vtkColorTransferFunction() volumeColor.AddRGBPoint(0,0.0,0.0,0.0) volumeColor.AddRGBPoint(180,0.3,0.1,0.2) volumeColor.AddRGBPoint(1000,1.0,0.7,0.6) volumeColor.AddRGBPoint(2000,1.0,1.0,0.9) volumeScalarOpacity = vtk.vtkPiecewiseFunction() volumeScalarOpacity.AddPoint(0,0.0) volumeScalarOpacity.AddPoint(180,0.0) volumeScalarOpacity.AddPoint(1000,0.2) volumeScalarOpacity.AddPoint(2000,0.8) volumeProperty = vtk.vtkVolumeProperty() volumeProperty.SetColor(volumeColor) volumeProperty.SetScalarOpacity(volumeScalarOpacity) volumeProperty.SetInterpolationTypeToLinear() volumeProperty.ShadeOn() volumeProperty.SetAmbient(0.6) volumeProperty.SetDiffuse(0.6) volumeProperty.SetSpecular(0.8) # use vtkImageCast!!!!! imageCast = vtk.vtkImageCast() imageCast.SetInput( reader.GetOutput() ) imageCast.SetOutputScalarTypeToUnsignedShort() isosurfaceFunction = vtk.vtkVolumeRayCastIsosurfaceFunction() isosurfaceFunction.SetIsoValue(600) volumeMapper = vtk.vtkVolumeRayCastMapper() volumeMapper.SetInput(imageCast.GetOutput()) volumeMapper.SetVolumeRayCastFunction(isosurfaceFunction) volumeMapper.SetInputConnection(reader.GetOutputPort()) volume = vtk.vtkVolume() volume.SetMapper(volumeMapper) volume.SetProperty(volumeProperty) volume.SetUserMatrix(axes[orientation]) m = vtk.vtkPolyDataMapper() m.SetInputConnection(c.GetOutputPort()) a = vtk.vtkActor() a.SetMapper(m) a.GetProperty().SetColor(1.0, 0.46, 0) a.SetVisibility(1) a.PickableOff() renderer = vtk.vtkRenderer() renderer.SetLayer(0) renderer.AddViewProp(volume) renderer.GetActiveCamera().ParallelProjectionOn() renderer.ResetCamera() renderer1 = vtk.vtkRenderer() renderer1.SetLayer(1) renderer1.AddViewProp(a) renderer1.SetInteractive(0) renderer1.SetActiveCamera(renderer.GetActiveCamera()) render_window.AddRenderer(renderer1) render_window.AddRenderer(renderer) style.SetCurrentRenderer(renderer) set_view_plane(orientation) c.SetFocalPoint(renderer.GetActiveCamera().GetFocalPoint()) render_window.Render() interactor.Initialize() interactor.Start() Please I need an answer -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Dec 4 17:12:44 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 4 Dec 2014 15:12:44 -0700 Subject: [vtkusers] problem to convert type signed to unsigned In-Reply-To: References: Message-ID: Hi Yosbanis, Here's a little thought experiment. What is the result of the following code? short x = -1; unsigned short y = static_cast(x); If you understand the code above, then you'll understand why performing a cast-to-unsigned is only a good thing to do if all of your data values are positive. CT data, for example, usually has negative values and a simple "cast" operation will do Bad Things to the data. I recommend using vtkImageShiftScale to do the conversion instead, with appropriate "shift" (and a "scale" if necessary) so that all the resulting data values fit into an unsigned short. For example, if the smallest pixel value in the CT is -1000, then a Shift of +1000 will make all the values positive. Ideally, you should measure the pixel value for "air" and shift so that air has a value of zero. The ClampOverflowOn() method can be used as an extra precaution. - David On Thu, Dec 4, 2014 at 12:34 PM, Yosbanis Vicente Gonzalez < 90yobi90 at gmail.com> wrote: > hi i am new to working with vtk. I'm trying to render a volume of a DICOM > image. > I was able to open a single file with vtkGDCMImageReader (using > SetFileName), but when I render with vtkVolumeRayCastIsosurfaceFunction > and vtkVolumeRayCastMapper gives me the following error: > > ERROR: In /../vtk/VTK5.10.1/VolumeRendering/vtkVolumeRayCastMapper.cxx, > line 326 > vtkVolumeRayCastMapper (0x247bbe0): Can not render volume data of type > short, only unsigned char or unsigned short. > > Do some research and use the vtkImageCast filter to convert from short to unsigned > short type, but not solved the problem. This is the code for what I did to > see if anyone can tell me what I did wrong. > Thank you > > ------------------------------------------------------ > reader = vtkgdcm.vtkGDCMImageReader() > reader.FileLowerLeftOn() > > reader.SetFileName('/home/yosbanis/images/d_david/cd1/dicom/14040312/31200000/24479448') > reader.Update() > > > > # orientaciones > #---------------------------------------------------------------- > > orientations = { > gdcm.Orientation.SAGITTAL: 0, > gdcm.Orientation.CORONAL: 1, > gdcm.Orientation.AXIAL: 2 > } > orientacion_gdcm = gdcm.Orientation() > orientation = > orientations[orientacion_gdcm.GetType(reader.GetImageOrientationPatient())] > > image = reader.GetOutput() > origin = list(reader.GetOutput().GetOrigin()) > extent = list(reader.GetOutput().GetExtent()) > spacing = list(reader.GetOutput().GetSpacing()) > > axial = vtk.vtkMatrix4x4() > axial.DeepCopy(( > 1, 0, 0, 0, > 0, 1, 0, 0, > 0, 0, 1, 0, > 0, 0, 0, 1 > )) > > coronal = vtk.vtkMatrix4x4() > coronal.DeepCopy(( > 1, 0, 0, 0, > 0, 0, 1, 0, > 0, 1, 0, 0, > 0, 0, 0, 1 > )) > > sagittal = vtk.vtkMatrix4x4() > sagittal.DeepCopy(( > 0, 0, -1, 0, > 1, 0, 0, 0, > 0, -1, 0, 0, > 0, 0, 0, 1 > )) > > axes = { > 0: sagittal, 1: coronal, 2: axial > } > > dc = reader.GetDirectionCosines() > > # obtener las coordenadas del cursor > #------------------------------------------- > def get_coordinate_cursor(): > # Find position > x, y, z = pick.GetPickPosition() > bounds = [0, 0, 0, 0, 0, 0] > volume.GetBounds(bounds) > if bounds[0] == bounds[1]: > print 'X' > x = bounds[0] > elif bounds[2] == bounds[3]: > print 'Y' > y = bounds[2] > elif bounds[4] == bounds[5]: > print 'Z' > z = bounds[4] > return x, y, z > > def center_image(): > image = reader.GetOutput() > origin = image.GetOrigin() > extent = image.GetExtent() > spacing = image.GetSpacing() > > xc = origin[0] + 0.5 * (extent[0] + extent[1]) * spacing[0] > yc = origin[1] + 0.5 * (extent[2] + extent[3]) * spacing[1] > zc = origin[2] + 0.5 * (extent[4] + extent[5]) * spacing[2] > > camera = renderer.GetActiveCamera() > focal_point = camera.GetFocalPoint() > dist = camera.GetDistance() > > if orientation == 0: > > camera.SetFocalPoint(focal_point[0], yc, zc) > camera.SetPosition(dist, yc, zc) > > elif orientation == 1: > > camera.SetFocalPoint(xc, focal_point[1], zc) > camera.SetPosition(xc, -dist, zc) > > else: > > camera.SetFocalPoint(xc, yc, focal_point[2]) > camera.SetPosition(xc, yc, -dist) > > renderer.ResetCamera() > renderer.ResetCameraClippingRange() > > render_window.Render() > > > def fit_image(): > image = reader.GetOutput() > extent = image.GetExtent() > spacing = image.GetSpacing() > > xd = (extent[1] - extent[0] + 1) * spacing[0] > yd = (extent[3] - extent[2] + 1) * spacing[1] > zd = (extent[5] - extent[4] + 1) * spacing[2] > > center_image() > camera = renderer.GetActiveCamera() > if orientation == 2: > camera.SetParallelScale(0.5 * yd) > elif orientation == 1: > camera.SetParallelScale(0.5 * zd) > elif orientation == 0: > camera.SetParallelScale(0.5 * xd) > render_window.Render() > > def set_view_plane(view_plane): > if view_plane == 0: > left_to_right = [0, 1, 0, 0] > view_up = [0, 0, 1, 0] > elif view_plane == 1: > left_to_right = [1, 0, 0, 0] > view_up = [0, 0, 1, 0] > else: > left_to_right = [1, 0, 0, 0] > view_up = [0, -1, 0, 0] > m = axial > > center_image() > style.SetImageOrientation(left_to_right[:3], view_up[:3]) > bounds = [0, 0, 0, 0, 0, 0] > volume.GetBounds(bounds) > c.SetModelBounds(bounds) > > render_window.Render() > > global orientation > orientation = view_plane > > def flip_horizontal(): > cam = renderer.GetActiveCamera() > position = cam.GetPosition() > factor = [1, 1, 1] > factor[orientation] = -1; > > cam.SetPosition(factor[0]*position[0],factor[1]*position[1],factor[2]*position[2]) > renderer.ResetCameraClippingRange() > render_window.Render() > > > def key_press(sender, event): > global focal_point, orientation > > key = interactor.GetKeySym() > style.SetCurrentRenderer(renderer) > > if key == 'a': > set_view_plane(2) > elif key == 'c': > set_view_plane(1) > elif key == 's': > set_view_plane(0) > elif key == 'f': > fit_image() > elif key == 'h': > flip_horizontal() > elif key == 'v': > cam = renderer.GetActiveCamera() > # flip horizontal > position = cam.GetPosition() > factor = [1, 1, 1] > factor[orientation] = -1; > > cam.SetPosition(factor[0]*position[0],factor[1]*position[1],factor[2]*position[2]) > > # now vertical > viewup = cam.GetViewUp(); > cam.SetViewUp(-viewup[0], -viewup[1], -viewup[2]) > renderer.ResetCameraClippingRange() > render_window.Render() > > elif key == 'w': > > print volumeProperty.GetColorWindow() > > #----------- trabajo del cursor y eventos ----------------------- > state = 0 > def start_cursor(orientation, e): > global state > state = True > _last_position = orientation.GetInteractor().GetEventPosition() > > def move_cursor(orientation, e): > if not state: > return > > # pick the point > interactor = orientation.GetInteractor() > x, y = interactor.GetEventPosition() > interactor.GetPicker().Pick(x, y, 0, renderer) > x, y, z = interactor.GetPicker().GetPickPosition() > > bounds = [0, 0, 0, 0, 0, 0] > volumeMapper.GetInput().GetBounds(bounds) > if bounds[0] == bounds[1]: > x = bounds[0] > elif bounds[2] == bounds[3]: > y = bounds[2] > elif bounds[4] == bounds[5]: > z = bounds[4] > > cursor_coordinates = (x, y, z) > c.SetFocalPoint(cursor_coordinates) > render_window.Render() > > def stop_cursor(orientation, e): > global state > state = False > > interactor = vtk.vtkRenderWindowInteractor() > render_window = vtk.vtkRenderWindow() > render_window.SetNumberOfLayers(2) > render_window.SetSize(800, 600) > interactor.SetRenderWindow(render_window) > > style = vtk.vtkInteractorStyleImage() > style.SetInteractionModeToImageSlicing() > interactor.SetInteractorStyle(style) > style.AddObserver('CharEvent', key_press) > style.AddObserver('LeftButtonPressEvent', start_cursor) > style.AddObserver('LeftButtonReleaseEvent', stop_cursor) > style.AddObserver('MouseMoveEvent', move_cursor) > > c = vtk.vtkCursor3D() > c.AllOff() > c.AxesOn() > > volumeColor = vtk.vtkColorTransferFunction() > volumeColor.AddRGBPoint(0,0.0,0.0,0.0) > volumeColor.AddRGBPoint(180,0.3,0.1,0.2) > volumeColor.AddRGBPoint(1000,1.0,0.7,0.6) > volumeColor.AddRGBPoint(2000,1.0,1.0,0.9) > > volumeScalarOpacity = vtk.vtkPiecewiseFunction() > volumeScalarOpacity.AddPoint(0,0.0) > volumeScalarOpacity.AddPoint(180,0.0) > volumeScalarOpacity.AddPoint(1000,0.2) > volumeScalarOpacity.AddPoint(2000,0.8) > > volumeProperty = vtk.vtkVolumeProperty() > volumeProperty.SetColor(volumeColor) > volumeProperty.SetScalarOpacity(volumeScalarOpacity) > volumeProperty.SetInterpolationTypeToLinear() > volumeProperty.ShadeOn() > volumeProperty.SetAmbient(0.6) > volumeProperty.SetDiffuse(0.6) > volumeProperty.SetSpecular(0.8) > > # use vtkImageCast!!!!! > > imageCast = vtk.vtkImageCast() > imageCast.SetInput( reader.GetOutput() ) > imageCast.SetOutputScalarTypeToUnsignedShort() > > isosurfaceFunction = vtk.vtkVolumeRayCastIsosurfaceFunction() > isosurfaceFunction.SetIsoValue(600) > volumeMapper = vtk.vtkVolumeRayCastMapper() > volumeMapper.SetInput(imageCast.GetOutput()) > volumeMapper.SetVolumeRayCastFunction(isosurfaceFunction) > volumeMapper.SetInputConnection(reader.GetOutputPort()) > > > volume = vtk.vtkVolume() > volume.SetMapper(volumeMapper) > volume.SetProperty(volumeProperty) > volume.SetUserMatrix(axes[orientation]) > > m = vtk.vtkPolyDataMapper() > m.SetInputConnection(c.GetOutputPort()) > > a = vtk.vtkActor() > a.SetMapper(m) > a.GetProperty().SetColor(1.0, 0.46, 0) > a.SetVisibility(1) > a.PickableOff() > > > renderer = vtk.vtkRenderer() > renderer.SetLayer(0) > renderer.AddViewProp(volume) > > renderer.GetActiveCamera().ParallelProjectionOn() > renderer.ResetCamera() > > renderer1 = vtk.vtkRenderer() > renderer1.SetLayer(1) > renderer1.AddViewProp(a) > renderer1.SetInteractive(0) > renderer1.SetActiveCamera(renderer.GetActiveCamera()) > > render_window.AddRenderer(renderer1) > render_window.AddRenderer(renderer) > > style.SetCurrentRenderer(renderer) > set_view_plane(orientation) > > c.SetFocalPoint(renderer.GetActiveCamera().GetFocalPoint()) > > > render_window.Render() > interactor.Initialize() > interactor.Start() > > Please I need an answer > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rekha.pyage at gmail.com Fri Dec 5 08:41:37 2014 From: rekha.pyage at gmail.com (reks) Date: Fri, 5 Dec 2014 06:41:37 -0700 (MST) Subject: [vtkusers] closing the clipped polydata aftr using vtkClipPolyData Message-ID: <1417786897467-5729692.post@n5.nabble.com> Hello all, i am facing a problem with closing the clipped data. After getting the output from vtkClipPolydata I tried to close the clipped part using vtkFillHoleFilter but the quality of the triangles is not good can anyone plz help me with this. thanks in advance reks -- View this message in context: http://vtk.1045678.n5.nabble.com/closing-the-clipped-polydata-aftr-using-vtkClipPolyData-tp5729692.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Dec 5 08:55:33 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 5 Dec 2014 06:55:33 -0700 Subject: [vtkusers] closing the clipped polydata aftr using vtkClipPolyData In-Reply-To: <1417786897467-5729692.post@n5.nabble.com> References: <1417786897467-5729692.post@n5.nabble.com> Message-ID: Hi Reks, The vtkClipClosedSurface filter will close the data after clipping it. The only caveat is that it only works with clipping planes, not with arbitrary clipping functions. - David On Fri, Dec 5, 2014 at 6:41 AM, reks wrote: > Hello all, > > i am facing a problem with closing the clipped data. After getting the > output from vtkClipPolydata I tried to close the clipped part using > vtkFillHoleFilter but the quality of the triangles is not good can anyone > plz help me with this. > > > thanks in advance > reks > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rekha.pyage at gmail.com Fri Dec 5 09:04:06 2014 From: rekha.pyage at gmail.com (reks) Date: Fri, 5 Dec 2014 07:04:06 -0700 (MST) Subject: [vtkusers] closing the clipped polydata aftr using vtkClipPolyData In-Reply-To: References: <1417786897467-5729692.post@n5.nabble.com> Message-ID: <1417788246887-5729694.post@n5.nabble.com> thanku for the reply. i tried using that but i need insideout operation so i am using vtkClipPolyData. what shoud i do.?? -- View this message in context: http://vtk.1045678.n5.nabble.com/closing-the-clipped-polydata-aftr-using-vtkClipPolyData-tp5729692p5729694.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Dec 5 09:13:23 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 5 Dec 2014 07:13:23 -0700 Subject: [vtkusers] closing the clipped polydata aftr using vtkClipPolyData In-Reply-To: <1417788246887-5729694.post@n5.nabble.com> References: <1417786897467-5729692.post@n5.nabble.com> <1417788246887-5729694.post@n5.nabble.com> Message-ID: Hi Reks, Just saying "inside-out operation" doesn't tell me what you are trying to do. Please explain clearly (with proper words and full sentences). - David On Fri, Dec 5, 2014 at 7:04 AM, reks wrote: > thanku for the reply. > > i tried using that but i need insideout operation so i am using > vtkClipPolyData. what shoud i do.?? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rekha.pyage at gmail.com Fri Dec 5 09:20:43 2014 From: rekha.pyage at gmail.com (reks) Date: Fri, 5 Dec 2014 07:20:43 -0700 (MST) Subject: [vtkusers] closing the clipped polydata aftr using vtkClipPolyData In-Reply-To: References: <1417786897467-5729692.post@n5.nabble.com> <1417788246887-5729694.post@n5.nabble.com> Message-ID: <1417789243629-5729696.post@n5.nabble.com> i know i am not clear k i will explain.. and i am sorry for that.. i am trying to clip the polydata using vtkClipPolyData as i want insideout operation i prefered this filter. but when i pass the output to vtkFillHolefilter i am getting some extra triangles in the clipped area also. -- View this message in context: http://vtk.1045678.n5.nabble.com/closing-the-clipped-polydata-aftr-using-vtkClipPolyData-tp5729692p5729696.html Sent from the VTK - Users mailing list archive at Nabble.com. From shawn.waldon at kitware.com Fri Dec 5 09:24:01 2014 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Fri, 5 Dec 2014 09:24:01 -0500 Subject: [vtkusers] closing the clipped polydata aftr using vtkClipPolyData In-Reply-To: <1417789243629-5729696.post@n5.nabble.com> References: <1417786897467-5729692.post@n5.nabble.com> <1417788246887-5729694.post@n5.nabble.com> <1417789243629-5729696.post@n5.nabble.com> Message-ID: David, I think what reks means is that their code needs vtkClipPolyData::SetInsideOut(true), which flips which side of the clipping surface that is clipped. vtkClipClosedSurface doesn't support this option. HTH, Shawn On Fri, Dec 5, 2014 at 9:20 AM, reks wrote: > > i know i am not clear k i will explain.. and i am sorry for that.. > i am trying to clip the polydata using vtkClipPolyData as i want insideout > operation i prefered this filter. but when i pass the output to > vtkFillHolefilter i am getting some extra triangles in the clipped area > also. > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/closing-the-clipped-polydata-aftr-using-vtkClipPolyData-tp5729692p5729696.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 rekha.pyage at gmail.com Fri Dec 5 09:27:25 2014 From: rekha.pyage at gmail.com (reks) Date: Fri, 5 Dec 2014 07:27:25 -0700 (MST) Subject: [vtkusers] closing the clipped polydata aftr using vtkClipPolyData In-Reply-To: References: <1417786897467-5729692.post@n5.nabble.com> <1417788246887-5729694.post@n5.nabble.com> <1417789243629-5729696.post@n5.nabble.com> Message-ID: <1417789645115-5729698.post@n5.nabble.com> yes shawn... you are rite.. but after passing the output to vtkFillHoleFolter some extra triangles are also getting created in the clipped area which i do now want.. hw can solve this problem.. -- View this message in context: http://vtk.1045678.n5.nabble.com/closing-the-clipped-polydata-aftr-using-vtkClipPolyData-tp5729692p5729698.html Sent from the VTK - Users mailing list archive at Nabble.com. From castellanoslizan at gmail.com Fri Dec 5 12:46:45 2014 From: castellanoslizan at gmail.com (Lizeth Castellanos) Date: Fri, 5 Dec 2014 15:46:45 -0200 Subject: [vtkusers] Add vtkImageGradientMagnitude output to vtkXYPlotActor Message-ID: Hello vtk-users! I'm using vtkImageGradientMagnitude and vtkImageLaplacian filters to obtain the gradient and laplacian of an image. This works very well and I can see the results in the images. Now, I want to plot the gradient mangitude and the laplacian. (Gradient in my x-axis and the probability density on my y-axis, and the same respectively for plot the Laplacian) Could someone tell me how to add the vtkImageGradientMagnitude and vtkImageLaplacian outputs to vtkXYPlotActor ? Thanks! -Lizeth -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps.georgiou at gmail.com Fri Dec 5 13:09:15 2014 From: ps.georgiou at gmail.com (Panayiotis Georgiou) Date: Fri, 5 Dec 2014 18:09:15 +0000 Subject: [vtkusers] Missing .dll files on runtime (VTK6.1 + Qt5.3 + MSVC2010) Message-ID: Hello everyone, I am trying to compile an example from VTK (FourPanesViewer) using the CMake file shown at the end of the email. The code compiles fine but when I try to run the executable (both from inside or outside visual studio) I get an error that vtkCommonCore-6.1.dll is missing. If I copy this dll in the executable's folder, I get the same error for another .dll file. To solve the problem I have included on my windows PATH the directory \bin. Note that the same problem appears when compiling with MSVC2013. When compiling the same example with Qt4.8 and VTK5 on MSVC2010 using the same cmake file below, adding the \bin directory was not necessary. Is there a way of avoiding adding the \bin directory to the PATH? Is there anything wrong with my Cmake file? Why changing the PATH is not necessary in VTK5? Thanks a lot for you help. ======================================= CMakeLists.txt ======================================= # # adapted from CMakeLists.txt at http://www.cmake.org/Wiki/VTK/Examples/Cxx/Qt/SideBySideRenderWindowsQt # cmake_minimum_required(VERSION 2.8) if(POLICY CMP0020) cmake_policy(SET CMP0020 NEW) endif() #set a default project name set(PROJ_NAME "PROJ_US_3D_VIS" CACHE STRING "Project name.") project(${PROJ_NAME}) ## Get this from ${PROJECT_NAME} set(VTK_DIR "C:/VTK-BUILDS/msvc2010/release/lib/cmake/vtk-6.1" CACHE PATH "VTK directory override" FORCE) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4") # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) find_package(Qt5Widgets REQUIRED QUIET) else() find_package(Qt4 REQUIRED) include(${QT_USE_FILE}) endif() set(PROJ_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src/include") include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${PROJ_INCLUDE_DIRS}) #Create lists of all the project files file(GLOB PROJ_HEADERS "${PROJECT_SOURCE_DIR}/src/include/*.h") file(GLOB PROJ_SOURCES "${PROJECT_SOURCE_DIR}/src/*.cpp") file(GLOB PROJ_UIFORMS "${PROJECT_SOURCE_DIR}/src/ui/*.ui") file(GLOB PROJ_RESOURCES "${PROJECT_SOURCE_DIR}/src/resources/*.qrc") if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4") qt5_wrap_ui(PROJ_UISOURCES ${PROJ_UIFORMS}) qt5_add_resources(PROJ_RESOURCES_RSC ${PROJ_RESOURCES}) # CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped. add_executable(${PROJ_NAME} ${PROJ_SOURCES} ${PROJ_UISOURCES} ${PROJ_HEADERS} ${PROJ_RESOURCES} ${PROJ_RESOURCES_RSC}) qt5_use_modules(${PROJ_NAME} Core Gui Widgets) target_link_libraries(${PROJ_NAME} ${VTK_LIBRARIES}) else() QT4_WRAP_UI(PROJ_UISOURCES ${PROJ_UIFORMS}) QT4_WRAP_CPP(PROJ_SOURCES_MOC ${PROJ_HEADERS}) add_executable(${PROJ_NAME} ${PROJ_SOURCES} ${PROJ_UISOURCES} ${PROJ_SOURCES_MOC}) if(VTK_LIBRARIES) if(${VTK_VERSION} VERSION_LESS "6") target_link_libraries(${PROJ_NAME} ${VTK_LIBRARIES} QVTK ${QT_LIBRARIES}) else() target_link_libraries(${PROJ_NAME} ${VTK_LIBRARIES} ${QT_LIBRARIES}) endif() else() target_link_libraries(${PROJ_NAME} QVTK ${QT_LIBRARIES} ${VTK_LIBRARIES}) endif() endif() ====================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Dec 5 13:21:54 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 5 Dec 2014 11:21:54 -0700 Subject: [vtkusers] Add vtkImageGradientMagnitude output to vtkXYPlotActor In-Reply-To: References: Message-ID: Hi Lizeth, This is just a guess on my part, but I think that you have to pass the data through the vtkAttributeDataToFieldData filter in order to make data arrays visible to the vtkXYPlotActor. - David On Fri, Dec 5, 2014 at 10:46 AM, Lizeth Castellanos < castellanoslizan at gmail.com> wrote: > Hello vtk-users! > > I'm using vtkImageGradientMagnitude and vtkImageLaplacian filters to > obtain the gradient and laplacian of an image. This works very well and I > can see the results in the images. > > Now, I want to plot the gradient mangitude and the laplacian. (Gradient in > my x-axis and the probability density on my y-axis, and the same > respectively for plot the Laplacian) > > Could someone tell me how to add the vtkImageGradientMagnitude and > vtkImageLaplacian outputs to vtkXYPlotActor ? > > Thanks! > > -Lizeth > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Fri Dec 5 16:08:52 2014 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Fri, 5 Dec 2014 14:08:52 -0700 (MST) Subject: [vtkusers] problems in the volume calculation with vtkMassProperties In-Reply-To: References: <1417616801762-5729649.post@n5.nabble.com> <1417675649754-5729671.post@n5.nabble.com> Message-ID: <1417813732902-5729706.post@n5.nabble.com> I know, higher the resolution, the more accurate is the volume calculation. What I meant was, that should be the volume of the sphere is larger than the colored surface (look at the image). But now I also know that vtkMassProperties not worked with unclosed objects. Can I use scalar values for volume calculation? -- View this message in context: http://vtk.1045678.n5.nabble.com/problems-in-the-volume-calculation-with-vtkMassProperties-tp5729649p5729706.html Sent from the VTK - Users mailing list archive at Nabble.com. From nhoulie at ethz.ch Fri Dec 5 16:18:15 2014 From: nhoulie at ethz.ch (Nicolas Houlie) Date: Fri, 5 Dec 2014 22:18:15 +0100 Subject: [vtkusers] Color coded polygons Message-ID: Hello, I have managed to display rectangle in a 3 d space. They show up in gray. Is it possible to attribute a color to each rectangle ? I do not understand how to link scalars and colors. Thanks for your help, Nicolas From mike.jackson at bluequartz.net Fri Dec 5 16:50:54 2014 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Fri, 5 Dec 2014 16:50:54 -0500 Subject: [vtkusers] Vtk Legacy File format Version 3.0 Message-ID: <6AA42293-9FED-419C-A236-D5AF0859B32D@bluequartz.net> I am trying to write a parser for Vtk legacy files coming from ParaView 4.2.x and the header on the first line says it is a version 3.0. The only docs I can find is for version 2.0. Was anything changed? Is there a PDF doc like before that explains the changes? Thanks Mike Jackson From rekha.pyage at gmail.com Fri Dec 5 23:37:58 2014 From: rekha.pyage at gmail.com (reks) Date: Fri, 5 Dec 2014 21:37:58 -0700 (MST) Subject: [vtkusers] closing the clipped polydata aftr using vtkClipPolyData In-Reply-To: References: <1417786897467-5729692.post@n5.nabble.com> <1417788246887-5729694.post@n5.nabble.com> <1417789243629-5729696.post@n5.nabble.com> Message-ID: <1417840678859-5729710.post@n5.nabble.com> yes shawn... you are right.. but after passing the output to vtkFillHoleFolter some extra triangles are also getting created because of hole size I have given(1000,considering it has to work for all the cases where it can make sure to fill the big holes created after clipping), in the clipped area which i do not want.. how can solve this problem.. here i am attaching an image which has the extra triangles in it marked in red. -- View this message in context: http://vtk.1045678.n5.nabble.com/closing-the-clipped-polydata-aftr-using-vtkClipPolyData-tp5729692p5729710.html Sent from the VTK - Users mailing list archive at Nabble.com. From serhattural12 at gmail.com Sun Dec 7 12:54:34 2014 From: serhattural12 at gmail.com (serseri) Date: Sun, 7 Dec 2014 10:54:34 -0700 (MST) Subject: [vtkusers] Building ActiViz .NET OpenSource Edition 6.1.0 In-Reply-To: <1411858852309-5728930.post@n5.nabble.com> References: <1408815437762-5728343.post@n5.nabble.com> <53F99800.4030008@kitware.com> <1411858852309-5728930.post@n5.nabble.com> Message-ID: <1417974874780-5729712.post@n5.nabble.com> I am waiting curiously for Activiz 6.1.0. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Building-ActiViz-NET-OpenSource-Edition-6-1-0-tp5728343p5729712.html Sent from the VTK - Users mailing list archive at Nabble.com. From erickandres.perezalday at manchester.ac.uk Sun Dec 7 18:35:43 2014 From: erickandres.perezalday at manchester.ac.uk (Erick andres Perez alday) Date: Sun, 7 Dec 2014 23:35:43 +0000 Subject: [vtkusers] Binding vtk library Message-ID: Dear All I'm having problems binding the vtk library 5.8 (or 5.10) with a c++ code in ubuntu 12.04. I previously linked the 5.8 version manually using "-s /usr/lib/libvtkFiltering.so.5.8" when I compiled it. Unfortunatelly, I wipped out my Desktop. And this is not working anymore. Also, when I download the 5.8 version and installed it, I got: [ 5%] Building C object Utilities/vtkhdf5/src/CMakeFiles/vtkhdf5.dir/H5F.c.o /home/e/Downloads/VTK/Utilities/vtkhdf5/src/H5F.c: In function ?H5F_build_actual_name?: /home/e/Downloads/VTK/Utilities/vtkhdf5/src/H5F.c:2223:12: error: ?S_IFLNK? undeclared (first use in this function) /home/e/Downloads/VTK/Utilities/vtkhdf5/src/H5F.c:2223:12: note: each undeclared identifier is reported only once for each function it appears in /home/e/Downloads/VTK/Utilities/vtkhdf5/src/H5F.c:2223:38: error: ?S_IFMT? undeclared (first use in this function) /home/e/Downloads/VTK/Utilities/vtkhdf5/src/H5F.c:2228:27: error: ?PATH_MAX? undeclared (first use in this function) make[2]: *** [Utilities/vtkhdf5/src/CMakeFiles/vtkhdf5.dir/H5F.c.o] Error 1 make[1]: *** [Utilities/vtkhdf5/src/CMakeFiles/vtkhdf5.dir/all] Error 2 make: *** [all] Error 2 So, I installed the ubuntu vtk5-8 package: libvtk-java, libvtk5-dev, libvtk5-qt4-dev, libvtk5.8, libvtk5.8-qt4, python-vtk, tcl-vtk, vtk-doc, vtk-examples. But, still doesn't work. Then, I installed the vtk5-10 version, and everything went well but I still have this binding error: icc uvmap.cxx -Wno-deprecated -lvtkCommon -lvtkWidgets -lvtkIO -o uvconvert In file included from /usr/include/vtk-5.8/vtkVariant.h(35), from /usr/include/vtk-5.8/vtkAbstractArray.h(45), from /usr/include/vtk-5.8/vtkDataArray.h(37), from /usr/include/vtk-5.8/vtkIdTypeArray.h(29), from /usr/include/vtk-5.8/vtkCellArray.h(37), from uvmap.cxx(5): /usr/include/vtk-5.8/vtkStdString.h(25): catastrophic error: cannot open source file "vtkstd/string" #include // For the superclass. ^ compilation aborted for uvmap.cxx (code 4) make: *** [uvconvert] Error 4 Same error if I linked like #include "vtk-5.8/vtkCellArray.h" or #include "vtk-5.10/vtkCellArray.h" Any help would be really apreciated. Best regards Erick Andres Perez Alday Biological Physics Group 3.17 Schuster Laboratory University of Manchester M13 9PL -------------- next part -------------- An HTML attachment was scrubbed... URL: From aravind.bhat at tcs.com Mon Dec 8 04:05:20 2014 From: aravind.bhat at tcs.com (Aravind Bhat) Date: Mon, 8 Dec 2014 14:35:20 +0530 Subject: [vtkusers] Web solution usage of ITK /VTK Message-ID: Hello VTK /ITK users, We are using the ITK / VTK libraries for POC and request your help in understanding the packages.... 1. Do you have web based framework ( Basically, we want to build a solution on web server and access through tablet or iPAD using browser. Is this supported in the libraries ) ? 2. When should be used ParviewWeb libraries , Is this for web solutions ? 3. Does VTK / ITK supports cross platform for Web based ? Thnx Aravind Bhat Tata Consultancy Services Mailto: aravind.bhat at tcs.com Website: http://www.tcs.com ____________________________________________ Experience certainty. IT Services Business Solutions Consulting ____________________________________________ =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at jslengineeringsoftware.com Mon Dec 8 10:46:33 2014 From: jim at jslengineeringsoftware.com (James Labiak) Date: Mon, 08 Dec 2014 10:46:33 -0500 Subject: [vtkusers] vtkChartXYZ Java example In-Reply-To: <546CABD6.1090101@jslengineeringsoftware.com> References: <546CABD6.1090101@jslengineeringsoftware.com> Message-ID: <5485C7D9.4030907@jslengineeringsoftware.com> Hello, I am a new user of vtk and relatively new to Java. I am trying to use vtkChartXYZ in Java, but having a lot of problems. I adapted the TestSurfacePlot.cxx from Charts\Core\Testing\Cxx to Java, but it just shows a 2D surface which appears to be a plane. Does anyone have any Java examples of vtkChartXYZ? I included the converted Java code below. Thanks, Jim import java.io.File; // We import the vtk wrapped classes first. import vtk.*; // Then we define our class. public class CP_plot_test { // In the static contructor we load in the native code. // The libraries must be in your path to work. static { if (!vtkNativeLibrary.LoadAllNativeLibraries()) { for (vtkNativeLibrary lib : vtkNativeLibrary.values()) { if (!lib.IsLoaded()) System.out.println(lib.GetLibraryName() + " not loaded"); } System.out.println("Make sure the search path is correct: "); System.out.println(System.getProperty("java.library.path")); } vtkNativeLibrary.DisableOutputWindow(null); } // now the main program public static void main (String []args) { vtkChartXYZ chart = new vtkChartXYZ(); vtkPlotSurface plot = new vtkPlotSurface(); vtkContextView view = new vtkContextView(); view.GetRenderWindow().SetSize(400, 300); view.GetScene().AddItem(chart); //.GetPointer(); //create a surface vtkTable table = new vtkTable(); int numPoints = 70; float inc = 9.424778F / (numPoints - 1); for (float x = 0; x < numPoints; ++x) { vtkDoubleArray arr = new vtkDoubleArray(); for (float y = 0; y < numPoints; ++y) { double z = Math.sin(Math.sqrt(x * x + y * y)); arr.InsertNextValue(z); System.out.println("x = " + x + " y = " + y + " z =" + z); } table.AddColumn(arr); } //set up the surface plot to be visualized and add it to the chart System.out.println("Table has " + table.GetNumberOfColumns() + " columns"); System.out.println("Table has " + table.GetNumberOfRows() + " rows"); plot.SetYRange(0, 9.424778); plot.SetXRange(0, 9.424778); plot.SetInputData(table); chart.AddPlot(plot); view.GetRenderWindow().SetMultiSamples(0); view.GetInteractor().Initialize(); view.GetRenderWindow().Render(); view.GetInteractor().Start(); } } From sebastien.jourdain at kitware.com Mon Dec 8 11:14:11 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 8 Dec 2014 09:14:11 -0700 Subject: [vtkusers] Web solution usage of ITK /VTK In-Reply-To: References: Message-ID: Hi Aravind, On Mon, Dec 8, 2014 at 2:05 AM, Aravind Bhat wrote: > Hello VTK /ITK users, > > We are using the ITK / VTK libraries for POC and request your help in > understanding the packages.... > > 1. Do you have web based framework ( Basically, we want to build a > solution on web server and access through tablet or iPAD using browser. Is > this supported in the libraries ) ? VTK-Web and ParaViewWeb are two Web based library that let you do interactive remote rendering using either VTK Renderer or ParaView rendering. > 2. When should be used* ParviewWeb libraries , *Is this for web solutions > ? > It is a web solution that is suitable when you want to use ParaView as a backend. For basic VTK infrastructure, you can simply use VTK Web. > > 3. Does VTK / ITK supports cross platform for Web based ? > I don't know much about ITK but VTK Web (server side) needs (not really but that's currently the case) to run on a Unix server while the client can be a Web browser on iPad or any desktop. Hope that helps, Seb > > Thnx > Aravind Bhat > Tata Consultancy Services > Mailto: aravind.bhat at tcs.com > Website: http://www.tcs.com > ____________________________________________ > Experience certainty. IT Services > Business Solutions > Consulting > ____________________________________________ > > =====-----=====-----===== > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. 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 vsh at magellium.fr Mon Dec 8 12:15:55 2014 From: vsh at magellium.fr (Vincent32160) Date: Mon, 8 Dec 2014 10:15:55 -0700 (MST) Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> <1415282753706-5729393.post@n5.nabble.com> <1415370574070-5729402.post@n5.nabble.com> <1415896515919-5729459.post@n5.nabble.com> Message-ID: <1418058955238-5729717.post@n5.nabble.com> I am still struggling to unwrap the cylinder using vtkCylindricalTransform and vtkImageReslice2. I tried to follow your advices but I do not see the result of the transformation. For now, I only see a slice of the cylinder (through the center along the z-axis) Here is the code: Thanks again David Gobbi wrote > On Thu, Nov 13, 2014 at 9:35 AM, Vincent32160 < > vsh@ > > wrote: > >> Hi David, >> I am still trying to unwrapped my cylinder. >> Unfortunately I don't get what you mean by "you can select one >> "radius" slice for viewing". Should I use a vtkImageViewer2 to do it? >> > > When the cylinder has been unwrapped (via vtkImageReslice and a > vtkCylindricalTransform), you get a volume where the coordinates > are (r,theta,z). So, yes, you could set the orientation of > vtkImageViewer2 > so that it extracts slices along the first axis instead of along the third > axis. > Or you could set the OutputExtent of vtkImageReslice so that it only > produces the single "r" slice that you want. > > > >> Another question: I would like also to unwrap cylinder which don't have >> the >> same center as the original cylinder. Is that possible with >> vtkImageReslice? > > > Yes. Use vtkImageChangeInformation's SetOutputOrigin() method to > adjust the input image, instead of using CenterImageOn(). This will allow > you > to put the center of the cylinder anywhere you want. In VTK, the > "Origin" > of > the image means the position, in physical coordinates, of the first voxel. > So > if you know what voxel you want to be at the center of the cylinder, you > can > use algebra to compute how to set the Origin so that the physical > coordinates > of that voxel are (0,0,0). Drawing diagrams helps. > > - David > > > >> David Gobbi wrote >> > Hi Vincent, >> > >> > The input to vtkImageReslice should be the original image >> > (before either stencil has been applied). In order for >> > vtkImageReslice to do the interpolation properly, it must >> > have neighbor voxels for each voxel it extracts. After it >> > has unwrapped the whole cylinder, you can select one >> > "radius" slice for viewing. >> > >> > With vtkImageReslice, you _must_ specify what output >> > sampling you want. Use SetOutputSpacing() to set the >> > radius, circumferential angle, and longitudinal sample >> > spacings. Also use SetOutputExtent() to set the >> > number of samples for each. >> > >> > I may have been wrong about having to invert the >> > transform. Try feeding it in without GetInverse(). >> > >> > Also, for the transform to work properly, the input image must >> > be centered. After all, in cylindrical coordinates the assuption >> > is that (0,0,0) is at the center of the cylinder. The filter >> > vtkImageChangeInformation can center the image (i.e. put >> > vtkImageChangeInformation with CenterImageOn() before >> > vtkImageReslice). >> > >> > Good luck, >> > >> > - David >> > >> > >> > On Fri, Nov 7, 2014 at 7:29 AM, Vincent32160 < >> >> > vsh@ >> >> > > wrote: >> > >> >> I now have a tube of data. On the right, you see stencilFiltrer2, the >> >> result >> >> of two vtkROIStencilSource (the first to remove the outer voxels and >> the >> >> second the inner) >> >> <http://vtk.1045678.n5.nabble.com/file/n5729402/output3.png> >> >> >> >> I try to use vtkCylindricalTransform and vtkImageReslice to unwrap the >> >> tube >> >> and I don't get the result I want. Could you help? >> >> >> >> //Image Reslice >> >> vtkCylindricalTransform * cylTransform = >> vtkCylindricalTransform::New(); >> >> >> >> vtkImageReslice * imageReslice = vtkImageReslice::New(); >> >> imageReslice->SetInputConnection(stencilFilter2->GetOutputPort()); >> >> imageReslice->SetResliceTransform(cylTransform->GetInverse()); >> >> imageReslice->Update(); >> >> >> >> // Create volume >> >> vtkSmartPointer >> > > >> > outputOpacity = >> >> vtkSmartPointer >> > > >> > ::New(); >> >> outputOpacity->AddPoint(-1000, 1.0); >> >> outputOpacity->AddPoint(3000, 0.0); >> >> >> >> // Create volume mapper >> >> vtkVolumeRayCastMapper * imageMapper3d = >> vtkVolumeRayCastMapper::New(); >> >> imageMapper3d->SetInputConnection(imageReslice->GetOutputPort()); >> >> imageMapper3d->SetVolumeRayCastFunction(rayCastFunction); >> >> >> >> // Volume property >> >> vtkSmartPointer >> > > >> > outputVolumeProperty = >> >> vtkSmartPointer >> > > >> > ::New(); >> >> outputVolumeProperty->SetScalarOpacity(outputOpacity); >> >> outputVolumeProperty->SetInterpolationTypeToLinear(); >> >> outputVolumeProperty->ShadeOn(); >> >> >> >> // Displayed volume >> >> vtkSmartPointer >> > > >> > extractedVol = >> >> vtkSmartPointer >> > > >> > ::New(); >> >> extractedVol->SetMapper(imageMapper3d); >> >> extractedVol->SetProperty(outputVolumeProperty); >> >> >> >> Thanks >> >> >> >> >> >> David Gobbi wrote >> >> > Hi Vincent, >> >> > >> >> > Use an opacity transfer function that makes the black voxels >> >> transparent. >> >> > >> >> > You can unwrap the tube by reslicing it through an inverse >> cylindrical >> >> > transformation (e.g. vtkCylindricalTransform and vtkImageReslice). >> >> > >> >> > - David >> >> > >> >> > On Thu, Nov 6, 2014 at 7:05 AM, Vincent32160 < >> >> >> >> > vsh@ >> >> >> >> > > wrote: >> >> > >> >> >> Thanks again David! >> >> >> >> >> >> As I want to keep a volume I chose solution 2. >> >> >> I used a volume mapper and the result is pretty good. >> >> >> The only problem is that I am not able to remove the black voxels >> >> around >> >> >> the >> >> >> cylinder. (See picture) >> >> >> <http://vtk.1045678.n5.nabble.com/file/n5729393/output2.png> >> >> >> >> >> >> The next step of my approach is to be able to keep only the voxels >> on >> >> the >> >> >> edges (meaning on a tube or hollow cylinder of 1-voxel thickness). >> And >> >> >> after >> >> >> that I would like to unfold the tube and have a flat surface of >> >> pixels. >> >> >> Let me know if you think that it is better to create a new thread >> for >> >> >> these >> >> >> two next steps. >> >> >> >> >> >> Thanks for your help. >> >> >> >> >> >> Vincent >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> View this message in context: >> >> >> >> >> >> http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729393.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 >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> View this message in context: >> >> >> http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729402.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 >> >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729459.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 -- View this message in context: http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729717.html Sent from the VTK - Users mailing list archive at Nabble.com. From wulihouxiaoshuai at 163.com Tue Dec 9 02:02:51 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Tue, 9 Dec 2014 00:02:51 -0700 (MST) Subject: [vtkusers] System.loadlibrary("vtkRenderingJava") failed in Glassfish web server Message-ID: <1418108571702-5729718.post@n5.nabble.com> I deployed a dynamic web project into glassfish web server, and the following code is for loading shared libraries. static { try { System.loadLibrary("vtkCommonJava"); System.loadLibrary("vtkFilteringJava"); System.loadLibrary("vtkIOJava"); System.loadLibrary("vtkImagingJava"); System.loadLibrary("vtkGraphicsJava"); System.loadLibrary("vtkRenderingJava"); } catch (UnsatisfiedLinkError er) { System.out.println("Library Not Found"); } when I run this project on web server, only System.loadLibrary("vtkRenderingJava") failed but the others succeed. And the error occured: java.lang.UnsatisfiedLinkError: /usr/lib/libvtkRenderingJava.so: /opt/java/jdk1.7.0_60/jre/lib/i386/libjawt.so: symbol awt_Unlock, version SUNWprivate_1.1 not defined in file libmawt.so with link time reference. Has someone ever encountered this problem ? Can you give me some suggestions? Best wishes! -- View this message in context: http://vtk.1045678.n5.nabble.com/System-loadlibrary-vtkRenderingJava-failed-in-Glassfish-web-server-tp5729718.html Sent from the VTK - Users mailing list archive at Nabble.com. From vsh at magellium.fr Tue Dec 9 04:54:18 2014 From: vsh at magellium.fr (Vincent32160) Date: Tue, 9 Dec 2014 02:54:18 -0700 (MST) Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice Message-ID: <1418118858054-5729719.post@n5.nabble.com> Hi all, I am struggling to unwrap a cylinder of data (CTScan) using vtkCylindricalTransform and vtkImageReslice. I created a transformation and apply it through imageReslice. Unfortunately, I do not see the result of the transformation, I only see a slice of the cylinder (through the center along the z-axis). No unwrapping at all. Here is the code: Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Unwrap-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719.html Sent from the VTK - Users mailing list archive at Nabble.com. From tanakas at gmx.ch Tue Dec 9 05:38:01 2014 From: tanakas at gmx.ch (Tanaka Simon) Date: Tue, 09 Dec 2014 11:38:01 +0100 Subject: [vtkusers] Fwd: Re: segfault when vtkXMLMultiBlockDataReader reads a .vtm binary mode - bug? In-Reply-To: <54594649.2000401@gmx.ch> References: <54594649.2000401@gmx.ch> Message-ID: <5486D109.2070504@gmx.ch> Dear Developers and Users, I'll warming up this issue again since there was no echo last time. Can somebody confirm the buggy behaviour of the following code: #include #include #include #include #include #include #include #include #include int main(int, char *[]) { /** * notes: * -> it works with ascii writer configuration for any M,N. * -> with binary writer configuration it segfaults for higher M,N * -> {N=100,M=1} works. {N=100,M=10} fails. {N=1000,M=1} fails. */ const unsigned int N = 1000; // number of points const unsigned int M = 1; // number of characters in the string std::string filename = "test_output.vtm"; std::stringstream mystring; struct stat buffer; vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer stringAttribute = vtkSmartPointer::New(); vtkSmartPointer mypolydata = vtkSmartPointer::New(); vtkSmartPointer multiBDS = vtkSmartPointer::New (); vtkSmartPointer writer = vtkSmartPointer::New(); vtkSmartPointer multiBDS_read = vtkSmartPointer::New (); vtkSmartPointer reader = vtkSmartPointer::New(); stringAttribute->SetNumberOfComponents(1); reader->SetFileName(filename.c_str()); writer->SetFileName(filename.c_str()); writer->SetDataModeToBinary(); // segfault //writer->SetDataModeToAscii(); // works // create some points: for (int k=0; kInsertNextPoint(0.0, 0.0, 0.0); } // create some string attributes: for (int k=0; kInsertNextValue(mystring.str().c_str()); } // assemble and write to file: mypolydata->SetPoints(points); mypolydata->GetPointData()->AddArray(stringAttribute); multiBDS->SetBlock(0,mypolydata); writer->SetInput(multiBDS); writer->Write(); //now read the file again: if (stat (filename.c_str(), &buffer) == 0) { reader->Update(); multiBDS_read->ShallowCopy(reader->GetOutput()); } else { std::cout<<"file not found."< To: VTK Users , vtk-developers at vtk.org Dear Developers, can somebody confirm the buggy behaviour? i attached a yet simplified code to reproduce the segfault. thanks simon btw: i use ubuntu 14.04 and gcc 4.7 On 03.11.2014 11:19, Tanaka Simon wrote: > Dear Developers, > > 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 > > it only segfaults if the writer is 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 -------------- An HTML attachment was scrubbed... URL: -------------- 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: 2546 bytes Desc: not available URL: -------------- next part -------------- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please 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 wwthunan at gmail.com Tue Dec 9 07:17:02 2014 From: wwthunan at gmail.com (GeeKer Wang) Date: Tue, 9 Dec 2014 20:17:02 +0800 Subject: [vtkusers] Some bugs about vtkSphereWidget? Message-ID: When I checked the source code of vtkSphereWidget.cxx, vtkSphereWidget2.cxx and vtkSphereRepresentation.cxx in vtk6.1.0, I found following problems: 1. vtkSphereReprentation::SetHandlePosition() does not make the HandlePosition[3] updated 2. vtkSphereWidget2::TranslationEnabled/ScalingEnabled never used 3. vtkSphereWidget::SetHandleDirection() does not work before PlaceHandle() is called Are they bugs or just some kind of convention? -- Wentao Wang From rekha.pyage at gmail.com Tue Dec 9 08:19:02 2014 From: rekha.pyage at gmail.com (reks) Date: Tue, 9 Dec 2014 06:19:02 -0700 (MST) Subject: [vtkusers] Model generation from the segmented data Message-ID: <1418131142092-5729723.post@n5.nabble.com> Hello all, I have 3D data and I have segmented it and now I want to see the model of the segmented data so I passed the segmented data through vtkMarchingCubes but I can see only the surface and it is hollow from inside. I want to see all the segmented Image in my model. can anyone please tell me if I am using the wrong filter or do I have to use any other filter with vtkMarchingCubes. Thanks in advance reks -- View this message in context: http://vtk.1045678.n5.nabble.com/Model-generation-from-the-segmented-data-tp5729723.html Sent from the VTK - Users mailing list archive at Nabble.com. From tanstry at gmail.com Tue Dec 9 09:26:16 2014 From: tanstry at gmail.com (Trystan Louboutin) Date: Tue, 9 Dec 2014 15:26:16 +0100 Subject: [vtkusers] QVTKWidget avoid transparent background when rendering In-Reply-To: References: <1313743806.2459.YahooMailNeo@web132108.mail.ird.yahoo.com> <201108191000.43022.clinton@elemtech.com> Message-ID: I am waking up this thread because I am facing the same issue on a multiple-pages app written in C++. I tried the same trick on all QTKWidgets but does not change anything, I still see the old background while rendering... Does anyone has a small code snippet or example that explain more how to fix this ? Thanks. 2011-08-19 18:10 GMT+02:00 Jothy : > Thanks it works! > > You need to add the renderer first before calling show(). > > Jothy > > > On Fri, Aug 19, 2011 at 5:00 PM, Clinton Stimpson > wrote: > >> On Friday, August 19, 2011 02:50:06 am Doria David wrote: >> > Some strange behaviors occurs especially on QVTKWidget: when I show a >> > QVTKWidget with a 3D volume, for example, the widget are >> > shown transparent, showing the contents of the windows that are behind, >> > for example a WordPad window until it is completely rendered. How can I >> > avoid this strange behaviors ? (Ideally a black background instead of >> > showing the contents of the windows that are behind) Thank you. >> >> Can you do QVTKWidget::show(), a Render() to clear the background, then >> add >> the volume and render afterwards? The background is disabled for >> QVTKWidget >> to avoid a flickering issue. >> >> -- >> Clinton Stimpson >> Elemental Technologies, Inc >> Computational Simulation Software, LLC >> www.csimsoft.com >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tanstry at gmail.com Tue Dec 9 09:26:40 2014 From: tanstry at gmail.com (Trystan Louboutin) Date: Tue, 9 Dec 2014 15:26:40 +0100 Subject: [vtkusers] qvtkwidget glitch when switching dialogs In-Reply-To: References: Message-ID: Hi, I am facing the same issue in a multiple-pages application in C++ / Qt, I see the background of previous pages while the QVTKWidgets of the current page are rendering... I tried the tricks you suggest but nothing better. Any precise information of how to fix this ? Thanks. 2013-09-20 4:04 GMT+02:00 Alex Malyushytskyy : > Please reply to a mailing list. > > try to set *autoFillBackground > * > flag for every widget in QStackWidget. > and/or set setAttribute > > this->setAttribute(Qt::WA_NoBackground, false ); > > As far as I understand QStackWidget or QVtkWidget does not repaint > background and since painting of QVTKWidget is not fast you see old > background. > There are might be more options ( Qt::WA_NoSystemBackground or WA_OpaquePaintEvent > ) to check which might lead to the same behavior though. > > Alex > > On Thu, Sep 19, 2013 at 4:29 PM, Panayiotis Georgiou < > ps.georgiou at gmail.com> wrote: > >> Thanks for your reply Alex. I ve tried what you have suggested but with >> no success. I ve also tried a custom Qt stylesheet on each view. e.g.: >> >> (stylesheet.qss) >> >> QVTKWidget#view1{ >> background-color: black; >> } >> >> But this did not work either. >> >> Any other possible solutions? >> >> Thanks. >> >> >> >> On Thu, Sep 19, 2013 at 11:25 PM, Alex Malyushytskyy < >> alexmalvtk at gmail.com> wrote: >> >>> Try to set *autoFillBackground >>> * >>> true to QStackedWidget. >>> >>> Alex >>> >>> >>> On Thu, Sep 19, 2013 at 4:14 AM, Panayiotis Georgiou < >>> ps.georgiou at gmail.com> wrote: >>> >>>> Dear fellow vtk developers, >>>> >>>> I am developing an application in qt which in some dialogs includes >>>> some visualizations created in vtk. >>>> >>>> The qt application consists of a sequence of QDialogs stacked in a >>>> QStackedWidget. >>>> >>>> The problem which I am trying to solve is, when switching back/forth to >>>> dialogs including vtk visualizations (qvtkwidgets) until the visualization >>>> is loaded I see in the background parts of previous dialogs. >>>> >>>> Is there a way to avoid this glitch? I have tried pre-loading the vtk >>>> visualization before switching to the next dialog but it doesn't seem to >>>> help much. >>>> >>>> It's hard to explain the problem in words so I ve created a video which >>>> shows the glitch: >>>> http://www.screencast.com/t/jAxTRKgS8 >>>> >>>> In the video you can see the glitch in the four views pane dialog when >>>> minimizing/maximizing the views (with a double click) or which back to the >>>> previous dialog with the 3D mesh. >>>> >>>> Thanks a lot for your help. >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://www.vtk.org/mailman/listinfo/vtkusers >>>> >>>> >>> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Dec 9 09:42:40 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 9 Dec 2014 09:42:40 -0500 Subject: [vtkusers] Model generation from the segmented data In-Reply-To: <1418131142092-5729723.post@n5.nabble.com> References: <1418131142092-5729723.post@n5.nabble.com> Message-ID: If by "segmented" you mean you have assigned integer labels to a number of objects in your volume, then you should use vtkDiscreteMarchingCubes. For an example see: http://www.vtk.org/Wiki/index.php?title=VTK/Examples/Cxx/Medical/GenerateModelsFromLabels&oldid=50458 Bill On Tue, Dec 9, 2014 at 8:19 AM, reks wrote: > Hello all, > > I have 3D data and I have segmented it and now I want to see the model of > the segmented data so I passed the segmented data through vtkMarchingCubes > but I can see only the surface and it is hollow from inside. > I want to see all the segmented Image in my model. > > can anyone please tell me if I am using the wrong filter or do I have to use > any other filter with vtkMarchingCubes. > > > > > Thanks in advance > reks > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Model-generation-from-the-segmented-data-tp5729723.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 -- Unpaid intern in BillsBasement at noware dot com From artem.paraview at googlemail.com Tue Dec 9 10:03:25 2014 From: artem.paraview at googlemail.com (Artem Babayan) Date: Tue, 9 Dec 2014 15:03:25 +0000 Subject: [vtkusers] Cut cube with surface Message-ID: Hello, I have set of triangulated surfaces defined within the cubic domain . Each surface extends from vertical wall-to- vertical wall of the domain. Surfaces can touch or coincide in parts, but never cross. I now need to show cube's walls cupped with top surface and edges of other surface visible on the vertical walls. For simple case of single surface I expect to see 'solid' cube on all sides apart from the top, which is replaced with my surface. For multiple surfaces I need to have the opportunity to assign different colours to parts of the cube's walls sandwiched between different surfaces. Is it possible? Best wishes Artem -------------- next part -------------- An HTML attachment was scrubbed... URL: From pattersonnp at gmail.com Tue Dec 9 10:55:52 2014 From: pattersonnp at gmail.com (Nick Patterson) Date: Tue, 9 Dec 2014 15:55:52 +0000 Subject: [vtkusers] vtkGDCMPolydataReader and visualising contours slice by slice Message-ID: <4376B5A8-C739-4866-99B5-99D4657ABA11@gmail.com> Hi, I have a DICOM structure file and have used vtkGDCMPolydataReader to read in the structure set into a vtkPolyData. This seems to work as expected. However, does anyone have any recommendations for visualising the structure/contours slice by slice on the respective CT image. For example, if I were using the FourPaneViewer example, how could I adapt this to overlay the contours as I scroll through the slices? Comments appreciated, Nick. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Dec 9 11:23:27 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 9 Dec 2014 09:23:27 -0700 Subject: [vtkusers] System.loadlibrary("vtkRenderingJava") failed in Glassfish web server In-Reply-To: <1418108571702-5729718.post@n5.nabble.com> References: <1418108571702-5729718.post@n5.nabble.com> Message-ID: Yes, you need to add in you LD_LIBRARY_PATH the path to your JVM ...awt.so. And make sure a DISPLAY is available if you want to perform some rendering. Seb On Tue, Dec 9, 2014 at 12:02 AM, Emptystack wrote: > I deployed a dynamic web project into glassfish web server, and the > following > code is for loading shared libraries. > > static { > try { > System.loadLibrary("vtkCommonJava"); > System.loadLibrary("vtkFilteringJava"); > System.loadLibrary("vtkIOJava"); > System.loadLibrary("vtkImagingJava"); > System.loadLibrary("vtkGraphicsJava"); > System.loadLibrary("vtkRenderingJava"); > } catch (UnsatisfiedLinkError er) { > System.out.println("Library Not Found"); > } > > > when I run this project on web server, only > System.loadLibrary("vtkRenderingJava") failed but the others succeed. And > the error occured: java.lang.UnsatisfiedLinkError: > /usr/lib/libvtkRenderingJava.so: > /opt/java/jdk1.7.0_60/jre/lib/i386/libjawt.so: symbol awt_Unlock, version > SUNWprivate_1.1 not defined in file libmawt.so with link time reference. > > Has someone ever encountered this problem ? Can you give me some > suggestions? > > Best wishes! > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/System-loadlibrary-vtkRenderingJava-failed-in-Glassfish-web-server-tp5729718.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 jim at jslengineeringsoftware.com Tue Dec 9 11:46:59 2014 From: jim at jslengineeringsoftware.com (James Labiak) Date: Tue, 09 Dec 2014 11:46:59 -0500 Subject: [vtkusers] set chart 3D geometry in Java Message-ID: <54872783.4010602@jslengineeringsoftware.com> For vtkChartXYZ, I cannot seem to find the Java equivalent of the SetGeometry method in C like the code below. I must be missing something. Does anyone have any suggestions? vtkNew chart; chart->SetGeometry(vtkRectf(75.0, 20.0, 250, 260)); Thanks, Jim From david.gobbi at gmail.com Tue Dec 9 12:48:26 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 9 Dec 2014 10:48:26 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: <1418118858054-5729719.post@n5.nabble.com> References: <1418118858054-5729719.post@n5.nabble.com> Message-ID: Hi Vincent, As I said in an earlier email, you have to set the OutputExtent, OutputSpacing, and OutputOrigin for vtkImageReslice. - David On Tue, Dec 9, 2014 at 2:54 AM, Vincent32160 wrote: > Hi all, > I am struggling to unwrap a cylinder of data (CTScan) using > vtkCylindricalTransform and vtkImageReslice. > I created a transformation and apply it through imageReslice. > Unfortunately, I do not see the result of the transformation, I only see a > slice of the cylinder (through the center along the z-axis). No unwrapping > at all. > > Here is the code: > > > Thanks > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Unwrap-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719.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 mathieu at rogue-research.com Tue Dec 9 13:24:36 2014 From: mathieu at rogue-research.com (Mathieu Coursolle) Date: Tue, 9 Dec 2014 13:24:36 -0500 Subject: [vtkusers] Crash in vtkImageStencil after update to VTK 6 Message-ID: Hi, We are currently upgrading an application from VTK 5.10 to VTK 6. We have a piece of code that uses vtkPolyDataToImageStencil and vtkImageStencil, which worked perfectly when using VTK 5.10. However, it now crashes in some cases since we upgraded to VTK 6. Here is a summary of the workflow and code: 1) We load a polydata (output from another algorithm). 2) We create an image and fill its data with a constant value (0xFF). vtkSmartPointer image = vtkSmartPointer::New(); image->SetDimensions(sizeX, sizeY, sizeZ); image->SetSpacing(spacingX, spacingY, spacingZ); image->SetOrigin(0.0, 0.0, 0.0); image->AllocateScalars(VTK_UNSIGNED_CHAR, 1); void* dataPtr = image->GetScalarPointer(); memset(dataPtr, 0xFF, sizeX * sizeY * sizeZ); 3) We apply the polydata to image stencil: vtkSmartPointer dataStencil = vtkSmartPointer::New(); dataStencil->SetInputData(polydata); dataStencil->SetInformationInput(image); 4) We apply the image stencil. vtkSmartPointer stencil = vtkSmartPointer::New(); stencil->SetStencilConnection(dataStencil->GetOutputPort()); stencil->SetInputData(image); stencil->SetBackgroundValue(0); stencil->Update(); vtkSmartPointer mask = stencil->GetOutput(); It still works fine with some of the polydata, but now crashes in vtkImageStencil execution, more precisely in vtkCopyPixel, with at least one of the polydata that worked fine before. One thing I noticed is that the polydata for which it fails has its bounds very close to the edge of the image. I changed the tolerance (dataStencil->SetTolerance()) to 0 and it seems to fix the issue, but I have to admit that I don't understand why. That being said, anyone have an idea of why it would crash with VTK 6 and not before? I saw that there was a change in the way the tolerance was managed, but couldn't track it down specifically to our issue. Thank you for you help, Mathieu _________________________ Mathieu Coursolle, Eng., M.Eng. R&D Manager Rogue Research Inc. www.rogue-research.com +1 514 284 3888 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Dec 9 14:09:57 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 9 Dec 2014 14:09:57 -0500 Subject: [vtkusers] TimeRenderer and Other Examples with Errors In-Reply-To: <0F30CC23E95EB94FA4C9E18D23DD77421597D710@TSEAMB01> References: <0F30CC23E95EB94FA4C9E18D23DD77421597D710@TSEAMB01> Message-ID: Summary: Looks like those examples have not been updated to VTK6's refactored build system. Which examples do you seeing this with? Details: in 6, we modularized VTK (increased sub-library granularity). At the same time brought in the idea of interface modules. Now you can do things like use something other than OpenGL for rendering (Rendering/OpenGL module and Rendering/OpenGL2 module both implement the Rendering/Core module's interface specification). What is missing in these examples is that they aren't stating that they use the OpenGL module. See the implementation modules discussion in http://www.vtk.org/Wiki/VTK/Build_System_Migration#Implementation_Modules for details. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Dec 3, 2014 at 4:17 PM, Huantes, Dan F (TASC) wrote: > Excuse the Newbie Question.... > > But.... > > I just cloned VTK and ran cmake for Visual Studio 2012 (i.e. Generator = > "Visual Studio 11 Win64) and both Debug and Release build with no errors. > yay!!.. > > I tried to run several of the examples and the vast majority of them > display a vtkOutputWindow and give the following errors: > > Generic Warning: In ..\..\..\Rendering\Core\vtkProperty.cxx, line 45 > Error: no override found for 'vtkProperty'. > > Generic Warning: In ..\..\..\Rendering\Core\vtkRenderer.cxx, line 46 > Error: no override found for 'vtkRenderer'. > > Walking through the problem, it looks like I haven't set the > VTK_AUTOLOAD_PATH environmental variable. I'm going to look and see what > this should be set to... Don't recall being prompted for this one by the > configuration process. But I could be wrong.... > > Any insights would be appreciated. Thank you. > > Dan > > CONFIDENTIALITY NOTICE: This message and any attachments or files > transmitted with it (collectively, the "Message") are intended only for the > addressee and may contain information that is privileged, proprietary > and/or prohibited from disclosure by law or contract. If you are not the > intended recipient: (a) please do not read, copy or retransmit the Message; > (b) permanently delete and/or destroy all electronic and hard copies of the > Message; (c) notify us by return email; and (d) you are hereby notified > that any dissemination, distribution or copying of the Message is strictly > prohibited. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please 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 Tue Dec 9 14:12:40 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 9 Dec 2014 14:12:40 -0500 Subject: [vtkusers] TimeRenderer and Other Examples with Errors In-Reply-To: References: <0F30CC23E95EB94FA4C9E18D23DD77421597D710@TSEAMB01> Message-ID: Which examples are failing? I think most have been converted to VTK6. On Tue, Dec 9, 2014 at 2:09 PM, David E DeMarle wrote: > Summary: > > Looks like those examples have not been updated to VTK6's refactored build > system. Which examples do you seeing this with? > > Details: > > in 6, we modularized VTK (increased sub-library granularity). At the same > time brought in the idea of interface modules. Now you can do things like > use something other than OpenGL for rendering (Rendering/OpenGL module and > Rendering/OpenGL2 module both implement the Rendering/Core module's > interface specification). > > What is missing in these examples is that they aren't stating that they use > the OpenGL module. See the implementation modules discussion in > http://www.vtk.org/Wiki/VTK/Build_System_Migration#Implementation_Modules > for details. > > > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, Dec 3, 2014 at 4:17 PM, Huantes, Dan F (TASC) > wrote: >> >> Excuse the Newbie Question.... >> >> But.... >> >> I just cloned VTK and ran cmake for Visual Studio 2012 (i.e. Generator = >> "Visual Studio 11 Win64) and both Debug and Release build with no errors. >> yay!!.. >> >> I tried to run several of the examples and the vast majority of them >> display a vtkOutputWindow and give the following errors: >> >> Generic Warning: In ..\..\..\Rendering\Core\vtkProperty.cxx, line 45 >> Error: no override found for 'vtkProperty'. >> >> Generic Warning: In ..\..\..\Rendering\Core\vtkRenderer.cxx, line 46 >> Error: no override found for 'vtkRenderer'. >> >> Walking through the problem, it looks like I haven't set the >> VTK_AUTOLOAD_PATH environmental variable. I'm going to look and see what >> this should be set to... Don't recall being prompted for this one by the >> configuration process. But I could be wrong.... >> >> Any insights would be appreciated. Thank you. >> >> Dan >> >> CONFIDENTIALITY NOTICE: This message and any attachments or files >> transmitted with it (collectively, the "Message") are intended only for the >> addressee and may contain information that is privileged, proprietary and/or >> prohibited from disclosure by law or contract. If you are not the intended >> recipient: (a) please do not read, copy or retransmit the Message; (b) >> permanently delete and/or destroy all electronic and hard copies of the >> Message; (c) notify us by return email; and (d) you are hereby notified that >> any dissemination, distribution or copying of the Message is strictly >> prohibited. >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please 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 andrew.amaclean at gmail.com Tue Dec 9 14:49:44 2014 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Wed, 10 Dec 2014 06:49:44 +1100 Subject: [vtkusers] Static Analysis of VTK Message-ID: Sean, You are doing an awesome job cleaning up VTK! I, for one, deeply appreciate what you are doing. Regards Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Dec 9 14:56:31 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 9 Dec 2014 14:56:31 -0500 Subject: [vtkusers] [vtk-developers] Static Analysis of VTK In-Reply-To: References: Message-ID: +1 On Tue, Dec 9, 2014 at 2:49 PM, Andrew Maclean wrote: > Sean, > You are doing an awesome job cleaning up VTK! > I, for one, deeply appreciate what you are doing. > > Regards > Andrew > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > -- Unpaid intern in BillsBasement at noware dot com From dave.demarle at kitware.com Tue Dec 9 15:03:53 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 9 Dec 2014 15:03:53 -0500 Subject: [vtkusers] [vtk-developers] Static Analysis of VTK In-Reply-To: References: Message-ID: +1 David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Dec 9, 2014 at 2:56 PM, Bill Lorensen wrote: > +1 > > > On Tue, Dec 9, 2014 at 2:49 PM, Andrew Maclean > wrote: > > Sean, > > You are doing an awesome job cleaning up VTK! > > I, for one, deeply appreciate what you are doing. > > > > Regards > > Andrew > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtk-developers > > > > > > > > -- > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Tue Dec 9 15:06:49 2014 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Tue, 9 Dec 2014 20:06:49 +0000 Subject: [vtkusers] set brightness on vtkImageResliceMapper Message-ID: <46CB11F12B9DC24D860D4082451B318A12C96E7E@exchange3.microbrightfield.com> Hi all, How do I change the brightness of the result of an vtkImageResliceMapper? Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Dec 9 15:45:31 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 9 Dec 2014 13:45:31 -0700 Subject: [vtkusers] [vtk-developers] Crash in vtkImageStencil after update to VTK 6 In-Reply-To: References: Message-ID: Hi Mathieu, The vtkImageStencilData filter had some bugs relating to the way it handled tolerance, and these were fixed only a few weeks ago. Setting Tolerance to zero will keep the bugs from manifesting. But I definitely recommend that you use the latest VTK master if possible, if you are depending on vtkPolyDataToImageStencil. However, they weren't the kind of bugs that would cause a crash, so the crash surprises me. I'll look at vtkImageStencil for clues. As far as I understand, vtkImageStencil itself hasn't changed since VTK 5. - David On Tue, Dec 9, 2014 at 11:24 AM, Mathieu Coursolle < mathieu at rogue-research.com> wrote: > Hi, > > We are currently upgrading an application from VTK 5.10 to VTK 6. > > We have a piece of code that uses vtkPolyDataToImageStencil and > vtkImageStencil, which worked perfectly when using VTK 5.10. > However, it now crashes in some cases since we upgraded to VTK 6. > > Here is a summary of the workflow and code: > > 1) We load a polydata (output from another algorithm). > > 2) We create an image and fill its data with a constant value (0xFF). > > vtkSmartPointer image = vtkSmartPointer::New > (); > image->SetDimensions(sizeX, sizeY, sizeZ); > image->SetSpacing(spacingX, spacingY, spacingZ); > image->SetOrigin(0.0, 0.0, 0.0); > image->AllocateScalars(VTK_UNSIGNED_CHAR, 1); > void* dataPtr = image->GetScalarPointer(); > memset(dataPtr, 0xFF, sizeX * sizeY * sizeZ); > > 3) We apply the polydata to image stencil: > > vtkSmartPointer dataStencil = vtkSmartPointer< > vtkPolyDataToImageStencil>::New(); > dataStencil->SetInputData(polydata); > dataStencil->SetInformationInput(image); > > 4) We apply the image stencil. > > vtkSmartPointer stencil = vtkSmartPointer >::New(); > stencil->SetStencilConnection(dataStencil->GetOutputPort()); > stencil->SetInputData(image); > stencil->SetBackgroundValue(0); > stencil->Update(); > > vtkSmartPointer mask = stencil->GetOutput(); > > It still works fine with some of the polydata, but now crashes in > vtkImageStencil execution, more precisely in vtkCopyPixel, with at least > one of the polydata that worked fine before. > > One thing I noticed is that the polydata for which it fails has its bounds > very close to the edge of the image. > > I changed the tolerance (dataStencil->SetTolerance()) to 0 and it seems to > fix the issue, but I have to admit that I don't understand why. > > That being said, anyone have an idea of why it would crash with VTK 6 and > not before? I saw that there was a change in the way the tolerance was > managed, but couldn't track it down specifically to our issue. > > Thank you for you help, > > Mathieu > > _________________________ > Mathieu Coursolle, Eng., M.Eng. > R&D Manager > Rogue Research Inc. > www.rogue-research.com > +1 514 284 3888 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Dec 9 15:46:51 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 9 Dec 2014 13:46:51 -0700 Subject: [vtkusers] set brightness on vtkImageResliceMapper In-Reply-To: <46CB11F12B9DC24D860D4082451B318A12C96E7E@exchange3.microbrightfield.com> References: <46CB11F12B9DC24D860D4082451B318A12C96E7E@exchange3.microbrightfield.com> Message-ID: On Tue, Dec 9, 2014 at 1:06 PM, Doug Hoppes wrote: > > > > How do I change the brightness of the result of an vtkImageResliceMapper? > Set the ColorWindow and ColorLevel in the vtkImageProperty. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Tue Dec 9 15:47:55 2014 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Tue, 9 Dec 2014 20:47:55 +0000 Subject: [vtkusers] set brightness on vtkImageResliceMapper In-Reply-To: References: <46CB11F12B9DC24D860D4082451B318A12C96E7E@exchange3.microbrightfield.com> Message-ID: <46CB11F12B9DC24D860D4082451B318A12C96ECE@exchange3.microbrightfield.com> Excellent.. thanks! From: David Gobbi [mailto:david.gobbi at gmail.com] Sent: Tuesday, December 09, 2014 3:47 PM To: Doug Hoppes Cc: vtkusers at vtk.org Subject: Re: [vtkusers] set brightness on vtkImageResliceMapper On Tue, Dec 9, 2014 at 1:06 PM, Doug Hoppes > wrote: How do I change the brightness of the result of an vtkImageResliceMapper? Set the ColorWindow and ColorLevel in the vtkImageProperty. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From julio.hoffimann at gmail.com Tue Dec 9 17:00:22 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Tue, 9 Dec 2014 14:00:22 -0800 Subject: [vtkusers] vtkTypeMacro warning Message-ID: Dear all, Could you please fix the calls to vtkTypeMacro to avoid the "extra ;" warning under -Wpedantic? For instance, in vtkObject.h the macro is suffixed with ; I'm getting 41 warnings in total and since I'm compiling with C++14 I would like to keep the -pedantic flag enabled. -J?lio -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Tue Dec 9 17:02:13 2014 From: sean at rogue-research.com (Sean McBride) Date: Tue, 9 Dec 2014 17:02:13 -0500 Subject: [vtkusers] vtkTypeMacro warning In-Reply-To: References: Message-ID: <20141209220213.2019662740@mail.rogue-research.com> On Tue, 9 Dec 2014 14:00:22 -0800, J?lio Hoffimann said: >Could you please fix the calls to vtkTypeMacro to avoid the "extra ;" >warning under -Wpedantic? For instance, in vtkObject.h the macro is >suffixed with ; > >I'm getting 41 warnings in total and since I'm compiling with C++14 I would >like to keep the -pedantic flag enabled. J?lio, I've actually been working on such a fix, but it's not quite done yet... 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 julio.hoffimann at gmail.com Tue Dec 9 17:15:08 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Tue, 9 Dec 2014 14:15:08 -0800 Subject: [vtkusers] vtkTypeMacro warning In-Reply-To: <20141209220213.2019662740@mail.rogue-research.com> References: <20141209220213.2019662740@mail.rogue-research.com> Message-ID: Thank you Sean, I appreciate. I see VTK is on GitHub nowadays, is there any way to create an issue there instead of in the central issue tracker ( http://www.vtk.org/Bug/my_view_page.php)? Do VTK devs dislike GitHub issues? -J?lio -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Dec 9 17:29:34 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 9 Dec 2014 15:29:34 -0700 Subject: [vtkusers] [vtk-developers] Static Analysis of VTK In-Reply-To: References: Message-ID: Thanks Sean, Bill, Andrew, David G. and all others that I'm forgetting here who contributes to VTK. I guess, I'm just following that stream. But it is true that it is important to share our appreciation. Seb On Tue, Dec 9, 2014 at 1:03 PM, David E DeMarle wrote: > +1 > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Tue, Dec 9, 2014 at 2:56 PM, Bill Lorensen > wrote: > >> +1 >> >> >> On Tue, Dec 9, 2014 at 2:49 PM, Andrew Maclean >> wrote: >> > Sean, >> > You are doing an awesome job cleaning up VTK! >> > I, for one, deeply appreciate what you are doing. >> > >> > Regards >> > Andrew >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtk-developers >> > >> > >> >> >> >> -- >> 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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please 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 sean at rogue-research.com Tue Dec 9 17:36:48 2014 From: sean at rogue-research.com (Sean McBride) Date: Tue, 9 Dec 2014 17:36:48 -0500 Subject: [vtkusers] [vtk-developers] Crash in vtkImageStencil after update to VTK 6 In-Reply-To: References: Message-ID: <20141209223648.1965070768@mail.rogue-research.com> On Tue, 9 Dec 2014 13:45:31 -0700, David Gobbi said: >The vtkImageStencilData filter had some bugs relating to the way it handled >tolerance, and these were fixed only a few weeks ago. Setting Tolerance to >zero will keep the bugs from manifesting. But I definitely recommend that >you use the latest VTK master if possible, if you are depending on >vtkPolyDataToImageStencil. David, Thanks for your reply. I've just checked git master and it repros there too. >However, they weren't the kind of bugs that would cause a crash, so the >crash surprises me. I'll look at vtkImageStencil for clues. As far as I >understand, vtkImageStencil itself hasn't changed since VTK 5. The crash is in a secondary thread here: #0 void vtkCopyPixel(unsigned char*&, unsigned char const*, int) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:99 #1 void vtkImageStencilExecute(vtkImageStencil*, vtkImageData*, unsigned char*, vtkImageData*, unsigned char*, vtkImageData*, unsigned char*, int*, int, vtkInformation*) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:194 #2 vtkImageStencil::ThreadedRequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*, vtkImageData***, vtkImageData**, int*, int) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:324 #3 vtkThreadedImageAlgorithmThreadedExecute(void*) at /VTK/Common/ExecutionModel/vtkThreadedImageAlgorithm.cxx:200 #4 _pthread_body () #5 _pthread_start () #6 thread_start () the main thread meanwhile always seems to be in vtkCopyPixel at the same time: #0 void vtkCopyPixel(unsigned char*&, unsigned char const*, int) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:96 #1 void vtkImageStencilExecute(vtkImageStencil*, vtkImageData*, unsigned char*, vtkImageData*, unsigned char*, vtkImageData*, unsigned char*, int*, int, vtkInformation*) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:194 #2 vtkImageStencil::ThreadedRequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*, vtkImageData***, vtkImageData**, int*, int) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:324 #3 vtkThreadedImageAlgorithmThreadedExecute(void*) at /VTK/Common/ExecutionModel/vtkThreadedImageAlgorithm.cxx:200 #4 vtkMultiThreader::SingleMethodExecute() at /VTK/Common/Core/vtkMultiThreader.cxx:390 #5 vtkThreadedImageAlgorithm::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkThreadedImageAlgorithm.cxx:294 #6 vtkImageAlgorithm::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkImageAlgorithm.cxx:103 #7 vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkExecutive.cxx:775 #8 vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx:491 #9 vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkCompositeDataPipeline.cxx:178 #10 vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx:274 #11 vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx:310 #12 vtkDemandDrivenPipeline::UpdateData(int) at /VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx:441 #13 vtkStreamingDemandDrivenPipeline::Update(int) at /VTK/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx:363 #14 vtkAlgorithm::Update(int) at /VTK/Common/ExecutionModel/vtkAlgorithm.cxx:1455 #15 vtkAlgorithm::Update() at /VTK/Common/ExecutionModel/vtkAlgorithm.cxx:1449 If I force vtkMultiThreader::SetGlobalMaximumNumberOfThreads(1), then it crashes all the same, again in vtkCopyPixel. Sean From david.gobbi at gmail.com Tue Dec 9 18:11:09 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 9 Dec 2014 16:11:09 -0700 Subject: [vtkusers] [vtk-developers] Crash in vtkImageStencil after update to VTK 6 In-Reply-To: <20141209223648.1965070768@mail.rogue-research.com> References: <20141209223648.1965070768@mail.rogue-research.com> Message-ID: On Tue, Dec 9, 2014 at 3:36 PM, Sean McBride wrote: > > > Thanks for your reply. I've just checked git master and it repros there > too. > Darn. The crash is in a secondary thread here: > Unfortunately that's not much help. The fact that it was a vtkCopyPixel segfault already confirmed that it's trying to access a voxel out-of-bounds. Is it possible for you to send me the polydata that causes the crash? I don't need the image, but I do need to know its spacing, origin, and extent. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Dec 9 19:17:06 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 9 Dec 2014 17:17:06 -0700 Subject: [vtkusers] set chart 3D geometry in Java In-Reply-To: <54872783.4010602@jslengineeringsoftware.com> References: <54872783.4010602@jslengineeringsoftware.com> Message-ID: That method is probably not wrapped, hence the issue. Seb On Tue, Dec 9, 2014 at 9:46 AM, James Labiak wrote: > For vtkChartXYZ, I cannot seem to find the Java equivalent of the > SetGeometry method in C like the code below. I must be missing something. > Does anyone have any suggestions? > > vtkNew chart; > chart->SetGeometry(vtkRectf(75.0, 20.0, 250, 260)); > > Thanks, > Jim > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Dec 9 19:30:56 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 9 Dec 2014 17:30:56 -0700 Subject: [vtkusers] set chart 3D geometry in Java In-Reply-To: References: <54872783.4010602@jslengineeringsoftware.com> Message-ID: It is not wrapped in Java, but it is wrapped in Python. The same is true for all methods that use vtkVector, vtkRect, or vtkColor. - David On Tue, Dec 9, 2014 at 5:17 PM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > That method is probably not wrapped, hence the issue. > > Seb > > On Tue, Dec 9, 2014 at 9:46 AM, James Labiak < > jim at jslengineeringsoftware.com> wrote: > >> For vtkChartXYZ, I cannot seem to find the Java equivalent of the >> SetGeometry method in C like the code below. I must be missing something. >> Does anyone have any suggestions? >> >> vtkNew chart; >> chart->SetGeometry(vtkRectf(75.0, 20.0, 250, 260)); >> >> Thanks, >> Jim >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at jslengineeringsoftware.com Tue Dec 9 19:40:20 2014 From: jim at jslengineeringsoftware.com (James Labiak) Date: Tue, 9 Dec 2014 19:40:20 -0500 Subject: [vtkusers] set chart 3D geometry in Java In-Reply-To: References: <54872783.4010602@jslengineeringsoftware.com> Message-ID: Unfortunately my project forces me to use Java. What would be an alternative to create surface plots similar to vtkchartxyz without those methods? Thanks, Jim > On Dec 9, 2014, at 7:30 PM, David Gobbi wrote: > > It is not wrapped in Java, but it is wrapped in Python. The same is true for all methods that use vtkVector, vtkRect, or vtkColor. > > - David > >> On Tue, Dec 9, 2014 at 5:17 PM, Sebastien Jourdain wrote: >> That method is probably not wrapped, hence the issue. >> >> Seb >> >>> On Tue, Dec 9, 2014 at 9:46 AM, James Labiak wrote: >>> For vtkChartXYZ, I cannot seem to find the Java equivalent of the SetGeometry method in C like the code below. I must be missing something. Does anyone have any suggestions? >>> >>> vtkNew chart; >>> chart->SetGeometry(vtkRectf(75.0, 20.0, 250, 260)); >>> >>> Thanks, >>> Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Tue Dec 9 21:50:21 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Tue, 9 Dec 2014 19:50:21 -0700 (MST) Subject: [vtkusers] System.loadlibrary("vtkRenderingJava") failed in Glassfish web server In-Reply-To: References: <1418108571702-5729718.post@n5.nabble.com> Message-ID: <1418179821172-5729767.post@n5.nabble.com> Hi,Seb! Thanks for your reply! In my $(JAVA_HOME)/jre/lib/i386 folder, there are 2 libmawt.so, one in headless folder and the other xawt. I don't know which one should be added to LD_LIBRARY_PATH. So I have tried both options, but the problem still exists. Can you give me detailed description of the solution of this problem? Thank you veru much! -- View this message in context: http://vtk.1045678.n5.nabble.com/System-loadlibrary-vtkRenderingJava-failed-in-Glassfish-web-server-tp5729718p5729767.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Dec 9 22:10:54 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 9 Dec 2014 20:10:54 -0700 Subject: [vtkusers] set chart 3D geometry in Java In-Reply-To: References: <54872783.4010602@jslengineeringsoftware.com> Message-ID: Hi James, You can use vtkCubeAxesActor to draw the axes, and use vtkGlyph3D to plot the points. The vtkGlyph3D filter takes two inputs: its first input contains the (x,y,z) points where you want to draw the points, and its second input (the Source input) is a vtkPolyData that is the shape that you want to draw at each point on the plot, e.g. the output from vtkSphereSource or vtkCubeSource. - David On Tue, Dec 9, 2014 at 5:40 PM, James Labiak wrote: > Unfortunately my project forces me to use Java. What would be an > alternative to create surface plots similar to vtkchartxyz without those > methods? > Thanks, > Jim > > On Dec 9, 2014, at 7:30 PM, David Gobbi wrote: > > It is not wrapped in Java, but it is wrapped in Python. The same is true > for all methods that use vtkVector, vtkRect, or vtkColor. > > - David > > On Tue, Dec 9, 2014 at 5:17 PM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> That method is probably not wrapped, hence the issue. >> >> Seb >> >> On Tue, Dec 9, 2014 at 9:46 AM, James Labiak < >> jim at jslengineeringsoftware.com> wrote: >> >>> For vtkChartXYZ, I cannot seem to find the Java equivalent of the >>> SetGeometry method in C like the code below. I must be missing something. >>> Does anyone have any suggestions? >>> >>> vtkNew chart; >>> chart->SetGeometry(vtkRectf(75.0, 20.0, 250, 260)); >>> >>> Thanks, >>> Jim >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Dec 9 22:18:00 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 9 Dec 2014 20:18:00 -0700 Subject: [vtkusers] set chart 3D geometry in Java In-Reply-To: References: <54872783.4010602@jslengineeringsoftware.com> Message-ID: Quick follow up: vtkGlyph3D would give you a scatter plot, but you asked for a surface plot. For a surface plot, vtkWarpScalar is probably the best filter to use. It can take a flat rectangular data (e.g. as produced by vtkPlaneSource) and change the Z coordinates to provide a surface plot. You might have to dig around to find a good example, though. - David On Tue, Dec 9, 2014 at 8:10 PM, David Gobbi wrote: > Hi James, > > You can use vtkCubeAxesActor to draw the axes, and use vtkGlyph3D to plot > the points. The vtkGlyph3D filter takes two inputs: its first input > contains the (x,y,z) points where you want to draw the points, and its > second input (the Source input) is a vtkPolyData that is the shape that you > want to draw at each point on the plot, e.g. the output from > vtkSphereSource or vtkCubeSource. > > - David > > On Tue, Dec 9, 2014 at 5:40 PM, James Labiak < > jim at jslengineeringsoftware.com> wrote: > >> Unfortunately my project forces me to use Java. What would be an >> alternative to create surface plots similar to vtkchartxyz without those >> methods? >> Thanks, >> Jim >> >> On Dec 9, 2014, at 7:30 PM, David Gobbi wrote: >> >> It is not wrapped in Java, but it is wrapped in Python. The same is true >> for all methods that use vtkVector, vtkRect, or vtkColor. >> >> - David >> >> On Tue, Dec 9, 2014 at 5:17 PM, Sebastien Jourdain < >> sebastien.jourdain at kitware.com> wrote: >> >>> That method is probably not wrapped, hence the issue. >>> >>> Seb >>> >>> On Tue, Dec 9, 2014 at 9:46 AM, James Labiak < >>> jim at jslengineeringsoftware.com> wrote: >>> >>>> For vtkChartXYZ, I cannot seem to find the Java equivalent of the >>>> SetGeometry method in C like the code below. I must be missing something. >>>> Does anyone have any suggestions? >>>> >>>> vtkNew chart; >>>> chart->SetGeometry(vtkRectf(75.0, 20.0, 250, 260)); >>>> >>>> Thanks, >>>> Jim >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Wed Dec 10 04:39:40 2014 From: vsh at magellium.fr (Vincent32160) Date: Wed, 10 Dec 2014 02:39:40 -0700 (MST) Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: References: <1418118858054-5729719.post@n5.nabble.com> Message-ID: <1418204380250-5729771.post@n5.nabble.com> Hi, I tried to set these three variables. Unfortunately what I got is a simple slice. Just to provide the context. The original data I am loading are 480 slices of 512x512 pixels with a spacing of (0.117 ; 0.117; 0.3). In order to get squared voxel I set the output spacing to (0.117 ; 0.117 ; 0.117) which means that I got a data which is 512x512x1227 voxels. When I apply the cylindrical transform to this data, I do not see any slice with a dimension of 2*pi*radius with 0SetInputConnection(imageInfos->GetOutputPort()); imageReslice->SetOutputOrigin(0,0,0); imageReslice->SetResliceTransform(cylTransform); imageReslice->SetOutputDimensionality(3); imageReslice->InterpolateOn(); double outputSpacing[3]; outputSpacing[0] = scale->GetOutput()->GetSpacing()[0]; // radius outputSpacing[1] = scale->GetOutput()->GetSpacing()[1];; // circumferential angle outputSpacing[2] = scale->GetOutput()->GetSpacing()[0]; // longitudinal sample spacings imageReslice->SetOutputSpacing(outputSpacing); int outputExtent[6]; // number of samples outputExtent[0] = 0; outputExtent[1] = 600; outputExtent[2] = 0; outputExtent[3] = 600; outputExtent[4] = 0; outputExtent[5] = 1400; imageReslice->SetOutputExtent(outputExtent); imageReslice->Update(); Result : -- View this message in context: http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729771.html Sent from the VTK - Users mailing list archive at Nabble.com. From mathieu at rogue-research.com Wed Dec 10 07:20:32 2014 From: mathieu at rogue-research.com (Mathieu Coursolle) Date: Wed, 10 Dec 2014 07:20:32 -0500 Subject: [vtkusers] [vtk-developers] Crash in vtkImageStencil after update to VTK 6 In-Reply-To: References: <20141209223648.1965070768@mail.rogue-research.com> Message-ID: <823C3473-7351-492C-908C-5031AFC64D79@rogue-research.com> Hi, Please find attached the polydata that causes the crash. I used vtkPolyDataWriter to export it. The image dimensions are 193 x 229 x 193, and the spacing is 1.0 x 1.0 x 1.0. Please let us know if you need any information. Thank you, Mathieu On Dec 9, 2014, at 6:11 PM, David Gobbi wrote: > On Tue, Dec 9, 2014 at 3:36 PM, Sean McBride wrote: > > Thanks for your reply. I've just checked git master and it repros there too. > > Darn. > > > The crash is in a secondary thread here: > > Unfortunately that's not much help. The fact that it was a vtkCopyPixel segfault already confirmed that it's trying to access a voxel out-of-bounds. Is it possible for you to send me the polydata that causes the crash? I don't need the image, but I do need to know its spacing, origin, and extent. > > - David > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkImageStencilCrash.vtk Type: application/octet-stream Size: 215538 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Wed Dec 10 07:35:17 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Wed, 10 Dec 2014 05:35:17 -0700 (MST) Subject: [vtkusers] System.loadlibrary("vtkRenderingJava") failed in Glassfish web server In-Reply-To: <1418179821172-5729767.post@n5.nabble.com> References: <1418108571702-5729718.post@n5.nabble.com> <1418179821172-5729767.post@n5.nabble.com> Message-ID: <1418214917654-5729774.post@n5.nabble.com> I am very happy to tell everyone that I have solved the problem. I updated my JDK from 1.7 editon to 1.8 editon and builded my VTK again! After doing this, I can run my project very well. -- View this message in context: http://vtk.1045678.n5.nabble.com/System-loadlibrary-vtkRenderingJava-failed-in-Glassfish-web-server-tp5729718p5729774.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Wed Dec 10 09:19:29 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 10 Dec 2014 07:19:29 -0700 (MST) Subject: [vtkusers] imageViewer size within QVTKWidget In-Reply-To: <1418220612046-5729776.post@n5.nabble.com> References: <1417175172257-5729578.post@n5.nabble.com> <4B7FB8C0-759E-4A46-B274-8A0F5DAEA102@gmail.com> <1418220612046-5729776.post@n5.nabble.com> Message-ID: <1418221169126-5729777.post@n5.nabble.com> The only solution I've found so far is to run your program in low resolution mode: Right click on the *.app file Get Info Open in low resolution mode Close the Get Info window and run program see: http://vtk.1045678.n5.nabble.com/QVTKWidget-and-MacOS-problems-td5729620.html -- View this message in context: http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-tp5729578p5729777.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Dec 10 09:46:58 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 10 Dec 2014 07:46:58 -0700 Subject: [vtkusers] imageViewer size within QVTKWidget In-Reply-To: <1418221169126-5729777.post@n5.nabble.com> References: <1417175172257-5729578.post@n5.nabble.com> <4B7FB8C0-759E-4A46-B274-8A0F5DAEA102@gmail.com> <1418220612046-5729776.post@n5.nabble.com> <1418221169126-5729777.post@n5.nabble.com> Message-ID: Unfortunately, I don't have any systems with a retina display to run tests on. I wonder, has this issue ever come up with ParaView on retina displays? On Wed, Dec 10, 2014 at 7:19 AM, mbcx9rb9 wrote: > The only solution I've found so far is to run your program in low > resolution > mode: > > Right click on the *.app file > Get Info > Open in low resolution mode > Close the Get Info window and run program > > see: > > http://vtk.1045678.n5.nabble.com/QVTKWidget-and-MacOS-problems-td5729620.html > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-tp5729578p5729777.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 david.gobbi at gmail.com Wed Dec 10 09:51:14 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 10 Dec 2014 07:51:14 -0700 Subject: [vtkusers] [vtk-developers] Crash in vtkImageStencil after update to VTK 6 In-Reply-To: <823C3473-7351-492C-908C-5031AFC64D79@rogue-research.com> References: <20141209223648.1965070768@mail.rogue-research.com> <823C3473-7351-492C-908C-5031AFC64D79@rogue-research.com> Message-ID: Thanks, that should be all the info that I need. I'll take a look at this tonight. On Wed, Dec 10, 2014 at 5:20 AM, Mathieu Coursolle < mathieu at rogue-research.com> wrote: > Hi, > > Please find attached the polydata that causes the crash. I used > vtkPolyDataWriter to export it. > > The image dimensions are 193 x 229 x 193, and the spacing is 1.0 x 1.0 x > 1.0. > > Please let us know if you need any information. > > Thank you, > > Mathieu > > > > On Dec 9, 2014, at 6:11 PM, David Gobbi wrote: > > On Tue, Dec 9, 2014 at 3:36 PM, Sean McBride > wrote: >> >> >> Thanks for your reply. I've just checked git master and it repros there >> too. >> > > Darn. > > > The crash is in a secondary thread here: >> > > Unfortunately that's not much help. The fact that it was a vtkCopyPixel > segfault already confirmed that it's trying to access a voxel > out-of-bounds. Is it possible for you to send me the polydata that causes > the crash? I don't need the image, but I do need to know its spacing, > origin, and extent. > > - David > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Dec 10 10:35:09 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 10 Dec 2014 08:35:09 -0700 Subject: [vtkusers] System.loadlibrary("vtkRenderingJava") failed in Glassfish web server In-Reply-To: <1418214917654-5729774.post@n5.nabble.com> References: <1418108571702-5729718.post@n5.nabble.com> <1418179821172-5729767.post@n5.nabble.com> <1418214917654-5729774.post@n5.nabble.com> Message-ID: Glad you figure out something. Otherwise, adding the path to the xawt directory should have worked. But that environment variable need to be valid when starting Glassfish. On Wed, Dec 10, 2014 at 5:35 AM, Emptystack wrote: > I am very happy to tell everyone that I have solved the problem. I updated > my > JDK from 1.7 editon to 1.8 editon and builded my VTK again! After doing > this, I can run my project very well. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/System-loadlibrary-vtkRenderingJava-failed-in-Glassfish-web-server-tp5729718p5729774.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 da.angulo39 at uniandes.edu.co Wed Dec 10 11:31:13 2014 From: da.angulo39 at uniandes.edu.co (diego0020) Date: Wed, 10 Dec 2014 09:31:13 -0700 (MST) Subject: [vtkusers] Web solution usage of ITK /VTK In-Reply-To: References: Message-ID: <1418229073634-5729782.post@n5.nabble.com> Hi I was doing some experiments with vtk_web and it looks really amazing. I tried the examples in https://github.com/Kitware/VTK/tree/master/Web/Applications Is there any additional documentation? Are there descriptions of the protocol and the client side JS libraries? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Web-solution-usage-of-ITK-VTK-tp5729714p5729782.html Sent from the VTK - Users mailing list archive at Nabble.com. From rekha.pyage at gmail.com Wed Dec 10 11:42:47 2014 From: rekha.pyage at gmail.com (reks) Date: Wed, 10 Dec 2014 09:42:47 -0700 (MST) Subject: [vtkusers] vtkKWApplication -tcl init error Message-ID: <1418229767359-5729783.post@n5.nabble.com> Hello all, I am using vtkKWWidgets in my application.I am initializing tcl interpreter using Tcl_Interp *interp = vtkKWApplication::InitializeTcl(argc, argv ,&cerr ); After creating the setup and tried to run the application I am getting the error message" The application failed to initialize Tcl/Tk!" Can someone please guide me if I am missing out something here. Thanks in advance. reks -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkKWApplication-tcl-init-error-tp5729783.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Wed Dec 10 12:04:24 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 10 Dec 2014 10:04:24 -0700 Subject: [vtkusers] Web solution usage of ITK /VTK In-Reply-To: <1418229073634-5729782.post@n5.nabble.com> References: <1418229073634-5729782.post@n5.nabble.com> Message-ID: All the documentation we have is in ParaView but fully apply to vtk web. http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html On Wed, Dec 10, 2014 at 9:31 AM, diego0020 wrote: > Hi > > I was doing some experiments with vtk_web and it looks really amazing. > > I tried the examples in > https://github.com/Kitware/VTK/tree/master/Web/Applications > > Is there any additional documentation? > Are there descriptions of the protocol and the client side JS libraries? > > Thanks > > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Web-solution-usage-of-ITK-VTK-tp5729714p5729782.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 jim at jslengineeringsoftware.com Wed Dec 10 17:29:40 2014 From: jim at jslengineeringsoftware.com (James Labiak) Date: Wed, 10 Dec 2014 17:29:40 -0500 Subject: [vtkusers] set chart 3D geometry in Java In-Reply-To: References: <54872783.4010602@jslengineeringsoftware.com> Message-ID: Thanks for your help! I'm trying it right now. Jim > On Dec 9, 2014, at 10:18 PM, David Gobbi wrote: > > Quick follow up: vtkGlyph3D would give you a scatter plot, but you asked for a surface plot. For a surface plot, vtkWarpScalar is probably the best filter to use. It can take a flat rectangular data (e.g. as produced by vtkPlaneSource) and change the Z coordinates to provide a surface plot. You might have to dig around to find a good example, though. > > - David > >> On Tue, Dec 9, 2014 at 8:10 PM, David Gobbi wrote: >> Hi James, >> >> You can use vtkCubeAxesActor to draw the axes, and use vtkGlyph3D to plot the points. The vtkGlyph3D filter takes two inputs: its first input contains the (x,y,z) points where you want to draw the points, and its second input (the Source input) is a vtkPolyData that is the shape that you want to draw at each point on the plot, e.g. the output from vtkSphereSource or vtkCubeSource. >> >> - David >> >>> On Tue, Dec 9, 2014 at 5:40 PM, James Labiak wrote: >>> Unfortunately my project forces me to use Java. What would be an alternative to create surface plots similar to vtkchartxyz without those methods? >>> Thanks, >>> Jim >>> >>>> On Dec 9, 2014, at 7:30 PM, David Gobbi wrote: >>>> >>>> It is not wrapped in Java, but it is wrapped in Python. The same is true for all methods that use vtkVector, vtkRect, or vtkColor. >>>> >>>> - David >>>> >>>>> On Tue, Dec 9, 2014 at 5:17 PM, Sebastien Jourdain wrote: >>>>> That method is probably not wrapped, hence the issue. >>>>> >>>>> Seb >>>>> >>>>>> On Tue, Dec 9, 2014 at 9:46 AM, James Labiak wrote: >>>>>> For vtkChartXYZ, I cannot seem to find the Java equivalent of the SetGeometry method in C like the code below. I must be missing something. Does anyone have any suggestions? >>>>>> >>>>>> vtkNew chart; >>>>>> chart->SetGeometry(vtkRectf(75.0, 20.0, 250, 260)); >>>>>> >>>>>> Thanks, >>>>>> Jim > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julio.hoffimann at gmail.com Thu Dec 11 00:07:38 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Wed, 10 Dec 2014 21:07:38 -0800 Subject: [vtkusers] Axes marker not working as expected Message-ID: Dear all, I'm trying to create a viewer widget with a QVTKWidget inside. For some reason the axes marker is not fixed in the bottom left of the scene. It moves together with the other objects (screenshot attached). The code for the constructor is straightforward: VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent){ QVTKWidget *qvtkwidget = new QVTKWidget; auto axes = vtkSmartPointer::New(); axes->SetXAxisLabelText("x"); axes->SetYAxisLabelText("y"); axes->SetZAxisLabelText("z"); auto orientationMarker = vtkSmartPointer::New(); orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); orientationMarker->SetOrientationMarker(axes); orientationMarker->SetEnabled(1); // sphere auto sphereSource = vtkSmartPointer::New(); sphereSource->SetCenter(8, 8, 8); sphereSource->SetRadius(5.0); auto mapper = vtkSmartPointer::New(); mapper->SetInputConnection(sphereSource->GetOutputPort()); auto actor = vtkSmartPointer::New(); actor->SetMapper(mapper); auto renderer = vtkSmartPointer::New(); renderer->AddActor(axes); renderer->AddActor(actor); vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); renderWindow->AddRenderer(renderer);} Why the orientation marker is not behaving as expected? Does the order of object creation in VTK matter (renderer, renderwindow, actors)? What should be the lifetime for each object in the code snippet above? I appreciate any help, J?lio. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2014-12-09 14:19:32.png Type: image/png Size: 8703 bytes Desc: not available URL: From Ravi.HM at LntTechservices.com Thu Dec 11 01:08:10 2014 From: Ravi.HM at LntTechservices.com (Ravi HM) Date: Thu, 11 Dec 2014 06:08:10 +0000 Subject: [vtkusers] Dicom Slice Message-ID: Hi, I have a series of Dicom images, How to view those images in 1. Sagitall 2. Coronal 3. Axial Given a series of Dicom image how to find number of slice can be done. Lots of thanks I advance. Regards, Ravi L&T Technology Services Ltd www.LntTechservices.com This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alberto.pietrini89 at gmail.com Thu Dec 11 05:17:38 2014 From: alberto.pietrini89 at gmail.com (albo89) Date: Thu, 11 Dec 2014 03:17:38 -0700 (MST) Subject: [vtkusers] Avoid translation of data when plotting Message-ID: <1418293058026-5729791.post@n5.nabble.com> Hi guys, I am doing a vtk project in which I have a rendered 3D volume of data. I can move through the X axis of these data using a cut plane. Whenever I move through them with the plane, I display in another window a carpet plot (done with vtkWarpScalars) of the "slice". So far, all this went just fine. The only problem is that when plotting the carpet plot in the other window, the plot translates up and down. Instead, I would like the plot changing inside my outline, without shifting. Is that possible to achieve? If yes, how? Thank you in advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/Avoid-translation-of-data-when-plotting-tp5729791.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Thu Dec 11 07:46:59 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 11 Dec 2014 07:46:59 -0500 Subject: [vtkusers] Axes marker not working as expected In-Reply-To: References: Message-ID: This example puts the marker in its own viewport. http://www.itk.org/Wiki/VTK/Examples/Cxx/Widgets/OrientationMarkerWidget On Thu, Dec 11, 2014 at 12:07 AM, J?lio Hoffimann wrote: > Dear all, > > I'm trying to create a viewer widget with a QVTKWidget inside. For some > reason the axes marker is not fixed in the bottom left of the scene. It > moves together with the other objects (screenshot attached). > > The code for the constructor is straightforward: > > VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent) > { > QVTKWidget *qvtkwidget = new QVTKWidget; > > auto axes = vtkSmartPointer::New(); > axes->SetXAxisLabelText("x"); > axes->SetYAxisLabelText("y"); > axes->SetZAxisLabelText("z"); > > auto orientationMarker = > vtkSmartPointer::New(); > orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); > orientationMarker->SetOrientationMarker(axes); > orientationMarker->SetEnabled(1); > > // sphere > auto sphereSource = vtkSmartPointer::New(); > sphereSource->SetCenter(8, 8, 8); > sphereSource->SetRadius(5.0); > auto mapper = vtkSmartPointer::New(); > mapper->SetInputConnection(sphereSource->GetOutputPort()); > auto actor = vtkSmartPointer::New(); > actor->SetMapper(mapper); > > auto renderer = vtkSmartPointer::New(); > renderer->AddActor(axes); > renderer->AddActor(actor); > > vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); > renderWindow->AddRenderer(renderer); > } > > Why the orientation marker is not behaving as expected? Does the order of > object creation in VTK matter (renderer, renderwindow, actors)? What should > be the lifetime for each object in the code snippet above? > > I appreciate any help, > J?lio. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please 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.gobbi at gmail.com Thu Dec 11 08:12:58 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 11 Dec 2014 06:12:58 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: <1418204380250-5729771.post@n5.nabble.com> References: <1418118858054-5729719.post@n5.nabble.com> <1418204380250-5729771.post@n5.nabble.com> Message-ID: Hi Vincent, The circumferencial spacing is incorrect, because that output dimension is measured in radians and should have a total range of [0, 2*pi]. However, the image that you attached isn't what I expected so I think something else is going wrong. I'll try running this pipeline on my own machine, but I probably won't be able to do so until the weekend. - David On Wed, Dec 10, 2014 at 2:39 AM, Vincent32160 wrote: > Hi, > I tried to set these three variables. Unfortunately what I got is a simple > slice. > > Just to provide the context. > The original data I am loading are 480 slices of 512x512 pixels with a > spacing of (0.117 ; 0.117; 0.3). In order to get squared voxel I set the > output spacing to (0.117 ; 0.117 ; 0.117) which means that I got a data > which is 512x512x1227 voxels. > When I apply the cylindrical transform to this data, I do not see any slice > with a dimension of 2*pi*radius with 0 > Is the order I am setting each variable important? > > I ran the code below to have an overview of the data after the cylindrical > transform. I set an output extent bigger than the original data to see if I > got unrolled cylinder plane. > > vtkCylindricalTransform * cylTransform = vtkCylindricalTransform::New(); > > vtkImageReslice * imageReslice = vtkImageReslice::New(); > imageReslice->SetInputConnection(imageInfos->GetOutputPort()); > imageReslice->SetOutputOrigin(0,0,0); > imageReslice->SetResliceTransform(cylTransform); > imageReslice->SetOutputDimensionality(3); > imageReslice->InterpolateOn(); > double outputSpacing[3]; > outputSpacing[0] = scale->GetOutput()->GetSpacing()[0]; // radius > outputSpacing[1] = scale->GetOutput()->GetSpacing()[1];; // circumferential > angle > outputSpacing[2] = scale->GetOutput()->GetSpacing()[0]; // longitudinal > sample spacings > imageReslice->SetOutputSpacing(outputSpacing); > > int outputExtent[6]; // number of samples > outputExtent[0] = 0; > outputExtent[1] = 600; > outputExtent[2] = 0; > outputExtent[3] = 600; > outputExtent[4] = 0; > outputExtent[5] = 1400; > imageReslice->SetOutputExtent(outputExtent); > imageReslice->Update(); > > Result : > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Dec 11 10:00:25 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 11 Dec 2014 08:00:25 -0700 Subject: [vtkusers] [vtk-developers] Crash in vtkImageStencil after update to VTK 6 In-Reply-To: References: <20141209223648.1965070768@mail.rogue-research.com> <823C3473-7351-492C-908C-5031AFC64D79@rogue-research.com> Message-ID: Hi Mathieu, Thanks for the data set. I was able to reproduce and fix the bug: http://review.source.kitware.com/#/c/18392/ The bug was introduced in November when I changed some of the tolerance handling code. - David On Wed, Dec 10, 2014 at 7:51 AM, David Gobbi wrote: > Thanks, that should be all the info that I need. I'll take a look at this > tonight. > > On Wed, Dec 10, 2014 at 5:20 AM, Mathieu Coursolle < > mathieu at rogue-research.com> wrote: > >> Hi, >> >> Please find attached the polydata that causes the crash. I used >> vtkPolyDataWriter to export it. >> >> The image dimensions are 193 x 229 x 193, and the spacing is 1.0 x 1.0 x >> 1.0. >> >> Please let us know if you need any information. >> >> Thank you, >> >> Mathieu >> >> >> >> On Dec 9, 2014, at 6:11 PM, David Gobbi wrote: >> >> On Tue, Dec 9, 2014 at 3:36 PM, Sean McBride >> wrote: >>> >>> >>> Thanks for your reply. I've just checked git master and it repros there >>> too. >>> >> >> Darn. >> >> >> The crash is in a secondary thread here: >>> >> >> Unfortunately that's not much help. The fact that it was a vtkCopyPixel >> segfault already confirmed that it's trying to access a voxel >> out-of-bounds. Is it possible for you to send me the polydata that causes >> the crash? I don't need the image, but I do need to know its spacing, >> origin, and extent. >> >> - David >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Thu Dec 11 10:15:07 2014 From: vsh at magellium.fr (Vincent32160) Date: Thu, 11 Dec 2014 08:15:07 -0700 (MST) Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: References: <1418118858054-5729719.post@n5.nabble.com> <1418204380250-5729771.post@n5.nabble.com> Message-ID: <1418310907835-5729796.post@n5.nabble.com> Thanks for your help. Would that be helpful if I send you my input data (DICOM files)? I got the impression that the cylindrical transformation passed through vtkImageReslice::SetResliceTransform has no effect on the data representation. -- View this message in context: http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729796.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Dec 11 11:00:42 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 11 Dec 2014 09:00:42 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: <1418310907835-5729796.post@n5.nabble.com> References: <1418118858054-5729719.post@n5.nabble.com> <1418204380250-5729771.post@n5.nabble.com> <1418310907835-5729796.post@n5.nabble.com> Message-ID: On Thu, Dec 11, 2014 at 8:15 AM, Vincent32160 wrote: > Thanks for your help. > Would that be helpful if I send you my input data (DICOM files)? > I'll try on one of my own datasets first. I got the impression that the cylindrical transformation passed through > vtkImageReslice::SetResliceTransform has no effect on the data > representation. What do you mean by "data representation" here? - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From julio.hoffimann at gmail.com Thu Dec 11 12:39:12 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Thu, 11 Dec 2014 09:39:12 -0800 Subject: [vtkusers] Axes marker not working as expected In-Reply-To: References: Message-ID: Hi Bill, The issue is somehow related to the order of object creation (renderer, renderWindow, ...). If I move the renderer creation and renderWindow up in the code before any axes setup, the axes shows correctly in the left bottom. However, when I pass the mouse over the scene, the program crashes. I also realized that we don't need to addActor(axes) by hand. Do you have any idea on what can be causing the crash when I move the mouse over the VTK widget area? -J?lio 2014-12-11 4:46 GMT-08:00 Bill Lorensen : > This example puts the marker in its own viewport. > http://www.itk.org/Wiki/VTK/Examples/Cxx/Widgets/OrientationMarkerWidget > > > On Thu, Dec 11, 2014 at 12:07 AM, J?lio Hoffimann > wrote: > > Dear all, > > > > I'm trying to create a viewer widget with a QVTKWidget inside. For some > > reason the axes marker is not fixed in the bottom left of the scene. It > > moves together with the other objects (screenshot attached). > > > > The code for the constructor is straightforward: > > > > VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent) > > { > > QVTKWidget *qvtkwidget = new QVTKWidget; > > > > auto axes = vtkSmartPointer::New(); > > axes->SetXAxisLabelText("x"); > > axes->SetYAxisLabelText("y"); > > axes->SetZAxisLabelText("z"); > > > > auto orientationMarker = > > vtkSmartPointer::New(); > > orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); > > orientationMarker->SetOrientationMarker(axes); > > orientationMarker->SetEnabled(1); > > > > // sphere > > auto sphereSource = vtkSmartPointer::New(); > > sphereSource->SetCenter(8, 8, 8); > > sphereSource->SetRadius(5.0); > > auto mapper = vtkSmartPointer::New(); > > mapper->SetInputConnection(sphereSource->GetOutputPort()); > > auto actor = vtkSmartPointer::New(); > > actor->SetMapper(mapper); > > > > auto renderer = vtkSmartPointer::New(); > > renderer->AddActor(axes); > > renderer->AddActor(actor); > > > > vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); > > renderWindow->AddRenderer(renderer); > > } > > > > Why the orientation marker is not behaving as expected? Does the order of > > object creation in VTK matter (renderer, renderwindow, actors)? What > should > > be the lifetime for each object in the code snippet above? > > > > I appreciate any help, > > J?lio. > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please 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 vsh at magellium.fr Thu Dec 11 12:45:09 2014 From: vsh at magellium.fr (Vincent32160) Date: Thu, 11 Dec 2014 10:45:09 -0700 (MST) Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: References: <1418118858054-5729719.post@n5.nabble.com> <1418204380250-5729771.post@n5.nabble.com> <1418310907835-5729796.post@n5.nabble.com> Message-ID: <1418319909607-5729805.post@n5.nabble.com> I wanted to talk about the data display but I was wrong, the transformation is applied in a complex way (cf picture below). On the right, a vtkImageReslice with the original data and on the left, a vtkImageReslice with the original data and a cylindrical transformation applied. Am I right if I say that I am supposed to get a pyramid instead of a rectangular prism (as seen on the picture)? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729805.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Dec 11 12:56:44 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 11 Dec 2014 10:56:44 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: <1418319909607-5729805.post@n5.nabble.com> References: <1418118858054-5729719.post@n5.nabble.com> <1418204380250-5729771.post@n5.nabble.com> <1418310907835-5729796.post@n5.nabble.com> <1418319909607-5729805.post@n5.nabble.com> Message-ID: On Thu, Dec 11, 2014 at 10:45 AM, Vincent32160 wrote: > I wanted to talk about the data display but I was wrong, the transformation > is applied in a complex way (cf picture below). > On the right, a vtkImageReslice with the original data and on the left, a > vtkImageReslice with the original data and a cylindrical transformation > applied. > Am I right if I say that I am supposed to get a pyramid instead of a > rectangular prism (as seen on the picture)? > Thanks > > > No, it shouldn't give a pyramid. The circumferencial coordinate "theta" is measured in radians, so it has a range of [0,2*pi] regardless of whether you are at the center or whether you are at the surface. It would be a pyramid if the circumferencial coordinate was measured in distance units (e.g. in millimeters). But it's not, because by definition a cylindrical transform uses an angular measure. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Thu Dec 11 13:59:02 2014 From: vsh at magellium.fr (Vincent32160) Date: Thu, 11 Dec 2014 11:59:02 -0700 (MST) Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: References: <1418118858054-5729719.post@n5.nabble.com> <1418204380250-5729771.post@n5.nabble.com> <1418310907835-5729796.post@n5.nabble.com> <1418319909607-5729805.post@n5.nabble.com> Message-ID: <1418324342110-5729808.post@n5.nabble.com> To be clear, are you saying that the output image is correct? -- View this message in context: http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729808.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Dec 11 14:17:35 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 11 Dec 2014 12:17:35 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: <1418324342110-5729808.post@n5.nabble.com> References: <1418118858054-5729719.post@n5.nabble.com> <1418204380250-5729771.post@n5.nabble.com> <1418310907835-5729796.post@n5.nabble.com> <1418319909607-5729805.post@n5.nabble.com> <1418324342110-5729808.post@n5.nabble.com> Message-ID: On Thu, Dec 11, 2014 at 11:59 AM, Vincent32160 wrote: > To be clear, are you saying that the output image is correct? No, it doesn't look correct to me, but because I don't know the internal structure of cylinder I'm not quite sure what to expect it to look like. But the fact that it isn't a pyramid isn't what makes it look wrong. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From Allavali.Ballary at LntTechservices.com Fri Dec 12 00:42:25 2014 From: Allavali.Ballary at LntTechservices.com (Allavali Ballary) Date: Fri, 12 Dec 2014 05:42:25 +0000 Subject: [vtkusers] Doubt on Image pan Message-ID: <3BD743544268C04A827420A055435C93B8B469@POCITMSEXMB06.LntUniverse.com> Hi How to implement image pan in vtk c# without using vtkRenderWindowInteractor. Thanks & Regards, Allavali Ballary L&T Technology Services Ltd www.LntTechservices.com This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Fri Dec 12 08:46:32 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Fri, 12 Dec 2014 08:46:32 -0500 Subject: [vtkusers] [vtk-developers] Static Analysis of VTK In-Reply-To: References: Message-ID: +10 On Tue, Dec 9, 2014 at 3:03 PM, David E DeMarle wrote: > > +1 > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Tue, Dec 9, 2014 at 2:56 PM, Bill Lorensen > wrote: > >> +1 >> >> >> On Tue, Dec 9, 2014 at 2:49 PM, Andrew Maclean >> wrote: >> > Sean, >> > You are doing an awesome job cleaning up VTK! >> > I, for one, deeply appreciate what you are doing. >> > >> > Regards >> > Andrew >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtk-developers >> > >> > >> >> >> >> -- >> 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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please 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 alberto.pietrini89 at gmail.com Fri Dec 12 11:24:25 2014 From: alberto.pietrini89 at gmail.com (albo89) Date: Fri, 12 Dec 2014 09:24:25 -0700 (MST) Subject: [vtkusers] Reverse axis range with vtkCubeAxesActor() Message-ID: <1418401465173-5729824.post@n5.nabble.com> Hi, I am using vtkCubeAxesActor() to plot a 3D volume rendering. The X axis should be put from 600 to 0, in decreasing order. The only parameter I set are: ca = vtkCubeAxesActor() ... ca.SetXAxisRange(600,0) Unfortunately, the labels are not displayed in the desired order (which should be the reverse). I managed to obtain that using vtkCubeAxesActor2D(), which does the proper thing when setting the range how I told. The problem is that I do not like to have vtkCubeAxesActor2D(), as, IMHO, the outcome is no good looking. Is there a way to do that even with vtkCubeAxesActor() ? Thank you in advance. -- View this message in context: http://vtk.1045678.n5.nabble.com/Reverse-axis-range-with-vtkCubeAxesActor-tp5729824.html Sent from the VTK - Users mailing list archive at Nabble.com. From alberto.pietrini89 at gmail.com Fri Dec 12 11:49:05 2014 From: alberto.pietrini89 at gmail.com (albo89) Date: Fri, 12 Dec 2014 09:49:05 -0700 (MST) Subject: [vtkusers] Reverse axis range with vtkCubeAxesActor() In-Reply-To: <1418401465173-5729824.post@n5.nabble.com> References: <1418401465173-5729824.post@n5.nabble.com> Message-ID: <1418402945736-5729826.post@n5.nabble.com> Ok, I solved it. It's enough to rotate the axis of 180 degrees. ca.RotateX(180), Thanks anyway. -- View this message in context: http://vtk.1045678.n5.nabble.com/Reverse-axis-range-with-vtkCubeAxesActor-tp5729824p5729826.html Sent from the VTK - Users mailing list archive at Nabble.com. From kwoelfer at u.washington.edu Fri Dec 12 12:54:36 2014 From: kwoelfer at u.washington.edu (Karl Woelfer) Date: Fri, 12 Dec 2014 09:54:36 -0800 Subject: [vtkusers] ImportError: No module named vtk - Installation problem VTK 6.1.0, Debian 7, Anaconda python ? Message-ID: <002701d01634$b1411f90$13c35eb0$@washington.edu> Hello - We recently installed vtk-5.10 on Ubuntu 12.04, Anaconda 1.4.0 python, no problems. Now we have moved to the Debian 7 OS and are attempting to install the newest VTK 6.1.0, with Anaconda python 2.1.0 Our procedures (below) were modified for the new environment. Some configuration parameters have changed in VTK also. At the end of the install, our python test fails: python -c "from vtk import vtkVersion; print vtkVersion.GetVTKSourceVersion()" Traceback (most recent call last): File "", line 1, in ImportError: No module named vtk Is part of the problem with LD_LIBRARY_PATH? The previous VTK version 5.10 under Ubuntu 12.04 created a directory: /usr/local/lib/vtk-5.10 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vtk-6.1 <<<< Don't know where this is created Thanks so much for suggestions to fix. - KarlW Visualization Toolkit (VTK) 6.1.0 Download the latest version of vtk source (VTK-6.1.0.tar.gz) and vtk-data (VTKData-6.1.0.tar.gz) from http://www.vtk.org/VTK/resources/software.html#latest Copy to /usr/local; untar/unzip NOTE that the VTKData untars to /usr/local/VTK-6.1.0/.ExternalData cd to VTK-6.1.0; mkdir VTK_BUILD cd VTK_BUILD sudo apt-get install libglu1-mesa-dev Add /usr/include to PATH, export OPENLGL_INCLUDE_DIR=/usr/include/GL ccmake .. (hit c) to configure BUILD_DOCUMENTATION *OFF (default) BUILD_EXAMPLES *OFF BUILD_SHARED_LIBS *OFF BUILD_TESTING *ON CMAKE_BUILD_TYPE *Debug CMAKE_INSTALL_PREFIX */usr/local EXECINFO_LIB *EXECINFO_LIB-NOTFOUND (default) VTK_EXTRA_COMPILER_WARNINGS *OFF VTK_Group_Imaging *OFF (default) VTK_Group_MPI *OFF (default) VTK_Group_Qt *OFF (default) VTK_Group_Rendering *ON (default) VTK_Group_Standalone *ON (default) VTK_Group_Tk *OFF (default) VTK_Group_Views *OFF (default) VTK_Group_Web *OFF (default) VTK_SMP_IMPLEMENTATION_TYPE *Sequential (default) VTK_USE_LARGE_JAVA *OFF (default) VTK_WRAP_JAVA *OFF VTK_WRAP_PYTHON *OFF VTK_WRAP_TCL *OFF Then, run make to compile VTK sudo make -j12 (this will use parallel compilation on a 12 - 16 core workstation) sudo make install -------------------------- sudo apt-get install tk-dev cd VTK_BUILD ccmake .. (hit c) to configure enable BUILD_SHARED_LIBS CMAKE_INSTALL_PREFIX is default /usr/local enable VTK_WRAP_PYTHON enter advanced configuration by pressing "t" PYTHON_INCLUDE_DIR /usr/local/anaconda/include/python2.7 PYTHON_LIBRARY /usr/local/anaconda/lib/libpython2.7.so PYTHON_EXECUTABLE /usr/local/anaconda/bin/python2.7 VTK_DATA_STORE /usr/local/VTK-6.1.0 ? VTK_INSTALL_PYTHON_MODULE_DIR /usr/local/lib/python./site-packages ? "c" to configure "g" to generate sudo make -j12 sudo make install ------------------------ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vtk-6.1 <<<< Don't know where this is created TEST: python -c "from vtk import vtkVersion; print vtkVersion.GetVTKSourceVersion()" EXPECT vtk version 6.1.0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From liljoe at unm.edu Fri Dec 12 13:47:28 2014 From: liljoe at unm.edu (Joseph Butner) Date: Fri, 12 Dec 2014 18:47:28 +0000 Subject: [vtkusers] reading element blocks from exodus mesh into a vtkSurfaceFilter Message-ID: <1418410048377.99137@unm.edu> I have an exodus mesh file that contains numbered element blocks. I want to be able to determine which element block (if any) any (x, y, z) coordinate is in. To do this, I read the mesh in with vtkExodusiiMeshReader, attempt to generate a vtkSurfaceFilter for each element block, and use vtkSelectEnclosedPoints to find the element block the point is in. Unfortunately, I'm doing something wrong when reading the nodes for each element block, the data structure that is supposed to have the node coordinates seems to be empty, it throws this error: ERROR: In /home/joe/Downloads/VTK-6.1.0/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx, line 715 vtkCompositeDataPipeline (0x35181a0): Input port 1 of algorithm vtkSelectEnclosedPoints(0x1c31480) has 0 connections but is not optional. A small piece of the code I have is: #define Instantiate(obj, class) vtkSmartPointer obj = vtkSmartPointer::New() //I want to store the vtkPolyData for each element block in a vector, will be passed to vtkSelectEnclosedPoints later: std::vector > element_blocks_surface_filter_vector; std::string exodusMesh = "foo.exo"; exodusiiReader->SetFileName(exodusMesh.c_str()); exodusiiReader->Update(); // get the metadata from the mesh: exodusiiReader->UpdateInformation(); // read in the element blocks, make a surface filter for each, push_back into vector: for (int z = 0; z < exodusiiReader->GetNumberOfElementBlockArrays(); z++) { const char* nname = exodusiiReader->GetElementBlockArrayName(z); /* * I think my mistake is in the following line */ exodusiiReader->SetObjectArrayStatus(exodusiiReader->ELEM_BLOCK, nname, 1); exodusiiReader->Update(); Instantiate( surfaceFilter,vtkDataSetSurfaceFilter ); Instantiate( MultiBlockData, vtkMultiBlockDataSet ); Instantiate( DataObject, vtkDataObject ); MultiBlockData = exodusiiReader->GetOutput(); DataObject= MultiBlockData->GetBlock(0); /* * everything below here should be fine (except the DataObject generated above isn't correct). * it works when I just send it the whole mesh */ #if VTK_MAJOR_VERSION <= 5 surfaceFilter->SetInput(DataObject); #else surfaceFilter->SetInputData(DataObject); #endif surfaceFilter->Update(); element_blocks_surface_filter_vector.push_back(surfaceFilter->GetOutput()); } Any information about what I'm doing wrong above would be greatly appreciated. Thanks! Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From jds0447 at unt.edu Fri Dec 12 23:22:11 2014 From: jds0447 at unt.edu (abstracted) Date: Fri, 12 Dec 2014 21:22:11 -0700 (MST) Subject: [vtkusers] Writing to STL with color. Message-ID: <1418444531802-5729834.post@n5.nabble.com> A project I am working on requires that a mesh that is generated from vtk primitives get saved to an STL file. This is easy enough, but I need the (binary) stl to be saved with colors. Is this possible? This appears particularly cumbersome since PolyData does not contain color data, but the actor usually does. Thanks, Jesse -- View this message in context: http://vtk.1045678.n5.nabble.com/Writing-to-STL-with-color-tp5729834.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Sat Dec 13 00:26:46 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 12 Dec 2014 22:26:46 -0700 Subject: [vtkusers] Writing to STL with color. In-Reply-To: <1418444531802-5729834.post@n5.nabble.com> References: <1418444531802-5729834.post@n5.nabble.com> Message-ID: On Fri, Dec 12, 2014 at 9:22 PM, abstracted wrote: > A project I am working on requires that a mesh that is generated from vtk > primitives get saved to an STL file. > > This is easy enough, but I need the (binary) stl to be saved with colors. > Is > this possible? > Not possible, because the STL file format only stores geometry. It doesn't store colors. > This appears particularly cumbersome since PolyData does not contain color > data, but the actor usually does. > The polydata can contain color data, and there are various ways of adding color data to the polydata. In fact, the default behavior in VTK is that the actor color (more precisely the vtkProperty color) is only used when the polydata itself provides no color. But, of course, any color data is lost if the data is saved in an STL file, since STL has no support for color. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From kosmonaffft at gmail.com Sat Dec 13 13:36:29 2014 From: kosmonaffft at gmail.com (Anton V. Kirilchik) Date: Sun, 14 Dec 2014 01:36:29 +0700 Subject: [vtkusers] VTK chart - how to change axis label position? Message-ID: Hello all... Is it possible to change axis labels positions in the VTK chart as painted on the picture: http://hsto.org/files/94f/41a/b18/94f41ab1897a4bde815644bf287b4af9.png ? If it possibly, how? -- Best regards, Anton Kirilchik E-mail: kosmonaFFFt at gmail.com Skype: kosmonaFFFt.kav -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Mon Dec 15 05:26:30 2014 From: vsh at magellium.fr (Vincent32160) Date: Mon, 15 Dec 2014 03:26:30 -0700 (MST) Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: References: <1418118858054-5729719.post@n5.nabble.com> <1418204380250-5729771.post@n5.nabble.com> <1418310907835-5729796.post@n5.nabble.com> <1418319909607-5729805.post@n5.nabble.com> <1418324342110-5729808.post@n5.nabble.com> Message-ID: <1418639190843-5729849.post@n5.nabble.com> I said a pyramid but my thought was a triangular prism. Anyway, any progress in the tests? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729849.html Sent from the VTK - Users mailing list archive at Nabble.com. From jhlegarreta at vicomtech.org Mon Dec 15 06:18:20 2014 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Mon, 15 Dec 2014 12:18:20 +0100 Subject: [vtkusers] [VTK] Creating an OS X bundle for a VTK example using Qt Message-ID: Hi there, we are having some trouble when trying to create an OS X bundle of an imaging software of our own that uses ITK, VTK and Qt. We are using VTK 6.1.0 and Qt 5.3.2. And our OS X is Yosemite (10.10). In order to track the problem down, we tried to generate such a bundle for one of the examples of VTK that uses Qt: QtVTKRenderWindows. The modified CMakeLists.txt is attached. We found that there seems to be a bug filed in kitware's CMake project in mantis [1]. It dates back to 2013. It seems to be still open. I am posting below the errors we get when trying to run our *.app just in case they are of any help. Is this a problem strictly related to CMake, or either VTK or either Qt for OS X platforms? Does anybody know how to solve this issue? Thank you, JON HAITZ [1] http://public.kitware.com/Bug/view.php?id=14365 [-] Error trace: When executing the *.app, the application crashes, and OS X's crash report shows this message (this is just the beginning): Process: QtVTKRenderWindows [17872] Path: /Users/USER/Desktop/QtVTKRenderWindows.app/Contents/MacOS/QtVTKRenderWindows Identifier: QtVTKRenderWindows Version: ??? (???) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: QtVTKRenderWindows [17872] User ID: 501 Date/Time: 2014-12-15 10:30:23.381 +0100 OS Version: Mac OS X 10.10.1 (14B25) Report Version: 11 Anonymous UUID: E9092016-A746-70A3-34F4-DC5791286273 Sleep/Wake UUID: BAEA81DE-427D-44D8-BA6D-0189EBDA3FFD Time Awake Since Boot: 42000 seconds Time Since Wake: 5500 seconds Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Application Specific Information: abort() called Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff89fc9282 __pthread_kill + 10 1 libsystem_c.dylib 0x00007fff8f9bab73 abort + 129 2 QtCore 0x00000001084a6649 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9 3 QtCore 0x00000001084a7af1 QMessageLogger::fatal(char const*, ...) const + 161 4 QtGui 0x0000000108ade948 QGuiApplicationPrivate::createPlatformIntegration() + 5672 5 QtGui 0x0000000108ade96b QGuiApplicationPrivate::createEventDispatcher() + 27 6 QtCore 0x00000001086ccc41 QCoreApplication::init() + 113 7 QtCore 0x00000001086ccbb7 QCoreApplication::QCoreApplication(QCoreApplicationPrivate&) + 39 8 QtGui 0x0000000108adc08e QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) + 14 9 QtWidgets 0x0000000109085aae QApplication::QApplication(int&, char**, int) + 206 10 0x0000000106c06c2c main + 60 11 libdyld.dylib 0x00007fff948c85c9 start + 1 If we try to execute the *.app from the command line, the error displayed reads: MAC0001-D:Desktop usuario$ open QtVTKRenderWindows.app LSOpenURLsWithRole() failed with error -10810 for the file /Users/usuario/Desktop/QtVTKRenderWindows.app. MAC0001-D:Desktop usuario$ QtVTKRenderWindows.app/Contents/MacOS/QtVTKRenderWindows This application failed to start because it could not find or load the Qt platform plugin "cocoa". Reinstalling the application may fix this problem. Abort trap: 6 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- project(QtVTKRenderWindows) cmake_minimum_required(VERSION 2.6) if(POLICY CMP0020) cmake_policy(SET CMP0020 NEW) endif() find_package(VTK COMPONENTS vtkCommonCore vtkFiltersSources vtkGUISupportQt vtkIOImage vtkInteractionImage ) include(${VTK_USE_FILE}) if("${VTK_QT_VERSION}" STREQUAL "") message(FATAL_ERROR "VTK was not built with Qt") endif() # Set your files and resources here set( Srcs QtVTKRenderWindowsApp.cxx QtVTKRenderWindows.cxx) set( Hdrs QtVTKRenderWindows.h ) set( MOC_Hdrs QtVTKRenderWindows.h ) set( UIs QtVTKRenderWindows.ui ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) INCLUDE(BundleUtilities) if(VTK_QT_VERSION VERSION_GREATER "4") find_package(Qt5Widgets REQUIRED QUIET) qt5_wrap_ui(UI_Srcs ${UIs}) # CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped. add_executable(QtVTKRenderWindows MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs}) qt5_use_modules(QtVTKRenderWindows Core Gui Widgets) target_link_libraries(QtVTKRenderWindows ${VTK_LIBRARIES}) else() find_package(Qt4 REQUIRED) include(${QT_USE_FILE}) # Use what VTK built with set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "") set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "") set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "") qt4_wrap_ui(UI_Srcs ${UIs}) add_executable(QtVTKRenderWindows ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs}) target_link_libraries(QtVTKRenderWindows ${QT_LIBRARIES} ${VTK_LIBRARIES}) endif() SET(BU_CHMOD_BUNDLE_ITEMS TRUE) FIXUP_BUNDLE(/Users/emedica/Development/Binaries/VTK6_git_unix_Qt5/bin/QtVTKRenderWindows.app "" "${QT_INSTALL_PREFIX}/bin") VERIFY_BUNDLE_PREREQUISITES(/Users/emedica/Development/Binaries/VTK6_git_unix_Qt5/bin/QtVTKRenderWindows.app QtVTKRenderWindows_BUNDLE_PREREQUISITES QtVTKRenderWindows_BUNDLE_PREREQUISITES_INFO) MESSAGE(WARNING "QtVTKRenderWindows_BUNDLE_PREREQUISITES:${QtVTKRenderWindows_BUNDLE_PREREQUISITES}(${QtVTKRenderWindows_BUNDLE_PREREQUISITES_INFO})") From work2compilation at gmail.com Mon Dec 15 07:45:42 2014 From: work2compilation at gmail.com (dev) Date: Mon, 15 Dec 2014 05:45:42 -0700 (MST) Subject: [vtkusers] Anti aliasing does not work on MAC VTK 5.10 Message-ID: <1418647542719-5729852.post@n5.nabble.com> Dear VTK users; I'm using VTK5.10 version on MAC. I noticed that the antialising is not Set ON mac by default. I came across this conclusion because I use my application in Windows too, and the result looks very different: The antialising is ON (the results are attached comparison between MAC and windows antialiasing) I looked on source code but I didn't find that in mac we have to set the multisampling (the anti-aliasing) by default to 0. Any hints please? Thank you in advance -- View this message in context: http://vtk.1045678.n5.nabble.com/Anti-aliasing-does-not-work-on-MAC-VTK-5-10-tp5729852.html Sent from the VTK - Users mailing list archive at Nabble.com. From work2compilation at gmail.com Mon Dec 15 07:48:04 2014 From: work2compilation at gmail.com (dev) Date: Mon, 15 Dec 2014 05:48:04 -0700 (MST) Subject: [vtkusers] Anti aliasing does not work on MAC VTK 5.10 In-Reply-To: <1418647542719-5729852.post@n5.nabble.com> References: <1418647542719-5729852.post@n5.nabble.com> Message-ID: <1418647684333-5729853.post@n5.nabble.com> It seems that someone faced the same problem as me. just find this post: http://vtk.1045678.n5.nabble.com/OS-X-MultiSamples-td5722495.html Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Anti-aliasing-does-not-work-on-MAC-VTK-5-10-tp5729852p5729853.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon Dec 15 10:09:41 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 15 Dec 2014 08:09:41 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: <1418639190843-5729849.post@n5.nabble.com> References: <1418118858054-5729719.post@n5.nabble.com> <1418204380250-5729771.post@n5.nabble.com> <1418310907835-5729796.post@n5.nabble.com> <1418319909607-5729805.post@n5.nabble.com> <1418324342110-5729808.post@n5.nabble.com> <1418639190843-5729849.post@n5.nabble.com> Message-ID: I've attached a python example that unwraps the VTK head CT dataset, and then displays the result as an image slice. It seems to work as intended. - David On Mon, Dec 15, 2014 at 3:26 AM, Vincent32160 wrote: > > I said a pyramid but my thought was a triangular prism. > Anyway, any progress in the tests? > Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CylindricalReslice.py Type: text/x-python Size: 2870 bytes Desc: not available URL: From david.gobbi at gmail.com Mon Dec 15 11:20:47 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 15 Dec 2014 09:20:47 -0700 Subject: [vtkusers] Fixing vtkPolyDataToImageStencil In-Reply-To: <1417717076869-5729685.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> <1417709842689-5729677.post@n5.nabble.com> <1417717076869-5729685.post@n5.nabble.com> Message-ID: Hi Ricardo, Just a quick note, there was another bug with vtkPolyDataToImageStencil (caused as a result of my fixes to earlier bugs). The fix for this new bug was merged just last week: http://review.source.kitware.com/#/c/18392/ - David On Thu, Dec 4, 2014 at 11:17 AM, Ricardo A Corredor wrote: > > > Well, actually it seems that it doesn't happen with every polydata or > polyline. I have some similar polylines and it works as it should; others > that has not the same result. Let me verify and I will share with you the > cases where it has this behavior. > > RaC -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaoyi.cn at gmail.com Mon Dec 15 21:49:59 2014 From: gaoyi.cn at gmail.com (Yi Gao) Date: Mon, 15 Dec 2014 21:49:59 -0500 Subject: [vtkusers] errors when intalling VTK-6.1.0 In-Reply-To: <4e3fe0fc.9b90.149976ce7ef.Coremail.llz.leephi@163.com> References: <4e3fe0fc.9b90.149976ce7ef.Coremail.llz.leephi@163.com> Message-ID: what's the gcc/g++ version you are using? try gcc -v and g++ -v if they are 4.4.7, you may need a newer compiler. If they are higher like 4.7.*, or 4.8.* then it may be the problem that the compiler cmake is pointing to: the /usr/bin/cc and /usr/bin/c++ are older (4.4.7) although you do have newer compiler on the system. This happens often when you are on a server/workstation where you use "module load gcc" to load higher version of gcc/g++. However, the /usr/bin/cc and /usr/bin/c++ are still of lower version, which come with the system. HTH Best, yi On Sun, Nov 9, 2014 at 8:58 PM, ??? wrote: > > Hi everyone: > I've made a dir VTK-build in the same dir of VTK-6.1.0, and type the > following orders: > > ccmkae ../VTK-6.1.0 > make > make intall > > However, when execute the "make", I met the following errors: > 1 [ 0%] Built target VTKData > 2 [ 0%] Building CXX object > Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Directory.cxx.o > 3 In file included from > /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h:60, > 4 from > /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:66, > 5 from > /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/char_traits.h:41, > 6 from > /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/string:42, > 7 from > /vol-th/home/liff/local/VTK-build/Utilities/KWSys/vtksys/stl/string:36, > 8 from > /vol-th/home/liff/local/VTK-build/Utilities/KWSys/vtksys/Encoding.hxx:16, > 9 from > /vol-th/home/liff/local/VTK-6.1.0/Utilities/KWSys/vtksys/Directory.cxx:17: > 10 > /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h:88: > error: ????ize_t????has not been declared > 11 > /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h: > In function ????oid std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])???? > 12 > /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h:92: > error: ????ize_t????was not declared in this scope > 13 > /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h:92: > error: expected ????????before ????_n??~Y > 14 > /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h:92: > error: ????_n????was not declared in this scope > > Do you know how to solve the problem? I've been confursed for several > day, and thank you very much for helping. > > From Floria @ NSCC-TJ > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please 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 msandro_rocha at hotmail.com Tue Dec 16 07:11:02 2014 From: msandro_rocha at hotmail.com (=?Windows-1252?B?TeFyaW8gU2FuZHJvIFJvY2hh?=) Date: Tue, 16 Dec 2014 12:11:02 +0000 Subject: [vtkusers] How to remove a texture from an actor Message-ID: Hi, I have a python/VTK application with many views, and a large number of actors in each one of them. In its first version, all the data were loaded to the memory at once, during the initialization of the program. But as the amount of data became too large, the program started to crash with the message: ?This application has requested the Runtime to terminate in an unusual way.? To solve the problem, I decided to remove all the unnecessary actors from the scene, instead of make them invisible. Most of these actors have textures and balloon widgets attached to them. Thus, when a simply use the command ?ren.RemoveActor([actor name])?, the actors in fact disappears, but some garbage still remain in the memory, and produce the same crash. I think that this happens because the balloon widget and texture attached to the actor must be removed before removing the actor. Currently, my problem is that I cannot find a way to remove the textures from my actors. I tried ?RemoveAllTextures()?, but it doesn?t work. Could someone help me with this issue? Thanks in advance. M?rio Sandro. -------------- next part -------------- An HTML attachment was scrubbed... URL: From asinghmlists at gmail.com Tue Dec 16 14:24:27 2014 From: asinghmlists at gmail.com (Ashish Singh) Date: Wed, 17 Dec 2014 00:54:27 +0530 Subject: [vtkusers] sharing texture between multiple vtkRenderWindows Message-ID: Hi, How do we correctly share texture between multiple vtkRenderWindows? Do we do this using wglShareLists? I see an old related post as below, but could not find a solution. http://public.kitware.com/pipermail/arb/2010-May/000094.html Can anyone please help? Thanks, Ashish -------------- next part -------------- An HTML attachment was scrubbed... URL: From ricardo.c.r.santos at gmail.com Tue Dec 16 18:08:22 2014 From: ricardo.c.r.santos at gmail.com (Ricardo Santos) Date: Tue, 16 Dec 2014 21:08:22 -0200 Subject: [vtkusers] STL and vtkPolyData in Python Message-ID: Hello everyone! I am having a little bit of a hard time trying to save a vtkPolyData to a stl file using Python. My main problem is that vtkSTLWriter needs a input that I can't find in vtkPolyData. The relevant code is as follows: stlWriter = vtk.vtkSTLWriter() stlWriter.SetFileName("test.stl") stlWriter.SetInput(trianglePolyData) //also used stlWriter.SetInputPort(trianglePolyData) and it has not worked stlWriter.Write() Does anyone know how I could save the STL file? Ricardo Santos -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Dec 16 18:19:03 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 16 Dec 2014 16:19:03 -0700 Subject: [vtkusers] STL and vtkPolyData in Python In-Reply-To: References: Message-ID: Hi Ricardo, The code you sent in your email should work fine if "trianglePolyData" is a vtkPolyData. So my best guess is that it isn't a vtkPolyData. Try this: print trianglePolyData.GetClassName() - David On Tue, Dec 16, 2014 at 4:08 PM, Ricardo Santos < ricardo.c.r.santos at gmail.com> wrote: > > Hello everyone! > > I am having a little bit of a hard time trying to save a vtkPolyData > to a stl file using Python. My main problem is that vtkSTLWriter needs a > input that I can't find in vtkPolyData. > > The relevant code is as follows: > > stlWriter = vtk.vtkSTLWriter() > > stlWriter.SetFileName("test.stl") > > stlWriter.SetInput(trianglePolyData) //also used > stlWriter.SetInputPort(trianglePolyData) and it has not worked > > stlWriter.Write() > > > Does anyone know how I could save the STL file? > > > Ricardo Santos > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekyaya at gmail.com Tue Dec 16 20:09:11 2014 From: ekyaya at gmail.com (Erkang Cheng) Date: Tue, 16 Dec 2014 17:09:11 -0800 Subject: [vtkusers] add keypress event in vtkSeedWidget Message-ID: Hi all, I am playing with the vtkSeedWidget example, which is available from: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/SeedWidget I am stuck at how to add kepress event. I tried to add seedWidget->AddObserver(vtkCommand::KeyPressEvent,seedCallback); right after the following lines: seedWidget->AddObserver(vtkCommand::PlacePointEvent,seedCallback); seedWidget->AddObserver(vtkCommand::InteractionEvent,seedCallback); Another change is in class vtkSeedCallback::Execute I add one if-else blcok to capture keypress event. virtual void Execute(vtkObject*, unsigned long event, void *calldata) { if (event == vtkCommand::KeyPressEvent) { std::cout<<"key press"< From liljoe at unm.edu Tue Dec 16 23:15:39 2014 From: liljoe at unm.edu (Joseph Butner) Date: Wed, 17 Dec 2014 04:15:39 +0000 Subject: [vtkusers] reading element blocks from exodus mesh into a vtkSurfaceFilter In-Reply-To: <1418410048377.99137@unm.edu> References: <1418410048377.99137@unm.edu> Message-ID: <1418789738969.6112@unm.edu> Hi all, I'm going to answer my own question in the hopes that it helps someone else. Note that the exodus ii format does not allow element block indices of 0 (at least when designing meshes with Trelis/Cubit), so if your mesh has indices [1, 2....n-1, n] they will correspond to indices [0, 1........n-2, n-1] in the std::vector. The following will read numbered element block node sets (in numerical order) and pass them to a vtkSurfaceFilter (in this case, a vector of surface filters): #define Instantiate(obj, class) vtkSmartPointer obj = vtkSmartPointer::New() Instantiate( exodusiiReader, vtkExodusIIReader ); std::vector > element_blocks_surface_filter_vector; std::string exodusMesh = "/path/to/mesh/mesh_name.exo"; exodusiiReader->SetFileName(exodusMesh.c_str()); exodusiiReader->Update(); exodusiiReader->UpdateInformation(); // read mesh metadata vtkCompositeDataIterator* iter = (exodusiiReader->GetOutput())->NewIterator(); iter->GoToFirstItem(); while (!iter->IsDoneWithTraversal()) { vtkDataObject* dObj = iter->GetCurrentDataObject(); Instantiate( surfaceFilter,vtkDataSetSurfaceFilter ); #if VTK_MAJOR_VERSION <= 5 surfaceFilter->SetInput(dObj); #else surfaceFilter->SetInputData(dObj); #endif surfaceFilter->Update(); element_blocks_surface_filter_vector.push_back(surfaceFilter->GetOutput()); iter->GoToNextItem(); } I hope this makes it to the net and helps others in the future. Joe ________________________________ From: vtkusers on behalf of Joseph Butner Sent: Friday, December 12, 2014 11:47 AM To: vtkusers at vtk.org Subject: [vtkusers] reading element blocks from exodus mesh into a vtkSurfaceFilter I have an exodus mesh file that contains numbered element blocks. I want to be able to determine which element block (if any) any (x, y, z) coordinate is in. To do this, I read the mesh in with vtkExodusiiMeshReader, attempt to generate a vtkSurfaceFilter for each element block, and use vtkSelectEnclosedPoints to find the element block the point is in. Unfortunately, I'm doing something wrong when reading the nodes for each element block, the data structure that is supposed to have the node coordinates seems to be empty, it throws this error: ERROR: In /home/joe/Downloads/VTK-6.1.0/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx, line 715 vtkCompositeDataPipeline (0x35181a0): Input port 1 of algorithm vtkSelectEnclosedPoints(0x1c31480) has 0 connections but is not optional. A small piece of the code I have is: #define Instantiate(obj, class) vtkSmartPointer obj = vtkSmartPointer::New() //I want to store the vtkPolyData for each element block in a vector, will be passed to vtkSelectEnclosedPoints later: std::vector > element_blocks_surface_filter_vector; std::string exodusMesh = "foo.exo"; exodusiiReader->SetFileName(exodusMesh.c_str()); exodusiiReader->Update(); // get the metadata from the mesh: exodusiiReader->UpdateInformation(); // read in the element blocks, make a surface filter for each, push_back into vector: for (int z = 0; z < exodusiiReader->GetNumberOfElementBlockArrays(); z++) { const char* nname = exodusiiReader->GetElementBlockArrayName(z); /* * I think my mistake is in the following line */ exodusiiReader->SetObjectArrayStatus(exodusiiReader->ELEM_BLOCK, nname, 1); exodusiiReader->Update(); Instantiate( surfaceFilter,vtkDataSetSurfaceFilter ); Instantiate( MultiBlockData, vtkMultiBlockDataSet ); Instantiate( DataObject, vtkDataObject ); MultiBlockData = exodusiiReader->GetOutput(); DataObject= MultiBlockData->GetBlock(0); /* * everything below here should be fine (except the DataObject generated above isn't correct). * it works when I just send it the whole mesh */ #if VTK_MAJOR_VERSION <= 5 surfaceFilter->SetInput(DataObject); #else surfaceFilter->SetInputData(DataObject); #endif surfaceFilter->Update(); element_blocks_surface_filter_vector.push_back(surfaceFilter->GetOutput()); } Any information about what I'm doing wrong above would be greatly appreciated. Thanks! Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From Rockydut at gmail.com Wed Dec 17 01:31:53 2014 From: Rockydut at gmail.com (Rockydut) Date: Tue, 16 Dec 2014 23:31:53 -0700 (MST) Subject: [vtkusers] How to get the actural cell ID from vtkAreaPicker Message-ID: <1418797913291-5729865.post@n5.nabble.com> Hello, everybody. Who knows how to get the actural cell ID from vtkAreaPicker. for example: m_Grid is a vtkUnstructuredGrid variable, which contains many cells like TETRA, HEXAHEDRON or others. I add the vtkAreaPicker in the code as left button down, and get the cells as left button up. The code in leftbuttondown function is: //GetInteractor() returns the vtkWin32RenderWindowInteractor pointer. vtkPlanes* frustum = static_cast(this->GetInteractor()->GetPicker())->GetFrustum(); VTK_CREATE(vtkExtractGeometry, extractGeometry); extractGeometry->SetImplicitFunction(frustum); extractGeometry->SetInputData(m_Grid); extractGeometry->Update(); vtkUnstructuredGrid* grid = extractGeometry->GetOutput(); Therefore, grid is the selected cells in range of mouse selection area. However, it cannot get the selected cell ids from "grid". So, how to get the original cell ids in m_Grid. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-the-actural-cell-ID-from-vtkAreaPicker-tp5729865.html Sent from the VTK - Users mailing list archive at Nabble.com. From Rockydut at gmail.com Wed Dec 17 04:58:15 2014 From: Rockydut at gmail.com (Rockydut) Date: Wed, 17 Dec 2014 02:58:15 -0700 (MST) Subject: [vtkusers] How to quickly shows the vertex id Message-ID: <1418810295339-5729866.post@n5.nabble.com> I use the vtkLabeledDataMapper to shows the vertex ids. A simple code as following: VTK_CREATE(vtkLabeledDataMapper, labelMapper); labelMapper->SetInputData(poly); labelMapper->GetLabelTextProperty()->SetColor(m_txRGB); labelMapper->GetLabelTextProperty()->SetFontSize(m_txSize); However, if there are many vertex ids need to be show in text form, it is very slow. How to quickly shows the vertex ids if there are millions of vertexs. Furthermore, if the coordinates and ids are stored in a vector, such as: struct {double x, double y, double z}Coord; vector vecID; vector vecCoor; How to show the vecID in the window? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-quickly-shows-the-vertex-id-tp5729866.html Sent from the VTK - Users mailing list archive at Nabble.com. From DLRdave at aol.com Wed Dec 17 08:17:29 2014 From: DLRdave at aol.com (David Cole) Date: Wed, 17 Dec 2014 08:17:29 -0500 Subject: [vtkusers] add keypress event in vtkSeedWidget In-Reply-To: References: Message-ID: A "git grep" of the current git 'master' branch shows that only interactors and interactor styles actually invoke the KeyPress event: $ git grep -E "Invoke.*KeyPressEvent" GUISupport/Qt/QVTKInteractorAdapter.cxx: iren->InvokeEvent(vtkCommand::KeyPressEvent, e2); Interaction/Style/vtkInteractorStyleUser.cxx: this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); Rendering/Core/vtkInteractorStyle.cxx: self->InvokeEvent(vtkCommand::KeyPressEvent,NULL); Rendering/Core/vtkRenderWindowInteractor.cxx: this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); Rendering/OpenGL/vtkCarbonRenderWindowInteractor.cxx: me->InvokeEvent(vtkCommand::KeyPressEvent, NULL); Rendering/OpenGL/vtkCarbonRenderWindowInteractor.cxx: me->InvokeEvent(vtkCommand::KeyPressEvent, NULL); Rendering/OpenGL/vtkCarbonRenderWindowInteractor.cxx: me->InvokeEvent(vtkCommand::KeyPressEvent, NULL); Rendering/OpenGL/vtkWin32RenderWindowInteractor.cxx: this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); Rendering/OpenGL/vtkXRenderWindowInteractor.cxx: me->InvokeEvent(vtkCommand::KeyPressEvent, NULL); Rendering/OpenGL2/vtkAndroidRenderWindowInteractor.cxx: this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); Rendering/OpenGL2/vtkWin32OpenGLRenderWindowInteractor.cxx: this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); Rendering/OpenGL2/vtkXOpenGLRenderWindowInteractor.cxx: me->InvokeEvent(vtkCommand::KeyPressEvent, NULL); You will have to call AddObserver on the render window interactor, or the current interactor style in order to receive the KeyPress event. HTH, David C. On Tue, Dec 16, 2014 at 8:09 PM, Erkang Cheng wrote: > Hi all, > > I am playing with the vtkSeedWidget example, which is available from: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/SeedWidget > > I am stuck at how to add kepress event. > > I tried to add > seedWidget->AddObserver(vtkCommand::KeyPressEvent,seedCallback); > > right after the following lines: > seedWidget->AddObserver(vtkCommand::PlacePointEvent,seedCallback); > seedWidget->AddObserver(vtkCommand::InteractionEvent,seedCallback); > > > Another change is in class vtkSeedCallback::Execute > I add one if-else blcok to capture keypress event. > > virtual void Execute(vtkObject*, unsigned long event, void *calldata) > { > if (event == vtkCommand::KeyPressEvent) > { > std::cout<<"key press"< } > > ... > > } > > > However, the widget can not capture keypress event. > > Could anyone share the idea to add customized event in vtkSeedWidget? > 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 > From ekyaya at gmail.com Wed Dec 17 13:20:41 2014 From: ekyaya at gmail.com (Erkang Cheng) Date: Wed, 17 Dec 2014 10:20:41 -0800 Subject: [vtkusers] add keypress event in vtkSeedWidget In-Reply-To: References: Message-ID: Hi David, Great. It works. Thanks for the help. BTW, Here is the detail. I add another observer using render window interactor. renderWindowInteractor->AddObserver(vtkCommand::KeyPressEvent, seedCallback); Then add if-else block in the callback: if (event == vtkCommand::KeyPressEvent) { std::cout<<"key press"< wrote: > > A "git grep" of the current git 'master' branch shows that only > interactors and interactor styles actually invoke the KeyPress event: > > $ git grep -E "Invoke.*KeyPressEvent" > GUISupport/Qt/QVTKInteractorAdapter.cxx: > iren->InvokeEvent(vtkCommand::KeyPressEvent, e2); > Interaction/Style/vtkInteractorStyleUser.cxx: > this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); > Rendering/Core/vtkInteractorStyle.cxx: > self->InvokeEvent(vtkCommand::KeyPressEvent,NULL); > Rendering/Core/vtkRenderWindowInteractor.cxx: > this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); > Rendering/OpenGL/vtkCarbonRenderWindowInteractor.cxx: > me->InvokeEvent(vtkCommand::KeyPressEvent, NULL); > Rendering/OpenGL/vtkCarbonRenderWindowInteractor.cxx: > me->InvokeEvent(vtkCommand::KeyPressEvent, NULL); > Rendering/OpenGL/vtkCarbonRenderWindowInteractor.cxx: > me->InvokeEvent(vtkCommand::KeyPressEvent, NULL); > Rendering/OpenGL/vtkWin32RenderWindowInteractor.cxx: > this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); > Rendering/OpenGL/vtkXRenderWindowInteractor.cxx: > me->InvokeEvent(vtkCommand::KeyPressEvent, NULL); > Rendering/OpenGL2/vtkAndroidRenderWindowInteractor.cxx: > this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); > Rendering/OpenGL2/vtkWin32OpenGLRenderWindowInteractor.cxx: > this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); > Rendering/OpenGL2/vtkXOpenGLRenderWindowInteractor.cxx: > me->InvokeEvent(vtkCommand::KeyPressEvent, NULL); > > You will have to call AddObserver on the render window interactor, or > the current interactor style in order to receive the KeyPress event. > > > HTH, > David C. > > > > On Tue, Dec 16, 2014 at 8:09 PM, Erkang Cheng wrote: > > Hi all, > > > > I am playing with the vtkSeedWidget example, which is available from: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/SeedWidget > > > > I am stuck at how to add kepress event. > > > > I tried to add > > seedWidget->AddObserver(vtkCommand::KeyPressEvent,seedCallback); > > > > right after the following lines: > > seedWidget->AddObserver(vtkCommand::PlacePointEvent,seedCallback); > > seedWidget->AddObserver(vtkCommand::InteractionEvent,seedCallback); > > > > > > Another change is in class vtkSeedCallback::Execute > > I add one if-else blcok to capture keypress event. > > > > virtual void Execute(vtkObject*, unsigned long event, void *calldata) > > { > > if (event == vtkCommand::KeyPressEvent) > > { > > std::cout<<"key press"< > } > > > > ... > > > > } > > > > > > However, the widget can not capture keypress event. > > > > Could anyone share the idea to add customized event in vtkSeedWidget? > > 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 pilato at deepsoft.com.br Wed Dec 17 14:29:37 2014 From: pilato at deepsoft.com.br (Marcos Pilato Jr.) Date: Wed, 17 Dec 2014 17:29:37 -0200 Subject: [vtkusers] Issue with vtkPolyDataNormals + vtkRuledSurfaceFilter (ActiViz + x86) Message-ID: Hello I am developing a software that allows you to enable and disable the display of some data. In practice what we do is add and remove the actor in accordance with the user's wishes. This mechanism works perfectly for most data. However, in a few moments for a certain kind of data the actor is not displayed (even having added correctly). In our tests we observed the following: 1. the problem occurs only on x86. In x64 works perfectly. 2. the problematic data uses a combination of vtkRuledSurfaceFilter + vtkPolyDataNormals. If we remove the vtkPolyDataNormals the problem disappears. Our project is developed using ActiViz.NET, which uses the version 5.8.0 VTK . Has anyone ever seen this before? Can you help me? Thank you! Marcos Pilato Jr, M.Sc. ----- -------------- next part -------------- An HTML attachment was scrubbed... URL: From piccima at gmail.com Wed Dec 17 14:41:26 2014 From: piccima at gmail.com (marco) Date: Wed, 17 Dec 2014 14:41:26 -0500 Subject: [vtkusers] Extract color from mesh Message-ID: <5491DC66.9050500@gmail.com> Hello, I'm using intersectWithLine method to obtain the intersection point of a ray with a mesh. I'm using the point coordinate and the cellId for further analysis. Since I have the labels as a RGB color I need to get the color information from that point. I found different examples how to read the array names but there is something strange with the files that I'm using, I get: ./FindAllArrayNames 120_F_W1_M0.obj Normals: 0 Number of PointData arrays: 1 Number of CellData arrays: 0 Type table/key: 3 unsigned char 7 unsigned int 10 float 11 double Array 0: But I can visualize in meshlab the colored mesh! Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From beekmaarten at yahoo.com Wed Dec 17 14:53:11 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Wed, 17 Dec 2014 19:53:11 +0000 (UTC) Subject: [vtkusers] Writing multi-paged tiff image Message-ID: <2031579935.239611.1418845991585.JavaMail.yahoo@jws10096.mail.ne1.yahoo.com> Hi all, I am able to load a multi-paged tiff file using vtkTiffReader (scalar type: unsigned short). However I am not so lucky when I am trying to save this image using vtkTiffWriter. What would be my options? Thanks - Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Dec 17 15:26:03 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 17 Dec 2014 13:26:03 -0700 Subject: [vtkusers] Writing multi-paged tiff image In-Reply-To: <2031579935.239611.1418845991585.JavaMail.yahoo@jws10096.mail.ne1.yahoo.com> References: <2031579935.239611.1418845991585.JavaMail.yahoo@jws10096.mail.ne1.yahoo.com> Message-ID: This question comes up from time to time. The vtkTIFFWriter doesn't write multi-page files. - David On Wed, Dec 17, 2014 at 12:53 PM, Maarten Beek via vtkusers < vtkusers at vtk.org> wrote: > > Hi all, > > I am able to load a multi-paged tiff file using vtkTiffReader (scalar > type: unsigned short). > > However I am not so lucky when I am trying to save this image using > vtkTiffWriter. What would be my options? > > Thanks - Maarten > -------------- next part -------------- An HTML attachment was scrubbed... URL: From beekmaarten at yahoo.com Wed Dec 17 16:10:22 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Wed, 17 Dec 2014 21:10:22 +0000 (UTC) Subject: [vtkusers] Writing multi-paged tiff image In-Reply-To: References: Message-ID: <1798674857.265512.1418850622989.JavaMail.yahoo@jws10049.mail.ne1.yahoo.com> Hi David, Sorry, I'll try to remember. I did search the internet but couldn't find a clear answer. I am a bit confused though, because vtkTiffReader reads multi-page tiffs fine. What is preventing a multi-page writer? What are my options in vtk? What writers do write 3d images? Does a tool exist that puts multiple tiffs in one multi-page tiff? Thanks - Maarten On Wednesday, December 17, 2014 3:31 PM, David Gobbi wrote: This question comes up from time to time.? The vtkTIFFWriter doesn't write multi-page files. ?- David On Wed, Dec 17, 2014 at 12:53 PM, Maarten Beek via vtkusers wrote: Hi all, I am able to load a multi-paged tiff file using vtkTiffReader (scalar type: unsigned short). However I am not so lucky when I am trying to save this image using vtkTiffWriter. What would be my options? Thanks - Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Dec 17 16:29:46 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 17 Dec 2014 14:29:46 -0700 Subject: [vtkusers] Writing multi-paged tiff image In-Reply-To: <1798674857.265512.1418850622989.JavaMail.yahoo@jws10049.mail.ne1.yahoo.com> References: <1798674857.265512.1418850622989.JavaMail.yahoo@jws10049.mail.ne1.yahoo.com> Message-ID: On Wed, Dec 17, 2014 at 2:10 PM, Maarten Beek wrote: > > Hi David, > > Sorry, I'll try to remember. I did search the internet but couldn't find a > clear answer. > > I am a bit confused though, because vtkTiffReader reads multi-page tiffs > fine. What is preventing a multi-page writer? > All that's missing is someone with the need to write multi-page files, who is willing to modify the writer so that it writes multi-page files! It isn't a trivial project, because there are at least three different semi-standard ways of storing 3D data in TIFF, and they aren't entirely compatible with one another. Even with the reader, multi-page files were troublesome for a long time, because it could read some 3D files but not others (again, because TIFF has several semi-standard ways of storing 3D data). TIFF was not initially designed to handle 3D, and all the ways of making it work with 3D are a bit hackish. What are my options in vtk? What writers do write 3d images? Does a tool > exist that puts multiple tiffs in one multi-page tiff? > Well, right now NIFTI is my favorite 3D image format. I don't use TIFF much, so I don't know what TIFF tools are available. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From beekmaarten at yahoo.com Wed Dec 17 16:42:58 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Wed, 17 Dec 2014 21:42:58 +0000 (UTC) Subject: [vtkusers] Writing multi-paged tiff image In-Reply-To: References: Message-ID: <1753494233.279674.1418852578037.JavaMail.yahoo@jws10030.mail.ne1.yahoo.com> Thanks for your reply David, I would like to write multi-page tiffs, but I might not be smart enough. I see one tiff file with all images stitched together in a long column, so I am thinking of a missing page return or something. But I guess that's a over-simplification ;-) vtkImageWriter works fine as long as I remember the extent, spacing and origin. Last year I saw multi-page tiff phloro images, now I see multi-page tiff ct data; maybe vtktiffwriter will be 3d capable some day.... Maarten On Wednesday, December 17, 2014 4:30 PM, David Gobbi wrote: On Wed, Dec 17, 2014 at 2:10 PM, Maarten Beek wrote: Hi David, Sorry, I'll try to remember. I did search the internet but couldn't find a clear answer. I am a bit confused though, because vtkTiffReader reads multi-page tiffs fine. What is preventing a multi-page writer? All that's missing is someone with the need to write multi-page files, who is willing to modify the writer so that it writes multi-page files!? It isn't a trivial project, because there are at least three different semi-standard ways of storing 3D data in TIFF, and they aren't entirely compatible with one another. Even with the reader, multi-page files were troublesome for a long time, because it could read some 3D files but not others (again, because TIFF has ?several semi-standard ways of storing 3D data).? TIFF was not initially designed to handle 3D, and all the ways of making it work with 3D are a bit hackish. What are my options in vtk? What writers do write 3d images? Does a tool exist that puts multiple tiffs in one multi-page tiff? Well, right now NIFTI is my favorite 3D image format.? I don't use TIFF much, so I don't know what TIFF tools are available. ? ?- David? -------------- next part -------------- An HTML attachment was scrubbed... URL: From piccima at gmail.com Wed Dec 17 16:52:36 2014 From: piccima at gmail.com (marco) Date: Wed, 17 Dec 2014 16:52:36 -0500 Subject: [vtkusers] Extract color from mesh In-Reply-To: <5491DC66.9050500@gmail.com> References: <5491DC66.9050500@gmail.com> Message-ID: <5491FB24.3060106@gmail.com> Some updates: Since the texture is on the mtl file I don't have texture on the loaded file :( What options I can explore to export the texture and map on the mesh? Marco On 12/17/2014 02:41 PM, marco wrote: > Hello, > I'm using intersectWithLine method to obtain the intersection point of > a ray with a mesh. I'm using the point coordinate and the cellId for > further analysis. > Since I have the labels as a RGB color I need to get the color > information from that point. > I found different examples how to read the array names but there is > something strange with the files that I'm using, I get: > > ./FindAllArrayNames 120_F_W1_M0.obj > Normals: 0 > Number of PointData arrays: 1 > Number of CellData arrays: 0 > Type table/key: > 3 unsigned char > 7 unsigned int > 10 float > 11 double > Array 0: > > But I can visualize in meshlab the colored mesh! > > Marco > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Thu Dec 18 04:36:31 2014 From: vsh at magellium.fr (Vincent32160) Date: Thu, 18 Dec 2014 02:36:31 -0700 (MST) Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: References: <1418204380250-5729771.post@n5.nabble.com> <1418310907835-5729796.post@n5.nabble.com> <1418319909607-5729805.post@n5.nabble.com> <1418324342110-5729808.post@n5.nabble.com> <1418639190843-5729849.post@n5.nabble.com> Message-ID: <1418895391359-5729877.post@n5.nabble.com> Thanks for this, very helpful. I have two questions: what is the difference between radialSize and r? Should I change the OutputOrigin of reslice to unroll a cylinder which has a center different from (0,0,0)? Thanks again -- View this message in context: http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729877.html Sent from the VTK - Users mailing list archive at Nabble.com. From schlifkowitz at intales.com Thu Dec 18 05:24:35 2014 From: schlifkowitz at intales.com (Uwe Schlifkowitz) Date: Thu, 18 Dec 2014 11:24:35 +0100 Subject: [vtkusers] vtkBandedPolyDataContourFilter and scalars on cells Message-ID: <5492AB63.1030309@intales.com> Hi, I need to create something like a vtkBandedPolyDataContourFilter using cell data instead of point data. To clarify, here is the example from http://vtk.org/Wiki/VTK/Examples/Cxx/VisualizationAlgorithms/BandedPolyDataContourFilter translated to Python (see below). Essentially, I want to use something like polyData.GetCellData().SetScalars(scalars) instead of polyData.GetPointData().SetScalars(scalars) around line 80, but this results in the following error later in the code: ERROR: In /build/buildd/vtk6-6.0.0/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 232 vtkBandedPolyDataContourFilter (0x2cbc5d0): No input data! Does anyone know a solution or maybe a better way to achieve what I want? I'm using python-vtk6 on Ubuntu 14.04. Thanks, Uwe #!/usr/bin/env python import sys import vtk def main(): pts = vtk.vtkPoints() pts.InsertPoint(0, 0, 0, 0) pts.InsertPoint(1, 0, 1, 0) pts.InsertPoint(2, 0, 2, 0) pts.InsertPoint(3, 1, 0, 0) pts.InsertPoint(4, 1, 1, 0) pts.InsertPoint(5, 1, 2, 0) pts.InsertPoint(6, 2, 0, 0) pts.InsertPoint(7, 2, 2, 0) pts.InsertPoint(8, 3, 0, 0) pts.InsertPoint(9, 3, 1, 0) pts.InsertPoint(10, 3, 2, 0) pts.InsertPoint(11, 4, 0, 0) pts.InsertPoint(12, 6, 0, 0) pts.InsertPoint(13, 5, 2, 0) pts.InsertPoint(14, 7, 0, 0) pts.InsertPoint(15, 9, 0, 0) pts.InsertPoint(16, 7, 2, 0) pts.InsertPoint(17, 9, 2, 0) pts.InsertPoint(18, 10, 0, 0) pts.InsertPoint(19, 12, 0, 0) pts.InsertPoint(20, 10, 1, 0) pts.InsertPoint(21, 12, 1, 0) pts.InsertPoint(22, 10, 2, 0) pts.InsertPoint(23, 12, 2, 0) pts.InsertPoint(24, 10, 3, 0) pts.InsertPoint(25, 12, 3, 0) polys = vtk.vtkCellArray() polys.InsertNextCell(4) polys.InsertCellPoint(14) polys.InsertCellPoint(15) polys.InsertCellPoint(17) polys.InsertCellPoint(16) polys.InsertNextCell(3) polys.InsertCellPoint(11) polys.InsertCellPoint(12) polys.InsertCellPoint(13) scalars = vtk.vtkFloatArray() scalars.SetNumberOfTuples (26) scalars.SetTuple1(0, 0) scalars.SetTuple1(1, 50) scalars.SetTuple1(2, 100) scalars.SetTuple1(3, 0) scalars.SetTuple1(4, 50) scalars.SetTuple1(5, 100) scalars.SetTuple1(6, 10) scalars.SetTuple1(7, 90) scalars.SetTuple1(8, 10) scalars.SetTuple1(9, 50) scalars.SetTuple1(10, 90) scalars.SetTuple1(11, 10) scalars.SetTuple1(12, 40) scalars.SetTuple1(13, 100) scalars.SetTuple1(14, 0) scalars.SetTuple1(15, 60) scalars.SetTuple1(16, 40) scalars.SetTuple1(17, 100) scalars.SetTuple1(18, 0) scalars.SetTuple1(19, 25) scalars.SetTuple1(20, 25) scalars.SetTuple1(21, 50) scalars.SetTuple1(22, 50) scalars.SetTuple1(23, 75) scalars.SetTuple1(24, 75) scalars.SetTuple1(25, 100) polyData = vtk.vtkPolyData() polyData.SetPoints(pts) polyData.SetPolys(polys) polyData.GetPointData().SetScalars(scalars) #polyData.GetCellData().SetScalars(scalars) # <--- i want this bf = vtk.vtkBandedPolyDataContourFilter() if vtk.VTK_MAJOR_VERSION < 6: bf.SetInput(polyData) else: bf.SetInputData(polyData) bf.GenerateValues(3, 25, 75) mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(bf.GetOutputPort()) mapper.SetScalarModeToUseCellData() mapper.SetScalarRange (0, 4) actor = vtk.vtkActor() actor.SetMapper(mapper) # Create the RenderWindow, Renderer and both Actors ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # Add the actors to the renderer, set the background and size ren1.AddActor(actor) renWin.SetSize (300 ,80) renWin.Render() ren1.GetActiveCamera().Zoom(3) renWin.Render() iren.Start() if __name__ == "__main__": sys.exit(main()) -- INTALES GmbH Engineering Solutions Uwe Schlifkowitz -- Software Engineer Innsbrucker Str. 1, A-6161 Natters Phone: +43 512 54611120 -- schlifkowitz at intales.com From amay.ms at gmail.com Thu Dec 18 05:56:43 2014 From: amay.ms at gmail.com (Amey) Date: Thu, 18 Dec 2014 03:56:43 -0700 (MST) Subject: [vtkusers] Rendering Multiresolution tiled BigTiff image using VTK... Message-ID: <1418900203462-5729879.post@n5.nabble.com> Hello, I am new to VTK. I am implementing an image viewer to render the multiresolution tiled image. The image is of very large size (cannot fit into the memory fully) and have multiple resolutions (image pyramid). Could you please provide a direction about how to achieve this using VTK? My usecase is, when user will open the file, I will show the version of the image fitting to his screen. Once user starts zooming the image, I have to fetch required tiles and display. Thank you so much for your help. -- View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-Multiresolution-tiled-BigTiff-image-using-VTK-tp5729879.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Dec 18 08:43:01 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 18 Dec 2014 06:43:01 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: <1418895391359-5729877.post@n5.nabble.com> References: <1418204380250-5729771.post@n5.nabble.com> <1418310907835-5729796.post@n5.nabble.com> <1418319909607-5729805.post@n5.nabble.com> <1418324342110-5729808.post@n5.nabble.com> <1418639190843-5729849.post@n5.nabble.com> <1418895391359-5729877.post@n5.nabble.com> Message-ID: Hi Vincent, The radialSize is the number of angular segments. If you think of your cylinder as a pie, it is the number of pie slices. The radialSize controls the angular resolution. The OutputOrigin of reslice is in cylindrical coords, so changing it will not change the center, because the center is in rectangular coordinates, not cylindrical coordinates. Here's the best way to think about this: everything in the pipeline before vtkImageReslice is in rectangular coords, and everything after vtkImageReslice (including its own output) is in cylindrical coords. If you recall, the centering is done by the vtkImageChangeInformation just after the reader. Currently it uses CenterImageOn() to automatically center the image. But you can instead call SetOutputOrigin() on vtkImageChangeInformation to set the center to anywhere that you want. (Note that SetOutputOrigin() does not directly set the center, in fact what it does is set the position of the corner of the image, which of course also controls the position of the center). A more sophisticated way of setting the center would be to create a 4x4 matrix for reslice->SetResliceAxes(). This matrix could be used to control the center and the orientation of the cylinder. I'd only recommend this if you are very familiar with 4x4 matrix transformations, however. - David On Thu, Dec 18, 2014 at 2:36 AM, Vincent32160 wrote: > > Thanks for this, very helpful. > I have two questions: what is the difference between radialSize and r? > Should I change the OutputOrigin of reslice to unroll a cylinder which has > a > center different from (0,0,0)? > Thanks again -------------- next part -------------- An HTML attachment was scrubbed... URL: From Allavali.Ballary at LntTechservices.com Thu Dec 18 08:47:32 2014 From: Allavali.Ballary at LntTechservices.com (Allavali Ballary) Date: Thu, 18 Dec 2014 13:47:32 +0000 Subject: [vtkusers] (no subject) Message-ID: <3BD743544268C04A827420A055435C93B8C178@POCITMSEXMB06.LntUniverse.com> Hi, In Dicom image how to measure distance between two points, angle multiple times. Now I can measure one time, but I need to measure multiple times. Thanks & Regards, Allavali Ballary L&T Technology Services Ltd www.LntTechservices.com This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blowekamp at mail.nih.gov Thu Dec 18 09:10:19 2014 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Thu, 18 Dec 2014 09:10:19 -0500 Subject: [vtkusers] Writing multi-paged tiff image In-Reply-To: <1753494233.279674.1418852578037.JavaMail.yahoo@jws10030.mail.ne1.yahoo.com> References: <1753494233.279674.1418852578037.JavaMail.yahoo@jws10030.mail.ne1.yahoo.com> Message-ID: <12B2ABE1-EAA7-4BC9-B7DB-7A51877FCEA8@mail.nih.gov> Hello, I have recently refactored ITK's TIFFImageIO mostly for improving reading, but it supports writing 3D images as multi-paged tiffs. You can utilized ITK ImageIO by using ITK's VTK bridge module [1]. Alternatively, you can look at ITK's implementation as see about porting it to VTK[2]. I believe the writing method still has an evident heritage from VTK. I am not a big fan for 3D tiffs because there is no standard way to store z-spacing and image origin. Brad [1] http://www.itk.org/Doxygen/html/group__ITKVTK.html [2] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/TIFF/src/itkTIFFImageIO.cxx#L504-L764 On Dec 17, 2014, at 4:42 PM, Maarten Beek via vtkusers wrote: > Thanks for your reply David, > > I would like to write multi-page tiffs, but I might not be smart enough. I see one tiff file with all images stitched together in a long column, so I am thinking of a missing page return or something. But I guess that's a over-simplification ;-) > > vtkImageWriter works fine as long as I remember the extent, spacing and origin. > > Last year I saw multi-page tiff phloro images, now I see multi-page tiff ct data; maybe vtktiffwriter will be 3d capable some day.... > > Maarten > > > On Wednesday, December 17, 2014 4:30 PM, David Gobbi wrote: > > > On Wed, Dec 17, 2014 at 2:10 PM, Maarten Beek wrote: > Hi David, > > Sorry, I'll try to remember. I did search the internet but couldn't find a clear answer. > > I am a bit confused though, because vtkTiffReader reads multi-page tiffs fine. What is preventing a multi-page writer? > > All that's missing is someone with the need to write multi-page files, who is willing to modify the writer so that it writes multi-page files! It isn't a trivial project, because there are at least three different semi-standard ways of storing 3D data in TIFF, and they aren't entirely compatible with one another. > > Even with the reader, multi-page files were troublesome for a long time, because it could read some 3D files but not others (again, because TIFF has several semi-standard ways of storing 3D data). TIFF was not initially designed to handle 3D, and all the ways of making it work with 3D are a bit hackish. > > > What are my options in vtk? What writers do write 3d images? Does a tool exist that puts multiple tiffs in one multi-page tiff? > > Well, right now NIFTI is my favorite 3D image format. I don't use TIFF much, so I don't know what TIFF tools are available. > > - 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 vsh at magellium.fr Thu Dec 18 10:17:05 2014 From: vsh at magellium.fr (Vincent32160) Date: Thu, 18 Dec 2014 08:17:05 -0700 (MST) Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: References: <1418310907835-5729796.post@n5.nabble.com> <1418319909607-5729805.post@n5.nabble.com> <1418324342110-5729808.post@n5.nabble.com> <1418639190843-5729849.post@n5.nabble.com> <1418895391359-5729877.post@n5.nabble.com> Message-ID: <1418915825397-5729892.post@n5.nabble.com> As I need to modify the angle from which the unrolling is starting I would use the sophisticated solution you advise. If I understand correctly the starting reslice axes are a 4x4 matrix (-1,0,0,center[0],0,-1,0,center[1],0,0,1,center[2],0,0,0,0). If I need to apply an angle, I could use only the 3x3 matrix (-1,0,0,0,-1,0,0,0,1). Can you tell me if I am right? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729892.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Dec 18 10:40:44 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 18 Dec 2014 08:40:44 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: <1418915825397-5729892.post@n5.nabble.com> References: <1418310907835-5729796.post@n5.nabble.com> <1418319909607-5729805.post@n5.nabble.com> <1418324342110-5729808.post@n5.nabble.com> <1418639190843-5729849.post@n5.nabble.com> <1418895391359-5729877.post@n5.nabble.com> <1418915825397-5729892.post@n5.nabble.com> Message-ID: On Thu, Dec 18, 2014 at 8:17 AM, Vincent32160 wrote: > > As I need to modify the angle from which the unrolling is starting I would > use the sophisticated solution you advise. > If I understand correctly the starting reslice axes are a 4x4 matrix > (-1,0,0,center[0],0,-1,0,center[1],0,0,1,center[2],0,0,0,0). > If I need to apply an angle, I could use only the 3x3 matrix > (-1,0,0,0,-1,0,0,0,1). > Can you tell me if I am right? > Thanks Yes, the 3x3 matrix controls the orientation of the cylinder, and the final column is where you want the center to be. However: the bottom row should always be (0,0,0,1). And I'm not sure why you put in the "-1"s. Is there a reason why you want to rotate by 180 degrees? - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From beekmaarten at yahoo.com Thu Dec 18 10:43:25 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Thu, 18 Dec 2014 15:43:25 +0000 (UTC) Subject: [vtkusers] Writing multi-paged tiff image In-Reply-To: <12B2ABE1-EAA7-4BC9-B7DB-7A51877FCEA8@mail.nih.gov> References: <12B2ABE1-EAA7-4BC9-B7DB-7A51877FCEA8@mail.nih.gov> Message-ID: <1485787823.490616.1418917405129.JavaMail.yahoo@jws100205.mail.ne1.yahoo.com> Hey Bradley, Thanks for your reply, I'll have a look at the itk code. I just have some 3d tiff ct data and after soon processing, my first thought was to just save it in its original format. Thanks for your remark re. spacing and origin; I was about to send an email to the person who gave me the ct data, to ask about this data. I now feel more confident that my code didn't screw up these numbers ;-) Maarten On Thursday, December 18, 2014 9:20 AM, Bradley Lowekamp wrote: Hello, I have recently refactored ITK's TIFFImageIO mostly for improving reading, but it supports writing 3D images as multi-paged tiffs. You can utilized ITK ImageIO by using ITK's VTK bridge module [1]. Alternatively, you can look at ITK's implementation as see about porting it to VTK[2]. I believe the writing method still has an evident heritage from VTK. I am not a big fan for 3D tiffs because there is no standard way to store z-spacing and image origin. Brad [1]?http://www.itk.org/Doxygen/html/group__ITKVTK.html[2]?https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/TIFF/src/itkTIFFImageIO.cxx#L504-L764 On Dec 17, 2014, at 4:42 PM, Maarten Beek via vtkusers wrote: Thanks for your reply David, I would like to write multi-page tiffs, but I might not be smart enough. I see one tiff file with all images stitched together in a long column, so I am thinking of a missing page return or something. But I guess that's a over-simplification ;-) vtkImageWriter works fine as long as I remember the extent, spacing and origin. Last year I saw multi-page tiff phloro images, now I see multi-page tiff ct data; maybe vtktiffwriter will be 3d capable some day.... Maarten On Wednesday, December 17, 2014 4:30 PM, David Gobbi wrote: On Wed, Dec 17, 2014 at 2:10 PM, Maarten Beek wrote: Hi David, Sorry, I'll try to remember. I did search the internet but couldn't find a clear answer. I am a bit confused though, because vtkTiffReader reads multi-page tiffs fine. What is preventing a multi-page writer? All that's missing is someone with the need to write multi-page files, who is willing to modify the writer so that it writes multi-page files!? It isn't a trivial project, because there are at least three different semi-standard ways of storing 3D data in TIFF, and they aren't entirely compatible with one another. Even with the reader, multi-page files were troublesome for a long time, because it could read some 3D files but not others (again, because TIFF has ?several semi-standard ways of storing 3D data).? TIFF was not initially designed to handle 3D, and all the ways of making it work with 3D are a bit hackish. What are my options in vtk? What writers do write 3d images? Does a tool exist that puts multiple tiffs in one multi-page tiff? Well, right now NIFTI is my favorite 3D image format.? I don't use TIFF much, so I don't know what TIFF tools are available. ? ?- 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 Thu Dec 18 10:46:47 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 18 Dec 2014 08:46:47 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: References: <1418310907835-5729796.post@n5.nabble.com> <1418319909607-5729805.post@n5.nabble.com> <1418324342110-5729808.post@n5.nabble.com> <1418639190843-5729849.post@n5.nabble.com> <1418895391359-5729877.post@n5.nabble.com> <1418915825397-5729892.post@n5.nabble.com> Message-ID: On Thu, Dec 18, 2014 at 8:40 AM, David Gobbi wrote: > > On Thu, Dec 18, 2014 at 8:17 AM, Vincent32160 wrote: >> >> As I need to modify the angle from which the unrolling is starting I would >> use the sophisticated solution you advise. >> If I understand correctly the starting reslice axes are a 4x4 matrix >> (-1,0,0,center[0],0,-1,0,center[1],0,0,1,center[2],0,0,0,0). >> If I need to apply an angle, I could use only the 3x3 matrix >> (-1,0,0,0,-1,0,0,0,1). >> Can you tell me if I am right? >> Thanks > > > Yes, the 3x3 matrix controls the orientation of the cylinder, and > the final column is where you want the center to be. > > However: the bottom row should always be (0,0,0,1). And I'm > not sure why you put in the "-1"s. Is there a reason why you want > to rotate by 180 degrees? > I can add a little bit more information about how to set the 3x3 matrix. The third column of the 3x3 matrix must be a unit vector that points along the axis of the cylinder. The first and second columns must be perpendicular to the third axis, and must be perpendicular to each other (if they aren't, then the matrix isn't a rotation matrix). The method vtkMath::Perpendiculars() can be used to compute the three columns for the 3x3 matrix, if you know the axis of the cylinder. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Thu Dec 18 11:06:19 2014 From: vsh at magellium.fr (Vincent32160) Date: Thu, 18 Dec 2014 09:06:19 -0700 (MST) Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: References: <1418319909607-5729805.post@n5.nabble.com> <1418324342110-5729808.post@n5.nabble.com> <1418639190843-5729849.post@n5.nabble.com> <1418895391359-5729877.post@n5.nabble.com> <1418915825397-5729892.post@n5.nabble.com> Message-ID: <1418918779189-5729896.post@n5.nabble.com> I put in the "-1"s because I reuse the matrix presented in your code (rotate.SetResliceAxesDirectionCosines( -1, 0, 0, 0, -1, 0, 0, 0, 1 ) ) Shouldn't I do this? -- View this message in context: http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729896.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Dec 18 11:15:36 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 18 Dec 2014 09:15:36 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: <1418918779189-5729896.post@n5.nabble.com> References: <1418319909607-5729805.post@n5.nabble.com> <1418324342110-5729808.post@n5.nabble.com> <1418639190843-5729849.post@n5.nabble.com> <1418895391359-5729877.post@n5.nabble.com> <1418915825397-5729892.post@n5.nabble.com> <1418918779189-5729896.post@n5.nabble.com> Message-ID: On Thu, Dec 18, 2014 at 9:06 AM, Vincent32160 wrote: > > I put in the "-1"s because I reuse the matrix presented in your code > (rotate.SetResliceAxesDirectionCosines( > -1, 0, 0, > 0, -1, 0, > 0, 0, 1 ) ) > Shouldn't I do this? No, this isn't something that should be blindly copied. I added those -1's because it set up the cylinder orientation properly for my data. You have different data, so you will probably need a different matrix. Does that make sense? - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From piccima at gmail.com Thu Dec 18 11:19:47 2014 From: piccima at gmail.com (marco) Date: Thu, 18 Dec 2014 11:19:47 -0500 Subject: [vtkusers] extract texture color from a vertex Message-ID: <5492FEA3.1010508@gmail.com> Hello, I want to get the texture value from a cell! I have the cellid as result of intersectWithLine. After I get the list of vertices of the cell: vtkIdList* nghList = vtkIdList::New(); source->GetCellPoints(cellId, nghList); I iterate through the points in order to get their texture coordinates and interpolate them in the intersection position. Then with the (interpolated) texture coordinates, access the texture image to get the RGB point color! Is there a method faster than that? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Thu Dec 18 11:25:00 2014 From: vsh at magellium.fr (Vincent32160) Date: Thu, 18 Dec 2014 09:25:00 -0700 (MST) Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: References: <1418324342110-5729808.post@n5.nabble.com> <1418639190843-5729849.post@n5.nabble.com> <1418895391359-5729877.post@n5.nabble.com> <1418915825397-5729892.post@n5.nabble.com> <1418918779189-5729896.post@n5.nabble.com> Message-ID: <1418919900723-5729899.post@n5.nabble.com> That makes definitely sense. Apart this rotation and the variables radialSize and r, I got the impression that the rest of the code doesn't depend on the data. Do you agree with that? Thanks again David Gobbi wrote > On Thu, Dec 18, 2014 at 9:06 AM, Vincent32160 < > vsh@ > > wrote: >> >> I put in the "-1"s because I reuse the matrix presented in your code >> (rotate.SetResliceAxesDirectionCosines( >> -1, 0, 0, >> 0, -1, 0, >> 0, 0, 1 ) ) >> Shouldn't I do this? > > > No, this isn't something that should be blindly copied. I added those > -1's > because > it set up the cylinder orientation properly for my data. You have > different data, so > you will probably need a different matrix. Does that make sense? > > - 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 -- View this message in context: http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729899.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Dec 18 11:34:20 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 18 Dec 2014 09:34:20 -0700 Subject: [vtkusers] Unwrap a cylinder of data using vtkCylindricalTransform and vtkImageReslice In-Reply-To: <1418919900723-5729899.post@n5.nabble.com> References: <1418324342110-5729808.post@n5.nabble.com> <1418639190843-5729849.post@n5.nabble.com> <1418895391359-5729877.post@n5.nabble.com> <1418915825397-5729892.post@n5.nabble.com> <1418918779189-5729896.post@n5.nabble.com> <1418919900723-5729899.post@n5.nabble.com> Message-ID: On Thu, Dec 18, 2014 at 9:25 AM, Vincent32160 wrote: > > That makes definitely sense. > Apart this rotation and the variables radialSize and r, I got the > impression > that the rest of the code doesn't depend on the data. Do you agree with > that? > In addition to those, the code also assumes that the center of the cylinder is at the center of the image, which might not be true for your data. That's why I said that you might want to use the full 4x4 ResliceAxes matrix instead of just using SetResliceAxesDirectionCosines. If you use a 4x4 matrix, you can use the 4th column of the matrix to adjust the center. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From piccima at gmail.com Thu Dec 18 13:58:40 2014 From: piccima at gmail.com (marco) Date: Thu, 18 Dec 2014 13:58:40 -0500 Subject: [vtkusers] get tcoords from pointId Message-ID: <549323E0.3020402@gmail.com> Hello, maybe it has been deprecated but I cannot find a method like GetTcoords(pointId)! Is there something similar in the library? Thank you From sadml at flexynet.org Thu Dec 18 14:14:21 2014 From: sadml at flexynet.org (sadml at flexynet.org) Date: Thu, 18 Dec 2014 20:14:21 +0100 Subject: [vtkusers] vtk actor size on screen Message-ID: <5493278D.7080300@flexynet.org> Hello, I would need to acquire the sizes of actors in pixel on screen, is there any method already present among classes to accomplish that? Any alternate method you would suggest? Thanks for cooperation Regards Paolo From cory.quammen at kitware.com Thu Dec 18 14:33:42 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 18 Dec 2014 14:33:42 -0500 Subject: [vtkusers] get tcoords from pointId In-Reply-To: <549323E0.3020402@gmail.com> References: <549323E0.3020402@gmail.com> Message-ID: Hi Marco, Texture coordinates are stored in an array in a vtkDataSet's vtkPointData object. Say you have a vtkPolyData with texture coordinates. To access it, you would do something like vtkPointData* pd = polyData->GetPointData(); vtkDataArray* tcoords = pd->GetTCoords(); // Let's assume the tcoords are in a vtkFloatArray vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); if (floatTCoords) { float texCoord[3]; floatTcoords->GetTupleValue(pointId, texCoord); // do something with texCoord } I hope that helps, Cory On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: > Hello, > maybe it has been deprecated but I cannot find a method like > GetTcoords(pointId)! > Is there something similar in the library? > > 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 -- Cory Quammen R&D Engineer Kitware, Inc. From piccima at gmail.com Thu Dec 18 14:38:46 2014 From: piccima at gmail.com (marco) Date: Thu, 18 Dec 2014 14:38:46 -0500 Subject: [vtkusers] get tcoords from pointId In-Reply-To: References: <549323E0.3020402@gmail.com> Message-ID: <54932D46.3010504@gmail.com> Thank you On 12/18/2014 02:33 PM, Cory Quammen wrote: > Hi Marco, > > Texture coordinates are stored in an array in a vtkDataSet's > vtkPointData object. Say you have a vtkPolyData with texture > coordinates. To access it, you would do something like > > vtkPointData* pd = polyData->GetPointData(); > vtkDataArray* tcoords = pd->GetTCoords(); > > // Let's assume the tcoords are in a vtkFloatArray > vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); > if (floatTCoords) > { > float texCoord[3]; > floatTcoords->GetTupleValue(pointId, texCoord); > > // do something with texCoord > } > > I hope that helps, > Cory > > On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: >> Hello, >> maybe it has been deprecated but I cannot find a method like >> GetTcoords(pointId)! >> Is there something similar in the library? >> >> 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 piccima at gmail.com Thu Dec 18 16:09:41 2014 From: piccima at gmail.com (marco) Date: Thu, 18 Dec 2014 16:09:41 -0500 Subject: [vtkusers] get tcoords from pointId In-Reply-To: References: <549323E0.3020402@gmail.com> Message-ID: <54934295.4080009@gmail.com> Hello I was able to retrieve the tcoords for my Points. Now I'm trying to access the texture image to get the rgb value for that location. Is possible to use directly the tcoords to do that? or I have to compute the pixel coordinate with a transformation? Thank you for your help Marco On 12/18/2014 02:33 PM, Cory Quammen wrote: > Hi Marco, > > Texture coordinates are stored in an array in a vtkDataSet's > vtkPointData object. Say you have a vtkPolyData with texture > coordinates. To access it, you would do something like > > vtkPointData* pd = polyData->GetPointData(); > vtkDataArray* tcoords = pd->GetTCoords(); > > // Let's assume the tcoords are in a vtkFloatArray > vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); > if (floatTCoords) > { > float texCoord[3]; > floatTcoords->GetTupleValue(pointId, texCoord); > > // do something with texCoord > } > > I hope that helps, > Cory > > On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: >> Hello, >> maybe it has been deprecated but I cannot find a method like >> GetTcoords(pointId)! >> Is there something similar in the library? >> >> 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 cory.quammen at kitware.com Thu Dec 18 16:22:49 2014 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 18 Dec 2014 16:22:49 -0500 Subject: [vtkusers] get tcoords from pointId In-Reply-To: <54934295.4080009@gmail.com> References: <549323E0.3020402@gmail.com> <54934295.4080009@gmail.com> Message-ID: Marco, I don't know of a class method that lets you look up the color given a texture coordinate. I think you'll have to compute the pixel coordinate, which shouldn't be too hard. - Cory On Thu, Dec 18, 2014 at 4:09 PM, marco wrote: > Hello > I was able to retrieve the tcoords for my Points. > Now I'm trying to access the texture image to get the rgb value for that > location. > Is possible to use directly the tcoords to do that? or I have to compute the > pixel coordinate with a transformation? > > Thank you for your help > > Marco > > > On 12/18/2014 02:33 PM, Cory Quammen wrote: >> >> Hi Marco, >> >> Texture coordinates are stored in an array in a vtkDataSet's >> vtkPointData object. Say you have a vtkPolyData with texture >> coordinates. To access it, you would do something like >> >> vtkPointData* pd = polyData->GetPointData(); >> vtkDataArray* tcoords = pd->GetTCoords(); >> >> // Let's assume the tcoords are in a vtkFloatArray >> vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); >> if (floatTCoords) >> { >> float texCoord[3]; >> floatTcoords->GetTupleValue(pointId, texCoord); >> >> // do something with texCoord >> } >> >> I hope that helps, >> Cory >> >> On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: >>> >>> Hello, >>> maybe it has been deprecated but I cannot find a method like >>> GetTcoords(pointId)! >>> Is there something similar in the library? >>> >>> 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 >> >> >> > -- Cory Quammen R&D Engineer Kitware, Inc. From jhlegarreta at vicomtech.org Fri Dec 19 03:50:07 2014 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Fri, 19 Dec 2014 09:50:07 +0100 Subject: [vtkusers] [VTK] Creating an OS X bundle for a VTK example using Qt In-Reply-To: References: Message-ID: Hi there, looks like the problem was unrelated to VTK or Qt themselves, but to the way we were trying to create the OS X bundle through our CMakeLists. Attached is a CMakeLists that should solve the issue. Please note that you will need to change the {VTK_BIN_PATH} for the location where your VTK binaries reside, for example /Users/your_username/Development/Binaries/VTK6/bin HTH, JON HAITZ On 15 December 2014 at 12:18, Jon Haitz Legarreta wrote: > > Hi there, > we are having some trouble when trying to create an OS X bundle of an > imaging software of our own that uses ITK, VTK and Qt. > > We are using VTK 6.1.0 and Qt 5.3.2. And our OS X is Yosemite (10.10). > > In order to track the problem down, we tried to generate such a bundle for > one of the examples of VTK that uses Qt: QtVTKRenderWindows. > > The modified CMakeLists.txt is attached. > > We found that there seems to be a bug filed in kitware's CMake project in > mantis [1]. It dates back to 2013. It seems to be still open. > > I am posting below the errors we get when trying to run our *.app just in > case they are of any help. > > > Is this a problem strictly related to CMake, or either VTK or either Qt > for OS X platforms? > > > Does anybody know how to solve this issue? > > > Thank you, > JON HAITZ > > > > > > [1] http://public.kitware.com/Bug/view.php?id=14365 > > [-] Error trace: > > When executing the *.app, the application crashes, and OS X's crash report > shows this message (this is just the beginning): > > Process: QtVTKRenderWindows [17872] > Path: > /Users/USER/Desktop/QtVTKRenderWindows.app/Contents/MacOS/QtVTKRenderWindows > Identifier: QtVTKRenderWindows > Version: ??? (???) > Code Type: X86-64 (Native) > Parent Process: ??? [1] > Responsible: QtVTKRenderWindows [17872] > User ID: 501 > Date/Time: 2014-12-15 10:30:23.381 +0100 > OS Version: Mac OS X 10.10.1 (14B25) > Report Version: 11 > Anonymous UUID: E9092016-A746-70A3-34F4-DC5791286273 > Sleep/Wake UUID: BAEA81DE-427D-44D8-BA6D-0189EBDA3FFD > Time Awake Since Boot: 42000 seconds > Time Since Wake: 5500 seconds > Crashed Thread: 0 Dispatch queue: com.apple.main-thread > Exception Type: EXC_CRASH (SIGABRT) > Exception Codes: 0x0000000000000000, 0x0000000000000000 > Application Specific Information: > abort() called > Thread 0 Crashed:: Dispatch queue: com.apple.main-thread > 0 libsystem_kernel.dylib 0x00007fff89fc9282 __pthread_kill + > 10 > 1 libsystem_c.dylib 0x00007fff8f9bab73 abort + 129 > 2 QtCore 0x00000001084a6649 > qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9 > 3 QtCore 0x00000001084a7af1 > QMessageLogger::fatal(char const*, ...) const + 161 > 4 QtGui 0x0000000108ade948 > QGuiApplicationPrivate::createPlatformIntegration() + 5672 > 5 QtGui 0x0000000108ade96b > QGuiApplicationPrivate::createEventDispatcher() + 27 > 6 QtCore 0x00000001086ccc41 > QCoreApplication::init() + 113 > 7 QtCore 0x00000001086ccbb7 > QCoreApplication::QCoreApplication(QCoreApplicationPrivate&) + 39 > 8 QtGui 0x0000000108adc08e > QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) + 14 > 9 QtWidgets 0x0000000109085aae > QApplication::QApplication(int&, char**, int) + 206 > 10 0x0000000106c06c2c main + 60 > 11 libdyld.dylib 0x00007fff948c85c9 start + 1 > > > > If we try to execute the *.app from the command line, the error displayed > reads: > > MAC0001-D:Desktop usuario$ open QtVTKRenderWindows.app > LSOpenURLsWithRole() failed with error -10810 for the file > /Users/usuario/Desktop/QtVTKRenderWindows.app. > MAC0001-D:Desktop usuario$ > QtVTKRenderWindows.app/Contents/MacOS/QtVTKRenderWindows > This application failed to start because it could not find or load the Qt > platform plugin "cocoa". > > Reinstalling the application may fix this problem. > Abort trap: 6 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- project(QtVTKRenderWindows) cmake_minimum_required(VERSION 2.6) if(POLICY CMP0020) cmake_policy(SET CMP0020 NEW) endif() find_package(VTK COMPONENTS vtkCommonCore vtkFiltersSources vtkGUISupportQt vtkIOImage vtkInteractionImage ) include(${VTK_USE_FILE}) if("${VTK_QT_VERSION}" STREQUAL "") message(FATAL_ERROR "VTK was not built with Qt") endif() # Set your files and resources here set( Srcs QtVTKRenderWindowsApp.cxx QtVTKRenderWindows.cxx) set( Hdrs QtVTKRenderWindows.h ) set( MOC_Hdrs QtVTKRenderWindows.h ) set( UIs QtVTKRenderWindows.ui ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) INCLUDE(BundleUtilities) if(VTK_QT_VERSION VERSION_GREATER "4") find_package(Qt5Widgets REQUIRED QUIET) qt5_wrap_ui(UI_Srcs ${UIs}) # CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped. add_executable(QtVTKRenderWindows MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs}) qt5_use_modules(QtVTKRenderWindows Core Gui Widgets) target_link_libraries(QtVTKRenderWindows ${VTK_LIBRARIES}) else() find_package(Qt4 REQUIRED) include(${QT_USE_FILE}) # Use what VTK built with set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "") set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "") set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "") qt4_wrap_ui(UI_Srcs ${UIs}) add_executable(QtVTKRenderWindows ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs}) target_link_libraries(QtVTKRenderWindows ${QT_LIBRARIES} ${VTK_LIBRARIES}) endif() SET(QT_PLUGINS_DIR ${_qt5Gui_install_prefix}/plugins) MESSAGE(WARNING "QT_PLUGINS_DIR:${QT_PLUGINS_DIR}") SET(QTPLUGINS "{VTK_BIN_PATH}/QtVTKRenderWindows.app/Contents/PlugIns/platforms/libqcocoa.dylib;{VTK_BIN_PATH}/QtVTKRenderWindows.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib;{VTK_BIN_PATH}/QtVTKRenderWindows.app/Contents/PlugIns/accessible/libqtaccessiblequick.dylib") MESSAGE(WARNING "QTPLUGINS:${QTPLUGINS}") SET(QT_ADDITIONAL_PLUGINS ${QTPLUGINS}) MESSAGE(WARNING "QT_ADDITIONAL_PLUGINS:${QT_ADDITIONAL_PLUGINS}") ADD_CUSTOM_COMMAND(TARGET QtVTKRenderWindows POST_BUILD COMMAND /usr/local/Cellar/qt5/5.3.2/bin/macdeployqt ARGS {VTK_BIN_PATH}/QtVTKRenderWindows.app ) SET(BU_CHMOD_BUNDLE_ITEMS TRUE) FIXUP_BUNDLE({VTK_BIN_PATH}/QtVTKRenderWindows.app "" "${QT_INSTALL_PREFIX}/bin") VERIFY_BUNDLE_PREREQUISITES({VTK_BIN_PATH}/QtVTKRenderWindows.app QtVTKRenderWindows_BUNDLE_PREREQUISITES QtVTKRenderWindows_BUNDLE_PREREQUISITES_INFO) MESSAGE(WARNING "QtVTKRenderWindows_BUNDLE_PREREQUISITES:${QtVTKRenderWindows_BUNDLE_PREREQUISITES}(${QtVTKRenderWindows_BUNDLE_PREREQUISITES_INFO})") From beekmaarten at yahoo.com Fri Dec 19 10:12:52 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Fri, 19 Dec 2014 15:12:52 +0000 (UTC) Subject: [vtkusers] Clearing vtkPlot object Message-ID: <80443368.768348.1419001972624.JavaMail.yahoo@jws100192.mail.ne1.yahoo.com> Hi all, Yesterday I started exploring the options to draw 2d graphs in VTK. Why does m_pChart->GetPlot(0)->SetInputData(0); not remove the graph from my chart? I am currently using vtkTable* table = m_pChart->GetPlot(0)->GetInput();if( 0 != table ){??? while( 0? < table->GetNumberOfRows() )??? {??????? table->RemoveRow(0);????}} m_pChart->GetPlot(0)->GetData()->Modified(); // <- required! This works, but complains about trying to draw a line with less than 2 points. Thanks - Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Fri Dec 19 10:48:41 2014 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Fri, 19 Dec 2014 10:48:41 -0500 Subject: [vtkusers] Clearing vtkPlot object In-Reply-To: <80443368.768348.1419001972624.JavaMail.yahoo@jws100192.mail.ne1.yahoo.com> References: <80443368.768348.1419001972624.JavaMail.yahoo@jws100192.mail.ne1.yahoo.com> Message-ID: On Fri, Dec 19, 2014 at 10:12 AM, Maarten Beek via vtkusers wrote: > Hi all, > > Yesterday I started exploring the options to draw 2d graphs in VTK. > > Why does > > m_pChart->GetPlot(0)->SetInputData(0); > > not remove the graph from my chart? > That isn't how the API was designed, you can call remove for a plot, or clear all plots. > > I am currently using > vtkTable* table = m_pChart->GetPlot(0)->GetInput(); > if( 0 != table ) > { > while( 0 < table->GetNumberOfRows() ) > { > table->RemoveRow(0); > } > } > > m_pChart->GetPlot(0)->GetData()->Modified(); // <- required! > Unless the data is marked as modified then the plot is cached, and it would be slow to rebuild on every render. This is pretty common in the VTK API, if an object is not marked as modified it is not surprising. I guess you might expect SetInputData on the plot to mark that as modified, which could be a bug in that method. Hope that makes it clearer, it has been a while since I went through all of this logic, and it is possible we still have one or two bugs lurking in there. Marcus From beekmaarten at yahoo.com Fri Dec 19 11:17:00 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Fri, 19 Dec 2014 16:17:00 +0000 (UTC) Subject: [vtkusers] Clearing vtkPlot object In-Reply-To: References: Message-ID: <458881052.783681.1419005820937.JavaMail.yahoo@jws100193.mail.ne1.yahoo.com> In the debugger, I followed the call m_pChart->GetPlot(0)->SetInputData(0); all the way into vtkContextMapper2D::SetInputConnection()? and it seems to invoke the calls inputs->SetNumberOfInformationObjects(0); and this->Modified(). So although Modified() is called when the input is removed, I think the scene is not re-rendered (I don't get a warning re. a mapper w/o input either (what other mappers do)). Turning the visibility on/off using SetVisible() works fine. But I find it weird that the data is still dangling.(I don't want to remove the plot, because that would mean I'll have to keep track of all the plot ids.) So I think my problem is gone, as long as I don't try to understand what is going on. ;-) Maarten On Friday, December 19, 2014 10:48 AM, Marcus D. Hanwell wrote: On Fri, Dec 19, 2014 at 10:12 AM, Maarten Beek via vtkusers wrote: > Hi all, > > Yesterday I started exploring the options to draw 2d graphs in VTK. > > Why does > > m_pChart->GetPlot(0)->SetInputData(0); > > not remove the graph from my chart? > That isn't how the API was designed, you can call remove for a plot, or clear all plots. > > I am currently using > vtkTable* table = m_pChart->GetPlot(0)->GetInput(); > if( 0 != table ) > { >? ? while( 0? < table->GetNumberOfRows() ) >? ? { >? ? ? ? table->RemoveRow(0); >? ? } > } > > m_pChart->GetPlot(0)->GetData()->Modified(); // <- required! > Unless the data is marked as modified then the plot is cached, and it would be slow to rebuild on every render. This is pretty common in the VTK API, if an object is not marked as modified it is not surprising. I guess you might expect SetInputData on the plot to mark that as modified, which could be a bug in that method. Hope that makes it clearer, it has been a while since I went through all of this logic, and it is possible we still have one or two bugs lurking in there. Marcus -------------- next part -------------- An HTML attachment was scrubbed... URL: From updega2 at berkeley.edu Fri Dec 19 16:15:48 2014 From: updega2 at berkeley.edu (updega2) Date: Fri, 19 Dec 2014 14:15:48 -0700 (MST) Subject: [vtkusers] Issues with VTK Delaunay 2D for simple cases Message-ID: <1419023748672-5729928.post@n5.nabble.com> Hi, I am using vtkDelaunay2D for triangulation of cells in 3D based on lines and points. Each one of the cells prior to triangulation has the boundary of a triangle. Obviously, there are other points and lines given within the triangle boundary, so there is something for the algorithm to triangulate. Here are few bullet points describing what I am doing. 1. I use a transform to transform each cell to the xy plane prior to running vtkDelaunay2D 2. Each cell has a triangular boundary, but there are other lines/points within the boundary 3. I am doing a constrained delaunay (i.e. I am providing the triangular boundary, so that cells can not be added outside the cell boundary) This is working well besides what seems to be the easiest triangulations. By easiest, I mean that the cell to be retriangulated lies in the xy plane, zx plane, or yz plane prior to the transformation. Something interesting to note, is if I take the transformed cell to be triangulated and I restrict the precision of the points in the cell to 6 or 7 digits, the triangulation works for any input cell. However, I don't want to have to restrict the precision of the cell points, as that may cause issues later. I was wondering if anyone has ever seen similar issues, or if anyone has any insight into this? Thanks in advance, Adam -- View this message in context: http://vtk.1045678.n5.nabble.com/Issues-with-VTK-Delaunay-2D-for-simple-cases-tp5729928.html Sent from the VTK - Users mailing list archive at Nabble.com. From julio.hoffimann at gmail.com Fri Dec 19 17:50:01 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Fri, 19 Dec 2014 14:50:01 -0800 Subject: [vtkusers] Axes marker not working as expected In-Reply-To: References: Message-ID: Can anyone confirm QVTKWidget is not intended to be used as a local variable (see code bellow)? I'm getting a runtime error whenever the mouse cursor moves over the QVTKWidget window. -J?lio >> > VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent) >> > { >> > QVTKWidget *qvtkwidget = new QVTKWidget; >> > >> > auto axes = vtkSmartPointer::New(); >> > axes->SetXAxisLabelText("x"); >> > axes->SetYAxisLabelText("y"); >> > axes->SetZAxisLabelText("z"); >> > >> > auto orientationMarker = >> > vtkSmartPointer::New(); >> > orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); >> > orientationMarker->SetOrientationMarker(axes); >> > orientationMarker->SetEnabled(1); >> > >> > // sphere >> > auto sphereSource = vtkSmartPointer::New(); >> > sphereSource->SetCenter(8, 8, 8); >> > sphereSource->SetRadius(5.0); >> > auto mapper = vtkSmartPointer::New(); >> > mapper->SetInputConnection(sphereSource->GetOutputPort()); >> > auto actor = vtkSmartPointer::New(); >> > actor->SetMapper(mapper); >> > >> > auto renderer = vtkSmartPointer::New(); >> > renderer->AddActor(axes); >> > renderer->AddActor(actor); >> > >> > vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); >> > renderWindow->AddRenderer(renderer); >> > } >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julio.hoffimann at gmail.com Fri Dec 19 17:51:00 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Fri, 19 Dec 2014 14:51:00 -0800 Subject: [vtkusers] vtkTypeMacro warning In-Reply-To: References: <20141209220213.2019662740@mail.rogue-research.com> Message-ID: Hi Sean, Did you solved this issue? -J?lio -------------- next part -------------- An HTML attachment was scrubbed... URL: From cvinllen at gmail.com Sat Dec 20 08:34:05 2014 From: cvinllen at gmail.com (cvinllen) Date: Sat, 20 Dec 2014 21:34:05 +0800 Subject: [vtkusers] How to read a dicom and display in the in the windows Message-ID: <54957ACD.1060601@gmail.com> Hello: I use vtk 4 before, last week, i install vtk 6, it's looks like some class and function changed. I write a simple code, read dicom and display, it's can run success before i update the vtk to 6: //read dicom vtkDICOMImageReader *reader = vtkDICOMImageReader::New(); reader->SetDataByteOrderToLittleEndian(); reader->SetDirectoryName(path.c_str()); reader->SetDataOrigin(0.0, 0.0, 0.0); //store in the vtkImageData vtkSmartPointer imageData = vtkSmartPointer::New(); imageData = reader->GetOutput(); //i think here has problem, because gdb show bug here vtkImageCast *cast = vtkImageCast::New(); cast->SetInputData(imageData); cast->ClampOverflowOn(); cast->SetOutputScalarTypeToUnsignedShort(); vtkPiecewiseFunction *opacityTransferFunction = vtkPiecewiseFunction::New(); opacityTransferFunction->RemoveAllPoints(); opacityTransferFunction->AddPoint(0, 0.0); opacityTransferFunction->AddPoint(255, 1); vtkColorTransferFunction *colorTransferFunction = vtkColorTransferFunction::New(); colorTransferFunction->RemoveAllPoints(); colorTransferFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(255, 1.0, 1.0, 1.0); vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New(); volumeProperty->SetColor(colorTransferFunction); volumeProperty->SetScalarOpacity(opacityTransferFunction); volumeProperty->ShadeOn(); volumeProperty->SetInterpolationTypeToLinear(); vtkVolumeRayCastCompositeFunction *compositeFunction = vtkVolumeRayCastCompositeFunction::New(); vtkVolumeRayCastMapper *volumeMapper = vtkVolumeRayCastMapper::New(); volumeMapper->SetVolumeRayCastFunction(compositeFunction); volumeMapper->SetInputData(cast->GetOutput()); vtkVolume *volume = vtkVolume::New(); volume->SetMapper(volumeMapper); volume->SetProperty(volumeProperty); vtkCamera *aCamera = vtkCamera::New(); aCamera->SetViewUp (0, 0, -1); aCamera->SetPosition (0, 1, 0); aCamera->SetFocalPoint (0, 0, 0); aCamera->ComputeViewPlaneNormal(); aCamera->Dolly(1.0); vtkRenderer *renderer = vtkRenderer::New(); renderer->RemoveAllViewProps(); renderer->AddVolume(volume); renderer->SetActiveCamera(aCamera); renderer->SetBackground( 0,0,0 ); renderer->ResetCamera (); //renderer->Render(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(renderer); renWin->SetSize(500, 500); renWin->Start(); renWin->Render(); // gdb show the bug occur vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); iren->Initialize(); iren->Start(); _the gdb show:_ [New Thread 0x7fffe1385700 (LWP 4012)] [Thread 0x7fffe1385700 (LWP 4012) exited] [New Thread 0x7fffe1385700 (LWP 4013)] [Thread 0x7fffe1385700 (LWP 4013) exited] [New Thread 0x7fffe1385700 (LWP 4014)] [Thread 0x7fffe1385700 (LWP 4014) exited] X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 156 (GLX) Minor opcode of failed request: 11 (X_GLXSwapBuffers) Serial number of failed request: 687 Current serial number in output stream: 687 [Inferior 1 (process 4006) exited with code 01] I dont kown what the difference between the vtk 6 and vtk 4, greate appreciates for anyone's reply! -------------- next part -------------- An HTML attachment was scrubbed... URL: From julio.hoffimann at gmail.com Sun Dec 21 21:45:48 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Sun, 21 Dec 2014 18:45:48 -0800 Subject: [vtkusers] Axes marker not working as expected In-Reply-To: References: Message-ID: I recompiled VTK in debug mode and the vtkOrientationMarkerWidget segfaults in line 350 of vtkOrientationMarkerWidget.cxx (see screenshot). I'm using VTK 6.2 from Git, Qt5, GCC 4.9, C++14. The current code that is causing the segfault is: VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent){ QVTKWidget *qvtkwidget = new QVTKWidget; qvtkwidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); auto renderer = vtkSmartPointer::New(); vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); renderWindow->AddRenderer(renderer); auto axes = vtkSmartPointer::New(); axes->SetXAxisLabelText("x"); axes->SetYAxisLabelText("y"); axes->SetZAxisLabelText("z"); auto orientationMarker = vtkSmartPointer::New(); orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); orientationMarker->SetOrientationMarker(axes); orientationMarker->SetEnabled(1);} Could you please tell me why this implementation is failing? Appreciate any help, J?lio. 2014-12-19 14:50 GMT-08:00 J?lio Hoffimann : > Can anyone confirm QVTKWidget is not intended to be used as a local > variable (see code bellow)? > > I'm getting a runtime error whenever the mouse cursor moves over the > QVTKWidget window. > > -J?lio > > >>> > VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent) >>> > { >>> > QVTKWidget *qvtkwidget = new QVTKWidget; >>> > >>> > auto axes = vtkSmartPointer::New(); >>> > axes->SetXAxisLabelText("x"); >>> > axes->SetYAxisLabelText("y"); >>> > axes->SetZAxisLabelText("z"); >>> > >>> > auto orientationMarker = >>> > vtkSmartPointer::New(); >>> > orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); >>> > orientationMarker->SetOrientationMarker(axes); >>> > orientationMarker->SetEnabled(1); >>> > >>> > // sphere >>> > auto sphereSource = vtkSmartPointer::New(); >>> > sphereSource->SetCenter(8, 8, 8); >>> > sphereSource->SetRadius(5.0); >>> > auto mapper = vtkSmartPointer::New(); >>> > mapper->SetInputConnection(sphereSource->GetOutputPort()); >>> > auto actor = vtkSmartPointer::New(); >>> > actor->SetMapper(mapper); >>> > >>> > auto renderer = vtkSmartPointer::New(); >>> > renderer->AddActor(axes); >>> > renderer->AddActor(actor); >>> > >>> > vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); >>> > renderWindow->AddRenderer(renderer); >>> > } >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jean-Luc.Szpyrka at inria.fr Mon Dec 22 07:02:49 2014 From: Jean-Luc.Szpyrka at inria.fr (Jean-Luc Szpyrka) Date: Mon, 22 Dec 2014 13:02:49 +0100 Subject: [vtkusers] no crystal eye (quand_buffer) stereo with Qt5 / VTK 6.1 / Nvidia Message-ID: <638120AD-2199-4987-9A5B-6DD8E7767442@inria.fr> Hi all, I am dealing with stereo rendering pb on VTK6 and Qt5. The attached code sample correctly displays stereo rendering (quad_buffer/crystal eyes, but also other stereo types e.g horizontal_split or anaglyph) when compiled with QT4. It works with VTK6.0 and VTK6.1 The same code compiled with QT5 (5.3) and VTK6.1 does not render quad_buffer stereo (anaglyph and horizontal_split stereo are OK). The host runs FedoraCore20, with the distrib version of Nvidia drivers (331-39-2). Both binaries are linked with the same opengl dirvers. It is a known issue with quand_buffer rendering with VTK6.1 and QT5? Or?. what did I wrong ? Here is the code: -- Jean-luc.Szpyrka at inria.fr Tel: (33/0) 4 92 38 79 69 INRIA - 2004 route des lucioles - BP 93 - 06902 SOPHIA-ANTIPOLIS cedex (France) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RenderWindowNoUiFile.cxx Type: application/octet-stream Size: 3167 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From beekmaarten at yahoo.com Mon Dec 22 10:07:54 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Mon, 22 Dec 2014 15:07:54 +0000 (UTC) Subject: [vtkusers] Bug in vtkContextInteractorStyle? Message-ID: <2060571987.116971.1419260874413.JavaMail.yahoo@jws100162.mail.ne1.yahoo.com> Hi all, I happened to be looking at the source of the vtkContextInteractorStyle class. In the OnKeyPress() and OnKeyRelease() functions I see the folowwing: vtkVector2i position(this->Interactor->GetEventPosition()[0],??????????????????????????????? this->Interactor->GetEventPosition()[0]); which to me looks wrong. Not sure whether one of the vtk developers has already been made aware of this. Maarten ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From beekmaarten at yahoo.com Mon Dec 22 12:49:16 2014 From: beekmaarten at yahoo.com (Maarten Beek) Date: Mon, 22 Dec 2014 17:49:16 +0000 (UTC) Subject: [vtkusers] How to select a VtkPlot object in a vtkChart? Message-ID: <682874823.161846.1419270556334.JavaMail.yahoo@jws100171.mail.ne1.yahoo.com> Hi all, I would like to know how I would select a vtkPlot (better: vtkPlotLine) object in a vtkChart (better: vtkChartXY)? I get the impression that only points can be selected in a vtkContextScene. However, I have two vertical lines each with two (bottom and top) points, to indicate a (threshold) range, and that I would like to move left and right with my mouse.Would this be possible (or should I go back to something like QCustomPlot)? Thanks - Maarten ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Mon Dec 22 12:54:22 2014 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Mon, 22 Dec 2014 12:54:22 -0500 Subject: [vtkusers] Bug in vtkContextInteractorStyle? In-Reply-To: <2060571987.116971.1419260874413.JavaMail.yahoo@jws100162.mail.ne1.yahoo.com> References: <2060571987.116971.1419260874413.JavaMail.yahoo@jws100162.mail.ne1.yahoo.com> Message-ID: On Mon, Dec 22, 2014 at 10:07 AM, Maarten Beek via vtkusers wrote: > Hi all, > > I happened to be looking at the source of the vtkContextInteractorStyle > class. > > In the OnKeyPress() and OnKeyRelease() functions I see the folowwing: > > vtkVector2i position(this->Interactor->GetEventPosition()[0], > this->Interactor->GetEventPosition()[0]); > > which to me looks wrong. > > Not sure whether one of the vtk developers has already been made aware of > this. > Thank you for pointing this out, I just submitted a patch to correct this on Gerrit, From marcus.hanwell at kitware.com Mon Dec 22 12:55:20 2014 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Mon, 22 Dec 2014 12:55:20 -0500 Subject: [vtkusers] Bug in vtkContextInteractorStyle? In-Reply-To: References: <2060571987.116971.1419260874413.JavaMail.yahoo@jws100162.mail.ne1.yahoo.com> Message-ID: On Mon, Dec 22, 2014 at 12:54 PM, Marcus D. Hanwell wrote: > On Mon, Dec 22, 2014 at 10:07 AM, Maarten Beek via vtkusers > wrote: >> Hi all, >> >> I happened to be looking at the source of the vtkContextInteractorStyle >> class. >> >> In the OnKeyPress() and OnKeyRelease() functions I see the folowwing: >> >> vtkVector2i position(this->Interactor->GetEventPosition()[0], >> this->Interactor->GetEventPosition()[0]); >> >> which to me looks wrong. >> >> Not sure whether one of the vtk developers has already been made aware of >> this. >> > Thank you for pointing this out, I just submitted a patch to correct > this on Gerrit, http://review.source.kitware.com/#/t/5213 Sorry, GMail is overly eager when I tried to paste the URL... Thanks, Marcus From marcus.hanwell at kitware.com Mon Dec 22 13:05:22 2014 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Mon, 22 Dec 2014 13:05:22 -0500 Subject: [vtkusers] How to select a VtkPlot object in a vtkChart? In-Reply-To: <682874823.161846.1419270556334.JavaMail.yahoo@jws100171.mail.ne1.yahoo.com> References: <682874823.161846.1419270556334.JavaMail.yahoo@jws100171.mail.ne1.yahoo.com> Message-ID: Hi Maarten, On Mon, Dec 22, 2014 at 12:49 PM, Maarten Beek via vtkusers wrote: > Hi all, > > I would like to know how I would select a vtkPlot (better: vtkPlotLine) > object in a vtkChart (better: vtkChartXY)? > > I get the impression that only points can be selected in a vtkContextScene. > However, I have two vertical lines each with two (bottom and top) points, to > indicate a (threshold) range, and that I would like to move left and right > with my mouse. > Would this be possible (or should I go back to something like QCustomPlot)? > I worked on a somewhat similar type of chart in the tomviz project, see vtkChartHistogram in the CentralWidget.cxx file (that needs to be split out/refactored, but should illustrate). It has a vertical line marking the selected isosurface value the user clicked on (vtkHistogramMarker). I think we should make this simpler, when you add a plot you get its index, you can create a vtkPlotLine, add it to the chart, maintain a pointer to it, and update that object in your own code too. Marcus From marcus.hanwell at kitware.com Mon Dec 22 13:05:52 2014 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Mon, 22 Dec 2014 13:05:52 -0500 Subject: [vtkusers] How to select a VtkPlot object in a vtkChart? In-Reply-To: References: <682874823.161846.1419270556334.JavaMail.yahoo@jws100171.mail.ne1.yahoo.com> Message-ID: On Mon, Dec 22, 2014 at 1:05 PM, Marcus D. Hanwell wrote: > Hi Maarten, > > On Mon, Dec 22, 2014 at 12:49 PM, Maarten Beek via vtkusers > wrote: >> Hi all, >> >> I would like to know how I would select a vtkPlot (better: vtkPlotLine) >> object in a vtkChart (better: vtkChartXY)? >> >> I get the impression that only points can be selected in a vtkContextScene. >> However, I have two vertical lines each with two (bottom and top) points, to >> indicate a (threshold) range, and that I would like to move left and right >> with my mouse. >> Would this be possible (or should I go back to something like QCustomPlot)? >> > I worked on a somewhat similar type of chart in the tomviz project, > see vtkChartHistogram in the CentralWidget.cxx file (that needs to be > split out/refactored, but should illustrate). It has a vertical line > marking the selected isosurface value the user clicked on > (vtkHistogramMarker). > > I think we should make this simpler, when you add a plot you get its > index, you can create a vtkPlotLine, add it to the chart, maintain a > pointer to it, and update that object in your own code too. > Not enough coffee today...the link to the file I mentioned, https://github.com/OpenChemistry/tomviz/blob/master/CentralWidget.cxx Marcus From cartik.sharma at gmail.com Mon Dec 22 17:30:16 2014 From: cartik.sharma at gmail.com (Cartik Sharma) Date: Mon, 22 Dec 2014 17:30:16 -0500 Subject: [vtkusers] vtkusers Digest, Vol 128, Issue 9 In-Reply-To: References: Message-ID: Hi, I have a question regarding the rendering a sphere at the point picked with vtkPointPicker. I have setup style as a child class of vtkInteractorStyleTrackballCamera where I get the obtain coordinates of picked point from the current renderer, after getting the current renderer from a findPokedRenderer call. When I set the picked point coordinates to a sphereActor with setPosition, it does show up in the view window but not at the picked position. Is there some way to fix this. Thanks in advance. Best regards, Cartik On Mon, Dec 22, 2014 at 12:49 PM, wrote: > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://public.kitware.com/mailman/listinfo/vtkusers > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. (no subject) (Allavali Ballary) > 2. Re: Writing multi-paged tiff image (Bradley Lowekamp) > 3. Re: Unwrap a cylinder of data using vtkCylindricalTransform > and vtkImageReslice (Vincent32160) > 4. Re: Unwrap a cylinder of data using vtkCylindricalTransform > and vtkImageReslice (David Gobbi) > 5. Re: Writing multi-paged tiff image (Maarten Beek) > 6. Re: Unwrap a cylinder of data using vtkCylindricalTransform > and vtkImageReslice (David Gobbi) > 7. Re: Unwrap a cylinder of data using vtkCylindricalTransform > and vtkImageReslice (Vincent32160) > 8. Re: Unwrap a cylinder of data using vtkCylindricalTransform > and vtkImageReslice (David Gobbi) > 9. extract texture color from a vertex (marco) > 10. Re: Unwrap a cylinder of data using vtkCylindricalTransform > and vtkImageReslice (Vincent32160) > 11. Re: Unwrap a cylinder of data using vtkCylindricalTransform > and vtkImageReslice (David Gobbi) > 12. get tcoords from pointId (marco) > 13. vtk actor size on screen (sadml at flexynet.org) > 14. Re: get tcoords from pointId (Cory Quammen) > 15. Re: get tcoords from pointId (marco) > 16. Re: get tcoords from pointId (marco) > 17. Re: get tcoords from pointId (Cory Quammen) > 18. Re: [VTK] Creating an OS X bundle for a VTK example using Qt > (Jon Haitz Legarreta) > 19. Clearing vtkPlot object (Maarten Beek) > 20. Re: Clearing vtkPlot object (Marcus D. Hanwell) > 21. Re: Clearing vtkPlot object (Maarten Beek) > 22. Issues with VTK Delaunay 2D for simple cases (updega2) > 23. Re: Axes marker not working as expected (J?lio Hoffimann) > 24. Re: vtkTypeMacro warning (J?lio Hoffimann) > 25. How to read a dicom and display in the in the windows (cvinllen) > 26. Re: Axes marker not working as expected (J?lio Hoffimann) > 27. no crystal eye (quand_buffer) stereo with Qt5 / VTK 6.1 / > Nvidia (Jean-Luc Szpyrka) > 28. Bug in vtkContextInteractorStyle? (Maarten Beek) > 29. How to select a VtkPlot object in a vtkChart? (Maarten Beek) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 18 Dec 2014 13:47:32 +0000 > From: "Allavali Ballary" > To: "vtkusers at vtk.org" > Subject: [vtkusers] (no subject) > Message-ID: > < > 3BD743544268C04A827420A055435C93B8C178 at POCITMSEXMB06.LntUniverse.com> > Content-Type: text/plain; charset="us-ascii" > > Hi, > In Dicom image how to measure distance between two points, angle multiple > times. > Now I can measure one time, but I need to measure multiple times. > > Thanks & Regards, > Allavali Ballary > > > L&T Technology Services Ltd > > www.LntTechservices.com > > This Email may contain confidential or privileged information for the > intended recipient (s). If you are not the intended recipient, please do > not use or disseminate the information, notify the sender and delete it > from your system. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/09f5899a/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Thu, 18 Dec 2014 09:10:19 -0500 > From: Bradley Lowekamp > To: Maarten Beek > Cc: David Gobbi , VTK Users > Subject: Re: [vtkusers] Writing multi-paged tiff image > Message-ID: <12B2ABE1-EAA7-4BC9-B7DB-7A51877FCEA8 at mail.nih.gov> > Content-Type: text/plain; charset="us-ascii" > > Hello, > > I have recently refactored ITK's TIFFImageIO mostly for improving reading, > but it supports writing 3D images as multi-paged tiffs. You can utilized > ITK ImageIO by using ITK's VTK bridge module [1]. Alternatively, you can > look at ITK's implementation as see about porting it to VTK[2]. I believe > the writing method still has an evident heritage from VTK. > > I am not a big fan for 3D tiffs because there is no standard way to store > z-spacing and image origin. > > Brad > > [1] http://www.itk.org/Doxygen/html/group__ITKVTK.html > [2] > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/TIFF/src/itkTIFFImageIO.cxx#L504-L764 > > On Dec 17, 2014, at 4:42 PM, Maarten Beek via vtkusers > wrote: > > > Thanks for your reply David, > > > > I would like to write multi-page tiffs, but I might not be smart enough. > I see one tiff file with all images stitched together in a long column, so > I am thinking of a missing page return or something. But I guess that's a > over-simplification ;-) > > > > vtkImageWriter works fine as long as I remember the extent, spacing and > origin. > > > > Last year I saw multi-page tiff phloro images, now I see multi-page tiff > ct data; maybe vtktiffwriter will be 3d capable some day.... > > > > Maarten > > > > > > On Wednesday, December 17, 2014 4:30 PM, David Gobbi < > david.gobbi at gmail.com> wrote: > > > > > > On Wed, Dec 17, 2014 at 2:10 PM, Maarten Beek > wrote: > > Hi David, > > > > Sorry, I'll try to remember. I did search the internet but couldn't find > a clear answer. > > > > I am a bit confused though, because vtkTiffReader reads multi-page tiffs > fine. What is preventing a multi-page writer? > > > > All that's missing is someone with the need to write multi-page files, > who is willing to modify the writer so that it writes multi-page files! It > isn't a trivial project, because there are at least three different > semi-standard ways of storing 3D data in TIFF, and they aren't entirely > compatible with one another. > > > > Even with the reader, multi-page files were troublesome for a long time, > because it could read some 3D files but not others (again, because TIFF > has several semi-standard ways of storing 3D data). TIFF was not > initially designed to handle 3D, and all the ways of making it work with 3D > are a bit hackish. > > > > > > What are my options in vtk? What writers do write 3d images? Does a tool > exist that puts multiple tiffs in one multi-page tiff? > > > > Well, right now NIFTI is my favorite 3D image format. I don't use TIFF > much, so I don't know what TIFF tools are available. > > > > - 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: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/aa980cd3/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Thu, 18 Dec 2014 08:17:05 -0700 (MST) > From: Vincent32160 > To: vtkusers at vtk.org > Subject: Re: [vtkusers] Unwrap a cylinder of data using > vtkCylindricalTransform and vtkImageReslice > Message-ID: <1418915825397-5729892.post at n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > As I need to modify the angle from which the unrolling is starting I would > use the sophisticated solution you advise. > If I understand correctly the starting reslice axes are a 4x4 matrix > (-1,0,0,center[0],0,-1,0,center[1],0,0,1,center[2],0,0,0,0). > If I need to apply an angle, I could use only the 3x3 matrix > (-1,0,0,0,-1,0,0,0,1). > Can you tell me if I am right? > Thanks > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729892.html > Sent from the VTK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 4 > Date: Thu, 18 Dec 2014 08:40:44 -0700 > From: David Gobbi > To: Vincent32160 > Cc: VTK Users > Subject: Re: [vtkusers] Unwrap a cylinder of data using > vtkCylindricalTransform and vtkImageReslice > Message-ID: > EzzQfZu1ncFxdkXWvSBaXwAAaLEgRb24KcL4+k0xaWhg at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > On Thu, Dec 18, 2014 at 8:17 AM, Vincent32160 wrote: > > > > As I need to modify the angle from which the unrolling is starting I > would > > use the sophisticated solution you advise. > > If I understand correctly the starting reslice axes are a 4x4 matrix > > (-1,0,0,center[0],0,-1,0,center[1],0,0,1,center[2],0,0,0,0). > > If I need to apply an angle, I could use only the 3x3 matrix > > (-1,0,0,0,-1,0,0,0,1). > > Can you tell me if I am right? > > Thanks > > > Yes, the 3x3 matrix controls the orientation of the cylinder, and > the final column is where you want the center to be. > > However: the bottom row should always be (0,0,0,1). And I'm > not sure why you put in the "-1"s. Is there a reason why you want > to rotate by 180 degrees? > > - David > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/e69ba194/attachment-0001.html > > > > ------------------------------ > > Message: 5 > Date: Thu, 18 Dec 2014 15:43:25 +0000 (UTC) > From: Maarten Beek > To: Bradley Lowekamp > Cc: David Gobbi , VTK Users > Subject: Re: [vtkusers] Writing multi-paged tiff image > Message-ID: > < > 1485787823.490616.1418917405129.JavaMail.yahoo at jws100205.mail.ne1.yahoo.com > > > > Content-Type: text/plain; charset="utf-8" > > Hey Bradley, > Thanks for your reply, I'll have a look at the itk code. > I just have some 3d tiff ct data and after soon processing, my first > thought was to just save it in its original format. > Thanks for your remark re. spacing and origin; I was about to send an > email to the person who gave me the ct data, to ask about this data. I now > feel more confident that my code didn't screw up these numbers ;-) > Maarten > > > On Thursday, December 18, 2014 9:20 AM, Bradley Lowekamp < > blowekamp at mail.nih.gov> wrote: > > > Hello, > I have recently refactored ITK's TIFFImageIO mostly for improving reading, > but it supports writing 3D images as multi-paged tiffs. You can utilized > ITK ImageIO by using ITK's VTK bridge module [1]. Alternatively, you can > look at ITK's implementation as see about porting it to VTK[2]. I believe > the writing method still has an evident heritage from VTK. > I am not a big fan for 3D tiffs because there is no standard way to store > z-spacing and image origin. > Brad > [1]? > http://www.itk.org/Doxygen/html/group__ITKVTK.html[2]?https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/TIFF/src/itkTIFFImageIO.cxx#L504-L764 > On Dec 17, 2014, at 4:42 PM, Maarten Beek via vtkusers > wrote: > > > Thanks for your reply David, > I would like to write multi-page tiffs, but I might not be smart enough. I > see one tiff file with all images stitched together in a long column, so I > am thinking of a missing page return or something. But I guess that's a > over-simplification ;-) > vtkImageWriter works fine as long as I remember the extent, spacing and > origin. > Last year I saw multi-page tiff phloro images, now I see multi-page tiff > ct data; maybe vtktiffwriter will be 3d capable some day.... > Maarten > > > On Wednesday, December 17, 2014 4:30 PM, David Gobbi < > david.gobbi at gmail.com> wrote: > > > On Wed, Dec 17, 2014 at 2:10 PM, Maarten Beek > wrote: > Hi David, > Sorry, I'll try to remember. I did search the internet but couldn't find a > clear answer. > I am a bit confused though, because vtkTiffReader reads multi-page tiffs > fine. What is preventing a multi-page writer? > > All that's missing is someone with the need to write multi-page files, who > is willing to modify the writer so that it writes multi-page files!? It > isn't a trivial project, because there are at least three different > semi-standard ways of storing 3D data in TIFF, and they aren't entirely > compatible with one another. > Even with the reader, multi-page files were troublesome for a long time, > because it could read some 3D files but not others (again, because TIFF has > ?several semi-standard ways of storing 3D data).? TIFF was not initially > designed to handle 3D, and all the ways of making it work with 3D are a bit > hackish. > > > What are my options in vtk? What writers do write 3d images? Does a tool > exist that puts multiple tiffs in one multi-page tiff? > > > Well, right now NIFTI is my favorite 3D image format.? I don't use TIFF > much, so I don't know what TIFF tools are available. ? > ?- 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: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/00a72cdb/attachment-0001.html > > > > ------------------------------ > > Message: 6 > Date: Thu, 18 Dec 2014 08:46:47 -0700 > From: David Gobbi > To: Vincent32160 > Cc: VTK Users > Subject: Re: [vtkusers] Unwrap a cylinder of data using > vtkCylindricalTransform and vtkImageReslice > Message-ID: > 7Jt3Xr1jeMvnCA at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > On Thu, Dec 18, 2014 at 8:40 AM, David Gobbi > wrote: > > > > On Thu, Dec 18, 2014 at 8:17 AM, Vincent32160 wrote: > >> > >> As I need to modify the angle from which the unrolling is starting I > would > >> use the sophisticated solution you advise. > >> If I understand correctly the starting reslice axes are a 4x4 matrix > >> (-1,0,0,center[0],0,-1,0,center[1],0,0,1,center[2],0,0,0,0). > >> If I need to apply an angle, I could use only the 3x3 matrix > >> (-1,0,0,0,-1,0,0,0,1). > >> Can you tell me if I am right? > >> Thanks > > > > > > Yes, the 3x3 matrix controls the orientation of the cylinder, and > > the final column is where you want the center to be. > > > > However: the bottom row should always be (0,0,0,1). And I'm > > not sure why you put in the "-1"s. Is there a reason why you want > > to rotate by 180 degrees? > > > > > I can add a little bit more information about how to set the 3x3 matrix. > The third column of the 3x3 matrix must be a unit vector that points > along the axis of the cylinder. The first and second columns must > be perpendicular to the third axis, and must be perpendicular to each > other (if they aren't, then the matrix isn't a rotation matrix). > > The method vtkMath::Perpendiculars() can be used to compute the > three columns for the 3x3 matrix, if you know the axis of the cylinder. > > - David > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/cfeae831/attachment-0001.html > > > > ------------------------------ > > Message: 7 > Date: Thu, 18 Dec 2014 09:06:19 -0700 (MST) > From: Vincent32160 > To: vtkusers at vtk.org > Subject: Re: [vtkusers] Unwrap a cylinder of data using > vtkCylindricalTransform and vtkImageReslice > Message-ID: <1418918779189-5729896.post at n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > I put in the "-1"s because I reuse the matrix presented in your code > (rotate.SetResliceAxesDirectionCosines( > -1, 0, 0, > 0, -1, 0, > 0, 0, 1 ) ) > Shouldn't I do this? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729896.html > Sent from the VTK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 8 > Date: Thu, 18 Dec 2014 09:15:36 -0700 > From: David Gobbi > To: Vincent32160 > Cc: VTK Users > Subject: Re: [vtkusers] Unwrap a cylinder of data using > vtkCylindricalTransform and vtkImageReslice > Message-ID: > FLjyETsEhX1Mo8zCGya22+TyFmSnDZnwAGSfJxBMbpUw at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > On Thu, Dec 18, 2014 at 9:06 AM, Vincent32160 wrote: > > > > I put in the "-1"s because I reuse the matrix presented in your code > > (rotate.SetResliceAxesDirectionCosines( > > -1, 0, 0, > > 0, -1, 0, > > 0, 0, 1 ) ) > > Shouldn't I do this? > > > No, this isn't something that should be blindly copied. I added those -1's > because > it set up the cylinder orientation properly for my data. You have > different data, so > you will probably need a different matrix. Does that make sense? > > - David > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/6daee451/attachment-0001.html > > > > ------------------------------ > > Message: 9 > Date: Thu, 18 Dec 2014 11:19:47 -0500 > From: marco > To: vtkusers at vtk.org > Subject: [vtkusers] extract texture color from a vertex > Message-ID: <5492FEA3.1010508 at gmail.com> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hello, > I want to get the texture value from a cell! > I have the cellid as result of intersectWithLine. > > After I get the list of vertices of the cell: > vtkIdList* nghList = vtkIdList::New(); > source->GetCellPoints(cellId, nghList); > I iterate through the points in order to get their texture coordinates > and interpolate them in the intersection position. > Then with the (interpolated) texture coordinates, access the texture > image to get the RGB point color! > > Is there a method faster than that? > > Thank you > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/ae5021c0/attachment-0001.html > > > > ------------------------------ > > Message: 10 > Date: Thu, 18 Dec 2014 09:25:00 -0700 (MST) > From: Vincent32160 > To: vtkusers at vtk.org > Subject: Re: [vtkusers] Unwrap a cylinder of data using > vtkCylindricalTransform and vtkImageReslice > Message-ID: <1418919900723-5729899.post at n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > That makes definitely sense. > Apart this rotation and the variables radialSize and r, I got the > impression > that the rest of the code doesn't depend on the data. Do you agree with > that? > Thanks again > > > David Gobbi wrote > > On Thu, Dec 18, 2014 at 9:06 AM, Vincent32160 < > > > vsh@ > > > > wrote: > >> > >> I put in the "-1"s because I reuse the matrix presented in your code > >> (rotate.SetResliceAxesDirectionCosines( > >> -1, 0, 0, > >> 0, -1, 0, > >> 0, 0, 1 ) ) > >> Shouldn't I do this? > > > > > > No, this isn't something that should be blindly copied. I added those > > -1's > > because > > it set up the cylinder orientation properly for my data. You have > > different data, so > > you will probably need a different matrix. Does that make sense? > > > > - 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 > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729899.html > Sent from the VTK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 11 > Date: Thu, 18 Dec 2014 09:34:20 -0700 > From: David Gobbi > To: Vincent32160 > Cc: VTK Users > Subject: Re: [vtkusers] Unwrap a cylinder of data using > vtkCylindricalTransform and vtkImageReslice > Message-ID: > B8O3p_psp_B4MNmoRRe_Lmdw_iGpmw at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > On Thu, Dec 18, 2014 at 9:25 AM, Vincent32160 wrote: > > > > That makes definitely sense. > > Apart this rotation and the variables radialSize and r, I got the > > impression > > that the rest of the code doesn't depend on the data. Do you agree with > > that? > > > > In addition to those, the code also assumes that the center of the cylinder > is at the center of the image, which might not be true for your data. > > That's why I said that you might want to use the full 4x4 ResliceAxes > matrix > instead of just using SetResliceAxesDirectionCosines. If you use a 4x4 > matrix, you can use the 4th column of the matrix to adjust the center. > > - David > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/ef642198/attachment-0001.html > > > > ------------------------------ > > Message: 12 > Date: Thu, 18 Dec 2014 13:58:40 -0500 > From: marco > To: "vtkusers at vtk.org" > Subject: [vtkusers] get tcoords from pointId > Message-ID: <549323E0.3020402 at gmail.com> > Content-Type: text/plain; charset=utf-8; format=flowed > > Hello, > maybe it has been deprecated but I cannot find a method like > GetTcoords(pointId)! > Is there something similar in the library? > > Thank you > > > > ------------------------------ > > Message: 13 > Date: Thu, 18 Dec 2014 20:14:21 +0100 > From: "sadml at flexynet.org" > To: vtkusers at vtk.org > Subject: [vtkusers] vtk actor size on screen > Message-ID: <5493278D.7080300 at flexynet.org> > Content-Type: text/plain; charset=iso-8859-15; format=flowed > > Hello, > I would need to acquire the sizes of actors in pixel on screen, is there > any method already present among classes to accomplish that? > Any alternate method you would suggest? > Thanks for cooperation > Regards > > Paolo > > > ------------------------------ > > Message: 14 > Date: Thu, 18 Dec 2014 14:33:42 -0500 > From: Cory Quammen > To: marco > Cc: "vtkusers at vtk.org" > Subject: Re: [vtkusers] get tcoords from pointId > Message-ID: > aMj+Bj7HBAHZjHYK5fg4H8bfAE6LETdg at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Hi Marco, > > Texture coordinates are stored in an array in a vtkDataSet's > vtkPointData object. Say you have a vtkPolyData with texture > coordinates. To access it, you would do something like > > vtkPointData* pd = polyData->GetPointData(); > vtkDataArray* tcoords = pd->GetTCoords(); > > // Let's assume the tcoords are in a vtkFloatArray > vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); > if (floatTCoords) > { > float texCoord[3]; > floatTcoords->GetTupleValue(pointId, texCoord); > > // do something with texCoord > } > > I hope that helps, > Cory > > On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: > > Hello, > > maybe it has been deprecated but I cannot find a method like > > GetTcoords(pointId)! > > Is there something similar in the library? > > > > 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 > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > > ------------------------------ > > Message: 15 > Date: Thu, 18 Dec 2014 14:38:46 -0500 > From: marco > To: Cory Quammen > Cc: "vtkusers at vtk.org" > Subject: Re: [vtkusers] get tcoords from pointId > Message-ID: <54932D46.3010504 at gmail.com> > Content-Type: text/plain; charset=utf-8; format=flowed > > Thank you > > > On 12/18/2014 02:33 PM, Cory Quammen wrote: > > Hi Marco, > > > > Texture coordinates are stored in an array in a vtkDataSet's > > vtkPointData object. Say you have a vtkPolyData with texture > > coordinates. To access it, you would do something like > > > > vtkPointData* pd = polyData->GetPointData(); > > vtkDataArray* tcoords = pd->GetTCoords(); > > > > // Let's assume the tcoords are in a vtkFloatArray > > vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); > > if (floatTCoords) > > { > > float texCoord[3]; > > floatTcoords->GetTupleValue(pointId, texCoord); > > > > // do something with texCoord > > } > > > > I hope that helps, > > Cory > > > > On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: > >> Hello, > >> maybe it has been deprecated but I cannot find a method like > >> GetTcoords(pointId)! > >> Is there something similar in the library? > >> > >> 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 > > > > > > > > ------------------------------ > > Message: 16 > Date: Thu, 18 Dec 2014 16:09:41 -0500 > From: marco > To: Cory Quammen > Cc: "vtkusers at vtk.org" > Subject: Re: [vtkusers] get tcoords from pointId > Message-ID: <54934295.4080009 at gmail.com> > Content-Type: text/plain; charset=utf-8; format=flowed > > Hello > I was able to retrieve the tcoords for my Points. > Now I'm trying to access the texture image to get the rgb value for that > location. > Is possible to use directly the tcoords to do that? or I have to compute > the pixel coordinate with a transformation? > > Thank you for your help > > Marco > > > On 12/18/2014 02:33 PM, Cory Quammen wrote: > > Hi Marco, > > > > Texture coordinates are stored in an array in a vtkDataSet's > > vtkPointData object. Say you have a vtkPolyData with texture > > coordinates. To access it, you would do something like > > > > vtkPointData* pd = polyData->GetPointData(); > > vtkDataArray* tcoords = pd->GetTCoords(); > > > > // Let's assume the tcoords are in a vtkFloatArray > > vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); > > if (floatTCoords) > > { > > float texCoord[3]; > > floatTcoords->GetTupleValue(pointId, texCoord); > > > > // do something with texCoord > > } > > > > I hope that helps, > > Cory > > > > On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: > >> Hello, > >> maybe it has been deprecated but I cannot find a method like > >> GetTcoords(pointId)! > >> Is there something similar in the library? > >> > >> 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 > > > > > > > > ------------------------------ > > Message: 17 > Date: Thu, 18 Dec 2014 16:22:49 -0500 > From: Cory Quammen > To: marco > Cc: "vtkusers at vtk.org" > Subject: Re: [vtkusers] get tcoords from pointId > Message-ID: > gDdAkhkD5vsqFNKQoy-6yQNjPNnA at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Marco, > > I don't know of a class method that lets you look up the color given a > texture coordinate. I think you'll have to compute the pixel > coordinate, which shouldn't be too hard. > > - Cory > > On Thu, Dec 18, 2014 at 4:09 PM, marco wrote: > > Hello > > I was able to retrieve the tcoords for my Points. > > Now I'm trying to access the texture image to get the rgb value for that > > location. > > Is possible to use directly the tcoords to do that? or I have to compute > the > > pixel coordinate with a transformation? > > > > Thank you for your help > > > > Marco > > > > > > On 12/18/2014 02:33 PM, Cory Quammen wrote: > >> > >> Hi Marco, > >> > >> Texture coordinates are stored in an array in a vtkDataSet's > >> vtkPointData object. Say you have a vtkPolyData with texture > >> coordinates. To access it, you would do something like > >> > >> vtkPointData* pd = polyData->GetPointData(); > >> vtkDataArray* tcoords = pd->GetTCoords(); > >> > >> // Let's assume the tcoords are in a vtkFloatArray > >> vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); > >> if (floatTCoords) > >> { > >> float texCoord[3]; > >> floatTcoords->GetTupleValue(pointId, texCoord); > >> > >> // do something with texCoord > >> } > >> > >> I hope that helps, > >> Cory > >> > >> On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: > >>> > >>> Hello, > >>> maybe it has been deprecated but I cannot find a method like > >>> GetTcoords(pointId)! > >>> Is there something similar in the library? > >>> > >>> 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 > >> > >> > >> > > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > > ------------------------------ > > Message: 18 > Date: Fri, 19 Dec 2014 09:50:07 +0100 > From: Jon Haitz Legarreta > To: "vtkusers at vtk.org" > Subject: Re: [vtkusers] [VTK] Creating an OS X bundle for a VTK > example using Qt > Message-ID: > < > CAAKhGh8gnoms1XM28pnHGiCtZpzD3Jj8gpk4jUP2mx-m1B-+xw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi there, > looks like the problem was unrelated to VTK or Qt themselves, but to the > way we were trying to create the OS X bundle through our CMakeLists. > > Attached is a CMakeLists that should solve the issue. > > Please note that you will need to change the {VTK_BIN_PATH} for the > location where your VTK binaries reside, for example > /Users/your_username/Development/Binaries/VTK6/bin > > HTH, > JON HAITZ > > > > On 15 December 2014 at 12:18, Jon Haitz Legarreta < > jhlegarreta at vicomtech.org > > wrote: > > > > Hi there, > > we are having some trouble when trying to create an OS X bundle of an > > imaging software of our own that uses ITK, VTK and Qt. > > > > We are using VTK 6.1.0 and Qt 5.3.2. And our OS X is Yosemite (10.10). > > > > In order to track the problem down, we tried to generate such a bundle > for > > one of the examples of VTK that uses Qt: QtVTKRenderWindows. > > > > The modified CMakeLists.txt is attached. > > > > We found that there seems to be a bug filed in kitware's CMake project in > > mantis [1]. It dates back to 2013. It seems to be still open. > > > > I am posting below the errors we get when trying to run our *.app just in > > case they are of any help. > > > > > > Is this a problem strictly related to CMake, or either VTK or either Qt > > for OS X platforms? > > > > > > Does anybody know how to solve this issue? > > > > > > Thank you, > > JON HAITZ > > > > > > > > > > > > [1] http://public.kitware.com/Bug/view.php?id=14365 > > > > [-] Error trace: > > > > When executing the *.app, the application crashes, and OS X's crash > report > > shows this message (this is just the beginning): > > > > Process: QtVTKRenderWindows [17872] > > Path: > > > /Users/USER/Desktop/QtVTKRenderWindows.app/Contents/MacOS/QtVTKRenderWindows > > Identifier: QtVTKRenderWindows > > Version: ??? (???) > > Code Type: X86-64 (Native) > > Parent Process: ??? [1] > > Responsible: QtVTKRenderWindows [17872] > > User ID: 501 > > Date/Time: 2014-12-15 10:30:23.381 +0100 > > OS Version: Mac OS X 10.10.1 (14B25) > > Report Version: 11 > > Anonymous UUID: E9092016-A746-70A3-34F4-DC5791286273 > > Sleep/Wake UUID: BAEA81DE-427D-44D8-BA6D-0189EBDA3FFD > > Time Awake Since Boot: 42000 seconds > > Time Since Wake: 5500 seconds > > Crashed Thread: 0 Dispatch queue: com.apple.main-thread > > Exception Type: EXC_CRASH (SIGABRT) > > Exception Codes: 0x0000000000000000, 0x0000000000000000 > > Application Specific Information: > > abort() called > > Thread 0 Crashed:: Dispatch queue: com.apple.main-thread > > 0 libsystem_kernel.dylib 0x00007fff89fc9282 __pthread_kill + > > 10 > > 1 libsystem_c.dylib 0x00007fff8f9bab73 abort + 129 > > 2 QtCore 0x00000001084a6649 > > qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + > 9 > > 3 QtCore 0x00000001084a7af1 > > QMessageLogger::fatal(char const*, ...) const + 161 > > 4 QtGui 0x0000000108ade948 > > QGuiApplicationPrivate::createPlatformIntegration() + 5672 > > 5 QtGui 0x0000000108ade96b > > QGuiApplicationPrivate::createEventDispatcher() + 27 > > 6 QtCore 0x00000001086ccc41 > > QCoreApplication::init() + 113 > > 7 QtCore 0x00000001086ccbb7 > > QCoreApplication::QCoreApplication(QCoreApplicationPrivate&) + 39 > > 8 QtGui 0x0000000108adc08e > > QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) + 14 > > 9 QtWidgets 0x0000000109085aae > > QApplication::QApplication(int&, char**, int) + 206 > > 10 0x0000000106c06c2c main + 60 > > 11 libdyld.dylib 0x00007fff948c85c9 start + 1 > > > > > > > > If we try to execute the *.app from the command line, the error displayed > > reads: > > > > MAC0001-D:Desktop usuario$ open QtVTKRenderWindows.app > > LSOpenURLsWithRole() failed with error -10810 for the file > > /Users/usuario/Desktop/QtVTKRenderWindows.app. > > MAC0001-D:Desktop usuario$ > > QtVTKRenderWindows.app/Contents/MacOS/QtVTKRenderWindows > > This application failed to start because it could not find or load the Qt > > platform plugin "cocoa". > > > > Reinstalling the application may fix this problem. > > Abort trap: 6 > > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141219/b25d0435/attachment-0001.html > > > -------------- next part -------------- > project(QtVTKRenderWindows) > > cmake_minimum_required(VERSION 2.6) > > if(POLICY CMP0020) > cmake_policy(SET CMP0020 NEW) > endif() > > find_package(VTK COMPONENTS > vtkCommonCore > vtkFiltersSources > vtkGUISupportQt > vtkIOImage > vtkInteractionImage > ) > include(${VTK_USE_FILE}) > > > if("${VTK_QT_VERSION}" STREQUAL "") > message(FATAL_ERROR "VTK was not built with Qt") > endif() > > # Set your files and resources here > set( Srcs QtVTKRenderWindowsApp.cxx QtVTKRenderWindows.cxx) > > set( Hdrs QtVTKRenderWindows.h ) > > set( MOC_Hdrs QtVTKRenderWindows.h ) > > set( UIs QtVTKRenderWindows.ui ) > > include_directories( > ${CMAKE_CURRENT_BINARY_DIR} > ${CMAKE_CURRENT_SOURCE_DIR} > ) > > # Instruct CMake to run moc automatically when needed. > set(CMAKE_AUTOMOC ON) > > INCLUDE(BundleUtilities) > if(VTK_QT_VERSION VERSION_GREATER "4") > find_package(Qt5Widgets REQUIRED QUIET) > qt5_wrap_ui(UI_Srcs ${UIs}) > > # CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped. > add_executable(QtVTKRenderWindows MACOSX_BUNDLE ${Srcs} ${Hdrs} > ${UI_Srcs} ${MOC_Hdrs}) > qt5_use_modules(QtVTKRenderWindows Core Gui Widgets) > target_link_libraries(QtVTKRenderWindows ${VTK_LIBRARIES}) > else() > find_package(Qt4 REQUIRED) > include(${QT_USE_FILE}) > # Use what VTK built with > set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "") > set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "") > set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "") > qt4_wrap_ui(UI_Srcs ${UIs}) > > add_executable(QtVTKRenderWindows ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs}) > target_link_libraries(QtVTKRenderWindows ${QT_LIBRARIES} > ${VTK_LIBRARIES}) > endif() > > SET(QT_PLUGINS_DIR ${_qt5Gui_install_prefix}/plugins) > MESSAGE(WARNING "QT_PLUGINS_DIR:${QT_PLUGINS_DIR}") > SET(QTPLUGINS > "{VTK_BIN_PATH}/QtVTKRenderWindows.app/Contents/PlugIns/platforms/libqcocoa.dylib;{VTK_BIN_PATH}/QtVTKRenderWindows.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib;{VTK_BIN_PATH}/QtVTKRenderWindows.app/Contents/PlugIns/accessible/libqtaccessiblequick.dylib") > MESSAGE(WARNING "QTPLUGINS:${QTPLUGINS}") > SET(QT_ADDITIONAL_PLUGINS ${QTPLUGINS}) > MESSAGE(WARNING "QT_ADDITIONAL_PLUGINS:${QT_ADDITIONAL_PLUGINS}") > > > ADD_CUSTOM_COMMAND(TARGET QtVTKRenderWindows > POST_BUILD > COMMAND /usr/local/Cellar/qt5/5.3.2/bin/macdeployqt ARGS > {VTK_BIN_PATH}/QtVTKRenderWindows.app > ) > SET(BU_CHMOD_BUNDLE_ITEMS TRUE) > FIXUP_BUNDLE({VTK_BIN_PATH}/QtVTKRenderWindows.app "" > "${QT_INSTALL_PREFIX}/bin") > VERIFY_BUNDLE_PREREQUISITES({VTK_BIN_PATH}/QtVTKRenderWindows.app > QtVTKRenderWindows_BUNDLE_PREREQUISITES > QtVTKRenderWindows_BUNDLE_PREREQUISITES_INFO) > MESSAGE(WARNING > "QtVTKRenderWindows_BUNDLE_PREREQUISITES:${QtVTKRenderWindows_BUNDLE_PREREQUISITES}(${QtVTKRenderWindows_BUNDLE_PREREQUISITES_INFO})") > > ------------------------------ > > Message: 19 > Date: Fri, 19 Dec 2014 15:12:52 +0000 (UTC) > From: Maarten Beek > To: VTK Users > Subject: [vtkusers] Clearing vtkPlot object > Message-ID: > < > 80443368.768348.1419001972624.JavaMail.yahoo at jws100192.mail.ne1.yahoo.com> > > Content-Type: text/plain; charset="utf-8" > > Hi all, > Yesterday I started exploring the options to draw 2d graphs in VTK. > > Why does > m_pChart->GetPlot(0)->SetInputData(0); > not remove the graph from my chart? > > I am currently using > vtkTable* table = m_pChart->GetPlot(0)->GetInput();if( 0 != table ){??? > while( 0? < table->GetNumberOfRows() )??? {??????? > table->RemoveRow(0);????}} > m_pChart->GetPlot(0)->GetData()->Modified(); // <- required! > This works, but complains about trying to draw a line with less than 2 > points. > Thanks - Maarten > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141219/7016213a/attachment-0001.html > > > > ------------------------------ > > Message: 20 > Date: Fri, 19 Dec 2014 10:48:41 -0500 > From: "Marcus D. Hanwell" > To: Maarten Beek > Cc: VTK Users > Subject: Re: [vtkusers] Clearing vtkPlot object > Message-ID: > ne_YEf7kDdG92erzcxncxgsUpcXpHh40Q at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Fri, Dec 19, 2014 at 10:12 AM, Maarten Beek via vtkusers > wrote: > > Hi all, > > > > Yesterday I started exploring the options to draw 2d graphs in VTK. > > > > Why does > > > > m_pChart->GetPlot(0)->SetInputData(0); > > > > not remove the graph from my chart? > > > That isn't how the API was designed, you can call remove for a plot, > or clear all plots. > > > > I am currently using > > vtkTable* table = m_pChart->GetPlot(0)->GetInput(); > > if( 0 != table ) > > { > > while( 0 < table->GetNumberOfRows() ) > > { > > table->RemoveRow(0); > > } > > } > > > > m_pChart->GetPlot(0)->GetData()->Modified(); // <- required! > > > Unless the data is marked as modified then the plot is cached, and it > would be slow to rebuild on every render. This is pretty common in the > VTK API, if an object is not marked as modified it is not surprising. > I guess you might expect SetInputData on the plot to mark that as > modified, which could be a bug in that method. > > Hope that makes it clearer, it has been a while since I went through > all of this logic, and it is possible we still have one or two bugs > lurking in there. > > Marcus > > > ------------------------------ > > Message: 21 > Date: Fri, 19 Dec 2014 16:17:00 +0000 (UTC) > From: Maarten Beek > To: "Marcus D. Hanwell" > Cc: VTK Users > Subject: Re: [vtkusers] Clearing vtkPlot object > Message-ID: > < > 458881052.783681.1419005820937.JavaMail.yahoo at jws100193.mail.ne1.yahoo.com > > > > Content-Type: text/plain; charset="utf-8" > > In the debugger, I followed the call > m_pChart->GetPlot(0)->SetInputData(0); > all the way into vtkContextMapper2D::SetInputConnection()? and it seems to > invoke the calls inputs->SetNumberOfInformationObjects(0); and > this->Modified(). > So although Modified() is called when the input is removed, I think the > scene is not re-rendered (I don't get a warning re. a mapper w/o input > either (what other mappers do)). > Turning the visibility on/off using SetVisible() works fine. But I find it > weird that the data is still dangling.(I don't want to remove the plot, > because that would mean I'll have to keep track of all the plot ids.) > So I think my problem is gone, as long as I don't try to understand what > is going on. ;-) > Maarten > > > > On Friday, December 19, 2014 10:48 AM, Marcus D. Hanwell < > marcus.hanwell at kitware.com> wrote: > > > On Fri, Dec 19, 2014 at 10:12 AM, Maarten Beek via vtkusers > wrote: > > Hi all, > > > > Yesterday I started exploring the options to draw 2d graphs in VTK. > > > > Why does > > > > m_pChart->GetPlot(0)->SetInputData(0); > > > > not remove the graph from my chart? > > > That isn't how the API was designed, you can call remove for a plot, > or clear all plots. > > > > I am currently using > > vtkTable* table = m_pChart->GetPlot(0)->GetInput(); > > if( 0 != table ) > > { > >? ? while( 0? < table->GetNumberOfRows() ) > >? ? { > >? ? ? ? table->RemoveRow(0); > >? ? } > > } > > > > m_pChart->GetPlot(0)->GetData()->Modified(); // <- required! > > > Unless the data is marked as modified then the plot is cached, and it > would be slow to rebuild on every render. This is pretty common in the > VTK API, if an object is not marked as modified it is not surprising. > I guess you might expect SetInputData on the plot to mark that as > modified, which could be a bug in that method. > > Hope that makes it clearer, it has been a while since I went through > all of this logic, and it is possible we still have one or two bugs > lurking in there. > > Marcus > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141219/bdcd33f1/attachment-0001.html > > > > ------------------------------ > > Message: 22 > Date: Fri, 19 Dec 2014 14:15:48 -0700 (MST) > From: updega2 > To: vtkusers at vtk.org > Subject: [vtkusers] Issues with VTK Delaunay 2D for simple cases > Message-ID: <1419023748672-5729928.post at n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > Hi, > > I am using vtkDelaunay2D for triangulation of cells in 3D based on lines > and > points. Each one of the cells prior to triangulation has the boundary of a > triangle. Obviously, there are other points and lines given within the > triangle boundary, so there is something for the algorithm to triangulate. > Here are few bullet points describing what I am doing. > > 1. I use a transform to transform each cell to the xy plane prior to > running > vtkDelaunay2D > > 2. Each cell has a triangular boundary, but there are other lines/points > within the boundary > > 3. I am doing a constrained delaunay (i.e. I am providing the triangular > boundary, so that cells can not be added outside the cell boundary) > > This is working well besides what seems to be the easiest triangulations. > By > easiest, I mean that the cell to be retriangulated lies in the xy plane, zx > plane, or yz plane prior to the transformation. Something interesting to > note, is if I take the transformed cell to be triangulated and I restrict > the precision of the points in the cell to 6 or 7 digits, the triangulation > works for any input cell. However, I don't want to have to restrict the > precision of the cell points, as that may cause issues later. > > I was wondering if anyone has ever seen similar issues, or if anyone has > any > insight into this? > > Thanks in advance, > > Adam > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Issues-with-VTK-Delaunay-2D-for-simple-cases-tp5729928.html > Sent from the VTK - Users mailing list archive at Nabble.com. > > > ------------------------------ > > Message: 23 > Date: Fri, 19 Dec 2014 14:50:01 -0800 > From: J?lio Hoffimann > To: Bill Lorensen > Cc: VTK Users > Subject: Re: [vtkusers] Axes marker not working as expected > Message-ID: > < > CAFRVdT8CaRRoWOYczrk6+-3mtfcqwsbhF0bue-+zR13yMU9dwg at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Can anyone confirm QVTKWidget is not intended to be used as a local > variable (see code bellow)? > > I'm getting a runtime error whenever the mouse cursor moves over the > QVTKWidget window. > > -J?lio > > > >> > VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent) > >> > { > >> > QVTKWidget *qvtkwidget = new QVTKWidget; > >> > > >> > auto axes = vtkSmartPointer::New(); > >> > axes->SetXAxisLabelText("x"); > >> > axes->SetYAxisLabelText("y"); > >> > axes->SetZAxisLabelText("z"); > >> > > >> > auto orientationMarker = > >> > vtkSmartPointer::New(); > >> > orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); > >> > orientationMarker->SetOrientationMarker(axes); > >> > orientationMarker->SetEnabled(1); > >> > > >> > // sphere > >> > auto sphereSource = vtkSmartPointer::New(); > >> > sphereSource->SetCenter(8, 8, 8); > >> > sphereSource->SetRadius(5.0); > >> > auto mapper = vtkSmartPointer::New(); > >> > mapper->SetInputConnection(sphereSource->GetOutputPort()); > >> > auto actor = vtkSmartPointer::New(); > >> > actor->SetMapper(mapper); > >> > > >> > auto renderer = vtkSmartPointer::New(); > >> > renderer->AddActor(axes); > >> > renderer->AddActor(actor); > >> > > >> > vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); > >> > renderWindow->AddRenderer(renderer); > >> > } > >> > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141219/feb6d740/attachment-0001.html > > > > ------------------------------ > > Message: 24 > Date: Fri, 19 Dec 2014 14:51:00 -0800 > From: J?lio Hoffimann > To: Sean McBride > Cc: VTK Users > Subject: Re: [vtkusers] vtkTypeMacro warning > Message-ID: > < > CAFRVdT9PvBmRFqgMH_jkJc4se_TQ1EOWA+4DdQuhkmKimtjOMg at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Sean, > > Did you solved this issue? > > -J?lio > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141219/f1d9fa52/attachment-0001.html > > > > ------------------------------ > > Message: 25 > Date: Sat, 20 Dec 2014 21:34:05 +0800 > From: cvinllen > To: vtkusers at vtk.org > Subject: [vtkusers] How to read a dicom and display in the in the > windows > Message-ID: <54957ACD.1060601 at gmail.com> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hello: > I use vtk 4 before, last week, i install vtk 6, it's looks like > some class and function changed. I write a simple code, read dicom and > display, it's can run success before i update the vtk to 6: > > //read dicom > vtkDICOMImageReader *reader = vtkDICOMImageReader::New(); > reader->SetDataByteOrderToLittleEndian(); > reader->SetDirectoryName(path.c_str()); > reader->SetDataOrigin(0.0, 0.0, 0.0); > > //store in the vtkImageData > vtkSmartPointer imageData = > vtkSmartPointer::New(); > imageData = reader->GetOutput(); > > //i think here has problem, because gdb show bug here > vtkImageCast *cast = vtkImageCast::New(); > cast->SetInputData(imageData); > cast->ClampOverflowOn(); > cast->SetOutputScalarTypeToUnsignedShort(); > > vtkPiecewiseFunction *opacityTransferFunction = > vtkPiecewiseFunction::New(); > opacityTransferFunction->RemoveAllPoints(); > opacityTransferFunction->AddPoint(0, 0.0); > opacityTransferFunction->AddPoint(255, 1); > > vtkColorTransferFunction *colorTransferFunction = > vtkColorTransferFunction::New(); > colorTransferFunction->RemoveAllPoints(); > colorTransferFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); > colorTransferFunction->AddRGBPoint(255, 1.0, 1.0, 1.0); > > vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New(); > volumeProperty->SetColor(colorTransferFunction); > volumeProperty->SetScalarOpacity(opacityTransferFunction); > volumeProperty->ShadeOn(); > volumeProperty->SetInterpolationTypeToLinear(); > > vtkVolumeRayCastCompositeFunction *compositeFunction = > vtkVolumeRayCastCompositeFunction::New(); > vtkVolumeRayCastMapper *volumeMapper = vtkVolumeRayCastMapper::New(); > volumeMapper->SetVolumeRayCastFunction(compositeFunction); > volumeMapper->SetInputData(cast->GetOutput()); > > vtkVolume *volume = vtkVolume::New(); > volume->SetMapper(volumeMapper); > volume->SetProperty(volumeProperty); > > vtkCamera *aCamera = vtkCamera::New(); > aCamera->SetViewUp (0, 0, -1); > aCamera->SetPosition (0, 1, 0); > aCamera->SetFocalPoint (0, 0, 0); > aCamera->ComputeViewPlaneNormal(); > aCamera->Dolly(1.0); > > vtkRenderer *renderer = vtkRenderer::New(); > renderer->RemoveAllViewProps(); > renderer->AddVolume(volume); > renderer->SetActiveCamera(aCamera); > renderer->SetBackground( 0,0,0 ); > renderer->ResetCamera (); > //renderer->Render(); > > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(renderer); > renWin->SetSize(500, 500); > renWin->Start(); > renWin->Render(); // gdb show the bug occur > > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > iren->Initialize(); > iren->Start(); > > _the gdb show:_ > [New Thread 0x7fffe1385700 (LWP 4012)] > [Thread 0x7fffe1385700 (LWP 4012) exited] > [New Thread 0x7fffe1385700 (LWP 4013)] > [Thread 0x7fffe1385700 (LWP 4013) exited] > [New Thread 0x7fffe1385700 (LWP 4014)] > [Thread 0x7fffe1385700 (LWP 4014) exited] > > X Error of failed request: BadMatch (invalid parameter attributes) > Major opcode of failed request: 156 (GLX) > Minor opcode of failed request: 11 (X_GLXSwapBuffers) > Serial number of failed request: 687 > Current serial number in output stream: 687 > [Inferior 1 (process 4006) exited with code 01] > > > > I dont kown what the difference between the vtk 6 and vtk 4, greate > appreciates for anyone's reply! > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141220/8b16a776/attachment-0001.html > > > > ------------------------------ > > Message: 26 > Date: Sun, 21 Dec 2014 18:45:48 -0800 > From: J?lio Hoffimann > To: Bill Lorensen > Cc: VTK Users > Subject: Re: [vtkusers] Axes marker not working as expected > Message-ID: > < > CAFRVdT_Vm7tEvjubKHSHEGiTrDdmdasLK927hrog3V9Tmdrdsw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > I recompiled VTK in debug mode and the vtkOrientationMarkerWidget segfaults > in line 350 of vtkOrientationMarkerWidget.cxx (see screenshot). > > I'm using VTK 6.2 from Git, Qt5, GCC 4.9, C++14. The current code that is > causing the segfault is: > > VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent){ > QVTKWidget *qvtkwidget = new QVTKWidget; > qvtkwidget->setSizePolicy(QSizePolicy::MinimumExpanding, > QSizePolicy::MinimumExpanding); > > auto renderer = vtkSmartPointer::New(); > > vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); > renderWindow->AddRenderer(renderer); > > auto axes = vtkSmartPointer::New(); > axes->SetXAxisLabelText("x"); > axes->SetYAxisLabelText("y"); > axes->SetZAxisLabelText("z"); > > auto orientationMarker = > vtkSmartPointer::New(); > orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); > orientationMarker->SetOrientationMarker(axes); > orientationMarker->SetEnabled(1);} > > Could you please tell me why this implementation is failing? > > Appreciate any help, > J?lio. > > 2014-12-19 14:50 GMT-08:00 J?lio Hoffimann : > > > Can anyone confirm QVTKWidget is not intended to be used as a local > > variable (see code bellow)? > > > > I'm getting a runtime error whenever the mouse cursor moves over the > > QVTKWidget window. > > > > -J?lio > > > > > >>> > VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent) > >>> > { > >>> > QVTKWidget *qvtkwidget = new QVTKWidget; > >>> > > >>> > auto axes = vtkSmartPointer::New(); > >>> > axes->SetXAxisLabelText("x"); > >>> > axes->SetYAxisLabelText("y"); > >>> > axes->SetZAxisLabelText("z"); > >>> > > >>> > auto orientationMarker = > >>> > vtkSmartPointer::New(); > >>> > orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); > >>> > orientationMarker->SetOrientationMarker(axes); > >>> > orientationMarker->SetEnabled(1); > >>> > > >>> > // sphere > >>> > auto sphereSource = vtkSmartPointer::New(); > >>> > sphereSource->SetCenter(8, 8, 8); > >>> > sphereSource->SetRadius(5.0); > >>> > auto mapper = vtkSmartPointer::New(); > >>> > mapper->SetInputConnection(sphereSource->GetOutputPort()); > >>> > auto actor = vtkSmartPointer::New(); > >>> > actor->SetMapper(mapper); > >>> > > >>> > auto renderer = vtkSmartPointer::New(); > >>> > renderer->AddActor(axes); > >>> > renderer->AddActor(actor); > >>> > > >>> > vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); > >>> > renderWindow->AddRenderer(renderer); > >>> > } > >>> > >> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141221/d5f6720a/attachment-0001.html > > > > ------------------------------ > > Message: 27 > Date: Mon, 22 Dec 2014 13:02:49 +0100 > From: Jean-Luc Szpyrka > To: vtkusers at vtk.org > Subject: [vtkusers] no crystal eye (quand_buffer) stereo with Qt5 / > VTK 6.1 / Nvidia > Message-ID: <638120AD-2199-4987-9A5B-6DD8E7767442 at inria.fr> > Content-Type: text/plain; charset="utf-8" > > Hi all, > > I am dealing with stereo rendering pb on VTK6 and Qt5. > > The attached code sample correctly displays stereo rendering > (quad_buffer/crystal eyes, but also other stereo types e.g > horizontal_split > or anaglyph) when compiled with QT4. It works with VTK6.0 and VTK6.1 > > The same code compiled with QT5 (5.3) and VTK6.1 does not render > quad_buffer stereo (anaglyph and horizontal_split stereo are OK). > > The host runs FedoraCore20, with the distrib version of Nvidia drivers > (331-39-2). Both binaries are linked with the same opengl dirvers. > > It is a known issue with quand_buffer rendering with VTK6.1 and QT5? > Or?. what did I wrong ? > > Here is the code: > > -- > Jean-luc.Szpyrka at inria.fr > Tel: (33/0) 4 92 38 79 69 > INRIA - 2004 route des lucioles - BP 93 - 06902 SOPHIA-ANTIPOLIS cedex > (France) > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/70b27b4d/attachment-0002.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: RenderWindowNoUiFile.cxx > Type: application/octet-stream > Size: 3167 bytes > Desc: not available > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/70b27b4d/attachment-0001.obj > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/70b27b4d/attachment-0003.html > > > > ------------------------------ > > Message: 28 > Date: Mon, 22 Dec 2014 15:07:54 +0000 (UTC) > From: Maarten Beek > To: VTK Users > Subject: [vtkusers] Bug in vtkContextInteractorStyle? > Message-ID: > < > 2060571987.116971.1419260874413.JavaMail.yahoo at jws100162.mail.ne1.yahoo.com > > > > Content-Type: text/plain; charset="utf-8" > > Hi all, > I happened to be looking at the source of the vtkContextInteractorStyle > class. > In the OnKeyPress() and OnKeyRelease() functions I see the folowwing: > vtkVector2i > position(this->Interactor->GetEventPosition()[0],??????????????????????????????? > this->Interactor->GetEventPosition()[0]); > which to me looks wrong. > Not sure whether one of the vtk developers has already been made aware of > this. > > Maarten > ? > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/4b299789/attachment-0001.html > > > > ------------------------------ > > Message: 29 > Date: Mon, 22 Dec 2014 17:49:16 +0000 (UTC) > From: Maarten Beek > To: VTK Users > Subject: [vtkusers] How to select a VtkPlot object in a vtkChart? > Message-ID: > < > 682874823.161846.1419270556334.JavaMail.yahoo at jws100171.mail.ne1.yahoo.com > > > > Content-Type: text/plain; charset="utf-8" > > Hi all, > I would like to know how I would select a vtkPlot (better: vtkPlotLine) > object in a vtkChart (better: vtkChartXY)? > I get the impression that only points can be selected in a > vtkContextScene. However, I have two vertical lines each with two (bottom > and top) points, to indicate a (threshold) range, and that I would like to > move left and right with my mouse.Would this be possible (or should I go > back to something like QCustomPlot)? > > Thanks - Maarten > ? > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/bde205cd/attachment.html > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > vtkusers mailing list > vtkusers at vtk.org > http://public.kitware.com/mailman/listinfo/vtkusers > > > ------------------------------ > > End of vtkusers Digest, Vol 128, Issue 9 > **************************************** > -- "There is plenty of room at the bottom!" R. Feynman -------------- next part -------------- An HTML attachment was scrubbed... URL: From castellanoslizan at gmail.com Tue Dec 23 11:22:43 2014 From: castellanoslizan at gmail.com (Lizeth Castellanos) Date: Tue, 23 Dec 2014 14:22:43 -0200 Subject: [vtkusers] Error in vtkPCAAnalysisFilter Message-ID: Hello vtk-users! I'm usign the TestPCA.py from http://vtk.org/gitwebp=VTK.git;a=blob;f=Filters/Hybrid/Testing/Python/TestPCA.py When I run the test, I get the next error: ERROR: In /media/hdd2/VTK/vtk-5.6.0/Filtering/vtkExecutive.cxx, line 757 vtkStreamingDemandDrivenPipeline (0x23a12e0): Algorithm vtkProcrustesAlignmentFilter(0x23a0400) returned failure for request: vtkInformation (0x23a18e0) Debug: Off Modified Time: 894 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA_OBJECT ALGORITHM_AFTER_FORWARD: 1 FORWARD_DIRECTION: 0 FROM_OUTPUT_PORT: 0 Traceback (most recent call last): File "TestPCA.py", line 63, in map2a.SetInputData(procrustes.GetOutput().GetBlock(0)) AttributeError: SetInputData Someone have any idea about it? Thanks! -Lizeth -------------- next part -------------- An HTML attachment was scrubbed... URL: From castellanoslizan at gmail.com Tue Dec 23 11:25:00 2014 From: castellanoslizan at gmail.com (Lizeth Castellanos) Date: Tue, 23 Dec 2014 14:25:00 -0200 Subject: [vtkusers] Error in vtkPCAAnalysisFilter In-Reply-To: References: Message-ID: The Code here: #!/usr/bin/env python import vtk from vtk.test import Testing # This example shows how to visualise the variation in shape in a set of objects using # vtkPCAAnalysisFilter. # # We make three ellipsoids by distorting and translating a sphere and then align them together # using vtkProcrustesAlignmentFilter, and then pass the output to vtkPCAAnalysisFilter. We visualise # the first and second modes - the major sources of variation that were in the training set. sphere = vtk.vtkSphereSource() sphere.SetPhiResolution(36) sphere.SetThetaResolution(36) sphere.Update() # make two copies of the shape and distort them a little transform1 = vtk.vtkTransform() transform1.Translate(0.2,0.1,0.3) transform1.Scale(1.3,1.1,0.8) transform2 = vtk.vtkTransform() transform2.Translate(0.3,0.7,0.1) transform2.Scale(1.0,0.1,1.8) transformer1 = vtk.vtkTransformPolyDataFilter() transformer1.SetInputConnection(sphere.GetOutputPort()) transformer1.SetTransform(transform1) transformer1.Update() transformer2 = vtk.vtkTransformPolyDataFilter() transformer2.SetInputConnection(sphere.GetOutputPort()) transformer2.SetTransform(transform2) transformer2.Update() #------------------------------------------------------------------ # map these three shapes into the first renderer #------------------------------------------------------------------ map1a = vtk.vtkPolyDataMapper() map1a.SetInputConnection(sphere.GetOutputPort()) Actor1a = vtk.vtkActor() Actor1a.SetMapper(map1a) Actor1a.GetProperty().SetDiffuseColor(1.0000,0.3882,0.2784) map1b = vtk.vtkPolyDataMapper() map1b.SetInputConnection(transformer1.GetOutputPort()) Actor1b = vtk.vtkActor() Actor1b.SetMapper(map1b) Actor1b.GetProperty().SetDiffuseColor(0.3882,1.0000,0.2784) map1c = vtk.vtkPolyDataMapper() map1c.SetInputConnection(transformer2.GetOutputPort()) Actor1c = vtk.vtkActor() Actor1c.SetMapper(map1c) Actor1c.GetProperty().SetDiffuseColor(0.3882,0.2784,1.0000) #------------------------------------------------------------------ # align the shapes using Procrustes (using SetModeToRigidBody) # and map the aligned shapes into the second renderer #------------------------------------------------------------------ group = vtk.vtkMultiBlockDataGroupFilter() group.AddInputConnection(sphere.GetOutputPort()) group.AddInputConnection(transformer1.GetOutputPort()) group.AddInputConnection(transformer2.GetOutputPort()) procrustes = vtk.vtkProcrustesAlignmentFilter() procrustes.SetInputConnection(group.GetOutputPort()) procrustes.GetLandmarkTransform().SetModeToRigidBody() procrustes.Update() map2a = vtk.vtkPolyDataMapper() map2a.SetInputData(procrustes.GetOutput().GetBlock(0)) Actor2a = vtk.vtkActor() Actor2a.SetMapper(map2a) Actor2a.GetProperty().SetDiffuseColor(1.0000,0.3882,0.2784) map2b = vtk.vtkPolyDataMapper() map2b.SetInputData(procrustes.GetOutput().GetBlock(1)) Actor2b = vtk.vtkActor() Actor2b.SetMapper(map2b) Actor2b.GetProperty().SetDiffuseColor(0.3882,1.0000,0.2784) map2c = vtk.vtkPolyDataMapper() map2c.SetInputData(procrustes.GetOutput().GetBlock(2)) Actor2c = vtk.vtkActor() Actor2c.SetMapper(map2c) Actor2c.GetProperty().SetDiffuseColor(0.3882,0.2784,1.0000) #------------------------------------------------------------------ # pass the output of Procrustes to vtkPCAAnalysisFilter #------------------------------------------------------------------ pca = vtk.vtkPCAAnalysisFilter() pca.SetInputConnection(procrustes.GetOutputPort()) pca.Update() # we need to call Update because GetParameterisedShape is not # part of the normal SetInput/GetOutput pipeline #------------------------------------------------------------------ # map the first mode into the third renderer: # -3,0,3 standard deviations on the first mode # illustrate the extremes around the average shape #------------------------------------------------------------------ params = vtk.vtkFloatArray() params.SetNumberOfComponents(1) params.SetNumberOfTuples(1) params.SetTuple1(0,0.0) shapea = vtk.vtkPolyData() shapea.DeepCopy(sphere.GetOutput()) pca.GetParameterisedShape(params,shapea) normalsa = vtk.vtkPolyDataNormals() normalsa.SetInputData(shapea) map3a = vtk.vtkPolyDataMapper() map3a.SetInputConnection(normalsa.GetOutputPort()) Actor3a = vtk.vtkActor() Actor3a.SetMapper(map3a) Actor3a.GetProperty().SetDiffuseColor(1,1,1) params.SetTuple1(0,-3.0) shapeb = vtk.vtkPolyData() shapeb.DeepCopy(sphere.GetOutput()) pca.GetParameterisedShape(params,shapeb) normalsb = vtk.vtkPolyDataNormals() normalsb.SetInputData(shapeb) map3b = vtk.vtkPolyDataMapper() map3b.SetInputConnection(normalsb.GetOutputPort()) Actor3b = vtk.vtkActor() Actor3b.SetMapper(map3b) Actor3b.GetProperty().SetDiffuseColor(1,1,1) params.SetTuple1(0,3.0) shapec = vtk.vtkPolyData() shapec.DeepCopy(sphere.GetOutput()) pca.GetParameterisedShape(params,shapec) normalsc = vtk.vtkPolyDataNormals() normalsc.SetInputData(shapec) map3c = vtk.vtkPolyDataMapper() map3c.SetInputConnection(normalsc.GetOutputPort()) Actor3c = vtk.vtkActor() Actor3c.SetMapper(map3c) Actor3c.GetProperty().SetDiffuseColor(1,1,1) #------------------------------------------------------------------ # map the second mode into the fourth renderer: #------------------------------------------------------------------ params4 = vtk.vtkFloatArray() params4.SetNumberOfComponents(1) params4.SetNumberOfTuples(2) params4.SetTuple1(0,0.0) params4.SetTuple1(1,-3.0) shape4a = vtk.vtkPolyData() shape4a.DeepCopy(sphere.GetOutput()) pca.GetParameterisedShape(params4,shape4a) normals4a = vtk.vtkPolyDataNormals() normals4a.SetInputData(shape4a) map4a = vtk.vtkPolyDataMapper() map4a.SetInputConnection(normals4a.GetOutputPort()) Actor4a = vtk.vtkActor() Actor4a.SetMapper(map4a) Actor4a.GetProperty().SetDiffuseColor(1,1,1) params4.SetTuple1(1,0.0) shape4b = vtk.vtkPolyData() shape4b.DeepCopy(sphere.GetOutput()) pca.GetParameterisedShape(params4,shape4b) normals4b = vtk.vtkPolyDataNormals() normals4b.SetInputData(shape4b) map4b = vtk.vtkPolyDataMapper() map4b.SetInputConnection(normals4b.GetOutputPort()) Actor4b = vtk.vtkActor() Actor4b.SetMapper(map4b) Actor4b.GetProperty().SetDiffuseColor(1,1,1) params4.SetTuple1(1,3.0) shape4c = vtk.vtkPolyData() shape4c.DeepCopy(sphere.GetOutput()) pca.GetParameterisedShape(params4,shape4c) normals4c = vtk.vtkPolyDataNormals() normals4c.SetInputData(shape4c) map4c = vtk.vtkPolyDataMapper() map4c.SetInputConnection(normals4c.GetOutputPort()) Actor4c = vtk.vtkActor() Actor4c.SetMapper(map4c) Actor4c.GetProperty().SetDiffuseColor(1,1,1) #------------------------------------------------------------------ # Create the RenderWindow and its four Renderers #------------------------------------------------------------------ ren1 = vtk.vtkRenderer() ren2 = vtk.vtkRenderer() ren3 = vtk.vtkRenderer() ren4 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) renWin.AddRenderer(ren2) renWin.AddRenderer(ren3) renWin.AddRenderer(ren4) renWin.SetSize(600,200) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # Add the actors to the renderer ren1.AddActor(Actor1a) ren1.AddActor(Actor1b) ren1.AddActor(Actor1c) ren2.AddActor(Actor2a) ren2.AddActor(Actor2b) ren2.AddActor(Actor2c) ren3.AddActor(Actor3a) ren3.AddActor(Actor3b) ren3.AddActor(Actor3c) ren4.AddActor(Actor4a) ren4.AddActor(Actor4b) ren4.AddActor(Actor4c) # set the properties of the renderers ren1.SetBackground(1,1,1) ren1.SetViewport(0.0,0.0,0.25,1.0) ren1.ResetCamera() ren1.GetActiveCamera().SetPosition(1,-1,0) ren1.ResetCamera() ren2.SetBackground(1,1,1) ren2.SetViewport(0.25,0.0,0.5,1.0) ren2.ResetCamera() ren2.GetActiveCamera().SetPosition(1,-1,0) ren2.ResetCamera() ren3.SetBackground(1,1,1) ren3.SetViewport(0.5,0.0,0.75,1.0) ren3.ResetCamera() ren3.GetActiveCamera().SetPosition(1,-1,0) ren3.ResetCamera() ren4.SetBackground(1,1,1) ren4.SetViewport(0.75,0.0,1.0,1.0) ren4.ResetCamera() ren4.GetActiveCamera().SetPosition(1,-1,0) ren4.ResetCamera() # render the image # renWin.Render() # output the image to file (used to generate the initial regression image) #vtkWindowToImageFilter to_image #to_image SetInput renWin #vtkPNGWriter to_png #to_png SetFileName "TestPCA.png" #to_png SetInputConnection [to_image GetOutputPort] #to_png Write # prevent the tk window from showing up then start the event loop # --- end of script -- On Tue, Dec 23, 2014 at 2:22 PM, Lizeth Castellanos < castellanoslizan at gmail.com> wrote: > Hello vtk-users! > > I'm usign the TestPCA.py from > http://vtk.org/gitwebp=VTK.git;a=blob;f=Filters/Hybrid/Testing/Python/TestPCA.py > > When I run the test, I get the next error: > > ERROR: In /media/hdd2/VTK/vtk-5.6.0/Filtering/vtkExecutive.cxx, line 757 > vtkStreamingDemandDrivenPipeline (0x23a12e0): Algorithm > vtkProcrustesAlignmentFilter(0x23a0400) returned failure for request: > vtkInformation (0x23a18e0) > Debug: Off > Modified Time: 894 > Reference Count: 1 > Registered Events: (none) > Request: REQUEST_DATA_OBJECT > ALGORITHM_AFTER_FORWARD: 1 > FORWARD_DIRECTION: 0 > FROM_OUTPUT_PORT: 0 > > Traceback (most recent call last): > File "TestPCA.py", line 63, in > map2a.SetInputData(procrustes.GetOutput().GetBlock(0)) > AttributeError: SetInputData > > Someone have any idea about it? > > > Thanks! > > -Lizeth > > > > > -- Lizeth Andrea Castellanos Beltr?n. MSc Student Federal University of Rio Grande do Sul (UFRGS) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Dec 23 11:41:09 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 23 Dec 2014 11:41:09 -0500 Subject: [vtkusers] Error in vtkPCAAnalysisFilter In-Reply-To: References: Message-ID: That test is for VTK6.x and you are running vtk5.6.0 On Tue, Dec 23, 2014 at 11:22 AM, Lizeth Castellanos wrote: > Hello vtk-users! > > I'm usign the TestPCA.py from > http://vtk.org/gitwebp=VTK.git;a=blob;f=Filters/Hybrid/Testing/Python/TestPCA.py > > When I run the test, I get the next error: > > ERROR: In /media/hdd2/VTK/vtk-5.6.0/Filtering/vtkExecutive.cxx, line 757 > vtkStreamingDemandDrivenPipeline (0x23a12e0): Algorithm > vtkProcrustesAlignmentFilter(0x23a0400) returned failure for request: > vtkInformation (0x23a18e0) > Debug: Off > Modified Time: 894 > Reference Count: 1 > Registered Events: (none) > Request: REQUEST_DATA_OBJECT > ALGORITHM_AFTER_FORWARD: 1 > FORWARD_DIRECTION: 0 > FROM_OUTPUT_PORT: 0 > > Traceback (most recent call last): > File "TestPCA.py", line 63, in > map2a.SetInputData(procrustes.GetOutput().GetBlock(0)) > AttributeError: SetInputData > > Someone have any idea about it? > > > Thanks! > > -Lizeth > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please 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 kantharaju.ds at gmail.com Wed Dec 24 04:35:00 2014 From: kantharaju.ds at gmail.com (Kantharaj) Date: Wed, 24 Dec 2014 15:05:00 +0530 Subject: [vtkusers] how to show legend Information while drawing 3d Chart Message-ID: Hello all, As in the vtkChartXY there is a function called SetShowLegend(bool) , just by calling this we can show/hide the legend information, but i am not finding such calls in vtkChartXYZ class.will be helpful if anybody through some light on it. how to achive this. -- *T*hanks & *R*egards, *K*antharaj -------------- next part -------------- An HTML attachment was scrubbed... URL: From cartik.sharma at gmail.com Wed Dec 24 14:31:00 2014 From: cartik.sharma at gmail.com (Cartik Sharma) Date: Wed, 24 Dec 2014 14:31:00 -0500 Subject: [vtkusers] vtkusers Digest, Vol 128, Issue 10 In-Reply-To: References: Message-ID: Thanks, Marcus, for pointing that out. I still dont know why my picked points are not showing up in the right position. Perhaps there is a way to ensure that the renderer for image plane widget is the same as the renderer for picking points. I'm also using vtkGenericOpenGLWindow for the render window. Perhaps it has something to do with that. Best regards, Cartik On Tue, Dec 23, 2014 at 11:25 AM, wrote: > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://public.kitware.com/mailman/listinfo/vtkusers > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. Re: Bug in vtkContextInteractorStyle? (Marcus D. Hanwell) > 2. Re: Bug in vtkContextInteractorStyle? (Marcus D. Hanwell) > 3. Re: How to select a VtkPlot object in a vtkChart? > (Marcus D. Hanwell) > 4. Re: How to select a VtkPlot object in a vtkChart? > (Marcus D. Hanwell) > 5. Re: vtkusers Digest, Vol 128, Issue 9 (Cartik Sharma) > 6. Error in vtkPCAAnalysisFilter (Lizeth Castellanos) > 7. Re: Error in vtkPCAAnalysisFilter (Lizeth Castellanos) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 22 Dec 2014 12:54:22 -0500 > From: "Marcus D. Hanwell" > To: Maarten Beek > Cc: VTK Users > Subject: Re: [vtkusers] Bug in vtkContextInteractorStyle? > Message-ID: > nWdQ at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Mon, Dec 22, 2014 at 10:07 AM, Maarten Beek via vtkusers > wrote: > > Hi all, > > > > I happened to be looking at the source of the vtkContextInteractorStyle > > class. > > > > In the OnKeyPress() and OnKeyRelease() functions I see the folowwing: > > > > vtkVector2i position(this->Interactor->GetEventPosition()[0], > > this->Interactor->GetEventPosition()[0]); > > > > which to me looks wrong. > > > > Not sure whether one of the vtk developers has already been made aware of > > this. > > > Thank you for pointing this out, I just submitted a patch to correct > this on Gerrit, > > > ------------------------------ > > Message: 2 > Date: Mon, 22 Dec 2014 12:55:20 -0500 > From: "Marcus D. Hanwell" > To: Maarten Beek > Cc: VTK Users > Subject: Re: [vtkusers] Bug in vtkContextInteractorStyle? > Message-ID: > < > CAMkPkZV2VKP3++_a_N3RbrYW3Sm_gHm7SHSuo1XVMsA88Rtjuw at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Mon, Dec 22, 2014 at 12:54 PM, Marcus D. Hanwell > wrote: > > On Mon, Dec 22, 2014 at 10:07 AM, Maarten Beek via vtkusers > > wrote: > >> Hi all, > >> > >> I happened to be looking at the source of the vtkContextInteractorStyle > >> class. > >> > >> In the OnKeyPress() and OnKeyRelease() functions I see the folowwing: > >> > >> vtkVector2i position(this->Interactor->GetEventPosition()[0], > >> > this->Interactor->GetEventPosition()[0]); > >> > >> which to me looks wrong. > >> > >> Not sure whether one of the vtk developers has already been made aware > of > >> this. > >> > > Thank you for pointing this out, I just submitted a patch to correct > > this on Gerrit, > > http://review.source.kitware.com/#/t/5213 > > Sorry, GMail is overly eager when I tried to paste the URL... > > Thanks, > > Marcus > > > ------------------------------ > > Message: 3 > Date: Mon, 22 Dec 2014 13:05:22 -0500 > From: "Marcus D. Hanwell" > To: Maarten Beek > Cc: VTK Users > Subject: Re: [vtkusers] How to select a VtkPlot object in a vtkChart? > Message-ID: > cSuKaSUivfqDZcUcHRfA at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Hi Maarten, > > On Mon, Dec 22, 2014 at 12:49 PM, Maarten Beek via vtkusers > wrote: > > Hi all, > > > > I would like to know how I would select a vtkPlot (better: vtkPlotLine) > > object in a vtkChart (better: vtkChartXY)? > > > > I get the impression that only points can be selected in a > vtkContextScene. > > However, I have two vertical lines each with two (bottom and top) > points, to > > indicate a (threshold) range, and that I would like to move left and > right > > with my mouse. > > Would this be possible (or should I go back to something like > QCustomPlot)? > > > I worked on a somewhat similar type of chart in the tomviz project, > see vtkChartHistogram in the CentralWidget.cxx file (that needs to be > split out/refactored, but should illustrate). It has a vertical line > marking the selected isosurface value the user clicked on > (vtkHistogramMarker). > > I think we should make this simpler, when you add a plot you get its > index, you can create a vtkPlotLine, add it to the chart, maintain a > pointer to it, and update that object in your own code too. > > Marcus > > > ------------------------------ > > Message: 4 > Date: Mon, 22 Dec 2014 13:05:52 -0500 > From: "Marcus D. Hanwell" > To: Maarten Beek > Cc: VTK Users > Subject: Re: [vtkusers] How to select a VtkPlot object in a vtkChart? > Message-ID: > Devj05UAA at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Mon, Dec 22, 2014 at 1:05 PM, Marcus D. Hanwell > wrote: > > Hi Maarten, > > > > On Mon, Dec 22, 2014 at 12:49 PM, Maarten Beek via vtkusers > > wrote: > >> Hi all, > >> > >> I would like to know how I would select a vtkPlot (better: vtkPlotLine) > >> object in a vtkChart (better: vtkChartXY)? > >> > >> I get the impression that only points can be selected in a > vtkContextScene. > >> However, I have two vertical lines each with two (bottom and top) > points, to > >> indicate a (threshold) range, and that I would like to move left and > right > >> with my mouse. > >> Would this be possible (or should I go back to something like > QCustomPlot)? > >> > > I worked on a somewhat similar type of chart in the tomviz project, > > see vtkChartHistogram in the CentralWidget.cxx file (that needs to be > > split out/refactored, but should illustrate). It has a vertical line > > marking the selected isosurface value the user clicked on > > (vtkHistogramMarker). > > > > I think we should make this simpler, when you add a plot you get its > > index, you can create a vtkPlotLine, add it to the chart, maintain a > > pointer to it, and update that object in your own code too. > > > Not enough coffee today...the link to the file I mentioned, > > https://github.com/OpenChemistry/tomviz/blob/master/CentralWidget.cxx > > Marcus > > > ------------------------------ > > Message: 5 > Date: Mon, 22 Dec 2014 17:30:16 -0500 > From: Cartik Sharma > To: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkusers Digest, Vol 128, Issue 9 > Message-ID: > < > CANP4vsizDJDxhxifpPFB0o_xonBaQvfYUvG0b+j0+GVN4EcNZQ at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > I have a question regarding the rendering a sphere at the point picked > with vtkPointPicker. > > I have setup style as a child class of vtkInteractorStyleTrackballCamera > where I > get the obtain coordinates of picked point from the current renderer, after > getting the current renderer from a findPokedRenderer call. > > When I set the picked point coordinates to a sphereActor with setPosition, > it does show up in the view window but not at the picked position. > > Is there some way to fix this. Thanks in advance. > > Best regards, > Cartik > > On Mon, Dec 22, 2014 at 12:49 PM, wrote: > > > Send vtkusers mailing list submissions to > > vtkusers at vtk.org > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://public.kitware.com/mailman/listinfo/vtkusers > > or, via email, send a message with subject or body 'help' to > > vtkusers-request at vtk.org > > > > You can reach the person managing the list at > > vtkusers-owner at vtk.org > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of vtkusers digest..." > > > > > > Today's Topics: > > > > 1. (no subject) (Allavali Ballary) > > 2. Re: Writing multi-paged tiff image (Bradley Lowekamp) > > 3. Re: Unwrap a cylinder of data using vtkCylindricalTransform > > and vtkImageReslice (Vincent32160) > > 4. Re: Unwrap a cylinder of data using vtkCylindricalTransform > > and vtkImageReslice (David Gobbi) > > 5. Re: Writing multi-paged tiff image (Maarten Beek) > > 6. Re: Unwrap a cylinder of data using vtkCylindricalTransform > > and vtkImageReslice (David Gobbi) > > 7. Re: Unwrap a cylinder of data using vtkCylindricalTransform > > and vtkImageReslice (Vincent32160) > > 8. Re: Unwrap a cylinder of data using vtkCylindricalTransform > > and vtkImageReslice (David Gobbi) > > 9. extract texture color from a vertex (marco) > > 10. Re: Unwrap a cylinder of data using vtkCylindricalTransform > > and vtkImageReslice (Vincent32160) > > 11. Re: Unwrap a cylinder of data using vtkCylindricalTransform > > and vtkImageReslice (David Gobbi) > > 12. get tcoords from pointId (marco) > > 13. vtk actor size on screen (sadml at flexynet.org) > > 14. Re: get tcoords from pointId (Cory Quammen) > > 15. Re: get tcoords from pointId (marco) > > 16. Re: get tcoords from pointId (marco) > > 17. Re: get tcoords from pointId (Cory Quammen) > > 18. Re: [VTK] Creating an OS X bundle for a VTK example using Qt > > (Jon Haitz Legarreta) > > 19. Clearing vtkPlot object (Maarten Beek) > > 20. Re: Clearing vtkPlot object (Marcus D. Hanwell) > > 21. Re: Clearing vtkPlot object (Maarten Beek) > > 22. Issues with VTK Delaunay 2D for simple cases (updega2) > > 23. Re: Axes marker not working as expected (J?lio Hoffimann) > > 24. Re: vtkTypeMacro warning (J?lio Hoffimann) > > 25. How to read a dicom and display in the in the windows (cvinllen) > > 26. Re: Axes marker not working as expected (J?lio Hoffimann) > > 27. no crystal eye (quand_buffer) stereo with Qt5 / VTK 6.1 / > > Nvidia (Jean-Luc Szpyrka) > > 28. Bug in vtkContextInteractorStyle? (Maarten Beek) > > 29. How to select a VtkPlot object in a vtkChart? (Maarten Beek) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Thu, 18 Dec 2014 13:47:32 +0000 > > From: "Allavali Ballary" > > To: "vtkusers at vtk.org" > > Subject: [vtkusers] (no subject) > > Message-ID: > > < > > 3BD743544268C04A827420A055435C93B8C178 at POCITMSEXMB06.LntUniverse.com> > > Content-Type: text/plain; charset="us-ascii" > > > > Hi, > > In Dicom image how to measure distance between two points, angle multiple > > times. > > Now I can measure one time, but I need to measure multiple times. > > > > Thanks & Regards, > > Allavali Ballary > > > > > > L&T Technology Services Ltd > > > > www.LntTechservices.com > > > > This Email may contain confidential or privileged information for the > > intended recipient (s). If you are not the intended recipient, please do > > not use or disseminate the information, notify the sender and delete it > > from your system. > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/09f5899a/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 2 > > Date: Thu, 18 Dec 2014 09:10:19 -0500 > > From: Bradley Lowekamp > > To: Maarten Beek > > Cc: David Gobbi , VTK Users > > Subject: Re: [vtkusers] Writing multi-paged tiff image > > Message-ID: <12B2ABE1-EAA7-4BC9-B7DB-7A51877FCEA8 at mail.nih.gov> > > Content-Type: text/plain; charset="us-ascii" > > > > Hello, > > > > I have recently refactored ITK's TIFFImageIO mostly for improving > reading, > > but it supports writing 3D images as multi-paged tiffs. You can utilized > > ITK ImageIO by using ITK's VTK bridge module [1]. Alternatively, you can > > look at ITK's implementation as see about porting it to VTK[2]. I believe > > the writing method still has an evident heritage from VTK. > > > > I am not a big fan for 3D tiffs because there is no standard way to store > > z-spacing and image origin. > > > > Brad > > > > [1] http://www.itk.org/Doxygen/html/group__ITKVTK.html > > [2] > > > https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/TIFF/src/itkTIFFImageIO.cxx#L504-L764 > > > > On Dec 17, 2014, at 4:42 PM, Maarten Beek via vtkusers > > > wrote: > > > > > Thanks for your reply David, > > > > > > I would like to write multi-page tiffs, but I might not be smart > enough. > > I see one tiff file with all images stitched together in a long column, > so > > I am thinking of a missing page return or something. But I guess that's a > > over-simplification ;-) > > > > > > vtkImageWriter works fine as long as I remember the extent, spacing and > > origin. > > > > > > Last year I saw multi-page tiff phloro images, now I see multi-page > tiff > > ct data; maybe vtktiffwriter will be 3d capable some day.... > > > > > > Maarten > > > > > > > > > On Wednesday, December 17, 2014 4:30 PM, David Gobbi < > > david.gobbi at gmail.com> wrote: > > > > > > > > > On Wed, Dec 17, 2014 at 2:10 PM, Maarten Beek > > wrote: > > > Hi David, > > > > > > Sorry, I'll try to remember. I did search the internet but couldn't > find > > a clear answer. > > > > > > I am a bit confused though, because vtkTiffReader reads multi-page > tiffs > > fine. What is preventing a multi-page writer? > > > > > > All that's missing is someone with the need to write multi-page files, > > who is willing to modify the writer so that it writes multi-page files! > It > > isn't a trivial project, because there are at least three different > > semi-standard ways of storing 3D data in TIFF, and they aren't entirely > > compatible with one another. > > > > > > Even with the reader, multi-page files were troublesome for a long > time, > > because it could read some 3D files but not others (again, because TIFF > > has several semi-standard ways of storing 3D data). TIFF was not > > initially designed to handle 3D, and all the ways of making it work with > 3D > > are a bit hackish. > > > > > > > > > What are my options in vtk? What writers do write 3d images? Does a > tool > > exist that puts multiple tiffs in one multi-page tiff? > > > > > > Well, right now NIFTI is my favorite 3D image format. I don't use TIFF > > much, so I don't know what TIFF tools are available. > > > > > > - 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: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/aa980cd3/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 3 > > Date: Thu, 18 Dec 2014 08:17:05 -0700 (MST) > > From: Vincent32160 > > To: vtkusers at vtk.org > > Subject: Re: [vtkusers] Unwrap a cylinder of data using > > vtkCylindricalTransform and vtkImageReslice > > Message-ID: <1418915825397-5729892.post at n5.nabble.com> > > Content-Type: text/plain; charset=us-ascii > > > > As I need to modify the angle from which the unrolling is starting I > would > > use the sophisticated solution you advise. > > If I understand correctly the starting reslice axes are a 4x4 matrix > > (-1,0,0,center[0],0,-1,0,center[1],0,0,1,center[2],0,0,0,0). > > If I need to apply an angle, I could use only the 3x3 matrix > > (-1,0,0,0,-1,0,0,0,1). > > Can you tell me if I am right? > > Thanks > > > > > > > > > > -- > > View this message in context: > > > http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729892.html > > Sent from the VTK - Users mailing list archive at Nabble.com. > > > > > > ------------------------------ > > > > Message: 4 > > Date: Thu, 18 Dec 2014 08:40:44 -0700 > > From: David Gobbi > > To: Vincent32160 > > Cc: VTK Users > > Subject: Re: [vtkusers] Unwrap a cylinder of data using > > vtkCylindricalTransform and vtkImageReslice > > Message-ID: > > > EzzQfZu1ncFxdkXWvSBaXwAAaLEgRb24KcL4+k0xaWhg at mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > On Thu, Dec 18, 2014 at 8:17 AM, Vincent32160 wrote: > > > > > > As I need to modify the angle from which the unrolling is starting I > > would > > > use the sophisticated solution you advise. > > > If I understand correctly the starting reslice axes are a 4x4 matrix > > > (-1,0,0,center[0],0,-1,0,center[1],0,0,1,center[2],0,0,0,0). > > > If I need to apply an angle, I could use only the 3x3 matrix > > > (-1,0,0,0,-1,0,0,0,1). > > > Can you tell me if I am right? > > > Thanks > > > > > > Yes, the 3x3 matrix controls the orientation of the cylinder, and > > the final column is where you want the center to be. > > > > However: the bottom row should always be (0,0,0,1). And I'm > > not sure why you put in the "-1"s. Is there a reason why you want > > to rotate by 180 degrees? > > > > - David > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/e69ba194/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 5 > > Date: Thu, 18 Dec 2014 15:43:25 +0000 (UTC) > > From: Maarten Beek > > To: Bradley Lowekamp > > Cc: David Gobbi , VTK Users > > Subject: Re: [vtkusers] Writing multi-paged tiff image > > Message-ID: > > < > > > 1485787823.490616.1418917405129.JavaMail.yahoo at jws100205.mail.ne1.yahoo.com > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Hey Bradley, > > Thanks for your reply, I'll have a look at the itk code. > > I just have some 3d tiff ct data and after soon processing, my first > > thought was to just save it in its original format. > > Thanks for your remark re. spacing and origin; I was about to send an > > email to the person who gave me the ct data, to ask about this data. I > now > > feel more confident that my code didn't screw up these numbers ;-) > > Maarten > > > > > > On Thursday, December 18, 2014 9:20 AM, Bradley Lowekamp < > > blowekamp at mail.nih.gov> wrote: > > > > > > Hello, > > I have recently refactored ITK's TIFFImageIO mostly for improving > reading, > > but it supports writing 3D images as multi-paged tiffs. You can utilized > > ITK ImageIO by using ITK's VTK bridge module [1]. Alternatively, you can > > look at ITK's implementation as see about porting it to VTK[2]. I believe > > the writing method still has an evident heritage from VTK. > > I am not a big fan for 3D tiffs because there is no standard way to store > > z-spacing and image origin. > > Brad > > [1]? > > > http://www.itk.org/Doxygen/html/group__ITKVTK.html[2]?https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/TIFF/src/itkTIFFImageIO.cxx#L504-L764 > > On Dec 17, 2014, at 4:42 PM, Maarten Beek via vtkusers > > > wrote: > > > > > > Thanks for your reply David, > > I would like to write multi-page tiffs, but I might not be smart enough. > I > > see one tiff file with all images stitched together in a long column, so > I > > am thinking of a missing page return or something. But I guess that's a > > over-simplification ;-) > > vtkImageWriter works fine as long as I remember the extent, spacing and > > origin. > > Last year I saw multi-page tiff phloro images, now I see multi-page tiff > > ct data; maybe vtktiffwriter will be 3d capable some day.... > > Maarten > > > > > > On Wednesday, December 17, 2014 4:30 PM, David Gobbi < > > david.gobbi at gmail.com> wrote: > > > > > > On Wed, Dec 17, 2014 at 2:10 PM, Maarten Beek > > wrote: > > Hi David, > > Sorry, I'll try to remember. I did search the internet but couldn't find > a > > clear answer. > > I am a bit confused though, because vtkTiffReader reads multi-page tiffs > > fine. What is preventing a multi-page writer? > > > > All that's missing is someone with the need to write multi-page files, > who > > is willing to modify the writer so that it writes multi-page files!? It > > isn't a trivial project, because there are at least three different > > semi-standard ways of storing 3D data in TIFF, and they aren't entirely > > compatible with one another. > > Even with the reader, multi-page files were troublesome for a long time, > > because it could read some 3D files but not others (again, because TIFF > has > > ?several semi-standard ways of storing 3D data).? TIFF was not initially > > designed to handle 3D, and all the ways of making it work with 3D are a > bit > > hackish. > > > > > > What are my options in vtk? What writers do write 3d images? Does a tool > > exist that puts multiple tiffs in one multi-page tiff? > > > > > > Well, right now NIFTI is my favorite 3D image format.? I don't use TIFF > > much, so I don't know what TIFF tools are available. ? > > ?- 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: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/00a72cdb/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 6 > > Date: Thu, 18 Dec 2014 08:46:47 -0700 > > From: David Gobbi > > To: Vincent32160 > > Cc: VTK Users > > Subject: Re: [vtkusers] Unwrap a cylinder of data using > > vtkCylindricalTransform and vtkImageReslice > > Message-ID: > > > 7Jt3Xr1jeMvnCA at mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > On Thu, Dec 18, 2014 at 8:40 AM, David Gobbi > > wrote: > > > > > > On Thu, Dec 18, 2014 at 8:17 AM, Vincent32160 > wrote: > > >> > > >> As I need to modify the angle from which the unrolling is starting I > > would > > >> use the sophisticated solution you advise. > > >> If I understand correctly the starting reslice axes are a 4x4 matrix > > >> (-1,0,0,center[0],0,-1,0,center[1],0,0,1,center[2],0,0,0,0). > > >> If I need to apply an angle, I could use only the 3x3 matrix > > >> (-1,0,0,0,-1,0,0,0,1). > > >> Can you tell me if I am right? > > >> Thanks > > > > > > > > > Yes, the 3x3 matrix controls the orientation of the cylinder, and > > > the final column is where you want the center to be. > > > > > > However: the bottom row should always be (0,0,0,1). And I'm > > > not sure why you put in the "-1"s. Is there a reason why you want > > > to rotate by 180 degrees? > > > > > > > > > I can add a little bit more information about how to set the 3x3 matrix. > > The third column of the 3x3 matrix must be a unit vector that points > > along the axis of the cylinder. The first and second columns must > > be perpendicular to the third axis, and must be perpendicular to each > > other (if they aren't, then the matrix isn't a rotation matrix). > > > > The method vtkMath::Perpendiculars() can be used to compute the > > three columns for the 3x3 matrix, if you know the axis of the cylinder. > > > > - David > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/cfeae831/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 7 > > Date: Thu, 18 Dec 2014 09:06:19 -0700 (MST) > > From: Vincent32160 > > To: vtkusers at vtk.org > > Subject: Re: [vtkusers] Unwrap a cylinder of data using > > vtkCylindricalTransform and vtkImageReslice > > Message-ID: <1418918779189-5729896.post at n5.nabble.com> > > Content-Type: text/plain; charset=us-ascii > > > > I put in the "-1"s because I reuse the matrix presented in your code > > (rotate.SetResliceAxesDirectionCosines( > > -1, 0, 0, > > 0, -1, 0, > > 0, 0, 1 ) ) > > Shouldn't I do this? > > > > > > > > -- > > View this message in context: > > > http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729896.html > > Sent from the VTK - Users mailing list archive at Nabble.com. > > > > > > ------------------------------ > > > > Message: 8 > > Date: Thu, 18 Dec 2014 09:15:36 -0700 > > From: David Gobbi > > To: Vincent32160 > > Cc: VTK Users > > Subject: Re: [vtkusers] Unwrap a cylinder of data using > > vtkCylindricalTransform and vtkImageReslice > > Message-ID: > > > FLjyETsEhX1Mo8zCGya22+TyFmSnDZnwAGSfJxBMbpUw at mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > On Thu, Dec 18, 2014 at 9:06 AM, Vincent32160 wrote: > > > > > > I put in the "-1"s because I reuse the matrix presented in your code > > > (rotate.SetResliceAxesDirectionCosines( > > > -1, 0, 0, > > > 0, -1, 0, > > > 0, 0, 1 ) ) > > > Shouldn't I do this? > > > > > > No, this isn't something that should be blindly copied. I added those > -1's > > because > > it set up the cylinder orientation properly for my data. You have > > different data, so > > you will probably need a different matrix. Does that make sense? > > > > - David > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/6daee451/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 9 > > Date: Thu, 18 Dec 2014 11:19:47 -0500 > > From: marco > > To: vtkusers at vtk.org > > Subject: [vtkusers] extract texture color from a vertex > > Message-ID: <5492FEA3.1010508 at gmail.com> > > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > > > Hello, > > I want to get the texture value from a cell! > > I have the cellid as result of intersectWithLine. > > > > After I get the list of vertices of the cell: > > vtkIdList* nghList = vtkIdList::New(); > > source->GetCellPoints(cellId, nghList); > > I iterate through the points in order to get their texture coordinates > > and interpolate them in the intersection position. > > Then with the (interpolated) texture coordinates, access the texture > > image to get the RGB point color! > > > > Is there a method faster than that? > > > > Thank you > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/ae5021c0/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 10 > > Date: Thu, 18 Dec 2014 09:25:00 -0700 (MST) > > From: Vincent32160 > > To: vtkusers at vtk.org > > Subject: Re: [vtkusers] Unwrap a cylinder of data using > > vtkCylindricalTransform and vtkImageReslice > > Message-ID: <1418919900723-5729899.post at n5.nabble.com> > > Content-Type: text/plain; charset=us-ascii > > > > That makes definitely sense. > > Apart this rotation and the variables radialSize and r, I got the > > impression > > that the rest of the code doesn't depend on the data. Do you agree with > > that? > > Thanks again > > > > > > David Gobbi wrote > > > On Thu, Dec 18, 2014 at 9:06 AM, Vincent32160 < > > > > > vsh@ > > > > > > wrote: > > >> > > >> I put in the "-1"s because I reuse the matrix presented in your code > > >> (rotate.SetResliceAxesDirectionCosines( > > >> -1, 0, 0, > > >> 0, -1, 0, > > >> 0, 0, 1 ) ) > > >> Shouldn't I do this? > > > > > > > > > No, this isn't something that should be blindly copied. I added those > > > -1's > > > because > > > it set up the cylinder orientation properly for my data. You have > > > different data, so > > > you will probably need a different matrix. Does that make sense? > > > > > > - 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 > > > > > > > > > > > > -- > > View this message in context: > > > http://vtk.1045678.n5.nabble.com/Unwrapping-a-cylinder-of-data-using-vtkCylindricalTransform-and-vtkImageReslice-tp5729719p5729899.html > > Sent from the VTK - Users mailing list archive at Nabble.com. > > > > > > ------------------------------ > > > > Message: 11 > > Date: Thu, 18 Dec 2014 09:34:20 -0700 > > From: David Gobbi > > To: Vincent32160 > > Cc: VTK Users > > Subject: Re: [vtkusers] Unwrap a cylinder of data using > > vtkCylindricalTransform and vtkImageReslice > > Message-ID: > > > B8O3p_psp_B4MNmoRRe_Lmdw_iGpmw at mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > On Thu, Dec 18, 2014 at 9:25 AM, Vincent32160 wrote: > > > > > > That makes definitely sense. > > > Apart this rotation and the variables radialSize and r, I got the > > > impression > > > that the rest of the code doesn't depend on the data. Do you agree with > > > that? > > > > > > > In addition to those, the code also assumes that the center of the > cylinder > > is at the center of the image, which might not be true for your data. > > > > That's why I said that you might want to use the full 4x4 ResliceAxes > > matrix > > instead of just using SetResliceAxesDirectionCosines. If you use a 4x4 > > matrix, you can use the 4th column of the matrix to adjust the center. > > > > - David > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141218/ef642198/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 12 > > Date: Thu, 18 Dec 2014 13:58:40 -0500 > > From: marco > > To: "vtkusers at vtk.org" > > Subject: [vtkusers] get tcoords from pointId > > Message-ID: <549323E0.3020402 at gmail.com> > > Content-Type: text/plain; charset=utf-8; format=flowed > > > > Hello, > > maybe it has been deprecated but I cannot find a method like > > GetTcoords(pointId)! > > Is there something similar in the library? > > > > Thank you > > > > > > > > ------------------------------ > > > > Message: 13 > > Date: Thu, 18 Dec 2014 20:14:21 +0100 > > From: "sadml at flexynet.org" > > To: vtkusers at vtk.org > > Subject: [vtkusers] vtk actor size on screen > > Message-ID: <5493278D.7080300 at flexynet.org> > > Content-Type: text/plain; charset=iso-8859-15; format=flowed > > > > Hello, > > I would need to acquire the sizes of actors in pixel on screen, is there > > any method already present among classes to accomplish that? > > Any alternate method you would suggest? > > Thanks for cooperation > > Regards > > > > Paolo > > > > > > ------------------------------ > > > > Message: 14 > > Date: Thu, 18 Dec 2014 14:33:42 -0500 > > From: Cory Quammen > > To: marco > > Cc: "vtkusers at vtk.org" > > Subject: Re: [vtkusers] get tcoords from pointId > > Message-ID: > > > aMj+Bj7HBAHZjHYK5fg4H8bfAE6LETdg at mail.gmail.com> > > Content-Type: text/plain; charset=UTF-8 > > > > Hi Marco, > > > > Texture coordinates are stored in an array in a vtkDataSet's > > vtkPointData object. Say you have a vtkPolyData with texture > > coordinates. To access it, you would do something like > > > > vtkPointData* pd = polyData->GetPointData(); > > vtkDataArray* tcoords = pd->GetTCoords(); > > > > // Let's assume the tcoords are in a vtkFloatArray > > vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); > > if (floatTCoords) > > { > > float texCoord[3]; > > floatTcoords->GetTupleValue(pointId, texCoord); > > > > // do something with texCoord > > } > > > > I hope that helps, > > Cory > > > > On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: > > > Hello, > > > maybe it has been deprecated but I cannot find a method like > > > GetTcoords(pointId)! > > > Is there something similar in the library? > > > > > > 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 > > > > > > > > -- > > Cory Quammen > > R&D Engineer > > Kitware, Inc. > > > > > > ------------------------------ > > > > Message: 15 > > Date: Thu, 18 Dec 2014 14:38:46 -0500 > > From: marco > > To: Cory Quammen > > Cc: "vtkusers at vtk.org" > > Subject: Re: [vtkusers] get tcoords from pointId > > Message-ID: <54932D46.3010504 at gmail.com> > > Content-Type: text/plain; charset=utf-8; format=flowed > > > > Thank you > > > > > > On 12/18/2014 02:33 PM, Cory Quammen wrote: > > > Hi Marco, > > > > > > Texture coordinates are stored in an array in a vtkDataSet's > > > vtkPointData object. Say you have a vtkPolyData with texture > > > coordinates. To access it, you would do something like > > > > > > vtkPointData* pd = polyData->GetPointData(); > > > vtkDataArray* tcoords = pd->GetTCoords(); > > > > > > // Let's assume the tcoords are in a vtkFloatArray > > > vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); > > > if (floatTCoords) > > > { > > > float texCoord[3]; > > > floatTcoords->GetTupleValue(pointId, texCoord); > > > > > > // do something with texCoord > > > } > > > > > > I hope that helps, > > > Cory > > > > > > On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: > > >> Hello, > > >> maybe it has been deprecated but I cannot find a method like > > >> GetTcoords(pointId)! > > >> Is there something similar in the library? > > >> > > >> 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 > > > > > > > > > > > > > > ------------------------------ > > > > Message: 16 > > Date: Thu, 18 Dec 2014 16:09:41 -0500 > > From: marco > > To: Cory Quammen > > Cc: "vtkusers at vtk.org" > > Subject: Re: [vtkusers] get tcoords from pointId > > Message-ID: <54934295.4080009 at gmail.com> > > Content-Type: text/plain; charset=utf-8; format=flowed > > > > Hello > > I was able to retrieve the tcoords for my Points. > > Now I'm trying to access the texture image to get the rgb value for that > > location. > > Is possible to use directly the tcoords to do that? or I have to compute > > the pixel coordinate with a transformation? > > > > Thank you for your help > > > > Marco > > > > > > On 12/18/2014 02:33 PM, Cory Quammen wrote: > > > Hi Marco, > > > > > > Texture coordinates are stored in an array in a vtkDataSet's > > > vtkPointData object. Say you have a vtkPolyData with texture > > > coordinates. To access it, you would do something like > > > > > > vtkPointData* pd = polyData->GetPointData(); > > > vtkDataArray* tcoords = pd->GetTCoords(); > > > > > > // Let's assume the tcoords are in a vtkFloatArray > > > vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); > > > if (floatTCoords) > > > { > > > float texCoord[3]; > > > floatTcoords->GetTupleValue(pointId, texCoord); > > > > > > // do something with texCoord > > > } > > > > > > I hope that helps, > > > Cory > > > > > > On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: > > >> Hello, > > >> maybe it has been deprecated but I cannot find a method like > > >> GetTcoords(pointId)! > > >> Is there something similar in the library? > > >> > > >> 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 > > > > > > > > > > > > > > ------------------------------ > > > > Message: 17 > > Date: Thu, 18 Dec 2014 16:22:49 -0500 > > From: Cory Quammen > > To: marco > > Cc: "vtkusers at vtk.org" > > Subject: Re: [vtkusers] get tcoords from pointId > > Message-ID: > > > gDdAkhkD5vsqFNKQoy-6yQNjPNnA at mail.gmail.com> > > Content-Type: text/plain; charset=UTF-8 > > > > Marco, > > > > I don't know of a class method that lets you look up the color given a > > texture coordinate. I think you'll have to compute the pixel > > coordinate, which shouldn't be too hard. > > > > - Cory > > > > On Thu, Dec 18, 2014 at 4:09 PM, marco wrote: > > > Hello > > > I was able to retrieve the tcoords for my Points. > > > Now I'm trying to access the texture image to get the rgb value for > that > > > location. > > > Is possible to use directly the tcoords to do that? or I have to > compute > > the > > > pixel coordinate with a transformation? > > > > > > Thank you for your help > > > > > > Marco > > > > > > > > > On 12/18/2014 02:33 PM, Cory Quammen wrote: > > >> > > >> Hi Marco, > > >> > > >> Texture coordinates are stored in an array in a vtkDataSet's > > >> vtkPointData object. Say you have a vtkPolyData with texture > > >> coordinates. To access it, you would do something like > > >> > > >> vtkPointData* pd = polyData->GetPointData(); > > >> vtkDataArray* tcoords = pd->GetTCoords(); > > >> > > >> // Let's assume the tcoords are in a vtkFloatArray > > >> vtkFloatArray* floatTcoords = vtkFloatArray::SafeDownCast(tcoords); > > >> if (floatTCoords) > > >> { > > >> float texCoord[3]; > > >> floatTcoords->GetTupleValue(pointId, texCoord); > > >> > > >> // do something with texCoord > > >> } > > >> > > >> I hope that helps, > > >> Cory > > >> > > >> On Thu, Dec 18, 2014 at 1:58 PM, marco wrote: > > >>> > > >>> Hello, > > >>> maybe it has been deprecated but I cannot find a method like > > >>> GetTcoords(pointId)! > > >>> Is there something similar in the library? > > >>> > > >>> 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 > > >> > > >> > > >> > > > > > > > > > > > -- > > Cory Quammen > > R&D Engineer > > Kitware, Inc. > > > > > > ------------------------------ > > > > Message: 18 > > Date: Fri, 19 Dec 2014 09:50:07 +0100 > > From: Jon Haitz Legarreta > > To: "vtkusers at vtk.org" > > Subject: Re: [vtkusers] [VTK] Creating an OS X bundle for a VTK > > example using Qt > > Message-ID: > > < > > CAAKhGh8gnoms1XM28pnHGiCtZpzD3Jj8gpk4jUP2mx-m1B-+xw at mail.gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Hi there, > > looks like the problem was unrelated to VTK or Qt themselves, but to the > > way we were trying to create the OS X bundle through our CMakeLists. > > > > Attached is a CMakeLists that should solve the issue. > > > > Please note that you will need to change the {VTK_BIN_PATH} for the > > location where your VTK binaries reside, for example > > /Users/your_username/Development/Binaries/VTK6/bin > > > > HTH, > > JON HAITZ > > > > > > > > On 15 December 2014 at 12:18, Jon Haitz Legarreta < > > jhlegarreta at vicomtech.org > > > wrote: > > > > > > Hi there, > > > we are having some trouble when trying to create an OS X bundle of an > > > imaging software of our own that uses ITK, VTK and Qt. > > > > > > We are using VTK 6.1.0 and Qt 5.3.2. And our OS X is Yosemite (10.10). > > > > > > In order to track the problem down, we tried to generate such a bundle > > for > > > one of the examples of VTK that uses Qt: QtVTKRenderWindows. > > > > > > The modified CMakeLists.txt is attached. > > > > > > We found that there seems to be a bug filed in kitware's CMake project > in > > > mantis [1]. It dates back to 2013. It seems to be still open. > > > > > > I am posting below the errors we get when trying to run our *.app just > in > > > case they are of any help. > > > > > > > > > Is this a problem strictly related to CMake, or either VTK or either Qt > > > for OS X platforms? > > > > > > > > > Does anybody know how to solve this issue? > > > > > > > > > Thank you, > > > JON HAITZ > > > > > > > > > > > > > > > > > > [1] http://public.kitware.com/Bug/view.php?id=14365 > > > > > > [-] Error trace: > > > > > > When executing the *.app, the application crashes, and OS X's crash > > report > > > shows this message (this is just the beginning): > > > > > > Process: QtVTKRenderWindows [17872] > > > Path: > > > > > > /Users/USER/Desktop/QtVTKRenderWindows.app/Contents/MacOS/QtVTKRenderWindows > > > Identifier: QtVTKRenderWindows > > > Version: ??? (???) > > > Code Type: X86-64 (Native) > > > Parent Process: ??? [1] > > > Responsible: QtVTKRenderWindows [17872] > > > User ID: 501 > > > Date/Time: 2014-12-15 10:30:23.381 +0100 > > > OS Version: Mac OS X 10.10.1 (14B25) > > > Report Version: 11 > > > Anonymous UUID: E9092016-A746-70A3-34F4-DC5791286273 > > > Sleep/Wake UUID: BAEA81DE-427D-44D8-BA6D-0189EBDA3FFD > > > Time Awake Since Boot: 42000 seconds > > > Time Since Wake: 5500 seconds > > > Crashed Thread: 0 Dispatch queue: com.apple.main-thread > > > Exception Type: EXC_CRASH (SIGABRT) > > > Exception Codes: 0x0000000000000000, 0x0000000000000000 > > > Application Specific Information: > > > abort() called > > > Thread 0 Crashed:: Dispatch queue: com.apple.main-thread > > > 0 libsystem_kernel.dylib 0x00007fff89fc9282 > __pthread_kill + > > > 10 > > > 1 libsystem_c.dylib 0x00007fff8f9bab73 abort + 129 > > > 2 QtCore 0x00000001084a6649 > > > qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) > + > > 9 > > > 3 QtCore 0x00000001084a7af1 > > > QMessageLogger::fatal(char const*, ...) const + 161 > > > 4 QtGui 0x0000000108ade948 > > > QGuiApplicationPrivate::createPlatformIntegration() + 5672 > > > 5 QtGui 0x0000000108ade96b > > > QGuiApplicationPrivate::createEventDispatcher() + 27 > > > 6 QtCore 0x00000001086ccc41 > > > QCoreApplication::init() + 113 > > > 7 QtCore 0x00000001086ccbb7 > > > QCoreApplication::QCoreApplication(QCoreApplicationPrivate&) + 39 > > > 8 QtGui 0x0000000108adc08e > > > QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) + 14 > > > 9 QtWidgets 0x0000000109085aae > > > QApplication::QApplication(int&, char**, int) + 206 > > > 10 0x0000000106c06c2c main + 60 > > > 11 libdyld.dylib 0x00007fff948c85c9 start + 1 > > > > > > > > > > > > If we try to execute the *.app from the command line, the error > displayed > > > reads: > > > > > > MAC0001-D:Desktop usuario$ open QtVTKRenderWindows.app > > > LSOpenURLsWithRole() failed with error -10810 for the file > > > /Users/usuario/Desktop/QtVTKRenderWindows.app. > > > MAC0001-D:Desktop usuario$ > > > QtVTKRenderWindows.app/Contents/MacOS/QtVTKRenderWindows > > > This application failed to start because it could not find or load the > Qt > > > platform plugin "cocoa". > > > > > > Reinstalling the application may fix this problem. > > > Abort trap: 6 > > > > > > > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141219/b25d0435/attachment-0001.html > > > > > -------------- next part -------------- > > project(QtVTKRenderWindows) > > > > cmake_minimum_required(VERSION 2.6) > > > > if(POLICY CMP0020) > > cmake_policy(SET CMP0020 NEW) > > endif() > > > > find_package(VTK COMPONENTS > > vtkCommonCore > > vtkFiltersSources > > vtkGUISupportQt > > vtkIOImage > > vtkInteractionImage > > ) > > include(${VTK_USE_FILE}) > > > > > > if("${VTK_QT_VERSION}" STREQUAL "") > > message(FATAL_ERROR "VTK was not built with Qt") > > endif() > > > > # Set your files and resources here > > set( Srcs QtVTKRenderWindowsApp.cxx QtVTKRenderWindows.cxx) > > > > set( Hdrs QtVTKRenderWindows.h ) > > > > set( MOC_Hdrs QtVTKRenderWindows.h ) > > > > set( UIs QtVTKRenderWindows.ui ) > > > > include_directories( > > ${CMAKE_CURRENT_BINARY_DIR} > > ${CMAKE_CURRENT_SOURCE_DIR} > > ) > > > > # Instruct CMake to run moc automatically when needed. > > set(CMAKE_AUTOMOC ON) > > > > INCLUDE(BundleUtilities) > > if(VTK_QT_VERSION VERSION_GREATER "4") > > find_package(Qt5Widgets REQUIRED QUIET) > > qt5_wrap_ui(UI_Srcs ${UIs}) > > > > # CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped. > > add_executable(QtVTKRenderWindows MACOSX_BUNDLE ${Srcs} ${Hdrs} > > ${UI_Srcs} ${MOC_Hdrs}) > > qt5_use_modules(QtVTKRenderWindows Core Gui Widgets) > > target_link_libraries(QtVTKRenderWindows ${VTK_LIBRARIES}) > > else() > > find_package(Qt4 REQUIRED) > > include(${QT_USE_FILE}) > > # Use what VTK built with > > set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "") > > set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "") > > set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "") > > qt4_wrap_ui(UI_Srcs ${UIs}) > > > > add_executable(QtVTKRenderWindows ${Srcs} ${Hdrs} ${UI_Srcs} > ${MOC_Hdrs}) > > target_link_libraries(QtVTKRenderWindows ${QT_LIBRARIES} > > ${VTK_LIBRARIES}) > > endif() > > > > SET(QT_PLUGINS_DIR ${_qt5Gui_install_prefix}/plugins) > > MESSAGE(WARNING "QT_PLUGINS_DIR:${QT_PLUGINS_DIR}") > > SET(QTPLUGINS > > > "{VTK_BIN_PATH}/QtVTKRenderWindows.app/Contents/PlugIns/platforms/libqcocoa.dylib;{VTK_BIN_PATH}/QtVTKRenderWindows.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib;{VTK_BIN_PATH}/QtVTKRenderWindows.app/Contents/PlugIns/accessible/libqtaccessiblequick.dylib") > > MESSAGE(WARNING "QTPLUGINS:${QTPLUGINS}") > > SET(QT_ADDITIONAL_PLUGINS ${QTPLUGINS}) > > MESSAGE(WARNING "QT_ADDITIONAL_PLUGINS:${QT_ADDITIONAL_PLUGINS}") > > > > > > ADD_CUSTOM_COMMAND(TARGET QtVTKRenderWindows > > POST_BUILD > > COMMAND /usr/local/Cellar/qt5/5.3.2/bin/macdeployqt ARGS > > {VTK_BIN_PATH}/QtVTKRenderWindows.app > > ) > > SET(BU_CHMOD_BUNDLE_ITEMS TRUE) > > FIXUP_BUNDLE({VTK_BIN_PATH}/QtVTKRenderWindows.app "" > > "${QT_INSTALL_PREFIX}/bin") > > VERIFY_BUNDLE_PREREQUISITES({VTK_BIN_PATH}/QtVTKRenderWindows.app > > QtVTKRenderWindows_BUNDLE_PREREQUISITES > > QtVTKRenderWindows_BUNDLE_PREREQUISITES_INFO) > > MESSAGE(WARNING > > > "QtVTKRenderWindows_BUNDLE_PREREQUISITES:${QtVTKRenderWindows_BUNDLE_PREREQUISITES}(${QtVTKRenderWindows_BUNDLE_PREREQUISITES_INFO})") > > > > ------------------------------ > > > > Message: 19 > > Date: Fri, 19 Dec 2014 15:12:52 +0000 (UTC) > > From: Maarten Beek > > To: VTK Users > > Subject: [vtkusers] Clearing vtkPlot object > > Message-ID: > > < > > > 80443368.768348.1419001972624.JavaMail.yahoo at jws100192.mail.ne1.yahoo.com> > > > > Content-Type: text/plain; charset="utf-8" > > > > Hi all, > > Yesterday I started exploring the options to draw 2d graphs in VTK. > > > > Why does > > m_pChart->GetPlot(0)->SetInputData(0); > > not remove the graph from my chart? > > > > I am currently using > > vtkTable* table = m_pChart->GetPlot(0)->GetInput();if( 0 != table ){??? > > while( 0? < table->GetNumberOfRows() )??? {??????? > > table->RemoveRow(0);????}} > > m_pChart->GetPlot(0)->GetData()->Modified(); // <- required! > > This works, but complains about trying to draw a line with less than 2 > > points. > > Thanks - Maarten > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141219/7016213a/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 20 > > Date: Fri, 19 Dec 2014 10:48:41 -0500 > > From: "Marcus D. Hanwell" > > To: Maarten Beek > > Cc: VTK Users > > Subject: Re: [vtkusers] Clearing vtkPlot object > > Message-ID: > > > ne_YEf7kDdG92erzcxncxgsUpcXpHh40Q at mail.gmail.com> > > Content-Type: text/plain; charset=UTF-8 > > > > On Fri, Dec 19, 2014 at 10:12 AM, Maarten Beek via vtkusers > > wrote: > > > Hi all, > > > > > > Yesterday I started exploring the options to draw 2d graphs in VTK. > > > > > > Why does > > > > > > m_pChart->GetPlot(0)->SetInputData(0); > > > > > > not remove the graph from my chart? > > > > > That isn't how the API was designed, you can call remove for a plot, > > or clear all plots. > > > > > > I am currently using > > > vtkTable* table = m_pChart->GetPlot(0)->GetInput(); > > > if( 0 != table ) > > > { > > > while( 0 < table->GetNumberOfRows() ) > > > { > > > table->RemoveRow(0); > > > } > > > } > > > > > > m_pChart->GetPlot(0)->GetData()->Modified(); // <- required! > > > > > Unless the data is marked as modified then the plot is cached, and it > > would be slow to rebuild on every render. This is pretty common in the > > VTK API, if an object is not marked as modified it is not surprising. > > I guess you might expect SetInputData on the plot to mark that as > > modified, which could be a bug in that method. > > > > Hope that makes it clearer, it has been a while since I went through > > all of this logic, and it is possible we still have one or two bugs > > lurking in there. > > > > Marcus > > > > > > ------------------------------ > > > > Message: 21 > > Date: Fri, 19 Dec 2014 16:17:00 +0000 (UTC) > > From: Maarten Beek > > To: "Marcus D. Hanwell" > > Cc: VTK Users > > Subject: Re: [vtkusers] Clearing vtkPlot object > > Message-ID: > > < > > > 458881052.783681.1419005820937.JavaMail.yahoo at jws100193.mail.ne1.yahoo.com > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > In the debugger, I followed the call > > m_pChart->GetPlot(0)->SetInputData(0); > > all the way into vtkContextMapper2D::SetInputConnection()? and it seems > to > > invoke the calls inputs->SetNumberOfInformationObjects(0); and > > this->Modified(). > > So although Modified() is called when the input is removed, I think the > > scene is not re-rendered (I don't get a warning re. a mapper w/o input > > either (what other mappers do)). > > Turning the visibility on/off using SetVisible() works fine. But I find > it > > weird that the data is still dangling.(I don't want to remove the plot, > > because that would mean I'll have to keep track of all the plot ids.) > > So I think my problem is gone, as long as I don't try to understand what > > is going on. ;-) > > Maarten > > > > > > > > On Friday, December 19, 2014 10:48 AM, Marcus D. Hanwell < > > marcus.hanwell at kitware.com> wrote: > > > > > > On Fri, Dec 19, 2014 at 10:12 AM, Maarten Beek via vtkusers > > wrote: > > > Hi all, > > > > > > Yesterday I started exploring the options to draw 2d graphs in VTK. > > > > > > Why does > > > > > > m_pChart->GetPlot(0)->SetInputData(0); > > > > > > not remove the graph from my chart? > > > > > That isn't how the API was designed, you can call remove for a plot, > > or clear all plots. > > > > > > I am currently using > > > vtkTable* table = m_pChart->GetPlot(0)->GetInput(); > > > if( 0 != table ) > > > { > > >? ? while( 0? < table->GetNumberOfRows() ) > > >? ? { > > >? ? ? ? table->RemoveRow(0); > > >? ? } > > > } > > > > > > m_pChart->GetPlot(0)->GetData()->Modified(); // <- required! > > > > > Unless the data is marked as modified then the plot is cached, and it > > would be slow to rebuild on every render. This is pretty common in the > > VTK API, if an object is not marked as modified it is not surprising. > > I guess you might expect SetInputData on the plot to mark that as > > modified, which could be a bug in that method. > > > > Hope that makes it clearer, it has been a while since I went through > > all of this logic, and it is possible we still have one or two bugs > > lurking in there. > > > > Marcus > > > > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141219/bdcd33f1/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 22 > > Date: Fri, 19 Dec 2014 14:15:48 -0700 (MST) > > From: updega2 > > To: vtkusers at vtk.org > > Subject: [vtkusers] Issues with VTK Delaunay 2D for simple cases > > Message-ID: <1419023748672-5729928.post at n5.nabble.com> > > Content-Type: text/plain; charset=us-ascii > > > > Hi, > > > > I am using vtkDelaunay2D for triangulation of cells in 3D based on lines > > and > > points. Each one of the cells prior to triangulation has the boundary of > a > > triangle. Obviously, there are other points and lines given within the > > triangle boundary, so there is something for the algorithm to > triangulate. > > Here are few bullet points describing what I am doing. > > > > 1. I use a transform to transform each cell to the xy plane prior to > > running > > vtkDelaunay2D > > > > 2. Each cell has a triangular boundary, but there are other lines/points > > within the boundary > > > > 3. I am doing a constrained delaunay (i.e. I am providing the triangular > > boundary, so that cells can not be added outside the cell boundary) > > > > This is working well besides what seems to be the easiest triangulations. > > By > > easiest, I mean that the cell to be retriangulated lies in the xy plane, > zx > > plane, or yz plane prior to the transformation. Something interesting to > > note, is if I take the transformed cell to be triangulated and I restrict > > the precision of the points in the cell to 6 or 7 digits, the > triangulation > > works for any input cell. However, I don't want to have to restrict the > > precision of the cell points, as that may cause issues later. > > > > I was wondering if anyone has ever seen similar issues, or if anyone has > > any > > insight into this? > > > > Thanks in advance, > > > > Adam > > > > > > > > > > > > -- > > View this message in context: > > > http://vtk.1045678.n5.nabble.com/Issues-with-VTK-Delaunay-2D-for-simple-cases-tp5729928.html > > Sent from the VTK - Users mailing list archive at Nabble.com. > > > > > > ------------------------------ > > > > Message: 23 > > Date: Fri, 19 Dec 2014 14:50:01 -0800 > > From: J?lio Hoffimann > > To: Bill Lorensen > > Cc: VTK Users > > Subject: Re: [vtkusers] Axes marker not working as expected > > Message-ID: > > < > > CAFRVdT8CaRRoWOYczrk6+-3mtfcqwsbhF0bue-+zR13yMU9dwg at mail.gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Can anyone confirm QVTKWidget is not intended to be used as a local > > variable (see code bellow)? > > > > I'm getting a runtime error whenever the mouse cursor moves over the > > QVTKWidget window. > > > > -J?lio > > > > > > >> > VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent) > > >> > { > > >> > QVTKWidget *qvtkwidget = new QVTKWidget; > > >> > > > >> > auto axes = vtkSmartPointer::New(); > > >> > axes->SetXAxisLabelText("x"); > > >> > axes->SetYAxisLabelText("y"); > > >> > axes->SetZAxisLabelText("z"); > > >> > > > >> > auto orientationMarker = > > >> > vtkSmartPointer::New(); > > >> > orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); > > >> > orientationMarker->SetOrientationMarker(axes); > > >> > orientationMarker->SetEnabled(1); > > >> > > > >> > // sphere > > >> > auto sphereSource = vtkSmartPointer::New(); > > >> > sphereSource->SetCenter(8, 8, 8); > > >> > sphereSource->SetRadius(5.0); > > >> > auto mapper = vtkSmartPointer::New(); > > >> > mapper->SetInputConnection(sphereSource->GetOutputPort()); > > >> > auto actor = vtkSmartPointer::New(); > > >> > actor->SetMapper(mapper); > > >> > > > >> > auto renderer = vtkSmartPointer::New(); > > >> > renderer->AddActor(axes); > > >> > renderer->AddActor(actor); > > >> > > > >> > vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); > > >> > renderWindow->AddRenderer(renderer); > > >> > } > > >> > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141219/feb6d740/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 24 > > Date: Fri, 19 Dec 2014 14:51:00 -0800 > > From: J?lio Hoffimann > > To: Sean McBride > > Cc: VTK Users > > Subject: Re: [vtkusers] vtkTypeMacro warning > > Message-ID: > > < > > CAFRVdT9PvBmRFqgMH_jkJc4se_TQ1EOWA+4DdQuhkmKimtjOMg at mail.gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > Hi Sean, > > > > Did you solved this issue? > > > > -J?lio > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141219/f1d9fa52/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 25 > > Date: Sat, 20 Dec 2014 21:34:05 +0800 > > From: cvinllen > > To: vtkusers at vtk.org > > Subject: [vtkusers] How to read a dicom and display in the in the > > windows > > Message-ID: <54957ACD.1060601 at gmail.com> > > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > > > Hello: > > I use vtk 4 before, last week, i install vtk 6, it's looks like > > some class and function changed. I write a simple code, read dicom and > > display, it's can run success before i update the vtk to 6: > > > > //read dicom > > vtkDICOMImageReader *reader = vtkDICOMImageReader::New(); > > reader->SetDataByteOrderToLittleEndian(); > > reader->SetDirectoryName(path.c_str()); > > reader->SetDataOrigin(0.0, 0.0, 0.0); > > > > //store in the vtkImageData > > vtkSmartPointer imageData = > > vtkSmartPointer::New(); > > imageData = reader->GetOutput(); > > > > //i think here has problem, because gdb show bug here > > vtkImageCast *cast = vtkImageCast::New(); > > cast->SetInputData(imageData); > > cast->ClampOverflowOn(); > > cast->SetOutputScalarTypeToUnsignedShort(); > > > > vtkPiecewiseFunction *opacityTransferFunction = > > vtkPiecewiseFunction::New(); > > opacityTransferFunction->RemoveAllPoints(); > > opacityTransferFunction->AddPoint(0, 0.0); > > opacityTransferFunction->AddPoint(255, 1); > > > > vtkColorTransferFunction *colorTransferFunction = > > vtkColorTransferFunction::New(); > > colorTransferFunction->RemoveAllPoints(); > > colorTransferFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); > > colorTransferFunction->AddRGBPoint(255, 1.0, 1.0, 1.0); > > > > vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New(); > > volumeProperty->SetColor(colorTransferFunction); > > volumeProperty->SetScalarOpacity(opacityTransferFunction); > > volumeProperty->ShadeOn(); > > volumeProperty->SetInterpolationTypeToLinear(); > > > > vtkVolumeRayCastCompositeFunction *compositeFunction = > > vtkVolumeRayCastCompositeFunction::New(); > > vtkVolumeRayCastMapper *volumeMapper = > vtkVolumeRayCastMapper::New(); > > volumeMapper->SetVolumeRayCastFunction(compositeFunction); > > volumeMapper->SetInputData(cast->GetOutput()); > > > > vtkVolume *volume = vtkVolume::New(); > > volume->SetMapper(volumeMapper); > > volume->SetProperty(volumeProperty); > > > > vtkCamera *aCamera = vtkCamera::New(); > > aCamera->SetViewUp (0, 0, -1); > > aCamera->SetPosition (0, 1, 0); > > aCamera->SetFocalPoint (0, 0, 0); > > aCamera->ComputeViewPlaneNormal(); > > aCamera->Dolly(1.0); > > > > vtkRenderer *renderer = vtkRenderer::New(); > > renderer->RemoveAllViewProps(); > > renderer->AddVolume(volume); > > renderer->SetActiveCamera(aCamera); > > renderer->SetBackground( 0,0,0 ); > > renderer->ResetCamera (); > > //renderer->Render(); > > > > vtkRenderWindow *renWin = vtkRenderWindow::New(); > > renWin->AddRenderer(renderer); > > renWin->SetSize(500, 500); > > renWin->Start(); > > renWin->Render(); // gdb show the bug occur > > > > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > > iren->SetRenderWindow(renWin); > > iren->Initialize(); > > iren->Start(); > > > > _the gdb show:_ > > [New Thread 0x7fffe1385700 (LWP 4012)] > > [Thread 0x7fffe1385700 (LWP 4012) exited] > > [New Thread 0x7fffe1385700 (LWP 4013)] > > [Thread 0x7fffe1385700 (LWP 4013) exited] > > [New Thread 0x7fffe1385700 (LWP 4014)] > > [Thread 0x7fffe1385700 (LWP 4014) exited] > > > > X Error of failed request: BadMatch (invalid parameter attributes) > > Major opcode of failed request: 156 (GLX) > > Minor opcode of failed request: 11 (X_GLXSwapBuffers) > > Serial number of failed request: 687 > > Current serial number in output stream: 687 > > [Inferior 1 (process 4006) exited with code 01] > > > > > > > > I dont kown what the difference between the vtk 6 and vtk 4, greate > > appreciates for anyone's reply! > > > > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141220/8b16a776/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 26 > > Date: Sun, 21 Dec 2014 18:45:48 -0800 > > From: J?lio Hoffimann > > To: Bill Lorensen > > Cc: VTK Users > > Subject: Re: [vtkusers] Axes marker not working as expected > > Message-ID: > > < > > CAFRVdT_Vm7tEvjubKHSHEGiTrDdmdasLK927hrog3V9Tmdrdsw at mail.gmail.com> > > Content-Type: text/plain; charset="utf-8" > > > > I recompiled VTK in debug mode and the vtkOrientationMarkerWidget > segfaults > > in line 350 of vtkOrientationMarkerWidget.cxx (see screenshot). > > > > I'm using VTK 6.2 from Git, Qt5, GCC 4.9, C++14. The current code that is > > causing the segfault is: > > > > VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent){ > > QVTKWidget *qvtkwidget = new QVTKWidget; > > qvtkwidget->setSizePolicy(QSizePolicy::MinimumExpanding, > > QSizePolicy::MinimumExpanding); > > > > auto renderer = vtkSmartPointer::New(); > > > > vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); > > renderWindow->AddRenderer(renderer); > > > > auto axes = vtkSmartPointer::New(); > > axes->SetXAxisLabelText("x"); > > axes->SetYAxisLabelText("y"); > > axes->SetZAxisLabelText("z"); > > > > auto orientationMarker = > > vtkSmartPointer::New(); > > orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); > > orientationMarker->SetOrientationMarker(axes); > > orientationMarker->SetEnabled(1);} > > > > Could you please tell me why this implementation is failing? > > > > Appreciate any help, > > J?lio. > > > > 2014-12-19 14:50 GMT-08:00 J?lio Hoffimann : > > > > > Can anyone confirm QVTKWidget is not intended to be used as a local > > > variable (see code bellow)? > > > > > > I'm getting a runtime error whenever the mouse cursor moves over the > > > QVTKWidget window. > > > > > > -J?lio > > > > > > > > >>> > VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent) > > >>> > { > > >>> > QVTKWidget *qvtkwidget = new QVTKWidget; > > >>> > > > >>> > auto axes = vtkSmartPointer::New(); > > >>> > axes->SetXAxisLabelText("x"); > > >>> > axes->SetYAxisLabelText("y"); > > >>> > axes->SetZAxisLabelText("z"); > > >>> > > > >>> > auto orientationMarker = > > >>> > vtkSmartPointer::New(); > > >>> > orientationMarker->SetInteractor(qvtkwidget->GetInteractor()); > > >>> > orientationMarker->SetOrientationMarker(axes); > > >>> > orientationMarker->SetEnabled(1); > > >>> > > > >>> > // sphere > > >>> > auto sphereSource = vtkSmartPointer::New(); > > >>> > sphereSource->SetCenter(8, 8, 8); > > >>> > sphereSource->SetRadius(5.0); > > >>> > auto mapper = vtkSmartPointer::New(); > > >>> > mapper->SetInputConnection(sphereSource->GetOutputPort()); > > >>> > auto actor = vtkSmartPointer::New(); > > >>> > actor->SetMapper(mapper); > > >>> > > > >>> > auto renderer = vtkSmartPointer::New(); > > >>> > renderer->AddActor(axes); > > >>> > renderer->AddActor(actor); > > >>> > > > >>> > vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow(); > > >>> > renderWindow->AddRenderer(renderer); > > >>> > } > > >>> > > >> > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141221/d5f6720a/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 27 > > Date: Mon, 22 Dec 2014 13:02:49 +0100 > > From: Jean-Luc Szpyrka > > To: vtkusers at vtk.org > > Subject: [vtkusers] no crystal eye (quand_buffer) stereo with Qt5 / > > VTK 6.1 / Nvidia > > Message-ID: <638120AD-2199-4987-9A5B-6DD8E7767442 at inria.fr> > > Content-Type: text/plain; charset="utf-8" > > > > Hi all, > > > > I am dealing with stereo rendering pb on VTK6 and Qt5. > > > > The attached code sample correctly displays stereo rendering > > (quad_buffer/crystal eyes, but also other stereo types e.g > > horizontal_split > > or anaglyph) when compiled with QT4. It works with VTK6.0 and VTK6.1 > > > > The same code compiled with QT5 (5.3) and VTK6.1 does not render > > quad_buffer stereo (anaglyph and horizontal_split stereo are OK). > > > > The host runs FedoraCore20, with the distrib version of Nvidia drivers > > (331-39-2). Both binaries are linked with the same opengl dirvers. > > > > It is a known issue with quand_buffer rendering with VTK6.1 and QT5? > > Or?. what did I wrong ? > > > > Here is the code: > > > > -- > > Jean-luc.Szpyrka at inria.fr > > Tel: (33/0) 4 92 38 79 69 > > INRIA - 2004 route des lucioles - BP 93 - 06902 SOPHIA-ANTIPOLIS cedex > > (France) > > > > > > > > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/70b27b4d/attachment-0002.html > > > > > -------------- next part -------------- > > A non-text attachment was scrubbed... > > Name: RenderWindowNoUiFile.cxx > > Type: application/octet-stream > > Size: 3167 bytes > > Desc: not available > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/70b27b4d/attachment-0001.obj > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/70b27b4d/attachment-0003.html > > > > > > > ------------------------------ > > > > Message: 28 > > Date: Mon, 22 Dec 2014 15:07:54 +0000 (UTC) > > From: Maarten Beek > > To: VTK Users > > Subject: [vtkusers] Bug in vtkContextInteractorStyle? > > Message-ID: > > < > > > 2060571987.116971.1419260874413.JavaMail.yahoo at jws100162.mail.ne1.yahoo.com > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Hi all, > > I happened to be looking at the source of the vtkContextInteractorStyle > > class. > > In the OnKeyPress() and OnKeyRelease() functions I see the folowwing: > > vtkVector2i > > > position(this->Interactor->GetEventPosition()[0],??????????????????????????????? > > this->Interactor->GetEventPosition()[0]); > > which to me looks wrong. > > Not sure whether one of the vtk developers has already been made aware of > > this. > > > > Maarten > > ? > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/4b299789/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 29 > > Date: Mon, 22 Dec 2014 17:49:16 +0000 (UTC) > > From: Maarten Beek > > To: VTK Users > > Subject: [vtkusers] How to select a VtkPlot object in a vtkChart? > > Message-ID: > > < > > > 682874823.161846.1419270556334.JavaMail.yahoo at jws100171.mail.ne1.yahoo.com > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Hi all, > > I would like to know how I would select a vtkPlot (better: vtkPlotLine) > > object in a vtkChart (better: vtkChartXY)? > > I get the impression that only points can be selected in a > > vtkContextScene. However, I have two vertical lines each with two (bottom > > and top) points, to indicate a (threshold) range, and that I would like > to > > move left and right with my mouse.Would this be possible (or should I go > > back to something like QCustomPlot)? > > > > Thanks - Maarten > > ? > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/bde205cd/attachment.html > > > > > > > ------------------------------ > > > > Subject: Digest Footer > > > > _______________________________________________ > > vtkusers mailing list > > vtkusers at vtk.org > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > ------------------------------ > > > > End of vtkusers Digest, Vol 128, Issue 9 > > **************************************** > > > > > > -- > "There is plenty of room at the bottom!" R. Feynman > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141222/f587450d/attachment-0001.html > > > > ------------------------------ > > Message: 6 > Date: Tue, 23 Dec 2014 14:22:43 -0200 > From: Lizeth Castellanos > To: vtkusers at vtk.org > Subject: [vtkusers] Error in vtkPCAAnalysisFilter > Message-ID: > < > CAHFO-cdeOWVj1r7Ai_4qWzLO9jufsMAJJxY2v-M7PZsAUR7myw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello vtk-users! > > I'm usign the TestPCA.py from > > http://vtk.org/gitwebp=VTK.git;a=blob;f=Filters/Hybrid/Testing/Python/TestPCA.py > > When I run the test, I get the next error: > > ERROR: In /media/hdd2/VTK/vtk-5.6.0/Filtering/vtkExecutive.cxx, line 757 > vtkStreamingDemandDrivenPipeline (0x23a12e0): Algorithm > vtkProcrustesAlignmentFilter(0x23a0400) returned failure for request: > vtkInformation (0x23a18e0) > Debug: Off > Modified Time: 894 > Reference Count: 1 > Registered Events: (none) > Request: REQUEST_DATA_OBJECT > ALGORITHM_AFTER_FORWARD: 1 > FORWARD_DIRECTION: 0 > FROM_OUTPUT_PORT: 0 > > Traceback (most recent call last): > File "TestPCA.py", line 63, in > map2a.SetInputData(procrustes.GetOutput().GetBlock(0)) > AttributeError: SetInputData > > Someone have any idea about it? > > > Thanks! > > -Lizeth > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141223/c35fbcec/attachment-0001.html > > > > ------------------------------ > > Message: 7 > Date: Tue, 23 Dec 2014 14:25:00 -0200 > From: Lizeth Castellanos > To: vtkusers at vtk.org > Subject: Re: [vtkusers] Error in vtkPCAAnalysisFilter > Message-ID: > < > CAHFO-ceQef3YnaKG7BW6NT-yCnA1bvW+oyYT10A-9qjV8AzHKg at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > The Code here: > > #!/usr/bin/env python > import vtk > from vtk.test import Testing > > > > # This example shows how to visualise the variation in shape in a set of > objects using > # vtkPCAAnalysisFilter. > # > # We make three ellipsoids by distorting and translating a sphere and then > align them together > # using vtkProcrustesAlignmentFilter, and then pass the output to > vtkPCAAnalysisFilter. We visualise > # the first and second modes - the major sources of variation that were in > the training set. > sphere = vtk.vtkSphereSource() > sphere.SetPhiResolution(36) > sphere.SetThetaResolution(36) > sphere.Update() > # make two copies of the shape and distort them a little > transform1 = vtk.vtkTransform() > transform1.Translate(0.2,0.1,0.3) > transform1.Scale(1.3,1.1,0.8) > transform2 = vtk.vtkTransform() > transform2.Translate(0.3,0.7,0.1) > transform2.Scale(1.0,0.1,1.8) > transformer1 = vtk.vtkTransformPolyDataFilter() > transformer1.SetInputConnection(sphere.GetOutputPort()) > transformer1.SetTransform(transform1) > transformer1.Update() > transformer2 = vtk.vtkTransformPolyDataFilter() > transformer2.SetInputConnection(sphere.GetOutputPort()) > transformer2.SetTransform(transform2) > transformer2.Update() > #------------------------------------------------------------------ > # map these three shapes into the first renderer > #------------------------------------------------------------------ > map1a = vtk.vtkPolyDataMapper() > map1a.SetInputConnection(sphere.GetOutputPort()) > Actor1a = vtk.vtkActor() > Actor1a.SetMapper(map1a) > Actor1a.GetProperty().SetDiffuseColor(1.0000,0.3882,0.2784) > map1b = vtk.vtkPolyDataMapper() > map1b.SetInputConnection(transformer1.GetOutputPort()) > Actor1b = vtk.vtkActor() > Actor1b.SetMapper(map1b) > Actor1b.GetProperty().SetDiffuseColor(0.3882,1.0000,0.2784) > map1c = vtk.vtkPolyDataMapper() > map1c.SetInputConnection(transformer2.GetOutputPort()) > Actor1c = vtk.vtkActor() > Actor1c.SetMapper(map1c) > Actor1c.GetProperty().SetDiffuseColor(0.3882,0.2784,1.0000) > #------------------------------------------------------------------ > # align the shapes using Procrustes (using SetModeToRigidBody) > # and map the aligned shapes into the second renderer > #------------------------------------------------------------------ > group = vtk.vtkMultiBlockDataGroupFilter() > group.AddInputConnection(sphere.GetOutputPort()) > group.AddInputConnection(transformer1.GetOutputPort()) > group.AddInputConnection(transformer2.GetOutputPort()) > procrustes = vtk.vtkProcrustesAlignmentFilter() > procrustes.SetInputConnection(group.GetOutputPort()) > procrustes.GetLandmarkTransform().SetModeToRigidBody() > procrustes.Update() > map2a = vtk.vtkPolyDataMapper() > map2a.SetInputData(procrustes.GetOutput().GetBlock(0)) > Actor2a = vtk.vtkActor() > Actor2a.SetMapper(map2a) > Actor2a.GetProperty().SetDiffuseColor(1.0000,0.3882,0.2784) > map2b = vtk.vtkPolyDataMapper() > map2b.SetInputData(procrustes.GetOutput().GetBlock(1)) > Actor2b = vtk.vtkActor() > Actor2b.SetMapper(map2b) > Actor2b.GetProperty().SetDiffuseColor(0.3882,1.0000,0.2784) > map2c = vtk.vtkPolyDataMapper() > map2c.SetInputData(procrustes.GetOutput().GetBlock(2)) > Actor2c = vtk.vtkActor() > Actor2c.SetMapper(map2c) > Actor2c.GetProperty().SetDiffuseColor(0.3882,0.2784,1.0000) > #------------------------------------------------------------------ > # pass the output of Procrustes to vtkPCAAnalysisFilter > #------------------------------------------------------------------ > pca = vtk.vtkPCAAnalysisFilter() > pca.SetInputConnection(procrustes.GetOutputPort()) > pca.Update() > # we need to call Update because GetParameterisedShape is not > # part of the normal SetInput/GetOutput pipeline > #------------------------------------------------------------------ > # map the first mode into the third renderer: > # -3,0,3 standard deviations on the first mode > # illustrate the extremes around the average shape > #------------------------------------------------------------------ > params = vtk.vtkFloatArray() > params.SetNumberOfComponents(1) > params.SetNumberOfTuples(1) > params.SetTuple1(0,0.0) > shapea = vtk.vtkPolyData() > shapea.DeepCopy(sphere.GetOutput()) > pca.GetParameterisedShape(params,shapea) > normalsa = vtk.vtkPolyDataNormals() > normalsa.SetInputData(shapea) > map3a = vtk.vtkPolyDataMapper() > map3a.SetInputConnection(normalsa.GetOutputPort()) > Actor3a = vtk.vtkActor() > Actor3a.SetMapper(map3a) > Actor3a.GetProperty().SetDiffuseColor(1,1,1) > params.SetTuple1(0,-3.0) > shapeb = vtk.vtkPolyData() > shapeb.DeepCopy(sphere.GetOutput()) > pca.GetParameterisedShape(params,shapeb) > normalsb = vtk.vtkPolyDataNormals() > normalsb.SetInputData(shapeb) > map3b = vtk.vtkPolyDataMapper() > map3b.SetInputConnection(normalsb.GetOutputPort()) > Actor3b = vtk.vtkActor() > Actor3b.SetMapper(map3b) > Actor3b.GetProperty().SetDiffuseColor(1,1,1) > params.SetTuple1(0,3.0) > shapec = vtk.vtkPolyData() > shapec.DeepCopy(sphere.GetOutput()) > pca.GetParameterisedShape(params,shapec) > normalsc = vtk.vtkPolyDataNormals() > normalsc.SetInputData(shapec) > map3c = vtk.vtkPolyDataMapper() > map3c.SetInputConnection(normalsc.GetOutputPort()) > Actor3c = vtk.vtkActor() > Actor3c.SetMapper(map3c) > Actor3c.GetProperty().SetDiffuseColor(1,1,1) > #------------------------------------------------------------------ > # map the second mode into the fourth renderer: > #------------------------------------------------------------------ > params4 = vtk.vtkFloatArray() > params4.SetNumberOfComponents(1) > params4.SetNumberOfTuples(2) > params4.SetTuple1(0,0.0) > params4.SetTuple1(1,-3.0) > shape4a = vtk.vtkPolyData() > shape4a.DeepCopy(sphere.GetOutput()) > pca.GetParameterisedShape(params4,shape4a) > normals4a = vtk.vtkPolyDataNormals() > normals4a.SetInputData(shape4a) > map4a = vtk.vtkPolyDataMapper() > map4a.SetInputConnection(normals4a.GetOutputPort()) > Actor4a = vtk.vtkActor() > Actor4a.SetMapper(map4a) > Actor4a.GetProperty().SetDiffuseColor(1,1,1) > params4.SetTuple1(1,0.0) > shape4b = vtk.vtkPolyData() > shape4b.DeepCopy(sphere.GetOutput()) > pca.GetParameterisedShape(params4,shape4b) > normals4b = vtk.vtkPolyDataNormals() > normals4b.SetInputData(shape4b) > map4b = vtk.vtkPolyDataMapper() > map4b.SetInputConnection(normals4b.GetOutputPort()) > Actor4b = vtk.vtkActor() > Actor4b.SetMapper(map4b) > Actor4b.GetProperty().SetDiffuseColor(1,1,1) > params4.SetTuple1(1,3.0) > shape4c = vtk.vtkPolyData() > shape4c.DeepCopy(sphere.GetOutput()) > pca.GetParameterisedShape(params4,shape4c) > normals4c = vtk.vtkPolyDataNormals() > normals4c.SetInputData(shape4c) > map4c = vtk.vtkPolyDataMapper() > map4c.SetInputConnection(normals4c.GetOutputPort()) > Actor4c = vtk.vtkActor() > Actor4c.SetMapper(map4c) > Actor4c.GetProperty().SetDiffuseColor(1,1,1) > #------------------------------------------------------------------ > # Create the RenderWindow and its four Renderers > #------------------------------------------------------------------ > ren1 = vtk.vtkRenderer() > ren2 = vtk.vtkRenderer() > ren3 = vtk.vtkRenderer() > ren4 = vtk.vtkRenderer() > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren1) > renWin.AddRenderer(ren2) > renWin.AddRenderer(ren3) > renWin.AddRenderer(ren4) > renWin.SetSize(600,200) > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > # Add the actors to the renderer > ren1.AddActor(Actor1a) > ren1.AddActor(Actor1b) > ren1.AddActor(Actor1c) > ren2.AddActor(Actor2a) > ren2.AddActor(Actor2b) > ren2.AddActor(Actor2c) > ren3.AddActor(Actor3a) > ren3.AddActor(Actor3b) > ren3.AddActor(Actor3c) > ren4.AddActor(Actor4a) > ren4.AddActor(Actor4b) > ren4.AddActor(Actor4c) > # set the properties of the renderers > ren1.SetBackground(1,1,1) > ren1.SetViewport(0.0,0.0,0.25,1.0) > ren1.ResetCamera() > ren1.GetActiveCamera().SetPosition(1,-1,0) > ren1.ResetCamera() > ren2.SetBackground(1,1,1) > ren2.SetViewport(0.25,0.0,0.5,1.0) > ren2.ResetCamera() > ren2.GetActiveCamera().SetPosition(1,-1,0) > ren2.ResetCamera() > ren3.SetBackground(1,1,1) > ren3.SetViewport(0.5,0.0,0.75,1.0) > ren3.ResetCamera() > ren3.GetActiveCamera().SetPosition(1,-1,0) > ren3.ResetCamera() > ren4.SetBackground(1,1,1) > ren4.SetViewport(0.75,0.0,1.0,1.0) > ren4.ResetCamera() > ren4.GetActiveCamera().SetPosition(1,-1,0) > ren4.ResetCamera() > # render the image > # > renWin.Render() > # output the image to file (used to generate the initial regression image) > #vtkWindowToImageFilter to_image > #to_image SetInput renWin > #vtkPNGWriter to_png > #to_png SetFileName "TestPCA.png" > #to_png SetInputConnection [to_image GetOutputPort] > #to_png Write > # prevent the tk window from showing up then start the event loop > # --- end of script -- > > > On Tue, Dec 23, 2014 at 2:22 PM, Lizeth Castellanos < > castellanoslizan at gmail.com> wrote: > > > Hello vtk-users! > > > > I'm usign the TestPCA.py from > > > http://vtk.org/gitwebp=VTK.git;a=blob;f=Filters/Hybrid/Testing/Python/TestPCA.py > > > > When I run the test, I get the next error: > > > > ERROR: In /media/hdd2/VTK/vtk-5.6.0/Filtering/vtkExecutive.cxx, line 757 > > vtkStreamingDemandDrivenPipeline (0x23a12e0): Algorithm > > vtkProcrustesAlignmentFilter(0x23a0400) returned failure for request: > > vtkInformation (0x23a18e0) > > Debug: Off > > Modified Time: 894 > > Reference Count: 1 > > Registered Events: (none) > > Request: REQUEST_DATA_OBJECT > > ALGORITHM_AFTER_FORWARD: 1 > > FORWARD_DIRECTION: 0 > > FROM_OUTPUT_PORT: 0 > > > > Traceback (most recent call last): > > File "TestPCA.py", line 63, in > > map2a.SetInputData(procrustes.GetOutput().GetBlock(0)) > > AttributeError: SetInputData > > > > Someone have any idea about it? > > > > > > Thanks! > > > > -Lizeth > > > > > > > > > > > > > -- > Lizeth Andrea Castellanos Beltr?n. > MSc Student > Federal University of Rio Grande do Sul (UFRGS) > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20141223/b4cb38b5/attachment.html > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > vtkusers mailing list > vtkusers at vtk.org > http://public.kitware.com/mailman/listinfo/vtkusers > > > ------------------------------ > > End of vtkusers Digest, Vol 128, Issue 10 > ***************************************** > -- "There is plenty of room at the bottom!" R. Feynman -------------- next part -------------- An HTML attachment was scrubbed... URL: From cvinllen at gmail.com Fri Dec 26 03:01:05 2014 From: cvinllen at gmail.com (cvinllen) Date: Fri, 26 Dec 2014 16:01:05 +0800 Subject: [vtkusers] How does vtk 6 read dicom and in 3d Visualization? Message-ID: <549D15C1.4020009@gmail.com> Hi, all: I used vtk4 before, but now, i update my vtk 4 to 6, but i can't run my code success. Does anyone have code to read dicom and 3d Visualization? From cvinllen at gmail.com Fri Dec 26 21:19:05 2014 From: cvinllen at gmail.com (cvinllen) Date: Sat, 27 Dec 2014 10:19:05 +0800 Subject: [vtkusers] Why does function exit automatic call itk again? Message-ID: <549E1719.80207@gmail.com> I write a simple code : use itk to read dicom serise and use vtk to visualize. But when i use gdb to debug, some strange thing happen: 128 piecewiseFunction->Delete(); (gdb) 129 colorTransferFunction->Delete(); (gdb) 130 volumeProperty->Delete(); (gdb) 131 compositeFunction->Delete(); (gdb) 132 volumeMapper->Delete(); (gdb) 133 volume->Delete(); (gdb) 134 ren->Delete(); (gdb) 135 renWin->Delete(); (gdb) 136 iren->Delete(); (gdb) 61 FilterType::Pointer connect = FilterType::New(); (gdb) 54 FileNamesContainerDICOMFiles fileNamesDICOMFiles; (gdb) 51 NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New(); (gdb) 48 ImageIOType::Pointer dicomIO = ImageIOType::New(); (gdb) 46 ReaderTypeDICOMFiles::Pointer readerDICOMFiles = ReaderTypeDICOMFiles::New(); (gdb) 136 iren->Delete(); (gdb) 138 } look at the gdb 61 54 48 46, they are itk reader, why the function will call this ? Why they run again when main() exit ???? Here comes my code: typedef itk::Image ImageTypeDICOMFiles; typedef std::vector FileNamesContainerDICOMFiles; typedef itk::ImageSeriesReader ReaderTypeDICOMFiles; typedef itk::GDCMSeriesFileNames NamesGeneratorType; typedef itk::GDCMImageIO ImageIOType; typedef itk::ImageToVTKImageFilter ConnectorType; int main() { std::string path = "/home/vinllen/code/itk_vtk/nlm/data"; ReaderTypeDICOMFiles::Pointer readerDICOMFiles = ReaderTypeDICOMFiles::New(); ImageIOType::Pointer dicomIO = ImageIOType::New(); readerDICOMFiles->SetImageIO(dicomIO); NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New(); nameGenerator->SetInputDirectory(path); FileNamesContainerDICOMFiles fileNamesDICOMFiles; fileNamesDICOMFiles = nameGenerator->GetInputFileNames(); readerDICOMFiles->SetFileNames(fileNamesDICOMFiles); readerDICOMFiles->Update(); typedef itk::ImageToVTKImageFilter FilterType ; FilterType::Pointer connect = FilterType::New(); connect->SetInput(readerDICOMFiles->GetOutput()); connect->Update(); vtkImageData *imageData = vtkImageData::New(); imageData = connect->GetOutput(); vtkImageCast *cast = vtkImageCast::New(); cast->SetInputData(imageData); cast->ClampOverflowOn(); cast->SetOutputScalarTypeToUnsignedShort(); cast->Update(); vtkPiecewiseFunction * piecewiseFunction = vtkPiecewiseFunction::New(); piecewiseFunction->RemoveAllPoints(); piecewiseFunction->AddPoint(0,0.0); piecewiseFunction->AddPoint(255, 1); vtkColorTransferFunction *colorTransferFunction = vtkColorTransferFunction::New(); colorTransferFunction->RemoveAllPoints(); colorTransferFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(255, 1.0, 1.0, 1.0); vtkVolumeProperty * volumeProperty = vtkVolumeProperty::New(); volumeProperty->SetScalarOpacity(piecewiseFunction); volumeProperty->SetColor(colorTransferFunction); volumeProperty->ShadeOff(); volumeProperty->SetInterpolationTypeToLinear(); vtkVolumeRayCastCompositeFunction * compositeFunction = vtkVolumeRayCastCompositeFunction::New(); vtkVolumeRayCastMapper * volumeMapper = vtkVolumeRayCastMapper::New(); volumeMapper->SetVolumeRayCastFunction(compositeFunction); volumeMapper->SetInputData(cast->GetOutput()); volumeMapper->Update(); vtkVolume * volume = vtkVolume::New(); volume->SetMapper(volumeMapper); volume->SetProperty(volumeProperty); vtkRenderer * ren = vtkRenderer::New(); vtkRenderWindow * renWin = vtkRenderWindow::New(); vtkRenderWindowInteractor * iren = vtkRenderWindowInteractor::New(); ren->AddVolume(volume); renWin->AddRenderer(ren); renWin->SetInteractor(iren); ren->SetBackground(0, 0, 0); renWin->SetSize(600,600); renWin->Render(); iren->Initialize(); iren->Start(); piecewiseFunction->Delete(); colorTransferFunction->Delete(); volumeProperty->Delete(); compositeFunction->Delete(); volumeMapper->Delete(); volume->Delete(); ren->Delete(); renWin->Delete(); iren->Delete(); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jin.Zhou at amd.com Mon Dec 29 02:32:26 2014 From: Jin.Zhou at amd.com (Zhou, Jin) Date: Mon, 29 Dec 2014 07:32:26 +0000 Subject: [vtkusers] a bug in vtkOpenGLProjectedTetrahedraMapper Message-ID: Hi there, Currently I find a bug in vtkOpenGLProjectedTetrahedraMapper.cxx:line 470, void vtkOpenGLProjectedTetrahedraMapper::Render(vtkRenderer *renderer, vtkVolume *volume) { ... glTexImage2D(GL_TEXTURE_2D, 0, GL_INTENSITY, TEXRES, TEXRES, 1, GL_RED, GL_FLOAT, texture); ... } According to the opengl spec, the 'border' parameter of glTexImage2D must be 0: void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * data); border This value must be 0. Can anybody tell me how to send the patch to VTK community ? Best Regards, Jin -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Mon Dec 29 09:24:24 2014 From: andy.bauer at kitware.com (Andy Bauer) Date: Mon, 29 Dec 2014 09:24:24 -0500 Subject: [vtkusers] a bug in vtkOpenGLProjectedTetrahedraMapper In-Reply-To: References: Message-ID: Hi Jin, Thanks for looking into this. Some instructions for contributing code to VTK are at http://www.vtk.org/Wiki/VTK/Git/Develop. After you push your code to gerrit for review, you'll want to assign a reviewer. People that modified that code are most appropriate. Assign them at the change AND topic level in gerrit to make sure they get notified by email for the code review request -- it's a bit clunky and people haven't always gotten emails for code reviews if you just add them under one of change and topic but I can't remember which one doesn't send the email. Regards, Andy On Mon, Dec 29, 2014 at 2:32 AM, Zhou, Jin wrote: > Hi there, > > > > Currently I find a bug in vtkOpenGLProjectedTetrahedraMapper.cxx:line 470, > > > > void vtkOpenGLProjectedTetrahedraMapper::Render(vtkRenderer *renderer, > > vtkVolume *volume) > > { > > ? > > glTexImage2D(GL_TEXTURE_2D, 0, GL_INTENSITY, TEXRES, TEXRES, 1, GL_RED, > > GL_FLOAT, texture); > > ? > > } > > > > According to the opengl spec, the ?border? parameter of glTexImage2D must > be 0: > > void *glTexImage2D*(GLenum target, GLint level, GLint internalFormat > , GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const > GLvoid * data); > > *border* > > This value must be 0. > > > > Can anybody tell me how to send the patch to VTK community ? > > > > Best Regards, > > Jin > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ehsan.saei at gmail.com Tue Dec 30 07:40:20 2014 From: ehsan.saei at gmail.com (ehsan saei) Date: Tue, 30 Dec 2014 13:40:20 +0100 Subject: [vtkusers] help for rendering a 3D uniformly structured grid Message-ID: Dear all, I'm very new in vtk. I want to visualize some 3D structures. let's say my data is a 3D matrix (x,y,z) each element of this matrix is a float number showing refractive index of my object. So for example element (i,j,k) shows refractive index of my object at position (i*dx,j*dx,k*dx) in space. I wanted to know how can I visualize using VTK? Thanks in advance, happy new year, Ehsan -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Tue Dec 30 10:24:15 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Tue, 30 Dec 2014 08:24:15 -0700 (MST) Subject: [vtkusers] vtkinteractor (point picker) in Qt Message-ID: <1419953055642-5729959.post@n5.nabble.com> Hi all, I am trying to change the interactor so that the left click returns the x,y coordinates of a 2D DICOM slice. It seems simple enough, but copying and pasting the relevant section of the PointPicker example code doesn't work (the example itself works). I haven't even initialised the interactor or set it to the QVTKWidget. Does it change anything because I'm doing it in Qt? I'm a little at a loss as to what's gone wrong when it's almost a carbon copy from the example. Commenting out the lines starting vtkTypeMacro and vtkStandardNewMacro enable it to build without any problems, but obviously the interactor then wouldn't work. Any help would be greatly appreciated. Here's what I've been trying: class MouseInteractorStylePP : public vtkInteractorStyleImage { public: static MouseInteractorStylePP* New(); vtkTypeMacro(MouseInteractorStylePP, vtkInteractorStyleImage); virtual void OnLeftButtonDown() { std::cout << "Picking pixel: " << this->Interactor->GetEventPosition()[0] << " " << this->Interactor->GetEventPosition()[1] << std::endl; this->Interactor->GetPicker()->Pick(this->Interactor->GetEventPosition()[0], this->Interactor->GetEventPosition()[1], 0, // always zero. this->Interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer()); double picked[3]; this->Interactor->GetPicker()->GetPickPosition(picked); std::cout << "Picked value: " << picked[0] << " " << picked[1] << " " << picked[2] << std::endl; // Forward events vtkInteractorStyleImage::OnLeftButtonDown(); } }; vtkStandardNewMacro(MouseInteractorStylePP); -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkinteractor-point-picker-in-Qt-tp5729959.html Sent from the VTK - Users mailing list archive at Nabble.com. From lifestudent37 at gmail.com Tue Dec 30 13:29:59 2014 From: lifestudent37 at gmail.com (Student Life) Date: Tue, 30 Dec 2014 18:29:59 +0000 Subject: [vtkusers] How do interact with multiple actors independently in a render window? Message-ID: Hi, Basically, I have multiple actors in my render window, and so far if I rotate one actor all the actors move with it as well. I want to interact with multiple objects independently. For example, if I have 5 objects in a render window, I want to only move, rotate and interact with the one selected object; whilst the rest of the 4 objects stay where it is. At the moment, the camera is doing the magic and as I rotate the independent object, other objects move at the same time and I don't want that to happen. I also want to store all the objects in memory. I intend to use C++. This is my sort of class structure... class ScreenObjects{ vtkActor (LinkedList); // I intend on using a linkedlist to store all the actors public: ScreenObjects(); // Constructor. Initializes vtkActor to null. void readSTLFile(); // Reads the STL File bool setObject(); // Sets current object, so you can only interact with the selected object} I am missing quite a lot of functions and detail in my class, as I don't know what else to include that would be of use. I was also thinking of joining two objects together, but again, I don't know how to incorporate that in my class; any information on that would be appreciated. Would really appreciate it if I could be given ideas. -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Tue Dec 30 13:33:49 2014 From: daviddoria at gmail.com (David Doria) Date: Tue, 30 Dec 2014 13:33:49 -0500 Subject: [vtkusers] How do interact with multiple actors independently in a render window? In-Reply-To: References: Message-ID: On Tue, Dec 30, 2014 at 1:29 PM, Student Life wrote: > Hi, > > Basically, I have multiple actors in my render window, and so far if I > rotate one actor all the actors move with it as well. > > I want to interact with multiple objects independently. For example, if I > have 5 objects in a render window, I want to only move, rotate and interact > with the one selected object; whilst the rest of the 4 objects stay where > it is. > > At the moment, the camera is doing the magic and as I rotate the > independent object, other objects move at the same time and I don't want > that to happen. > > I also want to store all the objects in memory. > > I intend to use C++. > > This is my sort of class structure... > > class ScreenObjects{ > vtkActor (LinkedList); // I intend on using a linkedlist to store all the actors > > public: > ScreenObjects(); // Constructor. Initializes vtkActor to null. > void readSTLFile(); // Reads the STL File > bool setObject(); // Sets current object, so you can only interact with the selected object} > > I am missing quite a lot of functions and detail in my class, as I don't > know what else to include that would be of use. I was also thinking of > joining two objects together, but again, I don't know how to incorporate > that in my class; any information on that would be appreciated. > Would really appreciate it if I could be given ideas. > You need to specify an "interactor style" - the one you are looking for here is vtkInteractorStyleTrackballActor. Here is an example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/TrackballActor David -------------- next part -------------- An HTML attachment was scrubbed... URL: From lifestudent37 at gmail.com Tue Dec 30 14:02:44 2014 From: lifestudent37 at gmail.com (Student Life) Date: Tue, 30 Dec 2014 19:02:44 +0000 Subject: [vtkusers] How do interact with multiple actors independently in a render window? In-Reply-To: References: Message-ID: Dear Mr David Doria, Thank you for your response. I am going to be using C++ to develop a software that allows the user to interact with multiple objects/actors on the screen. They should be able to move objects/actors independently from one another. The thing is, I need to store all of this in memory and so I have come up with this class structure to store objects/actors in memory. I also have another class to handle the vtkPicker, i.e. if points are selected on the actor, then they stay there even if that object/actor is moved independently the points should move with it. I am thinking of using inheritance, this is my sort of class structure... Actor Class... class ScreenObjects { vtkActor (LinkedList); // I intend on using a linkedlist to store all the actors public: ScreenObjects(); // Constructor. Initializes vtkActor to null. void readSTLFile(); // Reads the STL File bool setObject(); // Sets current object, so you can only interact with the selected object void reset(); //Resets everything, including vtkActors } Picker Class... class PickerActor : class ScreenObjects { public: PickerActor(); } Would really appreciate it if you could give me some ideas or suggestions for my class structure. Thanks On Tue, Dec 30, 2014 at 6:33 PM, David Doria wrote: > On Tue, Dec 30, 2014 at 1:29 PM, Student Life > wrote: > >> Hi, >> >> Basically, I have multiple actors in my render window, and so far if I >> rotate one actor all the actors move with it as well. >> >> I want to interact with multiple objects independently. For example, if I >> have 5 objects in a render window, I want to only move, rotate and interact >> with the one selected object; whilst the rest of the 4 objects stay where >> it is. >> >> At the moment, the camera is doing the magic and as I rotate the >> independent object, other objects move at the same time and I don't want >> that to happen. >> >> I also want to store all the objects in memory. >> >> I intend to use C++. >> >> This is my sort of class structure... >> >> class ScreenObjects{ >> vtkActor (LinkedList); // I intend on using a linkedlist to store all the actors >> >> public: >> ScreenObjects(); // Constructor. Initializes vtkActor to null. >> void readSTLFile(); // Reads the STL File >> bool setObject(); // Sets current object, so you can only interact with the selected object} >> >> I am missing quite a lot of functions and detail in my class, as I don't >> know what else to include that would be of use. I was also thinking of >> joining two objects together, but again, I don't know how to incorporate >> that in my class; any information on that would be appreciated. >> Would really appreciate it if I could be given ideas. >> > > You need to specify an "interactor style" - the one you are looking for > here is vtkInteractorStyleTrackballActor. Here is an example: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/TrackballActor > > David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fluidandsolidearth at gmx.de Tue Dec 30 19:22:40 2014 From: fluidandsolidearth at gmx.de (seany) Date: Tue, 30 Dec 2014 17:22:40 -0700 (MST) Subject: [vtkusers] VTK ballon widget does not show a ballon Message-ID: <1419985360635-5729965.post@n5.nabble.com> Hello, Merry Xmas, and Happy New Year I am new with VTK, but I would hope that the following code would generate two Squares, and one of them would be assigned to a ballon, and while touching it with the mouse, will result in displaying the word " hello " --- However, no popup ballons are displayed. What am I doing wrong? Please help- -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-ballon-widget-does-not-show-a-ballon-tp5729965.html Sent from the VTK - Users mailing list archive at Nabble.com. From simon.esneault at gmail.com Wed Dec 31 05:54:36 2014 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Wed, 31 Dec 2014 11:54:36 +0100 Subject: [vtkusers] QVTKWidget problem with Qt 5.3 In-Reply-To: References: Message-ID: Hi Waldo, Could you please explain how you modified the QVTKWidget::resizeEvent( QResizeEvent* ) function to solve this problem? I and some other people are affected by this bug with QVTKWIdget and retina displays, see : http://vtk.1045678.n5.nabble.com/QVTKWidget-and-MacOS-problems-td5729620.html http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-td5729578.html Tried something like : -------------------------------------------------------- QWidget::resizeEvent( a_event ); if( !this->mRenWin ){ return; } this->mRenWin->vtkRenderWindow::SetSize( this->width()*devicePixelRatio(), this->height()*devicePixelRatio() ); if( this->mRenWin->GetInteractor() ){ mIrenAdapter->ProcessEvent( a_event, this->mRenWin->GetInteractor() ); } this->markCachedImageAsDirty(); -------------------------------------------------------- But it doesn't work... Thanks -Simon 2014-05-31 19:15 GMT+02:00 Waldo Valenzuela : > Hi Guys, > > I figure out what is the problem, I was testing the program in a macbook > retina, and the QVTKWidget is not checking the pixel ratio. > > I had to modified the resize function on my child function of QVTKWidget. > > Best regards, > > Waldo. > > On 31 May 2014, at 00:37, Waldo Valenzuela > wrote: > > > Hi Guys, > > > > I compiled VTK 6.1.0 with Qt 5.3, and I compiled the vtk example > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowUIMultipleInheritance > , > > > > > > and I have a problem when I resize the main window, seems that the > render resize of QVTKWidget is not called. > > > > Any ideas about this problem? > > > > > > Best regards, > > > > > > Waldo. > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Dec 31 07:53:01 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 31 Dec 2014 07:53:01 -0500 Subject: [vtkusers] VTK ballon widget does not show a ballon In-Reply-To: <1419985360635-5729965.post@n5.nabble.com> References: <1419985360635-5729965.post@n5.nabble.com> Message-ID: Perhaps this example will help: http://vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BalloonWidget On Tue, Dec 30, 2014 at 7:22 PM, seany wrote: > Hello, Merry Xmas, and Happy New Year > > I am new with VTK, but I would hope that the following code would generate > two Squares, and one of them would be assigned to a ballon, and while > touching it with the mouse, will result in displaying the word " hello " --- > > > > However, no popup ballons are displayed. > > What am I doing wrong? Please help- > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/VTK-ballon-widget-does-not-show-a-ballon-tp5729965.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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From sankhesh.jhaveri at kitware.com Wed Dec 31 10:25:45 2014 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 31 Dec 2014 10:25:45 -0500 Subject: [vtkusers] How does vtk 6 read dicom and in 3d Visualization? In-Reply-To: <549D15C1.4020009@gmail.com> References: <549D15C1.4020009@gmail.com> Message-ID: Hi, Take a look here: http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOM Best Regards, Sankhesh Jhaveri Research & Development Engineer Kitware, Inc. *Phone*: (518) 881 4417 *Fax*: (518) 371 4573 On Fri, Dec 26, 2014 at 3:01 AM, cvinllen wrote: > Hi, all: > I used vtk4 before, but now, i update my vtk 4 to 6, but i can't run > my code success. Does anyone have code to read dicom and 3d Visualization? > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: