Hi Kent, A while ago, I wrote an ImageArchetypeReaderMex program that wraps the itkImageArchetypeImageReader as a mex function that can be called from Matlab. I used CMake to connect ITK and Matlab, and the resulting mex file can be built on any OS and enables you to make simple imread-type calls to read any format that ITK can read into Matlab. I can share the code I wrote for this with you if you think it would be helpful. It may be exactly what you need, or it may include some things that could help you.
Thanks, Dirk Date: Thu, 21 Nov 2013 18:52:19 +0000 From: "Williams, Norman K" <[email protected]> Subject: [Insight-developers] PROPOSAL FOR IMAGEIO: class to get image attributes before reading image To: ITK <[email protected]> Message-ID: <ceb3b282.39479%[email protected]> Content-Type: text/plain; charset="us-ascii" Is there a way to do this I'm missing? There are times when it's important to know the ITK pixel type and ImageDimension before reading an image file. In particular, I'm writing a reader to be called from Matlab, and it would be good to at least create an image with the same ImageDimension as the on-disk file. This would (I guess) call itk::ImageIOFactory::CreateImageIO to get the appropriate ImageIO object, then set the filename and call itk::ImageIOFactory::ReadImageInformation. This would work except for multi-file images like DICOM -- the fly in everyone's ImageIO ointment. I know how to do this; the question is where should it live? Should it be a method of itkImageFileReader? Or its own thing? _______________________________________________ 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://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-developers
