Slicer3:Module:LabelBinaryImages-Documentation

From Slicer Wiki
Jump to: navigation, search
Home < Slicer3:Module:LabelBinaryImages-Documentation

Binary Thresholding and Labeling

GENERAL INFORMATION

Module Type&Category

The type of this module is CLI and is under the category Segmentation in Slicer 3. The name of this module is LabelBinaryImages in Slicer 3.

Authors, Collaborators&Contact

  • Author: Bike Kilic, MSc student in Northeastern University
  • Contact: kilicbike@gmail.com

Module Description

The purpose of this module is defining different labels in an image after morphological operations. This module performs thresholding in the first step and then implements labeling by using the information of connectedness in given input.

The input of this module is the last eroded image. And after this process, the labeled binary image is taken to dilation process. After LabelBinaryImages module, the output shows us different labeled areas. For instance, in this project, the input is eroded spheres and then after this module the output is an image with three different labeled areas:background as 0, one of the spheres as 1 and the other one as 2. The sphere with bigger area is labeled as 1.

The results can be seen in the section called Screen shots in this page.

USAGE

Quick Tour of Features and Use

The GUI panel for LabelBinaryImages Module

DEVELOPMENT

Dependencies

In this module, there are 3 ITK classes which are used.

One of them is for binary thresholding which is called itkBinaryThresholdImageFilter[1]. It takes two user inputs which are LowerThreshold and UpperThreshold values. The output is a binary images with 0 outside and 255 inside.

The other class which is for labeling the objects in a binary image is itkConnectedComponentImageFilter class [2].Each distinct object is assigned a unique label. The filter experiments with some improvements to the existing implementation, and is based on run length encoding along raster lines. The final object labels start with 1 and are consecutive. Objects that are reached earlier by a raster order scan have a lower label. This is different to the behavior of the original connected component image filter which did not produce consecutive labels or impose any particular ordering. The input of this algorithm is the output of binary thresholding.

The last one is used for remapping the labels associated with the objects in an image. The input comes from the output of ConnectedComponentImageFilter. The name of this last class is itkRelabelComponentImageFilter [3]. The output of this method is used for BinaryDilateOperations module.

The Problems

The problem with this module is that I could not create a 3D model after dilation processes with given labels by using Editor module of Slicer 3. As I had the output of the dilation, I created a label map by using Editor module but what I has as an output is just a black screen labeled as 0. Therefore, I could not perform thresholding tool in Editor so could not able to change the labels and then using Model Maker module.

Screen shots

The output of LabelBinaryImagesModule and then dilation

In the first square, the output of dilation by using BinaryDilateOperations module and label mapping by using Editor module can be seen. Second one indicates the output of LabelBinaryImages module. As mentioned in the section Module Description in this page, the background is labeled as 0 whereas the separated spheres are labeled as 1 and 2 consecutively.

As we keep on dilating the image, the spheres are still labeled as 1 and 2 and the background as 0.

MORE INFORMATION

Results&Comments

In this part, I tried to explain if we are able to use LabelBinaryImages module in morphological operations. What I have seen after using this module is that even I continue on dilation of the separated images and make them overwritten, the labels of the objects does not change. The label numbers remain the same as I had seen after I performed the algorithms in LabelBinaryImages module on the last eroded image.

What the user should be careful is that if user has the output of BinaryThresholding module as an input for BinaryDilateOperations module, the dilate value should be chosen as 255. However, if user chooses the output of LabelBinaryImages module as an input for dilation, the dilate value should be the same as label numbers. The reason is that as I have seen from my experiments, even I perform dilation on the output image of LabelBinaryImages module