[Insight-users] simple/synthetic 3D images in Nifti format?

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Feb 14 12:15:14 EST 2013


Hello,

You can use SimpleITK's python binding fairly easy to generate synthetic image, and just save them as nifti format. Here is an example of rendering the Marshner Lobb function:

def marschner_lobb(size=40,alpha=0.25, f_M=6.0):
    img = sitk.PhysicalPointSource( sitk.sitkVectorFloat32, [size]*3, [-1]*3, [2.0/size]*3)
    imgx = sitk.VectorIndexSelectionCast(img,0)
    imgy = sitk.VectorIndexSelectionCast(img,1)
    imgz = sitk.VectorIndexSelectionCast(img,2)
    del img
    r = sitk.Sqrt(imgx**2+imgy**2)
    del imgx, imgy
    pr = sitk.Cos((2.0*math.pi*f_M)*sitk.Cos((math.pi/2.0)*r))
    return (1.0-sitk.Sin((math.pi/2.0)*imgz)+alpha*(1.0+pr))/(2.0*(1.0+alpha))


Then just use sitk.WriteImage to save it.

There are also some "ImageSource" filters to generate functions like the Gabor, Gaussian, Checkerboard.

Additional information on getting started with SimpleITK can be found here:
http://www.itk.org/Wiki/SimpleITK/GettingStarted

Brad

On Feb 14, 2013, at 12:06 PM, Elena Ranguelova <elboyran at gmail.com> wrote:

> Dear all,
> 
> Does anyone know where I can find and download for free some very simple,(best would be synthetic) 3D volumetric images in Nifti format?
> For example- volume containing not the whole brain image, but a cropped around one structure? Or simple synthetic 3D sphere or cylinder?
> 
> Regards,
> Elena
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list