From kit.chambers.kc at gmail.com Mon Aug 1 07:55:37 2016 From: kit.chambers.kc at gmail.com (Kit Chambers) Date: Mon, 1 Aug 2016 12:55:37 +0100 Subject: [vtkusers] Python wrapping a custom class In-Reply-To: References: Message-ID: Hi David/VTK'ers, Following on from my previous email i am now having diffcultly using a more complicated data structure in a derived class. In this case i am trying: #include "vtkImageData.h" #include class VTK_EXPORT vtkImageDataDict: public vtkImageData { public: vtkTypeMacro(vtkImageDataDict, vtkImageData); // New method static vtkImageDataDict *New(); // Python dictionary boost::python::dict m_dict; // test function to set the dictionary void test_set_dict(); // prints the dictionary void printImageDict(); // Dictionary getter boost::python::dict getDict(){return this->m_dict;} // Dictionary setter void setDict(boost::python::object dd); }; When I wrap the above class the test_set_dict and printImageDict work fine but the wrapper seems to ignore getDict() and setDict(). I assume this is because vtkWrapperPython does not know what to do with boost::python objects. Maybe I am going about this the wrong way? I did try doing the wrapping through boost python rather than VTK but found I ran into compilation issues. Any help would be very much appreciated. Kit > On 29 Jul 2016, at 17:07, David Gobbi wrote: > > Hi Kit, > > It's most likely because the class is missing vtkTypeMacro: > > vtkTypeMacro(vtkNewData, vtkImageData); > > - David > > > On Fri, Jul 29, 2016 at 9:02 AM, Kit Chambers > wrote: > Hi, > > I am trying to wrap a custom class derived from vtkImageData in python. And it works except for when i try to access my custom methods. For example: > > import vtkNewDataPython as idp > > mydata = idp.vtkNewData() > > print "\nvtkImageData functionality" > mydata.SetDimensions(2,3,1) > dims = mydata.GetDimensions() > print "image dimensions =",dims > print "Number of points: ",mydata.GetNumberOfPoints() > print "Number of cells: ",mydata.GetNumberOfCells() > > print "\ncustom functionality" > mydata.set_myvalue() > print "Myvalue = ", mydata.get_myvalue() > > > Produces: > vtkImageData functionality > image dimensions = (2, 3, 1) > Number of points: 6 > Number of cells: 2 > > custom functionality > Traceback (most recent call last): > File "./pytest.py", line 14, in > mydata.set_myvalue() > AttributeError: set_myvalue > > > Basically it is doing just fine up until I try to call a custom method > > The class looks like this: > > #include "vtkImageData.h" > > class VTK_EXPORT vtkNewData: public vtkImageData > { > public: > static vtkNewData *New(); > void set_myvalue(){ > this->myvalue=3; > } > int get_myvalue(){ > return this->myvalue; > } > int myvalue; > }; > > > The CmakeLists.txt is adapted mostly from https://github.com/paulmelis/vtk-wrapping-example and looks like this > > > ####################################### > # Pre-requisites > > # C++11 flags > set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11") > > # VTK > find_package(VTK REQUIRED > vtkCommonCore > vtkCommonDataModel > vtkWrappingPythonCore > ) > include(${VTK_USE_FILE}) > > # Python and vtk wrapping > find_package(PythonLibs 2.7 EXACT REQUIRED) > include(vtkWrapPython) > include_directories("${PYTHON_INCLUDE_PATH}") > > ####################################### > # Building vtkNewData > add_library(vtkNewData SHARED vtkNewData.cxx) > TARGET_LINK_LIBRARIES(vtkNewData ${VTK_LIBRARIES} ) > if(APPLE) > set_target_properties(vtkNewData PROPERTIES SUFFIX ".so") > endif() > > ####################################### > # Wrapping vtkNewData > vtk_wrap_python3(vtkNewDataPython vtkNewDataPython_SRCS vtkNewData.cxx) > > add_library(vtkNewDataPythonD ${vtkNewDataPython_SRCS} vtkNewData.cxx) > target_link_libraries(vtkNewDataPythonD > ${VTK_LIBRARIES} > vtkWrappingPythonCore > ${VTK_PYTHON_LIBRARIES}) > > add_library(vtkNewDataPython MODULE vtkNewDataPythonInit.cxx) > > set(VTK_MODULES_USED vtkCommonDataModel vtkCommonCore) > set(VTK_PYTHOND_LIBS) > foreach(TMP_LIB ${VTK_MODULES_USED}) > set(VTK_PYTHOND_LIBS ${VTK_PYTHOND_LIBS} ${TMP_LIB}PythonD) > endforeach() > > target_link_libraries(vtkNewDataPython vtkNewDataPythonD ${VTK_PYTHOND_LIBS}) > > set_target_properties(vtkNewDataPython PROPERTIES PREFIX "") > if(WIN32 AND NOT CYGWIN) > set_target_properties(vtkNewDataPython PROPERTIES SUFFIX ".pyd") > endif(WIN32 AND NOT CYGWIN) > > > I suspect there is something very simple I am missing here but cannot for the life of me think what. Any help would be appreciated. > > > Cheers > > Kit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk at kant.sophonet.de Mon Aug 1 07:54:26 2016 From: vtk at kant.sophonet.de (Sophonet) Date: Mon, 01 Aug 2016 13:54:26 +0200 Subject: [vtkusers] =?utf-8?q?Draw_polygon_around_vtkImageSlice=3F?= Message-ID: Hi list, in my previous VTK code I was successfully using vtkImageActor::GetDisplayBounds() and vtkOutlineSource etc. to draw an outline around the currently shown 2D slice. After refactoring to vtkImageResliceMapper and vtkImageSlice, I have not found a matching function: vtkImageResliceMapper::GetBounds() contains a comment "Modify to give just the slice bounds" and indeed always returns the bounds of the 3D input image. Any suggestions? Thanks, Sophonet From david.gobbi at gmail.com Mon Aug 1 08:31:03 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 1 Aug 2016 06:31:03 -0600 Subject: [vtkusers] Python wrapping a custom class In-Reply-To: References: Message-ID: Try declaring m_dict as a PyObject: PyObject *m_dict; PyObject *getDict(); void setDict(PyObject *); On Mon, Aug 1, 2016 at 5:55 AM, Kit Chambers wrote: > Hi David/VTK'ers, > > Following on from my previous email i am now having diffcultly using a > more complicated data structure in a derived class. In this case i am > trying: > > #include "vtkImageData.h" > #include > > class VTK_EXPORT vtkImageDataDict: public vtkImageData > { > public: > > vtkTypeMacro(vtkImageDataDict, vtkImageData); > > // New method > static vtkImageDataDict *New(); > > // Python dictionary > boost::python::dict m_dict; > > // test function to set the dictionary > void test_set_dict(); > > // prints the dictionary > void printImageDict(); > > // Dictionary getter > boost::python::dict getDict(){return this->m_dict;} > > // Dictionary setter > void setDict(boost::python::object dd); > }; > > > When I wrap the above class the test_set_dict and printImageDict work > fine but the wrapper seems to ignore getDict() > and setDict(). I assume this is because vtkWrapperPython does not know > what to do with boost::python objects. Maybe I am going about this the > wrong way? I did try doing the wrapping through boost python rather than > VTK but found I ran into compilation issues. > > Any help would be very much appreciated. > > Kit > > > > > On 29 Jul 2016, at 17:07, David Gobbi wrote: > > Hi Kit, > > It's most likely because the class is missing vtkTypeMacro: > > vtkTypeMacro(vtkNewData, vtkImageData); > > - David > > > On Fri, Jul 29, 2016 at 9:02 AM, Kit Chambers > wrote: > >> Hi, >> >> I am trying to wrap a custom class derived from vtkImageData in python. >> And it works except for when i try to access my custom methods. For example: >> >> import vtkNewDataPython as idp >> >> mydata = idp.vtkNewData() >> >> print "\nvtkImageData functionality" >> mydata.SetDimensions(2,3,1) >> dims = mydata.GetDimensions() >> print "image dimensions =",dims >> print "Number of points: ",mydata.GetNumberOfPoints() >> print "Number of cells: ",mydata.GetNumberOfCells() >> >> print "\ncustom functionality" >> mydata.set_myvalue() >> print "Myvalue = ", mydata.get_myvalue() >> >> >> Produces: >> vtkImageData functionality >> image dimensions = (2, 3, 1) >> Number of points: 6 >> Number of cells: 2 >> >> custom functionality >> Traceback (most recent call last): >> File "./pytest.py", line 14, in >> mydata.set_myvalue() >> AttributeError: set_myvalue >> >> >> Basically it is doing just fine up until I try to call a custom method >> >> The class looks like this: >> >> #include "vtkImageData.h" >> >> class VTK_EXPORT vtkNewData: public vtkImageData >> { >> public: >> static vtkNewData *New(); >> void set_myvalue(){ >> this->myvalue=3; >> } >> int get_myvalue(){ >> return this->myvalue; >> } >> int myvalue; >> }; >> >> >> The CmakeLists.txt is adapted mostly from >> https://github.com/paulmelis/vtk-wrapping-example and looks like this >> >> >> ####################################### >> # Pre-requisites >> >> # C++11 flags >> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11") >> >> # VTK >> find_package(VTK REQUIRED >> vtkCommonCore >> vtkCommonDataModel >> vtkWrappingPythonCore >> ) >> include(${VTK_USE_FILE}) >> >> # Python and vtk wrapping >> find_package(PythonLibs 2.7 EXACT REQUIRED) >> include(vtkWrapPython) >> include_directories("${PYTHON_INCLUDE_PATH}") >> >> ####################################### >> # Building vtkNewData >> add_library(vtkNewData SHARED vtkNewData.cxx) >> TARGET_LINK_LIBRARIES(vtkNewData ${VTK_LIBRARIES} ) >> if(APPLE) >> set_target_properties(vtkNewData PROPERTIES SUFFIX ".so") >> endif() >> >> ####################################### >> # Wrapping vtkNewData >> vtk_wrap_python3(vtkNewDataPython vtkNewDataPython_SRCS vtkNewData.cxx) >> >> add_library(vtkNewDataPythonD ${vtkNewDataPython_SRCS} vtkNewData.cxx) >> target_link_libraries(vtkNewDataPythonD >> ${VTK_LIBRARIES} >> vtkWrappingPythonCore >> ${VTK_PYTHON_LIBRARIES}) >> >> add_library(vtkNewDataPython MODULE vtkNewDataPythonInit.cxx) >> >> set(VTK_MODULES_USED vtkCommonDataModel vtkCommonCore) >> set(VTK_PYTHOND_LIBS) >> foreach(TMP_LIB ${VTK_MODULES_USED}) >> set(VTK_PYTHOND_LIBS ${VTK_PYTHOND_LIBS} ${TMP_LIB}PythonD) >> endforeach() >> >> target_link_libraries(vtkNewDataPython vtkNewDataPythonD >> ${VTK_PYTHOND_LIBS}) >> >> set_target_properties(vtkNewDataPython PROPERTIES PREFIX "") >> if(WIN32 AND NOT CYGWIN) >> set_target_properties(vtkNewDataPython PROPERTIES SUFFIX ".pyd") >> endif(WIN32 AND NOT CYGWIN) >> >> >> I suspect there is something very simple I am missing here but cannot for >> the life of me think what. Any help would be appreciated. >> >> >> Cheers >> >> Kit >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kit.chambers.kc at gmail.com Mon Aug 1 09:42:08 2016 From: kit.chambers.kc at gmail.com (Kit Chambers) Date: Mon, 1 Aug 2016 14:42:08 +0100 Subject: [vtkusers] Python wrapping a custom class In-Reply-To: References: Message-ID: <25F4E474-48E1-482D-AFD1-F0C43CE04896@googlemail.com> That works. Discovered I can still use the boost:python for storage containers as long as the methods pass PyObject pointers. class VTK_EXPORT vtkImageDataDict: public vtkImageData { public: vtkTypeMacro(vtkImageDataDict, vtkImageData); // New method static vtkImageDataDict *New(); // Python dictionary boost::python::dict m_dict; // test function to set the dictionary void test_set_dict(); // prints the dictionary void printImageDict(); // Dictionary getter - returns Pyobject because of the VTK Parser PyObject* getDict(){return (PyObject*)this->m_dict.ptr();} // Dictionary setter void setDict(PyObject *dd); }; Thanks Kit > On 1 Aug 2016, at 13:31, David Gobbi wrote: > > Try declaring m_dict as a PyObject: > > PyObject *m_dict; > PyObject *getDict(); > void setDict(PyObject *); > > > On Mon, Aug 1, 2016 at 5:55 AM, Kit Chambers > wrote: > Hi David/VTK'ers, > > Following on from my previous email i am now having diffcultly using a more complicated data structure in a derived class. In this case i am trying: > > #include "vtkImageData.h" > #include > > class VTK_EXPORT vtkImageDataDict: public vtkImageData > { > public: > > vtkTypeMacro(vtkImageDataDict, vtkImageData); > > // New method > static vtkImageDataDict *New(); > > // Python dictionary > boost::python::dict m_dict; > > // test function to set the dictionary > void test_set_dict(); > > // prints the dictionary > void printImageDict(); > > // Dictionary getter > boost::python::dict getDict(){return this->m_dict;} > > // Dictionary setter > void setDict(boost::python::object dd); > }; > > > When I wrap the above class the test_set_dict and printImageDict work fine but the wrapper seems to ignore getDict() > and setDict(). I assume this is because vtkWrapperPython does not know what to do with boost::python objects. Maybe I am going about this the wrong way? I did try doing the wrapping through boost python rather than VTK but found I ran into compilation issues. > > Any help would be very much appreciated. > > Kit > > > > >> On 29 Jul 2016, at 17:07, David Gobbi > wrote: >> >> Hi Kit, >> >> It's most likely because the class is missing vtkTypeMacro: >> >> vtkTypeMacro(vtkNewData, vtkImageData); >> >> - David >> >> >> On Fri, Jul 29, 2016 at 9:02 AM, Kit Chambers > wrote: >> Hi, >> >> I am trying to wrap a custom class derived from vtkImageData in python. And it works except for when i try to access my custom methods. For example: >> >> import vtkNewDataPython as idp >> >> mydata = idp.vtkNewData() >> >> print "\nvtkImageData functionality" >> mydata.SetDimensions(2,3,1) >> dims = mydata.GetDimensions() >> print "image dimensions =",dims >> print "Number of points: ",mydata.GetNumberOfPoints() >> print "Number of cells: ",mydata.GetNumberOfCells() >> >> print "\ncustom functionality" >> mydata.set_myvalue() >> print "Myvalue = ", mydata.get_myvalue() >> >> >> Produces: >> vtkImageData functionality >> image dimensions = (2, 3, 1) >> Number of points: 6 >> Number of cells: 2 >> >> custom functionality >> Traceback (most recent call last): >> File "./pytest.py", line 14, in >> mydata.set_myvalue() >> AttributeError: set_myvalue >> >> >> Basically it is doing just fine up until I try to call a custom method >> >> The class looks like this: >> >> #include "vtkImageData.h" >> >> class VTK_EXPORT vtkNewData: public vtkImageData >> { >> public: >> static vtkNewData *New(); >> void set_myvalue(){ >> this->myvalue=3; >> } >> int get_myvalue(){ >> return this->myvalue; >> } >> int myvalue; >> }; >> >> >> The CmakeLists.txt is adapted mostly from https://github.com/paulmelis/vtk-wrapping-example and looks like this >> >> >> ####################################### >> # Pre-requisites >> >> # C++11 flags >> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11") >> >> # VTK >> find_package(VTK REQUIRED >> vtkCommonCore >> vtkCommonDataModel >> vtkWrappingPythonCore >> ) >> include(${VTK_USE_FILE}) >> >> # Python and vtk wrapping >> find_package(PythonLibs 2.7 EXACT REQUIRED) >> include(vtkWrapPython) >> include_directories("${PYTHON_INCLUDE_PATH}") >> >> ####################################### >> # Building vtkNewData >> add_library(vtkNewData SHARED vtkNewData.cxx) >> TARGET_LINK_LIBRARIES(vtkNewData ${VTK_LIBRARIES} ) >> if(APPLE) >> set_target_properties(vtkNewData PROPERTIES SUFFIX ".so") >> endif() >> >> ####################################### >> # Wrapping vtkNewData >> vtk_wrap_python3(vtkNewDataPython vtkNewDataPython_SRCS vtkNewData.cxx) >> >> add_library(vtkNewDataPythonD ${vtkNewDataPython_SRCS} vtkNewData.cxx) >> target_link_libraries(vtkNewDataPythonD >> ${VTK_LIBRARIES} >> vtkWrappingPythonCore >> ${VTK_PYTHON_LIBRARIES}) >> >> add_library(vtkNewDataPython MODULE vtkNewDataPythonInit.cxx) >> >> set(VTK_MODULES_USED vtkCommonDataModel vtkCommonCore) >> set(VTK_PYTHOND_LIBS) >> foreach(TMP_LIB ${VTK_MODULES_USED}) >> set(VTK_PYTHOND_LIBS ${VTK_PYTHOND_LIBS} ${TMP_LIB}PythonD) >> endforeach() >> >> target_link_libraries(vtkNewDataPython vtkNewDataPythonD ${VTK_PYTHOND_LIBS}) >> >> set_target_properties(vtkNewDataPython PROPERTIES PREFIX "") >> if(WIN32 AND NOT CYGWIN) >> set_target_properties(vtkNewDataPython PROPERTIES SUFFIX ".pyd") >> endif(WIN32 AND NOT CYGWIN) >> >> >> I suspect there is something very simple I am missing here but cannot for the life of me think what. Any help would be appreciated. >> >> >> Cheers >> >> Kit >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk at kant.sophonet.de Mon Aug 1 11:08:27 2016 From: vtk at kant.sophonet.de (Sophonet) Date: Mon, 01 Aug 2016 17:08:27 +0200 Subject: [vtkusers] =?utf-8?q?Draw_polygon_around_vtkImageSlice=3F?= In-Reply-To: References: Message-ID: Okay, I managed this myself by cutting the extracted outline of the input image with the viewing plane (using vtkCutter). Thanks, Sophonet Am 2016-08-01 13:54, schrieb Sophonet: > Hi list, > > in my previous VTK code I was successfully using > vtkImageActor::GetDisplayBounds() and vtkOutlineSource etc. to draw an > outline around the currently shown 2D slice. After refactoring to > vtkImageResliceMapper and vtkImageSlice, I have not found a matching > function: vtkImageResliceMapper::GetBounds() contains a comment > "Modify to give just the slice bounds" and indeed always returns the > bounds of the 3D input image. > > Any suggestions? > > Thanks, > > Sophonet > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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 From zhuangming.shen at sphic.org.cn Tue Aug 2 04:37:58 2016 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Tue, 2 Aug 2016 08:37:58 +0000 Subject: [vtkusers] VTK animation under VTK-Web framework Message-ID: <1470127077406.34283@sphic.org.cn> ??Hi all, I saw Bryan Conrad provided us a practical example on VTK animation (https://itk.org/Wiki/VTK/Examples/Python/Animation?). Now, I'd like to refer this example to animate objects (e.g. sphere or cone) under VTK-Web framework (e.g. vtk_web_cone.py). As far as I know, "TimerEvent" is used as a timer to trigger an event repeatedly, and this timer is bound to renderWindowInteractor by AddObserver. However, in vtk_web_cone.py, it seems that web server is waiting after the renderWindow is set as an active object. How can I start the timer? How to integrate the example into vtk_web_cone.py? Any suggestions are welcomed. Thanks in advance?. Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From lplavorante at gmail.com Tue Aug 2 10:11:24 2016 From: lplavorante at gmail.com (Luca Pallozzi Lavorante) Date: Tue, 2 Aug 2016 11:11:24 -0300 Subject: [vtkusers] Map StructuredGrid CellData onto a vtkPlaneWidget Message-ID: Hi everybody, maybe this is a trivial question, but I don't know how to select a StructuredGrid's cell data (insead of its points dada) in order to map these values onto a vtkPlaneWidget. I have modified the ProbingWithPlaneWidget.py script in order to test this feature. I build a StructuredGrid with 12 points and only two cells, then I set the CellData (two values which are correctly rendered as two colors by the StructuredGrid's mapper). If I build point data for the 12 points the probe works fine, but if I remove the pointdata code and try to use the celldata one, the probe is shown as white, with no color associated to the cell data. Thanks in advance for any help. Luca Pallozzi Lavorante #!/usr/bin/env python # This example demonstrates how to use the vtkPlaneWidget to probe # a dataset and then generate contours on the probed data. import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() structuredGrid = vtk.vtkStructuredGrid() points = vtk.vtkPoints() for k in range(2): for j in range(3): for i in range(2): points.InsertNextPoint(i, j, k) structuredGrid.SetDimensions(2, 3, 2) structuredGrid.SetPoints(points) # Insert cell data into StructuredGrid cellData = vtk.vtkFloatArray() cellData.SetNumberOfComponents(1) cellData.InsertNextValue(10) cellData.InsertNextValue(20) cellData.SetName("CellData") structuredGrid.GetCellData().SetScalars(cellData) # Insert cell data into StructuredGrid pointData = vtk.vtkFloatArray() pointData.SetNumberOfComponents(1) for i in range(12): pointData.InsertNextValue(i*10) pointData.SetName("PointData") structuredGrid.GetPointData().SetScalars(pointData) # The plane widget is used probe the dataset. planeWidget = vtk.vtkPlaneWidget() planeWidget.SetInputData(structuredGrid) planeWidget.NormalToXAxisOn() planeWidget.SetResolution(20) planeWidget.SetRepresentationToOutline() planeWidget.PlaceWidget() plane = vtk.vtkPolyData() planeWidget.GetPolyData(plane) probe = vtk.vtkProbeFilter() probe.SetInputData(plane) probe.SetSourceData(structuredGrid) contourMapper = vtk.vtkPolyDataMapper() contourMapper.SetInputConnection(probe.GetOutputPort()) contourMapper.SetScalarRange(structuredGrid.GetScalarRange()) contourActor = vtk.vtkActor() contourActor.SetMapper(contourMapper) contourActor.VisibilityOff() # An outline is shown for context. outline = vtk.vtkStructuredGridOutlineFilter() outline.SetInputData(structuredGrid) outlineMapper = vtk.vtkPolyDataMapper() outlineMapper.SetInputConnection(outline.GetOutputPort()) outlineActor = vtk.vtkActor() outlineActor.SetMapper(outlineMapper) mapper = vtk.vtkDataSetMapper() mapper.SetInputData(structuredGrid) mapper.SetScalarRange(structuredGrid.GetScalarRange()) actor = vtk.vtkActor() actor.SetMapper(mapper) # Create the RenderWindow, Renderer and both Actors ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # Actually generate contour lines. def BeginInteraction(obj, event): global plane, contourActor obj.GetPolyData(plane) contourActor.VisibilityOn() def ProbeData(obj, event): global plane obj.GetPolyData(plane) # Associate the widget with the interactor planeWidget.SetInteractor(iren) # Handle the events. planeWidget.AddObserver("EnableEvent", BeginInteraction) planeWidget.AddObserver("StartInteractionEvent", BeginInteraction) planeWidget.AddObserver("InteractionEvent", ProbeData) # Add the actors to the renderer, set the background and size #ren.AddActor(outlineActor) ren.AddActor(actor) ren.AddActor(contourActor) ren.SetBackground(1, 1, 1) renWin.SetSize(300, 300) ren.SetBackground(0.1, 0.2, 0.4) iren.Initialize() renWin.Render() iren.Start() -------------- next part -------------- An HTML attachment was scrubbed... URL: From davis.vigneault at gmail.com Tue Aug 2 10:24:34 2016 From: davis.vigneault at gmail.com (DVigneault) Date: Tue, 2 Aug 2016 07:24:34 -0700 (MST) Subject: [vtkusers] vtkWindowToImageFilter on Mac OsX gives incorrect output. Message-ID: <1470147874457-5739464.post@n5.nabble.com> All-- I'm having trouble running this example [1] from the Wiki on Mac OsX. If I set the magnification to 1, I get the expected output, as shown in the example. However, if I leave the magnification at 3 (as in the example), I get an odd tessellation of the expected output (attached). Has anyone run into this issue before? 1. I'm using the c++ version from the Wiki, unmodified. 2. My version of OsX is 10.11.4 3. I'm using the (just updated) development branch of VTK. The same code behaves as expected on Ubuntu 14.04. Best, and thanks very much in advance, --Davis [1] http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/Screenshot -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkWindowToImageFilter-on-Mac-OsX-gives-incorrect-output-tp5739464.html Sent from the VTK - Users mailing list archive at Nabble.com. From berk.geveci at kitware.com Tue Aug 2 11:35:31 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 2 Aug 2016 11:35:31 -0400 Subject: [vtkusers] Deadline Extended: SC16 Visualization Showcase submission deadline - August 15, 2016 Message-ID: Due to multiple requests, we have extended the deadline to August 15, 2016Visualization Showcase ------------------------------ Important Dates: February 16, 2016: *Submissions open* August 15, 2016: *Submissions deadline* September 1, 2016: *Notifications sent* ------------------------------ *A new format for 2016!* SC16?s Visualization and Data Analytics Showcase Program provides a forum for the year?s most instrumental movies in HPC. This year, there will be both a live display throughout the conference so that attendees can experience and enjoy the latest in science and engineering HPC results expressed through state-of-the-art visualization technologies, and a session at SC16 dedicated to the best of the submissions. Selected entries will be displayed live in a museum/art gallery format and six finalists will compete for the Best Visualization Award, with each finalist presenting his or her movie in a 15-minute presentation. Movies are judged based on how their movie illuminates science, by the quality of the movie, and for innovations in the process used for creating the movie. The six finalist submissions will appear as short papers on the SC16 webpage and archive. *Review and selection process:* Submissions need to include a movie (up to 250MB in size) and a short paper (up to 4 pages including references). The short paper should describe the scientific story conveyed by the movie, how the visualization helps scientific discovery, and the ?state-of-the-practice? information ( ieeevis.org)information behind making the movie. Each submission will be peer reviewed by the Visualization and Data Analytics Showcase Committee. Criteria for review include: - How effective is the visual communication of the data? - How relevant to the HPC community is the visualization? - What is the impact of the science story and how well is it told? - What visualization techniques were necessary to create the movie? Finally, submissions should support SC16?s overall theme ?HPC matters.? http://sc16.supercomputing.org/submitters/showcases/scientific-visualization-showcase/ *Web Submissions:* https://submissions.supercomputing.org/ *Email Contact:* vis_showcase at info.supercomputing.org SC16 Visualization Showcase Chair Chris Johnson, University of Utah SC16 Visualization Showcase Vice Chair Kristin Potter, University of Oregon -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Tue Aug 2 11:42:50 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 2 Aug 2016 11:42:50 -0400 Subject: [vtkusers] Deadline Extended: ISAV2016: Call for Participation -- August 22, 2016 Message-ID: ** Paper deadline extended to Aug 22, 2016 *** ----------------------------------------------------------------- Call for Participation: ISAV 2016 ========================= ISAV2016: In Situ Infrastructures for Enabling Extreme-Scale Analysis and Visualization In cooperation with SIGHPC and held in conjunction with SC16: The International Conference on High Performance Computing, Networking, Storage and Analysis, Salt Lake City, Utah, U.S.A. Full-day Sunday November 13th, 2016 ISAV 2016 Web Site: http://vis.lbl.gov/Events/ISAV-2016/ Workshop Theme ------------------------ The considerable interest in the HPC community regarding in situ analysis and visualization is due to several factors. First is an I/O cost savings, where data is analyzed/visualized while being generated, without first storing to a file system. Second is the potential for increased accuracy, where fine temporal sampling of transient analysis might expose some complex behavior missed in coarse temporal sampling. Third is the ability to use all available resources, CPU?s and accelerators, in the computation of analysis products. The workshop brings together researchers, developers and practitioners from industry, academia, and government laboratories developing, applying, and deploying in situ methods in extreme-scale, high performance computing. The goal is to present research findings, lessons learned, and insights related to developing and applying in situ methods and infrastructure across a range of science and engineering applications in HPC environments; to discuss topics like opportunities presented by new architectures, existing infrastructure needs, requirements, and gaps, and experiences to foster and enable in situ analysis and visualization; to serve as a ?center of gravity? for researchers, practitioners, and users/consumers of in situ methods and infrastructure in the HPC space. Participation/Call for Papers and Oral Presentations --------------------------------------------------------------------- We invite two types of submissions to ISAV 2016: (1) short, 4-page papers that present research results, that identify opportunities or challenges, and that present case studies/best practices for in situ methods/infrastructure in the areas of data management, analysis and visualization; (2) lightning presentation submission, consisting of a 1- or 2-page submission, for a brief oral presentation at the workshop. Short papers will appear in the workshop proceedings and will be invited to give an oral presentation of 15 to 20 minutes; lightning round submissions that are invited to present at the workshop will have author names and titles included as part of the proceedings. Submissions of both types are welcome that fall within one or more areas of interest, as follows: Areas of interest for ISAV, include, but are not limited to: In situ infrastructures * Current Systems: production quality, research prototypes * Opportunities * Gaps System resources, hardware, and emerging architectures * Enabling Hardware * Hardware and architectures that provide opportunities for In situ processing, such as burst buffers, staging computations on I/O nodes, sharing cores within a node for both simulation and in situ processing Methods/algorithms/applications/Case studies * Best practices * Analysis: feature detection, statistical methods, temporal methods, geometric methods * Visualization: information visualization, scientific visualization, time- varying methods * Data reduction/compression * Examples/case studies of solving a specific science challenge with in situ methods/infrastructure. Simulation * Integration:data modeling, software-engineering * Resilience: error detection, fault recovery * Workflows for supporting complex in situ processing pipelines Requirements * Preserve important elements * Significantly reduce the data size * Flexibility for post-processing exploration Review Process ---------------------- All submissions will undergo a peer-review process consisting of three reviews by experts in the field, and evaluated according to relevance to the workshop theme, technical soundness, creativity, originality, and impactfulness of method/results. Lightning round submissions will be evaluated primarily for relevance to the workshop. Submission Process ---------------------------- Authors are invited to submit papers of at most 4 pages in PDF format, excluding references, and lightning presentations of at most 2 pages in PDF format, excluding references. Papers should be formatted in the ACM Proceedings Style (templates available at https://www.acm.org/publications/proceedings-template) and submitted via EasyChair (https://easychair.org/conferences/?conf=isav2016). No changes to the margins, spacing, or font sizes as specified by the style file are allowed. Papers must be self-contained and provide the technical substance required for the program committee to evaluate their contributions. Submitted papers must be original work that has not appeared in and is not under consideration for another conference or a journal. See the ACM Prior Publication Policy for more details. Papers can be submitted at https://easychair.org/conferences/?conf=isav2016. Publication in proceedings, presentation at the workshop --------------------------------------------------------------------------- All paper submissions that receive favorable reviews will be included as part of the workshop proceedings, which will be published through SIGHPC along with other SC16 workshop proceedings in the ACM Digital Library and IEEE Xplore. Lightning round submissions will not be included as part of the proceedings. Subject to the constraints of workshop length, some subset of the accepted publications will be invited to give a brief oral presentation at the workshop. The exact number of such presentations and their length will be determined after the review process has been completed. Timeline/Important Dates ----------------------------------- 22 August 2016 Paper submission deadline 15 September 2016 Author notification 30 September 2016 Camera ready copy due 15 October 2016 Final program posted to ISAV web page 13 November 2016 ISAV 2016 workshop at SC16 From dave.demarle at kitware.com Tue Aug 2 11:54:46 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 2 Aug 2016 11:54:46 -0400 Subject: [vtkusers] Please nominate ParaView for for the 2016 HPCwire Readers' Choice Awards Message-ID: We would like to thank everyone who contributed to version 5.1.2 of ParaView. To acknowledge the growth of ParaView, please join us in nominating the fruit of our combined efforts for a 2016 HPCwire Readers? Award in the ?Best HPC Visualization Product or Technology? category. Nominations can be made at http://www.hpcwire.com/2015-hpcwire-readers-choice-awards. Thank you for your support! For reference, here are some recent updates made to ParaView: - Enabled ray tracing through OSPRay - Added ?Point Interpolation? filters - Introduced the capability to render picture-in-picture visualizations - Launched a welcome screen with a link to ?ParaView Getting Started Guide? - Improved ParaView Catalyst and Cinema for In-Situ processing at extreme scales David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Tue Aug 2 13:42:41 2016 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Tue, 2 Aug 2016 11:42:41 -0600 Subject: [vtkusers] VTK animation under VTK-Web framework In-Reply-To: <1470127077406.34283@sphic.org.cn> References: <1470127077406.34283@sphic.org.cn> Message-ID: You have several options, but the simple one is to add a new rpc method on the server side that will move to the next "step", and then on the client side you can call that method at a given interval and asking for a render right after it. ## Server @exportRpc("next.step") def next(self): # Do your stuff for animation pass ## Client setInterval( function() { connection.session.call('next.step') .then(function() { viewport.render() }); }, 1000) On Tue, Aug 2, 2016 at 2:37 AM, ??? wrote: > ??Hi all, > > > I saw Bryan Conrad provided us a practical example on VTK animation ( > https://itk.org/Wiki/VTK/Examples/Python/Animation?). Now, I'd like to > refer this example to animate objects (e.g. sphere or cone) under VTK-Web > framework (e.g. vtk_web_cone.py). As far as I know, "TimerEvent" is used as > a timer to trigger an event repeatedly, and this timer is bound to > renderWindowInteractor by AddObserver. However, in vtk_web_cone.py, it > seems that web server is waiting after the renderWindow is set as an active > object. How can I start the timer? How to integrate the example into > vtk_web_cone.py? Any suggestions are welcomed. Thanks in advance?. > > > > Regards, > > > Zhuangming Shen > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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 lplavorante at gmail.com Tue Aug 2 14:52:15 2016 From: lplavorante at gmail.com (Luca Pallozzi Lavorante) Date: Tue, 2 Aug 2016 15:52:15 -0300 Subject: [vtkusers] Map StructuredGrid CellData onto a vtkPlaneWidget Message-ID: Hi everybody, I have found how to enable the visualization of CellData attributes mapped from a StructuredGrid to a vtkPlaneWidget. When I use CellData instead of PointData in the StructuredGrid, these are treated as FieldData and no longer as PointData. In this case, it is necessary to add the following lines: contourMapper.SetScalarModeToUsePointFieldData() contourMapper.SelectColorArray("CellData") where contourMapper is the vtkPolyDataMapper used to represent the plane used as a probe. The name "CellData" is the one I had specified for the CellData before passing it to the StructuredGrids. I hope this may help. Thank you Luca Pallozzi Lavorante -------------- next part -------------- An HTML attachment was scrubbed... URL: From bulkmailaddress at gmail.com Tue Aug 2 16:16:29 2016 From: bulkmailaddress at gmail.com (Karl Smith) Date: Tue, 2 Aug 2016 16:16:29 -0400 Subject: [vtkusers] Activiz.Net System.AccessViolationException updating pipeline Message-ID: Hi, I'm using Activiz.Net x64 5.8 from the nuget package. We are looking to replace WPF graphics with VTK. What we are trying to do as a starting point is convert some WPF MeshGeometry3D objects into vtkPolyData and display them. This is working fine and we could see and interact with the models. The only problem was that the models looked faceted (WPF calculated the normals automatically and VTK did not). We went back to add in the vtkPolyDataNormals filter, but are consistently receiving System.AccessVioloationExceptions when executing the pipeline. I have put together the following code snippet to demonstrate the problem. If called twice (with the same data), the second time results in the exception being thrown on the normal.Update() call. vtkPoints points = vtkPoints.New(); vtkCellArray polys = vtkCellArray.New(); ... populate points and polys ... vtkPolyData polyData = vtkPolyData.New(); polyData.SetPoints(points); polyData.SetPolys(polys); vtkPolyDataNormals normal = vtkPolyDataNormals.New(); normal.SetInput(polyData); normal.Update(); Any ideas? Could this behavior be from the way that we convert the MeshGeometry3D to vtkPolyData? MeshGeometry3D mesh = ... vtkPoints points = vtkPoints.New(); points.SetNumberOfPoints(mesh.Positions.Count); vtkCellArray polys = vtkCellArray.New(); polys.SetNumberOfCells(mesh.TriangleIndices.Count / 3); for (int i = 0; i < mesh.Positions.Count; i++) { points.InsertPoint(i, mesh.Positions[i].X, mesh.Positions[i].Y, mesh.Positions[i].Z); } for (int i = 0; i < mesh.TriangleIndices.Count; i++) { vtkIdList trianglePoints = vtkIdList.New(); trianglePoints.SetNumberOfIds(3); trianglePoints.InsertId(0, mesh.TriangleIndices[i++]); trianglePoints.InsertId(1, mesh.TriangleIndices[i++]); trianglePoints.InsertId(2, mesh.TriangleIndices[i]); polys.InsertNextCell(trianglePoints); } vtkPolyData polyData = vtkPolyData.New(); polyData.SetPoints(points); polyData.SetPolys(polys); -------------- next part -------------- An HTML attachment was scrubbed... URL: From rickfrank at me.com Tue Aug 2 16:33:56 2016 From: rickfrank at me.com (Richard Frank) Date: Tue, 02 Aug 2016 20:33:56 +0000 (GMT) Subject: [vtkusers] Moving an actor, after about 1.5 hours. Message-ID: <5502f59c-1ace-4b5a-87b2-0c4b47b78ce0@me.com> Just to follow up on this: We changed (~ 400 files) to put the time?variable to 64 bits. Our animation problems have been completely solved by this change. On Mar 07, 2016, at 10:07 AM, David Gobbi wrote: On Mon, Mar 7, 2016 at 6:43 AM, Richard Frank wrote: Not yet. That will be next step. Seems plausible since I can't ?find after quite a bit of testing any leaks, OpenGL errors reported, and testing on different systems with different Nvidia cards. etc, and tracing into VTK ( although trying to trace through all the calls to executive, algorithm, superclass, etc is quite cumbersome). Things just fail to move, silently. As far as I'm aware, the only reason that VTK hasn't yet switched to a 64-bit MTime everywhere is that there would be backwards compatibility problems (GetMTime is a virtual method that is overridden in many subclasses). I found another post where someone had a slightly similar problem and said removing and re-adding actors fixed the problem, which we also seem to see..... The VTK pipeline uses the difference between timestamps to as an indicator for when to undertake certain actions.? So it is likely that problems only arise when this "difference" between two crucial timestamps exceeds the 32-bit limit.? That's why re-adding actors might fix the problem. ? Also, why the runtime hit on a 64 bit build?. What are you referring to? (I rarely use Windows, and when I do, I use 32-bit builds). ?- David? -------------- next part -------------- An HTML attachment was scrubbed... URL: From rickfrank at me.com Tue Aug 2 16:37:04 2016 From: rickfrank at me.com (Richard Frank) Date: Tue, 02 Aug 2016 20:37:04 +0000 (GMT) Subject: [vtkusers] Moving an actor, after about 1.5 hours. Message-ID: And to add (so that others searching the list will find it) anyone doing interventional medical imaging with VTK on Windows would be best advised to move the time variable to 64 bits, or you will have animation/ rendering problems. Thanks Rick On Mar 07, 2016, at 10:07 AM, David Gobbi wrote: On Mon, Mar 7, 2016 at 6:43 AM, Richard Frank wrote: Not yet. That will be next step. Seems plausible since I can't ?find after quite a bit of testing any leaks, OpenGL errors reported, and testing on different systems with different Nvidia cards. etc, and tracing into VTK ( although trying to trace through all the calls to executive, algorithm, superclass, etc is quite cumbersome). Things just fail to move, silently. As far as I'm aware, the only reason that VTK hasn't yet switched to a 64-bit MTime everywhere is that there would be backwards compatibility problems (GetMTime is a virtual method that is overridden in many subclasses). I found another post where someone had a slightly similar problem and said removing and re-adding actors fixed the problem, which we also seem to see..... The VTK pipeline uses the difference between timestamps to as an indicator for when to undertake certain actions.? So it is likely that problems only arise when this "difference" between two crucial timestamps exceeds the 32-bit limit.? That's why re-adding actors might fix the problem. ? Also, why the runtime hit on a 64 bit build?. What are you referring to? (I rarely use Windows, and when I do, I use 32-bit builds). ?- David? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sur.chiranjib at gmail.com Wed Aug 3 06:00:36 2016 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Wed, 3 Aug 2016 15:30:36 +0530 Subject: [vtkusers] C++ 11 compiler issues with Makefile generate using cmake Message-ID: Hi, In my C++ code I am initialising my data members in the header file (example below) class foo{ public: int myInt =0; .... } When I create the Makefile using cmake, and try to compile the compiler trows an error that error: ISO C++ forbids initialization of member ?myInt? I am using the "-std=c++0x" flag in my CMakeLists.txt file. This is a standard feature and I am puzzled why the compiler is complaining with the CMake generate Makefile. Any expert comments? Thanks, Chiranjib -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcin.krotkiewski at gmail.com Wed Aug 3 06:47:01 2016 From: marcin.krotkiewski at gmail.com (marcin.krotkiewski) Date: Wed, 3 Aug 2016 12:47:01 +0200 Subject: [vtkusers] Performance issues with triangle strips Message-ID: <56feac72-7557-d42c-664e-68a4d7d7dcce@gmail.com> Hello, I am testing efficiency of triangle strips in visualization of large digital elevation models. Initial tests show signifficant improvements in memory usage, but also some performance issues: it seems that for example the vtkContourFilter performs _much_ worse when using strips. I am running VTK7 with OpenGL2 backend on Ubuntu. For an example model with 46e6 triangles, I tested two versions of the code (I use Java wrappings): grid = vtkPolyData(); grid.SetPoints(nodes); grid.SetPolys(elems); or [...] grid.SetStrips(elems); In the first scenario computing the contours took 13s, in the second - 182s. I also used vtkStripper to actually compute some longer strips. For 50e3 computed strips the contour filter took 34s to update. Much better, but still worse than when using individual triangles. So my questions are - is there something I can do to improve the contouring speed? (is it parallelizable in current VTK version, for example?) - are there any other known performance issues when using triangle strips in filters? Thanks a lot! Marcin Krotkiewski From ich_daniel at habmalnefrage.de Wed Aug 3 08:23:01 2016 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Wed, 3 Aug 2016 05:23:01 -0700 (MST) Subject: [vtkusers] Just a short question about the non-closing of cut surfaces Message-ID: <1470226981779-5739477.post@n5.nabble.com> Hi everbody, How can I cut an object *without* closing the cut surface? Can I deactivate the fill area in the class vtkClipClosedSurface? -- View this message in context: http://vtk.1045678.n5.nabble.com/Just-a-short-question-about-the-non-closing-of-cut-surfaces-tp5739477.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Aug 3 08:56:49 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 3 Aug 2016 06:56:49 -0600 Subject: [vtkusers] Just a short question about the non-closing of cut surfaces In-Reply-To: <1470226981779-5739477.post@n5.nabble.com> References: <1470226981779-5739477.post@n5.nabble.com> Message-ID: Hi Daniel, Call GenerateFacesOff() and then no new faces will be generated. - David On Wed, Aug 3, 2016 at 6:23 AM, -Daniel- wrote: > Hi everbody, > > How can I cut an object *without* closing the cut surface? > Can I deactivate the fill area in the class vtkClipClosedSurface? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Wed Aug 3 10:42:56 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Wed, 3 Aug 2016 10:42:56 -0400 Subject: [vtkusers] C++ 11 compiler issues with Makefile generate using cmake In-Reply-To: References: Message-ID: Hi Chiranjib, It could be one of several things. First I would run make VERBOSE=1 to see if the -std=c++0x is getting into the compile command correctly. If it is, then I would check if your compiler supports that feature. Especially when using the older compiler versions (the ones that use c++0x rather than c++11) some language features may not be supported. HTH, Shawn Also, adding the C++11 flags directly in the CMakeLists is not really the recommended way to tell CMake to use C++11. See these links (help pages for the CMake variables you probably want) for the recommended way to do it [1][2]. [1]: https://cmake.org/cmake/help/v3.6/variable/CMAKE_CXX_STANDARD.html [2]: https://cmake.org/cmake/help/v3.6/variable/CMAKE_CXX_STANDARD_REQUIRED.html On Wed, Aug 3, 2016 at 6:00 AM, Chiranjib Sur wrote: > Hi, > In my C++ code I am initialising my data members in the header file > (example below) > > class foo{ > public: > int myInt =0; > .... > } > > When I create the Makefile using cmake, and try to compile the compiler > trows an error that > > error: ISO C++ forbids initialization of member ?myInt? > > I am using the "-std=c++0x" flag in my CMakeLists.txt file. > > This is a standard feature and I am puzzled why the compiler is > complaining with the CMake generate Makefile. > > Any expert comments? > > Thanks, > Chiranjib > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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 cory.quammen at kitware.com Wed Aug 3 11:05:48 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 3 Aug 2016 11:05:48 -0400 Subject: [vtkusers] Moving an actor, after about 1.5 hours. In-Reply-To: References: Message-ID: Richard, Thanks for your report. You may be interested in Ken Martin's topic on this subject: https://gitlab.kitware.com/vtk/vtk/merge_requests/1724 Best, Cory On Tue, Aug 2, 2016 at 4:37 PM, Richard Frank wrote: > And to add (so that others searching the list will find it) anyone doing > interventional medical imaging with VTK on Windows would be best advised to > move the time variable to 64 bits, or you will have animation/ rendering > problems. > > Thanks > > Rick > > > On Mar 07, 2016, at 10:07 AM, David Gobbi wrote: > > On Mon, Mar 7, 2016 at 6:43 AM, Richard Frank wrote: > >> >> Not yet. That will be next step. Seems plausible since I can't find >> after quite a bit of testing any leaks, OpenGL errors reported, and testing >> on different systems with different Nvidia cards. etc, and tracing into VTK >> ( although trying to trace through all the calls to executive, algorithm, >> superclass, etc is quite cumbersome). Things just fail to move, silently. >> > > As far as I'm aware, the only reason that VTK hasn't yet switched to a > 64-bit MTime everywhere is that there would be backwards compatibility > problems (GetMTime is a virtual method that is overridden in many > subclasses). > > I found another post where someone had a slightly similar problem and said >> removing and re-adding actors fixed the problem, which we also seem to >> see..... >> > > The VTK pipeline uses the difference between timestamps to as an indicator > for when to undertake certain actions. So it is likely that problems only > arise when this "difference" between two crucial timestamps exceeds the > 32-bit limit. That's why re-adding actors might fix the problem. > > >> Also, why the runtime hit on a 64 bit build?. >> > > What are you referring to? (I rarely use Windows, and when I do, I use > 32-bit builds). > > - 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Wed Aug 3 11:33:44 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 3 Aug 2016 11:33:44 -0400 Subject: [vtkusers] VTK with gcc 6 In-Reply-To: References: <20160728150411.GA16334@megas.kitware.com> Message-ID: <20160803153344.GA6946@rotor> On Fri, Jul 29, 2016 at 10:54:12 +0200, Alexandre Ancel wrote: > Do you suggest to use the git version rather that the source packages ? What are you using it for? If you're compiling on your own anyways, using master could work if the code using VTK is VTK 7-ready (though if it requires VTK 5, I suspect that's a long shot). --Ben From otb.salbert at gmail.com Wed Aug 3 11:37:14 2016 From: otb.salbert at gmail.com (=?UTF-8?Q?St=C3=A9phane_ALBERT?=) Date: Wed, 3 Aug 2016 17:37:14 +0200 Subject: [vtkusers] (no subject) Message-ID: Hello, I'm new to VTK and on the rush to develop mock-up rendering a z = f( x, y ) 3D surface using the VTK in a Qt main-window. I http://orfeo-toolbox.org St?phane ALBERT Ing?nieur d'?tudes et d?veloppement Business Unit E-SPACE & Geo Information, D?partement APPLICATIONS CS Syst?mes d'Information Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872 31506 Toulouse Cedex 05 - France -------------- next part -------------- An HTML attachment was scrubbed... URL: From otb.salbert at gmail.com Wed Aug 3 11:48:24 2016 From: otb.salbert at gmail.com (=?UTF-8?Q?St=C3=A9phane_ALBERT?=) Date: Wed, 3 Aug 2016 17:48:24 +0200 Subject: [vtkusers] Rendering a z=f( x, y) 3D surface. Message-ID: Sorry, I mistyped something and the email has been sent. I'm new to VTK and on the rush to develop mock-up rendering a z = f( x, y ) 3D surface using the VTK in a Qt main-window. The goal of the mock-up is to test the load for large data such as, for example, 32000x32000 discretization of the x and y axes. I made a QMainWidow using a QVTKWidget and displaying a sphere (taken from the Examples section). I understood the general pipeline layout (similar to ITK) but I don't know which VTK classes I should use/derive to modelize my z = f( x, y ) function and render it. Should I : - derive from vtkPolyDataAlgorithm and implement a point generation algorithm ; - fill in some vtkImageData ; - implement some filter taking grid data ; - other? Basically, the user input the size (e.g. 32000), the software generates and render the data. As an option, I would like to add some controls to dynamically increase/decrease the size parameter. In a second step, we would like to test some adaptative rendering algorithms the fast render the large number of vertices. Does VTK provide such algorithms? How could I implement and insert one into the VTK pipeline ? Best regards, http://orfeo-toolbox.org St?phane ALBERT Ing?nieur d'?tudes et d?veloppement Business Unit E-SPACE & Geo Information, D?partement APPLICATIONS CS Syst?mes d'Information Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872 31506 Toulouse Cedex 05 - France 2016-08-03 17:37 GMT+02:00 St?phane ALBERT : > Hello, > > I'm new to VTK and on the rush to develop mock-up rendering a z = f( x, y > ) 3D surface using the VTK in a Qt main-window. I > > http://orfeo-toolbox.org > > St?phane ALBERT > Ing?nieur d'?tudes et d?veloppement > Business Unit E-SPACE & Geo Information, D?partement APPLICATIONS > > CS Syst?mes d'Information > Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872 > 31506 Toulouse Cedex 05 - France > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From otb.salbert at gmail.com Wed Aug 3 11:54:57 2016 From: otb.salbert at gmail.com (=?UTF-8?Q?St=C3=A9phane_ALBERT?=) Date: Wed, 3 Aug 2016 17:54:57 +0200 Subject: [vtkusers] Rendering a z=f( x, y) 3D surface Message-ID: Hello, I'm new to VTK and on the rush to develop mock-up rendering a z = f( x, y ) 3D surface using the VTK in a Qt main-window. The goal of the mock-up is to test the load for large data such as, for example, 32000x32000 discretization of the x and y axes. I made a QMainWidow using a QVTKWidget and displaying a sphere (taken from the Examples section). I understood the general pipeline layout (similar to ITK) but I don't know which VTK classes I should use/derive to modelize my z = f( x, y ) function and render it. Should I : - derive from vtkPolyDataAlgorithm and implement a point generation algorithm ; - fill in some vtkImageData ; - implement some filter taking grid data ; - other? Basically, the user input the size (e.g. 32000), the software generates and render the data. As an option, I would like to add some controls to dynamically increase/decrease the size parameter. In a second step, we would like to test some adaptative rendering algorithms the fast render the large number of vertices. Does VTK provide such algorithms? How could I implement and insert one into the VTK pipeline ? Best regards, http://orfeo-toolbox.org St?phane ALBERT Ing?nieur d'?tudes et d?veloppement Business Unit E-SPACE & Geo Information, D?partement APPLICATIONS CS Syst?mes d'Information Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872 31506 Toulouse Cedex 05 - France -------------- next part -------------- An HTML attachment was scrubbed... URL: From MEEHANBT at nv.doe.gov Wed Aug 3 11:55:35 2016 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Wed, 3 Aug 2016 15:55:35 +0000 Subject: [vtkusers] [EXTERNAL] Re: Rendering a z=f( x, y) 3D surface. In-Reply-To: <201608031549.u73FnpVS021427-u73FnpVU021427@mta-1.nv.doe.gov> References: <201608031549.u73FnpVS021427-u73FnpVU021427@mta-1.nv.doe.gov> Message-ID: This isn?t a Qt example, but it does show how to make a z = f(x, y) plot: http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Modelling/Python/expCos.py From: vtkusers > on behalf of St?phane ALBERT > Date: Wednesday, August 3, 2016 at 8:48 AM To: "vtkusers at vtk.org" > Subject: [EXTERNAL] Re: [vtkusers] Rendering a z=f( x, y) 3D surface. Sorry, I mistyped something and the email has been sent. I'm new to VTK and on the rush to develop mock-up rendering a z = f( x, y ) 3D surface using the VTK in a Qt main-window. The goal of the mock-up is to test the load for large data such as, for example, 32000x32000 discretization of the x and y axes. I made a QMainWidow using a QVTKWidget and displaying a sphere (taken from the Examples section). I understood the general pipeline layout (similar to ITK) but I don't know which VTK classes I should use/derive to modelize my z = f( x, y ) function and render it. Should I : * derive from vtkPolyDataAlgorithm and implement a point generation algorithm ; * fill in some vtkImageData ; * implement some filter taking grid data ; * other? Basically, the user input the size (e.g. 32000), the software generates and render the data. As an option, I would like to add some controls to dynamically increase/decrease the size parameter. In a second step, we would like to test some adaptative rendering algorithms the fast render the large number of vertices. Does VTK provide such algorithms? How could I implement and insert one into the VTK pipeline ? Best regards, http://orfeo-toolbox.org St?phane ALBERT Ing?nieur d'?tudes et d?veloppement Business Unit E-SPACE & Geo Information, D?partement APPLICATIONS CS Syst?mes d'Information Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872 31506 Toulouse Cedex 05 - France 2016-08-03 17:37 GMT+02:00 St?phane ALBERT >: Hello, I'm new to VTK and on the rush to develop mock-up rendering a z = f( x, y ) 3D surface using the VTK in a Qt main-window. I http://orfeo-toolbox.org St?phane ALBERT Ing?nieur d'?tudes et d?veloppement Business Unit E-SPACE & Geo Information, D?partement APPLICATIONS CS Syst?mes d'Information Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872 31506 Toulouse Cedex 05 - France -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Aug 3 12:12:32 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 3 Aug 2016 10:12:32 -0600 Subject: [vtkusers] Rendering a z=f( x, y) 3D surface In-Reply-To: References: Message-ID: Hi St?phane, The class that generates a z=f(x,y) surface is the vtkWarpScalar class. Basic usage is as follows: 1) create a 2D image where the pixel value is the elevation (i.e. the z value) 2) turn this into a polydata with vtkImageDataGeometryFilter 3) use vtkWarpScalar to set the "z" value of each point to the pixel value - David On Wed, Aug 3, 2016 at 9:54 AM, St?phane ALBERT wrote: > Hello, > > I'm new to VTK and on the rush to develop mock-up rendering a z = f( x, y > ) 3D surface using the VTK in a Qt main-window. > > The goal of the mock-up is to test the load for large data such as, for > example, 32000x32000 discretization of the x and y axes. > > I made a QMainWidow using a QVTKWidget and displaying a sphere (taken from > the Examples section). > > I understood the general pipeline layout (similar to ITK) but I don't know > which VTK classes I should use/derive to modelize my z = f( x, y ) function > and render it. > > Should I : > > - derive from vtkPolyDataAlgorithm and implement a point generation > algorithm ; > - fill in some vtkImageData ; > - implement some filter taking grid data ; > - other? > > Basically, the user input the size (e.g. 32000), the software generates > and render the data. > > As an option, I would like to add some controls to dynamically > increase/decrease the size parameter. > > In a second step, we would like to test some adaptative rendering > algorithms the fast render the large number of vertices. Does VTK provide > such algorithms? How could I implement and insert one into the VTK pipeline > ? > Best regards, > > http://orfeo-toolbox.org > > St?phane ALBERT > Ing?nieur d'?tudes et d?veloppement > Business Unit E-SPACE & Geo Information, D?partement APPLICATIONS > > CS Syst?mes d'Information > Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872 > 31506 Toulouse Cedex 05 - France > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Wed Aug 3 13:58:47 2016 From: bebe0705 at colorado.edu (BBerco) Date: Wed, 3 Aug 2016 10:58:47 -0700 (MST) Subject: [vtkusers] Find subset of connectivity table: better solution than brute force? Message-ID: <1470247127811-5739489.post@n5.nabble.com> Dear all, I am trying to find a way to highlight the facets corresponding to a set of selected vertices taken on a facet/vertex shape model. Those facets therefore form a subset of the full shape model. To do so, I was thinking of creating a VtkPolyData representing the connectivity of the selected facets, so as to get the subset of the full shape model. I have access to the full shape's connectivity table (vertices coordinates and facets definition with the vertices ids) and to the ids of the selected vertices. An intuitive (also know as brute-force) way to reconstruct the subset of the connectivity table could be to search the connectivity table of the full shape model, to see which facets are completely included by the selected vertices blob. "completely included" meaning that the three vertices of the said facet can be found among the selected vertices' ids. Before delving into this, I was wondering if any of you had heard of a more elegant, built-in solution enabling one to reconstruct this connectivity table. Many thanks, Ben -- View this message in context: http://vtk.1045678.n5.nabble.com/Find-subset-of-connectivity-table-better-solution-than-brute-force-tp5739489.html Sent from the VTK - Users mailing list archive at Nabble.com. From vtk12af6bc42 at kant.sophonet.de Wed Aug 3 14:05:31 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Wed, 03 Aug 2016 20:05:31 +0200 Subject: [vtkusers] Qt-based VTK app shows black image content if VTK is linked statically Message-ID: <7649f6f5be29b946b01894509edb2463@srv19.sysproserver.de> Hi list, recently, I have been working on a Qt application (using VTK functionality in the main .exe and a bunch of underlying DLLs). If VTK is built dynamically, the application behaves as expected. However, if VTK is built statically (and - obviously - the application and underlying DLLs are then built using the static libraries of VTK), some content (vtkImageSlice) is missing in the render window, i.e. does not appear at all. Other parts (e.g. vtkPolyData) are shown correctly. Anyone knows how to fix this? If possible, I would like to do static linking of VTK. Thanks, sophonet From enzo.matsumiya at gmail.com Wed Aug 3 14:21:24 2016 From: enzo.matsumiya at gmail.com (Enzo Matsumiya) Date: Wed, 3 Aug 2016 15:21:24 -0300 Subject: [vtkusers] Qt-based VTK app shows black image content if VTK is linked statically In-Reply-To: <7649f6f5be29b946b01894509edb2463@srv19.sysproserver.de> References: <7649f6f5be29b946b01894509edb2463@srv19.sysproserver.de> Message-ID: <0758FD43-9B27-480B-A4FD-8048DC1460E0@gmail.com> I can confirm that some issues occur when using VTK static as well (VTK stable 7.0.0). I could not look further into the issue, but my application crashed instead of just black window, and I just rolled back to dynamic build. Appreciate any details on this. Thanks, Enzo > On Aug 3, 2016, at 15:05, Sophonet wrote: > > Hi list, > > recently, I have been working on a Qt application (using VTK functionality in the main .exe and a bunch of underlying DLLs). > > If VTK is built dynamically, the application behaves as expected. > > However, if VTK is built statically (and - obviously - the application and underlying DLLs are then built using the static libraries of VTK), some content (vtkImageSlice) is missing in the render window, i.e. does not appear at all. Other parts (e.g. vtkPolyData) are shown correctly. > > Anyone knows how to fix this? If possible, I would like to do static linking of VTK. > > Thanks, > > sophonet > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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 From g.bogle at auckland.ac.nz Wed Aug 3 14:24:31 2016 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Wed, 3 Aug 2016 18:24:31 +0000 Subject: [vtkusers] [FORGED] Re: Qt-based VTK app shows black image content if VTK is linked statically In-Reply-To: <0758FD43-9B27-480B-A4FD-8048DC1460E0@gmail.com> References: <7649f6f5be29b946b01894509edb2463@srv19.sysproserver.de>, <0758FD43-9B27-480B-A4FD-8048DC1460E0@gmail.com> Message-ID: Statically linked VTK 5.10 works fine with Qt. ________________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Enzo Matsumiya [enzo.matsumiya at gmail.com] Sent: Thursday, 4 August 2016 6:21 a.m. To: Constantinescu Mihai via vtkusers Subject: [FORGED] Re: [vtkusers] Qt-based VTK app shows black image content if VTK is linked statically I can confirm that some issues occur when using VTK static as well (VTK stable 7.0.0). I could not look further into the issue, but my application crashed instead of just black window, and I just rolled back to dynamic build. Appreciate any details on this. Thanks, Enzo > On Aug 3, 2016, at 15:05, Sophonet wrote: > > Hi list, > > recently, I have been working on a Qt application (using VTK functionality in the main .exe and a bunch of underlying DLLs). > > If VTK is built dynamically, the application behaves as expected. > > However, if VTK is built statically (and - obviously - the application and underlying DLLs are then built using the static libraries of VTK), some content (vtkImageSlice) is missing in the render window, i.e. does not appear at all. Other parts (e.g. vtkPolyData) are shown correctly. > > Anyone knows how to fix this? If possible, I would like to do static linking of VTK. > > Thanks, > > sophonet > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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 _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://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 From jeannasheen at gmail.com Wed Aug 3 14:37:40 2016 From: jeannasheen at gmail.com (Jeanna S.) Date: Wed, 3 Aug 2016 11:37:40 -0700 Subject: [vtkusers] Configuring VTK Error Message-ID: Hello, I am trying to install VTK, but when I configure VTK in CMake, I get the following error: CMake Error: Error in cmake code at /Volumes/FAT32G/ITKstuffs/VTK/Remote/._PoissonReconstruction.remote.cmake:1: Parse error. Expected a command name, got unquoted argument with text "". CMake Error at Remote/CMakeLists.txt:6 (include): include could not find load file: /Volumes/FAT32G/ITKstuffs/VTK/Remote/._PoissonReconstruction.remote.cmake CMake Error: Error in cmake code at /Volumes/FAT32G/ITKstuffs/VTK/Remote/._vtkAddon.remote.cmake:1: Parse error. Expected a command name, got unquoted argument with text "". CMake Error at Remote/CMakeLists.txt:6 (include): include could not find load file: /Volumes/FAT32G/ITKstuffs/VTK/Remote/._vtkAddon.remote.cmake CMake Error: Error in cmake code at /Volumes/FAT32G/ITKstuffs/VTK/Remote/._vtkDICOM.remote.cmake:1: Parse error. Expected a command name, got unquoted argument with text "". CMake Error at Remote/CMakeLists.txt:6 (include): include could not find load file: /Volumes/FAT32G/ITKstuffs/VTK/Remote/._vtkDICOM.remote.cmake FAT32G is the name of the disk I am trying to install VTK on, and ITKstuffs is the name of the folder I put all my ITK- and VTK-related things in. I am not sure what is wrong with the VTK code that is causing this error. Below is the code in PoissonReconstruction.remote.cmake, vtkAddon.remote.cmake, and vtkDICOM.remote.cmake: # # Poisson Reconstruction # vtk_fetch_module(PoissonReconstruction "Poisson Surface reconstruction from unorganized points" GIT_REPOSITORY https://github.com/lorensen/PoissonReconstruction # July 5, 2015 - first working as a remote module GIT_TAG a3fdb529774d48329a2e807e542f2fe589060ccb ) -------------------- # # vtkAddon # vtk_fetch_module(vtkAddon "Slicer additions to vtk" GIT_REPOSITORY https://github.com/lorensen/vtkAddon GIT_TAG 0d324d0a7afbd2f7ddd79ae52640fddd15091b34 ) -------------------- # # Dicom Classes # vtk_fetch_module(vtkDICOM "Dicom classes and utilities" GIT_REPOSITORY https://github.com/dgobbi/vtk-dicom # vtk-dicom tag v0.7.1 (Nov 16, 2015) GIT_TAG f51f08a74d82d620850a39be34e11ab1fb009a19 ) Any suggestions on how to fix this error would be greatly appreciated. Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.1.lily at hotmail.com Wed Aug 3 17:14:23 2016 From: the.1.lily at hotmail.com (the lily) Date: Wed, 3 Aug 2016 21:14:23 +0000 Subject: [vtkusers] vtk linking error cannot find some libraries Message-ID: Hi, I'm trying to link VTK and for some reason vtk is not finding some of the libraries, and when I search for it in the lib folder I did not find these libraries. I specified the vtk path in the makefile, I'm not sure what I'm missing. These are the libraries cannot find -lvtkRenderingParallel-6.1 cannot find -lvtkzlib-6.1 cannot find -lvtkFiltersParallelStatistics-6.1 cannot find -lvtkWrappingTools-6.1 thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Wed Aug 3 17:40:56 2016 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Wed, 3 Aug 2016 14:40:56 -0700 (MST) Subject: [vtkusers] Just a short question about the non-closing of cut surfaces In-Reply-To: References: <1470226981779-5739477.post@n5.nabble.com> Message-ID: <1470260456114-5739496.post@n5.nabble.com> Hi David, thanks for your fast reply, but I would just like on the intersection between Plane and Polydata no polygons. With GenerateFacesOff() the output will have all without polys. vtkClipClosedSurface clip = new vtkClipClosedSurface(); clip.SetClippingPlanes(planeCollection); clip.GenerateOutlineOn(); clip.AddInputData(polydata); // clip.GenerateFacesOff(); Other suggestion? -- View this message in context: http://vtk.1045678.n5.nabble.com/Just-a-short-question-about-the-non-closing-of-cut-surfaces-tp5739477p5739496.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Wed Aug 3 17:44:23 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 3 Aug 2016 17:44:23 -0400 Subject: [vtkusers] Just a short question about the non-closing of cut surfaces In-Reply-To: <1470260456114-5739496.post@n5.nabble.com> References: <1470226981779-5739477.post@n5.nabble.com> <1470260456114-5739496.post@n5.nabble.com> Message-ID: How about use vtkCutter with a vtkPlane as the cut function? See http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/VisualizationAlgorithms/Python/ClipCow.py for an example of it in use. - Cory On Wed, Aug 3, 2016 at 5:40 PM, -Daniel- wrote: > Hi David, > > thanks for your fast reply, but I would just like on the intersection > between Plane and Polydata no polygons. > With GenerateFacesOff() the output will have all without polys. > > vtkClipClosedSurface clip = new vtkClipClosedSurface(); > clip.SetClippingPlanes(planeCollection); > clip.GenerateOutlineOn(); > clip.AddInputData(polydata); > // clip.GenerateFacesOff(); > > Other suggestion? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Just-a-short-question-about-the-non-closing-of-cut-surfaces-tp5739477p5739496.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 > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cycopepe at gmail.com Wed Aug 3 19:42:09 2016 From: cycopepe at gmail.com (Jose Guzman) Date: Wed, 3 Aug 2016 18:42:09 -0500 Subject: [vtkusers] vtk Documentation Proposal Message-ID: Hello there is a new feature over stack overflow in order to build a section on VTK documentation interested could take a lool over http://stackoverflow.com/documentation/vtk -- Jos? Luis Guzm?n Rodr?guez skype: cycopepe *--------------------------------------------------------* *Please consider the environment before printing* -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Wed Aug 3 19:58:40 2016 From: bebe0705 at colorado.edu (BBerco) Date: Wed, 3 Aug 2016 16:58:40 -0700 (MST) Subject: [vtkusers] Find subset of connectivity table: better solution than brute force? In-Reply-To: <1470247127811-5739489.post@n5.nabble.com> References: <1470247127811-5739489.post@n5.nabble.com> Message-ID: <1470268720697-5739499.post@n5.nabble.com> Hello there, I ended up using vtkPolyData::GetPointCells (vtkIdType ptId, vtkIdList *cellIds) to find which cells the vertex identified by ptId belongs to. In the context of my code, this method returns cell IDs of all cells containing at least one selected point, as opposed to my initial plan to get cells containing exactly three selected points. This solution suits me fine though. -- View this message in context: http://vtk.1045678.n5.nabble.com/Find-subset-of-connectivity-table-better-solution-than-brute-force-tp5739489p5739499.html Sent from the VTK - Users mailing list archive at Nabble.com. From jeannasheen at gmail.com Wed Aug 3 20:14:14 2016 From: jeannasheen at gmail.com (Jeanna S.) Date: Wed, 3 Aug 2016 17:14:14 -0700 Subject: [vtkusers] Configuring VTK Error In-Reply-To: References: Message-ID: Hello, I have already fixed the error in configuring VTK. It seems that building VTK on a separate disk is what caused the error for some reason. It worked fine after I re-downloaded VTK and kept it on my desktop when I configured it. However, when I try to link ITK and VTK together, I get an error message when I configure ITK with the box for "Module_ItkVtkGlue". The message states: CMake Error at /Users/JJ/Desktop/ITKstuffs/VTK/VTKbin/CMakeFiles/VTKConfig.cmake:68 (include): include could not find load file: /Users/JJ/Desktop/ITKstuffs/lib/cmake/vtk-7.0/VTKTargets.cmake Call Stack (most recent call first): Modules/Bridge/VtkGlue/itk-module-init.cmake:9 (find_package) CMake/ITKModuleEnablement.cmake:316 (include) CMakeLists.txt:316 (include) CMake Error at /Users/JJ/Desktop/ITKstuffs/VTK/VTKbin/CMakeFiles/VTKConfig.cmake:72 (include): include could not find load file: /Users/JJ/Desktop/ITKstuffs/lib/cmake/vtk-7.0/vtkModuleAPI.cmake Call Stack (most recent call first): Modules/Bridge/VtkGlue/itk-module-init.cmake:9 (find_package) CMake/ITKModuleEnablement.cmake:316 (include) CMakeLists.txt:316 (include) CMake Error at /Users/JJ/Desktop/ITKstuffs/VTK/VTKbin/CMakeFiles/VTKConfig.cmake:88 (vtk_module_config): Unknown CMake command "vtk_module_config". Call Stack (most recent call first): Modules/Bridge/VtkGlue/itk-module-init.cmake:9 (find_package) CMake/ITKModuleEnablement.cmake:316 (include) CMakeLists.txt:316 (include) I could not find any file named VTKTargets.cmake or vtkModuleAPI.cmake. Are these files I have to add myself? Any help would be greatly appreciated. Thanks in advance. On Wed, Aug 3, 2016 at 11:37 AM, Jeanna S. wrote: > Hello, > > I am trying to install VTK, but when I configure VTK in CMake, I get the > following error: > > CMake Error: Error in cmake code at > > /Volumes/FAT32G/ITKstuffs/VTK/Remote/._PoissonReconstruction.remote.cmake:1: > Parse error. Expected a command name, got unquoted argument with text "". > > CMake Error at Remote/CMakeLists.txt:6 (include): > include could not find load file: > > /Volumes/FAT32G/ITKstuffs/VTK/Remote/._PoissonReconstruction.remote.cmake > > CMake Error: Error in cmake code at > /Volumes/FAT32G/ITKstuffs/VTK/Remote/._vtkAddon.remote.cmake:1: > Parse error. Expected a command name, got unquoted argument with text "". > > CMake Error at Remote/CMakeLists.txt:6 (include): > include could not find load file: > > /Volumes/FAT32G/ITKstuffs/VTK/Remote/._vtkAddon.remote.cmake > > CMake Error: Error in cmake code at > /Volumes/FAT32G/ITKstuffs/VTK/Remote/._vtkDICOM.remote.cmake:1: > Parse error. Expected a command name, got unquoted argument with text "". > > CMake Error at Remote/CMakeLists.txt:6 (include): > include could not find load file: > > /Volumes/FAT32G/ITKstuffs/VTK/Remote/._vtkDICOM.remote.cmake > > > FAT32G is the name of the disk I am trying to install VTK on, and > ITKstuffs is the name of the folder I put all my ITK- and VTK-related > things in. I am not sure what is wrong with the VTK code that is causing > this error. Below is the code in PoissonReconstruction.remote.cmake, > vtkAddon.remote.cmake, and vtkDICOM.remote.cmake: > > > # > > # Poisson Reconstruction > > # > > > vtk_fetch_module(PoissonReconstruction > > "Poisson Surface reconstruction from unorganized points" > > GIT_REPOSITORY https://github.com/lorensen/PoissonReconstruction > > # July 5, 2015 - first working as a remote module > > GIT_TAG a3fdb529774d48329a2e807e542f2fe589060ccb > > ) > -------------------- > # > # vtkAddon > # > > vtk_fetch_module(vtkAddon > "Slicer additions to vtk" > GIT_REPOSITORY https://github.com/lorensen/vtkAddon > GIT_TAG 0d324d0a7afbd2f7ddd79ae52640fddd15091b34 > ) > -------------------- > # > # Dicom Classes > # > > vtk_fetch_module(vtkDICOM > "Dicom classes and utilities" > GIT_REPOSITORY https://github.com/dgobbi/vtk-dicom > # vtk-dicom tag v0.7.1 (Nov 16, 2015) > GIT_TAG f51f08a74d82d620850a39be34e11ab1fb009a19 > ) > > > Any suggestions on how to fix this error would be greatly appreciated. > Thanks in advance. > -- when the rich wage war, it's the poor who die -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Thu Aug 4 04:48:31 2016 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Thu, 4 Aug 2016 01:48:31 -0700 (MST) Subject: [vtkusers] Just a short question about the non-closing of cut surfaces In-Reply-To: References: <1470226981779-5739477.post@n5.nabble.com> <1470260456114-5739496.post@n5.nabble.com> Message-ID: <1470300511723-5739502.post@n5.nabble.com> Thanks Cory! This is the example what I was looking for. -- View this message in context: http://vtk.1045678.n5.nabble.com/Just-a-short-question-about-the-non-closing-of-cut-surfaces-tp5739477p5739502.html Sent from the VTK - Users mailing list archive at Nabble.com. From pkorir at ebi.ac.uk Thu Aug 4 05:41:34 2016 From: pkorir at ebi.ac.uk (Paul Kibet Korir) Date: Thu, 4 Aug 2016 10:41:34 +0100 Subject: [vtkusers] Python-VTK: Offload computations to GPU Message-ID: <9a1fc591-3e79-1622-0caa-14987198e1d7@ebi.ac.uk> http://stackoverflow.com/questions/38763731/python-vtk-offload-computations-to-gpu If you have an answer please contribute. Thanks. -- With kind regards, *Dr. Paul K Korir, PhD* /Scientific Programmer/ EMBL-EBI Main Building, A2-35, WTGC, Hinxton, Cambridge CB10 1SD P: +44 1223 49 44 22 F: +44 1223 49 44 68 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rickfrank at me.com Thu Aug 4 08:35:41 2016 From: rickfrank at me.com (Richard Frank) Date: Thu, 04 Aug 2016 08:35:41 -0400 Subject: [vtkusers] Moving an actor, after about 1.5 hours. In-Reply-To: References: Message-ID: <1BC2D2FD-7559-4F90-B22D-11375D47454E@me.com> Thanks. I wonder if it could be a cmake option to allow for some backwards compatibility where needed. Sent from my iPad > On Aug 3, 2016, at 11:05 AM, Cory Quammen wrote: > > Richard, > > Thanks for your report. > > You may be interested in Ken Martin's topic on this subject: https://gitlab.kitware.com/vtk/vtk/merge_requests/1724 > > Best, > Cory > >> On Tue, Aug 2, 2016 at 4:37 PM, Richard Frank wrote: >> And to add (so that others searching the list will find it) anyone doing interventional medical imaging with VTK on Windows would be best advised to move the time variable to 64 bits, or you will have animation/ rendering problems. >> >> Thanks >> >> Rick >> >> >>> On Mar 07, 2016, at 10:07 AM, David Gobbi wrote: >>> >> >>>> On Mon, Mar 7, 2016 at 6:43 AM, Richard Frank wrote: >>>> >>>> Not yet. That will be next step. Seems plausible since I can't find after quite a bit of testing any leaks, OpenGL errors reported, and testing on different systems with different Nvidia cards. etc, and tracing into VTK ( although trying to trace through all the calls to executive, algorithm, superclass, etc is quite cumbersome). Things just fail to move, silently. >>> >>> As far as I'm aware, the only reason that VTK hasn't yet switched to a 64-bit MTime everywhere is that there would be backwards compatibility problems (GetMTime is a virtual method that is overridden in many subclasses). >>> >>>> I found another post where someone had a slightly similar problem and said removing and re-adding actors fixed the problem, which we also seem to see..... >>> >>> The VTK pipeline uses the difference between timestamps to as an indicator for when to undertake certain actions. So it is likely that problems only arise when this "difference" between two crucial timestamps exceeds the 32-bit limit. That's why re-adding actors might fix the problem. >>> >>>> Also, why the runtime hit on a 64 bit build?. >>> >>> What are you referring to? (I rarely use Windows, and when I do, I use 32-bit builds). >>> >>> - 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.1.lily at hotmail.com Thu Aug 4 10:11:15 2016 From: the.1.lily at hotmail.com (the lily) Date: Thu, 4 Aug 2016 14:11:15 +0000 Subject: [vtkusers] vtk linking error cannot find some libraries In-Reply-To: References: Message-ID: I think this happened because I changed the CMakeCache.txt I changed the following parameters BUILD_SHARED_LIBS:BOOL=OFF VTK_USE_SYSTEM_ZLIB:BOOL=ON I tried changing that back to its original value but when I try to build it using make I get the following error /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): sibling call optimization to `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' extern /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] Error 2 Any hints? ________________________________ From: vtkusers on behalf of the lily Sent: Thursday, August 4, 2016 12:14 AM To: vtkusers at vtk.org Subject: [vtkusers] vtk linking error cannot find some libraries Hi, I'm trying to link VTK and for some reason vtk is not finding some of the libraries, and when I search for it in the lib folder I did not find these libraries. I specified the vtk path in the makefile, I'm not sure what I'm missing. These are the libraries cannot find -lvtkRenderingParallel-6.1 cannot find -lvtkzlib-6.1 cannot find -lvtkFiltersParallelStatistics-6.1 cannot find -lvtkWrappingTools-6.1 thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Thu Aug 4 10:15:30 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Thu, 4 Aug 2016 10:15:30 -0400 Subject: [vtkusers] vtk linking error cannot find some libraries In-Reply-To: References: Message-ID: Hi, Usually when you change something major in VTK's build (such as BUILD_SHARED_LIBS), you need to delete the build tree completely to keep the leftovers from the old build from polluting the new one. That is probably what happened the first time too. I don't know if VTK_USE_SYSTEM_zlib is big enough to cause this... And did you rerun CMake after you edited the cache? HTH, Shawn On Thu, Aug 4, 2016 at 10:11 AM, the lily wrote: > I think this happened because I changed the CMakeCache.txt > > I changed the following parameters > > BUILD_SHARED_LIBS:BOOL=OFF > > VTK_USE_SYSTEM_ZLIB:BOOL=ON > > > I tried changing that back to its original value but when I try to build > it using make I get the following error > > > /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): > sibling call optimization to `std::basic_stringbuf std::char_traits, std::allocator >::~basic_stringbuf()' does > not allow automatic multiple TOCs; recompile with -mminimal-toc or > -fno-optimize-sibling-calls, or make `std::basic_stringbuf std::char_traits, std::allocator >::~basic_stringbuf()' extern > /usr/bin/ld: final link failed: Bad value > collect2: ld returned 1 exit status > make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 > make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] > Error 2 > > > > > Any hints? > > > > ------------------------------ > *From:* vtkusers on behalf of the lily < > the.1.lily at hotmail.com> > *Sent:* Thursday, August 4, 2016 12:14 AM > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] vtk linking error cannot find some libraries > > > Hi, > > > I'm trying to link VTK and for some reason vtk is not finding some of the > libraries, and when I search for it in the lib folder I did not find these > libraries. > > I specified the vtk path in the makefile, I'm not sure what I'm missing. > > These are the libraries > > > cannot find -lvtkRenderingParallel-6.1 > > cannot find -lvtkzlib-6.1 > > cannot find -lvtkFiltersParallelStatistics-6.1 > > cannot find -lvtkWrappingTools-6.1 > > > thanks. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.1.lily at hotmail.com Thu Aug 4 10:47:54 2016 From: the.1.lily at hotmail.com (the lily) Date: Thu, 4 Aug 2016 14:47:54 +0000 Subject: [vtkusers] vtk linking error cannot find some libraries In-Reply-To: References: , Message-ID: After I changed it back to the original values I did cmake make clean make but I'm still getting the same error: /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): sibling call optimization to `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' extern /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] Error 2 I'm trying to understand what causing the error, but no luck. Any idea on what might be the problem? ________________________________ From: Shawn Waldon Sent: Thursday, August 4, 2016 5:15 PM To: the lily Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtk linking error cannot find some libraries Hi, Usually when you change something major in VTK's build (such as BUILD_SHARED_LIBS), you need to delete the build tree completely to keep the leftovers from the old build from polluting the new one. That is probably what happened the first time too. I don't know if VTK_USE_SYSTEM_zlib is big enough to cause this... And did you rerun CMake after you edited the cache? HTH, Shawn On Thu, Aug 4, 2016 at 10:11 AM, the lily > wrote: I think this happened because I changed the CMakeCache.txt I changed the following parameters BUILD_SHARED_LIBS:BOOL=OFF VTK_USE_SYSTEM_ZLIB:BOOL=ON I tried changing that back to its original value but when I try to build it using make I get the following error /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): sibling call optimization to `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' extern /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] Error 2 Any hints? ________________________________ From: vtkusers > on behalf of the lily > Sent: Thursday, August 4, 2016 12:14 AM To: vtkusers at vtk.org Subject: [vtkusers] vtk linking error cannot find some libraries Hi, I'm trying to link VTK and for some reason vtk is not finding some of the libraries, and when I search for it in the lib folder I did not find these libraries. I specified the vtk path in the makefile, I'm not sure what I'm missing. These are the libraries cannot find -lvtkRenderingParallel-6.1 cannot find -lvtkzlib-6.1 cannot find -lvtkFiltersParallelStatistics-6.1 cannot find -lvtkWrappingTools-6.1 thanks. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Thu Aug 4 11:39:09 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Thu, 4 Aug 2016 11:39:09 -0400 Subject: [vtkusers] vtk linking error cannot find some libraries In-Reply-To: References: Message-ID: Two points. 1) Since you reran CMake before running make clean, the Makefile was rewritten to remove the output of the new build rather than the old build. So things from the old build that would have been removed were still present. 2) CMake doesn't fully support make clean. It works sometimes, but don't depend on it... depending on what you are changing it can fail with really strange errors. It is safest to delete the entire build directory and re-create it. HTH, Shawn On Thu, Aug 4, 2016 at 10:47 AM, the lily wrote: > After I changed it back to the original values > I did > cmake > make clean > make > > but I'm still getting the same error: > /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): > sibling call optimization to `std::basic_stringbuf std::char_traits, std::allocator >::~basic_stringbuf()' does > not allow automatic multiple TOCs; recompile with -mminimal-toc or > -fno-optimize-sibling-calls, or make `std::basic_stringbuf std::char_traits, std::allocator >::~basic_stringbuf()' extern > /usr/bin/ld: final link failed: Bad value > collect2: ld returned 1 exit status > make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 > make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] > Error 2 > > I'm trying to understand what causing the error, but no luck. Any idea on > what might be the problem? > > > ------------------------------ > *From:* Shawn Waldon > *Sent:* Thursday, August 4, 2016 5:15 PM > *To:* the lily > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] vtk linking error cannot find some libraries > > Hi, > > Usually when you change something major in VTK's build (such as > BUILD_SHARED_LIBS), you need to delete the build tree completely to keep > the leftovers from the old build from polluting the new one. That is > probably what happened the first time too. I don't know if > VTK_USE_SYSTEM_zlib is big enough to cause this... And did you rerun CMake > after you edited the cache? > > HTH, > Shawn > > On Thu, Aug 4, 2016 at 10:11 AM, the lily wrote: > >> I think this happened because I changed the CMakeCache.txt >> >> I changed the following parameters >> >> BUILD_SHARED_LIBS:BOOL=OFF >> >> VTK_USE_SYSTEM_ZLIB:BOOL=ON >> >> >> I tried changing that back to its original value but when I try to build >> it using make I get the following error >> >> >> /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): >> sibling call optimization to `std::basic_stringbuf> std::char_traits, std::allocator >::~basic_stringbuf()' does >> not allow automatic multiple TOCs; recompile with -mminimal-toc or >> -fno-optimize-sibling-calls, or make `std::basic_stringbuf> std::char_traits, std::allocator >::~basic_stringbuf()' extern >> /usr/bin/ld: final link failed: Bad value >> collect2: ld returned 1 exit status >> make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 >> make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] >> Error 2 >> >> >> >> >> Any hints? >> >> >> >> ------------------------------ >> *From:* vtkusers on behalf of the lily < >> the.1.lily at hotmail.com> >> *Sent:* Thursday, August 4, 2016 12:14 AM >> *To:* vtkusers at vtk.org >> *Subject:* [vtkusers] vtk linking error cannot find some libraries >> >> >> Hi, >> >> >> I'm trying to link VTK and for some reason vtk is not finding some of the >> libraries, and when I search for it in the lib folder I did not find these >> libraries. >> >> I specified the vtk path in the makefile, I'm not sure what I'm missing. >> >> These are the libraries >> >> >> cannot find -lvtkRenderingParallel-6.1 >> >> cannot find -lvtkzlib-6.1 >> >> cannot find -lvtkFiltersParallelStatistics-6.1 >> >> cannot find -lvtkWrappingTools-6.1 >> >> >> thanks. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Aug 4 11:44:13 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 4 Aug 2016 11:44:13 -0400 Subject: [vtkusers] testing the mailing list - please ignore Message-ID: sorry for the noise David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.1.lily at hotmail.com Thu Aug 4 12:10:34 2016 From: the.1.lily at hotmail.com (the lily) Date: Thu, 4 Aug 2016 16:10:34 +0000 Subject: [vtkusers] vtk linking error cannot find some libraries In-Reply-To: References: , Message-ID: I downloaded a new VTK version to make sure that I have nothing left over from before and I'm still getting the same error /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): sibling call optimization to `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' extern /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] Error 2 ________________________________ From: Shawn Waldon Sent: Thursday, August 4, 2016 6:39 PM To: the lily Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtk linking error cannot find some libraries Two points. 1) Since you reran CMake before running make clean, the Makefile was rewritten to remove the output of the new build rather than the old build. So things from the old build that would have been removed were still present. 2) CMake doesn't fully support make clean. It works sometimes, but don't depend on it... depending on what you are changing it can fail with really strange errors. It is safest to delete the entire build directory and re-create it. HTH, Shawn On Thu, Aug 4, 2016 at 10:47 AM, the lily > wrote: After I changed it back to the original values I did cmake make clean make but I'm still getting the same error: /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): sibling call optimization to `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' extern /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] Error 2 I'm trying to understand what causing the error, but no luck. Any idea on what might be the problem? ________________________________ From: Shawn Waldon > Sent: Thursday, August 4, 2016 5:15 PM To: the lily Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtk linking error cannot find some libraries Hi, Usually when you change something major in VTK's build (such as BUILD_SHARED_LIBS), you need to delete the build tree completely to keep the leftovers from the old build from polluting the new one. That is probably what happened the first time too. I don't know if VTK_USE_SYSTEM_zlib is big enough to cause this... And did you rerun CMake after you edited the cache? HTH, Shawn On Thu, Aug 4, 2016 at 10:11 AM, the lily > wrote: I think this happened because I changed the CMakeCache.txt I changed the following parameters BUILD_SHARED_LIBS:BOOL=OFF VTK_USE_SYSTEM_ZLIB:BOOL=ON I tried changing that back to its original value but when I try to build it using make I get the following error /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): sibling call optimization to `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' extern /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] Error 2 Any hints? ________________________________ From: vtkusers > on behalf of the lily > Sent: Thursday, August 4, 2016 12:14 AM To: vtkusers at vtk.org Subject: [vtkusers] vtk linking error cannot find some libraries Hi, I'm trying to link VTK and for some reason vtk is not finding some of the libraries, and when I search for it in the lib folder I did not find these libraries. I specified the vtk path in the makefile, I'm not sure what I'm missing. These are the libraries cannot find -lvtkRenderingParallel-6.1 cannot find -lvtkzlib-6.1 cannot find -lvtkFiltersParallelStatistics-6.1 cannot find -lvtkWrappingTools-6.1 thanks. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.1.lily at hotmail.com Thu Aug 4 13:26:29 2016 From: the.1.lily at hotmail.com (the lily) Date: Thu, 4 Aug 2016 17:26:29 +0000 Subject: [vtkusers] vtk linking error cannot find some libraries In-Reply-To: References: , , Message-ID: I forgot to mention that I'm building VTK on an HPC system. And I read somewhere that building VTK "properly" for an HPC system can be tricky because of the lack of OpenGL any suggestions? ________________________________ From: vtkusers on behalf of the lily Sent: Thursday, August 4, 2016 7:10 PM To: Shawn Waldon Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtk linking error cannot find some libraries I downloaded a new VTK version to make sure that I have nothing left over from before and I'm still getting the same error /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): sibling call optimization to `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' extern /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] Error 2 ________________________________ From: Shawn Waldon Sent: Thursday, August 4, 2016 6:39 PM To: the lily Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtk linking error cannot find some libraries Two points. 1) Since you reran CMake before running make clean, the Makefile was rewritten to remove the output of the new build rather than the old build. So things from the old build that would have been removed were still present. 2) CMake doesn't fully support make clean. It works sometimes, but don't depend on it... depending on what you are changing it can fail with really strange errors. It is safest to delete the entire build directory and re-create it. HTH, Shawn On Thu, Aug 4, 2016 at 10:47 AM, the lily > wrote: After I changed it back to the original values I did cmake make clean make but I'm still getting the same error: /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): sibling call optimization to `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' extern /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] Error 2 I'm trying to understand what causing the error, but no luck. Any idea on what might be the problem? ________________________________ From: Shawn Waldon > Sent: Thursday, August 4, 2016 5:15 PM To: the lily Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtk linking error cannot find some libraries Hi, Usually when you change something major in VTK's build (such as BUILD_SHARED_LIBS), you need to delete the build tree completely to keep the leftovers from the old build from polluting the new one. That is probably what happened the first time too. I don't know if VTK_USE_SYSTEM_zlib is big enough to cause this... And did you rerun CMake after you edited the cache? HTH, Shawn On Thu, Aug 4, 2016 at 10:11 AM, the lily > wrote: I think this happened because I changed the CMakeCache.txt I changed the following parameters BUILD_SHARED_LIBS:BOOL=OFF VTK_USE_SYSTEM_ZLIB:BOOL=ON I tried changing that back to its original value but when I try to build it using make I get the following error /usr/bin/ld: CMakeFiles/vtkRenderingOpenGL.dir/vtkXOpenGLRenderWindow.cxx.o(.text+0x6ef0): sibling call optimization to `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `std::basic_stringbuf, std::allocator >::~basic_stringbuf()' extern /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [lib/libvtkRenderingOpenGL-6.1.so.1] Error 1 make[1]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/all] Error 2 Any hints? ________________________________ From: vtkusers > on behalf of the lily > Sent: Thursday, August 4, 2016 12:14 AM To: vtkusers at vtk.org Subject: [vtkusers] vtk linking error cannot find some libraries Hi, I'm trying to link VTK and for some reason vtk is not finding some of the libraries, and when I search for it in the lib folder I did not find these libraries. I specified the vtk path in the makefile, I'm not sure what I'm missing. These are the libraries cannot find -lvtkRenderingParallel-6.1 cannot find -lvtkzlib-6.1 cannot find -lvtkFiltersParallelStatistics-6.1 cannot find -lvtkWrappingTools-6.1 thanks. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From budric at gmail.com Fri Aug 5 13:12:09 2016 From: budric at gmail.com (Bud Bundy) Date: Fri, 5 Aug 2016 13:12:09 -0400 Subject: [vtkusers] Setting vtkCamera to custom modelview & volume rendering Message-ID: <4fac07d9-8772-adab-79bf-027f0a9d2f00@gmail.com> Hi, I need to setup the camera to an arbitrary modelview matrix I have in memory. I managed to get some code working such that GetModelViewTransformMatrix() returns the modelview I have/want. However the volume rendering is sometimes blank, and I don't understand why because the volume is in front of the camera. I managed to boil down the problem to the following code below. camera1 and camera2 have the same modelview transform, however the rendering look very different (I've attached a screen shot) - though not blank it's a lot dimmer. The code is loosely based on: http://www.vtk.org/Wiki/VTK/Examples/Cxx/VolumeRendering/SmartVolumeMapper I'm using VTK 7.0 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vtkSmartPointer generateVolume() { // Create a spherical implicit function. vtkSmartPointer sphere = vtkSmartPointer::New(); sphere->SetRadius(0.1); sphere->SetCenter(0.0, 0.0, 0.0); vtkSmartPointer sampleFunction = vtkSmartPointer::New(); sampleFunction->SetImplicitFunction(sphere); sampleFunction->SetOutputScalarTypeToFloat(); sampleFunction->SetSampleDimensions(64, 64, 20); sampleFunction->SetModelBounds(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); sampleFunction->SetCapping(false); sampleFunction->SetComputeNormals(false); sampleFunction->SetScalarArrayName("values"); sampleFunction->Update(); vtkDataArray* a = sampleFunction->GetOutput()->GetPointData()->GetScalars("values"); double range[2]; a->GetRange(range); vtkSmartPointer t = vtkSmartPointer::New(); t->SetInputConnection(sampleFunction->GetOutputPort()); t->SetShift(-range[0]); double magnitude = range[1] - range[0]; if (magnitude == 0.0) { magnitude = 1.0; } t->SetScale(255.0 / magnitude); t->SetOutputScalarTypeToUnsignedChar(); t->Update(); vtkSmartPointer imageData = vtkSmartPointer::New(); imageData->ShallowCopy(t->GetOutput()); vtkSmartPointer volumeMapper = vtkSmartPointer::New(); volumeMapper->SetBlendModeToComposite(); // composite first volumeMapper->SetInputData(imageData); vtkSmartPointer volumeProperty = vtkSmartPointer::New(); volumeProperty->ShadeOff(); volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); vtkSmartPointer compositeOpacity = vtkSmartPointer::New(); compositeOpacity->AddPoint(0.0, 0.0); compositeOpacity->AddPoint(80.0, 1.0); compositeOpacity->AddPoint(80.1, 0.0); compositeOpacity->AddPoint(255.0, 0.0); volumeProperty->SetScalarOpacity(compositeOpacity); // composite first. vtkSmartPointer color = vtkSmartPointer::New(); color->AddRGBPoint(0.0, 0.0, 0.0, 1.0); color->AddRGBPoint(40.0, 1.0, 0.0, 0.0); color->AddRGBPoint(255.0, 1.0, 1.0, 1.0); volumeProperty->SetColor(color); vtkSmartPointer volume = vtkSmartPointer::New(); volume->SetMapper(volumeMapper); volume->SetProperty(volumeProperty); vtkSmartPointer volumeScaleTransform = vtkSmartPointer::New(); volumeScaleTransform->Identity(); volumeScaleTransform->SetElement(0, 0, 512); volumeScaleTransform->SetElement(1, 1, 512); volumeScaleTransform->SetElement(2, 2, 160); volume->SetUserMatrix(volumeScaleTransform); return volume; } int main() { // camera1 vtkSmartPointer camera1 = vtkSmartPointer::New(); camera1->SetPosition(0, 0, 1000); camera1->SetFocalPoint(0, 0, 0); camera1->SetClippingRange(0.1, 5000); camera1->SetViewAngle(60); //camera 2 vtkSmartPointer camera2 = vtkSmartPointer::New(); camera2->SetPosition(0, 0, 0); //I do not want any additional translation that comes with default (0,0,1) setting. camera2->SetFocalPoint(0, 0, -1); //setting this to (0,0,0) causes whole modelview matrix to be 0, regardless of what SetModelTransformMatrix() sets camera2->SetViewAngle(60); camera2->SetClippingRange(0.1, 5000); double modelViewTransform[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -1000, 0, 0, 0, 1 }; camera2->SetModelTransformMatrix(modelViewTransform); // renderer1 using camera1 vtkSmartPointer renderer1 = vtkSmartPointer::New(); renderer1->SetViewport(0, 0, 0.5, 1); renderer1->AddVolume(generateVolume()); renderer1->SetActiveCamera(camera1); // renderer2 using camera2 vtkSmartPointer renderer2 = vtkSmartPointer::New(); renderer2->SetViewport(0.5, 0, 1, 1); renderer2->AddVolume(generateVolume()); renderer2->SetActiveCamera(camera2); // assert model view matrices are the same vtkSmartPointer vtkModelViewMatrix1 = renderer1->GetActiveCamera()->GetModelViewTransformMatrix(); vtkSmartPointer vtkModelViewMatrix2 = renderer2->GetActiveCamera()->GetModelViewTransformMatrix(); for (int i = 0; i < 4; ++i) for (int j = 0; j < 4; ++j) assert(vtkModelViewMatrix1->GetElement(i, j) == vtkModelViewMatrix2->GetElement(i, j)); // window and interactor vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->SetSize(1024, 512); renderWindow->AddRenderer(renderer1); renderWindow->AddRenderer(renderer2); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } Thank you very much. -------------- next part -------------- A non-text attachment was scrubbed... Name: camera_problem.jpg Type: image/jpeg Size: 23175 bytes Desc: not available URL: From dave.demarle at kitware.com Fri Aug 5 14:10:29 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 5 Aug 2016 14:10:29 -0400 Subject: [vtkusers] Setting vtkCamera to custom modelview & volume rendering In-Reply-To: <4fac07d9-8772-adab-79bf-027f0a9d2f00@gmail.com> References: <4fac07d9-8772-adab-79bf-027f0a9d2f00@gmail.com> Message-ID: I was just doing a very similar thing and noticed that light positions are only updated with the set origin, focal point and up. I ended up computing those for my intended matrix and lighting then worked as expected. On Aug 5, 2016 1:12 PM, "Bud Bundy" wrote: > Hi, > > I need to setup the camera to an arbitrary modelview matrix I have in > memory. I managed to get some code working such that > GetModelViewTransformMatrix() returns the modelview I have/want. However > the volume rendering is sometimes blank, and I don't understand why because > the volume is in front of the camera. I managed to boil down the problem > to the following code below. camera1 and camera2 have the same modelview > transform, however the rendering look very different (I've attached a > screen shot) - though not blank it's a lot dimmer. > > The code is loosely based on: http://www.vtk.org/Wiki/VTK/Ex > amples/Cxx/VolumeRendering/SmartVolumeMapper > > I'm using VTK 7.0 > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > vtkSmartPointer generateVolume() > { > // Create a spherical implicit function. > vtkSmartPointer sphere = vtkSmartPointer::New(); > sphere->SetRadius(0.1); > sphere->SetCenter(0.0, 0.0, 0.0); > > vtkSmartPointer sampleFunction = > vtkSmartPointer::New(); > sampleFunction->SetImplicitFunction(sphere); > sampleFunction->SetOutputScalarTypeToFloat(); > sampleFunction->SetSampleDimensions(64, 64, 20); > sampleFunction->SetModelBounds(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); > sampleFunction->SetCapping(false); > sampleFunction->SetComputeNormals(false); > sampleFunction->SetScalarArrayName("values"); > sampleFunction->Update(); > > vtkDataArray* a = sampleFunction->GetOutput()->G > etPointData()->GetScalars("values"); > double range[2]; > a->GetRange(range); > > vtkSmartPointer t = vtkSmartPointer cale>::New(); > t->SetInputConnection(sampleFunction->GetOutputPort()); > > t->SetShift(-range[0]); > double magnitude = range[1] - range[0]; > if (magnitude == 0.0) > { > magnitude = 1.0; > } > t->SetScale(255.0 / magnitude); > t->SetOutputScalarTypeToUnsignedChar(); > t->Update(); > > vtkSmartPointer imageData = > vtkSmartPointer::New(); > imageData->ShallowCopy(t->GetOutput()); > > vtkSmartPointer volumeMapper = > vtkSmartPointer::New(); > volumeMapper->SetBlendModeToComposite(); // composite first > volumeMapper->SetInputData(imageData); > > vtkSmartPointer volumeProperty = > vtkSmartPointer::New(); > volumeProperty->ShadeOff(); > volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); > > vtkSmartPointer compositeOpacity = > vtkSmartPointer::New(); > compositeOpacity->AddPoint(0.0, 0.0); > compositeOpacity->AddPoint(80.0, 1.0); > compositeOpacity->AddPoint(80.1, 0.0); > compositeOpacity->AddPoint(255.0, 0.0); > volumeProperty->SetScalarOpacity(compositeOpacity); // composite > first. > > vtkSmartPointer color = > vtkSmartPointer::New(); > color->AddRGBPoint(0.0, 0.0, 0.0, 1.0); > color->AddRGBPoint(40.0, 1.0, 0.0, 0.0); > color->AddRGBPoint(255.0, 1.0, 1.0, 1.0); > volumeProperty->SetColor(color); > > vtkSmartPointer volume = vtkSmartPointer::New(); > volume->SetMapper(volumeMapper); > volume->SetProperty(volumeProperty); > > vtkSmartPointer volumeScaleTransform = > vtkSmartPointer::New(); > volumeScaleTransform->Identity(); > volumeScaleTransform->SetElement(0, 0, 512); > volumeScaleTransform->SetElement(1, 1, 512); > volumeScaleTransform->SetElement(2, 2, 160); > volume->SetUserMatrix(volumeScaleTransform); > return volume; > } > > int main() > { > // camera1 > vtkSmartPointer camera1 = vtkSmartPointer::Ne > w(); > camera1->SetPosition(0, 0, 1000); > camera1->SetFocalPoint(0, 0, 0); > camera1->SetClippingRange(0.1, 5000); > camera1->SetViewAngle(60); > > //camera 2 > vtkSmartPointer camera2 = vtkSmartPointer::Ne > w(); > camera2->SetPosition(0, 0, 0); //I do not want any > additional translation that comes with default (0,0,1) setting. > camera2->SetFocalPoint(0, 0, -1); //setting this to (0,0,0) > causes whole modelview matrix to be 0, regardless of what > SetModelTransformMatrix() sets > camera2->SetViewAngle(60); > camera2->SetClippingRange(0.1, 5000); > double modelViewTransform[16] = { 1, 0, 0, 0, > 0, 1, 0, 0, > 0, 0, 1, -1000, > 0, 0, 0, 1 }; > camera2->SetModelTransformMatrix(modelViewTransform); > > // renderer1 using camera1 > vtkSmartPointer renderer1 = vtkSmartPointer:: > New(); > renderer1->SetViewport(0, 0, 0.5, 1); > renderer1->AddVolume(generateVolume()); > renderer1->SetActiveCamera(camera1); > > // renderer2 using camera2 > vtkSmartPointer renderer2 = vtkSmartPointer:: > New(); > renderer2->SetViewport(0.5, 0, 1, 1); > renderer2->AddVolume(generateVolume()); > renderer2->SetActiveCamera(camera2); > > // assert model view matrices are the same > vtkSmartPointer vtkModelViewMatrix1 = > renderer1->GetActiveCamera()->GetModelViewTransformMatrix(); > vtkSmartPointer vtkModelViewMatrix2 = > renderer2->GetActiveCamera()->GetModelViewTransformMatrix(); > for (int i = 0; i < 4; ++i) > for (int j = 0; j < 4; ++j) > assert(vtkModelViewMatrix1->GetElement(i, j) == > vtkModelViewMatrix2->GetElement(i, j)); > > // window and interactor > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->SetSize(1024, 512); > renderWindow->AddRenderer(renderer1); > renderWindow->AddRenderer(renderer2); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > renderWindow->Render(); > renderWindowInteractor->Start(); > > return EXIT_SUCCESS; > } > > > Thank you very much. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 budric at gmail.com Fri Aug 5 15:10:16 2016 From: budric at gmail.com (Bud Bundy) Date: Fri, 5 Aug 2016 15:10:16 -0400 Subject: [vtkusers] Setting vtkCamera to custom modelview & volume rendering In-Reply-To: References: <4fac07d9-8772-adab-79bf-027f0a9d2f00@gmail.com> Message-ID: <90ec18eb-2f39-ef57-9361-5136b4c2cc8d@gmail.com> Thanks, The light positions were indeed different, but making them the same didn't fix it for me. Perhaps my fix is wrong? void assertArrayEquals(const double * a, const double * b, size_t elements) { for (size_t i = 0; i < elements; ++i) { assert(a[i] - b[i] <= std::numeric_limits::epsilon()); } } //previous int main() code ... //setting lights before first call to Render() crashes program, also describedh http://www.vtk.org/Wiki/VTK/Examples/Cxx/Lighting/Light renderWindow->Render(); renderer2->RemoveAllLights(); vtkSmartPointer newLight = vtkSmartPointer::New(); newLight->SetPosition(0, 0, 1000); renderer2->AddLight(newLight); //assert lighting is the same vtkSmartPointer lightCollection1 = renderer1->GetLights(); vtkSmartPointer lightCollection2 = renderer2->GetLights(); assert(lightCollection1->GetNumberOfItems() == lightCollection2->GetNumberOfItems()); lightCollection1->InitTraversal(); lightCollection2->InitTraversal(); vtkSmartPointer light1 = lightCollection1->GetNextItem(); vtkSmartPointer light2 = lightCollection2->GetNextItem(); assertArrayEquals(light1->GetPosition(), light2->GetPosition(), 3); assertArrayEquals(light1->GetTransformedPosition(), light2->GetTransformedPosition(), 3); assertArrayEquals(light1->GetFocalPoint(), light2->GetFocalPoint(), 3); assertArrayEquals(light1->GetTransformedFocalPoint(), light1->GetTransformedFocalPoint(), 3); assertArrayEquals(light1->GetAmbientColor(), light2->GetAmbientColor(), 3); assertArrayEquals(light1->GetSpecularColor(), light2->GetSpecularColor(), 3); assertArrayEquals(light1->GetDiffuseColor(), light2->GetDiffuseColor(), 3); renderWindow->Render(); renderWindowInteractor->Start(); On 08/05/16 14:10, David E DeMarle wrote: > > I was just doing a very similar thing and noticed that light positions > are only updated with the set origin, focal point and up. I ended up > computing those for my intended matrix and lighting then worked as > expected. > > > On Aug 5, 2016 1:12 PM, "Bud Bundy" > wrote: > > Hi, > > I need to setup the camera to an arbitrary modelview matrix I have > in memory. I managed to get some code working such that > GetModelViewTransformMatrix() returns the modelview I have/want. > However the volume rendering is sometimes blank, and I don't > understand why because the volume is in front of the camera. I > managed to boil down the problem to the following code below. > camera1 and camera2 have the same modelview transform, however the > rendering look very different (I've attached a screen shot) - > though not blank it's a lot dimmer. > > The code is loosely based on: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/VolumeRendering/SmartVolumeMapper > > > I'm using VTK 7.0 > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > vtkSmartPointer generateVolume() > { > // Create a spherical implicit function. > vtkSmartPointer sphere = > vtkSmartPointer::New(); > sphere->SetRadius(0.1); > sphere->SetCenter(0.0, 0.0, 0.0); > > vtkSmartPointer sampleFunction = > vtkSmartPointer::New(); > sampleFunction->SetImplicitFunction(sphere); > sampleFunction->SetOutputScalarTypeToFloat(); > sampleFunction->SetSampleDimensions(64, 64, 20); > sampleFunction->SetModelBounds(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); > sampleFunction->SetCapping(false); > sampleFunction->SetComputeNormals(false); > sampleFunction->SetScalarArrayName("values"); > sampleFunction->Update(); > > vtkDataArray* a = > sampleFunction->GetOutput()->GetPointData()->GetScalars("values"); > double range[2]; > a->GetRange(range); > > vtkSmartPointer t = > vtkSmartPointer::New(); > t->SetInputConnection(sampleFunction->GetOutputPort()); > > t->SetShift(-range[0]); > double magnitude = range[1] - range[0]; > if (magnitude == 0.0) > { > magnitude = 1.0; > } > t->SetScale(255.0 / magnitude); > t->SetOutputScalarTypeToUnsignedChar(); > t->Update(); > > vtkSmartPointer imageData = > vtkSmartPointer::New(); > imageData->ShallowCopy(t->GetOutput()); > > vtkSmartPointer volumeMapper = > vtkSmartPointer::New(); > volumeMapper->SetBlendModeToComposite(); // composite first > volumeMapper->SetInputData(imageData); > > vtkSmartPointer volumeProperty = > vtkSmartPointer::New(); > volumeProperty->ShadeOff(); > volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); > > vtkSmartPointer compositeOpacity = > vtkSmartPointer::New(); > compositeOpacity->AddPoint(0.0, 0.0); > compositeOpacity->AddPoint(80.0, 1.0); > compositeOpacity->AddPoint(80.1, 0.0); > compositeOpacity->AddPoint(255.0, 0.0); > volumeProperty->SetScalarOpacity(compositeOpacity); // > composite first. > > vtkSmartPointer color = > vtkSmartPointer::New(); > color->AddRGBPoint(0.0, 0.0, 0.0, 1.0); > color->AddRGBPoint(40.0, 1.0, 0.0, 0.0); > color->AddRGBPoint(255.0, 1.0, 1.0, 1.0); > volumeProperty->SetColor(color); > > vtkSmartPointer volume = > vtkSmartPointer::New(); > volume->SetMapper(volumeMapper); > volume->SetProperty(volumeProperty); > > vtkSmartPointer volumeScaleTransform = > vtkSmartPointer::New(); > volumeScaleTransform->Identity(); > volumeScaleTransform->SetElement(0, 0, 512); > volumeScaleTransform->SetElement(1, 1, 512); > volumeScaleTransform->SetElement(2, 2, 160); > volume->SetUserMatrix(volumeScaleTransform); > return volume; > } > > int main() > { > // camera1 > vtkSmartPointer camera1 = > vtkSmartPointer::New(); > camera1->SetPosition(0, 0, 1000); > camera1->SetFocalPoint(0, 0, 0); > camera1->SetClippingRange(0.1, 5000); > camera1->SetViewAngle(60); > > //camera 2 > vtkSmartPointer camera2 = > vtkSmartPointer::New(); > camera2->SetPosition(0, 0, 0); //I do not want any > additional translation that comes with default (0,0,1) setting. > camera2->SetFocalPoint(0, 0, -1); //setting this to > (0,0,0) causes whole modelview matrix to be 0, regardless of what > SetModelTransformMatrix() sets > camera2->SetViewAngle(60); > camera2->SetClippingRange(0.1, 5000); > double modelViewTransform[16] = { 1, 0, 0, 0, > 0, 1, 0, 0, > 0, 0, 1, -1000, > 0, 0, 0, 1 }; > camera2->SetModelTransformMatrix(modelViewTransform); > > // renderer1 using camera1 > vtkSmartPointer renderer1 = > vtkSmartPointer::New(); > renderer1->SetViewport(0, 0, 0.5, 1); > renderer1->AddVolume(generateVolume()); > renderer1->SetActiveCamera(camera1); > > // renderer2 using camera2 > vtkSmartPointer renderer2 = > vtkSmartPointer::New(); > renderer2->SetViewport(0.5, 0, 1, 1); > renderer2->AddVolume(generateVolume()); > renderer2->SetActiveCamera(camera2); > > // assert model view matrices are the same > vtkSmartPointer vtkModelViewMatrix1 = > renderer1->GetActiveCamera()->GetModelViewTransformMatrix(); > vtkSmartPointer vtkModelViewMatrix2 = > renderer2->GetActiveCamera()->GetModelViewTransformMatrix(); > for (int i = 0; i < 4; ++i) > for (int j = 0; j < 4; ++j) > assert(vtkModelViewMatrix1->GetElement(i, j) == > vtkModelViewMatrix2->GetElement(i, j)); > > // window and interactor > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->SetSize(1024, 512); > renderWindow->AddRenderer(renderer1); > renderWindow->AddRenderer(renderer2); > vtkSmartPointer > renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > renderWindow->Render(); > renderWindowInteractor->Start(); > > return EXIT_SUCCESS; > } > > > Thank you very much. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 dzenanz at gmail.com Fri Aug 5 16:51:13 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 5 Aug 2016 16:51:13 -0400 Subject: [vtkusers] [FORGED] Re: Qt-based VTK app shows black image content if VTK is linked statically In-Reply-To: References: <7649f6f5be29b946b01894509edb2463@srv19.sysproserver.de> <0758FD43-9B27-480B-A4FD-8048DC1460E0@gmail.com> Message-ID: Hi Sophonet and Enzo, is it possible you made other changes besides switching VTK from DLLs to static libraries? Perhaps your application was using a different version of VTK DLLs than you thought etc. If that is not the case, can you point to an example which exhibits the problem? Regards, D?enan On Wed, Aug 3, 2016 at 2:24 PM, Gib Bogle wrote: > Statically linked VTK 5.10 works fine with Qt. > ________________________________________ > From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Enzo Matsumiya [ > enzo.matsumiya at gmail.com] > Sent: Thursday, 4 August 2016 6:21 a.m. > To: Constantinescu Mihai via vtkusers > Subject: [FORGED] Re: [vtkusers] Qt-based VTK app shows black image > content if VTK is linked statically > > I can confirm that some issues occur when using VTK static as well (VTK > stable 7.0.0). > I could not look further into the issue, but my application crashed > instead of just black window, and I just rolled back to dynamic build. > > Appreciate any details on this. > > > Thanks, > > Enzo > > > On Aug 3, 2016, at 15:05, Sophonet > wrote: > > > > Hi list, > > > > recently, I have been working on a Qt application (using VTK > functionality in the main .exe and a bunch of underlying DLLs). > > > > If VTK is built dynamically, the application behaves as expected. > > > > However, if VTK is built statically (and - obviously - the application > and underlying DLLs are then built using the static libraries of VTK), some > content (vtkImageSlice) is missing in the render window, i.e. does not > appear at all. Other parts (e.g. vtkPolyData) are shown correctly. > > > > Anyone knows how to fix this? If possible, I would like to do static > linking of VTK. > > > > Thanks, > > > > sophonet > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at http://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 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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 vtk12af6bc42 at kant.sophonet.de Fri Aug 5 17:31:55 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Fri, 05 Aug 2016 23:31:55 +0200 Subject: [vtkusers] [FORGED] Re: Qt-based VTK app shows black image content if VTK is linked statically In-Reply-To: References: <7649f6f5be29b946b01894509edb2463@srv19.sysproserver.de> <0758FD43-9B27-480B-A4FD-8048DC1460E0@gmail.com> Message-ID: <59ad66c12d259b94a1db994645f0bbac@srv19.sysproserver.de> Hi, great that this is beine picked up. No, absolutely no changes besides switching from dynamic to static. The revision was exactly the same, the CMake flags as well. Again, some content (vtkPolyData) was shown, but other content (in my case results of vtkImageReslice) was not. If you guys have already a clue about what might be the cause, please go ahead, otherwise, I will try to set up a minimal example in the next days/weeks, and if I find something, I will file a merge request. Cheers, Sophonet Am 2016-08-05 22:51, schrieb D?enan Zuki?: > Hi Sophonet and Enzo, > > is it possible you made other changes besides switching VTK from DLLs > to static libraries? Perhaps your application was using a different > version of VTK DLLs than you thought etc. > > If that is not the case, can you point to an example which exhibits > the problem? > > Regards, > D?enan > > On Wed, Aug 3, 2016 at 2:24 PM, Gib Bogle > wrote: > >> Statically linked VTK 5.10 works fine with Qt. >> ________________________________________ >> From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Enzo >> Matsumiya [enzo.matsumiya at gmail.com] >> Sent: Thursday, 4 August 2016 6:21 a.m. >> To: Constantinescu Mihai via vtkusers >> Subject: [FORGED] Re: [vtkusers] Qt-based VTK app shows black image >> content if VTK is? ?linked statically >> >> I can confirm that some issues occur when using VTK static as well >> (VTK stable 7.0.0). >> I could not look further into the issue, but my application crashed >> instead of just black window, and I just rolled back to dynamic >> build. >> >> Appreciate any details on this. >> >> Thanks, >> >> Enzo >> >>> On Aug 3, 2016, at 15:05, Sophonet >> wrote: >>> >>> Hi list, >>> >>> recently, I have been working on a Qt application (using VTK >> functionality in the main .exe and a bunch of underlying DLLs). >>> >>> If VTK is built dynamically, the application behaves as expected. >>> >>> However, if VTK is built statically (and - obviously - the >> application and underlying DLLs are then built using the static >> libraries of VTK), some content (vtkImageSlice) is missing in the >> render window, i.e. does not appear at all. Other parts (e.g. >> vtkPolyData) are shown correctly. >>> >>> Anyone knows how to fix this? If possible, I would like to do >> static linking of VTK. >>> >>> Thanks, >>> >>> ? ? sophonet >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com [1] >>> >>> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html [2] >>> >>> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ [3] >>> >>> Search the list archives at: >> http://markmail.org/search/?q=vtkusers [4] >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers [5] >> >> _______________________________________________ >> Powered by www.kitware.com [1] >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html [2] >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ [3] >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> [4] >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers [5] >> _______________________________________________ >> Powered by www.kitware.com [1] >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html [2] >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ [3] >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> [4] >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers [5] > > > > Links: > ------ > [1] http://www.kitware.com > [2] http://www.kitware.com/opensource/opensource.html > [3] http://www.vtk.org/Wiki/VTK_FAQ > [4] http://markmail.org/search/?q=vtkusers > [5] 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From mheuegger at gmail.com Mon Aug 8 04:59:15 2016 From: mheuegger at gmail.com (mirko heuegger) Date: Mon, 8 Aug 2016 10:59:15 +0200 Subject: [vtkusers] Activiz.Net System.AccessViolationException updating pipeline In-Reply-To: References: Message-ID: Hello! I don't now if this helps, but errors like '.AccessViolations' are mostly (at least for activiz.net) the result of missing references to VTK-objects (cause the .net garbage collector may clean up objects that are still used by VTK). See also . hth mirko On Tue, Aug 2, 2016 at 10:16 PM, Karl Smith wrote: > Hi, > I'm using Activiz.Net x64 5.8 from the nuget package. We are looking to > replace WPF graphics with VTK. What we are trying to do as a starting > point is convert some WPF MeshGeometry3D objects into vtkPolyData and > display them. This is working fine and we could see and interact with the > models. > > The only problem was that the models looked faceted (WPF calculated the > normals automatically and VTK did not). We went back to add in the > vtkPolyDataNormals filter, but are consistently receiving System.AccessVioloationExceptions > when executing the pipeline. I have put together the following code > snippet to demonstrate the problem. If called twice (with the same data), > the second time results in the exception being thrown on the > normal.Update() call. > > vtkPoints points = vtkPoints.New(); > vtkCellArray polys = vtkCellArray.New(); > ... populate points and polys ... > > vtkPolyData polyData = vtkPolyData.New(); > polyData.SetPoints(points); > polyData.SetPolys(polys); > vtkPolyDataNormals normal = vtkPolyDataNormals.New(); > normal.SetInput(polyData); > normal.Update(); > > Any ideas? > > Could this behavior be from the way that we convert the MeshGeometry3D to > vtkPolyData? > > MeshGeometry3D mesh = ... > > vtkPoints points = vtkPoints.New(); > points.SetNumberOfPoints(mesh.Positions.Count); > vtkCellArray polys = vtkCellArray.New(); > polys.SetNumberOfCells(mesh.TriangleIndices.Count > / 3); > > for (int i = 0; i < mesh.Positions.Count; i++) > { > points.InsertPoint(i, mesh.Positions[i].X, > mesh.Positions[i].Y, mesh.Positions[i].Z); > } > for (int i = 0; i < mesh.TriangleIndices.Count; > i++) > { > vtkIdList trianglePoints = vtkIdList.New(); > trianglePoints.SetNumberOfIds(3); > trianglePoints.InsertId(0, > mesh.TriangleIndices[i++]); > trianglePoints.InsertId(1, > mesh.TriangleIndices[i++]); > trianglePoints.InsertId(2, > mesh.TriangleIndices[i]); > polys.InsertNextCell(trianglePoints); > } > > vtkPolyData polyData = vtkPolyData.New(); > polyData.SetPoints(points); > polyData.SetPolys(polys); > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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 > > -- Real programmers don't document; if it was hard to write, it should be hard to understand. -------------- next part -------------- An HTML attachment was scrubbed... URL: From op.cairncross at gmail.com Mon Aug 8 06:24:44 2016 From: op.cairncross at gmail.com (Oliver Cairncross) Date: Mon, 8 Aug 2016 20:24:44 +1000 Subject: [vtkusers] std::string from vtkStringArray seg faults Message-ID: The following code causes a seg fault string s = sourceArray->GetValue(0); cout << s << endl; this is also a seg fault string * s = &sourceArray->GetValue(0); cout << *s << endl; but vtkStdString * s = sourceArray->GetValue(0); cout << *s << endl; does not. What am I miss understanding about getting strings out of a string array? Cheers Ollie -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Aug 8 09:30:12 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 8 Aug 2016 14:30:12 +0100 Subject: [vtkusers] Why the baggage in vtkInteractorStyle? Message-ID: Hi all, This is a bit of a general question about the interactor style system in VTK. Why does vtkInteractorStyle, which is described as the superclass of all interactor styles, have things functions like Dolly, Pan, Zoom et.c.? And why does it have keypress behaviors at all (e.g. 'j', 't', 'c', 'a', ...)? If it's supposed to be a general base class for interactor styles, why should it make assumptions like this about the camera movements the subclasser want to provide, and assumptions about keybindings? I'm looking for a base class to use, which is not making any such assumptions, since I want to provide a completely custom behavior, without having to guard myself against unwanted behavior coming from the base class. I've looked at, and even used vtkInteractorStyleUser, for this purpose (even if it's described as something mostly for the scripting languages), but I'm just wondering about the VTK design, why it was made this way? Thanks in advance, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Mon Aug 8 10:03:50 2016 From: jose.de.paula at live.com (Jose Barreto) Date: Mon, 8 Aug 2016 07:03:50 -0700 (MST) Subject: [vtkusers] [VTK - Users] vtkoutputWindow with the console Message-ID: <1470665030682-5739540.post@n5.nabble.com> Has as send the message of the 'vtkoutputWindow' for the console? I'm using C ++ clr, and all the things I need see of VTK , I print in the console, but I'm not able to do this for 'vtkoutputWindow'. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Users-vtkoutputWindow-with-the-console-tp5739540.html Sent from the VTK - Users mailing list archive at Nabble.com. From op.cairncross at gmail.com Mon Aug 8 10:08:20 2016 From: op.cairncross at gmail.com (Oliver Cairncross) Date: Tue, 9 Aug 2016 00:08:20 +1000 Subject: [vtkusers] [VTK - Users] vtkoutputWindow with the console In-Reply-To: <1470665030682-5739540.post@n5.nabble.com> References: <1470665030682-5739540.post@n5.nabble.com> Message-ID: I think you need to subclass vtkoutputWindow and override whatever method to make it do what you need. On 9 August 2016 at 00:03, Jose Barreto wrote: > Has as send the message of the 'vtkoutputWindow' for the console? > I'm using C ++ clr, and all the things I need see of VTK , I print in the > console, but I'm not able to do this for 'vtkoutputWindow'. > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/VTK-Users-vtkoutputWindow-with-the-console-tp5739540.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From b1.miller at samsung.com Mon Aug 8 14:33:34 2016 From: b1.miller at samsung.com (Brian Miller) Date: Mon, 08 Aug 2016 18:33:34 +0000 Subject: [vtkusers] Linking Android library with Gradle that depends on VTK 7.0 References: Message-ID: <9d87408607a8437b99c870e547beba93@sraex01sc.sisa.samsung.com> I am trying to build a library project in Android Studio, or using Gradle command-line, based on VTK 7.0.0 and OpenCV 3.1.0 I built the VTK libraries for Android arm64-v8a platform as static libraries (.a files) and then included all of them in the build.gradle for my own library project. For example, my build.gradle includes : apply plugin: 'com.android.model.native' def commonBase = "${projectDir}/../../../common" model { repositories { libs(PrebuiltLibraries) { // (more vtk libraries here) vtkCommonColor { headers.srcDir "${commonBase}/thirdparty/vtk-7.0/include" binaries.withType(StaticLibraryBinary) { staticLibraryFile = file("${commonBase}/thirdparty/vtk-7.0/lib/arm64-v8a/libvtkCommonColor-7.0.a") } } vtkCommonCore { headers.srcDir "${commonBase}/thirdparty/vtk-7.0/include" binaries.withType(StaticLibraryBinary) { staticLibraryFile = file("${commonBase}/thirdparty/vtk-7.0/lib/arm64-v8a/libvtkCommonCore-7.0.a") } } // more vtk libraries here } } ... android { compileSdkVersion 21 buildToolsVersion "23.0.2" defaultConfig { minSdkVersion.apiLevel 19 targetSdkVersion.apiLevel 19 } sources { main { jni { dependencies { // more vtk libraries here library "vtkCommonColor" linkage "static" library "vtkCommonCore" linkage "static" // more vtk libraries here ... and my C++ class referencing VTK includes: #include VTK_MODULE_INIT(vtkInteractionStyle); VTK_MODULE_INIT(vtkRenderingOpenGL2); VTK_MODULE_INIT(vtkRenderingFreeType); #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include But even with all of the VTK libraries included, I still get a lot of "undefined reference" errors for VTK classes/methods which are included in the VTK libraries, when building (linking) my project via $ ./gradlew clean buil.. I saw there were some old threads discussing similar Android issues, but didn't see much recently as far as any solutions to using Gradle. Since Google is recommending that Android developers move to Android Studio and Gradle, and has been adding more NDK / native support, this seems to be the preferred way of doing things, instead of using .mk files or CMake Any other sugestions ? Brian Miller -------------- next part -------------- An HTML attachment was scrubbed... URL: From b1.miller at samsung.com Mon Aug 8 23:35:02 2016 From: b1.miller at samsung.com (Brian Miller) Date: Tue, 09 Aug 2016 03:35:02 +0000 Subject: [vtkusers] using vtkOBJReader.h in Android example References: Message-ID: Also, one other question. I am trying to modify VTK-7.0.0/Examples/Android/JavaVTK/jni/main.cxx to make use of #include "vtkOBJReader.h" but I am getting fatal error: vtkOBJReader.h: No such file or directory even though the file is present in IO/Geometry/vtkOBJReader.h and build/CMakeExternals/Install/vtk-android/include/vtk-7.0/vtkOBJReader.h Is there an extra step that I need to do so that the build can find it ? Thanks in advance for any tips. -------------- next part -------------- An HTML attachment was scrubbed... URL: From b1.miller at samsung.com Mon Aug 8 23:44:02 2016 From: b1.miller at samsung.com (Brian Miller) Date: Tue, 09 Aug 2016 03:44:02 +0000 Subject: [vtkusers] using vtkOBJReader.h in Android example In-Reply-To: References: Message-ID: Oh, actually I think I fixed the second issue by adding vtkIOGeometry to VTK-7.0.0/Examples/Android/JavaVTK/CMakeLists.txt in this section find_package(VTK COMPONENTS vtkIOGeometry vtkInteractionStyle vtkRenderingOpenGL2 vtkRenderingFreeType ) From elvis.stansvik at orexplore.com Tue Aug 9 03:29:16 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 9 Aug 2016 08:29:16 +0100 Subject: [vtkusers] QVTKWidget without interactor (C++) (was: About MouseEvents.py example) Message-ID: Hi all, (mostly David Gobbi :)) In a previous thread, you kindly outlined your way of handing interaction in PyQt applications without making use of the VTK interactor/interactor style system at all. My question now is whether you do something similar when working from C++? The reason I'm asking is that I'm in the process of porting an application under development from PyQt to Qt/C++, and I'm weighing the pros and cons of making use of VTK interactor/interactor styles vs making my own "tool system" for interaction. If you do use a similar system when working from C++, I'm wondering whether you make use of QVTKWidget, or if you have your own such class? Because looking at QVTKWidget (which I currently make use of), it seems to force a VTK interactor to be set on its rendering window (if one is not provided, it will create one). Thanks a lot in advance for any advice. Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.hadimogullari at netcad.com.tr Tue Aug 9 03:47:55 2016 From: ali.hadimogullari at netcad.com.tr (alihadim) Date: Tue, 9 Aug 2016 00:47:55 -0700 (MST) Subject: [vtkusers] VtkPropPicker Pick metod using lot of memory. Message-ID: <1470728875340-5739548.post@n5.nabble.com> Hi All, I use VtkpropPicker for pick data. I saw that a lot of use memory while using tetra cell data. I took out of memory. Data is very big. Vtkcellpicker did not take out of memory but pick process is a little slow. Do you have any idea whan I can do? Example Code; vtk.vtkPropPicker propPick = new vtk.vtkPropPicker(); .... propPick.AddPickList(vv.VtkProp); propPick.PickFromListOn(); pResult = propPick.Pick((double)X, (double)Y, 0, InViewport.CurrentVtkRenderer); //this method using very memory. -- View this message in context: http://vtk.1045678.n5.nabble.com/VtkPropPicker-Pick-metod-using-lot-of-memory-tp5739548.html Sent from the VTK - Users mailing list archive at Nabble.com. From maogui.hu at gmail.com Tue Aug 9 04:36:06 2016 From: maogui.hu at gmail.com (maogui.hu) Date: Tue, 9 Aug 2016 16:36:06 +0800 Subject: [vtkusers] How to know the type of a vtk file Message-ID: <2016080916360372731011@gmail.com> Hi all, I'm a newer to VTK. I know that there are two VTK file formats to save objects, one is the legacy format, another is XML-based file format. For the XML-based format, different data types have different file extensions. For example, .vti for vtkImageData, .vtp for vtkPolyData, .vts for vtkStructuredGrid. However, for the legacy format, there is only one file extension (.vtk). My question is there a quick function in VTK to know the exact data type of a .vtk file? Thanks, Maogui Hu -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Aug 9 05:47:12 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 9 Aug 2016 10:47:12 +0100 Subject: [vtkusers] Why the baggage in vtkInteractorStyle? In-Reply-To: References: Message-ID: 2016-08-08 15:30 GMT+02:00 Elvis Stansvik : > Hi all, > > This is a bit of a general question about the interactor style system in > VTK. > > Why does vtkInteractorStyle, which is described as the superclass of all > interactor styles, have things functions like Dolly, Pan, Zoom et.c.? And > why does it have keypress behaviors at all (e.g. 'j', 't', 'c', 'a', ...)? > I realize now that the docs are a little out of date, and that some of the keyboard shortcuts I mention are now handled by vtkInteractorStyleSwitch. But I'm still wondering why vtkInteractorStyle makes so many assumptions about how a subclasser wishes to implement his/her style. I would have expected a more "bare bone" base class. Elvis > > If it's supposed to be a general base class for interactor styles, why > should it make assumptions like this about the camera movements the > subclasser want to provide, and assumptions about keybindings? > > I'm looking for a base class to use, which is not making any such > assumptions, since I want to provide a completely custom behavior, without > having to guard myself against unwanted behavior coming from the base class. > > I've looked at, and even used vtkInteractorStyleUser, for this purpose > (even if it's described as something mostly for the scripting languages), > but I'm just wondering about the VTK design, why it was made this way? > > Thanks in advance, > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Tue Aug 9 07:51:57 2016 From: DLRdave at aol.com (David Cole) Date: Tue, 9 Aug 2016 07:51:57 -0400 Subject: [vtkusers] Why the baggage in vtkInteractorStyle? In-Reply-To: References: Message-ID: I think it's really just for convenience / laziness. It's nice to be able to use all the familiar keyboard shortcuts in all your simple little test/example VTK apps without having to customize the interactor style at all. It's been that way for a long long time now, and changing it would probably be somewhat controversial among some of the long time VTK developers. As with most answers to questions like this, it's just a consequence of the organic growth VTK has undergone over time. It probably wasn't really **designed** that way intentionally, it probably just sort of happened that way, and since it works and there is a way to do what you want (override, and implement everything yourself...) then nobody has bothered with trying to impose a more sensible design on it after the fact. HTH, David C. On Tue, Aug 9, 2016 at 5:47 AM, Elvis Stansvik wrote: > 2016-08-08 15:30 GMT+02:00 Elvis Stansvik : >> >> Hi all, >> >> This is a bit of a general question about the interactor style system in >> VTK. >> >> Why does vtkInteractorStyle, which is described as the superclass of all >> interactor styles, have things functions like Dolly, Pan, Zoom et.c.? And >> why does it have keypress behaviors at all (e.g. 'j', 't', 'c', 'a', ...)? > > > I realize now that the docs are a little out of date, and that some of the > keyboard shortcuts I mention are now handled by vtkInteractorStyleSwitch. > > But I'm still wondering why vtkInteractorStyle makes so many assumptions > about how a subclasser wishes to implement his/her style. I would have > expected a more "bare bone" base class. > > Elvis > >> >> >> If it's supposed to be a general base class for interactor styles, why >> should it make assumptions like this about the camera movements the >> subclasser want to provide, and assumptions about keybindings? >> >> I'm looking for a base class to use, which is not making any such >> assumptions, since I want to provide a completely custom behavior, without >> having to guard myself against unwanted behavior coming from the base class. >> >> I've looked at, and even used vtkInteractorStyleUser, for this purpose >> (even if it's described as something mostly for the scripting languages), >> but I'm just wondering about the VTK design, why it was made this way? >> >> Thanks in advance, >> Elvis > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From elvis.stansvik at orexplore.com Tue Aug 9 08:04:29 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 9 Aug 2016 13:04:29 +0100 Subject: [vtkusers] Why the baggage in vtkInteractorStyle? In-Reply-To: References: Message-ID: 2016-08-09 13:51 GMT+02:00 David Cole : > I think it's really just for convenience / laziness. It's nice to be > able to use all the familiar keyboard shortcuts in all your simple > little test/example VTK apps without having to customize the > interactor style at all. > > It's been that way for a long long time now, and changing it would > probably be somewhat controversial among some of the long time VTK > developers. > > As with most answers to questions like this, it's just a consequence > of the organic growth VTK has undergone over time. It probably wasn't > really **designed** that way intentionally, it probably just sort of > happened that way, and since it works and there is a way to do what > you want (override, and implement everything yourself...) then nobody > has bothered with trying to impose a more sensible design on it after > the fact. > Alright, thanks for clarifying! And sorry for the sort-of pointless question. I guess I'm so used to the way the top base classes are designed in e.g. Qt, not imposing any particular behavior. Elvis > > HTH, > David C. > > > > > On Tue, Aug 9, 2016 at 5:47 AM, Elvis Stansvik > wrote: > > 2016-08-08 15:30 GMT+02:00 Elvis Stansvik > : > >> > >> Hi all, > >> > >> This is a bit of a general question about the interactor style system in > >> VTK. > >> > >> Why does vtkInteractorStyle, which is described as the superclass of all > >> interactor styles, have things functions like Dolly, Pan, Zoom et.c.? > And > >> why does it have keypress behaviors at all (e.g. 'j', 't', 'c', 'a', > ...)? > > > > > > I realize now that the docs are a little out of date, and that some of > the > > keyboard shortcuts I mention are now handled by vtkInteractorStyleSwitch. > > > > But I'm still wondering why vtkInteractorStyle makes so many assumptions > > about how a subclasser wishes to implement his/her style. I would have > > expected a more "bare bone" base class. > > > > Elvis > > > >> > >> > >> If it's supposed to be a general base class for interactor styles, why > >> should it make assumptions like this about the camera movements the > >> subclasser want to provide, and assumptions about keybindings? > >> > >> I'm looking for a base class to use, which is not making any such > >> assumptions, since I want to provide a completely custom behavior, > without > >> having to guard myself against unwanted behavior coming from the base > class. > >> > >> I've looked at, and even used vtkInteractorStyleUser, for this purpose > >> (even if it's described as something mostly for the scripting > languages), > >> but I'm just wondering about the VTK design, why it was made this way? > >> > >> Thanks in advance, > >> Elvis > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Aug 9 08:41:09 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 9 Aug 2016 08:41:09 -0400 Subject: [vtkusers] using vtkOBJReader.h in Android example In-Reply-To: References: Message-ID: Yes, if you need other modules that is the place to add them. Some modules may not compile under Android as we have only tested some of them but hopefully the ones you need work. Thanks Ken On Mon, Aug 8, 2016 at 11:44 PM, Brian Miller wrote: > Oh, actually I think I fixed the second issue by adding vtkIOGeometry > to VTK-7.0.0/Examples/Android/JavaVTK/CMakeLists.txt > in this section > > find_package(VTK COMPONENTS > vtkIOGeometry > vtkInteractionStyle > vtkRenderingOpenGL2 > vtkRenderingFreeType > ) > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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 > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Aug 9 09:42:39 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 9 Aug 2016 09:42:39 -0400 Subject: [vtkusers] How to know the type of a vtk file In-Reply-To: <2016080916360372731011@gmail.com> References: <2016080916360372731011@gmail.com> Message-ID: You can use vtkDataSetReader::ReadOutputType() [1] to tell what type of data set is in a .vtk file. This member function will return one of VTK_POLY_DATA, VTK_STRUCTURED_POINTS, VTK_STRUCTURED_GRID, VTK_RECTILINEAR_GRID, or VTK_UNSTRUCTURED_GRID if the data set can be read. -1 indicates an error with the output type. HTH, Cory [1] http://www.vtk.org/doc/nightly/html/classvtkDataSetReader.html#a88737685e39184afa34ccca53bb47dcb On Tue, Aug 9, 2016 at 4:36 AM, maogui.hu wrote: > Hi all, > I'm a newer to VTK. I know that there are two VTK file formats to save > objects, one is the legacy format, another is XML-based file format. For > the XML-based format, different data types have different file extensions. > For example, .vti for vtkImageData, .vtp for vtkPolyData, .vts for > vtkStructuredGrid. However, for the legacy format, there is only one file > extension (.vtk). My question is there a quick function in VTK to know the > exact data type of a .vtk file? > > Thanks, > > Maogui Hu > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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 > -- Cory Quammen R&D Engineer Kitware, Inc. From maogui.hu at gmail.com Tue Aug 9 10:03:07 2016 From: maogui.hu at gmail.com (maogui.hu) Date: Tue, 9 Aug 2016 22:03:07 +0800 Subject: [vtkusers] How to know the type of a vtk file References: <2016080916360372731011@gmail.com>, Message-ID: <201608092203030662790@gmail.com> Hi Cory, thanks very much! Maogui Hu From: Cory Quammen Date: 2016-08-09 21:42 To: maogui.hu CC: vtkusers Subject: Re: [vtkusers] How to know the type of a vtk file You can use vtkDataSetReader::ReadOutputType() [1] to tell what type of data set is in a .vtk file. This member function will return one of VTK_POLY_DATA, VTK_STRUCTURED_POINTS, VTK_STRUCTURED_GRID, VTK_RECTILINEAR_GRID, or VTK_UNSTRUCTURED_GRID if the data set can be read. -1 indicates an error with the output type. HTH, Cory [1] http://www.vtk.org/doc/nightly/html/classvtkDataSetReader.html#a88737685e39184afa34ccca53bb47dcb On Tue, Aug 9, 2016 at 4:36 AM, maogui.hu wrote: > Hi all, > I'm a newer to VTK. I know that there are two VTK file formats to save > objects, one is the legacy format, another is XML-based file format. For > the XML-based format, different data types have different file extensions. > For example, .vti for vtkImageData, .vtp for vtkPolyData, .vts for > vtkStructuredGrid. However, for the legacy format, there is only one file > extension (.vtk). My question is there a quick function in VTK to know the > exact data type of a .vtk file? > > Thanks, > > Maogui Hu > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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 > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 9 11:36:52 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 9 Aug 2016 09:36:52 -0600 Subject: [vtkusers] QVTKWidget without interactor (C++) (was: About MouseEvents.py example) In-Reply-To: References: Message-ID: On Tue, Aug 9, 2016 at 1:29 AM, Elvis Stansvik wrote: > > > My question now is whether you do something similar when working from C++? > The reason I'm asking is that I'm in the process of porting an application > under development from PyQt to Qt/C++, and I'm weighing the pros and cons > of making use of VTK interactor/interactor styles vs making my own "tool > system" for interaction. > Yes, I've been doing this in Qt/C++ for a while now, in fact I'm pretty sure that what I described previously was Qt/C++, and not the older PyQt interaction that I used a decade ago. If you do use a similar system when working from C++, I'm wondering whether > you make use of QVTKWidget, or if you have your own such class? Because > looking at QVTKWidget (which I currently make use of), it seems to force a > VTK interactor to be set on its rendering window (if one is not provided, > it will create one). > No, I don't use QVTKWidget. Tying Qt and VTK together is tricky, and I felt that I needed total control over the QT<->VTK connection which meant writing my own class. I wanted something minimal so that I'd be able to fix problems quickly. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Aug 9 11:50:02 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 9 Aug 2016 16:50:02 +0100 Subject: [vtkusers] QVTKWidget without interactor (C++) (was: About MouseEvents.py example) In-Reply-To: References: Message-ID: Den 9 aug. 2016 5:37 em skrev "David Gobbi" : > > On Tue, Aug 9, 2016 at 1:29 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: >> >> >> My question now is whether you do something similar when working from C++? The reason I'm asking is that I'm in the process of porting an application under development from PyQt to Qt/C++, and I'm weighing the pros and cons of making use of VTK interactor/interactor styles vs making my own "tool system" for interaction. > > > Yes, I've been doing this in Qt/C++ for a while now, in fact I'm pretty sure that what I described previously was Qt/C++, and not the older PyQt interaction that I used a decade ago. Ah, I see. > >> If you do use a similar system when working from C++, I'm wondering whether you make use of QVTKWidget, or if you have your own such class? Because looking at QVTKWidget (which I currently make use of), it seems to force a VTK interactor to be set on its rendering window (if one is not provided, it will create one). > > > No, I don't use QVTKWidget. Tying Qt and VTK together is tricky, and I felt that I needed total control over the QT<->VTK connection which meant writing my own class. I wanted something minimal so that I'd be able to fix problems quickly. Alright, that makes sense then. I'll see how I'll proceed. Thanks for sharing. Elvis > > - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk12af6bc42 at kant.sophonet.de Tue Aug 9 12:34:39 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Tue, 09 Aug 2016 18:34:39 +0200 Subject: [vtkusers] [FORGED] Re: Qt-based VTK app shows black image content if VTK is linked statically In-Reply-To: <59ad66c12d259b94a1db994645f0bbac@srv19.sysproserver.de> References: <7649f6f5be29b946b01894509edb2463@srv19.sysproserver.de> <0758FD43-9B27-480B-A4FD-8048DC1460E0@gmail.com> <59ad66c12d259b94a1db994645f0bbac@srv19.sysproserver.de> Message-ID: <481c7e3853a0c36ca5fd71383e4e2577@srv19.sysproserver.de> Hi all, regarding this topic: In the meantime, I have found out that indeed, when using static VTK libraries, the image-related components (e.g. vtkImageResliceMapper) always retrieve invalid bounds / whole data extent from the input image data (0,-1,0,-1,0,-1) - and the corresponding content is black. When using dynamic VTK libraries, the information is correct, and the resliced image is shown as expected. The only function which (indirectly) sets invalid image dimensions is PrepareForNewData(), which is called from vtkImageResliceMapper's Update(). Ideally, I would like to continue debugging and find out why, in case of static VTK libraries, the information is not correctly overwritten later in my case, but would appreciate any help, since the processing / updating mechanism during a Render() call are not clear to me. Any hints or ideas? Thanks, sophonet > Hi, > > great that this is beine picked up. No, absolutely no changes besides > switching from dynamic to static. The revision was exactly the same, > the CMake flags as well. > > Again, some content (vtkPolyData) was shown, but other content (in my > case results of vtkImageReslice) was not. If you guys have already a > clue about what might be the cause, please go ahead, otherwise, I will > try to set up a minimal example in the next days/weeks, and if I find > something, I will file a merge request. > > Cheers, > > Sophonet > > >> Hi Sophonet and Enzo, >> >> is it possible you made other changes besides switching VTK from DLLs >> to static libraries? Perhaps your application was using a different >> version of VTK DLLs than you thought etc. >> >> If that is not the case, can you point to an example which exhibits >> the problem? >> >> Regards, >> D?enan >> >> On Wed, Aug 3, 2016 at 2:24 PM, Gib Bogle >> wrote: >> >>> Statically linked VTK 5.10 works fine with Qt. >>> ________________________________________ >>> From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Enzo >>> Matsumiya [enzo.matsumiya at gmail.com] >>> Sent: Thursday, 4 August 2016 6:21 a.m. >>> To: Constantinescu Mihai via vtkusers >>> Subject: [FORGED] Re: [vtkusers] Qt-based VTK app shows black image >>> content if VTK is? ?linked statically >>> >>> I can confirm that some issues occur when using VTK static as well >>> (VTK stable 7.0.0). >>> I could not look further into the issue, but my application crashed >>> instead of just black window, and I just rolled back to dynamic >>> build. >>> >>> Appreciate any details on this. >>> >>> Thanks, >>> >>> Enzo >>> >>>> On Aug 3, 2016, at 15:05, Sophonet >>> wrote: >>>> >>>> Hi list, >>>> >>>> recently, I have been working on a Qt application (using VTK >>> functionality in the main .exe and a bunch of underlying DLLs). >>>> >>>> If VTK is built dynamically, the application behaves as expected. >>>> >>>> However, if VTK is built statically (and - obviously - the >>> application and underlying DLLs are then built using the static >>> libraries of VTK), some content (vtkImageSlice) is missing in the >>> render window, i.e. does not appear at all. Other parts (e.g. >>> vtkPolyData) are shown correctly. >>>> >>>> Anyone knows how to fix this? If possible, I would like to do >>> static linking of VTK. >>>> >>>> Thanks, >>>> >>>> ? ? sophonet >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com [1] >>>> >>>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html [2] >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ [3] >>>> >>>> Search the list archives at: >>> http://markmail.org/search/?q=vtkusers [4] >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers [5] >>> >>> _______________________________________________ >>> Powered by www.kitware.com [1] >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html [2] >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ [3] >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> [4] >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers [5] >>> _______________________________________________ >>> Powered by www.kitware.com [1] >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html [2] >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ [3] >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> [4] >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers [5] >> >> >> >> Links: >> ------ >> [1] http://www.kitware.com >> [2] http://www.kitware.com/opensource/opensource.html >> [3] http://www.vtk.org/Wiki/VTK_FAQ >> [4] http://markmail.org/search/?q=vtkusers >> [5] 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> 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 > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From enzo.matsumiya at gmail.com Tue Aug 9 13:08:52 2016 From: enzo.matsumiya at gmail.com (Enzo Matsumiya) Date: Tue, 9 Aug 2016 14:08:52 -0300 Subject: [vtkusers] [FORGED] Re: Qt-based VTK app shows black image content if VTK is linked statically In-Reply-To: <481c7e3853a0c36ca5fd71383e4e2577@srv19.sysproserver.de> References: <7649f6f5be29b946b01894509edb2463@srv19.sysproserver.de> <0758FD43-9B27-480B-A4FD-8048DC1460E0@gmail.com> <59ad66c12d259b94a1db994645f0bbac@srv19.sysproserver.de> <481c7e3853a0c36ca5fd71383e4e2577@srv19.sysproserver.de> Message-ID: <80AECE00-1046-4A28-8607-0B7B2CB86EC0@gmail.com> D?enan, I?m pretty sure I was using the correct libraries (VTK 7.0 static with Qt 5.7). My current test case is heavily based on this VTK example, so I believe it will reproduce this buggy behaviour: http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/GUI/Qt/FourPaneViewer/QtVTKRenderWindows.cxx I?m sorry I can?t look deeper into this issue, but I?m up to testing new future fixes and also sending additional information if necessary. Thanks! > On Aug 9, 2016, at 13:34, Sophonet wrote: > > Hi all, > > regarding this topic: In the meantime, I have found out that indeed, when using static VTK libraries, the image-related components (e.g. vtkImageResliceMapper) always retrieve invalid bounds / whole data extent from the input image data (0,-1,0,-1,0,-1) - and the corresponding content is black. When using dynamic VTK libraries, the information is correct, and the resliced image is shown as expected. > > The only function which (indirectly) sets invalid image dimensions is PrepareForNewData(), which is called from vtkImageResliceMapper's Update(). > > Ideally, I would like to continue debugging and find out why, in case of static VTK libraries, the information is not correctly overwritten later in my case, but would appreciate any help, since the processing / updating mechanism during a Render() call are not clear to me. > > Any hints or ideas? > > Thanks, > > sophonet > > >> Hi, >> great that this is beine picked up. No, absolutely no changes besides >> switching from dynamic to static. The revision was exactly the same, >> the CMake flags as well. >> Again, some content (vtkPolyData) was shown, but other content (in my >> case results of vtkImageReslice) was not. If you guys have already a >> clue about what might be the cause, please go ahead, otherwise, I will >> try to set up a minimal example in the next days/weeks, and if I find >> something, I will file a merge request. >> Cheers, >> Sophonet >>> Hi Sophonet and Enzo, >>> is it possible you made other changes besides switching VTK from DLLs >>> to static libraries? Perhaps your application was using a different >>> version of VTK DLLs than you thought etc. >>> If that is not the case, can you point to an example which exhibits >>> the problem? >>> Regards, >>> D?enan >>> On Wed, Aug 3, 2016 at 2:24 PM, Gib Bogle >>> wrote: >>>> Statically linked VTK 5.10 works fine with Qt. >>>> ________________________________________ >>>> From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Enzo >>>> Matsumiya [enzo.matsumiya at gmail.com] >>>> Sent: Thursday, 4 August 2016 6:21 a.m. >>>> To: Constantinescu Mihai via vtkusers >>>> Subject: [FORGED] Re: [vtkusers] Qt-based VTK app shows black image >>>> content if VTK is linked statically >>>> I can confirm that some issues occur when using VTK static as well >>>> (VTK stable 7.0.0). >>>> I could not look further into the issue, but my application crashed >>>> instead of just black window, and I just rolled back to dynamic >>>> build. >>>> Appreciate any details on this. >>>> Thanks, >>>> Enzo >>>>> On Aug 3, 2016, at 15:05, Sophonet >>>> wrote: >>>>> Hi list, >>>>> recently, I have been working on a Qt application (using VTK >>>> functionality in the main .exe and a bunch of underlying DLLs). >>>>> If VTK is built dynamically, the application behaves as expected. >>>>> However, if VTK is built statically (and - obviously - the >>>> application and underlying DLLs are then built using the static >>>> libraries of VTK), some content (vtkImageSlice) is missing in the >>>> render window, i.e. does not appear at all. Other parts (e.g. >>>> vtkPolyData) are shown correctly. >>>>> Anyone knows how to fix this? If possible, I would like to do >>>> static linking of VTK. >>>>> Thanks, >>>>> sophonet >>>>> _______________________________________________ >>>>> Powered by www.kitware.com [1] >>>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html [2] >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ [3] >>>>> Search the list archives at: >>>> http://markmail.org/search/?q=vtkusers [4] >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers [5] >>>> _______________________________________________ >>>> Powered by www.kitware.com [1] >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html [2] >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ [3] >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> [4] >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers [5] >>>> _______________________________________________ >>>> Powered by www.kitware.com [1] >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html [2] >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ [3] >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> [4] >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers [5] >>> Links: >>> ------ >>> [1] http://www.kitware.com >>> [2] http://www.kitware.com/opensource/opensource.html >>> [3] http://www.vtk.org/Wiki/VTK_FAQ >>> [4] http://markmail.org/search/?q=vtkusers >>> [5] 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 >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> 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 >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> 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 > > 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 dzenanz at gmail.com Tue Aug 9 14:25:37 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 9 Aug 2016 14:25:37 -0400 Subject: [vtkusers] [FORGED] Re: Qt-based VTK app shows black image content if VTK is linked statically In-Reply-To: <80AECE00-1046-4A28-8607-0B7B2CB86EC0@gmail.com> References: <7649f6f5be29b946b01894509edb2463@srv19.sysproserver.de> <0758FD43-9B27-480B-A4FD-8048DC1460E0@gmail.com> <59ad66c12d259b94a1db994645f0bbac@srv19.sysproserver.de> <481c7e3853a0c36ca5fd71383e4e2577@srv19.sysproserver.de> <80AECE00-1046-4A28-8607-0B7B2CB86EC0@gmail.com> Message-ID: Hi Enzo, I have a statically built VTK (6.3.0 and a recent git version), and compiling that example produces an executable which loads an image and reslice views are shown. The example does not work totally correctly - 2D and 3D views are not synchronized, fiddling with options on the right can make reslice views disappear or crash the program, blue slice is not initialized in the correct position etc. Here is a screenshot: [image: Inline image 1] Regards, D?enan On Tue, Aug 9, 2016 at 1:08 PM, Enzo Matsumiya wrote: > D?enan, > > I?m pretty sure I was using the correct libraries (VTK 7.0 static with Qt > 5.7). > > My current test case is heavily based on this VTK example, so I believe it > will reproduce this buggy behaviour: > http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/GUI/ > Qt/FourPaneViewer/QtVTKRenderWindows.cxx > > I?m sorry I can?t look deeper into this issue, but I?m up to testing new > future fixes and also sending additional information if necessary. > > > Thanks! > > > On Aug 9, 2016, at 13:34, Sophonet wrote: > > Hi all, > > regarding this topic: In the meantime, I have found out that indeed, when > using static VTK libraries, the image-related components (e.g. > vtkImageResliceMapper) always retrieve invalid bounds / whole data extent > from the input image data (0,-1,0,-1,0,-1) - and the corresponding content > is black. When using dynamic VTK libraries, the information is correct, and > the resliced image is shown as expected. > > The only function which (indirectly) sets invalid image dimensions is > PrepareForNewData(), which is called from vtkImageResliceMapper's Update(). > > Ideally, I would like to continue debugging and find out why, in case of > static VTK libraries, the information is not correctly overwritten later in > my case, but would appreciate any help, since the processing / updating > mechanism during a Render() call are not clear to me. > > Any hints or ideas? > > Thanks, > > sophonet > > > Hi, > great that this is beine picked up. No, absolutely no changes besides > switching from dynamic to static. The revision was exactly the same, > the CMake flags as well. > Again, some content (vtkPolyData) was shown, but other content (in my > case results of vtkImageReslice) was not. If you guys have already a > clue about what might be the cause, please go ahead, otherwise, I will > try to set up a minimal example in the next days/weeks, and if I find > something, I will file a merge request. > Cheers, > Sophonet > > Hi Sophonet and Enzo, > is it possible you made other changes besides switching VTK from DLLs > to static libraries? Perhaps your application was using a different > version of VTK DLLs than you thought etc. > If that is not the case, can you point to an example which exhibits > the problem? > Regards, > D?enan > On Wed, Aug 3, 2016 at 2:24 PM, Gib Bogle > wrote: > > Statically linked VTK 5.10 works fine with Qt. > ________________________________________ > From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Enzo > Matsumiya [enzo.matsumiya at gmail.com] > Sent: Thursday, 4 August 2016 6:21 a.m. > To: Constantinescu Mihai via vtkusers > Subject: [FORGED] Re: [vtkusers] Qt-based VTK app shows black image > content if VTK is linked statically > I can confirm that some issues occur when using VTK static as well > (VTK stable 7.0.0). > I could not look further into the issue, but my application crashed > instead of just black window, and I just rolled back to dynamic > build. > Appreciate any details on this. > Thanks, > Enzo > > On Aug 3, 2016, at 15:05, Sophonet > > wrote: > > Hi list, > recently, I have been working on a Qt application (using VTK > > functionality in the main .exe and a bunch of underlying DLLs). > > If VTK is built dynamically, the application behaves as expected. > However, if VTK is built statically (and - obviously - the > > application and underlying DLLs are then built using the static > libraries of VTK), some content (vtkImageSlice) is missing in the > render window, i.e. does not appear at all. Other parts (e.g. > vtkPolyData) are shown correctly. > > Anyone knows how to fix this? If possible, I would like to do > > static linking of VTK. > > Thanks, > sophonet > _______________________________________________ > Powered by www.kitware.com [1] > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html [2] > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ [3] > > Search the list archives at: > > http://markmail.org/search/?q=vtkusers [4] > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers [5] > > _______________________________________________ > Powered by www.kitware.com [1] > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html [2] > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ [3] > Search the list archives at: http://markmail.org/search/?q=vtkusers > [4] > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers [5] > _______________________________________________ > Powered by www.kitware.com [1] > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html [2] > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ [3] > Search the list archives at: http://markmail.org/search/?q=vtkusers > [4] > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers [5] > > Links: > ------ > [1] http://www.kitware.com > [2] http://www.kitware.com/opensource/opensource.html > [3] http://www.vtk.org/Wiki/VTK_FAQ > [4] http://markmail.org/search/?q=vtkusers > [5] 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 > Search the list archives at: http://markmail.org/search/?q=vtkusers > 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 > Search the list archives at: http://markmail.org/search/?q=vtkusers > 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 > > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2016-08-09 14.16.45.png Type: image/png Size: 53113 bytes Desc: not available URL: From bebe0705 at colorado.edu Tue Aug 9 15:08:09 2016 From: bebe0705 at colorado.edu (BBerco) Date: Tue, 9 Aug 2016 12:08:09 -0700 (MST) Subject: [vtkusers] Memory management issues: how to track memory usage? Message-ID: <1470769689625-5739607.post@n5.nabble.com> Dear all, I am developing an application where face/vertex shape models are displayed and interacted with. Using a rectangular box selection, the user can highlight the selected region, apply a geometric transform to the selected vertices and thus modify the original shape. If VTK seems to have all the features I need to fully implement my specs, I am however dealing with memory management issues which I have not been able to fix yet. Typically, opening a shape model and just leaving it there requires about 300MB of memory. Selecting a region adds another 150MB to the memory consumption. I was hoping to see the memory going back to 300MB once the selection window is closed (and the corresponding actors/polydata cleared), but I am left with 350MB of memory usage. So something did not get cleared as expected. I understand that this very high level description of those RAM issues can only get a very general answer at best. However, I was wondering if you knew a debbugging method allowing one to track the memory used by a pointed variable (variable pointed at by a vtkSmartPointer)? Thanks, Ben -- View this message in context: http://vtk.1045678.n5.nabble.com/Memory-management-issues-how-to-track-memory-usage-tp5739607.html Sent from the VTK - Users mailing list archive at Nabble.com. From vtk12af6bc42 at kant.sophonet.de Tue Aug 9 15:24:51 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Tue, 09 Aug 2016 21:24:51 +0200 Subject: [vtkusers] [FORGED] Re: Qt-based VTK app shows black image content if VTK is linked statically In-Reply-To: References: <7649f6f5be29b946b01894509edb2463@srv19.sysproserver.de> <0758FD43-9B27-480B-A4FD-8048DC1460E0@gmail.com> <59ad66c12d259b94a1db994645f0bbac@srv19.sysproserver.de> <481c7e3853a0c36ca5fd71383e4e2577@srv19.sysproserver.de> <80AECE00-1046-4A28-8607-0B7B2CB86EC0@gmail.com> Message-ID: <456323ac6a52e4169f1daa23f5f8c54d@srv19.sysproserver.de> Indeed, I can reproduce this problem with VTK 7.0.0 (statically linked). Is there any plan going forward, e.g. D?enan, have you planned on discussing with colleagues how to tackle this problem, or would you like Enzo or myself to file some kind of bug report? (If so, where is the best place)? Thanks, Sophonet Am 2016-08-09 20:25, schrieb D?enan Zuki?: > Hi Enzo, > > I have a statically built VTK (6.3.0 and a recent git version), and > compiling that example produces an?executable [7]?which loads an > image and reslice views are shown. The example does not work totally > correctly - 2D and 3D views are not synchronized, fiddling with > options on the right can make reslice views disappear or crash the > program, blue slice is not initialized in the correct position etc. > Here is a screenshot: > > Regards, > D?enan > > On Tue, Aug 9, 2016 at 1:08 PM, Enzo Matsumiya > wrote: > >> D?enan, >> >> I?m pretty sure I was using the correct libraries (VTK 7.0 static >> with Qt 5.7). >> >> My current test case is heavily based on this VTK example, so I >> believe it will reproduce this buggy >> > behaviour:http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/GUI/Qt/FourPaneViewer/QtVTKRenderWindows.cxx >> [1] >> >> I?m sorry I can?t look deeper into this issue, but I?m up to >> testing new future fixes and also sending additional information if >> necessary. >> >> Thanks! >> >> On Aug 9, 2016, at 13:34, Sophonet >> wrote: >> >> Hi all, >> >> regarding this topic: In the meantime, I have found out that indeed, >> when using static VTK libraries, the image-related components (e.g. >> vtkImageResliceMapper) always retrieve invalid bounds / whole data >> extent from the input image data (0,-1,0,-1,0,-1) - and the >> corresponding content is black. When using dynamic VTK libraries, >> the information is correct, and the resliced image is shown as >> expected. >> >> The only function which (indirectly) sets invalid image dimensions >> is PrepareForNewData(), which is called from vtkImageResliceMapper's >> Update(). >> >> Ideally, I would like to continue debugging and find out why, in >> case of static VTK libraries, the information is not correctly >> overwritten later in my case, but would appreciate any help, since >> the processing / updating mechanism during a Render() call are not >> clear to me. >> >> Any hints or ideas? >> >> Thanks, >> >> ???sophonet >> >> Hi, >> great that this is beine picked up. No, absolutely no changes >> besides >> switching from dynamic to static. The revision was exactly the same, >> the CMake flags as well. >> Again, some content (vtkPolyData) was shown, but other content (in >> my >> case results of vtkImageReslice) was not. If you guys have already a >> clue about what might be the cause, please go ahead, otherwise, I >> will >> try to set up a minimal example in the next days/weeks, and if I >> find >> something, I will file a merge request. >> Cheers, >> ????Sophonet >> Hi Sophonet and Enzo, >> is it possible you made other changes besides switching VTK from >> DLLs >> to static libraries? Perhaps your application was using a different >> version of VTK DLLs than you thought etc. >> If that is not the case, can you point to an example which exhibits >> the problem? >> Regards, >> D?enan >> On Wed, Aug 3, 2016 at 2:24 PM, Gib Bogle >> wrote: >> Statically linked VTK 5.10 works fine with Qt. >> ________________________________________ >> From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Enzo >> Matsumiya [enzo.matsumiya at gmail.com] >> Sent: Thursday, 4 August 2016 6:21 a.m. >> To: Constantinescu Mihai via vtkusers >> Subject: [FORGED] Re: [vtkusers] Qt-based VTK app shows black image >> content if VTK is? ?linked statically >> I can confirm that some issues occur when using VTK static as well >> (VTK stable 7.0.0). >> I could not look further into the issue, but my application crashed >> instead of just black window, and I just rolled back to dynamic >> build. >> Appreciate any details on this. >> Thanks, >> Enzo >> On Aug 3, 2016, at 15:05, Sophonet >> wrote: >> Hi list, >> recently, I have been working on a Qt application (using VTK >> functionality in the main .exe and a bunch of underlying DLLs). >> If VTK is built dynamically, the application behaves as expected. >> However, if VTK is built statically (and - obviously - the >> application and underlying DLLs are then built using the static >> libraries of VTK), some content (vtkImageSlice) is missing in the >> render window, i.e. does not appear at all. Other parts (e.g. >> vtkPolyData) are shown correctly. >> Anyone knows how to fix this? If possible, I would like to do >> static linking of VTK. >> Thanks, >> ? ??sophonet >> _______________________________________________ >> Powered by www.kitware.com [2] [1] >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html [3] [2] >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ [4] [3] >> Search the list archives at: >> http://markmail.org/search/?q=vtkusers [5] [4] >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers [6] [5] >> _______________________________________________ >> Powered by www.kitware.com [2] [1] >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html [3] [2] >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ [4] [3] >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> [5] >> [4] >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers [6] [5] >> _______________________________________________ >> Powered by www.kitware.com [2] [1] >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html [3] [2] >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ [4] [3] >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> [5] >> [4] >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers [6] [5] > Links: > ------ > [1] http://www.kitware.com [2] > [2] http://www.kitware.com/opensource/opensource.html [3] > [3] http://www.vtk.org/Wiki/VTK_FAQ [4] > [4] http://markmail.org/search/?q=vtkusers [5] > [5] http://public.kitware.com/mailman/listinfo/vtkusers [6] > _______________________________________________ > Powered by www.kitware.com [2] > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html [3] > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ [4] > Search the list archives at: http://markmail.org/search/?q=vtkusers > [5] > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers [6] > _______________________________________________ > Powered by www.kitware.com [2] > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html [3] > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ [4] > Search the list archives at: http://markmail.org/search/?q=vtkusers > [5] > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers [6] > _______________________________________________ > Powered by?www.kitware.com [8] > > Visit other Kitware open-source projects > at?http://www.kitware.com/opensource/opensource.html [3] > > Please keep messages on-topic and check the VTK FAQ > at:?http://www.vtk.org/Wiki/VTK_FAQ [4] > > Search the list archives at:?http://markmail.org/search/?q=vtkusers > [5] > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers [6] > > > > Links: > ------ > [1] > http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/GUI/Qt/FourPaneViewer/QtVTKRenderWindows.cxx > [2] http://www.kitware.com > [3] http://www.kitware.com/opensource/opensource.html > [4] http://www.vtk.org/Wiki/VTK_FAQ > [5] http://markmail.org/search/?q=vtkusers > [6] http://public.kitware.com/mailman/listinfo/vtkusers > [7] https://dl.dropboxusercontent.com/u/48665006/QtVTKRenderWindows.exe > [8] http://www.kitware.com/ From zhuangming.shen at sphic.org.cn Tue Aug 9 23:37:10 2016 From: zhuangming.shen at sphic.org.cn (=?utf-8?B?5rKI5bqE5piO?=) Date: Wed, 10 Aug 2016 03:37:10 +0000 Subject: [vtkusers] Disable "mouse wheel" on VTK-Web Message-ID: <1470800229648.85899@sphic.org.cn> ?Hi all, I'd like to disable "mouse wheel forward" and "mouse wheel backward" on VTK-Web. How can I modify vtk_web_cone.py? Need to modify corresponding .js file? Any suggestions are welcomed. Thanks. Regards, Zhuangming Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vtk_web_cone.py URL: From elvis.stansvik at orexplore.com Wed Aug 10 02:32:35 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 10 Aug 2016 08:32:35 +0200 Subject: [vtkusers] Memory management issues: how to track memory usage? In-Reply-To: References: <1470769689625-5739607.post@n5.nabble.com> Message-ID: Den 9 aug. 2016 9:08 em skrev "BBerco" : > > Dear all, > I am developing an application where face/vertex shape models are displayed > and interacted with. Using a rectangular box selection, the user can > highlight the selected region, apply a geometric transform to the selected > vertices and thus modify the original shape. > > If VTK seems to have all the features I need to fully implement my specs, I > am however dealing with memory management issues which I have not been able > to fix yet. > > Typically, opening a shape model and just leaving it there requires about > 300MB of memory. Selecting a region adds another 150MB to the memory > consumption. I was hoping to see the memory going back to 300MB once the > selection window is closed (and the corresponding actors/polydata cleared), > but I am left with 350MB of memory usage. So something did not get cleared > as expected. > > I understand that this very high level description of those RAM issues can > only get a very general answer at best. However, I was wondering if you knew > a debbugging method allowing one to track the memory used by a pointed > variable (variable pointed at by a vtkSmartPointer)? I believe there's a VTK_DEBUG_LEAKS CMake variable you can set when building VTK, which enables some memory tracking facilities. I'm afraid I don't know more than that, as I haven't used it myself, but would be interested in your findings as I've been meaning to try it out. Someone else can probably give more info about this option (I'm on the bus atm). Elvis > > Thanks, > Ben > > > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Memory-management-issues-how-to-track-memory-usage-tp5739607.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From AlexUtrobin at yandex.ru Wed Aug 10 02:49:45 2016 From: AlexUtrobin at yandex.ru (AlexUtrobin) Date: Tue, 9 Aug 2016 23:49:45 -0700 (MST) Subject: [vtkusers] vtkActor2D problem transparence/opacity Message-ID: <1470811785122-5739612.post@n5.nabble.com> Hello! I use vtkScalarBarActor and vtkTextActor, they are not bright and clear. I think it is a problem with all vtkActor2D. Below is the code and the picture demonstrate the problem. Please, tell me how to solve the problem. Java and VTK 7.0. vtkRenderWindowPanel mRenderWindowPanel1 = new vtkRenderWindowPanel(); mRenderWindowPanel1.GetRenderer().SetBackground(1, 1, 1);//White mRenderWindowPanel1.GetRenderer().ResetCamera(); mRenderWindowPanel1.GetRenderWindow().PointSmoothingOn(); mRenderWindowPanel1.GetRenderWindow().LineSmoothingOn(); mRenderWindowPanel1.GetRenderWindow().PolygonSmoothingOn(); mRenderWindowPanel1.setSize(jPanel1.getSize()); jPanel1.add(mRenderWindowPanel1); vtkTextActor mActorTitle = new vtkTextActor(); mActorTitle.GetTextProperty().SetFontFamily(4); //4-????? ?? ????? mActorTitle.GetTextProperty().SetFontFile("font.ttf"); mActorTitle.GetTextProperty().SetFontSize(SizeTitle); try { mActorTitle.SetInput(new String(title.getBytes("UTF-8"))); } catch (UnsupportedEncodingException ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); } mActorTitle.SetDisplayPosition(5, jPanel1.getSize().height-SizeTitle-6); mActorTitle.GetTextProperty().SetColor(0.0, 0.0, 0.0); mRenderWindowPanel1.GetRenderer().AddActor(mActorTitle); -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkActor2D-problem-transparence-opacity-tp5739612.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.stansvik at orexplore.com Wed Aug 10 03:39:53 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 10 Aug 2016 08:39:53 +0100 Subject: [vtkusers] Small question about the camera parallel scale Message-ID: The docs for Get/SetParallelScale says: "Set/Get the scaling used for a parallel projection, i.e. the height of the viewport in world-coordinate distances." But it seems that the parallel scale is actually twice the height of the viewport in world-coordinate distances. E.g. if I want 1000.0 units in world-coordinates to be visible in the vertical direction in the viewport, I should set the parallel scale of the camera to 500.0. Am I missing something? Or is it just that I don't know the terminology, what does "height of the viewport" actually mean? Thanks in advance, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From aborsic at ne-scientific.com Wed Aug 10 04:05:35 2016 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Wed, 10 Aug 2016 10:05:35 +0200 Subject: [vtkusers] Small question about the camera parallel scale In-Reply-To: References: Message-ID: Hi Elvis, Could it be that the height and width are probably measured from the focal point to the border (thus 500 units would result in a border to border height of 1000 units) ? Cheers, Andrea On 10-Aug-16 9:39 AM, Elvis Stansvik wrote: > The docs for Get/SetParallelScale says: > > "Set/Get the scaling used for a parallel projection, i.e. the height > of the viewport in world-coordinate distances." > > But it seems that the parallel scale is actually twice the height of > the viewport in world-coordinate distances. E.g. if I want 1000.0 > units in world-coordinates to be visible in the vertical direction in > the viewport, I should set the parallel scale of the camera to 500.0. > > Am I missing something? Or is it just that I don't know the > terminology, what does "height of the viewport" actually mean? > > Thanks in advance, > Elvis > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- ++++++++++++++++++++++++++++++++++++ Andrea Borsic Ph.D. CEO & Founder NE Scientific LLC Tel: +1 603 676 7450 Web: www.ne-scientific.com Twitter: https://twitter.com/ne_scientific -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Aug 10 04:08:21 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 10 Aug 2016 09:08:21 +0100 Subject: [vtkusers] Small question about the camera parallel scale In-Reply-To: References: Message-ID: 2016-08-10 10:05 GMT+02:00 Andrea Borsic : > Hi Elvis, > > Could it be that the height and width are probably measured from the focal > point to the border (thus 500 units would result in a border to border > height of 1000 units) ? > Ah yes, this is probably what is meant with "viewport height" in the documentation. I just wasn't aware of the terminology. Thanks. Elvis > Cheers, > > Andrea > > On 10-Aug-16 9:39 AM, Elvis Stansvik wrote: > > The docs for Get/SetParallelScale says: > > "Set/Get the scaling used for a parallel projection, i.e. the height of > the viewport in world-coordinate distances." > > But it seems that the parallel scale is actually twice the height of the > viewport in world-coordinate distances. E.g. if I want 1000.0 units in > world-coordinates to be visible in the vertical direction in the viewport, > I should set the parallel scale of the camera to 500.0. > > Am I missing something? Or is it just that I don't know the terminology, > what does "height of the viewport" actually mean? > > Thanks in advance, > Elvis > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe:http://public.kitware.com/mailman/listinfo/vtkusers > > > -- > ++++++++++++++++++++++++++++++++++++ > Andrea Borsic Ph.D. > CEO & Founder NE Scientific LLC > Tel: +1 603 676 7450 > Web: www.ne-scientific.com > Twitter: https://twitter.com/ne_scientific > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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 aborsic at ne-scientific.com Wed Aug 10 04:11:05 2016 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Wed, 10 Aug 2016 10:11:05 +0200 Subject: [vtkusers] Small question about the camera parallel scale In-Reply-To: References: Message-ID: <4293db63-aed6-796a-ffe5-0b9a89a1c69e@ne-scientific.com> I am not 100% sure of that, but I think it is likely so. Cheers, Andrea On 10-Aug-16 10:08 AM, Elvis Stansvik wrote: > 2016-08-10 10:05 GMT+02:00 Andrea Borsic >: > > Hi Elvis, > > Could it be that the height and width are probably measured from > the focal point to the border (thus 500 units would result in a > border to border height of 1000 units) ? > > Ah yes, this is probably what is meant with "viewport height" in the > documentation. I just wasn't aware of the terminology. Thanks. > > Elvis > > Cheers, > > Andrea > > > On 10-Aug-16 9:39 AM, Elvis Stansvik wrote: >> The docs for Get/SetParallelScale says: >> >> "Set/Get the scaling used for a parallel projection, i.e. the >> height of the viewport in world-coordinate distances." >> >> But it seems that the parallel scale is actually twice the height >> of the viewport in world-coordinate distances. E.g. if I want >> 1000.0 units in world-coordinates to be visible in the vertical >> direction in the viewport, I should set the parallel scale of the >> camera to 500.0. >> >> Am I missing something? Or is it just that I don't know the >> terminology, what does "height of the viewport" actually mean? >> >> Thanks in advance, >> Elvis >> >> >> _______________________________________________ >> Powered bywww.kitware.com >> >> Visit other Kitware open-source projects athttp://www.kitware.com/opensource/opensource.html >> >> >> Please keep messages on-topic and check the VTK FAQ at:http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at:http://markmail.org/search/?q=vtkusers >> >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > -- > ++++++++++++++++++++++++++++++++++++ > Andrea Borsic Ph.D. > CEO & Founder NE Scientific LLC > Tel:+1 603 676 7450 > Web:www.ne-scientific.com > Twitter:https://twitter.com/ne_scientific > > _______________________________________________ Powered by > www.kitware.com Visit other Kitware > open-source projects at > http://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 > > -- ++++++++++++++++++++++++++++++++++++ Andrea Borsic Ph.D. CEO & Founder NE Scientific LLC Tel: +1 603 676 7450 Web: www.ne-scientific.com Twitter: https://twitter.com/ne_scientific -------------- next part -------------- An HTML attachment was scrubbed... URL: From redbaronqueen at gmail.com Wed Aug 10 05:47:53 2016 From: redbaronqueen at gmail.com (Aleksandar Atanasov) Date: Wed, 10 Aug 2016 11:47:53 +0200 Subject: [vtkusers] Plotting flat surface using vtkChartXYZ and vtkPlotSurface Message-ID: Hi all, I'm having a really though time plotting a flat surface (as in every point from that surface has the same *z value*). I'm using the QVTKWidget in my Qt 5.7 application. My idea is to show one or multiple signals which represent how near one or multiple (up to 10) fingers come to the surface of a device. So initially the surface plot is flat (since no fingers are touching it). Whenever a finger comes near the surface, the device emits the position of that finger (*x,y values*) along with a signal strength at that position (*z value*). I'm really new to the whole chart and surface plotting in VTK (I have used it with PCL) so I have no idea where to look at (it took me quite some time to even build and integrate the VTK and the surface plot in my Qt application...). Basically if I set all my points to have the same *z value* the surface plot simply doesn't show. I think this has something to do with the scaling of the chart and the fact that it expects a range of values. Even if it's binary (that is only two values are possible for each *z value*) the min and max have to be different. Setting the min and max to a very small values (min: 0, max: 0.00001) doesn't help at all since the chart scales to these values and I get a very noisy surface plot. Currently my plot is static (though I intend to bind it to near real time values if it works out) and I'm setting up the data as follows: void Q3DTouchPadSignalsFingersPlot::setupPlot() { int numPoints = 100; double inc = 9.424778 / (numPoints - 1); for (int i = 0; i < (int)numPoints; ++i) { vtkNew arr; this->surfaceData->AddColumn(arr.GetPointer()); } this->surfaceData->SetNumberOfRows(numPoints); for (int i = 0; i < (int)numPoints; ++i) { double x = i*inc; // double x = i; for (int j = 0; j < (int)numPoints; ++j) { double y = j*inc; // double y = j; this->surfaceData->SetValue(i, j, sin(sqrt(x*x + y*y))/sqrt(x*x + y*y)); // sin(sqrt(x*x + y*y)) | sin(sqrt(x*x + y*y))/sqrt(x*x + y*y) } } this->plot->SetXRange(0, 9.424778); this->plot->SetYRange(0, 9.424778); this->plot->SetInputData(this->surfaceData.GetPointer()); } This produces a quater of the function sin(sqrt(x*x + y*y))/sqrt(x*x + y*y)): [image: Inline images 2] If I change the setting of the data at the given location in the surface to this->surfaceData->SetValue(i, j, 1) (that is I use a constant) the plot disappears: [image: Inline images 1] Any ideas how to fix this? Kind regards, Aleksandar -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 95148 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 24174 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Wed Aug 10 08:32:06 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 10 Aug 2016 13:32:06 +0100 Subject: [vtkusers] Forward declaration of Foo enough for vtkNew declaration? Message-ID: Hi, The overview at https://blog.kitware.com/a-tour-of-vtk-pointer-classes/ seems to suggest that forward declaration of a class Foo should be enough to be able to declare a vtkNew (e.g. see how vtkTable is used in the code example under "Use of Classes"). But when I try e.g: class vtkCompositeTransferFunctionItem; ... vtkNew m_functionsItem; I get error: invalid use of incomplete type ?class vtkCompositeTransferFunctionItem? Do I really need to include vtkCompositeTransferFunctionItem.h to declare a vtkNew ? Thanks, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Aug 10 08:39:25 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 10 Aug 2016 13:39:25 +0100 Subject: [vtkusers] Forward declaration of Foo enough for vtkNew declaration? In-Reply-To: References: Message-ID: 2016-08-10 14:32 GMT+02:00 Elvis Stansvik : > Hi, > > The overview at > > https://blog.kitware.com/a-tour-of-vtk-pointer-classes/ > > seems to suggest that forward declaration of a class Foo should be enough > to be able to declare a vtkNew (e.g. see how vtkTable is used in the > code example under "Use of Classes"). > > But when I try e.g: > > class vtkCompositeTransferFunctionItem; > ... > vtkNew m_functionsItem; > > I get > > error: invalid use of incomplete type ?class > vtkCompositeTransferFunctionItem? > > Do I really need to include vtkCompositeTransferFunctionItem.h to declare > a vtkNew ? > To show more of the context where I'm trying this: #pragma once #include "VTKWidget.h" #include #include #include #include #include #include #include class QWidget; class vtkColorTransferFunction; // Apparently I can't just forward declare these. //class vtkChartXY; //class vtkCompositeTransferFunctionItem; //class vtkCompositeControlPointsItem; //class vtkContextView; class vtkPiecewiseFunction; class CompositeTransferFunctionEditor : public VTKWidget { Q_OBJECT public: enum Mode { EditColor, EditOpacity }; Q_ENUM(Mode) public: CompositeTransferFunctionEditor(vtkColorTransferFunction *colorFunction, vtkPiecewiseFunction *opacityFunction, Mode mode = EditColor, QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); void setColorFunction(vtkColorTransferFunction *colorFunction); void setOpacityFunction(vtkPiecewiseFunction *opacityFunction); signals: void functionsModified(); private: void editColorPoint(); private: vtkNew m_functionsItem; vtkNew m_pointsItem; vtkNew m_chart; vtkNew m_contextView; }; I had hoped I would only have to forward declare the types used in the instantiations of vtkNew here, not include the full headers. Elvis > Thanks, > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Aug 10 09:10:43 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 10 Aug 2016 14:10:43 +0100 Subject: [vtkusers] Utilities/Maintenance/WhatModulesVTK.py will not report vtkRenderingContextOpenGL Message-ID: I make use of the very convenient script in Utilities/Maintenance/WhatModulesVTK.py to calculate precisely the VTK modules I make use of, and I can pretty much copy-paste the result to the find_package and target_link_libraries in my CMakeLists.txt. So far the only manual touch-up I've had to do is change vtkRenderingOpenGL vtkRenderingVolumeOpenGL to vtkRenderingOpenGL2 vtkRenderingVolumeOpenGL2 since it seems the script cannot know that I'm using a VTK compiled with the OpenGL2 backend. However, now I've ran into another minor snag: I've begun using a vtkContextView, so the script would report vtkRenderingContext2D But it seems it will not report vtkRenderingContextOpenGL2 which it seems I also need, or the factories won't work (I think related in some way to http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines , or perhaps to the splitting of the OpenGL backends). Anyone know why the script won't report vtkRenderingContextOpenGL2 (or at least vtkRenderingContextOpenGL, I'm fine with having to add the "2" manually) ? Will I always have to add it manually? It's so convenient to be able to just copy-paste whatever the script outputs. Thanks in advance, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Wed Aug 10 09:34:38 2016 From: david.lonie at kitware.com (David Lonie) Date: Wed, 10 Aug 2016 09:34:38 -0400 Subject: [vtkusers] Memory management issues: how to track memory usage? In-Reply-To: References: <1470769689625-5739607.post@n5.nabble.com> Message-ID: On Wed, Aug 10, 2016 at 2:32 AM, Elvis Stansvik wrote: > Den 9 aug. 2016 9:08 em skrev "BBerco" : >> Typically, opening a shape model and just leaving it there requires about >> 300MB of memory. Selecting a region adds another 150MB to the memory >> consumption. I was hoping to see the memory going back to 300MB once the >> selection window is closed (and the corresponding actors/polydata >> cleared), >> but I am left with 350MB of memory usage. So something did not get cleared >> as expected. This sounds like the operating system is caching some memory. When a process releases memory, often times the OS will keep some of it marked as in-use to speed up future allocations. There may be OS-specific methods to disable this behavior or force cached memory to be freed, though I'm not sure. >> I understand that this very high level description of those RAM issues can >> only get a very general answer at best. However, I was wondering if you >> knew >> a debbugging method allowing one to track the memory used by a pointed >> variable (variable pointed at by a vtkSmartPointer)? Several vtkObject subclasses have a GetActualMemorySize() method. These may be useful here. > I believe there's a VTK_DEBUG_LEAKS CMake variable you can set when building > VTK, which enables some memory tracking facilities. I'm afraid I don't know > more than that, as I haven't used it myself, but would be interested in your > findings as I've been meaning to try it out. VTK_DEBUG_LEAKS keeps track of vtkObjects that have been allocated but not freed. When enabled in CMake, it will print a list of all leaked vtkObjects when the process exits. This can be handy for identifying missing calls to vtkObject::Delete(). There's also a static method vtkDebugLeaks::PrintCurrentLeaks() which will print a list of all vtkObjects currently in memory, which may be helpful to compare before/after the selection to determine if the problem is an actual leak or a caching issue. HTH, Dave From david.lonie at kitware.com Wed Aug 10 09:38:53 2016 From: david.lonie at kitware.com (David Lonie) Date: Wed, 10 Aug 2016 09:38:53 -0400 Subject: [vtkusers] vtkActor2D problem transparence/opacity In-Reply-To: <1470811785122-5739612.post@n5.nabble.com> References: <1470811785122-5739612.post@n5.nabble.com> Message-ID: I'm not sure what you mean by this, can you attach an image that shows the problem? Dave On Wed, Aug 10, 2016 at 2:49 AM, AlexUtrobin wrote: > Hello! I use vtkScalarBarActor and vtkTextActor, they are not bright and > clear. I think it is a problem with all vtkActor2D. Below is the code and > the picture demonstrate the problem. Please, tell me how to solve the > problem. > > Java and VTK 7.0. > > vtkRenderWindowPanel mRenderWindowPanel1 = new > vtkRenderWindowPanel(); > mRenderWindowPanel1.GetRenderer().SetBackground(1, 1, 1);//White > mRenderWindowPanel1.GetRenderer().ResetCamera(); > mRenderWindowPanel1.GetRenderWindow().PointSmoothingOn(); > mRenderWindowPanel1.GetRenderWindow().LineSmoothingOn(); > mRenderWindowPanel1.GetRenderWindow().PolygonSmoothingOn(); > mRenderWindowPanel1.setSize(jPanel1.getSize()); > jPanel1.add(mRenderWindowPanel1); > > vtkTextActor mActorTitle = new vtkTextActor(); > mActorTitle.GetTextProperty().SetFontFamily(4); //4-????? ?? ????? > mActorTitle.GetTextProperty().SetFontFile("font.ttf"); > mActorTitle.GetTextProperty().SetFontSize(SizeTitle); > try { > mActorTitle.SetInput(new String(title.getBytes("UTF-8"))); > } catch (UnsupportedEncodingException ex) { > Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, > ex); > } > mActorTitle.SetDisplayPosition(5, > jPanel1.getSize().height-SizeTitle-6); > mActorTitle.GetTextProperty().SetColor(0.0, 0.0, 0.0); > mRenderWindowPanel1.GetRenderer().AddActor(mActorTitle); > > > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtkActor2D-problem-transparence-opacity-tp5739612.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 From david.lonie at kitware.com Wed Aug 10 09:43:22 2016 From: david.lonie at kitware.com (David Lonie) Date: Wed, 10 Aug 2016 09:43:22 -0400 Subject: [vtkusers] Forward declaration of Foo enough for vtkNew declaration? In-Reply-To: References: Message-ID: On Wed, Aug 10, 2016 at 8:39 AM, Elvis Stansvik wrote: > 2016-08-10 14:32 GMT+02:00 Elvis Stansvik : >> seems to suggest that forward declaration of a class Foo should be enough >> to be able to declare a vtkNew (e.g. see how vtkTable is used in the >> code example under "Use of Classes"). This is correct. The vtkNew template does not require its parameter's header to be included and forward declaration is sufficient. Look through the VTK code and you'll see this pattern used in a lot of headers. What is the full error (with file path, line number, etc)? I wonder if the moc'd header that Qt generates is trying to do something funky here. Which line is it complaining about? From shawn.waldon at kitware.com Wed Aug 10 09:44:04 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Wed, 10 Aug 2016 09:44:04 -0400 Subject: [vtkusers] Forward declaration of Foo enough for vtkNew declaration? In-Reply-To: References: Message-ID: Hi Elvis, The problem is this: Declaring vtkNew should be fine when Foo is forward declared. But when the vtkNew is deleted in your destructor, the vtkNew's destructor needs to call Foo->Delete(). So at that point it needs the full definition of Foo. In your example, if you declare your class's destructor and implement it as {} (use the default) in an implementation file where Foo's header is included this should work. One of my projects uses vtkNew this way. HTH, Shawn On Wed, Aug 10, 2016 at 8:39 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > 2016-08-10 14:32 GMT+02:00 Elvis Stansvik : > >> Hi, >> >> The overview at >> >> https://blog.kitware.com/a-tour-of-vtk-pointer-classes/ >> >> seems to suggest that forward declaration of a class Foo should be enough >> to be able to declare a vtkNew (e.g. see how vtkTable is used in the >> code example under "Use of Classes"). >> >> But when I try e.g: >> >> class vtkCompositeTransferFunctionItem; >> ... >> vtkNew m_functionsItem; >> >> I get >> >> error: invalid use of incomplete type ?class >> vtkCompositeTransferFunctionItem? >> >> Do I really need to include vtkCompositeTransferFunctionItem.h to >> declare a vtkNew ? >> > > To show more of the context where I'm trying this: > > #pragma once > > #include "VTKWidget.h" > > #include > #include > > #include > > #include > #include > #include > #include > > class QWidget; > > class vtkColorTransferFunction; > // Apparently I can't just forward declare these. > //class vtkChartXY; > //class vtkCompositeTransferFunctionItem; > //class vtkCompositeControlPointsItem; > //class vtkContextView; > class vtkPiecewiseFunction; > > class CompositeTransferFunctionEditor : public VTKWidget > { > Q_OBJECT > > public: > enum Mode { > EditColor, > EditOpacity > }; > Q_ENUM(Mode) > > public: > CompositeTransferFunctionEditor(vtkColorTransferFunction > *colorFunction, > vtkPiecewiseFunction *opacityFunction, > Mode mode = EditColor, > QWidget *parent = 0, > Qt::WindowFlags flags = > Qt::WindowFlags()); > > void setColorFunction(vtkColorTransferFunction *colorFunction); > void setOpacityFunction(vtkPiecewiseFunction *opacityFunction); > > signals: > void functionsModified(); > > private: > void editColorPoint(); > > private: > vtkNew m_functionsItem; > vtkNew m_pointsItem; > vtkNew m_chart; > vtkNew m_contextView; > }; > > I had hoped I would only have to forward declare the types used in the > instantiations of vtkNew here, not include the full headers. > > Elvis > > >> Thanks, >> Elvis >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ndel314 at gmail.com Wed Aug 10 10:45:57 2016 From: ndel314 at gmail.com (Nico Del Piano) Date: Wed, 10 Aug 2016 11:45:57 -0300 Subject: [vtkusers] Error linking QVTK Message-ID: Hi all, I am having some trouble when I try to build a project that requires QVTK: $ make Linking CXX executable TBI_APP /usr/bin/ld: cannot find -lQVTK collect2: error: ld returned 1 exit status CMakeFiles/TBI_APP.dir/build.make:660: recipe for target 'TBI_APP' failed make[2]: *** [TBI_APP] Error 1 CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/TBI_APP.dir/all' failed make[1]: *** [CMakeFiles/TBI_APP.dir/all] Error 2 Makefile:75: recipe for target 'all' failed make: *** [all] Error 2 I configure the project with ccmake but I get this linking error and I am not sure why. Maybe I am not configuring VTK right or something like that, but any help or hint will be really appreciated. Thanks! Nico. From cory.quammen at kitware.com Wed Aug 10 10:48:22 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 10 Aug 2016 10:48:22 -0400 Subject: [vtkusers] Error linking QVTK In-Reply-To: References: Message-ID: Might be a silly question, but did you build VTK with Qt support, i.e., with the VTK_Group_Qt option set to on? Cory On Wed, Aug 10, 2016 at 10:45 AM, Nico Del Piano wrote: > Hi all, > > I am having some trouble when I try to build a project that requires QVTK: > > $ make > Linking CXX executable TBI_APP > /usr/bin/ld: cannot find -lQVTK > collect2: error: ld returned 1 exit status > CMakeFiles/TBI_APP.dir/build.make:660: recipe for target 'TBI_APP' failed > make[2]: *** [TBI_APP] Error 1 > CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/TBI_APP.dir/all' > failed > make[1]: *** [CMakeFiles/TBI_APP.dir/all] Error 2 > Makefile:75: recipe for target 'all' failed > make: *** [all] Error 2 > > I configure the project with ccmake but I get this linking error and I > am not sure why. Maybe I am not configuring VTK right or something > like that, but any help or hint will be really appreciated. > > Thanks! > > Nico. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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 > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Aug 10 10:50:26 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 10 Aug 2016 15:50:26 +0100 Subject: [vtkusers] Forward declaration of Foo enough for vtkNew declaration? In-Reply-To: References: Message-ID: 2016-08-10 15:43 GMT+02:00 David Lonie : > On Wed, Aug 10, 2016 at 8:39 AM, Elvis Stansvik > wrote: > > 2016-08-10 14:32 GMT+02:00 Elvis Stansvik > : > >> seems to suggest that forward declaration of a class Foo should be > enough > >> to be able to declare a vtkNew (e.g. see how vtkTable is used in > the > >> code example under "Use of Classes"). > > This is correct. The vtkNew template does not require its parameter's > header to be included and forward declaration is sufficient. Look > through the VTK code and you'll see this pattern used in a lot of > headers. > > What is the full error (with file path, line number, etc)? I wonder if > the moc'd header that Qt generates is trying to do something funky > here. Which line is it complaining about? > Sorry for the terse error message, I should have pasted more. But it looks like Shawn has guessed what my problem was. Thanks to both of you. Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Aug 10 10:51:01 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 10 Aug 2016 15:51:01 +0100 Subject: [vtkusers] Forward declaration of Foo enough for vtkNew declaration? In-Reply-To: References: Message-ID: 2016-08-10 15:44 GMT+02:00 Shawn Waldon : > Hi Elvis, > > The problem is this: Declaring vtkNew should be fine when Foo is > forward declared. But when the vtkNew is deleted in your destructor, > the vtkNew's destructor needs to call Foo->Delete(). So at that point > it needs the full definition of Foo. In your example, if you declare your > class's destructor and implement it as {} (use the default) in an > implementation file where Foo's header is included this should work. One > of my projects uses vtkNew this way. > Thanks Shawn, that was indeed the problem. Adding empty destructors did the trick. Elvis > > HTH, > Shawn > > On Wed, Aug 10, 2016 at 8:39 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> 2016-08-10 14:32 GMT+02:00 Elvis Stansvik : >> >>> Hi, >>> >>> The overview at >>> >>> https://blog.kitware.com/a-tour-of-vtk-pointer-classes/ >>> >>> seems to suggest that forward declaration of a class Foo should be >>> enough to be able to declare a vtkNew (e.g. see how vtkTable is used >>> in the code example under "Use of Classes"). >>> >>> But when I try e.g: >>> >>> class vtkCompositeTransferFunctionItem; >>> ... >>> vtkNew m_functionsItem; >>> >>> I get >>> >>> error: invalid use of incomplete type ?class >>> vtkCompositeTransferFunctionItem? >>> >>> Do I really need to include vtkCompositeTransferFunctionItem.h to >>> declare a vtkNew ? >>> >> >> To show more of the context where I'm trying this: >> >> #pragma once >> >> #include "VTKWidget.h" >> >> #include >> #include >> >> #include >> >> #include >> #include >> #include >> #include >> >> class QWidget; >> >> class vtkColorTransferFunction; >> // Apparently I can't just forward declare these. >> //class vtkChartXY; >> //class vtkCompositeTransferFunctionItem; >> //class vtkCompositeControlPointsItem; >> //class vtkContextView; >> class vtkPiecewiseFunction; >> >> class CompositeTransferFunctionEditor : public VTKWidget >> { >> Q_OBJECT >> >> public: >> enum Mode { >> EditColor, >> EditOpacity >> }; >> Q_ENUM(Mode) >> >> public: >> CompositeTransferFunctionEditor(vtkColorTransferFunction >> *colorFunction, >> vtkPiecewiseFunction >> *opacityFunction, >> Mode mode = EditColor, >> QWidget *parent = 0, >> Qt::WindowFlags flags = >> Qt::WindowFlags()); >> >> void setColorFunction(vtkColorTransferFunction *colorFunction); >> void setOpacityFunction(vtkPiecewiseFunction *opacityFunction); >> >> signals: >> void functionsModified(); >> >> private: >> void editColorPoint(); >> >> private: >> vtkNew m_functionsItem; >> vtkNew m_pointsItem; >> vtkNew m_chart; >> vtkNew m_contextView; >> }; >> >> I had hoped I would only have to forward declare the types used in the >> instantiations of vtkNew here, not include the full headers. >> >> Elvis >> >> >>> Thanks, >>> Elvis >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ndel314 at gmail.com Wed Aug 10 11:05:29 2016 From: ndel314 at gmail.com (Nico Del Piano) Date: Wed, 10 Aug 2016 12:05:29 -0300 Subject: [vtkusers] Error linking QVTK In-Reply-To: References: Message-ID: Hey Cory, thanks for your reply. Yes, that option is activated, and I have VTK installed. Also, something weird happens, when configuring with cmake, if I try to change the version of `qmake` (to 5.7), it changes: This is by default: QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4 I change to: QT_QMAKE_EXECUTABLE /home/user/Qt/5.7/bin/qmake and it goes back automatically: QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4 Nico 2016-08-10 11:48 GMT-03:00 Cory Quammen : > Might be a silly question, but did you build VTK with Qt support, i.e., with > the VTK_Group_Qt option set to on? > > Cory > > On Wed, Aug 10, 2016 at 10:45 AM, Nico Del Piano wrote: >> >> Hi all, >> >> I am having some trouble when I try to build a project that requires QVTK: >> >> $ make >> Linking CXX executable TBI_APP >> /usr/bin/ld: cannot find -lQVTK >> collect2: error: ld returned 1 exit status >> CMakeFiles/TBI_APP.dir/build.make:660: recipe for target 'TBI_APP' failed >> make[2]: *** [TBI_APP] Error 1 >> CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/TBI_APP.dir/all' >> failed >> make[1]: *** [CMakeFiles/TBI_APP.dir/all] Error 2 >> Makefile:75: recipe for target 'all' failed >> make: *** [all] Error 2 >> >> I configure the project with ccmake but I get this linking error and I >> am not sure why. Maybe I am not configuring VTK right or something >> like that, but any help or hint will be really appreciated. >> >> Thanks! >> >> Nico. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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 > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. From cory.quammen at kitware.com Wed Aug 10 11:11:03 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 10 Aug 2016 11:11:03 -0400 Subject: [vtkusers] Error linking QVTK In-Reply-To: References: Message-ID: You need to change the Qt version you want to fix the Qt configuration problem. Look for the VTK_QT_VERSION and set it to 5 if you want to use Qt 5.7. QT_QMAKE_EXECUTABLE isn't actually needed when you want Qt 5. Instead, you need to set Qt5_DIR to something like /home/user/Qt/5.7/lib/cmake/Qt5 The rest of the Qt5 settings should be set next time you configure. Then you can delete all the QT* settings brought in when Qt 4 was found. Cory On Wed, Aug 10, 2016 at 11:05 AM, Nico Del Piano wrote: > Hey Cory, thanks for your reply. > > Yes, that option is activated, and I have VTK installed. > > Also, something weird happens, when configuring with cmake, if I try > to change the version of `qmake` (to 5.7), it changes: > > This is by default: > QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4 > > I change to: > QT_QMAKE_EXECUTABLE /home/user/Qt/5.7/bin/qmake > > and it goes back automatically: > QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4 > > Nico > > 2016-08-10 11:48 GMT-03:00 Cory Quammen : > > Might be a silly question, but did you build VTK with Qt support, i.e., > with > > the VTK_Group_Qt option set to on? > > > > Cory > > > > On Wed, Aug 10, 2016 at 10:45 AM, Nico Del Piano > wrote: > >> > >> Hi all, > >> > >> I am having some trouble when I try to build a project that requires > QVTK: > >> > >> $ make > >> Linking CXX executable TBI_APP > >> /usr/bin/ld: cannot find -lQVTK > >> collect2: error: ld returned 1 exit status > >> CMakeFiles/TBI_APP.dir/build.make:660: recipe for target 'TBI_APP' > failed > >> make[2]: *** [TBI_APP] Error 1 > >> CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/TBI_APP.dir/all' > >> failed > >> make[1]: *** [CMakeFiles/TBI_APP.dir/all] Error 2 > >> Makefile:75: recipe for target 'all' failed > >> make: *** [all] Error 2 > >> > >> I configure the project with ccmake but I get this linking error and I > >> am not sure why. Maybe I am not configuring VTK right or something > >> like that, but any help or hint will be really appreciated. > >> > >> Thanks! > >> > >> Nico. > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://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 > > > > > > > > > > -- > > Cory Quammen > > R&D Engineer > > Kitware, Inc. > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Wed Aug 10 11:12:38 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 10 Aug 2016 11:12:38 -0400 Subject: [vtkusers] Error linking QVTK In-Reply-To: References: Message-ID: <20160810151238.GA30304@megas.kitware.com> On Wed, Aug 10, 2016 at 12:05:29 -0300, Nico Del Piano wrote: > Hey Cory, thanks for your reply. > > Yes, that option is activated, and I have VTK installed. > > Also, something weird happens, when configuring with cmake, if I try > to change the version of `qmake` (to 5.7), it changes: > > This is by default: > QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4 > > I change to: > QT_QMAKE_EXECUTABLE /home/user/Qt/5.7/bin/qmake > > and it goes back automatically: > QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4 There's the VTK_QT_VERSION flag which you need to set to "5" in order to get Qt5. QT_QMAKE_EXECUTABLE is always a Qt4 variable. --Ben From sebastien.jourdain at kitware.com Wed Aug 10 11:18:38 2016 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 10 Aug 2016 09:18:38 -0600 Subject: [vtkusers] Disable "mouse wheel" on VTK-Web In-Reply-To: <1470800229648.85899@sphic.org.cn> References: <1470800229648.85899@sphic.org.cn> Message-ID: The edit will need to happen on the client. With jQuery you will need to unbind those events on the mouse listener container like follow: $('.mouse-listener').unbind("DOMMouseScroll mousewheel"); You can add that line within the