Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vtk vs xml-vtk mixed up. #82

Closed
markus-stoll opened this issue Sep 22, 2014 · 18 comments
Closed

vtk vs xml-vtk mixed up. #82

markus-stoll opened this issue Sep 22, 2014 · 18 comments

Comments

@markus-stoll
Copy link

We are mixing old a new (xml) vtk input/output across our c++ operators. A lot of operator calls fail because they needed a specific input type (e.g vtk instead of vtu)

I have implemented generic readers: please use IOHelper::VTKReadImage, IOHelper::VTKReadUnstructuredGrid, IOHelper::VTKReadPolyData in the future.

The operator of MiscMeshOperators.cpp have all been adapted. To make sure they still work, the example was adapted to test all operators of MiscMeshOperators.cpp using data provided in GIT Hub.

All changes are currently on the more_paramters branch. Can someone please check if everything still compiles on Linux and run the exmpale? Afterwards I will merge back to master.

@markus-stoll
Copy link
Author

PostProcessingOperators.cpp have been adapted to use IOHelper methods

@wadoon
Copy link
Member

wadoon commented Sep 22, 2014

Does not compile under our pool computers.

/home/weigl/workspace/msml/operators/MiscMeshOperators/IOHelper.cpp:30:47: fatal error: boost/algorithm/string/trim_all.hpp: No such file or directory

@markus-stoll
Copy link
Author

boost version?

@markus-stoll
Copy link
Author

trim_all seems to be new with boost version 1.47.

I will implement a work around without trim all. Anything else?

@wadoon
Copy link
Member

wadoon commented Sep 22, 2014

We have 1.48/1.49 installed:

/usr/include/boost/algorithm/string/trim.hpp

@markus-stoll markus-stoll changed the title vtk vs xml-vtk mixed ip. vtk vs xml-vtk mixed up. Sep 22, 2014
@markus-stoll
Copy link
Author

strange, that should work.
But I have removed the #include all_trim is no longer needed: 94524af

@wadoon
Copy link
Member

wadoon commented Sep 22, 2014

It compiles now. I would say we can merge it.

I get errors at execution of on some example with run_examples.py.
But I do not think that comes from the update.
I'll open separate issues for them.

@markus-stoll
Copy link
Author

Yes, I am working on the same issue of the vtkWriters that should also fix the examples.

Does the MiscMeshOperatorsExample project compile and run?

@wadoon
Copy link
Member

wadoon commented Sep 22, 2014

Compiles and dies with a segfault.

➜  cbuild git:(more_parameters) ✗ bin/MiscMeshOperatorsExample 
Coloring mesh with errors..."/home/weigl/workspace/msml/operators/../Testdata/ircad_disp50.vtu" was not found.
ERROR: In /home/weigl/workspace/VTK-6.1.0/IO/XML/vtkXMLGenericDataObjectReader.cxx, line 154
vtkXMLGenericDataObjectReader (0x1f9ed50): could not load /home/weigl/workspace/msml/operators/../Testdata/ircad_disp50.vtu

ERROR: In /home/weigl/workspace/VTK-6.1.0/Common/ExecutionModel/vtkExecutive.cxx, line 754
vtkCompositeDataPipeline (0x1fa01e0): Algorithm vtkXMLGenericDataObjectReader(0x1f9ed50) returned failure for request: vtkInformation (0x1fa1750)
  Debug: Off
  Modified Time: 50
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0



ERROR: In /home/weigl/workspace/VTK-6.1.0/IO/XML/vtkXMLGenericDataObjectReader.cxx, line 154
vtkXMLGenericDataObjectReader (0x1f9ed50): could not load /home/weigl/workspace/msml/operators/../Testdata/ircad_disp50.vtu

ERROR: In /home/weigl/workspace/VTK-6.1.0/Common/ExecutionModel/vtkExecutive.cxx, line 754
vtkCompositeDataPipeline (0x1fa01e0): Algorithm vtkXMLGenericDataObjectReader(0x1f9ed50) returned failure for request: vtkInformation (0x1fa1750)
  Debug: Off
  Modified Time: 50
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0



"/home/weigl/workspace/msml/operators/../Testdata/ircad_disp50.vtu" is not an .vtu unstructured grid.
ERROR: In /home/weigl/workspace/VTK-6.1.0/IO/XML/vtkXMLGenericDataObjectReader.cxx, line 154
vtkXMLGenericDataObjectReader (0x1f9ed50): could not load /home/weigl/workspace/msml/operators/../Testdata/ircad_disp50.vtu

ERROR: In /home/weigl/workspace/VTK-6.1.0/Common/ExecutionModel/vtkExecutive.cxx, line 754
vtkCompositeDataPipeline (0x1fa01e0): Algorithm vtkXMLGenericDataObjectReader(0x1f9ed50) returned failure for request: vtkInformation (0x1fa1750)
  Debug: Off
  Modified Time: 50
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0



