Phoenix Children's Hospital 3D printed heart model. (Image courtesy Phoenix Children's Hospital)

Workflow for Creating a 3D Printed Medical Model with Stratasys

For decades in the medical world, surgeons and their professional support teams have relied on X-rays, computed tomography (CT) scans and magnetic resonant imaging (MRI) data when performing their pre-surgical planning approach. These diagnostic tools have been literal lifesavers, yet the resolution and 2D perspective of these images can make it difficult to determine the full details of anatomical geometry. Subtle, critical abnormalities or hidden geometries can go unnoticed when viewing flat films and digital displays.

3D printed heart model produced by Phoenix Children’s Hospital. (Image courtesy Phoenix Children’s Hospital)

With the advent of 3D printing, many surgeons are now using 3D models for both surgical planning and patient communication. While cost is the primary hold-back, such models are seeing increased use. In addition, efforts are underway to quantify the benefits of reduced operating room time/expense and improved patient outcome; see Medical 3D Printing Registry (ACR/RSNA). Supporting this concept are the high-resolution, multi-material PolyJet 3D printers from Stratasys.

But how does the patient’s CT and MRI data become a unique 3D printed model you can hold in your hand? How do you segment out the areas of interest for a particular analysis or surgical model? This blog post describes the necessary steps in the workflow, who typically performs them, and the challenges being addressed to improve the process every step of the way.

Data Acquisition of Patient Anatomy

When we think of imaging throughout the decades, X-ray technology comes to mind. However, classic single 2D images on film cannot be used to drive 3D models because they are qualitative not quantitative. The main options that do work include the series of x-rays known as CT scans, MRI data, and to a lesser extent computed tomography angiography (CTA) and magnetic resonant angiography (MRA). Each approach has pros and cons and therefore must be matched to the proper anatomy and end use.

CT scans comprise a series of x-rays evenly spaced laterally across a particular body section, typically generating several hundred image files. These can be quickly acquired and offer high resolution, however, they do not do well displaying different types of soft tissue, and the process relies on extended exposure to a radiation source.

Sample multiple digital images generated as a CT scan is performed (Image courtesy nymphoenix/Shutterstock.com.)

Typical CT resolution is 500 microns in X and Y directions, and 1mm in Z. This is readily handled by Stratasys printers; for example, the print resolution of the J750 Digital Anatomy Printer is 42 microns in X, 84 microns in Y, and 14 to 27 microns layering in Z, which more than captures all possible scanned features.

Computed Tomography Angiography (CTA) involves the same equipment but uses a contrast agent. With this approach, brighter regions highlight areas with blood flow. This process is superior for showing blood vessels but does not differentiate tissue or bones well.

MRI data is based on a different technology where a strong magnetic field interacts with water in the body. This approach differentiates soft tissue and shows small blood vessels but is more expensive and not effective for capturing bone. Similarly, Magnetic Resonant Angiography (MRA) uses a contrast agent that can track small blood vessels which are important for identifying a stroke but cannot register tissue. MRI scans may also include distracting artifacts and offer poor regional contrast.

A final source of digital imaging data is Positron Emission Tomography (PET). Here, radioactive material is attached to a biologically active area such as cancer; the data obtained with sensors is useful but very local – it does not show surrounding tissue.

Segmentation: Conversion from DICOM to STL format

Whether generated by CT or MRI equipment, anatomic image data is stored in digital files in accordance with the Digital Imaging and Communications in Medicine (DICOM) standard. Two aspects of this standard are relevant to 3D printing medical models: DICOM files include patient-specific, HIPPA-protected information, and the data in the individual images must be merged and converted into a solid model, with the areas of interest defined and partitioned.

Various software packages and services are available that will convert DICOM data into an STL model file (standard format for 3D printer input) while stripping out the personal identifying information. (The latter must be done to comply with HIPPA regulations: never send a DICOM file directly to any service bureau.)

Segmentation involves partitioning a digital image into distinct sets of pixels, defining regions as organ, bone, blood vessel, tumor, etc., then grouping and combining those sub-sections into a 3D model saved as an STL file. Not only does this format offer more meaningful information than a stack of separate images, but it can then be exported for 3D printing.

