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.

Updating volume representation parameters

See original GitHub issue

Greetings,

I am able to generate a volume from a cube file like this:

      const parsed = await molstar.dataFormats
         .get("cube")
         ?.parse(molstar, _data);

      const repr = molstar.build();

      repr.to(parsed.volume.ref).apply(
        StateTransforms.Representation.VolumeRepresentation3D,
        createVolumeRepresentationParams(molstar, firstVolume.data, {
          type: "isosurface",
          typeParams: {
            visuals: [defaultVolumeParams.visuals],
            alpha: defaultVolumeParams.alpha,
            isoValue: Volume.adjustedIsoValue(
              volumeData,
              defaultVolumeParams.isoValue,
              "relative"
            ),
          },
          color: "uniform",
          colorParams: { value: defaultVolumeParams.color as Color },
        })
      );

      await repr.commit();

I keep parsed.volume.ref in a separate list so that I can access the state object later. How can I update the representation shown above?

Thanks.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dsehnalcommented, Jul 8, 2022
  • selector is a pointer to the current cell when building the state tree
  • parsed.volume.ref is reference to the volume data, not the representation, these are different things.
1reaction
dsehnalcommented, Jul 8, 2022
const representation = repr.to(parsed.volume.ref).apply(
        StateTransforms.Representation.VolumeRepresentation3D,
       ... 
).selector;

await plugin.build().to(representation).update(createVolumeRepresentationParams(...)).commit();
Read more comments on GitHub >

github_iconTop Results From Across the Web

UPDATE VOLUME - IBM
Specifies the status of volumes to be updated. Use this parameter to restrict the update to volumes that have a specified status. This...
Read more >
Segmentations - 3D Slicer documentation - Read the Docs
To update a representation (re-create from the master representation) using custom conversion path or parameters, click the “Update” button in the ...
Read more >
Representation Components | Dash for Python Documentation
In VTK a representation is composed of an Actor, a Mapper and a Property. Each of those objects can be configured using the...
Read more >
Views And Representations - ParaQ Wiki - ParaView
Background. Views and their consorts, representations, have been the most complex components of the ParaView visualization pipeline.
Read more >
NeuralVDB: High-resolution Sparse Volume Representation ...
While NanoVDB improves on OpenVDB by offering in-core variable bit-rate quantization of the sparse values, the compression ratio of NanoVDB ...
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