OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.32k stars 3.35k forks source link

How to add 3D button with its features #2394

Closed MongiBr closed 1 year ago

MongiBr commented 3 years ago

I need to add a button 3d to Ohif viewer app vtk viewport mpr2D button i want to change it to 3D Button Someone help me please!

FMCalisto commented 1 year ago

To adapt this to your specific code, you would need to implement the VTKVolumeRenderingExample class and make it call from a new button, then duplicate the event from 2D and adapt it for the 3D view. In fact, @ArturRod provides further details in their comment on this issue.

FMCalisto commented 1 year ago

Hello, can anybody help me to implement volume 3D in Ohif Viewer 3?

Implementing 3D volume rendering in OHIF Viewer 3 can be a complex task, but it is certainly possible. Here are some general steps you can follow:

  1. Add a new toolbar button to trigger the 3D volume rendering functionality.
  2. Create a new command that will handle the 3D volume rendering. This command should first retrieve the necessary image data from the DICOM server, and then use a library like VTK.js to render the 3D volume.
  3. Once the 3D volume is rendered, you can replace the 2D viewport with the 3D viewport in the viewer. This can be done by adding a new viewport to the viewer layout, or by replacing an existing viewport.
  4. You may also want to add additional functionality to the 3D viewport, such as the ability to adjust the opacity or color mapping of the volume, or to slice through the volume along arbitrary planes.

Note that this is just a general outline, and the specifics of implementing 3D volume rendering in OHIF Viewer 3 will depend on your specific use case and the libraries and technologies you choose to use. It may be helpful to review the documentation and code of other OHIF plugins that provide 3D volume rendering functionality to see how they approach the problem.

leroyhub commented 1 year ago

@ArturRod I need to add length measurement button to Vtkjs extension on Ohif viewer v4 in vtk viewport mpr2D toolbar Button menu using VtkDistanceWidget. VtkDistanceWidget Example: https://kitware.github.io/vtk-js/examples/DistanceWidget.html or can i duplicate cornerstone extension module toolbar button (length) to Vtk mpr2D toolbar Button menu help me please!

ArturRod commented 1 year ago

Hi, @leroyhub It would be nice to implement this in the future. Currently I do not have the time, but I have seen that it does not seem very complicated to implement. The only thing to update in OHIF to the latest version of vtk and try as in the example shown.

sedghi commented 1 year ago

Right now you can launch 3D view from hanging protocol https://viewer.ohif.org/viewer?StudyInstanceUIDs=2.16.840.1.114362.1.11972228.22789312658.616067305.306.2&hangingprotocolId=mprAnd3DVolumeViewport

But we have plan to add it to the UI soon

liujun1998-liu commented 11 months ago

I keep saying Render3D is undefined? @ArturRod

liujun1998-liu commented 11 months ago

Why verify this link? My OHIF is a dcm file loaded via json. ![Uploading 1700907265315.jpg…]()

liujun1998-liu commented 11 months ago

I had this problem。 7451566950c09ddbec2f23e47d17435 ![Uploading 43506dd2634beb049e4256c885ebb87.png…]()

sedghi commented 11 months ago

Your files are not getting uploaded properly

CleanShot 2023-11-27 at 08 27 57

liujun1998-liu commented 11 months ago

1 2 Prompt me access failure? https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs

liujun1998-liu commented 11 months ago

Loading 3D feature requirements Visit this link?