标注更改及检查名称更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
52ac12d6b6
commit
ef5e5527fd
|
@ -862,6 +862,7 @@ const actions = {
|
||||||
const data = {}
|
const data = {}
|
||||||
data.StudyId = study.StudyId
|
data.StudyId = study.StudyId
|
||||||
data.StudyCode = study.StudyCode
|
data.StudyCode = study.StudyCode
|
||||||
|
data.StudyName = study.StudyName
|
||||||
data.Modalities = study.Modalities
|
data.Modalities = study.Modalities
|
||||||
data.SeriesCount = study.SeriesCount
|
data.SeriesCount = study.SeriesCount
|
||||||
data.InstanceCount = study.InstanceCount
|
data.InstanceCount = study.InstanceCount
|
||||||
|
|
|
@ -19,15 +19,14 @@
|
||||||
class="dicom-desc"
|
class="dicom-desc"
|
||||||
style="width: 150px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
|
style="width: 150px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
|
||||||
>
|
>
|
||||||
<el-tooltip class="item" effect="dark" :content="`${study.StudyCode} ${study.Description?study.Description:''} ${study.Modalities} (${study.SeriesCount})`" placement="right">
|
|
||||||
<div>
|
<div>
|
||||||
<div style="text-overflow: ellipsis;overflow: hidden;" v-if="!study.StudyName">
|
<div style="text-overflow: ellipsis;overflow: hidden;" v-if="!study.StudyName">
|
||||||
<span :title="study.StudyCode">{{ study.StudyCode }}</span>
|
<span :title="study.StudyCode">{{ study.StudyCode }}</span>
|
||||||
<span>{{ study.Modalities }} ({{ study.SeriesCount }})</span>
|
<span style="margin-left: 5px;">{{ study.Modalities }} ({{ study.SeriesCount }})</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="text-overflow: ellipsis;overflow: hidden;" v-else>
|
<div style="text-overflow: ellipsis;overflow: hidden;" v-else>
|
||||||
<span :title="study.StudyCode">{{ study.StudyCode }}</span>
|
<span :title="study.StudyCode">{{ study.StudyCode }}</span>
|
||||||
<span v-if="taskInfo && taskInfo.IsShowStudyName" :title="study.StudyName">
|
<span v-if="taskInfo && taskInfo.IsShowStudyName" :title="study.StudyName" style="margin: 0 5px">
|
||||||
{{study.StudyName}}
|
{{study.StudyName}}
|
||||||
</span>
|
</span>
|
||||||
<div>{{ study.Modalities }} ({{ study.SeriesCount }})</div>
|
<div>{{ study.Modalities }} ({{ study.SeriesCount }})</div>
|
||||||
|
@ -35,7 +34,6 @@
|
||||||
<div style="text-overflow: ellipsis;overflow: hidden;" :title="study.Description">{{ study.Description }}</div>
|
<div style="text-overflow: ellipsis;overflow: hidden;" :title="study.Description">{{ study.Description }}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
class="dicom-desc"
|
class="dicom-desc"
|
||||||
style="width: 150px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
|
style="width: 150px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
|
||||||
>
|
>
|
||||||
<el-tooltip class="item" effect="dark" :content="`${study.StudyCode} ${study.Description?study.Description:''} ${study.Modalities} (${study.SeriesCount})`" placement="right">
|
|
||||||
<div>
|
<div>
|
||||||
<div style="text-overflow: ellipsis;overflow: hidden;" v-if="!study.StudyName">
|
<div style="text-overflow: ellipsis;overflow: hidden;" v-if="!study.StudyName">
|
||||||
<span :title="study.StudyCode">{{ study.StudyCode }}</span>
|
<span :title="study.StudyCode">{{ study.StudyCode }}</span>
|
||||||
|
@ -34,7 +33,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="text-overflow: ellipsis;overflow: hidden;" :title="study.Description">{{ study.Description }}</div>
|
<div style="text-overflow: ellipsis;overflow: hidden;" :title="study.Description">{{ study.Description }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -10,6 +10,7 @@ const getNewContext = cornerstoneTools.import('drawing/getNewContext')
|
||||||
const draw = cornerstoneTools.import('drawing/draw')
|
const draw = cornerstoneTools.import('drawing/draw')
|
||||||
const drawHandles = cornerstoneTools.import('drawing/drawHandles')
|
const drawHandles = cornerstoneTools.import('drawing/drawHandles')
|
||||||
const drawTextBox = cornerstoneTools.import('drawing/drawTextBox')
|
const drawTextBox = cornerstoneTools.import('drawing/drawTextBox')
|
||||||
|
const drawLink = cornerstoneTools.import('drawing/drawLink')
|
||||||
|
|
||||||
const drawLinkedTextBox = cornerstoneTools.import('drawing/drawLinkedTextBox')
|
const drawLinkedTextBox = cornerstoneTools.import('drawing/drawLinkedTextBox')
|
||||||
// Utilities
|
// Utilities
|
||||||
|
@ -23,6 +24,8 @@ const getModule = cornerstoneTools.getModule
|
||||||
const getPixelSpacing = cornerstoneTools.import('util/getPixelSpacing')
|
const getPixelSpacing = cornerstoneTools.import('util/getPixelSpacing')
|
||||||
// import numbersWithCommas from './../../util/numbersWithCommas.js';
|
// import numbersWithCommas from './../../util/numbersWithCommas.js';
|
||||||
const numbersWithCommas = cornerstoneTools.import('util/numbersWithCommas')
|
const numbersWithCommas = cornerstoneTools.import('util/numbersWithCommas')
|
||||||
|
const clipBoxToDisplayedArea = cornerstoneTools.import('util/clip')
|
||||||
|
|
||||||
// const logger = getLogger('tools:annotation:ProbeTool');
|
// const logger = getLogger('tools:annotation:ProbeTool');
|
||||||
import calculateEllipseStatistics from './calculateEllipseStatistics'
|
import calculateEllipseStatistics from './calculateEllipseStatistics'
|
||||||
import getCircleCoords from './getCircleCoords'
|
import getCircleCoords from './getCircleCoords'
|
||||||
|
@ -327,17 +330,16 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool {
|
||||||
);
|
);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(data.handles.textBox)
|
// const handles = {
|
||||||
const handles = {
|
// start: {
|
||||||
start: {
|
// x: data.handles.end.x,
|
||||||
x: data.handles.end.x,
|
// y: data.handles.end.y
|
||||||
y: data.handles.end.y
|
// },
|
||||||
},
|
// end: {
|
||||||
end: {
|
// x: data.handles.end.x + r,
|
||||||
x: data.handles.end.x + r,
|
// y: data.handles.end.y
|
||||||
y: data.handles.end.y
|
// }
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
let xOffset = 0
|
let xOffset = 0
|
||||||
if (data.remark && !isNaN(parseInt(data.remark.slice(-1)))) {
|
if (data.remark && !isNaN(parseInt(data.remark.slice(-1)))) {
|
||||||
let i = parseInt(data.remark.slice(-1))
|
let i = parseInt(data.remark.slice(-1))
|
||||||
|
@ -346,33 +348,95 @@ export default class ProbeTool extends cornerstoneTools.ProbeTool {
|
||||||
} else if (i === 2) {
|
} else if (i === 2) {
|
||||||
xOffset = 0
|
xOffset = 0
|
||||||
} else if (i=== 3) {
|
} else if (i=== 3) {
|
||||||
xOffset = 40
|
xOffset = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// const xOffset = -30
|
// const xOffset = -30
|
||||||
const textBoxAnchorPoints = handles => [
|
const textBoxAnchorPoints = handles => [
|
||||||
handles.start,
|
|
||||||
handles.end
|
handles.end
|
||||||
]
|
]
|
||||||
|
|
||||||
drawLinkedTextBox(
|
_drawLinkedTextBox(
|
||||||
context,
|
context,
|
||||||
element,
|
element,
|
||||||
data.handles.textBox,
|
data.handles.textBox,
|
||||||
textLines,
|
textLines,
|
||||||
handles,
|
data.handles,
|
||||||
textBoxAnchorPoints,
|
|
||||||
color,
|
color,
|
||||||
lineWidth,
|
lineWidth,
|
||||||
xOffset,
|
xOffset,
|
||||||
true
|
false
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function _drawLinkedTextBox(
|
||||||
|
context,
|
||||||
|
element,
|
||||||
|
textBox,
|
||||||
|
text,
|
||||||
|
handles,
|
||||||
|
color,
|
||||||
|
lineWidth,
|
||||||
|
xOffset,
|
||||||
|
yCenter) {
|
||||||
|
const { pixelToCanvas } = external.cornerstone;
|
||||||
|
|
||||||
|
// Convert the textbox Image coordinates into Canvas coordinates
|
||||||
|
const textCoords = pixelToCanvas(element, textBox);
|
||||||
|
|
||||||
|
if (xOffset) {
|
||||||
|
textCoords.x += xOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
centering: {
|
||||||
|
x: false,
|
||||||
|
y: yCenter,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
options.displacer = box => clipBoxToDisplayedArea(element, box);
|
||||||
|
|
||||||
|
// Draw the text box
|
||||||
|
textBox.boundingBox = drawTextBox(
|
||||||
|
context,
|
||||||
|
text,
|
||||||
|
textCoords.x,
|
||||||
|
textCoords.y,
|
||||||
|
color,
|
||||||
|
options
|
||||||
|
);
|
||||||
|
if (textBox.hasMoved) {
|
||||||
|
// Identify the possible anchor points for the tool -> text line
|
||||||
|
let arr = [
|
||||||
|
{
|
||||||
|
x: handles.end.x,
|
||||||
|
y: handles.end.y
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: handles.end.x,
|
||||||
|
y: handles.end.y
|
||||||
|
}
|
||||||
|
]
|
||||||
|
const linkAnchorPoints = arr.map(h =>
|
||||||
|
pixelToCanvas(element, h)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Draw dashed link line between tool and text
|
||||||
|
drawLink(
|
||||||
|
linkAnchorPoints,
|
||||||
|
textCoords,
|
||||||
|
textBox.boundingBox,
|
||||||
|
context,
|
||||||
|
color,
|
||||||
|
lineWidth
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
function _getUnit(modality, showHounsfieldUnits) {
|
function _getUnit(modality, showHounsfieldUnits) {
|
||||||
return modality === 'CT' && showHounsfieldUnits !== false ? 'HU' : '';
|
return modality === 'CT' && showHounsfieldUnits !== false ? 'HU' : '';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue