2.2.1 • Published 5 months ago

copper3d v2.2.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

copper3d

NPM Package Read the Docs Copper3d Examples NRRD_Segmentation_Tool example MedTech Heart example

A 3d visualisation package base on threejs provides multiple scenes and Nrrd image load funtion.

Documentation:

https://copper3d-visualisation.readthedocs.io/en/latest/

Previous versions

Old: https://www.npmjs.com/package/copper3d_visualisation Very old: https://www.npmjs.com/package/gltfloader-plugin-test

Example

Pick model with Gltfloader

Copper3d_examples

Useage

  • Load demo
import * as Copper from "copper3d";
import { getCurrentInstance, onMounted } from "vue";
let refs = null;
let appRenderer;
onMounted(() => {
  let { $refs } = (getCurrentInstance() as any).proxy;
  refs = $refs;
  const bg: HTMLDivElement = refs.classfy;
  appRenderer = new Copper.copperRenderer(bg);
  const scene = appRenderer.getCurrentScene();
  scene.createDemoMesh();
  appRenderer.animate();
});
  • Add options (curently only control gui)
appRenderer = new Copper.copperRenderer(bg, { guiOpen: true });
  • Load multiple scenes with gltf-loader
import * as Copper from "copper3d";
import { getCurrentInstance, onMounted } from "vue";

let refs = null;
let appRenderer;
onMounted(() => {
  let { $refs } = (getCurrentInstance() as any).proxy;
  refs = $refs;
  const bg: HTMLDivElement = refs.classfy;
  appRenderer = new Copper.copperRenderer(bg);
  appRenderer.animate();
  loadModel("/Healthy.glb", "health");
});

function loadModel(url, name) {
  let scene1 = appRenderer.getSceneByName(name);
  if (scene1 == undefined) {
    const scene1 = appRenderer.createScene(name);
    appRenderer.setCurrentScene(scene1);
    scene1.loadViewUrl("/noInfarct_view.json");
    scene1.loadGltf(url);
  } else {
    appRenderer.setCurrentScene(scene1);
  }
}

Viewdata Structure

 CameraViewPoint {
  nearPlane: number = 0.1;
  farPlane: number = 2000.0;
  eyePosition: Array<number> = [0.0, 0.0, 0.0];
  targetPosition: Array<number> = [0.0, 0.0, 0.0];
  upVector: Array<number> = [0.0, 1.0, 0.0];
}

Acknowledgements

Special thanks to Duke University dataset provides these awsome MRI data!!!

2.2.1

5 months ago

2.2.0

6 months ago

2.1.3

6 months ago

2.1.2

7 months ago

2.1.1

9 months ago

2.1.0

9 months ago

2.0.9

1 year ago

2.0.8

2 years ago

2.0.7

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.6

2 years ago

2.0.1

2 years ago

1.15.21

2 years ago

1.15.22

2 years ago

1.15.23

2 years ago

1.15.18

2 years ago

1.15.17

2 years ago

1.15.20

2 years ago

1.15.14

2 years ago

1.15.15

2 years ago

1.15.16

2 years ago

1.15.0

2 years ago

1.15.4

2 years ago

1.15.3

2 years ago

1.15.2

2 years ago

1.15.1

2 years ago

1.15.10

2 years ago

1.15.8

2 years ago

1.15.11

2 years ago

1.15.7

2 years ago

1.15.12

2 years ago

1.15.6

2 years ago

1.15.13

2 years ago

1.15.5

2 years ago

1.15.9

2 years ago

0.0.3

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago