mobie / mobie.github.io

1 stars 3 forks source link

Convert Amira transformations to MoBIE affine #112

Open tischi opened 1 month ago

tischi commented 1 month ago

Hi @martinschorb ,

Are you aware of documentation that would explain how to convert transformations (including rotations) as they appear in Amira to affine transformations that can be used in MoBIE?

In fact, I found this code.

Do you think that would cover most use-cases?

martinschorb commented 1 month ago

Hi,

this is a true pain, because the translations somehow are stored independently. I wrote a TCL script to extract them during a running Amira session, because you cannot really export them. AFAIR the pixel scaling can only be deferred from the data box size and the displayed bounding box size. That was a while ago, so I don´t really remember too much of it. https://github.com/martinschorb/mobie_import/blob/master/tform_export.rc

Then here is a Python to convert them into BDV-style: https://github.com/martinschorb/mobie_import/blob/master/amira2bdv.py

martinschorb commented 1 month ago

If I can interpret that correctly, the script you found only converts the parameters from a manual transform in Amira. If you use some auto-alignments it would not be able to catch them.