new dicom([manager])

It is typically used to load a DICOM image. Use loading manager for advanced usage, such as multiple files handling.

Demo: https://fnndsc.github.io/vjs#loader_dicom

Example

var files = ['/data/dcm/fruit'];

// Instantiate a dicom loader
var dicomLoader = new VJS.loaders.dicom();

// load a resource
loader.load(
  // resource URL
  files[0],
  // Function when resource is loaded
  function(object) {
    //scene.add( object );
    window.console.log(object);
  }
);

Parameter

Name Type Optional Description

manager

THREE.DefaultLoadingManager

Yes

Manager for advanced users.

Methods

public
load(url, onLoad, onProgress, onError) → Array of Promise

Load target file and attach necessary callbacks.

Parameters

Name Type Optional Description

url

string

 

Url of the file to be pulled.

onLoad

function()

 

On load callback, after response has been parsed by VJS.loaders.dicom.parse.

onProgress

function()

 

On progress callback.

onError

function()

 

On error callback.

To do
Might want to implement onError extra layer like for "onLoad".
Returns

Array of Promise Loading sequence for each file.

public
parse(response) → VJS.Helper.Image

Parse the response and returned a well formatted VJS Image Helper;

Parameter

Name Type Optional Description

response

arraybuffer

 

Data to be parsed.

Returns

VJS.Helper.Image