Example of processed CT scans, combined into a multiple-view 3D visualization and saved as an STL file. (Image courtesy PADT Inc.)

The standard unit of measure for identifying and segmenting the different regions within the combined 3D series of CT scans is a Hounsfield unit. This is a dimensionless value, defined as tissue density/x-ray absorption; for reference, water = zero, a kidney =+40 and bone = +1000.

Human guidance is needed to set threshold Hounsfield levels and draw a perimeter to the area of interest. You can define groups with the same threshold level, cut out certain areas that are not needed (e.g., “mask” the lungs to focus on the spine), and use preset values that exist for common model types. Typically, a radiologist or trained biomedical engineer performs this task, since correctly identifying boundaries is a non-trivial judgement task.

A particularly challenging task is the workflow for printing blood vessels, as opposed to bones or organs. The output from CTA/MRA imaging is the blood pool, not the enclosing vessel. In this case, users need third-party software to create a shell of X thickness around the blood pool shape, then keep both model files (pool and vessel) to guide printing the vessel walls and their internal support structure (which, on the Stratasys J750 Digital Anatomy Printer, is soluble and dissolves out.)

So far, just a few medical segmentation software packages exist:

  • Materialise Mimics Innovation Suite is internationally known for its excellence in image analysis and allows you to write scripted routines for automating repeated aspects of the segmentation tasks. There are also tools for interpreting images with metal artifacts, designing support connections between parts, measuring specified features, and rendering a view of the resulting 3D model.
  • Synopsys Simpleware ScanIP is a 3D image segmentation, processing, and meshing platform that processes data from MRI, CT, and non-medical imaging systems. Simpleware ScanIP removes or reduces unwanted noise in the greyscale images, allows cropping to the area of interest, supports both automated and user-guided segmentation and measuring and includes API scripting. Modules are available for Cardio, Ortho, and Custom solutions.
  • Invesalius 3 is open-source software that can reconstruct CT and MRI data, producing 3D visualizations, image segmentation, and image measurements in both manual and semi-automated modes.
  • Embodi3D/Democratiz3D is an online service that lets you upload a series of CT scans, select a basic anatomy type (bone, detailed bone, dental, muscle, etc.), choose the free medium-to-low resolution or paid high resolution conversion service, and receive the link to an automatically generated STL file. (Users do not interact with the file to choose any masking, measuring, or cropping.) The website also offers downloadable 3D printable models and 3D printing services.

Note that these packages may or may not have some level of 510K FDA clearance for how the results of their processing can be used. Users would have to contact the vendors to learn the current status.

Setting up the STL file for printing

Most of the segmentation software packages give you options for selected resolution of the final model. As with all STL files, the greater the number of triangles, the finer the detail that is featured, but the model size may get too large for reasonable set-up in the printer’s software. You may also find that you still want to edit the model, either to do some hole repairs or smoothing, slice away a section to expose an interior view, or add mechanical struts/supports for delicate and/or heavy anatomy sections. Materialise Magics software will do all of this readily, otherwise, adding a package that can edit STL files or create/merge geometry onto an STL file will be useful.

Medical Modeling software workflow from CT scan to print, for typical Stratasys 3D printed model.

Whoever is setting the file up for printing needs to make a number of decisions based on experience. For Stratasys Connex3, J55, J8-series or J750 Digital Anatomy Printers, the process begins by bringing the file into GrabCAD Print and deciding on an optimized build orientation. Next, colors and materials are assigned, including transparent sections, percentages of transparent colors, and flexible/variable durometer materials, which can be for a single part or a multi-body model.

For the J750 Digital Anatomy Printer in particular, users can assign musculoskeletal, heart, vascular, and general anatomies to each model, then choose detailed, pre-assigned materials and properties to print models whose tactile response mimics actual biomechanical behavior, such as “osteoporotic bone.” (see Sidebar).

I tested out the free online Democratiz3D segmentation service offered by Embodi3D. Following their tutorial, I was able to convert my very own DICOM file folder of 267 CT images into files without patient ID information, generating a single STL output file. I chose the Bone/Detailed/Medium resolution option which ignored all the other visible anatomy then brought the resulting model into the free software Meshmixer to edit (crop) the STL. That let me zero in on a three-vertebrae section of my lower spine model and save it in the 3MF format.

