<div dir="ltr"><div>hi insight users,</div>
<div>I'm new with the insight platform, i've tried to start my first program but i'm encountring problem while building the program which is :<font size="1">
<p>LINK : fatal error LNK1104: cannot open file 'ITKFltkImageViewer.lib'</p>
<p>This my cmakelists.txt :</p><span lang="FR">
<p>PROJECT(TIM3D)</p>
<p>FIND_PACKAGE(ITK)</p>
<p>IF(ITK_FOUND)</p>
<p>INCLUDE(${ITK_USE_FILE})</p>
<p>ELSE(ITK_FOUND)</p>
<p>MESSAGE(FATAL_ERROR</p>
<p>"Cannot build InsightApplications without ITK. Please set ITK_DIR.")</p>
<p>ENDIF(ITK_FOUND)</p>
<p>FIND_PACKAGE(FLTK)</p>
<p>IF(FLTK_FOUND)</p>
<p>INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})</p>
<p>ENDIF(FLTK_FOUND)</p>
<p>INCLUDE_DIRECTORIES(</p>
<p>C:/ItkVtk/InsightApplications-3.20.0/Auxiliary/FltkImageViewer</p>
<p>C:/ItkVtk/ItkAppBin/Auxiliary/FltkImageViewer</p>
<p>${Tim3D_SOURCE_DIR}</p>
<p>${Tim3D_BINARY_DIR}</p>
<p>)</p>
<p>FIND_LIBRARY(FltkImageViewer_LIBRARY NAMES FltkImageViewer ) </p>
<p>ADD_EXECUTABLE(TIM3D TIM3D.cxx)</p>
<p>TARGET_LINK_LIBRARIES(TIM3D ITKIO ITKBasicFilters ITKNumerics ITKCommon ITKFltkImageViewer ${FltkImageViewer} </p>
<p>${FLTK_LIBRARIES})</p>
<p>***************************************************************************************</p>
<p>this the code :</p><font color="#0000ff" size="2"><font color="#0000ff" size="2">
<p>#include</p></font></font><font size="2"> </font><font color="#a31515" size="2"><font color="#a31515" size="2"><iostream></font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">
<p>#include</p></font></font><font size="2"> </font><font color="#a31515" size="2"><font color="#a31515" size="2">"itkImage.h"</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">
<p>#include</p></font></font><font size="2"> </font><font color="#a31515" size="2"><font color="#a31515" size="2">"itkImageFileReader.h"</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">
<p>#include</p></font></font><font size="2"> </font><font color="#a31515" size="2"><font color="#a31515" size="2">"fltkImage2DViewer.h"</font></font><font color="#a31515" size="2"><font color="#a31515" size="2"></font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">
<p>#include</p></font></font><font size="2"> </font><font color="#a31515" size="2"><font color="#a31515" size="2">"FL/fl_file_chooser.H"
<p></p></font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">
<p>int</p></font></font><font size="2"> usage(</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">void</font></font><font size="2">)
<p>{</p>
<p>std::cout << </p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"Tim3D"</font></font><font size="2"> << std::endl;
<p>std::cout << std::endl;</p>
<p>std::cout << </p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"TIM3D <Filename>"</font></font><font size="2"> << std::endl;
<p>std::cout << std::endl;</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">return</font></font><font size="2"> 1;
<p>}</p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">
<p>int</p></font></font><font size="2"> main(</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">int</font></font><font size="2"> argc, </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">char</font></font><font size="2"> **argv)
<p>{</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">typedef</font></font><font size="2"> itk::Image< </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">float</font></font><font size="2">, 2 > ImageType;
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">char</font></font><font size="2"> *fName;
<p></p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2">(argc > 2)
<p>{</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">return</font></font><font size="2"> usage();
<p>}</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">else</font></font><font size="2">
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2">(argc == 1)
<p>{</p>
<p>fName = fl_file_chooser(</p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"charger projections"</font></font><font size="2">, </font><font color="#a31515" size="2"><font color="#a31515" size="2">"*.bmp"</font></font><font size="2">, </font><font color="#a31515" size="2"><font color="#a31515" size="2">"."</font></font><font size="2">);
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2">(fName == NULL || strlen(fName)<1)
<p>{</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">return</font></font><font size="2"> 0;
<p>}</p>
<p>}</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">else</font></font><font size="2">
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2">(argv[1][0] != </font><font color="#a31515" size="2"><font color="#a31515" size="2">'-'</font></font><font size="2">)
<p>{</p>
<p>fName = argv[argc-1];</p>
<p>}</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">else</font></font><font size="2">
<p>{</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">return</font></font><font size="2"> usage();
<p>}</p>
<p>std::cout << </p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"chargement: "</font></font><font size="2"> << fName << std::endl;
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">typedef</font></font><font size="2"> itk::ImageFileReader< ImageType > VolumeReaderType;
<p>VolumeReaderType::Pointer reader = VolumeReaderType::New();</p>
<p>reader->SetFileName(fName);</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">try</font></font><font size="2">
<p>{</p>
<p>reader->Update();</p>
<p>}</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">catch</font></font><font size="2">( itk::ExceptionObject & exception )
<p>{</p>
<p>std::cout << </p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"Problems reading file format"</font></font><font size="2"> << std::endl;
<p>std::cout << exception << std::endl;</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">return</font></font><font size="2"> 1;
<p>}</p>
<p>std::cout << </p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"...Done Loading File"</font></font><font size="2"> << std::endl;</font>
<p><font color="#008000" size="2"><font color="#008000" size="2"></font></font></p></span></font><font size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">
<p></p>
<p>typedef</p></font></font><font size="2"> fltk::Image2DViewer</font><ImageType::PixelType> ImageViewerType;
<p>ImageViewerType::Pointer viewer = ImageViewerType::New();</p>
<p>viewer->SetLabel( fName );</p>
<p>viewer->SetImage( reader->GetOutput() );</p>
<p>viewer->Show();</p>
<p>Fl::run();</p>
<p></p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">return</font></font><font size="2"> 1;
<p>}</p></font>
<p>************************************************************************************</p>
<p>I didn't know how to resolve this problem. I look for the requested library file 'ITKFltkImageViewer.lib' and i find it here : C:/ItkVtk/ItkAppBin/VolviewPlugIns/bin/Debug</p>
<p>waiting for your help, and thx</p>
<p>Regards,</p>
<p> </p></div></div>