[Insight-users] I hope ITK read data from matlab , what should I do ?
zhq
15891495523 at 126.com
Thu Dec 12 08:12:14 EST 2013
Dear all :
I run matlab code , and get a data which is save as mat format file . Then , I wish segment the data with ITK . How can I read the data with ITK .
Can I save the data as vtk format file and then to read it with ITK ?
The follow is what I has done :
( In matlab :)
save('MRI.vtk','MRAImgs') % the MRAImgs is the mat format data , I want to save the data as vtk format
( In ITK :)
typedef itk::ImageFileReader<InternalImageType> ReaderType ;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName("G:\\Graduation Design\\ITK code\\MRI.vtk");
try
{
reader->Update();
}
catch( itk::ExceptionObject & excep )
{
std::cerr << "Exception caught !" << std::endl;
std::cerr << excep << std::endl;
system("pause");
}
But a error appears:
What should I do ?
Thanks in advance !
zhq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20131212/0ca2d7ce/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QQ??20131212210256.png
Type: image/png
Size: 15604 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20131212/0ca2d7ce/attachment-0001.png>
More information about the Insight-users
mailing list