dwv 0.33.0-beta.36 → 0.33.0-beta.37
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 +137 -45
- package/dist/dwv.min.js +1 -1
- package/dist/dwv.min.js.map +1 -1
- package/package.json +1 -1
package/dist/dwv.d.ts
CHANGED
|
@@ -602,6 +602,12 @@ export declare class AppOptions {
|
|
|
602
602
|
overlayConfig: object | undefined;
|
|
603
603
|
}
|
|
604
604
|
|
|
605
|
+
export declare namespace BLACK {
|
|
606
|
+
let r: number;
|
|
607
|
+
let g: number;
|
|
608
|
+
let b: number;
|
|
609
|
+
}
|
|
610
|
+
|
|
605
611
|
/**
|
|
606
612
|
* Build a multipart message.
|
|
607
613
|
* See: https://en.wikipedia.org/wiki/MIME#Multipart_messages
|
|
@@ -614,6 +620,56 @@ export declare class AppOptions {
|
|
|
614
620
|
*/
|
|
615
621
|
export declare function buildMultipart(parts: any[], boundary: string): Uint8Array;
|
|
616
622
|
|
|
623
|
+
/**
|
|
624
|
+
* Change segment colour command.
|
|
625
|
+
*/
|
|
626
|
+
export declare class ChangeSegmentColourCommand {
|
|
627
|
+
/**
|
|
628
|
+
* @param {Image} mask The mask image.
|
|
629
|
+
* @param {MaskSegment} segment The segment to modify.
|
|
630
|
+
* @param {RGB|number} newColour The new segment colour.
|
|
631
|
+
* @param {boolean} [silent] Whether to send a creation event or not.
|
|
632
|
+
*/
|
|
633
|
+
constructor(mask: Image_2, segment: MaskSegment, newColour: RGB | number, silent?: boolean);
|
|
634
|
+
/**
|
|
635
|
+
* Get the command name.
|
|
636
|
+
*
|
|
637
|
+
* @returns {string} The command name.
|
|
638
|
+
*/
|
|
639
|
+
getName(): string;
|
|
640
|
+
/**
|
|
641
|
+
* Check if a command is valid and can be executed.
|
|
642
|
+
*
|
|
643
|
+
* @returns {boolean} True if the command is valid.
|
|
644
|
+
*/
|
|
645
|
+
isValid(): boolean;
|
|
646
|
+
/**
|
|
647
|
+
* Execute the command.
|
|
648
|
+
*
|
|
649
|
+
* @fires ChangeSegmentColourCommand#changemasksegmentcolour
|
|
650
|
+
*/
|
|
651
|
+
execute(): void;
|
|
652
|
+
/**
|
|
653
|
+
* Undo the command.
|
|
654
|
+
*
|
|
655
|
+
* @fires ChangeSegmentColourCommand#changemasksegmentcolour
|
|
656
|
+
*/
|
|
657
|
+
undo(): void;
|
|
658
|
+
/**
|
|
659
|
+
* Handle an execute event.
|
|
660
|
+
*
|
|
661
|
+
* @param {object} _event The execute event with type and id.
|
|
662
|
+
*/
|
|
663
|
+
onExecute(_event: object): void;
|
|
664
|
+
/**
|
|
665
|
+
* Handle an undo event.
|
|
666
|
+
*
|
|
667
|
+
* @param {object} _event The undo event with type and id.
|
|
668
|
+
*/
|
|
669
|
+
onUndo(_event: object): void;
|
|
670
|
+
#private;
|
|
671
|
+
}
|
|
672
|
+
|
|
617
673
|
/**
|
|
618
674
|
* Colour map: red, green and blue components
|
|
619
675
|
* to associate with intensity values.
|
|
@@ -773,6 +829,55 @@ export declare namespace defaults {
|
|
|
773
829
|
};
|
|
774
830
|
}
|
|
775
831
|
|
|
832
|
+
/**
|
|
833
|
+
* Delete segment command.
|
|
834
|
+
*/
|
|
835
|
+
export declare class DeleteSegmentCommand {
|
|
836
|
+
/**
|
|
837
|
+
* @param {Image} mask The mask image.
|
|
838
|
+
* @param {MaskSegment} segment The segment to remove.
|
|
839
|
+
* @param {boolean} [silent] Whether to send a creation event or not.
|
|
840
|
+
*/
|
|
841
|
+
constructor(mask: Image_2, segment: MaskSegment, silent?: boolean);
|
|
842
|
+
/**
|
|
843
|
+
* Get the command name.
|
|
844
|
+
*
|
|
845
|
+
* @returns {string} The command name.
|
|
846
|
+
*/
|
|
847
|
+
getName(): string;
|
|
848
|
+
/**
|
|
849
|
+
* Check if a command is valid and can be executed.
|
|
850
|
+
*
|
|
851
|
+
* @returns {boolean} True if the command is valid.
|
|
852
|
+
*/
|
|
853
|
+
isValid(): boolean;
|
|
854
|
+
/**
|
|
855
|
+
* Execute the command.
|
|
856
|
+
*
|
|
857
|
+
* @fires DeleteSegmentCommand#masksegmentdelete
|
|
858
|
+
*/
|
|
859
|
+
execute(): void;
|
|
860
|
+
/**
|
|
861
|
+
* Undo the command.
|
|
862
|
+
*
|
|
863
|
+
* @fires DeleteSegmentCommand#masksegmentredraw
|
|
864
|
+
*/
|
|
865
|
+
undo(): void;
|
|
866
|
+
/**
|
|
867
|
+
* Handle an execute event.
|
|
868
|
+
*
|
|
869
|
+
* @param {object} _event The execute event with type and id.
|
|
870
|
+
*/
|
|
871
|
+
onExecute(_event: object): void;
|
|
872
|
+
/**
|
|
873
|
+
* Handle an undo event.
|
|
874
|
+
*
|
|
875
|
+
* @param {object} _event The undo event with type and id.
|
|
876
|
+
*/
|
|
877
|
+
onUndo(_event: object): void;
|
|
878
|
+
#private;
|
|
879
|
+
}
|
|
880
|
+
|
|
776
881
|
/**
|
|
777
882
|
* DICOM code: item of a basic code sequence.
|
|
778
883
|
*
|
|
@@ -2128,6 +2233,15 @@ export declare class Index {
|
|
|
2128
2233
|
#private;
|
|
2129
2234
|
}
|
|
2130
2235
|
|
|
2236
|
+
/**
|
|
2237
|
+
* Check if two rgb objects are equal.
|
|
2238
|
+
*
|
|
2239
|
+
* @param {RGB} c1 The first colour.
|
|
2240
|
+
* @param {RGB} c2 The second colour.
|
|
2241
|
+
* @returns {boolean} True if both colour are equal.
|
|
2242
|
+
*/
|
|
2243
|
+
export declare function isEqualRgb(c1: RGB, c2: RGB): boolean;
|
|
2244
|
+
|
|
2131
2245
|
/**
|
|
2132
2246
|
* CIE LAB value (L: [0, 100], a: [-128, 127], b: [-128, 127]) to
|
|
2133
2247
|
* unsigned int CIE LAB ([0, 65535]).
|
|
@@ -2588,7 +2702,9 @@ export declare class MaskSegment {
|
|
|
2588
2702
|
}
|
|
2589
2703
|
|
|
2590
2704
|
/**
|
|
2591
|
-
* Mask segment helper
|
|
2705
|
+
* Mask segment helper: helps handling the segments list,
|
|
2706
|
+
* but does *NOT* update the associated mask (use special commands
|
|
2707
|
+
* for that such as DeleteSegmentCommand, ChangeSegmentColourCommand...).
|
|
2592
2708
|
*/
|
|
2593
2709
|
export declare class MaskSegmentHelper {
|
|
2594
2710
|
/**
|
|
@@ -2596,7 +2712,7 @@ export declare class MaskSegmentHelper {
|
|
|
2596
2712
|
*/
|
|
2597
2713
|
constructor(mask: Image_2);
|
|
2598
2714
|
/**
|
|
2599
|
-
* Check if a segment is part of the
|
|
2715
|
+
* Check if a segment is part of the segments list.
|
|
2600
2716
|
*
|
|
2601
2717
|
* @param {number} segmentNumber The segment number.
|
|
2602
2718
|
* @returns {boolean} True if the segment is included.
|
|
@@ -2614,28 +2730,34 @@ export declare class MaskSegmentHelper {
|
|
|
2614
2730
|
* Get a segment from the inner segment list.
|
|
2615
2731
|
*
|
|
2616
2732
|
* @param {number} segmentNumber The segment number.
|
|
2617
|
-
* @returns {MaskSegment|undefined} The segment.
|
|
2733
|
+
* @returns {MaskSegment|undefined} The segment or undefined if not found.
|
|
2618
2734
|
*/
|
|
2619
2735
|
getSegment(segmentNumber: number): MaskSegment | undefined;
|
|
2620
2736
|
/**
|
|
2621
|
-
*
|
|
2737
|
+
* Add a segment to the segments list.
|
|
2622
2738
|
*
|
|
2623
|
-
* @
|
|
2739
|
+
* @param {MaskSegment} segment The segment to add.
|
|
2624
2740
|
*/
|
|
2625
|
-
|
|
2741
|
+
addSegment(segment: MaskSegment): void;
|
|
2626
2742
|
/**
|
|
2627
|
-
*
|
|
2743
|
+
* Remove a segment from the segments list.
|
|
2628
2744
|
*
|
|
2629
|
-
* @param {
|
|
2745
|
+
* @param {number} segmentNumber The segment number.
|
|
2630
2746
|
*/
|
|
2631
|
-
|
|
2747
|
+
removeSegment(segmentNumber: number): void;
|
|
2632
2748
|
/**
|
|
2633
|
-
*
|
|
2634
|
-
* TODO: not sure if needed...
|
|
2749
|
+
* Update a segment of the segments list.
|
|
2635
2750
|
*
|
|
2636
|
-
* @param {
|
|
2751
|
+
* @param {MaskSegment} segment The segment to update.
|
|
2637
2752
|
*/
|
|
2638
|
-
|
|
2753
|
+
updateSegment(segment: MaskSegment): void;
|
|
2754
|
+
#private;
|
|
2755
|
+
}
|
|
2756
|
+
|
|
2757
|
+
/**
|
|
2758
|
+
* Mask segment view helper: handles hidden segments.
|
|
2759
|
+
*/
|
|
2760
|
+
export declare class MaskSegmentViewHelper {
|
|
2639
2761
|
/**
|
|
2640
2762
|
* Check if a segment is in the hidden list.
|
|
2641
2763
|
*
|
|
@@ -2646,9 +2768,9 @@ export declare class MaskSegmentHelper {
|
|
|
2646
2768
|
/**
|
|
2647
2769
|
* Add a segment to the hidden list.
|
|
2648
2770
|
*
|
|
2649
|
-
* @param {
|
|
2771
|
+
* @param {MaskSegment} segment The segment to add.
|
|
2650
2772
|
*/
|
|
2651
|
-
addToHidden(
|
|
2773
|
+
addToHidden(segment: MaskSegment): void;
|
|
2652
2774
|
/**
|
|
2653
2775
|
* Remove a segment from the hidden list.
|
|
2654
2776
|
*
|
|
@@ -2667,18 +2789,6 @@ export declare class MaskSegmentHelper {
|
|
|
2667
2789
|
* @returns {alphaFn} The corresponding alpha function.
|
|
2668
2790
|
*/
|
|
2669
2791
|
getAlphaFunc(): (value: number[] | number, index: number) => number;
|
|
2670
|
-
/**
|
|
2671
|
-
* @callback eventFn@callback eventFn
|
|
2672
|
-
* @param {object} event The event.
|
|
2673
|
-
*/
|
|
2674
|
-
/**
|
|
2675
|
-
* Delete a segment.
|
|
2676
|
-
*
|
|
2677
|
-
* @param {number} segmentNumber The segment number.
|
|
2678
|
-
* @param {eventFn} cmdCallback The command event callback.
|
|
2679
|
-
* @param {Function} exeCallback The post execution callback.
|
|
2680
|
-
*/
|
|
2681
|
-
deleteSegment(segmentNumber: number, cmdCallback: (event: object) => any, exeCallback: Function): void;
|
|
2682
2792
|
#private;
|
|
2683
2793
|
}
|
|
2684
2794
|
|
|
@@ -4042,24 +4152,6 @@ export declare class ViewController {
|
|
|
4042
4152
|
* @returns {boolean} True if the associated image is a mask.
|
|
4043
4153
|
*/
|
|
4044
4154
|
isMask(): boolean;
|
|
4045
|
-
/**
|
|
4046
|
-
* Get the mask segment helper.
|
|
4047
|
-
*
|
|
4048
|
-
* @returns {MaskSegmentHelper} The helper.
|
|
4049
|
-
*/
|
|
4050
|
-
getMaskSegmentHelper(): MaskSegmentHelper;
|
|
4051
|
-
/**
|
|
4052
|
-
* Apply the hidden segments list by setting
|
|
4053
|
-
* the corresponding alpha function.
|
|
4054
|
-
*/
|
|
4055
|
-
applyHiddenSegments(): void;
|
|
4056
|
-
/**
|
|
4057
|
-
* Delete a segment.
|
|
4058
|
-
*
|
|
4059
|
-
* @param {number} segmentNumber The segment number.
|
|
4060
|
-
* @param {Function} exeCallback The post execution callback.
|
|
4061
|
-
*/
|
|
4062
|
-
deleteSegment(segmentNumber: number, exeCallback: Function): void;
|
|
4063
4155
|
/**
|
|
4064
4156
|
* Initialise the controller.
|
|
4065
4157
|
*/
|