Skip to content

Commit

Permalink
Rename viewer class to DICOMMicroscopyViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
hackermd committed Aug 1, 2018
1 parent 589f09f commit a4792ce
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const url = 'http://localhost:8080/dicomweb';
const client = new DICOMwebClient.api.DICOMwebClient({url});
const studyInstanceUID = '1.2.3.4';
const seriesInstanceUID = '1.2.3.5';
const viewer = new DICOMMicroscopyViewer.api.MicroscopyViewer({
const viewer = new DICOMMicroscopyViewer.api.DICOMMicroscopyViewer({
client,
studyInstanceUID,
seriesInstanceUID
Expand Down
16 changes: 13 additions & 3 deletions build/dicom-microscopy-viewer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.MicroscopyViewer = {})));
(factory((global.DICOMMicroscopyViewer = {})));
}(this, (function (exports) { 'use strict';

/**
Expand Down Expand Up @@ -49441,15 +49441,25 @@
});
}

class MicroscopyViewer {
class DICOMMicroscopyViewer {

/*
* options:
* client - an instance of DICOMwebClient
* studyInstanceUID - DICOM Study Instance UID
* seriesInstanceUID - DICOM Study Instance UID
*/
constructor(options) {
this.client = options.client;
this.studyInstanceUID = options.studyInstanceUID;
this.seriesInstanceUID = options.seriesInstanceUID;
this.map = null;
}

/*
* options:
* container - name of an HTML document element
*/
render(options) {
console.log('render images using microscopy viewer');
const studyInstanceUID = this.studyInstanceUID;
Expand Down Expand Up @@ -49813,7 +49823,7 @@
}

let api = {
MicroscopyViewer,
DICOMMicroscopyViewer,
};

exports.api = api;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dicom-microscopy-viewer",
"version": "0.0.1",
"version": "0.0.2",
"description": "Web-based viewer for DICOM Visible Light Whole Slide Microscopy Images",
"main": "build/dicom-microscopy-viewer.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
{
file: 'build/dicom-microscopy-viewer.js',
format: 'umd',
name: 'MicroscopyViewer',
name: 'DICOMMicroscopyViewer',
sourceMap: true
},
],
Expand Down
4 changes: 2 additions & 2 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { getCenter } from 'ol/extent.js';
import { formatImageMetadata } from './metadata.js';


class MicroscopyViewer {
class DICOMMicroscopyViewer {

/*
* options:
Expand Down Expand Up @@ -406,4 +406,4 @@ class MicroscopyViewer {

}

export { MicroscopyViewer };
export { DICOMMicroscopyViewer };
4 changes: 2 additions & 2 deletions src/dicom-microscopy-viewer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MicroscopyViewer } from './api.js';
import { DICOMMicroscopyViewer } from './api.js';

let api = {
MicroscopyViewer,
DICOMMicroscopyViewer,
};

export { api };
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const chai = require('chai');
chai.should();

const dicomMicroscopyViewer = require('../build/dicom-microscopy-viewer.js');
const viewer = new dicomMicroscopyViewer.api.MicroscopyViewer({
const viewer = new dicomMicroscopyViewer.api.DICOMMicroscopyViewer({
client: 'foo',
studyInstanceUID: '1.2.3.4',
seriesInstanceUID: '1.2.3.5'
Expand Down

0 comments on commit a4792ce

Please sign in to comment.