Lastly, I opened the new 3MF file in GrabCAD Print, the versatile Stratasys printer set-up software that works with both FDM (filament) and PolyJet (UV-cured resin) printers. For the former case, I printed the model in ivory ASA on an F370 FDM printer, and for the latter, I was able to assign a creamy-grey color (Red248/Green248/Blue232) to give a bone-like appearance, printing the model on a J55 PolyJet office-environment printer.

GradCAD Print software set-up of 3MF vertebrae model, ready for printing in a user-defined bone color on a Stratasys J55 PolyJet full-color 3D printer. (Image courtesy PADT Inc.)
3D printed vertebrae parts created from CT scans: on left, ABS part from a Stratasys F370 FDM printer; on right, Vero rigid resin material from a Stratasys J55 PolyJet printer. (Image courtesy PADT Inc.)  

Experience helps in producing accurately segmented parts, but more features, such as AI-enabled selections, and more online tutorials are helping grow the field of skilled image-processing health professionals. Clarkson College (Omaha, NE) also recently announced the first Medical 3D Printing Specialist Certificate program.

Reach out to PADT to learn more about medical modeling and Stratasys 3D printers.

PADT Inc. is a globally recognized provider of Numerical Simulation, Product Development and 3D Printing products and services. For more information on Stratasys printers and materials, contact us at info@padtinc.com.

—————————

Sidebar: J750 Digital Anatomy Printer

The Stratasys J750 Digital Anatomy Printer uses PolyJet resin 3D printing technology to create parts that mimic the look and biomechanical response of human tissue, organs and bones. Users select from a series of pre-programmed anatomies then the material composition is automatically generated along with accurate internal structures. Pliable heart regions allow practice with cutting, suturing and patching, while hollow vascular models support training with guide wires and catheters. General anatomy models can replicate encapsulated and non-encapsulated tumors, while bone structures can be created that are osteoporotic and/or include regions that support tapping, reaming and screw insertion.

Currently the Digital Anatomy Printer models present in the range of 80 to 110 Hounsfield Units. Higher value materials are under development which would help hospitals create phantoms for calibrating their CT systems.

Currently available Digital Anatomy Printer   Model/Section Assignments:

Structural Heart:

  • Clot
  • Frame
  • Myocardium
  • Reinforcement
  • Solid Tumor
  • Valve Annulus
  • Valve Chordae
  • Valve Leaflet
  • Valvular Calcification
  • Vessel Wall

General Anatomy:

  • Dense connective tissues
  • Hollow internal organs
  • Solid internal organs
  • Solid Tumor

Blood Vessels:

  • Clot
  • Fixtures
  • Frame
  • Gel Support
  • Inlets
  • Reinforcements
  • Solid Tumor
  • Valve Annulus
  • Valve Leaflet
  • Vascular Calcification
  • Vessel Wall

Musculoskeletal

  • Facet Joints
  • General Bone
  • Intervertebral Discs
  • Ligament
  • Long Bone
  • Nerves
  • Open End
  • Ribs
  • Skull
  • Vertebra

6 – An update on outputting results in Ansys Mechanical: 3D Printing Results

To support some new marketing efforts I had to make some different types of results output from models in Ansys Mechanical:

  • A 3D plot on a webpage
    Post 5
  • A physical printout on our 3D Printer
    Post 6

All of the posts are here.

This post is the final, of six, and we finally get to the topic that we get the most questions on: “How do I convert my Ansys Results to a 3D Printed Model.” This article will cover taking Ansys Mechanical FEA results, stress, vibration, and heat transfer, and make a cool 3D plot on Stratasys full-color printers. The process should work on other color printers, but we have only tested it with Stratasys.

3D Printing and Color

Since the beginning of 3D Printing, we have been using a file format called STL. The format only contains the external surface of an object represented as triangles, and it does not support color. But there is good news, a new format, 3MF, or 3D Manufacturing Format was recently introduced to replace STL. It is one of several 3D formats that contain not only triangles on the surface of an object, but they support color information for each triangle. 3MF is for 3D Printing. PLY, OBJ, X3D, and others are for rendering and viewing.

But there is bad news. At this time (2020 R2), no Ansys products support 3MF. So we need to get our results into a format that Stratasys can read color data from, which is the latest version of OBJ. Because of this, we will use our favorite Ansys post-processor, EnSight, to create a PLY file, then an open-source 3rd Party tool, Meshlab, to make an OBJ.

Note 1: As soon as Ansys supports 3MF or OBJ or someone adds a 3MF/OBJ ACT Extension, we will update this article.

Note 2: The steps below are actually covered in the post in Post 2 on how to use EnSight and Post 5 on how to make usable 3D result files. But I’ll repeat them here since you may have only come to learn how to make a 3D result file.

Step 1: Get what you want to print as PLY in Ansys EnSight

Ansys Ensight is a powerful tool that does so much more than make 3D result files. But we will focus on this particular capability because we can use it to get our 3D Printed results.

In Post 2 of this series, I go over how to get a high-quality 2D image from EnSight. Review it if you want more details or if you run into problems following these steps.

Before we get going, one key thing you should know is that Ansys EnSight reads a ton of formats, and one of them is the result files from Ansys Mechanical APDL. So we will start with getting that file.

The program reads Ansys Mechanical APDL result files. These are created when you run Ansys Mechanical and are stored in your project directory under dp0/SYS/MECH and is called file.rst or file.rth. I like to copy the result file from that directory to a folder where I’m going to store my plots and also rename it so I know what it is. For our impeller model, I called it impeller-thin-modal-1.rst.

Once you have your rst file, go ahead and launch EnSight.

That brings up a blank sessions. To get started click File > Open

This will bring up a dialog box for specifying a results file. If you click on the “File type:” dropdown, you will see the long list of supported files it can work with. Take a look while you are there and see if any other tools you use are listed. Of course, Ansys FLUENT and CFX are in there.

But the one we want is Ansys Results (*.rst *.rth *.rfl *.rmg). Chose that, then go to the directory where you put your Ansys result file.

EnSight will read the file and put it in a Case. It will list the results as Part 0 under Case 1.

The left part of the screen shows what you have to work with, and the right shows your model. The “Time” control, circled in green, is where you specify what time, substep, or mode you want. The “Parts” control lets you deal with parts, which we really won’t use. And the “Variables” control, circled in orange, is how you specify what result you want to view.

We want to plot deflection, which is a vector. Click on the + sign next to Vectors, and you get a list of what values you can show. The only supported result for model analysis is Displacment__Vibration_mode. Click on that. Then hold down the right mouse button and select “Color Part” > All.

This tells the program to use that result to shade the part. You should now see your contour.

Our example is a modal result. If you use a structural result file, you will be able to plot the displacement vector, as well as many stress results, under “Scalars”

By default, EnSight shows an undeformed object. If you want to see the deflected shape, click on the part then on the “Displacement” icon above the graphics window. Select the vector result you want to use, displacement in this case. Note, the default displacement factor may not be a good guess, change that till you get the amount of deflection you want.

Note, the default displacement factor may not be a good guess, change that till you get the amount of deflection you want.

The other thing you may want to change is the contours. It has a full library of colors you can change to, but I like the default. What I don’t like is that the min and max may not be where I want them, especially for modal deflection results. The min and max values are the min and max in the result file, and unless you normalize your results, you should tweak the values for your 3D print.

Here is the default color scheme for my 40th mode:

To change the range, click on the contour key and Right-Mouse-Button on the legend, and select Edit… This brings up the Create/edit annotation (legends) dialog. Then click “Edit Pallet…” at the top of that dialog to get to the Pallete editor.

You can make lots of changes here, but what I recommend you do is only change the min and max values. If I set the max to 50, I get this contour on my result:

Next, we wan to save as PLY.

Go to File > Export > Geomtric Entities.

In the dialog, chose PLY Polygonal File Format. This will be the generic format we can convert into something GrabCad likes. Make sure you specify which times or modes you want. By default, it will make a PLY for each one. Also, make sure you have selected the part.

