Open Anatomy Export and 3dviewer.net with URL

Open Anatomy Export of a 3D Slicer segmentation (gltf file) and drop the file in the browser window of 3Dviewer.net is a cool feature for sharing results in a working group.

Has somebody made 3dviewer work with an URL to a file in a shared Google Drive folder yet?

I use this functionality as a routine. It’s really good to share the 3D models with the surgical team and even open in the operating room.
I use Dropbox to store the .gltf and generate the link. Never used G drive.
There is some dificulties in hiding parts by the cell phone. We need to use desktop mode in the browser. Also the 3D model is somewhat undefined, without texture.

3 Likes

I’m not sure if texture are needed to make the shapes a bit better defined. It would be nice if you could check if you can get the desired result by switching to PBR interpolation and tuning the shading parameters:

  • Export the segmentation to models
  • Go to Models module
  • Choose a model that you want to improve the appearance of
  • Open Display / 3D Display / Advanced section
  • Set Interpolation → PBR and adjust Diffuse, Metallic, Roughness parameters
  • Export the model folder (not the original segmentation) using OpenAnatomy export

If we find that this results in significant improvement in appearance then we can expose some more shading settings in OpenAnatomy export (e.g., slider to make the models more or less shiny).

2 Likes

Thanks @lassoan ! I will try this later and post a feedback.

Just for illustrate, that is the actual result:



A patient with pulmonary sequestration that was operated last week.
It’s not a bad result but in the 3D Slicer itself we have a better image quality.

1 Like

Nice. But do you have Dropbox access enabled in your hospital intranet? The other users must have Dropbox accounts?

It’s not necessary that others users have any software instaled or dropbox account. I just send the link like that:

And they are able to open.

Most of time I open in my laptop because I need to connect in the robot console to use the Tilepro. Using the hospital wi-fi I never had any problems. However most of time I use the hospital open web (for guest and patients)… maybe if your hospital have some firewall block to Dropbox it’s possible that you have some difficulty.

3 Likes

You don’t need to have a dropbox account (as the receiving user). The data poster should be able to put in a place where the full URL of the model is visible. So that leaves out google drive and box. E.g., Gor_template_low_res.ply - Google Drive you can see the ply file, but if you paste this URL to 3D viewer like this

http://3dviewer.net/#model=https://drive.google.com/file/d/1mNiq3OMDU3q9Iab2UYdQ9jsyzQC_diap/view?usp=sharing

then 3Dviewer doesn’t display.

