TrakEM2 pipes -> CATMAID meshes

11 views
Skip to first unread message

Greg Jefferis

unread,
Mar 7, 2019, 5:54:55 PM3/7/19
to <catmaid@googlegroups.com>
Dear Colleagues, Can anyone recommend a strategy to import TrakEM2 pipes into CATMAID meshes? Many thanks, Greg.

--
Gregory Jefferis, PhD
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK




Albert Cardona

unread,
Mar 7, 2019, 7:38:47 PM3/7/19
to cat...@googlegroups.com
Hi Greg,

TrakEM2 pipes can be exported as meshes in wavefront or DXF format. And IIRC wavefront .obj files can be imported into CATMAID.

Best,

Albert 
--
You received this message because you are subscribed to the Google Groups "CATMAID" group.
To unsubscribe from this group and stop receiving emails from it, send an email to catmaid+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Greg Jefferis

unread,
Mar 10, 2019, 4:56:18 PM3/10/19
to cat...@googlegroups.com, Albert Cardona
Dear Albert,


On 8 Mar 2019, at 00:38, Albert Cardona <sapr...@gmail.com> wrote:

TrakEM2 pipes can be exported as meshes in wavefront or DXF format. And IIRC wavefront .obj files can be imported into CATMAID.

Thanks a lot for the tip. When I try to show the pipes in the 3D viewer, which is necessary for export according to:


I get messages like:

Skipping non-visible node ALT #1003
Reset 3D view if not within field of view!

Do you have any diagnosis? Is there a place where I can follow up what seems to be a TrakEM2 error? In theory this a project that is working well for someone else.

With many thanks,

Greg.

Albert Cardona

unread,
Mar 11, 2019, 12:09:35 AM3/11/19
to Greg Jefferis, cat...@googlegroups.com
Hi Greg,

It's a java 8 issue in some OSes. Using java 6 in eg linux or windows solves it.

Or, create the meshes programmatically without going via the 3D Viewer. It's the generateTriangles function in the ini.trakem.display.Displayable objects (eg a pipe), and the wavefront exporter is in the MeshMaker class in the 3D Viewer jar.

If you need a specific script I could make one tomorrow.

Best,

Albert

Gregory Jefferis

unread,
Mar 11, 2019, 4:11:28 AM3/11/19
to Albert Cardona, cat...@googlegroups.com
Dear Albert,

Many thanks for the explanation. It would be really helpful if you could share a short script to get me going. I may need to do this a few times and/or group the different pipes as part of the export process. I can share the project offline if that would be helpful. 

Best wishes,

Greg.

PS the best place for trakem2 questions these days? 

Albert Cardona

unread,
Mar 11, 2019, 2:27:57 PM3/11/19
to Gregory Jefferis, <catmaid@googlegroups.com>
Hi Greg,

This script below works well most of the time to address the issue of
meshes not showing in the 3D Viewer.
There are various functions, I've enabled the one you want. Select a
node in the Project Tree, and all the meshes of nodes nested under it
will be exported into a single .obj file along with a .mtl file.

https://forum.image.sc/t/addressing-issues-with-trakem2-loading-meshes-into-the-3d-viewer-under-java-8/23721

Haven't tested some functions which I added new now (the ones for
exporting to a file). If there's any typo it should be straightforward
to fix.

Let me know.

Albert

Missatge de Gregory Jefferis <jeff...@gmail.com> del dia dl., 11 de
març 2019 a les 8:11:

Gregory Jefferis

unread,
Mar 11, 2019, 6:31:30 PM3/11/19
to cat...@googlegroups.com
Thanks so much, Albert — I didn’t get to try today (short day) but I’m sure I can work something out based on this. All the best, G.

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages