UNPKG

dicom-microscopy-viewer

Version:
232 lines (217 loc) 4.06 kB
import { AnnotationGroup, fetchGraphicData, fetchGraphicIndex, getCommonZCoordinate, getCoordinateDimensionality, } from './annotation.js' import { getCircleFeature, getEllipseFeature, getFeaturesFromBulkAnnotations, getPointFeature, getPolygonFeature, getRectangleFeature, getViewportBoundingBox, isCoordinateInsideBoundingBox, } from './bulkAnnotations/utils.js' import { buildPaletteColorLookupTable, ColormapNames, createColormap, PaletteColorLookupTable, } from './color.js' import EVENTS from './events.js' import { ParameterMapping } from './mapping.js' import { Comprehensive3DSR, formatMetadata, groupColorInstances, groupMonochromeInstances, MicroscopyBulkSimpleAnnotations, ParametricMap, Segmentation, VLWholeSlideMicroscopyImage, } from './metadata.js' import { OpticalPath } from './opticalPath.js' import { ROI } from './roi.js' import { Ellipse, Ellipsoid, Multipoint, Point, Polygon, Polyline, } from './scoord3d.js' import { Segment } from './segment.js' import { applyInverseTransform, applyTransform, buildInverseTransform, buildTransform, computeRotation, mapPixelCoordToSlideCoord, mapSlideCoordToPixelCoord, } from './utils.js' import { LabelImageViewer, OverviewImageViewer, VolumeImageViewer, } from './viewer.js' /** * Namespace for annotations of DICOM Micrsocopy Bulk Simple Annotations * instances. Exposes fetch/coordinate helpers for Deck.gl without using * {@link viewer.VolumeImageViewer#addAnnotationGroups}. * * @namespace annotation */ const annotation = { AnnotationGroup, fetchGraphicData, fetchGraphicIndex, getCommonZCoordinate, getCoordinateDimensionality, } /** * Bulk Simple Annotation geometry (OpenLayers features). Same code as * {@link viewer.VolumeImageViewer#addAnnotationGroups}. * * @namespace bulkSimpleAnnotations */ const bulkSimpleAnnotations = { getFeaturesFromBulkAnnotations, getPointFeature, getPolygonFeature, getCircleFeature, getEllipseFeature, getRectangleFeature, getViewportBoundingBox, isCoordinateInsideBoundingBox, } /** * Namespace for the viewer. * * @namespace api * @deprecated use the viewer namespace instead */ const api = { VLWholeSlideMicroscopyImageViewer: VolumeImageViewer, } /** * Namespace for the viewer. * * @namespace viewer */ const viewer = { LabelImageViewer, OverviewImageViewer, VolumeImageViewer, } /** * Namespace for parameter mappings of DICOM Parametric Map instances. * * @namespace mapping */ const mapping = { ParameterMapping, } /** * Namespace for working with DICOM Metadata. * * @namespace metadata */ const metadata = { formatMetadata, groupMonochromeInstances, groupColorInstances, MicroscopyBulkSimpleAnnotations, ParametricMap, Segmentation, VLWholeSlideMicroscopyImage, Comprehensive3DSR, } /** * Namespace for color. * * @namespace color */ const color = { ColormapNames, createColormap, PaletteColorLookupTable, buildPaletteColorLookupTable, } /** * Namespace for optical paths. * * @namespace opticalPath */ const opticalPath = { OpticalPath, } /** * Namespace for 3-dimensional spatial coordinates (SCOORD3D). * * @namespace scoord3d */ const scoord3d = { Point, Multipoint, Polyline, Polygon, Ellipsoid, Ellipse, } /** * Namespace for regions of interest (ROIs). * * @namespace roi */ const roi = { ROI, } /** * Namespace for segments of DICOM Segmentation instances. * * @namespace segment */ const segment = { Segment, } /** * Namespace for viewer events. * * @namespace events */ const events = { EVENTS, } /** * Namespace for various utilities. * * @namespace utils */ const utils = { applyInverseTransform, applyTransform, buildInverseTransform, buildTransform, computeRotation, mapSlideCoordToPixelCoord, mapPixelCoordToSlideCoord, } export { annotation, api, bulkSimpleAnnotations, color, events, mapping, metadata, opticalPath, roi, scoord3d, segment, utils, viewer, }