Virtual Reality Volumetric Display Techniques for Three-Dimensional Medical Ultrasound R. J. Littlefield, R. W. Heiland, and C. R. Macedonia, Ultrasound in Health Care in the Information Age, H. Sieburg, S. Weghorst, and K. Morgan (Eds.), IOS Press and Ohmsha, 1996
In [1]: from skimage import data,io,filter
In [2]: %pprint #Pretty printing has been turned OFF
In [7]: dir(data)
Out[7]: ['__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '_os',
'camera', 'checkerboard', 'chelsea', 'clock', 'coffee', 'coins', 'data_dir', 'horse', 'immunohistochemistry',
'imread', 'lena', 'load', 'moon', 'page', 'text']
In [3]: image1 = data.immunohistochemistry()
In [4]: io.imshow(image1)
In [5]: io.show()
We can then easily determine the shape of the data (3 components of RGB) and extract edges of the R component using a Sobel filter:
In [6]: image1.shape
Out[6]: (512, 512, 3)
In [7]: edgesRed = filter.sobel(image1[:,:,0])
In [8]: io.imshow(edgesRed)
In [9]: io.show()
Some of its filters include:
>>> from skimage import filter
>>> dir(filter)
['LPIFilter2D', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '_canny', '_ctmf', '_denoise', '_denoise_cy', '_gabor', '_gaussian', '_rank_order', 'canny', 'ctmf', 'denoise_bilateral', 'denoise_tv_bregman', 'denoise_tv_chambolle', 'edges', 'gabor_filter', 'gabor_kernel', 'gaussian_filter', 'hprewitt', 'hscharr', 'hsobel', 'inverse', 'lpi_filter', 'median_filter', 'prewitt', 'rank', 'rank_order', 'roberts', 'roberts_negative_diagonal', 'roberts_positive_diagonal', 'scharr', 'sobel', 'threshold_adaptive', 'threshold_otsu', 'thresholding', 'vprewitt', 'vscharr', 'vsobel', 'wiener']
from __future__ import print_function import SimpleITK as sitk import sys import os if len ( sys.argv ) < 4: print( "Usage: SimpleGaussian {input} {sigma} {output}" ) sys.exit ( 1 ) reader = sitk.ImageFileReader() reader.SetFileName ( sys.argv[1] ) image = reader.Execute() pixelID = image.GetPixelIDValue() gaussian = sitk.SmoothingRecursiveGaussianImageFilter() gaussian.SetSigma ( float ( sys.argv[2] ) ) image = gaussian.Execute ( image ) caster = sitk.CastImageFilter() caster.SetOutputPixelType( pixelID ) image = caster.Execute( image ) writer = sitk.ImageFileWriter() writer.SetFileName ( sys.argv[3] ) writer.Execute ( image );We can then run this script and provide various parameters:
python SimpleGaussian.py gauss.png 2.0 gauss_2.0.png python SimpleGaussian.py gauss.png 4.0 gauss_4.0.png python SimpleGaussian.py gauss.png 9.0 gauss_9.0.png
Some other open source imaging packages include: