**2. Workflow**

The use of products derived from 3D mesh models and computer aided design (CAD) techniques in healthcare is rapidly growing. Applications include: planning surgical procedures for hepatic & renal cancer resection; innovative cardiac and vascular device testing for paediatric and adult populations; visualisation of complex head and neck anatomy for neurosurgeons; practicing procedures ex vivo; training models and educating clinicians and patients [9–13]. Models of heart [2], renal collecting system [14], kidney [15] and brain [16, 17] have been previously developed. Model production requires knowledge of how to segment the region of interest from medical image data, manipulate the resulting 3D model and prepare stereolithographic (.stl) files for 3D printing.

In this section we present a pipeline that converts medical images of body structures to 3D print models. Particularly, we discuss how to load and manipulate 3D medical image data, use simple processing tools to extract volumes and structures from the images, export those volumes into 3D printing software where they can refine and repair their models. We demonstrate our streamlined processing pipeline on 3D printed model of a lung, which was fabricated using filament deposition-modelling additive printing technique. This model was segmented from medical data using the freely available segmentation software Slicer.

This section will be of interest to students and professionals from medical biomedical and engineering backgrounds that wish to learn basic image processing and volume extraction techniques. The materials will make it possible to develop 3D models from medical images, which can be used as a learning aid to help visualise anatomy. As shown in **Figure 2** the process starts with a 3D medical image, from which a structure will be extracted. The particular nature of the image will inform how it is processed.

#### **2.1. Imaging**

The nature of the imaging data depends on the specific imaging technology and the region of interest being imaged (see **Table 1**). Image resolution can vary between 0.1 and 8 mm, while image intensity can be due to density, light absorption of acoustic impedance. The main medical data file types are DICOM, NIFTI and MINC. DICOM is a universal image format and file sharing protocol, suitable for multiple image modalities and very widely used. It is easy to import into most software. NIFTI is a format designed specifically to store neuroimaging data. This format is compatible/viewable with several specific software packages. MINC is a format used with certain brain imaging software.

#### **2.2. Segmentation**

**Figure 2.** Outline of the workflow from medical images acquisition to application of 3D printed models.

Within recent years there has been exponential growth in healthcare related 3D printing research (as shown in **Figure 1**). This growth is translating into clinical practice as accessibility to 3D printers increases. One of the drivers for the growth 3D printing within healthcare is a trend towards development of 'personalised' medicine. Personalised medicine is "a move away from a 'one size fits all' approach to the treatment and care of patients with a particular condition, to one which uses new approaches to better manage patients' health and target therapies to achieve the best outcomes" [1]. 3D printing has been shown to be useful for: patient education [2–4] education for healthcare professionals [5], procedure planning [6, 7] and prosthesis / implant production [8] and is set to be promising in the areas of regenerative medicine and tissue engineering. Before we describe each above-mentioned section, we will

highlight the workflow from medical images acquisition to application (see **Figure 2**).

