Coder Social home page Coder Social logo

3D Stl file Open Does not work about weasis HOT 6 CLOSED

nroduit avatar nroduit commented on June 9, 2024
3D Stl file Open Does not work

from weasis.

Comments (6)

nroduit avatar nroduit commented on June 9, 2024

Weasis accept to load any encapsulated DICOM but it will map to a system application associated with the file extension.

It would be possible to view the STL file with the OpenCV library integrated into Weasis, but it will require some integration effort.

Currently, some major features with a high priority must be implemented and the resources on this project are very limited. So we need contributors to implement this kind of features.

from weasis.

marcheschi avatar marcheschi commented on June 9, 2024

Hi
Thank you for your reply,
I installed meshlab on my linux but it seems that weasis does not call meshlab (with xdg-open).
So I added application/octet-stream (this is how xdg-open recognize the file ) to meshlab.desktop and I did a:

sudo xdg-mime default meshlab.desktop application/octet-stream

I added a workaround with a bash script to call a proper renamed .stl file because meshlab does not open tmp files.
In the end I succeeded in open the file.

This is tricky, maybe could be useful an option in preferences in order to open a specific mime-type with the right executable.
Thank you
Paolo

from weasis.

nroduit avatar nroduit commented on June 9, 2024

It wasn't correct what I said. Weasis try to open the default application associated with the mime type defined in the DICOM (in your case: (0042,0012) [LO] MIMETypeOfEncapsulatedDocument: model/stl).

So you need an application that registers the mime type "model/stl".

from weasis.

marcheschi avatar marcheschi commented on June 9, 2024

Hi
The stl file is not recognized by xdg-open as model/stl but instead as application/octet-stream

$ xdg-mime query filetype stl_tac_binary.stl
application/octet-stream

Paolo

from weasis.

nroduit avatar nroduit commented on June 9, 2024

Yes but application/octet-stream is something generic.

I miss something, the model/stl mime type has been registered recently by the DICOM standard, see https://www.iana.org/assignments/media-types/model/stl

Currently the stl file is extracted with an .tmp extension because model/stl is not defined here. I will add model/stl to the list so the extracted file will have the .stl extension.

from weasis.

marcheschi avatar marcheschi commented on June 9, 2024

Yes I agree.
So I have created a .local/share/mime/packages/application-stl.xml
<?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="application/stl"> <comment>stl 3d file</comment> <icon name="application-stl"/> <glob-deleteall/> <glob pattern="*.stl"/> </mime-type> </mime-info>
Installed it with:
xdg-mime install ~/.local/share/mime/packages/application-stl.xml

Now
$ xdg-mime query filetype stl_tac_binary.stl
application/stl

Now this is correct.

Your modification of weasis will solve the problem of Meshlab.

Thank you

Paolo

from weasis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.