[Insight-users] problem in reading .mhd file type
David Doria
daviddoria at gmail.com
Fri Aug 31 07:27:12 EDT 2012
On Fri, Aug 31, 2012 at 5:29 AM, Raviteja, Allaparthi <
Allaparthi.Raviteja at philips.com> wrote:
> Hi,
>
>
>
> I am trying to run the code for connected component and I have a problem
> in reading the “.mhd “ file. The code and the error are as follows.
>
You should be able to produce the same error with:
#include "itkImageFileReader.h"
int main(int argc, char* argv[] )
{
typedef unsigned char InternalPixelType;
const unsigned int Dimension = 2;
typedef itk::Image< InternalPixelType, Dimension > InternalImageType;
typedef itk::ImageFileReader< InternalImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
char *inputfile="d:\\EnhancedOutputImage2.mhd";
reader->SetFileName(inputfile);
reader->Update();
return EXIT_SUCCESS;
}
correct? If so, it sounds like a problem with your file. You could try
opening it with ParaView to see if that works?
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120831/88a0d379/attachment.htm>
More information about the Insight-users
mailing list