Now you have a color-coded, faceted representation of your results, in a 3D file format. Just not one that GrabCADPrint currently supports.

Step 2: Convert to OBJ in MeshLab

Now we need MeshLab. There are many other tools the read PLY files and output to other formats, but MeshLab has not let me down yet. It is opensource, does everything, and is a pain to use. You will laugh at the user interface. But as ugly as it is, it works. You can download MeshLab from www.meshlab.net. Once you have it installed, follow these steps:

  • Open MeshLab
  • Chose File > Import Mesh
  • Spin it around, look at it. You could scale and transform. But we just want to convert it.
  • Chose File > Export Mesh As
  • Scroll down in the File of Type dropdown and pick Alias Wavefront Object (*.obj)
  • Save
  • Make sure you have only Color checked for Vert. Then click OK

Here is an OBJ file from the example above.

That is it. Import that file into Stratasys GrabCAD Print and have at it.

I printed a different mode shape, but I think it looks fantastic. Click to get the full-resolution version.

Closing thoughts

And this ends our series on getting output from Ansys Mechanical, circa early 2021. It was just going to be one article on getting higher resolution images, but it grew a bit. We hope you find it useful.

Remember, PADT is here to help. We are proud to be an Ansys Elite Channel Partner offering Ansys products across the southwestern US.

PADT has been doing this for a while, and we can offer help in terms of one-on-one support, training, customization, and consulting services. Although this article focused on Ansys Mechanical, we cover the physics across the Ansys product line with experienced engineers in every area. And don’t forget we do 3D Printing as a service as well as product design.

Please contact us to learn more.

Example of full color part with mapped image, created from 3MF file format brought into GrabCAD Print and printed on a Stratasys PolyJet 3D printer. (Image courtesy GrabCAD)

3MF Printing Format Comes to GrabCAD Print

Example of full color part with mapped image, created from 3MF file format brought into GrabCAD Print and printed on a Stratasys PolyJet 3D printer. (Image courtesy GrabCAD)

Example of full color part with mapped image, created from a 3MF file-format brought into GrabCAD Print and set up to print on a Stratasys PolyJet 3D printer. (Image courtesy GrabCAD)

What is the 3MF format? How does it differ from the standard STL format? And what can you do with it, especially if your 3D printers run GrabCAD Print software from Stratasys?

For most designers, engineers and users involved in 3D printing, regardless of the 3D CAD software you use, you save (convert) your model to print as an STL format file. A lot has been written about it, including a PADT post from back in 2012 – and STL-wise, things really haven’t changed. This format approximates the native CAD solid model as a closed surface comprising small triangles of various shapes and sizes. STL has been the standard since the AM industry began, and although different CAD packages use different algorithms to create the mesh, for the most part, it’s worked pretty well.

A Sample STL File Segment

However, an STL file is simply a large text file listing the Cartesian coordinates for each vertex of the thousands of triangles, along with info on the normal direction:

Sample code from saving a CAD model in STL format.

A modest number of large triangles produces relatively small files but doesn’t do a good job of reproducing curves (think highly faceted surfaces); conversely, big files of many small triangles produce much smoother transitions but can take a long time to process in slicing software.

And, perhaps the biggest negative is that an STL file cannot include any other information: desired color, desired material, transparency, internal density gradient, internal fine structure or more.

What is 3MF?

In early 2015, Microsoft and a number of other major corporations including Autodesk, Dassault Systèmes, HP, Shapeways and SLM Group created a consortium to address these issues. They decided to overhaul a little-used file format called the 3D Modeling Format (3MF), to make it support highly detailed 3D model information and be more useful for 3D printing and related processes.

Logo 3MF Consortium

This ongoing consortium project defines 3MF as “a set of conventions for using XML to describe the appearance and structure of 3D models for the purpose of manufacturing (3D printing).”

In developer language, 3MF is a standard package or data that follows a core specification and may include some task-specific extensions.

