Reading group - 22/05/2013

329 views
173 views

Published on

Slides from the reading group presentation where I introduced a new Python interface for IRTK.

See http://kevin-keraudren.blogspot.co.uk/2013/12/irtk-python.html for more details and the iPython notebook demo.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
329
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Reading group - 22/05/2013

  1. 1. Organ Detection in Fetal MRI Kevin Keraudren Imperial College London May 22nd , 2013
  2. 2. 1 Overview 2 Python interface for IRTK 3 Future work 2/27
  3. 3. 1 Overview 2 Python interface for IRTK 3 Future work 3/27
  4. 4. Overview 1 Brain detection & reconstruction 2 3D visualisation 3 Organ localisation 4/27
  5. 5. People Brain reconstruction: Maria Murgasova 3D visualisation: Christina Malamateniou Organ detection: Bernhard Kainz 5/27
  6. 6. Localisation of the Brain in Fetal MRI Using Bundled SIFT Features For every slice Detect MSER regions Filter by size RANSAC Classify using SIFT features 6/27
  7. 7. Detections results averaged over the cross validation (all orientations combined) Centiles 25th 50th 75th 2D SIFT 10.9 15.5 20.5 Error (mm) 3D SIFT 14.8 20.8 30.4 Bundled SIFT 4.0 5.7 8.4 Detection Complete brain 98% 38% 85% 23% 100% 85% 7/27
  8. 8. 1 Overview 2 Python interface for IRTK 3 Future work 8/27
  9. 9. Why Python? ls *.nii | python -c ’import sys, irtk; [sys.stdout.write( str(irtk.imread(line.rstrip(), dtype="float32").max())+"n") for line in sys.stdin]’ numpy, matplotlib, OpenCV, VTK, scipy.ndimage... & C++ via cython 9/27
  10. 10. Why another library? import itk pixelType = itk.UC imageType = itk.Image[pixelType, 3] readerType = itk.ImageFileReader[imageType] writerType = itk.ImageFileWriter[imageType] reader = readerType.New() reader.SetFileName( "input.nii" ) reader.Update() itk2np = itk.PyBuffer[imageType] data = itk2np.GetArrayFromImage( reader.GetOutput() ) ... 10/27
  11. 11. Why another library? import SimpleITK as sitk img = sitk.ReadImage( "input.nii" ) data = sitk.GetArrayFromImage( img ) ... output = sitk.GetImageFromArray( data ) output.SetSpacing( img.GetSpacing() ) output.SetOrigin( img.GetOrigin() ) output.SetDirection( img.GetDirection() ) sitk.WriteImage( output, "output.nii" ) 11/27
  12. 12. Why another library? import irtk img = irtk.imread( "input.nii" ) ... irtk.imwrite( "output.nii", img ) 12/27
  13. 13. Key features simple and pythonic overload getitem instead of GetRegion parallelisation using joblib visualisation functions 13/27
  14. 14. Implementation template <class dtype> void irtk2py( irtkGenericImage<dtype>& irtk_image, dtype* img, double* pixelSize, double* xAxis, double* yAxis, double* zAxis, double* origin, int* dim ); 14/27
  15. 15. Implementation void py2rigid( irtkRigidTransformation &transform, double tx, double ty, double tz, double rx, double ry, double rz, bool invert=false ); 15/27
  16. 16. Demo ipython notebook 16/27
  17. 17. Parallelisation example                     import irtk from joblib import Parallel, delayed from glob import glob def register( f, img1): img2 = irtk.imread( f, dtype=’float32’) img2 = img2.rescale().resample(2) t = img2.register(img1) return t filenames = glob( raw_folder + "/" + patient_id + "_*.nii") img1 = irtk.imread(filenames[0], dtype=’float32’) img1 = img1.rescale().resample(2) transformations = [irtk.RigidTransformation()] transformations.extend( Parallel(n_jobs=-1)(delayed(register)(f, img1) for f in filenames[1:] ) ) 17/27
  18. 18. 1 Overview 2 Python interface for IRTK 3 Future work 18/27
  19. 19. Coarse segmentation as side product of detection 19/27
  20. 20. Convex hull of all detections 20/27
  21. 21. Iterative detection/reconstruction 21/27
  22. 22. Iterative detection/reconstruction 22/27
  23. 23. Iterative detection/reconstruction 23/27
  24. 24. Room for improvement Refine motion model (statistics on slice transformations) Patch based segmentation instead of graphcut Detect head orientation to solve more difficult registrations Could the detection process produce more than a mask? 24/27
  25. 25. Could we reconstruct more than the brain? 25/27
  26. 26. For the future (hanging projects) Spine detection using SLIC supervoxels Dense volumetric features: SURF 3D Alignment of mothers’ bodies to model of a pregnant woman 26/27
  27. 27. Suggestions or questions? 27/27

×