I don’t have dropbox subscription, but I find github to be sufficient. Eg:
`http://3dviewer.net/#model=https://github.com/SlicerMorph/SampleData/blob/master/baboon.gltf’

as long as you can live with 50MB file size restriction from the UI upload.

1 Like

Also I would encourage people to suggest Kitware to add load data from URL option to their Glance viewer.

Compared to 3Dviewer, you can embed volumes and other things in. Currently it works only with local data, or data posted to their cloud infrastructure.

3 Likes

GitHub would have been my next try, thanks. I can confirm your example works well. Where exactly do you upload your > 25 MB files in which UI? I get error messages in the GitHub Web interface if I drop files > 25 MB.

Looks like I was mistaken, the UI limits is indeed 25MB.
https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github#file-size-limits

But you can push more from command line…

For sharing within a hospital VPN, you may use any file server in the hospital that can serve files via HTTP. You don’t need to use the hosted http://3dviewer.net/ viewer but it should be easy to set up GitHub - kovacsv/Online3DViewer: A solution to visualize and explore 3D models in your browser. on the same file server.

1 Like

We can have a great improve performing that adjusts. Thanks for the advice @lassoan .
There still is a loose in quality. However its a better option.


Slicer


Online 3D Viewer

1 Like

Is there any tutorial for final users ? Tks

Probably the issue is just that the default image-based lighting in 3dviewer.net is a too bright. I’ve created an issue in the SlicerOpenAnatomy extension and described a few tips that may solve your remaining lighting issues:

1 Like

Hi there, Glance does actually support loading remote files from the URL: Loading Files | Glance

You can see a demonstration of this here: diskout.vtp

2 Likes

Doesn’t seem to work for me, at least for github. On 3D viewer:
https://kovacsv.hu/3dviewer.net/#model=https://github.com/SlicerMorph/SampleData/blob/master/Gor_template_low_res.ply

vs on glance

https://kitware.github.io/glance/app/?name=Gor_template_low_res.ply?url=https://github.com/SlicerMorph/SampleData/blob/master/Gor_template_low_res.ply

it would be also simpler if they construct a open URL button like 3D viewer does.

@muratmaga The following seems to work for me after giving it a URL download link for GitHub rather than the regular link to the file page.

Link:
https://kitware.github.io/glance/app/?name=Gor_template_low_res.ply&url=https://raw.githubusercontent.com/SlicerMorph/SampleData/master/Gor_template_low_res.ply

1 Like

3dviewer.net has two very important features that I cannot seem to find in Kitware Glance:

  • object hierarchy (select, expand/collapse, show/hide group of objects)
  • 3D picking (click in the 3D view to see its name, see where is it in the hierarchy, and adjust properties)

If these features could be added to Glance then it could become a useful web viewer for segmentations and atlases.

3D image volume/slice view rendering is a nice feature in Glance and although the 2D image slice viewer is very limited (there are no slice intersections, crosshair, etc.), this viewer is still better than most 3D web viewers, as they usually cannot display 3D image data at all.

3 Likes

Thanks for me as well. I still think they should do a open URL button and just simply parse the input URL on their end to construct it correctly.

Found a way to use 3Dviewer.net with data from an AWS S3 bucket and avoid the CORS error.

In “Permissions” of the S3 bucket

is a section

in which you can put

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "PUT",
            "POST",
            "DELETE"
        ],
        "AllowedOrigins": [
            "https://kovacsv.hu/3dviewer.net"
        ],
        "ExposeHeaders": []
    },
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "PUT",
            "POST",
            "DELETE"
        ],
        "AllowedOrigins": [
            "https://kovacsv.hu/3dviewer.net"
        ],
        "ExposeHeaders": []
    },
    {
        "AllowedHeaders": [],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]

so an URL like

https://kovacsv.hu/3dviewer.net/#model=https://rbummawsbucket.s3.eu-west-1.amazonaws.com/CTChest%20segmentation.gltf?response-content-disposition=inline&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEPD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJHMEUCIHkVcGi9QPtpow169oj6XyHlrKNTYsyqmF3Xi%2B0Eio%2BrAiEAghSOFXKeQprUoZQDpAHTVBWGYMZOFpgzB7jFw7%2BHPTkq5AIISRAAGgw4ODUzNDIxNDY2NTYiDB3%2FoAIGeYTBiVOhyyrBAq0j5FZzH1HE7Qi%2BCsXY1G6a0AvjXc0uoMT692NXeB%2FjJotVs2%2Fi1fWsaMkNYM0OUb9XppZKv3c4F1xurJoqpkR6x1ndliwSa9vvZXeEOHoV259Xb5MFPp6TU85qZSFJ4HAyEdkQu7NtQnSe%2F9exDA9aAB36GRUUfiA%2BYa8eztOZ%2Fdn5JItSiJIBF7Uq7VVmpBaiui5Fw3hoOFhB1c6qUpmgQ4QLAjDDmqC2Ja5TGmmrGSBIapxNaxZL8IpCe2JdV3sPmbyEt3b3%2F0VR9AR2dl4U6F4DsThJr5DUqKp1hPWBYbVkCEUykAq2X5I9p4woNMeS%2FWO6qso7mb07Q34PZXDXfqbt26%2FNyfudouAFsKwWhtWZ4Mx67qNZg5dI1QVXlyxTDqjMZtEJu5a4TT2eZIjTR8Ury9Rz2zSzElHrygeu5TDFquadBjqzAk9yE6c1kihDHtzs1s9QaUcRRENStAvw09fPfKFvzrAc5R3ZpoPWqmL2iQFIPz6efhcLfI%2F2%2FNhBtNYm6pvz9zLQt1Y2xRw2C8HLb%2Bmof9stS2jTzrIQ7VNcDATCsQ%2BitML2wncolYArIpgQlQAk7oinSUMx5iCB%2B55Ra36pyrDFwSFbnZpT8B9EZWywVUWHzcoN3Lq9epDAzRa%2BhlRtkwHIH%2Bi0rNhLLF0VK3D%2F%2FEeEXrxFtqiBOAwx5%2FPJSqNbpx34MHhcz%2FqMCMvZLGwTS9%2BucUwzSB9Jp6%2BV2lBqd4M7W5ja4PRXASUdwjbvQJFDMeYOznJ6BGvMCr7Ho544hnBdzROMCW%2Fk0dPN2FaRgYYJP6CpkMDHdNtFnvs3y60lK1DIGm1kYSfkCLkGnD%2FQQyv4K44%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230107T163256Z&X-Amz-SignedHeaders=host&X-Amz-Expires=43200&X-Amz-Credential=ASIA44IUBCBQAXFWWLMS%2F20230107%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=eb9693d9d5519b71b61a35fea20b36344d47157fcf7f01eeda0bbf07525d172a

would work.

The above demo link one of a 10 MB gltf file is only active for 12 h per definition on a non-public S3 bucket from now, which is great because afterward, it expires in case you would use half sensitive data. And it saves access costs.

3 Likes