MATITK: EXTENDING MATLAB WITH ITK

Please use this identifier to cite or link to this publication: http://hdl.handle.net/1926/155
To facilitate the analysis of medical image data in research environment, MATITK is developed to allow ITK algorithms to be called in MATLAB. ITK is a powerful open-source image analysis toolkit, but it requires the knowledge of C++ to use it. With the help of MATITK, researchers familiar with MATLAB can harness the power of ITK without learning C++ and worrying about low-level programming issues. A common set of C++ classes have also been produced to allow future ITK methods to be added to MATITK therefore callable in MATLAB without the bothersome translation between MATLAB and ITK.
Data
minus 4 Files (3Mb)
Code
There is no code review at this time.

Reviews
minus Neat by Karthik Krishnan on 01-30-2006 for revision #2
starstarstarstarstar expertise: 3 sensitivity: 5
yellow
Compiling matitk.dll
I was able to compile the code with VS71 as the compiler. If the matlab version you have is old (for instance 6.5), you will need to get the options file for VS71.

I made the suggested changes to the bin/win32/mexopts/msvc71opts.bat file. (setting ITKBIN, ITKSRC environment variables and adding the working directory to the list paths. path(path,"c:/tmp/foo")).

I had two errors compiling the code, since the code was instantiating curvature flow filters etc on unsigned int images. The errors were trivial to remove. Below is the patch to remove the compiler errors and will be fixed in ITK CVS.

Regarding the dll shipped with the paper, the permissions of the dll needs to have executable permission otherwise matlab fails to load the dll.

Testing

I was able to load the built in mri dataset and perform filtering etc in a jiffy. That was convenient.

Usability

Traditionally matlab has been a storehouse for well established image processing/ enhancement algorithms. There are several external analysis packages available such as LightSpeed, SPM etc.. I do not know of any packages that perform registration. ITK on the other hand has bleeding edge segmentation and registration algorithms along with basic image processing algorithms.

A very useful thing to do will be to conveniently perform registration in ITK and continue with filtering and analysis in MATLAB, since MATLAB lacks registration algorithms. MATITK provides two registration algorithms, Demos and TPS. I tried out Demons and it seemed to work fine. It should probably supply a lot more registration algorithms. Also, there is no way to currently specify the origin or the images. For instance the fixed and moving images could be acquired in different reference frames.

Any submission to MATLAB central ?


Inclusion in the toolkit

I propose the framework be included with InsightApplications. I am sure many in the academic community would find it useful.


Index: Algorithms/itkMinMaxCurvatureFlowFunction.txx
===================================================================
RCS file: /cvsroot/Insight/Insight/Code/Algorithms/itkMinMaxCurvatureFlowFunction.txx,v
retrieving revision 1.23
diff -u -b -r1.23 itkMinMaxCurvatureFlowFunction.txx
--- Algorithms/itkMinMaxCurvatureFlowFunction.txx 13 Mar 2005 23:19:40 -0000 1.23
+++ Algorithms/itkMinMaxCurvatureFlowFunction.txx 30 Jan 2006 16:08:14 -0000
@@ -369,7 +369,7 @@
{
gradient[2] = -1.0;
}
- theta = acos( gradient[2] );
+ theta = acos( (double)gradient[2] );

if ( gradient[0] == 0 )
{
@@ -377,7 +377,7 @@
}
else
{
- phi = atan( gradient[1]/ gradient[0] );
+ phi = atan( (double)gradient[1]/ (double)gradient[0] );
}


Index: BasicFilters/itkSparseFieldLevelSetImageFilter.txx
===================================================================
RCS file: /cvsroot/Insight/Insight/Code/BasicFilters/itkSparseFieldLevelSetImageFilter.txx,v
retrieving revision 1.36
diff -u -b -r1.36 itkSparseFieldLevelSetImageFilter.txx
--- BasicFilters/itkSparseFieldLevelSetImageFilter.txx 22 Dec 2004 15:18:23 -0000 1.36
+++ BasicFilters/itkSparseFieldLevelSetImageFilter.txx 30 Jan 2006 16:08:14 -0000
@@ -480,7 +480,7 @@
{ this->SetRMSChange(static_cast(m_ValueZero)); }
else
{
- this->SetRMSChange(static_cast( vcl_sqrt(rms_change_accumulator / static_cast(counter)) ) );
+ this->SetRMSChange(static_cast( vcl_sqrt((double)(rms_change_accumulator / static_cast(counter)) )) );
}
}

@@ -841,7 +841,7 @@
length += dx_backward * dx_backward;
}
}
- length = vcl_sqrt(length) + MIN_NORM;
+ length = vcl_sqrt((double)length) + MIN_NORM;
distance = shiftedIt.GetCenterPixel() / length;

output->SetPixel( activeIt->m_Value ,
Add a new review
Quick Comments


Resources
backyellow
Download All

Statistics more
backyellow
Global rating: starstarstarstarstar
Review rating: starstarstarstarstar [review]
Code rating:
Paper Quality: plus minus

Information more
backyellow
Keywords: ITK, MATLAB, Medical image analysis, filtering, segmentation, registration
Toolkits: ITK, CMake
Export citation:

Share
backyellow
Share

Linked Publications more
backyellow
MatVTK - 3D Visualization for Matlab MatVTK - 3D Visualization for Matlab
by Birngruber E., Donner R., Langs G.
N-Dimensional Phase Unwrapping N-Dimensional Phase Unwrapping
by Vigneault D., Wang W., Tee M., Bluemke D., Noble A.

View license
Loading license...

Send a message to the author
main_flat
Powered by Midas