This package contains a collection of classes and functions, which allow to comfortably work with medical images and meshes. It provides a intuitive and transparent way of dealing with spacing, origin, image orientation, etc. The package includes functions for input-output with common image formats (mhd, gipl) and mesh formats (vtk, stl), and basic (although not necessarily simple) image processing operations such as image resample, image reslice and image transform.
Please do not hesitate to propose new features, examples or any constructive comments!
I tried to load mhd files, it was going well but I got the following error for some mhd files:
Undefined function or variable 'zlibdecode'.
Error in read_mhd>read_raw (line 75)
Error in read_mhd (line 20)
data = read_raw([ path filesep info.DataFile ], info.Dimensions,info.DataType,'native',0,ndims, info);
Did I do something wrong?
I try to write mhd/mha image using the write_mhd() function, but it fails.
My image is a 3D matrix of double values.
I get this type of error: Attempt to reference field on non-structure array.
Because my image is not a struct, then it fails to reach the image.size and image.orientation fields.
Is there any restriction on the input data? And which format should I use?
in this awesome tool box you're depending on Frustum as an already built class.
But unfortunately I couldn't find it.
any one has can help me find the frustum class?
I have data format as .img and .hrd. and i want to use this tool (http://www.mathworks.com/help/images/examples/registering-multimodal-3-d-medical-images.html)
But it support .bin and .header format.
Would you let me know how to convert .img and .hrd or .raw and .mhd to .bin and .header format so that i can use the above mentioned tool for my data for 3d to 3D rigid image registration. I have knee MRI data, not brain MRI
Will this toolbox work with my matlab2014a?
Can we use this for mha files??
how can i trannsform mhd image by 4*4 matrix??
matrix=[ -0.9357 0.2129 0.2815 -424.3918
0.2370 -0.2120 0.9481 -329.0604
0.2615 0.9538 0.1479 363.3647
0 0 0 1.0000];
outputImage = transformImage(matrix,volinputImg,volreferenceImage,'debug' );
% % % Error is appeared in ImageType(referenceImage) function; inputImg=Vol_moving;
% % % Error is appeared in sub function ImageType(referenceImage);referenceImage=Vol_fixed;
You can currently import meshes in VTK ASCII format. For vtk images, you need to convert them to mhd first. You can use Paraview for that.
Hi Guys, I have to import data from VTK file to Matlab and show them. Do you have some tutorial for it ? Thx
The toolbox currently supports gipl and mhd only.
I have added some mising files like vtkMathPerpendiculars.m
Thanks for rating
And is it possible to open analyze(.hdr and .img)? NiFTi (.nii) and .nrrd files with your code?
Hi! Thanks for sharing code!
When I try to run test_image.m I get a message "Undefined function 'vtkMathPerpendiculars'". Where I can get it?
you can display the image by doing imshow(im.data)
hi alberto, thanks! :) do we directly need to run read_mhd and how exactly display the .mha files using imshow()? do revert :) waiting!! regards
first of all thanks sharing code
i want to ask a question
i have dwi brain image .gipl format.i want to tick on .gipl image with roi and then want to make logic one in roi area and logic zero outside of roi area
if someone knows how it is done, kindly help me
You do not need to change paths for this package in particular. You will need to add the files to your matlab path (as you would do for any other package) or put the file in your working directory. Usually it is enough to right click in the folder where the files are from the matlab file browser and click on "add to path"-> "selected folders and subfolders".
How could I deploy that package, so as to use the functions immediately without the need to change paths??
Unfortunately it currently reads/writes ASCII vtk mesh files only. Mhd binary files are supported though.
Can it read binary VTK?
Yes Akshay, among several other functionalities that is exactly what it does
Is this function used to read raw/mhd file?
Could this toolbox read and write '.mha' files? Since i only found the function used to read and write '.mhd' files.Thanks
* Some bug fixing and extended features for neighbourhood operations
Some bug fixing