In user terms, a 3MF file contains some or all of the following information in ASCII format:

  • Metadata about part name, creator and date
  • Information on the mesh of triangles (yes, it still creates and uses these, but does it better for a number of reasons, one of which is that it cannot create non-manifold edges (i.e., triangles that share endpoints with more than one triangle, which confuses the printer))
  • Color information (throughout the complete part body or in sub-sections)
  • Ways to define multiple materials combined as a composite
  • Texture information – what it is and where to place it
  • Ways to assign different materials to different sections of a part
  • Ways to duplicate information from one section of a part to another section, to save memory
  • Slicing instructions

Without getting into the nitty gritty, here are just two examples of XML code lines from 3MF metadata sections:

Example code of saving a solid CAD model in 3MF format.

Meaning, information about the part number and the part color rides along with the vertex coordinates! For a deep-dive into the coding schema, including a helpful glossary, see the 3MF github site; to learn how 3MF compares to STL, OBJ, AMF, STEP and other formats, check out the consortium’s About Us page.

Exporting 3MF Files

Now, how about using all of this? Where to start? Many 3D CAD software packages now let you save solid models as 3MF files (check out your “Save As” drop-down menu to verify), but again, they can vary as to what information is being saved. For example, a SolidWorks 3MF file can generate data on color and material but does not yet support transparency.

Here are all the options that you see in SolidWorks when you click the arrow next to “Save As”:

Second step in SolidWorks for saving a file in 3MF format: check off “include materials” and “include appearance.” (Image courtesy PADT)

“Save As” window in SolidWorks 2019, where step number one is to select “.3mf” format. (Image courtesy PADT)

You can select “.3mf” but don’t Save yet. First, click on the “Options” button that shows up below the Save as File Type line, opening this window:


Second step in SolidWorks for saving a file in 3MF format: check off “include materials” and “include appearance.” (Image courtesy PADT)

You need to check the boxes for “Include Materials” and “Include Appearances” to ensure that all that great information you specified in the solid model gets written to the converted file. A good, short tutorial can be found here.

Another interesting aspect of 3MF files is that they are zipped internally, and therefore smaller than STL files. Look at the difference in file size between the two formats when this ASA Omega Clip part is saved both ways:

Comparison of file size for STL versus 3MF formats.

The 3MF-saved file size is just 13% the size of the standard STL file, which may be significant for file manipulation; for files with a lot of detail such as texture information, the difference won’t be as great, but you can still expect to save 30 to 50%.

Working with 3MF files in GrabCAD Print

Okay, so CAD programs export files in 3MF format. The other half of the story addresses the question: how does a 3D printer import and use a 3MF file? Developers of 3D printing systems follow these same consortium specifications to define how their software will set up a 3MF file to print. Some slicers and equipment already act upon some of the expanded build information, while others may accept the file but still treat it the same as an STL (no additional functions enabled so it ignores the extra data). What matters is whether the system is itself capable of printing with multiple materials or depositing material in a way that adds color, texture, transparency or a variation in internal geometry.

GrabCAD Print (GCP), the cloud-connected 3D Printer interface for today’s Stratasys printers – both FDM and PolyJet – has always supported STL and native CAD file import. However, in GCP v.1.40, released in March 2020, GrabCAD has added support for 3MF files. For files created by SolidWorks software, this adds the ability to specify face colors, body colors and textures and send all that data in one file to a PolyJet multi-material, multi-color 3D printer. (Stratasys FDM printers accept 3MF geometry and assembly structure information.)

For a great tutorial about setting up SolidWorks models with applied appearances and sending their 3MF files to GrabCAD Print, check out these step-by-step directions from Shuvom Ghose.

Example of setting up a textured part in SolidWorks, then saving the file in 3MF format and importing it into GrabCAD Print, for printing on a full-color Stratasys PolyJet printer. (Image courtesy GrabCAD)

Example of setting up a textured part in SolidWorks, then saving the file in 3MF format and importing it into GrabCAD Print, for printing on a full-color Stratasys PolyJet printer. (Image courtesy GrabCAD)

At PADT, we’re starting to learn the nuances of working with 3MF files and will be sharing more examples soon. In the meantime, we suggest you download your own free copy of GrabCAD Print to check out the new capabilities, then email or call us to learn more.

PADT Inc. is a globally recognized provider of Numerical Simulation, Product Development and 3D Printing products and services. For more information on Stratasys printers and materials, contact us at info@padtinc.com.