Ticket #9770 (assigned)
Investigation for saving IDF into OFF or PLY format
Reported by: | Anders Markvardsen | Owned by: | Anders Markvardsen |
---|---|---|---|
Priority: | major | Milestone: | Backlog |
Component: | Tools | Keywords: | |
Cc: | farhi@…, pkwi@…, T, Torben.Nielsen@… | Blocked By: | |
Blocking: | Tester: |
Description
Emmanuel Farhi has started the process of creating an algorithm for transforming an IDF to PLY format, see attached IDF_to_PLY.py.
His idea is that if such a transformation is available it could open up an alternative door for exporting Mantid IDFs into instrument simulation software like McStas.
In this ticket work with Emmanuel to complite such an algorithm
Attachments
Change History
Changed 6 years ago by Anders Markvardsen
- Attachment IDF_to_PLY_v2.py added
updated version of IDF_to_PLY.py
comment:1 Changed 6 years ago by Anders Markvardsen
Attached IDF_to_PLY_v2.py is updated version of IDF_to_PLY.py done by one week work experience student Sandy Steele.
The updated version can out .ply and Sandy demonstrated that in could be read into 3D visualisation package Blender.
From an internet search he found that the .ply format appears to be considerably more comment than the .off
comment:2 Changed 6 years ago by Anders Markvardsen
The current .ply format appears to be of limitted use, judging from conversing HET_Definition.xml to .ply, because it uses the bounding box of each cylinder detector in this case.
There are at least three possibilities for moving this forward:
- Rewrite algorithm in C++, find the open cascade code that creates the triangulisation (and which in Mantid is outputted in .vtp file), and use this together with detector positions to create .ply file
- Similar to 1, but expose to python c++ triangulisation, and finish algorithm in python
- Looking into Mantid reading .vtp file (a 'modified' .vtk format, which when tried paraview cannot read) which stores triangulisaiton of pixel shapes and combined with detector positions can provide the info for .ply file
To me options 2 and 1 sounds best (here just mentioned the options forward I can think of)