[ITK Community] [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://public.kitware.com/pipermail/community/attachments/20131212/0ca2d7ce/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QQ??20131212210256.png
Type: image/png
Size: 15604 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/community/attachments/20131212/0ca2d7ce/attachment-0002.png>
-------------- next part --------------
_____________________________________
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 Community mailing list