In its beta stage, but fully functional for an nifti mri. Working on integrating and overlay function to interact with MRI and coregistered view of overlay.
At the moment, the viewer allows manipulation of each dimensional slice, contrast changes, and crosssectional rotation of each slice, 3D rendering, and display of overlay image .

from mri import mr2vtk
mr2vtk.convert(dec.origimg.data, sshiresB, filename='mrvtk_overlay')


some notes
mr2vtk.convert(hiresimg, nim.data, filename='mr_underover')
from pyvtk import *
from mri import sourcesolution2img
[decimg, hiresimg] = sourcesolution2img.build(w.corr_mat, dec)
#combine under and overlay scaled
z1 = float32(reshape(dec.origimg.data, (-1)))
#scale underlay to match max of overlay
z1scaled = z1*(hiresimg.max()/z1.max())
z2 = float32(reshape(hiresimg, (-1)))
z3 = z1scaled+z2
vtkdata = VtkData(StructuredPoints([181,217,181]), PointData(Scalars(z3)))
vtkdata.tofile('/home/danc/mri_overlay', 'binary')

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License