Ticket #9770 (assigned)

Opened 6 years ago

Last modified 5 years ago

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

IDF_to_PLY.py (5.5 KB) - added by Anders Markvardsen 6 years ago.
IDF_to_PLY_v2.py (5.6 KB) - added by Anders Markvardsen 6 years ago.
updated version of IDF_to_PLY.py

Change History

Changed 6 years ago by Anders Markvardsen

Changed 6 years ago by Anders Markvardsen

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:

  1. 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
  1. Similar to 1, but expose to python c++ triangulisation, and finish algorithm in python
  1. 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)

comment:3 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned

comment:4 Changed 6 years ago by Anders Markvardsen

  • Cc pkwi@…, T, Torben.Nielsen@… added

Peter and Torben, I have cc'ed you in on this ticket since you may find it interesting. It is an idea of Emmanuel

comment:5 Changed 6 years ago by Anders Markvardsen

  • Milestone changed from Release 3.3 to Backlog

comment:6 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10612

Note: See TracTickets for help on using tickets.