Further illustrating that there’s an issue, it lists a surface area and volume of a very large number (something like 10^10 mm^2). When I bring in the .ply file, it lists a more reasonable surface area and volume around 1000 mm^2.
I would like to import the STL file directly - does anyone know why I’m getting this import issue?
Probably some of the triangles in the model are inside out. To see all of them, go to Models module and choose “Visible Sides: All” in 3D Display section (or in older Slicer versions: in Representation section disable “Backface culling”).
This triangular shape is now visible from all angles in the 3D view. If there are “inside out triangles” as you suggested, is there a way to remedy that?
I also attempted to adjust some of the other settings in the “Models” tab. In particular, when checked “Slice Display: Visible” and changed mode to "projection, I saw the following:
That blob in the top left hand corner of the axial and sagittal slices looks like the model I’m looking for, but that large rectangle in each image seems to be some kind of import artifact. Any suggestions?
Just to be clear, the reason why I want to import this STL file directly is because I want it to be in the correct location relative to the DICOM image volume. When I import it via 3rd party software, it appears in the wrong place. If you have suggestions how to preserve relative location of the model from the STL file and the DICOM file, that is the ultimate goal.
The STL file that you sent contained incorrect coordinate values (in the range of -1e23 to 200). I’ve checked with Paraview as well and it displayed it the same way, as a huge triangle. It seems that there is some problem with your STL writer/converter.
I do believe the coordinate information is there somewhere, because of the following.
I can import the STL files in MeshLab. Along with the tumor model STL file, there is also a “skin” STL file. When I open these two files in MeshLab, they appear in the right location relative to one another. This triangle issue also doesn’t occur in that software.
If I save these STL files as .ply files using MeshLab, I can open them in 3D Slicer, and I see that the relative orientation of these STL meshes (the tumor volume and the skin volume) is preserved. However, when I convert the tumor STL mesh into a segmentation, it appears far from the correct location relative to the DICOM image volume (I cannot convert the skin STL file to a segmentation - the program crashes when I attempt to, I assume because it is a very large file).
The information about where these STL files are in the coordinate space of the DICOM image volume must be somewhere, but I don’t know how to access that information. Do you have any suggestions as to where that information might be? Even if I could find the translation required to align these files somewhere, I could translate the DICOM files manually to the correct location.
Displays some roughly segmented shape: MeshLab, FreeCAD
MeshLab (and probably FreeCAD as well) cleans up the model file after it is loaded (removing invalid points, merging concident points), so maybe you just have invalid extra points in your file.
How this STL file was generated? What is your workflow? Can you describe what your project is about, what the end goal is (not just this specific conversion step; which might not be needed at all)?
You can segment DICOM files in Slicer using Segment Editor module.
Importing STL models from external software works well, too. The only problem we encountered in the last couple of years is the LPS/RAS mismatch (it is not an error just a result of different coordinate systems convention) and that can be addressed as described in the linked post above.
These STL files are generated from the Medtronic Stealth neurosurgical planning systems. They are tumor models generated by the neurosurgeon during the surgery. Recreating these tumor models would be a big hassle - it would be much easier to transfer them directly.
My goal is simply to convert this tumor model into DICOM format and transfer it, along with the MR volume, into 3rd party software. Of course it needs to be correctly located relative to the image volume.
Just to be reiterate, I have been able to import the STL file into MeshLab and save it (again as an STL file), and then import it into 3D Slicer, but then the location relative to the MR volume is wrong. I was hoping that if I could import it directly into 3D Slicer, then the location of the STL file would be correct relative to the MR volume. However maybe this isn’t the case (i.e. if it’s imported directly to 3D Slicer it’s still in the wrong place). It’s possible I can just figure out the correct transformation to perform on the image volume or STL file to get them to orient correctly. That would solve my problem as well. I tried the (-1 -1 1 1) transformation you suggested but it didn’t give the desired result.
If you only use Medtronic software for creating these STL files then probably they are already aware of the issue and may have a solution for you. Which software application and what version did you use on StealthStation to export the models? If you prefer, I can ask our Medtronic contacts, just let us know.
Transforming coordinate systems between DICOM and the specific StealthStation application
We’ve spent several weeks to figure out the relationship between internal coordinate system of StalthStation SynergyCranial application and the input DICOM files. If you use this specific application then we can help. If you use another then probably you need to ask your Medtronic contact person.