|
21 | 21 | <script src="https://unpkg.com/@cornerstonejs/codec-charls/dist/charlsjs.js"></script> |
22 | 22 |
|
23 | 23 | <script src="https://unpkg.com/dicomweb-client"></script> |
24 | | - <script src="https://unpkg.com/dicom-microscopy-viewer"></script> |
| 24 | + <script src="https://unpkg.com/dicom-microscopy-viewer"></script> |
| 25 | + |
25 | 26 | <!-- enable for testing locally |
26 | 27 | <script src="../../node_modules/dicomweb-client/build/dicomweb-client.js"></script> |
27 | 28 | <script src="../../build/dicom-microscopy-viewer.js"></script> |
28 | 29 | !--> |
| 30 | + |
29 | 31 | <script> |
30 | 32 | var colorPicker; |
31 | 33 | var channelToggle; |
|
46 | 48 | const thresholdValues = [minValue, 255.]; |
47 | 49 | const blendingInformation = { |
48 | 50 | thresholdValues : thresholdValues, |
49 | | - opticalPathID : `15`, |
| 51 | + opticalPathIdentifier : `15`, |
50 | 52 | }; |
51 | 53 | viewer.setBlendingInformation(blendingInformation); |
52 | 54 | } |
|
59 | 61 | parseInt(hexColor.substr(5, 2), 16) / 255.]; |
60 | 62 | const blendingInformation = { |
61 | 63 | color : color, |
62 | | - opticalPathID : `15`, |
| 64 | + opticalPathIdentifier : `15`, |
63 | 65 | }; |
64 | 66 | viewer.setBlendingInformation(blendingInformation); |
65 | 67 | } |
66 | 68 |
|
67 | 69 | function updateChannelToggle() { |
68 | | - const opticalPathID = `15`; |
| 70 | + const OpticalPathIdentifier = `15`; |
69 | 71 | if(channelToggle.checked) { |
70 | | - viewer.activateOpticalPath(opticalPathID); |
71 | | - viewer.showOpticalPath(opticalPathID); |
| 72 | + viewer.activateOpticalPath(OpticalPathIdentifier); |
| 73 | + viewer.showOpticalPath(OpticalPathIdentifier); |
72 | 74 | } else { |
73 | | - viewer.deactivateOpticalPath(opticalPathID); |
| 75 | + viewer.deactivateOpticalPath(OpticalPathIdentifier); |
74 | 76 | } |
75 | 77 | } |
76 | 78 |
|
77 | | - const url = 'http://34.68.90.36/'; |
| 79 | + const url = 'http://34.68.90.36/'; |
78 | 80 | const client = new DICOMwebClient.api.DICOMwebClient({url}); |
79 | | - const studyInstanceUID = '1.3.6.1.4.1.5962.99.1.2103930081.1286074986.1595536829665.3.0'; |
| 81 | + const studyInstanceUID = '1.3.6.1.4.1.5962.99.1.3456320082.756362073.1622659023442.3.0'; |
80 | 82 | const seriesInstanceUIDOne = '1.3.6.1.4.1.5962.1.1.0.0.0.1595262375.18986.1'; |
81 | 83 | const seriesInstanceUIDTwo = '1.3.6.1.4.1.5962.1.1.0.0.0.1595262375.18986.15'; |
82 | 84 | const seriesInstanceUIDThree = '1.3.6.1.4.1.5962.1.1.0.0.0.1595262375.18986.35'; |
|
119 | 121 | color: [0.,0.5,0.5], |
120 | 122 | opacity: 1.0, |
121 | 123 | thresholdValues: [125., 255.], |
| 124 | + limitValues:[0, 255.], |
122 | 125 | visible: true, |
123 | 126 | }); |
124 | 127 | const BITwo = new DICOMMicroscopyViewer.metadata.BlendingInformation({ |
125 | 128 | opticalPathIdentifier: `1`, |
126 | 129 | color: [0.5, 0.5, 0.], |
127 | 130 | opacity: 1.0, |
128 | 131 | thresholdValues: [0., 255.], |
| 132 | + limitValues:[0, 255.], |
129 | 133 | visible: true, |
130 | 134 | }); |
131 | 135 | const BIThree = new DICOMMicroscopyViewer.metadata.BlendingInformation({ |
132 | 136 | opticalPathIdentifier: `15`, |
133 | 137 | color: [1, 0., 0.], |
134 | 138 | opacity: 1.0, |
135 | 139 | thresholdValues: [30., 255.], |
| 140 | + limitValues:[0, 255.], |
136 | 141 | visible: true, |
137 | 142 | }); |
138 | 143 |
|
139 | 144 | const viewer = new DICOMMicroscopyViewer.api.VLWholeSlideMicroscopyImageViewer({ |
140 | 145 | client, |
141 | 146 | metadata, |
142 | 147 | blendingInformation: [BIOne, BITwo, BIThree], |
143 | | - controls: ['fullscreen', 'zoom'] |
| 148 | + controls: ['fullscreen', 'overview', 'zoom'] |
144 | 149 | }); |
145 | 150 |
|
146 | 151 | const container = document.getElementById("dicomImage"); |
|
0 commit comments