Export segmentation to Osirix

Hello,
I am trying to combine datasets that measure muscle size from MRI with a colleague. I have segmented muscles in 3D Slicer, my colleague has segmented muscles in Osirix.
Osirix seems limited in ability to export ROIs - I have tried the import Osirix ROI in 3D Slicer, but am unable as I can only import .xml or .json files, but Osirix ROI only saves it as .roi_series. I have also tried to export my 3D Slicer segmentations to DICOM, but not successfully to import into Osirix.
Has anyone experience in working between Osirix & 3D Slicer?

Do you use a very old or very new OsiriX version? Is there an OsiriX forum where you can ask about how to save your segmentation as a single ROI json or xml file (or even better, as a standard NRRD/Nifti/STL/OBJ/PLY/… file)? Maybe you need to convert to a list of 2D ROIs to a 3D ROI?

If you upload a sample .roi_series file somewhere and post the link here then I can have a look if there is a fundamental difference compared to what Slicer can import now. Maybe it is just a different file extension or other trivial difference that could be easily accommodated in the importer.

Thank you for your reply. The Osirix version is 11.0.1 (3 years old). I will investigate with Osirix support about exporting the ROIs to file formats you suggested (and post any reply/solution here too).
An example .roi_series file is in link below:
https://www.dropbox.com/s/x4j9wqqf0xgiwmq/PHP_01_transverse_trial%20ROIs.rois_series?dl=0

Thank you for any further information you are able to provide.

Thank you for the sample file. This .rois_series file is some internal object state serialized into a binary file, so it cannot be used outside of of OsiriX.

Thank you for inspecting the file. I’ve not had reply yet from Osirix as to any solutions from that end.
Are there options for exporting my 3D slicer segmentations to then be imported to Osirix? I’m not sure on this process- Osirix seem to only import ROI allowing that same ROI series file. I can enquire other options. Other import file functions include DICOM format but when I do that I haven’t been successful at importing my 3D slicer as DICOM containing segmentations (or there is transfer issue as Segmentations don’t import to Osirix).

I’ve found that there is an “Export ROIs” plugin available in OsiriX Lite that allows you to export the ROIs in JSON format. I’ve updated the OsiriX ROI importer module in the Sandbox extension so that it can load this JSON file.

Alternatively, you can also export a reconstructed surface from OsiriX Lite by choosing in menu: ROI → ROI Volume → Compute Volume…, and you can then use the icon in the lower-left corner to save in .stl format. The quality of the reconstructed surface seems pretty bad, but might be still usable. The .stl file can be loaded into Slicer as a segmentation (in “Add data” window choose “Segmentation” in the “Description” column to make the surface loaded as segmentation).

Thank-you, great I see this now in the export ROI function. I have sandbox extension install but do i need to update/reinstall it now? When I tried importing a json file I got error “import failed: string indices must be integers”.

I also tried the export as stl and import to 3D slicer as segmentation. This seems promising but some issues: using the “power crust” render in Osirix produces holes/gaps in the segmentations when they import to 3D slicer (which affects segment statistics), but it is anatomically placed correctly on the MRI scan. Trying “iso contour” for the Osirix render seemed to work better as it imported as a solid object, but it was not placed correctly on the MRI scan. I’m not sure whether this is something I can change in 3D slicer (the placement issue). The below figure illustrates each issue i.e. red box & 3D see the “holes” in segmentation; in 3D can see same segmentation placed differently when imported.

Extensions are not updated for Slicer Preview Releases, but you need to install the latest Slicer Preview Release and install the extension again.

I agree. Osirix does a very poor job in reconstructing a surface from the ROIs.

Thank you. I have now installed the latest preview release and the sandbox extension. When I try ImportOsirixROI file I get an error to say that SlicerRT is not installed. But if I try to install that from extension manager I receive an error message “failed to retrieve metadata for application”.

To add to previous post - when I tried again today to install SlicerRT it worked file. I could now use the OsirixImportROI function, but unfortunately the result was not great - the 16 different ROIs all get imported as 1 segmentation and as attempts using other methods, although it is correctly placed on the MRI images, the segmentations have gaps/holes.

Could you please share and example file that has issues and a screenshot of how it is rendered in OsiriX?

Yes, please find attached files and screenshot. I was not able to attach the .json file (Osirix export of ROIs) as I received a message saying it was an unauthorised file type. I’ve tried a link to the file on dropbox:


I’ve updated the “Import OsiriX ROI” module to import multiple ROIs:

You can download the updated ImportOsirixROI.py file manually or get it in the Slicer Preview Release tomorrow.

Thank you! I have downloaded the new Slicer preview today and installed the sandbox extension. But I couldn’t find a SlicerRT extension in the extension manager and when I use “import Osirix ROI” I get a message that it needs to be installed to generate a solid object. Here is the result. The individual segmentations per muscle have come through this time, but they are not a solid form (which means volumes aren’t computed).

SlicerRT is require for creating surface from contours. For the Slicer Preview Release there is a few-hour time period each day when you can already download the Slicer installer but building of extensions is still in progress and they arrive on the extensions server one by one (see more details here). If you go to the Extensions Manager now then you should be able to download SlicerRT for the release that you installed a few days ago.

Perfect- yes I have gone back in and that is all working now. Thank you for the help!

1 Like