<div class="gmail_quote">On Mon, May 30, 2011 at 5:25 AM, john smith <span dir="ltr"><<a href="mailto:mkitkinsightuser@gmail.com">mkitkinsightuser@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I am using Qt add in for visual studio 2010 and I have typed this. But still gettting these errors:<br><i>1>e:\qt applications\mainwindow_globalreader\mainwindow\mainwindow\mainwindow.h(49): error C2065: 'ImageType' : undeclared identifier<br>
1>e:\qt applications\mainwindow_globalreader\mainwindow\mainwindow\mainwindow.h(50): error C2955: 'itk::ImageFileReader' : use of class template requires template argument list<br>1> c:\itk\source\code\io\itkImageFileReader.h(93) : see declaration of 'itk::ImageFileReader'<br>
1>e:\qt applications\mainwindow_globalreader\mainwindow\mainwindow\mainwindow.h(50): fatal error C1903: unable to recover from previous error(s); stopping compilation<br>1> mainwindow.cpp</i><br><br>I have include the header fules "itkImage.h" ,"itkImageFileReader.h".Could somebody help me?<br>
<br>class MainWindow : public QMainWindow<br>{<br> ..............<div class="im"><br><br>private: <br>typedef itk::ImageFileReader< ImageType > ReaderType;<br></div>ReaderType::Pointer reader;<br><br>};<br><br>
<br>MainWindow::MainWindow(QWidget *parent) :<br>
QMainWindow(parent),<br> ui(new Ui::MainWindow)<br>{<br>............<br>...........<br> typedef unsigned char InputPixelType;<br> typedef itk::Image< InputPixelType, 3 > InputImageType;<br> typedef itk::ImageFileReader< InputImageType > ReaderType;<div class="im">
<br>
ReaderType::Pointer reader = ReaderType::New();<br> <br>}<br></div></blockquote><div><br><br>As the error says, you have not defined ImageType. You need something like<br><br>typedef itk::Image<unsigned char, 2> ImageType;<br>
<br>David<br>
<br></div></div>