dwv 0.32.2 → 0.32.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dwv.d.ts CHANGED
@@ -18,9 +18,9 @@ export declare function addTagsToDictionary(group: string, tags: object): void;
18
18
  * // create the dwv app
19
19
  * const app = new dwv.App();
20
20
  * // initialise
21
- * const viewConfig0 = new ViewConfig('layerGroup0');
21
+ * const viewConfig0 = new dwv.ViewConfig('layerGroup0');
22
22
  * const viewConfigs = {'*': [viewConfig0]};
23
- * const options = new AppOptions(viewConfigs);
23
+ * const options = new dwv.AppOptions(viewConfigs);
24
24
  * app.init(options);
25
25
  * // load dicom data
26
26
  * app.loadURLs([
@@ -170,9 +170,9 @@ export declare class App {
170
170
  * // create the dwv app
171
171
  * const app = new dwv.App();
172
172
  * // initialise
173
- * const viewConfig0 = new ViewConfig('layerGroup0');
173
+ * const viewConfig0 = new dwv.ViewConfig('layerGroup0');
174
174
  * const viewConfigs = {'*': [viewConfig0]};
175
- * const options = new AppOptions(viewConfigs);
175
+ * const options = new dwv.AppOptions(viewConfigs);
176
176
  * options.viewOnFirstLoadItem = false;
177
177
  * app.init(options);
178
178
  * // render button
@@ -721,18 +721,24 @@ export declare class DicomParser {
721
721
  * DICOM writer.
722
722
  *
723
723
  * @example
724
+ * // add link to html
725
+ * const link = document.createElement("a");
726
+ * link.appendChild(document.createTextNode("download"));
727
+ * const div = document.getElementById("dwv");
728
+ * div.appendChild(link);
724
729
  * // XMLHttpRequest onload callback
725
730
  * const onload = function (event) {
726
- * const parser = new DicomParser();
731
+ * const parser = new dwv.DicomParser();
727
732
  * parser.parse(event.target.response);
728
- * // create writer with parser data elements
729
- * const writer = new DicomWriter(parser.getDicomElements());
730
- * // create modified buffer and put it in a Blol
731
- * const blob = new Blob([writer.getBuffer()], {type: 'application/dicom'});
732
- * // example download link
733
- * const element = document.getElementById("download");
734
- * element.href = URL.createObjectURL(blob);
735
- * element.download = "anonym.dcm";
733
+ * // create writer
734
+ * const writer = new dwv.DicomWriter();
735
+ * // get buffer using default rules
736
+ * const dicomBuffer = writer.getBuffer(parser.getDicomElements());
737
+ * // create blob
738
+ * const blob = new Blob([dicomBuffer], {type: 'application/dicom'});
739
+ * // add blob to download link
740
+ * link.href = URL.createObjectURL(blob);
741
+ * link.download = "anonym.dcm";
736
742
  * };
737
743
  * // DICOM file request
738
744
  * const request = new XMLHttpRequest();
@@ -2832,9 +2838,9 @@ export declare class Vector3D {
2832
2838
  * const dicomParser = new dwv.DicomParser();
2833
2839
  * dicomParser.parse(event.target.response);
2834
2840
  * // create the image object
2835
- * const image = createImage(dicomParser.getDicomElements());
2841
+ * const image = dwv.createImage(dicomParser.getDicomElements());
2836
2842
  * // create the view
2837
- * const view = createView(dicomParser.getDicomElements(), image);
2843
+ * const view = dwv.createView(dicomParser.getDicomElements(), image);
2838
2844
  * // setup canvas
2839
2845
  * const canvas = document.createElement('canvas');
2840
2846
  * canvas.width = 256;