[Insight-users] help! 1st time to run itk/vtk

Zhong Li zhli@uncc.edu
Wed May 19 21:21:41 EDT 2004


This is a multi-part message in MIME format.

------=_NextPart_000_0001_01C43DBD.5E920E40
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi, 
 
Thanks all for your comments and suggestions.
 
This is the 1st time I try the itk/vtk/cmaker with the demo posted on
the presentation of itk on the itk.org website show how to make itk/vtk
work together.. Attached is the CMakeLists.txt and myProject.cxx
 
The CMakeLists.txt is:
PROJECT(myProject)
 
FIND_PACKAGE ( ITK)
IF ( ITK_FOUND)
  INCLUDE( ${USE_ITK_FILE} )
ENDIF( ITK_FOUND)
 
FIND_PACKAGE ( VTK)
IF ( VTK_FOUND)
  INCLUDE( ${USE_VTK_FILE} )
ENDIF( VTK_FOUND)
 
INCLUDE_DIRECTORIES(${myProject_SOURCE_DIR})
ADD_EXECUTABLE( myProject myProject.cxx)
TARGET_LINK_LIBRARIES (   
  myProject ITKBasicFilters
  ITKCommon ITKIO vtkRendering 
  vtkGraphics vtkHybrid vtkImaging 
  vtkIO vtkFiltering vtkCommon
)
 
The myProject.cxx is:
#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkImageToVTKImageFilter.h"
#include "vtkImageViewer.h"
#include "vtkRenderWindowInteractor.h"
 
int main( intargc, char **argv) {
            typedef itk::Image<unsigned short,2> ImageType;
            typedef itk::ImageFileReader<ImageType> ReaderType;
            typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;
            
            ReaderType::Pointerreader= ReaderType::New();
            ConnectorType::Pointerconnector= ConnectorType::New();
            reader->SetFileName( argv[1]);
            connector->SetInput( reader->GetOutput() );
            vtkImageViewer* viewer= vtkImageViewer::New();
            vtkRenderWindowInteractor* renderWindowInteractor=
vtkRenderWindowInteractor::New();
            viewer->SetupInteractor( renderWindowInteractor);
            viewer->SetInput( connector->GetOutput() );
            viewer->Render();
            viewer->SetColorWindow( 255);
            viewer->SetColorLevel( 128);
            renderWindowInteractor->Start();
            return 0;
}
 
I think the make and build of itk(v1.6) and vtk(v4.2) packages are fine
with CMake(v2.0) vc++ 6.0 on my windows2000.
 
When I build the project, it gives the error: 
fatal error C1083: Cannot open include file:
'itkImageToVTKImageFilter.h': No such file or directory Error executing
cl.exe. 
 
I find that the itkImageToVTKImageFilter.h is not under the dir of itk
package, but in the InsightApplications (which is a separate package
outside the itk). So how can I include the itkImageToVTKImageFilter.h? I
guess I need to put something like
FIND_PACKAGE (InsightApplication)
IF (InsightApplication_FOUND)
  INCLUDE( ${USE_InsightApplication_FILE})
ENDIF(InsightApplication_FOUND)
In the CMakeLists.txt. However I got the CMake error:
"CMake error: InsightApplication_DIR not set. It must set to the
directory containing InsightApplicationConfig.cmake in order to use the
InsightApplication."
I can't find any file named "InsightApplicationConfig.cmake" under the
insightapplication_build dir. What should I do to make the little demo
run?
 
Regards
 
zhong

