[Insight-users] make problem
Burak Özkalaycı
bozkalayci at gmail.com
Wed Oct 10 06:05:35 EDT 2007
Dear all,
I think I have a very fundamental building problem. Can anyone help me?
The code is here:
===============================================================
// file name : tpls_main.cpp
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#ifdef __BORLANDC__
#define ITK_LEAN_AND_MEAN
#endif
#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkSegmentationLevelSetFunction.h"
int main( int argc, char *argv[] )
{
// Input Image
typedef float InputPixelType;
const unsigned int Dimension = 3;
typedef itk::Image< InputPixelType, Dimension > InputImageType;
// Internal Image
typedef float InternalPixelType;
typedef itk::Image< InternalPixelType, Dimension > InternalImageType;
// Output Image
typedef float OutputPixelType;
typedef itk::Image< OutputPixelType, Dimension > OutputImageType;
typedef itk::ImageFileReader< InternalImageType > ReaderType;
typedef itk::ImageFileWriter< OutputImageType > WriterType;
// Read write initialization
ReaderType::Pointer reader1 = ReaderType::New();
ReaderType::Pointer reader2 = ReaderType::New();
WriterType::Pointer writer = WriterType::New();
reader1->SetFileName( argv[1] );
reader2->SetFileName( argv[2] );
writer->SetFileName( argv[3] );
typedef itk::SegmentationLevelSetFunction<InternalImageType,
InternalImageType> LSFunctionType;
LSFunctionType::Pointer LS_function = LSFunctionType::New();
return 0;
}
===============================================================
The making output is here:
===============================================================
make
Scanning dependencies of target tpls_main
[100%] Building CXX object CMakeFiles/tpls_main.dir/tpls_main.o
/home/xonobo/CPP/itk_based/itkTPLS/tpls_main.cpp: In function 'int
main(int, char**)':
/home/xonobo/CPP/itk_based/itkTPLS/tpls_main.cpp:70: error: conversion
from 'itk::SmartPointer<itk::LevelSetFunction<itk::Image<float, 3u> >
>' to non-scalar type
'itk::SmartPointer<itk::SegmentationLevelSetFunction<itk::Image<float,
3u>, itk::Image<float, 3u> > >' requested
make[2]: *** [CMakeFiles/tpls_main.dir/tpls_main.o] Error 1
make[1]: *** [CMakeFiles/tpls_main.dir/all] Error 2
make: *** [all] Error 2
===============================================================
Thank you in advance.
Burak
More information about the Insight-users
mailing list