<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
You need to to include itkImageFileWriter.h and itkImageFileReader.h.
<br>
<br>
On 08.11.2011 17:44, ankit master wrote:
<blockquote
cite="mid:CAAg0zXd2Wpc5kB8=GTtJOnPDLTet-Jkk3AMBLW84OAkvfQ-P8Q@mail.gmail.com"
type="cite">Hello Dominique,
<div><br>
</div>
<div>Sorry to bug you again, Following is what I am trying to do
and I get errors, </div>
<div><br>
</div>
<div>source: <a moz-do-not-send="true"
href="http://en.wikipedia.org/wiki/Insight_Segmentation_and_Registration_Toolkit">http://en.wikipedia.org/wiki/Insight_Segmentation_and_Registration_Toolkit</a> </div>
<div><br>
</div>
<div>
<div>#include <iostream ></div>
<div>#include "itkImage.h"</div>
<div><br>
</div>
<div>int main (int argc, char** argv)</div>
<div>{</div>
<div> typedef itk::Image< float , 3 > ImageType;</div>
<div> typedef itk::ImageFileReader< ImageType >
ReaderType;</div>
<div> typedef itk::ImageFileWriter< ImageType >
WriterType;</div>
<div><br>
</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>std::cout
<< "this may work" << std::endl; </div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>system("PAUSE"); </div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>return
0; </div>
<div><br>
</div>
<div>}</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Error : </div>
<div><br>
</div>
<div>
<div>1>------ Build started: Project: myProject,
Configuration: Debug Win32 ------</div>
<div>1>Compiling...</div>
<div>1>myProject.cxx</div>
<div>1>..\myProject\myProject.cxx(8) : error C2039:
'ImageFileReader' : is not a member of 'itk'</div>
<div>1>..\myProject\myProject.cxx(8) : error C2143: syntax
error : missing ';' before '<'</div>
<div>1>..\myProject\myProject.cxx(8) : error C4430: missing
type specifier - int assumed. Note: C++ does not support
default-int</div>
<div>1>..\myProject\myProject.cxx(9) : error C2039:
'ImageFileWriter' : is not a member of 'itk'</div>
<div>1>..\myProject\myProject.cxx(9) : error C2143: syntax
error : missing ';' before '<'</div>
<div>1>..\myProject\myProject.cxx(9) : error C4430: missing
type specifier - int assumed. Note: C++ does not support
default-int</div>
<div>1>Build log was saved at
<a class="moz-txt-link-rfc2396E" href="file://c:\Users\amaster\Desktop\AVM_Documents\ITK_Practise\myProject_bin\myProject.dir\Debug\BuildLog.htm">"file://c:\Users\amaster\Desktop\AVM_Documents\ITK_Practise\myProject_bin\myProject.dir\Debug\BuildLog.htm"</a></div>
<div>1>myProject - 6 error(s), 0 warning(s)</div>
<div>2>------ Skipped Build: Project: ALL_BUILD,
Configuration: Debug Win32 ------</div>
<div>2>Project not selected to build for this solution
configuration </div>
<div>========== Build: 0 succeeded, 1 failed, 1 up-to-date, 1
skipped ==========</div>
<div><br>
</div>
<div><br>
</div>
<div>I am still not able to get my read Images, could you please
suggest what is going wrong here . </div>
<div><br>
</div>
<div>thank you </div>
<div><br>
</div>
<div>Ankit </div>
<br>
<div class="gmail_quote">2011/11/8 Dominique Töpfer <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:dominique@toepfer-web.de">dominique@toepfer-web.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF" text="#000000"> itkImageFileReader.h
(which btw. is an include file, not a library) is part of
ITK. If you configured your project with CMake correctly,
there is no need to put the file in your project folder.
<div>
<div class="h5"><br>
<br>
On 08.11.2011 16:42, ankit master wrote:
<blockquote type="cite">Thank you very much for the
prompt reply Dominique, I will fix this issue and
try to re build the application, just out of
curiosity at what location must itkImageFileReader.h
be ?
<div><br>
</div>
<div>Because it appears that even if I correct the
misspelled lib name I will still have to copy the
itkImageFileReader from a location to my current
folder . </div>
<div><br>
</div>
<div>Could you please help. </div>
<div><br>
</div>
<div>Thank you </div>
<div>Ankit <br>
<br>
<div class="gmail_quote">2011/11/8 Dominique
Töpfer <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:dominique@toepfer-web.de"
target="_blank">dominique@toepfer-web.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0
0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hi,<br>
<br>
this seems to be a simple typo - it's not
ikt... but itkImageFileReader.h<br>
<br>
Dominique
<div>
<div><br>
<br>
On 08.11.2011 16:26, ankit master wrote:
</div>
</div>
<blockquote type="cite">
<div>
<div>Hello,
<div><br>
</div>
<div>I am relatively new to ITK so
please bear with my dumb question. I
successfully installed ITK, VTK and
ITKApplications, I am trying to
build a simple example where I am
reading in an image and trying to
display it, </div>
<div><br>
</div>
<div>so I included the following libs
to my program </div>
<div><br>
</div>
<div>
<div>#include "itkImage.h"</div>
<div>#include "iktImageFileReader.h"</div>
<div>#include
"itkImageToVTKImageFilter.h"</div>
<div><br>
</div>
<div><br>
</div>
<div>when I try to build my program
I get the following error message </div>
<div><br>
</div>
<div>1>..\myProject\myProject.cxx(3)
: fatal error C1083: Cannot open
include file:
'iktImageFileReader.h': No such
file or directory</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I tried to look up online and
somewhere it was mentioned that
itkImageFileReader must be present
in ITKApplications/Auxillary/vtk./
folder ( which i should copy from
this folder into the folder where
I have my application code) , when
I look into that folder I do not
find the file I am looking for
(itkImageFileReader and
itkImageFileWriter ) . </div>
<div><br>
</div>
<div>Could anyone please help me
with finding the files
"itkImageFileReader.h" and
"itkImageFileWriter.h" </div>
<div><br>
</div>
<div>itkApplication 3.20 </div>
<div>itk 3.20.1 </div>
<div> <br>
</div>
<div>Thank you in advance. </div>
<div><br>
</div>
<div>Ankit </div>
<br>
<br>
<br>
Following is my CmakeList.txt file </div>
<div><br>
</div>
<div>
<div># This is the root ITK
CMakeLists file.</div>
<div>CMAKE_MINIMUM_REQUIRED(VERSION
2.4)</div>
<div>IF(COMMAND CMAKE_POLICY)</div>
<div> CMAKE_POLICY(SET CMP0003 NEW)</div>
<div>ENDIF(COMMAND CMAKE_POLICY)</div>
<div><br>
</div>
<div><br>
</div>
<div># This project is designed to
be built outside the Insight
source tree.</div>
<div>PROJECT(myProject)</div>
<div><br>
</div>
<div># Find ITK.</div>
<div>FIND_PACKAGE(ITK REQUIRED)</div>
<div>INCLUDE(${ITK_USE_FILE})</div>
<div><br>
</div>
<div><br>
</div>
<div>#FIND VTK.</div>
<div>FIND_PACKAGE(VTK REQUIRED)</div>
<div>INCLUDE(${VTK_USE_FILE})</div>
<div><br>
</div>
<div>ADD_EXECUTABLE(myProject
myProject.cxx )</div>
<div><br>
</div>
<div>TARGET_LINK_LIBRARIES(myProject
ITKCommon ITKIO ITKBasicFilters</div>
<div>
vtkRendering vtkGraphics vtkHybrid
vtkImaging vtkIO vt</div>
</div>
<div><br>
From the withered tree, a <span>flower</span>
blooms.<br>
- Zen<br>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_____________________________________
Powered by <a moz-do-not-send="true" href="http://www.kitware.com" target="_blank">www.kitware.com</a>
Visit other Kitware open-source projects at
<a moz-do-not-send="true" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>
Kitware offers ITK Training Courses, for more information visit:
<a moz-do-not-send="true" href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a>
Please keep messages on-topic and check the ITK FAQ at:
<a moz-do-not-send="true" href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a moz-do-not-send="true" href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><span><font color="#888888">
</font></span></pre>
<span><font color="#888888"> </font></span></blockquote>
<span><font color="#888888"> <br>
<br>
<pre cols="72">--
Dominique Töpfer, Dipl.-Inform.
Institute of Medical Physics
University of Erlangen</pre>
</font></span></div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<br>
From the withered tree, a <span>flower</span>
blooms.<br>
- Zen<br>
<br>
</div>
</blockquote>
<br>
<br>
<pre cols="72">--
Dominique Töpfer, Dipl.-Inform.
Institute of Medical Physics
University of Erlangen</pre>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<br>
From the withered tree, a <span>flower</span> blooms.<br>
- Zen<br>
<br>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Dominique Töpfer, Dipl.-Inform.
Institute of Medical Physics
University of Erlangen</pre>
</body>
</html>