Professional Documents
Culture Documents
MimicsStudentEditionCourseBook PDF
MimicsStudentEditionCourseBook PDF
/ Introduction
Mimics (Materialise's Interactive Medical Image Control System) is Materialise’s software for processing
medical images and creating 3D models. Mimics uses 2D cross-sectional medical images such as from
computed tomography (CT) and magnetic resonance imaging (MRI) to construct 3D models, which can
then be directly linked to rapid prototyping, CAD, surgical simulation and advanced engineering analysis.
/ Overview
Materialise Overview
Materialise is an international company, best known for its activities in the field of rapid, industrial, and
medical prototyping. Started in 1990 as a spin off corporation from the University of Leuven in Belgium, it
began as a rapid prototyping service bureau. Since then, Materialise has grown into the world’s largest
rapid prototype producer. The company also enjoys a worldwide reputation as provider of innovative
software solutions. As such, Materialise has acquired the position of market leader for 3D printing and
digital CAD software in addition to being a major player in medical and dental image processing and
surgery simulation.
For the medical and rapid prototyping industries, Materialise offers an array of software solutions; Mimics
is the medical image based processing tool for creating 3D models, and linking the models to rapid
prototyping (RP), computer aided engineering (CAE), computer aided design (CAD), and surgery planning.
SurgiCase CMF is Materialise’s CT based craniomaxillofacial surgical planning software. It allows users
to import patient data, create 3D models, plan out the surgery, and rapid prototype surgical guides that
can be used during the operation to match the surgical plan. SimPlant is Materialise’s dental implant
planning software. Similar to SurgiCase, it allows users to plan dental implant surgeries and prepare
surgical guides for the operating room. All medical software packages developed by Materialise are FDA
approved. Magics RP is considered a powerful preprocessor for additive fabrication. It prepares 3D
object (STL) files for additive fabrication as well as performs easy mesh and geometry manipulation. 3-
matic is Materialise’s forward engineering software that allows advanced manipulation and design on an
STL file. It allows a user to perform ‘digital’ CAD operations (i.e. typical CAD operations on a STL file
instead of the traditional CAD files), and fix and remesh for CAE. Materialise ensures that all software
packages are ISO-9001 certified and that there is a seamless link between all packages.
Mimics history
After the start of the company Materialise in 1990 as a rapid prototyping company, it didn’t take long for
the company to see the analogy between RP and CT (or MRI) images; in RP, a 3D model is built slice per
slice, whereas a CT scanner does the reverse, it breaks down a 3D model (the human body) into a stack
of image slices. In 1992 Materialise wrote software that linked the image information to RP models. The
software allowed extracting 3D information from an image stack and building a 3D model from it, using RP
technology. Materialise’s Interactive Medical Image Control System (MIMICS) was born.
Segmentation
The medical images coming from CT or MRI scanners consist of grayscale information. Mimics allows the
user to create models based on the grayvalues (Hounsfield units in CT images) within these images. A
grayvalue is a number associated with an image pixel defining the shade (white, gray, or black) of the
pixel. There is a direct association between material density of the scanned object and the grayvalue
assigned to each pixel in the image data. Because of this, Mimics has the flexibility to create models from
any geometry distinguishable within the scanned data. By grouping together similar grayvalues, the image
data can be segmented, and models created. This type of segmentation is called thresholding and yields
accurate models.
Many of the segmentation tools in Mimics are common in image processing and can be applied in any of
the views (XY, XZ or YZ), but Mimics also has a unique 3D editing tool; an initial segmentation can be
optimized in a 3D preview (Figure 1). This makes editing very easy, since it allows true editing in 3D,
which is easier to comprehend than 2D editing.
Using the segmentation and known information on the pixel size and the distance between the image
slices, Mimics can calculate a 3D model (Figure 2). The accuracy in a Mimics model matches the
accuracy of an object captured within the scan.
All these applications require slightly different processing before they can effectively be used. Mimics
development continuously strives to optimize this “pre-processing” to ensure a fluent workflow from
images to application.
RP
The 3D object created within Mimics is an STL file. STL is the common language for rapid prototyping
machines and 3D printers and it can describe very complex geometries (like medical geometries). The 3D
object can be directly exported to rapid prototyping in either STL or Sliced file format; in the latter it also
allows support generation. Or it can be imported into Materialise’s Magics program for support generation
or for build optimization. Figure 3 shows how models exported from Mimics were prepared in Magics to
generate supports and duplicate the object to print multiple models at once.
Rapid prototypes from Mimics have many applications in the medical field. Considering the fact that the
human brain is optimized to work with something tangible, holding a physical model is always easier to
understand than a 3D model on a computer screen, no matter how good 3D graphics are.
CAE
Advancements in computer aided engineering (CAE) have provided engineers with the ability to test
designs prior to ever building a physical model. Analyses such as finite element analysis (FEA),
computational fluid dynamics (CFD), and kinematics allow researchers and engineers to put actual patient
data to the test without the inconvenience of physical testing. In FEA for example; a force is applied to a
certain anatomical part and CAE software then calculates the resulting stresses and strains. In order to do
so, CAE software divides the model in tiny, discrete elements and calculates the variables for every
element. The magnitude of the variable is usually visualized with colormaps.
In the early days of CAE, people used CAD designs as a starting point for their geometrical input. For
analyzing bridges or buildings this is understandable, but complex anatomical data is impossible to design
in a CAD package. Starting from image information ensures accurate geometry, stored in STL format.
Since STL also uses small elements (triangles) to describe a 3D model, the link with this application is
obvious. For RP however, the shape of the triangles is not important, but for CAE it is; very sharp
elongated triangles are not suitable for analysis, since the stress in one end of the triangle can be
significantly different from the stress in the other end. Therefore for accurate analysis, CAE softwares
require STL files that use equilateral triangles to describe the 3D. Figure 4 shows the difference between
an STL file prepared for RP compared to CAE. Hence, Mimics can optimize the shapes of the triangles
before exporting them for CAE analysis. Also to reduce the computation time in CAE software, the
number of triangles in a mesh must be reduced; this reduces the number of elements and nodes the
analysis programs have to calculate. The complete process of triangle shape optimization and triangle
reduction is called remeshing.
Figure 4. The difference between an STL file of an abdominal aortic aneurysm prepared
for rapid prototyping (left) and FEA (right).
Remeshing
Mimics has been designed to remesh 3D objects (STL files) from their original RP-ready format to a CAE-
ready format. To optimize the mesh and create equilateral triangles, Mimics will analyse the shape quality
of each triangle. After the quality of each triangle within a mesh is understood, Mimics can automatically
perform the remeshing processes described in the above section. This will quickly prepare anatomical
models for CAE analyses. For highly sensitive analyses and for more user control and definition, Mimics
has the option to perform manual remeshing. This allows a user to manually edit triangles and control the
triangle reduction and size.
The remeshing process in Mimics also allows one to analyse an anatomical assembly. Researchers and
engineers alike will use Mimics to prepare a study of multiple anatomical models interacting together or
anatomical data interacting with manufactured device designs. While running a finite element analysis of
an assembly it is important for two mating surfaces to have node-to-node matching. Mimics will create
this node-to-node matching from two seperate STL files as shown in figures 5, and 6.
By utilizing Mimics’ remeshing tools, a user can observe actual anatomical data reacting under applied
constraints (loads, flow, heat, etc.).
Volume Mesh
STL is a surface representation. To do an analysis, a complete volume description is needed. Generating
a volume mesh from an optimized surface mesh is straightforward. From a triangle surface mesh a
tetrahedral volume mesh can be generated. A tetrahedral and hexahedral mesh can be created within
rd
Mimics or within a 3 party volume mesh generation package. This volume mesh generation flexibility
allows a user to determine what parameters and settings are most important depending on application
and preference.
Material properties
Most CAE programs allow the user to assign constant material properties for individual objects.
Anatomical structures, such as bone, have varying material properties throughout the structure. In the
greyscale images from the CT scan there is more information than just the geometrical shape of an
anatomical part. As described in the section about segmentation, the grayvalues represent material
density. This information is used in Mimics to accurately assign material properties to the elements of the
volume mesh (Figure 7).
Figure 7. Distributed material property assignment for an FEA analysis based on the grayvalues in a CT
scan. Colored visualization of the material properties of the different elements in a section of a femur; the
softer trabecular bone is blue/green, whereas the denser cortical bone is orange/red.
CAD
For engineers designing equipment such as medical implants and devices, Mimics has provided a link to
take patient data directly to the 3D CAD platform for design, verification, and sizing studies. The Mimics
CAD link allows users to create IGES curves and surfaces from anatomical surfaces and import them into
any CAD software.
For true CAD applications, the surface needs to be mathematically described (NURBS). This process of
reverse engineering is quite tedious and time-consuming and leads to a simplification of the surface. To
be able to design accurate implants, it is best to keep working on STL level. Also here, 3-matic (by
Materialise) fills a need; it allows design changes directly on the STL. 3-matic is described in more detail
in chapter 3.5.1.
Surgical Simulation
Mimics helps bridge the gap between clinicians and engineers. With Mimics’ surgical simulation functions,
a surgery can be performed within the virtual world prior to entering an operating room (OR). Typical OR
procedures can also be performed in Mimics (e.g. cut, move, reposition, resize). Mimics can import
objects such as surgical guides, devices, and implants and position them as prepared for surgery.
A user can then begin to analyze the placement of the imported implant/device. This helps both
engineers designing the implant and surgeons placing the implant understand a design’s fit and function
as in figure 8.
Figure 9. Anthropometric Analysis and the visualization of the analysis points on a reconstructed X-ray.
As is clear from this chapter, Mimics provides a link to many applications. This opened up possibilities in
many markets. The major industries that use Mimics are Orthopaedic, Cardiovascular, and cranio-
maxillofacial (CMF). Many tools within the software have been designed to fulfil needs and requests of
these markets. Other industries Mimics is also used in include tissue engineering, anthropology,
technical/industrial design, and pulmonary study. Because Mimics is used in multiple markets, it is
important for the software to have features that fit each market. Therefore Mimics has a modular structure
and users can tune the software to their needs by extending the basic package with additional modules.
Users of Mimics often identify tools that would make their research and work more efficient. This user
feedback is invaluable for the development of the software and to create a well rounded, highly effective
research tool.
Of course Mimics provides a seamless link with other Materialise software; Magics for RP applications
and 3-matic for CAE or design (CAD). E.g. 3-matic can design implants based on the image information
coming from Mimics and the design can then be verified again in Mimics on the image data of the patient.
Anything in italics and double quotation marks represents what you should type.
1.1 Explanation
To process data in Mimics, a set of stacked 2D cross-sectional images is first imported. These 2D images,
commonly in the DICOM format, come from medical scanning equipment. Once the stacked images are
imported, they can be viewed and edited using the various tools available in Mimics. The quality of the
the 3D images that Mimics can create directly correlates to the slice thickness and pixel size of the 2D
images.
The Mimics screen is broken up into four main views; coronal, axial, sagittal, and 3D. Engineers can think
of coronal as a front view, axial as a top down view, and sagittal as a right view. The axial view comes
from the imported stack of images. To obtain the coronal and sagittal views, Mimics transposes the axial
images into their respective positions. The 3D pane is where 3D models are visualized. Clicking on an
image with the left mouse button automatically updates your location in all views.
Each of the 2D views contains a slice number in the lower right corner. The axial view also has a table
position in the bottom left corner which describes the slice’s location in reference to the origin of the
scanner table.
The main toolbar contains dropdown menus for most of the tools available in Mimics. Below the main
toolbar is an icon list of frequently used tools.
3. Select the Unzoom tool and click on the same image you just zoomed in on.
4. To create a full screen view, select Zoom to Full Screen and click anywhere on the images. To
restore the images’ size click on Zoom to Full Screen again.
5. Select Pan Once in the main toolbar. Left click and drag on a view to pan an image.
6. Click on Unzoom and then the view you want to restore to return the image to its original location.
Shortcuts
Key combinations can be used in place of certain tools, like the tools learned in the Zooming and Panning
exercise. These shortcuts can help optimize image processing and workflow.
3. Click on the Context Help icon in the main toolbar and then click on any tool to view its help file.
Note – The step of importing images is not explained in this tutorial since Mimics Student Edition does not
allow importing. However, information on importing images can be found in the help files under the ‘Contents’
tab by selecting ‘Mimics Tutorial’ and then ‘Import’.
Project Management
Each tab of the project management toolbar represents a type of object in Mimics. All of the objects
for a project are shown here. The most frequently used tools for each tab are located along the
bottom of the tab; however, the full list of tools can be seen by clicking on the Actions button .
2. Click through the tools of the different tabs to familiarize yourself with what is available.
Windowing
The gray values of CT images are expressed according to the Hounsfield scale shown below, which
has 4096 values. To map this scale onto the 256 gray values of your computer, Mimics has a feature
called windowing. Windowing is a tool to adjust the image contrast.
The histogram pictured shows the window of pixels mapped in the image. The shortcut for changing
the contrast of an image is to right click on an image and drag the mouse.
Differences between fat, soft tissue, muscle, and even bone can be emphasized depending on the
window chosen.
Volume Rendering
Volume rendering allows you to quickly visualize your 2D data as a 3D object without having to take
the time to segment and create a model. It is only a visualization tool, but gives a nice impression of
what your model will look like.
1. Go to the Volume Rendering tab at the bottom of the project management tabs and select
‘Bone and Soft Tissue’ from the pulldown menu.
3. Go through the pulldown menu selecting the different predefined settings to see all of the
visualization options.
4. Turn off volume rendering by clicking the Volume Rendering button again.
Volume rendering can consume a lot of system resources slowing down computer processing time, so
remember to turn it off when you are done.
Measurement Tools
Measurement Tools
Different tools are available to collect information from scanned images. Measure Distance and
Measure Angle calculate data from either the 2D scans or 3D model. Any of these measurements
can then be exported to text for further analysis in statistical packages.
1. Scroll to axial slice 180.5 and click Measure Distance under ‘Tools’ in the main toolbar.
The measurement is displayed on the screen and in the ‘Measurements’ tab. To hide the
measurement simply click on the eyeglasses in the tab.
3. Scroll to axial slice 69.5. In the ‘Measurements’ tab select New , then Measure Angle
4. Measure an approximate
angle of the jaw by clicking
once to start the
measurement, click again to
select where the angle’s
vertex is, and click once more
to end the measurement.
To change the location of the endpoints or vertex of the angle, drag the crosshairs.
You can change the size of the density tool by grabbing the handles. As you scroll through the image,
the location of the measurement will not change. The same type of tool is also available in a
rectangular shape - Measure Density in Rectangle .
The annotation’s text can be moved by left clicking on the text and dragging.
1.3 Homework
On the skull dataset from above, find the following measurements: the vertical distance from the top of the
skull to the bottom of the skull, the angle between the spine and the bottom of the jaw, the density of the
skull. You will need to decide which views to use for each measurement.
2.1 Explanation
The first step in creating a 3D image from 2D data is segmentation. Mimics has several tools to segment,
or section, regions of interest. For example, Thresholding is used to classify all pixels within a certain
Hounsfield range as the same color, or mask. By setting only a lower threshold value, all pixels higher or
equal to the set value will comprise the same mask. Alternatively, an upper and lower threshold value
can be set. In this case, the pixels falling within the designated range will make up a single mask.
Drawing a Profile Line can be helpful with setting threshold values since it shows how the gray value
changes along a line in an image. Different sections of an image can be highlighted using different masks.
The mask that is selected in the project management ‘Masks’ tab is considered the active mask.
After thresholding, a mask may need to be separated into numerous objects. Region Growing allows
just this and is also useful for removing floating pixels. With Dynamic Region Growing thresholding
does not need to be done first. Instead, Mimics creates a mask based off of how surrounding pixels
compare to a selected datapoint’s grayvalue, automatically determining threshold values. This tool
proves very useful for segmenting structures such as blood vessels and nerves.
To further segment various parts of an image, Mimics has a selection of editing tools. Edit Mask provides
the tools needed to draw, erase, or locally threshold a specific mask. Crop Mask restricts segmentation
to a designated area by removing everything from a mask that is outside a selected bounding box.
To perform the transformation from 2D into 3D, Calculate 3D is used. Different options are available for
the quality of 3D model created. Low and medium quality have short calculation times but may produce a
more approximated model. High quality can give a smoother, more accurate model, however the most
accurate will be from using the optimal setting. If necessary, 3D calculation parameters can be set
manually using the custom setting. For more information on quality settings and parameters, see
“Calculate 3D” in the help files.
Depending on the type of file output needed, Mimics has various exporting options including exporting in
the STL format or even exporting movies.
In this section, you will use two different methods to create a mask displaying the hip. Then you will
calculate 3D models of both masks.
Thresholding Toolbar
Thresholding classifies all pixels within a certain Hounsfield range as the same color, or mask. There
are predefined settings for certain biological materials available in the thresholding toolbar. A lower
threshold allows segmentation of soft tissue, whereas a higher threshold segments bone.
1. Open the ‘hip_se.mcs’ project.
2. Select Thresholding in the main toolbar under segmentation.
You can manually set the threshold by changing the minimum and maximum values.
A mask is visible when the eyeglasses under the ‘Visible’ column of the ‘Masks’ tab are showing. A
mask is considered active when it is highlighted. Any editing will be performed on the active mask.
Draw Profile Line is another way to threshold an image, as done in the previous exercise. This tool
displays how the gray value changes along a line within the image.
You want the profile line to cross over your region of interest and into surrounding regions. You will see a
spike at the beginning and end of the graph as the profile line transitions from soft tissue to bone and then
back to soft tissue. Clicking ‘Scale to Fit’ provides a zoomed in view of the peaks along the profile line.
5. Leave the upper threshold at 1634 and the lower threshold at 226.
You can move the upper and lower threshold values by clicking ‘Start thresholding’ in the ‘Profile Lines’
dialog box. You will see horizontal lines to indicate these values. Lowering the threshold selects soft
tissue and increasing the threshold selects dense cortical bone. Threshold values can also be changed
in the ‘Thresholding’ dialog box. In this case a good threshold for bone is the predefined bone (CT) setting
which is 226 to 1634. Otherwise, a rule of thumb for selecting bone on CT images is to put the lower
threshold on 1/3 of the cortical peak.
You will see the profile line appear in the measurement tab of the project management toolbar. If you
need to find where a profile line is located, click the Locate button .
Region Grow
Region growing is used to separate masks into different parts as well as to get rid of floating pixels.
Remember that thresholding must be done prior to region growing.
1. Select Region Growing from the ‘Segmentation’ toolbar. The mouse will turn cross-shaped.
If you uncheck ‘Leave Original Mask’, all selected information will be removed from the target mask and
placed in the source mask (compare it to cut and paste).
You will notice that now the cyan mask only contains bone, unlike the green mask which included other
structures as well.
This step is needed so that later we can compare the 3D models of the mask created using thresholding
versus the mask created using draw profile line.
Calculate 3D
3D button .
This button can be found at the bottom of the mask tab, under segmentation in the main toolbar, or in the
icon list on the main toolbar. Most major tools have three locations; in their corresponding tab of project
management, under their specific heading in the main toolbar, and as an icon in the main toolbar.
Custom parameters can be set for the 3D calculation. For more information on these settings look under
‘calculate 3D’ in the help files. If a message pops up saying the resulting 3D model will consist out of
different parts, click ‘No’. Receiving such a message indicates your mask contains multiple objects and
unless you want this, you should redo a region grow on the mask.
4. Rotate the 3D model by holding the left mouse button in the 3D view and moving the mouse
around.
Clicking near the center of the object will rotate around the vertical and horizontal axes. Clicking outside
the center of the object will rotate around the axis perpendicular to the viewing angle. If you want to
remove the toggle reference planes from the 3D pane, click Toggle Reference Planes .
Editing Tools – Now we will crop the image to show only the region of interest and perform editing to
separate the pelvic bone from the vertebral column.
Crop Mask
With Crop Mask you can manually change the boundaries of your mask or enter the desired
coordinates.
You can also crop the mask by resizing the bounding box on the image.
Now the mask will only be shown in the region that was outlined by the crop mask bounding box. (To
achieve the same view as the pictures for step 4, the other masks’ visibility have been turned off)
Edit Mask
The area contained within a mask can be modified using the edit mask tools. We will use such tools to
separate the vertebral column from the pelvic bone.
1. Make sure the ‘Bone2-
Threshold’ mask is
active. Zoom in on axial
slice 115.
2. Click Edit Masks under ‘Segmentation’ and select ‘Erase’ in the Edit Masks toolbar.
3. Set the ‘Type:’ to circle, check the ‘Same Width & Height’ box, and set the ‘Width:’ to 20 (the height
will automatically be changed to 20 also).
Other tools in Edit Masks include ‘Draw’ which adds pixels to the active mask and ‘Threshold’ which applies
a local threshold of your choice to the area you select.
Since we separated the pelvic bone, only the vertebral column should appear in the 3D model. If your
model has more than this, there is most likely a connection that has not been broken. You will need to go
back through the slices to do editing to break this connection.
Dynamic Region Grow allows you to grow a mask from a selected point without having to threshold
first. It is extremely useful for vessels, nerves, and arteries.
3D Tools
The 3D tools allow different visualization options for the 3D model as well as provide information about
the model.
Here you can change the color and name of the 3D model. If you click ‘Details>>’ you will notice several
measurements including surface area and volume.
When a 3D model is visible, clicking the contour visible eyeglasses will highlight the contours of the 3D
object in the 2D views.
This option allows you to view the triangulated surface mesh of the object. For better visualization of the
triangles, zoom in on the 3D image (hold Ctrl and the right mouse button while moving the mouse
vertically).
5. Click the same eye glasses to turn the triangle visibility off.
6. Select Toggle Transparency in the 3D toolbar. You are able to view the internal shape of
the 3D object. Click Toggle Transparency again to return to normal.
Clipping slices the 3D model according to the view you select, displaying the object’s cross-section.
10. To clip according to another viewing plane, simply select that view under ‘Active’ (example
sagittal or coronal). You can also change the texturing of the cross-section by clicking on
‘Texture’ and changing it from object to slice to none.
Capture Movie
Under ‘View to capture’ you can select which portion of the application you want to be included in the
movie. Options range from the whole screen to just selected views. Note the output directory. You
can change this to output to whatever file you want.
2. Select ‘Bottom Right View’ for ‘View to capture’ so that only the view containing the 3D model
will be included in the movie.
3. Hit the Record button to start the movie. Rotate the image around, zoom in and out, and
pan the image as you choose.
4. Click Stop when you are finished creating your movie. The movie will automatically open
in the software you have set up on your computer to view digital media.
3.1 Explanation
Segmentation will always follow a procedure of threshold to select a region of interest, region grow to
remove floating pixels, and edit mask to focus on an area of interest. The previous tutorial on
segmentation gave you the basic tools needed to manipulate scanner data. However, Mimics contains
various advanced segmentation tools such as Multiple Slice Edit, Morphology Operations, and
Boolean Operations that allow quicker and easier segmentation.
Multiple Slice Edit can be used to copy the editing done on a single slice onto other slices. This is useful
especially for eliminating scatter or disconnecting two body parts that touch in more than one slice. When
two elements need to be disconnected yet have a point of contact that is difficult to identify, Morphology
Operations becomes useful. Another handy tool is Boolean Operations which allows the visualization
of different combinations of two masks including the subtraction of one mask from another as well as the
intersection and union of two masks. Editing can even be done in the 3D view with Edit Mask in 3D.
With this tool you can immediately see how the editing you do changes the 3D model.
Advanced Segmentation – First, separate the spine from the aorta using segmentation tools.
Multiple Slice Edit is a timesaving tool because it allows you to apply the manual editing done on one
slice to other slices.
A bone threshold works well for this dataset because a contrast agent has been added so that the blood,
or lumen, appears brighter and images similar to bone. This provides for better visualization in the CT.
4. Select the yellow mask and click Duplicate Mask in the project management ‘Mask’ tab.
Rename the cyan mask ‘Spine’.
‘Select’ adds pixels to a slice and deselect removes pixels. You can control the size and shape of your
editing tool by changing type, width, or height. For this exercise a circle of width and height 20 works
well. Changing the amount of slices the mask is copied to is possible by increasing the amount of slices
in the pull-down menu near ‘Copy to slices’. We recommend keeping this number low so you can
evaluate each selection as you scroll through the slices.
Be careful not to include the aorta in your highlighting. If some of the aorta is selected by accident, use
‘Deselect’ to erase. If you need to select more of the spine, use ‘Select’.
The aorta should now show up in a mask of its own, separate from the spine. If it does not, this means
the aorta is still connected to the spine somewhere and you need to scroll back through the images to
delete this connection.
Depending on how well you separated the aorta from the spine, your 3D model might contain some small
vessels branching off of the aorta. Later in the tutorial you will learn how to edit these using Edit Mask in
3D.
Interpolate
Interpolate creates a temporary mask that extends between two selected slices. This takes the place of
doing manual editing on many slices.
1. Click the glasses under ‘Visible’ to hide the 3D model created above.
2. Create another duplicate of the yellow mask by selecting it and clicking Duplicate . Rename
the new mask “Aorta-interpolate”.
We will accomplish the same task of separating the spine from the aorta using an alternate method.
The aorta is now separated from the spine with a few quick steps. Again, you may see some branching
off of the aorta depending on your previous editing.
Edit Mask in 3D
Editing can be done on a mask in the 3D view; however a new 3D model must be calculated after editing
is done in order to view the changes.
4. Calculate a 3D model
on high quality.
In the 3D model you can see the vasculature branching off of the heart.
You will use this tool to remove some of the small vessels coming off of the heart.
Rotate the model to access all of the vessels. Once an area is selected it turns a different color.
Morphology Operations
Morphology operations take or add pixels to the source mask. You can use a morphology operation as
an alternative to multiple slice edit for separating the aorta from the spine.
3. Select Erode with ‘Source: Morphology_Aorta’,‘Target: <New Mask>’, ‘Number of pixels: 1’, and
‘8-connectivity’. Click ‘Apply’.
Erode takes away the number of pixels selected and dilate adds the number of pixels to the boundary of
the mask. Open performs an erode followed by a dilate. This is useful for breaking small connections.
Close performs a dilate followed by an open; useful for filling cavities within a mask. 8-connectivity
considers only pixels in the surrounding plane whereas 26-connectivity looks at neighboring pixels in 3D.
6. Select Dilate with ‘Source: Erode_Aorta’,‘Target: <New Mask>’, ‘Number of pixels: 1’, and 8-
connectivity. Click ‘Apply’ and name the resulting mask “Morphology2_Aorta”.
7. The erode broke any connections between the aorta and spine. This allowed just the aorta to be
selected after a region grow. However, now the mask is one pixel smaller so dilate must be used
to return the aorta to its original size.
9. If you notice spikes on the aorta resulting from the patient’s stent, use Edit Mask in 3D to get rid
of the protrusions and then recalculate the 3D model.
Boolean Operations
Boolean operations allow different combinations of two masks. We will use this tool to simulate the
wall thickness of the aorta.
1. Perform a Dilate of 3 pixels on the ‘Morphology2_Aorta’ mask. Name the mask “Bool”.
2. Select Boolean
Operations from
‘Segmentation’ in the
main toolbar. Make
sure ‘Mask A: Bool’,
‘Operation: Minus’,
‘Mask B:
Morphology2_Aorta’ and
‘Result: <New Mask>’
are all selected.
In this case the Morphology mask will be subtracted from the Bool mask to simulate the wall thickness
of the aorta. Keep in mind that this is not the true thickness of the aorta but merely a visualization aid.
Other Boolean operations include finding the intersection and the union of two masks.
3. Click ‘Apply’.
Measure Distances
Distances can be taken from one point to another point on a 2D image or along a 3D surface.
2. In the ‘Measurements’ tab of project management click the New button and then Measure
Distance Over Surface.
This measurement tool measures the shortest path along a surface between two points.
Export to txt
4. Click ‘OK’ to export the measurements to whichever output directory you have selected.
3.3 Homework
Re-open the ‘heart_se.mcs’ dataset. Perform the steps needed to threshold so that you have a mask for
only the lungs. Create a 3D model. Hint: Think about what is inside the lungs and how you would
threshold for this. Next, create separate masks for the aorta and spine using Boolean operations. Also
segment the heart. Your final result should be a 3D model of the heart, lungs, spine, and aorta.
Simulation also gives you the flexibility to test out different implant sizes and designs with a patient’s
anatomy. This helps a surgeon validate their implant selection. As an engineer, the simulation module
aids in the design process. The models created in Mimics can provide an engineer with a better
understanding of the geometrical constraints in biomedical design. After the anatomy is modeled, an
implant design can be imported into the Mimics platform to test form, fit and function. With the use of
Mimics a design can be validated both geometrically, in measurement studies for example, and
analytically, like with advanced engineering analyses.
Surgical Simulation
Cut
Cutting can be done in either 2D or 3D. You have the ability to change the orientation and size of the
cutting plane.
You can change the orientation of the cutting plane by dragging the red arrowhead. If you cannot see the
red arrowhead, left click on the plane and the arrow will reappear. The plane itself can be moved by
dragging the green points located on each end of the cutting plane. Adjust the points as needed to make
the cut as vertical as possible.
In the cutting plane properties dialog box you can change the depth, thickness, and extensions at the
front and end of the cutting path. There is also a preview option to visualize how the plane will look with
the specified dimensions.
8. Click ‘Preview’ to view where the plane will cut and if everything looks okay, click ‘OK’ to apply. If
the plane is not cutting where you want, readjust its dimensions.
The jaw implant we will use is an STL file. After importing STL files, you can use the repositioning tools to
place parts in the correct anatomical location.
1. To view the jaw implant, click on the eyeglasses next to ‘jaw_implant’ in the ‘STLs’ project
management tab.
If you cannot see the jaw implant in your 3D screen, you may need to zoom out to see where it is located.
Since the student edition of Mimics does not allow STL import, the jaw implant is already available to you
in the STL tab. However to load an STL in the professional version of Mimics, you would click on Load
STL in the ‘STLs’ tab, select the STL of choice, and then click ‘Open’.
2. Select Reposition
under ‘Simulation’ in the
main toolbar. Make sure
the jaw implant is
selected under ‘Objects
to Reposition’ and click
‘Move with Mouse’.
To move the implant in either the x, y, or z direction pull on the corresponding axis. To move the implant
to a particular spot (not along an axis), you can grab the yellow rectangle at the origin of the axes. The
distance you want to move in a specific direction can also be entered manually into the coordinate boxes.
To change the rotation center, grab and move the yellow rectangle in the middle of the tool. The Move
and Rotate tools can also be found in the ‘3D Objects’ tab.
5. You can save the location of a 3D object by clicking ‘Save Position’ in the ‘Reposition the 3D
Objects’ dialog box. Once a position has been saved, you can move a 3D object to that position
by clicking ‘Go to saved pos’. Selecting ‘Go to home pos’ will move the 3D object to its original
location.
4.3 Homework
On the ‘femur_se.mcs project’, make a cut that goes through the femoral head. Split the cut and position
the ‘femur_implant’ STL.
5.1 Explanation
The MedCAD module acts as a bridge between medical imaging and traditional CAD design, such as
SolidWorks, Pro/Engineer, and Catia. An important feature of MedCAD is the ability to work with polylines.
Mimics can automatically generate the contours (or polylines) of a segmentation mask. These polylines
can then be used to fill in a mask’s cavities or to fit freeform CAD objects, like surfaces or spheres, to a
mask. The CAD objects created in Mimics can be directly exported as IGES files to any CAD program.
Iges Surfaces
Export to CAD requires an Iges file. Mimics creates an STL surface mesh, but traditional CAD packages
require a parametric surface file such as IGES. The MedCAD module allows us to create IGES surfaces
and curves based on the anatomical geometry from the scan.
1. Open up the ‘knee_se.mcs’
dataset.
2. Create a mask on the knees
using lower and upper threshold
values of 120 and 3071.
3. Crop the mask so it only contains
the lower portion of the patient’s
left knee.
6. Under ‘Segmentation’ in the main toolbar click Calculate Polylines . Select the ‘knee-1’
mask and click ‘OK’.
When Mimics calculates polylines it creates a contour around the selected mask on each slice. The
polyline set you just created will show up in the ‘Polylines’ tab of project management.
Polylines under
‘Segmentation’ in the main
toolbar. Make sure ‘Fill Cavity of:
Set 1’ and ‘Using Mask: <New
Mask>’ are selected.
8. Click ‘Apply’ and then ‘Close’.
Name the new mask “knee-2”.
Cavity Fill from Polylines is useful when a mask has many small holes that need to be filled in. On
each slice, this tool fills in all small holes of a mask that are encompassed by a larger boundary polyline.
9. Click on the eyeglasses in the project management ‘Masks’ tab under the ‘Visible’ column for all
of the masks except ‘knee-2’.
This turns off the masks so that they are not displayed in the images.
14. Under ‘Segmentation’ in the main toolbar click Calculate Polylines . Select the ‘knee-2’
mask and click ‘OK’.
Now that all the breaks have been filled in, calculating a new set of polylines will create contours that
include all the areas you just edited.
15. Select Cavity Fill from Polylines . You want ‘Fill Cavity of: Set 2’ and ‘Using Mask: <New
Mask>’. Rename this mask “knee-3”.
Since we are only going to look at the bottom portion of the knee (tibia), we can use editing to erase the
knee cap and the remaining portion of the femur.
Polyline Grow looks at polylines above and below the selected slice. If the polyline’s shape is within the
correlation percentage’s limits (within 97% similar), the polylines are automatically added to the current
polyline selection. A polyline selection is a portion of a polyline set.
Now we have three polyline selections that are suitable for fitting a surface on. We need to turn these
separate contours into one surface because an IGES curve cannot be fit to multiple contours.
The u-parameters and v-parameters are automatically calculated for you. If the set contains more than
one contour per slice a surface cannot be fit. Also, you need at least three contours in a set to fit a
surface on. You will know if a set is good to fit a surface on because the ‘Surface Fit Parameters’ box will
say ‘Set OK’.
There are some holes in the surface at the top of the knee but the overall anatomical shape is correct.
These holes can be stitched and filled in CAD to create a solid part.
Export to CAD
5.3 Homework
Open the ‘hip_se.mcs’ dataset and create an IGES surface for the femur shaft, trochanter and head.
Hint- On axial slice 55 you need to break the connection between the femur head and greater trochanter
to be able to add polylines. Remember polylines must be added to correct unwanted gaps that would
otherwise exist. You will also need to use editing to add a contour on the top of the trochanter (on axial
slice 65) so that you have enough contours in the set to fit a surface.
6.1 Explanation
Mimics allows for the determination of centerlines for any type of branching including arteries, veins, and
airways. Tools exist to gather data about these centerlines such as maximum and minimum best fit
diameter, curvature, tortuosity, and hydraulic diamater. Centerlines can be modified within Mimics to
optimize the inlets and outlets for various analyses like CFD.
Resolving resolution is the minimum detail you want Mimics to use in its centerline calculation. All of the
vessels in this dataset are bigger than 1 mm so we will leave the default value. Number of iterations is the
amount of times you want the algorithm to run. This is 2 by default, which is fine in most cases. Distance
between control points sets the distance between each point of calculation along the vasculature.
transparency button in
the 3D toolbar.
The properties dialog box contains information about the centerline and its branches. Besides changing
the color of the centerline you also have the option to delete branches. To change which branches are
visualized, click on the eyeglasses of whichever branches you want to hide.
8. Highlight all of the branches by holding the control key while selecting each branch. Click
‘Export’.
9. Click the yellow folder to select an output directory. Name the file “Aorta centerlines”.
You can export to a text file or as an Iges. The text file contains the coordinates of the points and the
selected measurements. These can be exported to programs such as Excel or Matlab for further analysis
depending on the application. To export to Iges select IGES… under ‘Export’ in the main toolbar and
select what you want to export under the CAD tab.
11. Leave only ‘Best fitted diameter’ checked and click ‘Save’.
To see a definition for each of these measurements see the ‘Centerline Measurements’ section of the
‘MedCAD menu’ help files. Another way to take measurements is through New in the
‘Measurements’ project management tab.
As you move your mouse along the centerline, the values are updated for the measurement until you click
on a point.
Cut Centerline Ending allows you to cut an end of a centerline perpendicular to the centerline in order
to create the flat inlet and outlet surfaces needed for CFD analyses.
3. Highlight ‘Centerline 1’
and click ‘Indicate’. On
the 3D model, click on
the top branch of the
artery to make a cut.
4. Click ‘OK’.
5. Make a few cuts on
different branches to
get familiar with the
tool.
The 3D objects tab will have the modified centerline (displaying how it looks with the cuts).
Modify Centerline
Modify Centerline provides the ability to reposition centerline control points. This is useful when the
calculated centerline does not follow the accurate branching of a vessel and needs to be adjusted.
4. Drag the green control point to the desired location until it is in the position that you want.
Double-click to finalize the change.
Notice that now the centerline has less curvature than it did originally.
6.3 Homework
On the ‘heart_se.mcs’ dataset, segment a couple of the small branches coming off of the heart. Calculate
the centerline, best fit diameter, and maximum and minimum diameters for these branches.
7.1 Explanation
The FEA module of Mimics allows optimization of triangle meshes to prepare for further analysis using
FEA or CFD. Remeshing is used to increase and optimize the quality of triangles and preprocess a
model for analytical packages. The typical process for remeshing includes smoothing the mesh to
remove sharp edges that may act as unwanted stress risers in analysis, reducing the number of triangles
to enhance the calculation speed during FEA, and optimizing triangle quality. The following picture shows
an example of a mesh before and after it has been optimized.
The Mimics remesher is broken up into a few main windows, these include the 3D view, the log window,
the database and inspection page section, and the operations and properties section. The 3D view allows
you to see the 3D model of the part you are working on. The tab next to 3D view, the inspection scene, is
where you can visualize the triangulated mesh corresponding to your part. A list of all the steps and
operations you complete is available in the log window. The upper right box includes the database and
inspections page. The database page gives you information about each part, surface, curve, and sketch
created. You can use the database tree to select various objects for a specific operation. The inspection
page allows you to control all your remesh operations and to inspect and visualize the quality of your
mesh.
The properties page will show you all properties (such as number of triangles, color, volume, surface area,
etc.) associated with a selected object. The operations page shows all the parameters available to
change when applying an operation to your object. The operations page for the smooth tool is shown
below as an example.
FEA
Remeshing
Remeshing is used to increase and optimize the quality of triangles for the preprocessors of analytical
packages.
2. Highlight the ‘Femur’ in the ‘3D Objects’ tab of the project management toolbar.
5. Click the Smooth button and then click on the 3D model of the femur. Select ‘Femur’.
6. Leave the smoothing parameters at the default settings. Check ‘Preserve sharp edges’ under
‘Advanced Options’ and click ‘Apply’.
In order to prevent the bottom of the femur from being rounded we must check preserve sharp edges.
The higher the smooth factor the more smoothing will be applied, with a value of 1 applying the most
smoothing. Number of iterations is the amount of times the smoothing algorithm will be applied. We use
compensation to counteract any shrinking that might occur as a result of the smoothing algorithm.
If during the process of reducing, 2 triangles are replaced by one triangle, it may be that there is a little
deviation in position. Geometrical error is the maximum deviation allowed between the original surface
and the new one. It is recommended to use 1/8 of the pixel size to maintain accuracy between scanner
data and models, so in our case the pixel size is 0.715 mm making the geometrical error about 0.09.
When an angle is larger than the flip threshold angle the triangles comprising the angle may not be
reduced. If there is no critical edge then the angle value is the maximum angle that can be created during
reduction. Preserve surface contours should be used when there are surfaces defined that are not based
on the part geometry.
9. Click Auto Remesh in the ‘Remeshing’ tab and make sure ‘part’ is selected for ‘Entities’.
You can visualize shape measure on the histogram by changing ‘Current Measure’ to ‘Shape Measure’
under ‘Histogram Parameters’. The histogram is measuring the quality of all triangles in the mesh. We
want all of the triangles to be above the 0.3 shape measure threshold we set because triangles with a
quality lower than this will not import into FEA or CFD packages.
A rule of thumb is to keep the geometrical error used in reducing the same as the maximum geometrical
error. With this example, we have the flexibility to increase the maximum geometrical error to 0.4 so we
can increase computation time by reducing the number of triangles. Some of the auto remesh parameters
include shape quality threshold which sets the desired quality of triangles, maximum geometrical error
which is the maximum deviation between the part’s surface before and after automatic remeshing, and
maximal edge length which sets a limit on the length of edges of triangles created. Large models with
many low quality triangles can be better remeshed in incremental steps; sometimes it helps to use a
shape quality threshold of 0.1, then 0.2, and then 0.3.
12. Click Quality Preserving Reduce Triangles in the ‘Remeshing’ tab then click on the part.
This step reduces the amount of triangles while preserving the quality.
Your model should resemble the femur in the picture shown above. The Remesh Wizard can be
used to achieve nearly the same results as the steps we’ve done so far. With this tool the software
determines the parameters automatically; however, manually performing the steps allows more control
over the parameters.
Material Assignment
Mimics assigns materials to volumetric meshes based on Hounsfield gray values. You can create a
volume mesh in the remesher, bring the volume mesh back into Mimics and then assign material
properties.
This allows us to have a surface mesh and a volume mesh when we go back into Mimics. If you wanted
to load a mesh rather than create one, you would click Load Mesh under the ‘FEA Mesh’ tab of
project management.
The mesh parameters allow you to define certain details of your mesh. For example, the method used to
create the tetrahedral volume mesh can either fill the volume, as with Init, or fill the volume and fit the
tetrahedrals more appropriately , with Init and Refine. Control edge length limits the tetrahedral elements
to the dimension you set. The mesh quality options define how Mimics analyzes the mesh. Aspect ratio is
a common mesh analysis for FEA. It is good to set the shape quality threshold to at least 25, since
thresholds below this are considered poor quality and not accepted by most FEA packages.
The surface mesh can be found in the ‘3D Objects’ tab and its name will start with the word ‘Remeshed’.
The volume mesh can be found in the ‘FEA Mesh’ tab.
This message explains that Mimics needs time to calculate the average gray value for the pixels of each
element of the mesh.
This is where you can enter properties for materials such as density. In the ‘Use material expressions’
section you can manually enter known expressions for properties. A list of such expressions can be
found in the help files by clicking the contents tab> Mimics Modules> FEA> Empirical Expressions.
Export to FEA
Meshes created or modified in Mimics can be exported for further analysis in FEA packages.
You would select the name of the mesh you want to export under the Mesh tab, select an output format,
click ‘Add’, and then select ‘OK’.
2. Click ‘Cancel’.
8.1 Explanation
When running an FE analysis on multiple parts, mating parts need node to node matching. To
accomplish this, the FEA module of Mimics can generate non-manifold assemblies, or t-sections. Non-
manifold assemblies create matching surfaces between parts such as between bone and implant. Once
an assembly is created the entire mesh can be optimized for FEA in the remesher. After remeshing is
complete, you can split the bone and implant mesh into two separate meshes using the splitting tool. This
final step creates the two separate meshes with a node to node matched surface.
Non-Manifold Assembly
The Wrap tool in the Remesher can be used to fill in the holes of the 3D model. This is an especially
useful tool for FEA where holes can cause inaccurate results.
Gap closing distance determines the size of gaps that will be wrapped. Smallest detail sets the size of
the triangles of the newly created surface. Check the help files for details on the other wrap parameters.
26. Choose the Create Inspection Scene tool under the ‘Remeshing’ tab.
1. Click the Filter Sharp Triangles tool in the ‘Fixing’ tab. Left click on the 3D model and select
‘Mandible_wrapped_non-manifold_assembly’.
Sharp triangles must be removed because they are detrimental to the quality and speed of FEA.
Since the 3D model will only be used for FEA you can reduce the amount of detail of its outer surface by
smoothing.
There are too many triangles for Finite Element Analysis so a reduction is necessary.
7. In the ‘Inspection Page’ tab, select ‘Height/Base (N)’ in the ‘Shape measure’ dropdown under
‘Quality parameters’.
9. Make sure ‘Shape Measure’ is selected for ‘Current measure’ in ‘Histogram parameters’. Click
Since the first auto remesh left the mesh containing triangles of divergent sizes, if we limit the maximum
edge length we can create a uniform mesh.
Quality preserving reduce triangles removes the groups of small triangles still contained in the mesh.
This tool will take the combined jaw and implant mesh we created above and separate it into one
mesh for the implant and one for the jaw with node to node matching on mating surfaces.
If you wanted to export the remeshed 3D objects you would select the objects to be exported, select
the correct output format, and then click ‘Add’ in the Export menu.
You now know how to utilize the tools in Mimics to transform 2D data into 3D
models. Thank you for using Materialise’s lab book for your learning experience.
If you would like more information about any of the Materialise software please
contact us at:
Materialise
3009 Miller Rd
Ann Arbor, MI 48103
734-662-5057
www.materialise.com
mimics@materialise.com