|
1 | | -import { AnnotationGroup } from './annotation.js' |
| 1 | +import { |
| 2 | + AnnotationGroup, |
| 3 | + fetchGraphicData, |
| 4 | + fetchGraphicIndex, |
| 5 | + getCommonZCoordinate, |
| 6 | + getCoordinateDimensionality, |
| 7 | +} from './annotation.js' |
| 8 | +import { |
| 9 | + getCircleFeature, |
| 10 | + getEllipseFeature, |
| 11 | + getFeaturesFromBulkAnnotations, |
| 12 | + getPointFeature, |
| 13 | + getPolygonFeature, |
| 14 | + getRectangleFeature, |
| 15 | + getViewportBoundingBox, |
| 16 | + isCoordinateInsideBoundingBox, |
| 17 | +} from './bulkAnnotations/utils.js' |
2 | 18 | import { |
3 | 19 | buildPaletteColorLookupTable, |
4 | 20 | ColormapNames, |
@@ -45,12 +61,34 @@ import { |
45 | 61 |
|
46 | 62 | /** |
47 | 63 | * Namespace for annotations of DICOM Micrsocopy Bulk Simple Annotations |
48 | | - * instances. |
| 64 | + * instances. Exposes fetch/coordinate helpers for Deck.gl without using |
| 65 | + * {@link viewer.VolumeImageViewer#addAnnotationGroups}. |
49 | 66 | * |
50 | 67 | * @namespace annotation |
51 | 68 | */ |
52 | 69 | const annotation = { |
53 | 70 | AnnotationGroup, |
| 71 | + fetchGraphicData, |
| 72 | + fetchGraphicIndex, |
| 73 | + getCommonZCoordinate, |
| 74 | + getCoordinateDimensionality, |
| 75 | +} |
| 76 | + |
| 77 | +/** |
| 78 | + * Bulk Simple Annotation geometry (OpenLayers features). Same code as |
| 79 | + * {@link viewer.VolumeImageViewer#addAnnotationGroups}. |
| 80 | + * |
| 81 | + * @namespace bulkSimpleAnnotations |
| 82 | + */ |
| 83 | +const bulkSimpleAnnotations = { |
| 84 | + getFeaturesFromBulkAnnotations, |
| 85 | + getPointFeature, |
| 86 | + getPolygonFeature, |
| 87 | + getCircleFeature, |
| 88 | + getEllipseFeature, |
| 89 | + getRectangleFeature, |
| 90 | + getViewportBoundingBox, |
| 91 | + isCoordinateInsideBoundingBox, |
54 | 92 | } |
55 | 93 |
|
56 | 94 | /** |
@@ -179,6 +217,7 @@ const utils = { |
179 | 217 | export { |
180 | 218 | annotation, |
181 | 219 | api, |
| 220 | + bulkSimpleAnnotations, |
182 | 221 | color, |
183 | 222 | events, |
184 | 223 | mapping, |
|
0 commit comments