feat(Segmentation): download RTSS from Labelmap(#3692)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
dxlinandAlireza authored and GitHub committed 2023-10-06 15:00:04 -04:00
1 parent eab42c1032
commit 40673f64b3
22 files changed
+177 -429

No files matched your search

@@ -137,6 +137,7 @@ import iconMoreMenu from './../../assets/icons/icon-more-menu.svg';
import iconToolBrush from './../../assets/icons/icon-tool-brush.svg';
import iconToolEraser from './../../assets/icons/icon-tool-eraser.svg';
import iconToolScissor from './../../assets/icons/icon-tool-scissor.svg';
import iconToolShape from './../../assets/icons/icon-tool-shape.svg';
import iconToolThreshold from './../../assets/icons/icon-tool-threshold.svg';
/** Old OHIF */
@@ -282,6 +283,7 @@ const ICONS = {
'icon-tool-brush': iconToolBrush,
'icon-tool-eraser': iconToolEraser,
'icon-tool-scissor': iconToolScissor,
'icon-tool-shape': iconToolShape,
'icon-tool-threshold': iconToolThreshold,
/** Old OHIF */
@@ -10,6 +10,7 @@ function SegmentationDropDownRow({
onToggleSegmentationVisibility,
onSegmentationEdit,
onSegmentationDownload,
onSegmentationDownloadRTSS,
storeSegmentation,
onSegmentationDelete,
onSegmentationAdd,
@@ -40,6 +41,7 @@ function SegmentationDropDownRow({
alignment="left"
itemsClassName="text-primary-active"
showBorders={false}
maxCharactersPerLine={30}
list={[
...(!disableEditing
? [
@@ -79,11 +81,17 @@ function SegmentationDropDownRow({
: []),
...[
{
title: 'Download',
title: 'Download DICOM SEG',
onClick: () => {
onSegmentationDownload(activeSegmentation.id);
},
},
{
title: 'Download DICOM RTSTRUCT',
onClick: () => {
onSegmentationDownloadRTSS(activeSegmentation.id);
},
},
],
]}
>
@@ -149,6 +157,7 @@ SegmentationDropDownRow.propTypes = {
onToggleSegmentationVisibility: PropTypes.func,
onSegmentationEdit: PropTypes.func,
onSegmentationDownload: PropTypes.func,
onSegmentationDownloadRTSS: PropTypes.func,
storeSegmentation: PropTypes.func,
onSegmentationDelete: PropTypes.func,
onSegmentationAdd: PropTypes.func,
@@ -22,6 +22,7 @@ const SegmentationGroupTable = ({
onSegmentationClick,
onSegmentationDelete,
onSegmentationDownload,
onSegmentationDownloadRTSS,
storeSegmentation,
// segment handlers
onSegmentClick,
@@ -112,6 +113,7 @@ const SegmentationGroupTable = ({
onSegmentationDelete={onSegmentationDelete}
onSegmentationEdit={onSegmentationEdit}
onSegmentationDownload={onSegmentationDownload}
onSegmentationDownloadRTSS={onSegmentationDownloadRTSS}
storeSegmentation={storeSegmentation}
onSegmentationAdd={onSegmentationAdd}
onToggleSegmentationVisibility={onToggleSegmentationVisibility}
@@ -188,6 +190,7 @@ SegmentationGroupTable.propTypes = {
onSegmentationClick: PropTypes.func.isRequired,
onSegmentationDelete: PropTypes.func.isRequired,
onSegmentationDownload: PropTypes.func.isRequired,
onSegmentationDownloadRTSS: PropTypes.func.isRequired,
storeSegmentation: PropTypes.func.isRequired,
onSegmentClick: PropTypes.func.isRequired,
onSegmentAdd: PropTypes.func.isRequired,
@@ -217,6 +220,7 @@ SegmentationGroupTable.defaultProps = {
onSegmentationClick: () => {},
onSegmentationDelete: () => {},
onSegmentationDownload: () => {},
onSemgnetationDownloadRTSS: () => {},
storeSegmentation: () => {},
onSegmentClick: () => {},
onSegmentAdd: () => {},