diff --git a/extensions/dicom-tag-browser/src/components/DicomTagBrowser.js b/extensions/dicom-tag-browser/src/components/DicomTagBrowser.js index 52f24c18d39..9be272c906a 100644 --- a/extensions/dicom-tag-browser/src/components/DicomTagBrowser.js +++ b/extensions/dicom-tag-browser/src/components/DicomTagBrowser.js @@ -18,7 +18,7 @@ const DicomTagBrowser = ({ displaySets, displaySetInstanceUID }) => { activeDisplaySetInstanceUID, setActiveDisplaySetInstanceUID, ] = useState(displaySetInstanceUID); - const [activeInstance, setActiveInstance] = useState(0); + const [activeInstance, setActiveInstance] = useState(1); const [tags, setTags] = useState([]); const [meta, setMeta] = useState(''); const [instanceList, setInstanceList] = useState([]); @@ -51,7 +51,7 @@ const DicomTagBrowser = ({ displaySets, displaySetInstanceUID }) => { description: displayDate, onClick: () => { setActiveDisplaySetInstanceUID(displaySetInstanceUID); - setActiveInstance(0); + setActiveInstance(1); }, }; }); @@ -65,7 +65,7 @@ const DicomTagBrowser = ({ displaySets, displaySetInstanceUID }) => { if (isImageStack) { const { images } = activeDisplaySet; - const image = images[activeInstance]; + const image = images[activeInstance - 1]; instanceList = images.map((image, index) => { const metadata = image.getData().metadata; @@ -107,7 +107,7 @@ const DicomTagBrowser = ({ displaySets, displaySetInstanceUID }) => { showValue step={1} min={1} - max={instanceList.length - 1} + max={instanceList.length} value={activeInstance} valueRenderer={value =>

Instance Number: {value}

} onChange={({ target }) => {