Open mkramers opened 4 years ago
That's odd. I can't remember if that's valid output from dicom-parser
, but I would think that any metadata coming from cornerstone-wado-image-loader
would be a string for patient name 🤔
Do you have an easy way to reproduce this issue that would allow for me to test on my end?
dicom-parser will not return a name like this - I suspect your source is a DICOMWeb server since it returns PN attributes coded this way. Perhaps the DICOMWeb server is not standards compliant or there is a bug in the cornerstone code that consumes it
@dannyrb, @chafey - it seems that this may be specific to using WADORS via a PACS/DICOMWeb server (dcm4chee) which I have running locally. I am having a bit of trouble finding an easy way for you to reproduce this, as I can't seem to find a public PACS with WADORS. Any suggestions?
If it helps - while using the same images which are causing issues, non of the tools work either (through settings them via props as per the example). If I add them manually (via cornerstoneTools.addTool(...)
) they work fine.
The bug is that the patientModule metadataprovider assumes a dicom-parser/P10 based metadata here:
https://github.com/cornerstonejs/react-cornerstone-viewport/blob/master/src/metadataProvider.js#L96
Support fro DICOMWeb formatted PN attributes needs to be added there for your use case, or use WADOURI instead
Version(s):
I am hitting the following error when loading some arbitrary data:
TypeError: name.replace is not a function
in
formatPN from node_modules/react-cornerstone-viewport/dist/index.umd.js:2569
at
var commaBetweenFirstAndLast = name.replace('^', ', '); // Replace any remaining '^' characters with spaces
It appears that for some of my data, the
name
is an object (i.e.Object { Alphabetic: "C3L-00766" }
. I can modify the src directly to resolve this issue, however being relatively new to cornerstone, I am not certain the best way to go about resolving this. I am usingcornerstone-wado-image-loader
as my image loader.Thanks!