**Figure 1.** Chart demonstrating the number of citations in PubMed (https://www.ncbi.nlm.nih.gov/pubmed/) per annum from 2000 to 2017 in PubMed using the search terms '3D printing', '3D printing surgery', '3D printing medicine', '3D

**1. Introduction**

116 3D Printing

printing radiology'.

The next stage of the image-processing pipeline is segmentation, which refers to the extraction of a specific 3D volume from a set of image data/slices. It is used to locate objects and boundaries in each slice that corresponds to the tissue of interest. As it is done slice by slice, a volumetric data is gradually built up. It can be used to create patient specific, highly accurate models of organs, tissue and pathology. Many software packages are available [10, 18], here we mention only Slicer. The volume can be extracted using basic or advanced segmentation techniques.


• Expectation maximisation (EM)

accurately (**Figure 4**).

tively, but key methods include:

which need to be repaired before printing

subtracting volumes from, the mesh.

gated by smoothing the surface of the mesh model

**2.3. Refinement**

• Repairing

• Smoothing

• Appending

The algorithm finds the maximum likelihood of label distribution in a probabilistic manner. This framework is highly complex but can be a powerful tool for modelling the data

Patient-Specific 3D Printed Models for Education, Research and Surgical Simulation

http://dx.doi.org/10.5772/intechopen.79667

119

Following segmentation of the 3D volume the next stage is refinement, which refers to the wide range of techniques used to convert a rough 3D segmentation into a finished, printable model. The full range of possible refinement techniques is too large to be described effec-

Errors and discontinuities can sometimes arise in the segmentation & exporting process,

Staircasing errors resulting from the resolution of the original medical image can be miti-

The segmentation will often only be one component of a final model. To convert the model into a final, useable form it is often necessary to combine it with other structures to, or

**Figure 3.** Examples of basic segmentation tools: (a and b) manual, (c) thresholding, (d and e) cropping.

**Figure 4.** Advance segmentation tools: (i) region growing, (ii) parametric models—snakes.

**Table 1.** Main imaging modalities, CT-computed tomography, MRI-magnetic resonance imaging, SPECT/PET-single photon emission computed tomography/positron emission tomography

#### *2.2.1. Basic techniques*

• Manual segmentation

User identifies boundaries and manually draws around the shapes using a paintbrush tool.

• Thresholding

Pixels are partitioned depending on grayscale value. This effectively converts a grey-scale image to a binary image with one intensity representing tissue to be included in the model and the other representing that which should be excluded. This is most effective when the target tissue is a different intensity to the background.

• Cropping

Restricting the segmentation to a certain volume of space (**Figure 3**).

#### *2.2.2. Advanced techniques*

• Edge based methods—region growing

'Seeds' are positioned by the user and grow to fill regions defined by boundaries in the image. Works well when regions are well defined for example contrast enhanced medium to large arteries. If the data is noisy or edges are not clear, the segmentation may 'leak'.

• Parametric models—snakes

The algorithm attempts to model the edges by minimising an energy term. This is minimised when the contour is on the object boundary and when the contour is as regular and as smooth as possible. It is useful for interpreting incomplete images and is robust to noise, but it can be slow to compute.

• Expectation maximisation (EM)

The algorithm finds the maximum likelihood of label distribution in a probabilistic manner. This framework is highly complex but can be a powerful tool for modelling the data accurately (**Figure 4**).

#### **2.3. Refinement**

Following segmentation of the 3D volume the next stage is refinement, which refers to the wide range of techniques used to convert a rough 3D segmentation into a finished, printable model. The full range of possible refinement techniques is too large to be described effectively, but key methods include:

• Repairing

Errors and discontinuities can sometimes arise in the segmentation & exporting process, which need to be repaired before printing

• Smoothing

Staircasing errors resulting from the resolution of the original medical image can be mitigated by smoothing the surface of the mesh model

• Appending

*2.2.1. Basic techniques*

118 3D Printing

• Thresholding

• Cropping

• Manual segmentation

*2.2.2. Advanced techniques*

• Parametric models—snakes

but it can be slow to compute.

• Edge based methods—region growing

User identifies boundaries and manually draws around the shapes using a paintbrush tool.

**Table 1.** Main imaging modalities, CT-computed tomography, MRI-magnetic resonance imaging, SPECT/PET-single

Pixels are partitioned depending on grayscale value. This effectively converts a grey-scale image to a binary image with one intensity representing tissue to be included in the model and the other representing that which should be excluded. This is most effective when the

'Seeds' are positioned by the user and grow to fill regions defined by boundaries in the image. Works well when regions are well defined for example contrast enhanced medium to large arteries. If the data is noisy or edges are not clear, the segmentation may 'leak'.

The algorithm attempts to model the edges by minimising an energy term. This is minimised when the contour is on the object boundary and when the contour is as regular and as smooth as possible. It is useful for interpreting incomplete images and is robust to noise,

target tissue is a different intensity to the background.

photon emission computed tomography/positron emission tomography

Restricting the segmentation to a certain volume of space (**Figure 3**).

The segmentation will often only be one component of a final model. To convert the model into a final, useable form it is often necessary to combine it with other structures to, or subtracting volumes from, the mesh.

**Figure 3.** Examples of basic segmentation tools: (a and b) manual, (c) thresholding, (d and e) cropping.

**Figure 4.** Advance segmentation tools: (i) region growing, (ii) parametric models—snakes.

Mesh refinement can be performed using a variety of freely available software, including FreeCAD [19], MeshLAB [20], and Blender [21]. In the worked example below, extensive use is made of the Meshmixer [22], which is an easy to use mesh viewing and manipulation software, with several essential mesh refinement tools.

*2.4.1. Working example—Lung*

label the region.

click to label this region.

Apply to run the module.

Save to export the data.

removing leaks and filling in holes.

(Modules > Surface Models > Model Maker)

**14.** Open Meshmixer, free Mesh refinement software [22].

**1.** Obtain DICOM imaging data (For example, from the Osirix website [23]).

**3.** Load the DICOM data into the scene (DCM > Import > Select data > Load)

**4.** The default setting is to have four views of the data. You can scroll through the slices using the sliders above each view. For segmentation, it's easiest to just see one view, so

Patient-Specific 3D Printed Models for Education, Research and Surgical Simulation

http://dx.doi.org/10.5772/intechopen.79667

121

**5.** Scroll through the slices using the slider at the top of the view. We are going to be segmenting the lung on the left hand side of the view (this is actually the right lung). Find the

**6.** Open the segmentation editor (Modules > Segmentation > Editor) and select OK to choose

**8.** Use the tool to hover over the slice until the region of interest is outlined and left click to

**9.** Use the slider or the scroll wheel on your mouse to go to the next slice (A: 50.957 mm) and repeat the process – hover over the region of interest until it is outlined correctly, then left

**10.** Repeat on each slice in the volume where the lung is visible (up to A: 211.824 mm), highlighting and labelling the lung in each slice. Allow some time for this stage. Ensure that this is accurate – the segmentation technique has a tendency to leak or to not highlight the entire region. Use the EraseLabel and PaintEffect tools to correct errors of this form by

**11.** Convert the label map on each slice into a 3D volume using the ModelMaker tool.

**12.** In the Model Maker module, ensure that the Input Volume is set to have the same name as your label. Change the Model Name to 'lung' or another suitable name, then select

**13.** Export the model as a stereolithography file (.stl). Click File then Save. Your model should be listed as a .vtk file (lung.vtk). Ensure that the box next to this file is ticked, the other files on the list do not need to be ticked at this point. Change the file format in the drop down menu to .stl, and choose a suitable directory where the model can be saved. Click

slice at which the lung first becomes visible (A: 50.371 mm in the top right corner)

**7.** Select the Level Tracing Effect Tool in the 'Edit Selected Label Map' toolbox.

select the grey squares icon on the taskbar and set the view to Green slice only

**2.** Run 3D slicer software (Download and install [24]).

the standard colour scheme for the label map.

#### **2.4. 3D printing**

There are many different printing techniques, with many more different synonyms. It is beyond the scope of this chapter to give a complete description of every printing technique, therefore in this section we present a broad overview of current technologies. Almost all 3D printing technologies can be categorised into one of three main groups:


The first group of 3D printers extrude a material via a print head nozzle. The material is molten and deposited on the layer underneath, where it hardens again. The most commonly used materials are thermoplastics (polylactic acid (PLA), acrylonitrile butadiene styrene (ABS)), which are deposited with a technique called "Filament Deposition Modelling". Other techniques of note are "Wire and Arc Additive Manufacturing" (used for industrial scale metal prints), as well as "Material Jetting" (which utilises inkjet print heads). Using these techniques, a multitude of materials can be printed, including metal alloys, chocolate, and even wood or ceramic composites.

The second group of 3D printers selectively solidifies photopolymers. These are liquid materials that harden by exposure to light, typically ultraviolet light delivered via a laser. There are two key technologies: "Stereolithography" and "Poly Jetting". As the name of this group implies, these techniques can only print plastics. Another important technique is "digital light processing", which is very similar to Stereolithography, except that it uses a different kind of illumination.

The third group of 3D printers binds granules of the material by gluing or melting them. This method offers the widest choice of materials: glass, ceramics, many metals, and plastics. The technologies associated with this group are "Binder Jetting" and "Laser Sintering/Melting". More information about 3D printing techniques can be found on Ref. [18].

In order to print any model the file format (typically .stl or .obj) should be transformed into a language that the printer can understand (typically .gcode format). Freely available slicing software such as "Ultimaker Cura" or "Preform" help to perform this step. It converts the geometry of the model into a long series of coordinates, which the printer interprets to control the movement of an extruder or laser heads. Finally, the support material settings, print speed, temperature and other parameters should be optimised before starting to 3D print. To better understand this process, a worked example of the development of a lung model is described in the next section.

#### *2.4.1. Working example—Lung*

Mesh refinement can be performed using a variety of freely available software, including FreeCAD [19], MeshLAB [20], and Blender [21]. In the worked example below, extensive use is made of the Meshmixer [22], which is an easy to use mesh viewing and manipulation soft-

There are many different printing techniques, with many more different synonyms. It is beyond the scope of this chapter to give a complete description of every printing technique, therefore in this section we present a broad overview of current technologies. Almost all 3D

The first group of 3D printers extrude a material via a print head nozzle. The material is molten and deposited on the layer underneath, where it hardens again. The most commonly used materials are thermoplastics (polylactic acid (PLA), acrylonitrile butadiene styrene (ABS)), which are deposited with a technique called "Filament Deposition Modelling". Other techniques of note are "Wire and Arc Additive Manufacturing" (used for industrial scale metal prints), as well as "Material Jetting" (which utilises inkjet print heads). Using these techniques, a multitude of materials can be printed, including metal alloys, chocolate, and

The second group of 3D printers selectively solidifies photopolymers. These are liquid materials that harden by exposure to light, typically ultraviolet light delivered via a laser. There are two key technologies: "Stereolithography" and "Poly Jetting". As the name of this group implies, these techniques can only print plastics. Another important technique is "digital light processing", which is very similar to Stereolithography, except that it uses a different kind of illumination.

The third group of 3D printers binds granules of the material by gluing or melting them. This method offers the widest choice of materials: glass, ceramics, many metals, and plastics. The technologies associated with this group are "Binder Jetting" and "Laser Sintering/Melting".

In order to print any model the file format (typically .stl or .obj) should be transformed into a language that the printer can understand (typically .gcode format). Freely available slicing software such as "Ultimaker Cura" or "Preform" help to perform this step. It converts the geometry of the model into a long series of coordinates, which the printer interprets to control the movement of an extruder or laser heads. Finally, the support material settings, print speed, temperature and other parameters should be optimised before starting to 3D print. To better understand this process, a worked example of the development of a lung model is

More information about 3D printing techniques can be found on Ref. [18].

printing technologies can be categorised into one of three main groups:

ware, with several essential mesh refinement tools.

**2.4. 3D printing**

120 3D Printing

**1.** Extrusion printing

**2.** Photopolymerisation

**3.** Powder binding techniques

even wood or ceramic composites.

described in the next section.


**15.** Import your model (File > Import > Select your model from the directory > Open). You should now be able to see your lung model. There will be some errors, which we can fix in this refinement stage such as holes, non-manifold surfaces, rough edges etc. Basic commands: middle and left button on the mouse to translate, Alt and left click to rotate, scroll using middle button on mouse to zoom in and out.

Ultimaker printer. Due to the dimensional constraints of the Ultimaker printer, the model was printed at 90% size compared to the original CT image. The completed lung print is

Patient-Specific 3D Printed Models for Education, Research and Surgical Simulation

http://dx.doi.org/10.5772/intechopen.79667

123

**Figure 6.** Steps 5–6: Finding the correct slice and open the segmentation editor.

**Figure 7.** Step 7: Selecting the level tracing effect tool.

**Figure 8.** Step 8: Labelling the region of interest.

shown in **Figure 13**.


3D printed model of a lung was fabricated by an extruded thermo-plastic polymer printer (Ultimaker2; Ultimaker, Chorley, England) using PLA filament material (PolyMax; Polymakr, Changshu, China). The Ultimaker printer is a fused deposition modelling (FDM) printer, which works by depositing layers of print material from a nozzle, which moves in the horizontal plane, onto a print bed, which moves vertically (**Figures 5**–**12**). The Polymax material was chosen due to its relatively low cost, availability, and predicted ultrasonic reflectiveness. The enhanced PLA allows higher build quality and a reduced print failure rate. The STL file for a lung model was loaded into the Ultimaker CURA 3D printing software. This software allows selection of print options and generates the gcode files used by the

**Figure 5.** Steps 3–4: Importing the imaging data.

Ultimaker printer. Due to the dimensional constraints of the Ultimaker printer, the model was printed at 90% size compared to the original CT image. The completed lung print is shown in **Figure 13**.

**Figure 6.** Steps 5–6: Finding the correct slice and open the segmentation editor.

**Figure 7.** Step 7: Selecting the level tracing effect tool.

**15.** Import your model (File > Import > Select your model from the directory > Open). You should now be able to see your lung model. There will be some errors, which we can fix in this refinement stage such as holes, non-manifold surfaces, rough edges etc. Basic commands: middle and left button on the mouse to translate, Alt and left click to rotate, scroll

**16.** There are a number of filters that can be used to improve the quality of the model. Firstly, repair any holes using the inspector tool. (Analysis > Inspector > Auto repair all)

**17.** Then use the RobustSmooth tool (Sculpt > Brushes > RobustSmooth). You can set the strength, size and depth of the brush according to the application. It is best to start with a low strength and a larger size, then increase the strength and reduce the size as the structure becomes smoother. Move the brush over the surface of the model in a continuous way, not spending too much time on a particular area. You should be able to see that the surface becomes visually smoother as you do this. Make sure that you save multiple versions so that is possible to go back a step if you are not happy with the result at any stage.

**18.** The Flatten and Inflate brushes are also useful if there are unphysical holes that need to be filled in – use inflate to fill the holes then flatten and smooth so that the surface is continuous.

**19.** Once you are happy with the model, export the volume as a .stl file for final processing

3D printed model of a lung was fabricated by an extruded thermo-plastic polymer printer (Ultimaker2; Ultimaker, Chorley, England) using PLA filament material (PolyMax; Polymakr, Changshu, China). The Ultimaker printer is a fused deposition modelling (FDM) printer, which works by depositing layers of print material from a nozzle, which moves in the horizontal plane, onto a print bed, which moves vertically (**Figures 5**–**12**). The Polymax material was chosen due to its relatively low cost, availability, and predicted ultrasonic reflectiveness. The enhanced PLA allows higher build quality and a reduced print failure rate. The STL file for a lung model was loaded into the Ultimaker CURA 3D printing software. This software allows selection of print options and generates the gcode files used by the

using middle button on mouse to zoom in and out.

122 3D Printing

and printing. (File > Export > Save)

**Figure 5.** Steps 3–4: Importing the imaging data.

**Figure 8.** Step 8: Labelling the region of interest.


**Figure 10.** Steps 11–12: Creating a 3D volume using ModelMaker tool

**3. Applications**

**3.1. Patient education**

The following sections will describe in details the following applications: Patient Education (Section 8), Healthcare Professional Education (Section 3), Intervention Planning (Section 4),

Guidance from both the American Medical Association [25] and the General Medical Council in the UK [26] strongly advocates a collaborative approach by physicians with their patients.

Other Applications: Implants (Section 5.1) and (Tissue Engineering) (Section 5.2).

**Figure 13.** Final 3D printed model of a lung painted with acrylic paint.

**Figure 12.** Steps 16–17: Repair holes and smoothing, step 19 exporting the smoothed model as a .stl file.

Patient-Specific 3D Printed Models for Education, Research and Surgical Simulation

http://dx.doi.org/10.5772/intechopen.79667

125

**Figure 11.** Step 15: Importing the model to Meshmixer software.

Patient-Specific 3D Printed Models for Education, Research and Surgical Simulation http://dx.doi.org/10.5772/intechopen.79667 125

**Figure 12.** Steps 16–17: Repair holes and smoothing, step 19 exporting the smoothed model as a .stl file.

**Figure 13.** Final 3D printed model of a lung painted with acrylic paint.
