Skip to content

Commit

Permalink
performance(memory): Optimize caching and refactor stack segmentation…
Browse files Browse the repository at this point in the history
… for memory efficiency (#969)

* Refactor tools in stackToVolumeWithAnnotations
example

* Refactor code: Remove unused functions and imports, and update function names

* Add decache method to IImageVolume interface and convertStackToVolumeViewport and convertVolumeToStackViewport utilities

* Update imageIdReferenceMap to support multiple derived imageIds

* Add imageFrame property to IImage and imageCacheOffsetMap property to IImageVolume

* Add error handling in event listener and optimize cache handling

* Fix segmentation brush tool hover data bug

* Refactor labelmapDisplay.ts to handle different viewport types

* Add import/no-cycle rule to ESLint configuration
Fix missing property initialization in fetchAndAllocateNiftiVolume.ts
Update constructor parameter type in NiftiImageVolume.ts
Fix type in SegmentationRenderingEngine.ts
Fix type in isWithinThreshold.ts
Fix condition in createVolumeActor.ts
Add ImageVolumeProps interface
Fix type in ILoadObject.ts
Fix type in IDynamicImageVolume.ts
Fix type in VoxelManager.ts

* update api

* Update functions and dependencies

* Add referencedImageIds to ImageVolume class

* Optimize image cache and update image pixel data view

* Add additionalDetails property to VolumeProps and IImageVolume

* Update settings.json and cacheUtils.ts, and fix convertStackToVolumeSegmentation

* Refactor ImageVolume class and related methods

* Update import statements for roundNumber utility

* Fix brush tool error for stack segmentations

* Update imports and variables in API files

* Refactor convertVolumeToStackViewport function to improve cache handling

* Update generateVolumePropsFromIds to generateVolumePropsFromImageIds

* Update code comments and fix buffer offset bug

* Update convertVolumeToStackViewport function signature

* Update imageIdReferenceMap types to use string instead of Set<string>

* Refactor stack to volume conversion and segmentation handling

* Fix isEqual import in fillCircle.ts
  • Loading branch information
sedghi authored Jan 3, 2024
1 parent 75102c8 commit 9ef7720
Show file tree
Hide file tree
Showing 73 changed files with 2,755 additions and 1,042 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"curly": "error",
"tsdoc/syntax": "warn",
"@typescript-eslint/ban-ts-comment": "off",
"import/no-cycle": "error",
"no-console": [
"warn",
{
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
"workbench.colorCustomizations": {},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
},
"typescript.tsdk": "node_modules/typescript/lib"
}
Loading

0 comments on commit 9ef7720

Please sign in to comment.