We briefly explain how to deal with images having MRI bias field distortion, images with low resolution sampling and images with noise.
Images with MRI bias field distortion
When processing MRI images, quite often the intensities are not evenly distributed: we observe that some parts of the image are brighter than the rest while some others are darker, in a gradual and smooth fashion. This is due to the behavior of the transmit/receive coil operating in MRI scanning, which in effect is adding an undesired bias field to the signal.
In order to remove this bias field and recover a good approximation of the original image, we apply an optimization algorithm to estimate this bias field and subtract it from the input signal. To do so, after opening the image we call command RMMRIBiasFieldCorrection (or Rhino3DMedical menu, MRI Bias Field Correction item). This command operates on the current image and gets a number of iterations through the command line as input (write the number and press Enter, default value is 100). This number of iterations restricts the optimization length: the bigger the number of iterations, the better the final reconstruction, but the slower to eventually give a result. There is a progress bar in Rhino that will inform you about the length and current state of the optimization process, and you can abort the process at any time by terminating the Rhino process. The following diagram shows the resulting image after processing.
MRI image before and after processing against bias field correction. After correction the image intensities are more homogeneously distributed: note in the image at left the dark area surrounding the mouth and brain, and the bright part regarding the skin and back. The image at right was obtained after 200 iterations and its processing took around 10 minutes in a i7 4.20 GHz 8 Core CPU (256 x 232 x 176 voxels image).
Once the process has finished, we are shown the result as an image replacing the old one. It is recommended to save the result as an in-betwen MHD image (using command RMExportImage or Rhino3DMedical menu, Export Image item) before further proceeding with segmentation tasks.
Images with low resolution sampling
Images with low resolution sampling are those having highly anisotropic resolution. For example a volume containing 512 x 512 x 66 voxels (66 slices of 512 x 512) has highly anisotropic resolution because the number of voxels in Z (axial) direction is much smaller (at least 7 times) than the number of voxels in X or Y direction (coronal or sagittal). In practice, when we segment and extract surfaces from this image we will get square-like objects with staircase pixelated effects.
To correct this, we must increase the resolution such that it is almost isotropic. For example in the case of a 512 x 512 x 66 voxels image, we should increase the number 66 such that it is in the same order of magnitude as 512. To do so we resample the image: go to Image Filters tab (Image Filters button, menu item or command RMImageFilters), select filter Resample, input a number in X, Y or Z fields and click Apply (or Preview for a temporary preview). The number that you input will multiply the image in that direction: if it is greater than 1 it will magnify the image (through B-spline interpolation), and if it is smaller than 1 it will downsample it. In our case, we choose to insert number 7 in Z because we want to have 66 times 7 voxels in Z direction (Axial), i.e. 462 voxels in this direction. X, Y, Z correspond to Coronal, Sagittal, Axial directions, and you can see which direction has what voxels in Image Navigation subsection in Image Analysis tab. The following diagram shows the resulting image after processing.
Image with low resolution sampling before and after processing through magnified resampling. The images in Coronal and Sagittal view appear smoother because we resampled only in Axial direction.
If we further segment and extract any mesh from this image, we will get a surface that is smoother and finer, see the following picture.
Comparison of meshes coming from an image before (left) and after (right) applying Resampling filter to magnify it.
This filter is also available as a Grasshopper component (Resample).
Note that another way to address this problem is through application of a smoothening filter, as we show in the next case.
Images with noise
Images with noise are those whose segmentation processing is difficult due to the presence of small unwanted artifacts. Typically these are found later in the output segmented mesh, and cause it to be heavy and diffult to process with (hard to perform boolean operations, to 3D print, etc).
The way to deal with these images is to smoothen them, by applying a Gaussian filter or a Median filter with a voxel radius. Special care has to be given here as the image might lose important details if excessively smoothened.
To smoothen an image: go to Image Filters tab (Image Filters button, menu item or command RMImageFilters), select filter Median, input a number in Radius field and click Apply (or Preview for a temporary preview). Typical values of radius are 2, 3, 4 or 5 depending on the resolution of the image. Median filter will remove noise by going through the image and replacing the intensity of every voxel with the median intensity of its neighborhood of radius Radius. The bigger the radius, the stronger the smoothing effect.
Alternatively, filter Smooth can be applied, which performs a Gaussian blurring that may be more aggressive than Median filtering, removing more high-frequency detail. We recommend that you try both with several radius (use the Preview checkbox to quickly try values) to figure out what is best for your image.
Here there is an example of Median filtering over an image.
Image before and after processing against Median filtering (5 voxel radius) for noise removal.
Comparison of meshes coming from an image before (left) and after (right) applying Median filter to smoothen it. No differences are observed at plain sight, which means that the filter is good in not altering the image. Actually the mesh at right is lighter and easier to deal with for downstream operations like boolean operations or 3D printing.
This filter is also available as a Grasshopper component (Median and Smooth).
Note that we can also smoothen directly the mesh instead of the image with mesh filter Smoothen (command RMSmoothenMesh or button Smoothen Mesh in Mesh Repair tab). Though, the filter for meshes is a bit more aggressive (it employs Laplacian filtering which tends to shrink the mesh), so it should be handled carefully.