Slicer mrml scene not loading

(Usman Bashir) #1

Operating system: Windows 7
Slicer version: 4.8.1
Expected behavior: Stored studies should load
Actual behavior: Nothing loads and screen remains blank

I save a mrml scene with 2x2 view, 1 view containing a PET volume and the rest different MRI sequences. I save all volumes as slicer .nrrd files and the scene as well through the ‘data’ option in the menubar. When i load the scene after starting a new slicer instance, it remains blank even though i can see the mrml file (even .mrb) are quite sizeable

Slicer 4.10: Summary, Highlights and Changelog
(Steve Pieper) #2

Can you describe steps to recreate the issue using sample data?

Are there messages in the error log? (See the Report a bug in the Help menu).

(Usman Bashir) #3

The steps are very basic. I load a PET volume (DICOM) on slicer. Window it (because for some reason PET volumes always disappear afte loading and presumably after SUV calculator runs on them). Then save the mrml scene AND the PET volume(nrrd) . I have tried saving just mrml scene and same problem.
THe message in the error log says

Error parsing XML in stream at line 36, column 71, byte index 10184: not well-formed (invalid token)

(Andras Lasso) #4

Can you copy-paste line 36 of the scene .mrml file?

(Usman Bashir) #5

Hi Here goes

   <SubjectHierarchyItem id="19" name="research^H&N_INSIGHT_CCR3926 (20140812)" parent="18" type="DICOM" expanded="true" uids="DICOM^1.2.840.113564.9.1.2728161578.69.2.5000656996|" attributes="DICOM.StudyDate^20140812|DICOM.StudyDescription^research^H&N_INSIGHT_CCR3926|DICOM.StudyTime^103856.078000|Level^Study|StudyID^RPY0130070512302|StudyInstanceUID^1.2.840.113564.9.1.2728161578.69.2.5000656996|">

(Andras Lasso) #6

The error is due to having special character (&) in the patient name. We’ll fix this soon, but until then you have to manually remove special characters from the patient name in Data module.

(Andras Lasso) #7

@cpinter Could you have a look and if you can encode/decode subject hierarchy strings when written to XML, using these new methods?

(Csaba Pinter) #8

Yes I’ll do that soon.

(Csaba Pinter) #9

Fixed in

This will be available in tomorrow’s preview release.

(Usman Bashir) #10

Hi, The issue remains as of nightly build 2018-03-04:

Error log:
Error parsing XML in stream at line 36, column 71, byte index 9456: not well-formed (invalid token)

Line 36 of mrml scene (without starting ‘<’ ):
SubjectHierarchyItem id=“24” name=“Research^CCR3926_H&N_INSIGHT (20160113)” parent=“23” type=“DICOM” expanded=“true” uids=“DICOM^1.2.840.113564.9.1.2843759204.47.2.5000942147|” attributes=“DICOM.StudyDate^20160113|DICOM.StudyDescription^Research^CCR3926_H&N_INSIGHT|DICOM.StudyTime^094327.220000|Level^Study|StudyID^RPY0130094269703|StudyInstanceUID^1.2.840.113564.9.1.2843759204.47.2.5000942147|”

(Andras Lasso) #11

Thanks for reporting this. I’ve checked this and the problem is that somehow we missed encoding the node names as well. I’ll add this now so it should work in tomorrow’s build.