question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

volume rendering up to a certain slice

See original GitHub issue

I was playing around with another cool feature, so I have the following slice view with the volume loader image It would be very cool to be able to combine this with the volumerendering, so that the volumerender only shows up to the the slice indicated by the volume loader slice index (presumably the Yaxis, but any could be fine). Since the volumerendering is quite heavy on the pc, this would reduce the load and also increase the usefulness, since it can be used to look “inside” certain parts of the scan.

Unfortunately, I’m not very exprienced with threejs/3D in general. But I have tried and look at the AMI code to see what might make this possible; inside helpers.volumerendering.js the following code

this._uniforms.uDataDimensions.value = [this._stack.dimensionsIJK.x,
                                                this._stack.dimensionsIJK.y,
                                                this._stack.dimensionsIJK.z];

If instead of the true stack dimensions, this was passed the dimensions of the stack up to the slice, and was updated using the lut gui (or whatever other gui) whenever the slice index changed, would that show only the volumerender up to the slice index and not further?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
NicolasRannoucommented, Dec 1, 2016

Yes window width/level are available - https://github.com/FNNDSC/ami/blob/dev/src/shaders/shaders.vr.uniform.js#L29-L34

It could also be related to the LUT that you are passing to the VR.helper. See [opacity] in the VR example: https://fnndsc.github.io/ami/#vr_singlepass

Finally the VR shader will need extra work to support to nicely mix slices/meshes inside the visualization.

1reaction
NicolasRannoucommented, Nov 30, 2016

@l0uch3 try updating “vrHelper. uniforms.uWorldBBox.value = value;”

var dimensionSlice = stackFolder.add(vrHelper.stack.dimensionsIJK, 'x', 0, stack.dimensionsIJK.x).step(1);
    dimensionSlice.onChange(function (value) {
        if (vrHelper.stack.dimensionsIJK) {
           vrHelper.stack.dimensionsIJK.x = value;
           vrHelper. uniforms.uWorldBBox.value = vrHelper.stack.worldBoundingBox();
        }
    });

There may be a couple more things to be figured out but could already kind of work 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Volume rendering - 3D Slicer documentation - Read the Docs
Render different volumes in two views¶ · Go to Volume Rendering module · Open the “Inputs” section · Select the first volume ·...
Read more >
How to set volume rendering color same as in slices? - Support
Hi, I have loaded RGB compatible '.dcm' slices into the 3D slicer. I am able to get the slices in the RGB format...
Read more >
Volume rendering with slice compositing - Observable
Slice compositing is a relatively simple technique for rendering 3d scalar fields. The idea is to composite semi-transparent slices of the volume from...
Read more >
Volume Rendering with Array of Slices - YouTube
The array of slices Tip and Trick is enhanced using the merge_fields and adjust_transparency modules to create a volume rendering effect ...
Read more >
3D Slicer - Volume Rendering and Crop Volume - YouTube
You will also learn how to load the Volume Rendering Module, select presets, and create a new cropped volume using the Crop Volume...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found