[Insight-users] link error: cannot open file 'ITKReview.lib'
Martine Lefevre
martine_lef at yahoo.fr
Mon Feb 23 08:17:18 EST 2009
Dear Luis and itk users,
I try to do some curvature estimation using the filter proposed by Gelas Arnauld which is based on a surface mesh data structure itk::QuadEdgeMesh. For this reason I include the ITKReview in my CMakeLists file.
In building the project I get the following link error:
1>Linking...
1> LINK : fatal error LNK1104: cannot open file 'ITKReview.lib'
Do you know the cause of this error?
Thank you in advance
Martine
I paste the code here and the CMakeLists file.
# This project is designed to be built outside the Insight source tree.
PROJECT(Curvature)
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)
ADD_EXECUTABLE(Curvature Curvature.cxx)
TARGET_LINK_LIBRARIES(Curvature ITKBasicFilters ITKReview ITKSpatialObject ITKNumerics ITKIO ITKCommon ITKAlgorithms vtkRendering vtkVolumeRendering vtkIO vtkWidgets vtkGraphics vtkImaging vtkFiltering vtkCommon)
// surface extraction with itk: itkBinaryMask3DMeshSource
// SurfaceExtraction.cxx
#include "itkImageFileReader.h"
#include "itkBinaryMask3DMeshSource.h"
#include "itkImage.h"
#include "itkMesh.h"
//#include "itkQuadEdgeMesh.h"
int main(void )
{
const unsigned int Dimension = 3;
//typedef unsigned char PixelType;
typedef float PixelType;
typedef itk::Image< PixelType, Dimension > ImageType;
typedef itk::ImageFileReader< ImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName("C:/Images/Volume.hdr");
try
{
reader->Update();
}
catch( itk::ExceptionObject & exp )
{
std::cerr << "Exception thrown while reading the input file " << std::endl;
std::cerr << exp << std::endl;
return EXIT_FAILURE;
}
typedef itk::Mesh<double> MeshType;
typedef itk::BinaryMask3DMeshSource< ImageType, MeshType > MeshSourceType;
MeshSourceType::Pointer meshSource = MeshSourceType::New();
const PixelType objectValue = static_cast<PixelType>( 255.0);
meshSource->SetObjectValue( objectValue );
meshSource->SetInput( reader->GetOutput() );
try
{
meshSource->Update();
}
catch( itk::ExceptionObject & exp )
{
std::cerr << "Exception thrown during Update() " << std::endl;
std::cerr << exp << std::endl;
return EXIT_FAILURE;
}
std::cout << "Nodes = " << meshSource->GetNumberOfNodes() << std::endl;
std::cout << "Cells = " << meshSource->GetNumberOfCells() << std::endl;
std::cout << "Code end !" << std::endl;
std::cin.get();
return EXIT_SUCCESS;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090223/ca590da1/attachment-0001.htm>
More information about the Insight-users
mailing list