"/home/weigl/workspace/msml/operators/../Testdata/ircad_disp0.vtu" was not found.
ERROR: In /home/weigl/workspace/VTK-6.1.0/IO/XML/vtkXMLGenericDataObjectReader.cxx, line 154
vtkXMLGenericDataObjectReader (0x1f9ed50): could not load /home/weigl/workspace/msml/operators/../Testdata/ircad_disp0.vtu

ERROR: In /home/weigl/workspace/VTK-6.1.0/Common/ExecutionModel/vtkExecutive.cxx, line 754
vtkCompositeDataPipeline (0x1fa01e0): Algorithm vtkXMLGenericDataObjectReader(0x1f9ed50) returned failure for request: vtkInformation (0x1fa0750)
  Debug: Off
  Modified Time: 100
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0



ERROR: In /home/weigl/workspace/VTK-6.1.0/IO/XML/vtkXMLGenericDataObjectReader.cxx, line 154
vtkXMLGenericDataObjectReader (0x1f9ed50): could not load /home/weigl/workspace/msml/operators/../Testdata/ircad_disp0.vtu

ERROR: In /home/weigl/workspace/VTK-6.1.0/Common/ExecutionModel/vtkExecutive.cxx, line 754
vtkCompositeDataPipeline (0x1fa01e0): Algorithm vtkXMLGenericDataObjectReader(0x1f9ed50) returned failure for request: vtkInformation (0x1fa0750)
  Debug: Off
  Modified Time: 100
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0



"/home/weigl/workspace/msml/operators/../Testdata/ircad_disp0.vtu" is not an .vtu unstructured grid.
ERROR: In /home/weigl/workspace/VTK-6.1.0/IO/XML/vtkXMLGenericDataObjectReader.cxx, line 154
vtkXMLGenericDataObjectReader (0x1f9ed50): could not load /home/weigl/workspace/msml/operators/../Testdata/ircad_disp0.vtu

ERROR: In /home/weigl/workspace/VTK-6.1.0/Common/ExecutionModel/vtkExecutive.cxx, line 754
vtkCompositeDataPipeline (0x1fa01e0): Algorithm vtkXMLGenericDataObjectReader(0x1f9ed50) returned failure for request: vtkInformation (0x1fa0750)
  Debug: Off
  Modified Time: 100
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA_OBJECT
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0



[1]    18628 segmentation fault (core dumped)  bin/MiscMeshOperatorsExample
➜  cbuild git:(more_parameters) ✗                               

@wadoon wadoon added this to the feature complete milestone Sep 22, 2014
@markus-stoll
Copy link
Author

Make sure the CMAKE_TESTDATA_PATH variable (in CMAKE) is set to the testdata folder.

@wadoon
Copy link
Member

wadoon commented Sep 22, 2014

still an error

 Projecting surface mesh /home/weigl/workspace/msml/operators/../testdata/bunny_polydata_highres.vtk to 
/home/weigl/workspace/msml/operators/../testdata/bunny_polydata.vtk and writing results to /home/weigl/w
orkspace/msml/operators/../testdata/TestProjectSurfaceMeshPython.vtk
"/home/weigl/workspace/msml/operators/../testdata/bunny_polydata_highres.vtk" is no poly data file. Trying to use MiscMeshOperators::ExtractSurfaceMesh(IOHelper::VTKReadUnstructuredGrid(..)
"/home/weigl/workspace/msml/operators/../testdata/bunny_polydata.vtk" is no poly data file. Trying to use MiscMeshOperators::ExtractSurfaceMesh(IOHelper::VTKReadUnstructuredGrid(..)
Start surface projection
Creating image from surface mesh (voxelization)...Resolution of the longest bound is 100
"/home/weigl/workspace/msml/operators/../testdata/bunny_polydata.vtk" is no poly data file. Trying to use MiscMeshOperators::ExtractSurfaceMesh(IOHelper::VTKReadUnstructuredGrid(..)
Longest bound is 0.15545
Spacing is 0.0015545
Performing voxelization (this might take while)...
ERROR: In /home/weigl/workspace/VTK-6.1.0/Common/Core/vtkDataArray.cxx, line 510
vtkUnsignedCharArray (0x14def90): The number of components do not match the number requested: 3 != 1

similar to #84

@markus-stoll
Copy link
Author

yes, same problem. But works on my machine. Can you open the testdata/bunny_polydata.vtk with paraview?

@wadoon
Copy link
Member

wadoon commented Sep 22, 2014

Which VTK version do you use?

Paraview works (build against VTK 5.10 and VTK 6.1)

@markus-stoll
Copy link
Author

5.9 (and 6.1 in a few minutes)

@markus-stoll
Copy link
Author

its a 5.9 vs 6.1 problem - give me a few minutes...

@markus-stoll
Copy link
Author

fixed - MiscMeshOperatorsExample works with vtk 6.1 now.
eeb42be

@wadoon
Copy link
Member

wadoon commented Sep 22, 2014

bin/MiscMeshOperatorsExample executes successfully on Linux

@markus-stoll
Copy link
Author

thanks - the remaining issues #83 #84 #85 #87 are not related to this changes. I will merge the more_parameters branch back to Master.
I wil start a new branch to clean up the vtkWriters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants