fix(4d): panel generate image (#4430)

This commit is contained in:
Alireza 2024-10-18 13:13:09 -04:00 committed by GitHub
parent ae4c319dff
commit c7522db9bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 33 deletions

View File

@ -505,7 +505,7 @@ workflows:
- HOLD_FOR_APPROVAL - HOLD_FOR_APPROVAL
- DOCKER_RELEASE_PUBLISH: - DOCKER_RELEASE_PUBLISH:
requires: requires:
- NPM_PUBLISH - HOLD_FOR_APPROVAL
### ###
# Unit and E2E tests have already run for PR_CHECKS # Unit and E2E tests have already run for PR_CHECKS

View File

@ -256,6 +256,9 @@ async function createComputedVolume(dynamicVolumeId, computedVolumeId) {
if (!cache.getVolume(computedVolumeId)) { if (!cache.getVolume(computedVolumeId)) {
const computedVolume = await volumeLoader.createAndCacheDerivedVolume(dynamicVolumeId, { const computedVolume = await volumeLoader.createAndCacheDerivedVolume(dynamicVolumeId, {
volumeId: computedVolumeId, volumeId: computedVolumeId,
targetBuffer: {
type: 'Float32Array',
},
}); });
return computedVolume; return computedVolume;
} }

View File

@ -12,7 +12,6 @@ import {
histogramPropType, histogramPropType,
colormapPropType, colormapPropType,
} from './types'; } from './types';
import PanelSection from '../PanelSection';
const convertVOItoVOIRange = voi => { const convertVOItoVOIRange = voi => {
return { return {
@ -22,21 +21,19 @@ const convertVOItoVOIRange = voi => {
}; };
const WindowLevel = ({ const WindowLevel = ({
title, step = 1,
step,
histogram, histogram,
voi: voiProp, voi: voiProp,
opacity: opacityProp, opacity: opacityProp = 1,
showOpacitySlider, showOpacitySlider = false,
colormap, colormap,
style, style = 'polygon',
fillColor, fillColor = '#3f3f3f',
lineColor, lineColor = '#707070',
containerClassName, containerClassName,
onVOIChange, onVOIChange,
onOpacityChange, onOpacityChange,
}: { }: {
title: string;
step: number; step: number;
histogram: Histogram; histogram: Histogram;
voi: VOI; voi: VOI;
@ -105,7 +102,6 @@ const WindowLevel = ({
return ( return (
<div className={classnames('maxValue-w-sm p-0.5 text-[0px] text-white', containerClassName)}> <div className={classnames('maxValue-w-sm p-0.5 text-[0px] text-white', containerClassName)}>
<div className="px-2 pt-0 pb-[0.5]"> <div className="px-2 pt-0 pb-[0.5]">
{/* <legend className="pb-1 text-base text-white"> {title}</legend> */}
<div className="flex h-4 text-xs"> <div className="flex h-4 text-xs">
<div className="relative h-fit grow"> <div className="relative h-fit grow">
<span className="absolute left-0 bottom-px leading-3">{range.min}</span> <span className="absolute left-0 bottom-px leading-3">{range.min}</span>
@ -161,17 +157,7 @@ const WindowLevel = ({
); );
}; };
WindowLevel.defaultProps = {
step: 1,
opacity: 1,
showOpacitySlider: false,
style: 'polygon',
fillColor: '#3f3f3f',
lineColor: '#707070',
};
WindowLevel.propTypes = { WindowLevel.propTypes = {
title: PropTypes.string,
step: PropTypes.number, step: PropTypes.number,
histogram: histogramPropType.isRequired, histogram: histogramPropType.isRequired,
voi: voiPropType, voi: voiPropType,

View File

@ -154,10 +154,10 @@ const WindowLevelHistogram = ({
range, range,
voiRange, voiRange,
histogram, histogram,
colormap, colormap = DEFAULT_COLORMAP,
style, style = 'polygon',
fillColor, fillColor = '#3f3f3f',
lineColor, lineColor = '#707070',
}: { }: {
range: Range; range: Range;
voiRange: VOIRange; voiRange: VOIRange;
@ -216,13 +216,6 @@ const WindowLevelHistogram = ({
); );
}; };
WindowLevelHistogram.defaultProps = {
colormap: DEFAULT_COLORMAP,
style: 'polygon',
fillColor: '#3f3f3f',
lineColor: '#707070',
};
WindowLevelHistogram.propTypes = { WindowLevelHistogram.propTypes = {
range: rangePropType.isRequired, range: rangePropType.isRequired,
voiRange: voiRangePropType.isRequired, voiRange: voiRangePropType.isRequired,

View File

@ -1 +1 @@
3.8.3 3.8.4