------=_NextPart_000_0001_01C43DBD.5E920E40
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C43DBD.5E306640">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:Zoom>75</w:Zoom>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:UseFELayout/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-alt:\5B8B\4F53;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
	{font-family:"\@SimSun";
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 135135232 16 0 262145 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:SimSun;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:.5in'>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hi, <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks all for your comments and =
suggestions.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>This is the 1<sup>st</sup> time I try the =
itk/vtk/cmaker
with the demo posted on the presentation of itk on the itk.org website =
show how
to make itk/vtk work together.. Attached is the CMakeLists.txt and
myProject.cxx<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<div style=3D'border:none;border-bottom:double windowtext =
2.25pt;padding:0in 0in 1.0pt 0in'>

<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:double =
windowtext 2.25pt;
padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>The CMakeLists.txt =
is:<o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>PROJECT(myProject)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>FIND_PACKAGE ( ITK)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>IF ( ITK_FOUND)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span style=3D'mso-spacerun:yes'>&nbsp; =
</span>INCLUDE(
${USE_ITK_FILE} )<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>ENDIF( ITK_FOUND)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>FIND_PACKAGE ( VTK)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>IF ( VTK_FOUND)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span style=3D'mso-spacerun:yes'>&nbsp; =
</span>INCLUDE(
${USE_VTK_FILE} )<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>ENDIF( VTK_FOUND)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>INCLUDE_DIRECTORIES(${myProject_SOURCE_DIR})<o:p></o:p=
></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>ADD_EXECUTABLE( myProject =
myProject.cxx)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>TARGET_LINK_LIBRARIES (<span
style=3D'mso-spacerun:yes'>&nbsp;&nbsp; =
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span style=3D'mso-spacerun:yes'>&nbsp; =
</span>myProject
ITKBasicFilters<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span style=3D'mso-spacerun:yes'>&nbsp; =
</span>ITKCommon ITKIO
vtkRendering <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span style=3D'mso-spacerun:yes'>&nbsp; =
</span>vtkGraphics
vtkHybrid vtkImaging <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span style=3D'mso-spacerun:yes'>&nbsp; </span>vtkIO
vtkFiltering vtkCommon<o:p></o:p></span></font></p>

<div style=3D'border:none;border-bottom:double windowtext =
2.25pt;padding:0in 0in 1.0pt 0in'>

<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:double =
windowtext 2.25pt;
padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>)<o:p></o:p></span></font></=
p>

</div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<div style=3D'border:none;border-bottom:double windowtext =
2.25pt;padding:0in 0in 1.0pt 0in'>

<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:double =
windowtext 2.25pt;
padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>The myProject.cxx =
is:<o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>#include =
&quot;itkImage.h&quot;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>#include =
&quot;itkImageFileReader.h&quot;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>#include =
&quot;itkImageToVTKImageFilter.h&quot;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>#include =
&quot;vtkImageViewer.h&quot;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>#include =
&quot;vtkRenderWindowInteractor.h&quot;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>int main( intargc, char **argv) =
{<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>typedef
itk::Image&lt;unsigned short,2&gt; =
ImageType;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>typedef
itk::ImageFileReader&lt;ImageType&gt; =
ReaderType;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>typedef
itk::ImageToVTKImageFilter&lt;ImageType&gt; =
ConnectorType;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>ReaderType::Pointerreader=3D
ReaderType::New();<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>ConnectorType::Pointerconnector=3D
ConnectorType::New();<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>reader-&gt;SetFileName(
argv[1]);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>connector-&gt;SetInput(
reader-&gt;GetOutput() );<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>vtkImageViewer*
viewer=3D vtkImageViewer::New();<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>vtkRenderWindowInteractor*
renderWindowInteractor=3D =
vtkRenderWindowInteractor::New();<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>viewer-&gt;SetupInteractor(
renderWindowInteractor);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>viewer-&gt;SetInput(
connector-&gt;GetOutput() );<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; =
</span>viewer-&gt;Render();<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>viewer-&gt;SetColorWindow(
255);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>viewer-&gt;SetColorLevel(
128);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; =
</span>renderWindowInteractor-&gt;Start();<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span =
style=3D'mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; </span>return
0;<o:p></o:p></span></font></p>

<div style=3D'border:none;border-bottom:double windowtext =
2.25pt;padding:0in 0in 1.0pt 0in'>

<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:double =
windowtext 2.25pt;
padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>}<o:p></o:p></span></font></=
p>

</div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I think the make and build of itk(v1.6) and vtk(v4.2)
packages are fine with CMake(v2.0) vc++ 6.0 on my =
windows2000.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>When I build the project, it gives the error: =
<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>fatal error C1083: Cannot open include file:
'itkImageToVTKImageFilter.h': No such file or directory Error executing =
cl.exe.
<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<div style=3D'border:none;border-bottom:double windowtext =
2.25pt;padding:0in 0in 1.0pt 0in'>

<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:double =
windowtext 2.25pt;
padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>I find that the
itkImageToVTKImageFilter.h is not under the dir of itk package, but in =
the
InsightApplications (which is a separate package outside the itk). So =
how can I
include the itkImageToVTKImageFilter.h? I guess I need to put something =
like<o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>FIND_PACKAGE =
(InsightApplication)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>IF =
(InsightApplication_FOUND)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><span style=3D'mso-spacerun:yes'>&nbsp; =
</span>INCLUDE(
${USE_InsightApplication_FILE})<o:p></o:p></span></font></p>

<div style=3D'border:none;border-bottom:double windowtext =
2.25pt;padding:0in 0in 1.0pt 0in'>

<p class=3DMsoNormal style=3D'border:none;mso-border-bottom-alt:double =
windowtext 2.25pt;
padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>ENDIF(InsightApplication_FOU=
ND)<o:p></o:p></span></font></p>

</div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>In the CMakeLists.txt. However I got the CMake =
error:<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&#8220;CMake error: InsightApplication_DIR not set. =
It must
set to the directory containing InsightApplicationConfig.cmake in order =
to use
the InsightApplication.&#8221;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I can&#8217;t find any file named =
&#8220;InsightApplicationConfig.cmake&#8221;
under the insightapplication_build dir. What should I do to make the =
little
demo run?<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Regards<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>zhong<o:p></o:p></span></font></p>

</div>

</body>

</html>

------=_NextPart_000_0001_01C43DBD.5E920E40--




More information about the Insight-users mailing list