Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(segmentation): Add polymorph segmentation and representation con…
…version capabilities (#844) * Add wasm conversion contour 2 surface * Adding more converters * remove circle json * remove contour json * remove surfaces json * edit the polyseg contour example * polyseg contour * edits * Update dependencies and import statements * Fix wasm loading issue and initialize polySeg instance * update * Fix camera clipping range and add surface actor to element * Fix camera clipping range reset issue * Add polySegManager for controlling polymorphic segmentations * Refactor labelmap to surface conversion in PolySegManager * Refactor segmentation conversion and surface display * Add segment index dropdown to toolbar * fix surface segmentation to include multiple geometries * Refactor surface conversion in PolySegManager * Refactor segmentation-related functions and add new features * Remove defaultOptions from viewport configuration * Update Viewport and SegmentationStateManager * Add background color support to viewports * Remove unused code for manual labelmap segmentation tools * Refactor surface representation update in PolySegManager * Add 3D anatomy toggle button and set initial visibility to false * Add info section and update instructions in PolySegWasmVolumeLabelmapToSurface example * Update DICOM web URL in code * Update labelmap validation and polySeg conversion * Fix segmentation handling and add warning message * Add getSegmentAtWorldPoint utility function * Add isPointInsidePolyline function for 2D and 3D points * Refactor addSegmentationRepresentation function and RepresentationPublicInputOptions * Fix segmentationRepresentationUID assignment * Fix segmentIndex conversion issue and update annotation rendering * Fix SurfaceData initialization in surfaceDisplay.ts * Refactor surface and labelmap rendering functions * Refactor PolySegManager to support both volume and stack viewports * Add ISurface interface to Surface class and update references*** ***Update data type in IGeometry interface to use ISurface interface*** ***Add setPoints and setPolys methods to ISurface interface*** ***Update updateSurfaceRepresentation method in PolySegManager class to use ISurface interface methods * Refactor render function in surfaceDisplay.ts * Increase radius for 3D viewport and pass additional parameters to computeAndAddLabelmapRepresentation * Refactor polySegManager.ts file * Add VTK contour support and refactor contour display logic * Refactor mergePoints.ts to remove duplicate points and update point references in lines array * Merge duplicate point logic in getDeduplicatedVTKPolyDataPoints * Add cachedStats to ProbeTool and add contour annotation to contourDisplay * Add new tools and functionality for segmentation * Update SegmentationRepresentations in PolySegManager * Add lodash.get and hull.js dependencies, fix null check in AnnotationTool, and optimize drawLoop function * Update user authentication logic * moving towards web workers * Update user authentication logic to use bcrypt hashing algorithm * refactoring * refactoring contour to surface * update yarn lock * moved the label map to surface to worker * rename * start of labelmap to worker * Refactor code to improve performance and readability * Refactor code to improve performance and readability * Refactor variable names and improve code readability * Refactor code to improve performance and readability * Fix bug in login functionality * more on surface to labelmap * move to Map for surface rendering * fix surface representation * add stack labelmap to surface example * update * enhance stack to volume segmentation conversion * add stack seg to surface * proper implemntation of contour to labelmap for stack * surface rendering on stack viewport * fix surface from contour * first api fix push * remaining * add example info page * applied self review comments * remainign * remainign * demo * Add Surface class and update polySeg options * add manipulation tools * Fix rendering issue and add new utility function for 3D polyline * more updates * Refactor segmentation-related code and fix error handling * Add PolySegConversionOptions type * wip * Fix stack index in setStack method * api * try to precache surface intersections * Refactor clippingPlaneWorker.js and surfaceRendering/index.ts * update * Removed one debugger and fixed a NPE * update * Add manipulation bindings and mock contour segmentation * Fix contour segmentation behavior and add utility functions * Add triggerAnnotationRenderForToolGroupIds utility function * Add mock contour segmentation for volume and stack viewports * Add getViewportImageIds utility function * api * Update contour segmentation radius and terminate web worker by name * Fix compute job limit bug and terminate workers properly * Remove unused enum and add new enum for worker types * Add event listener for caching progress * update * Add getSegmentationIdRepresentations function to segmentationState.ts and update hoverTimeout in SegmentSelectTool.ts * Refactor segmentation utilities and tools * Update search radius for border detection * Refactor addManipulationBindings function to accept options object * update review --------- Co-authored-by: rodrigobasilio2022 <[email protected]>
- Loading branch information