[Insight-users] urgent help

Luis Ibanez luis.ibanez at kitware.com
Thu Jun 17 11:42:07 EDT 2004


Hi Anis,

It is hard to find a good justification for
using ITK 1.0 at this point.


Please update to ITK 1.6

You can get it from the Download page:

      http://www.itk.org/HTML/Download.php

Note that now you will find a module "Insight"
with the proper ITK toolkit and a module called
"InsightApplications" with all the demo applications.



InsightApplications and must be built against


     VTK 4.2       or    VTK CVS


and


     FLTK 1.1.4    or    FLTK 1.1.5


Regards,


    Luis


-----------------------------
sd d wrote:

> thank you,
> in fact i'm using ITK 1.0, and i toke the code from the repertory: 
> itk/examples
> I tried to modify the makelist file, as you told me, i had the same errors.
> I will install itk 1.6, but i don't know which version of VTK and FLTK, 
> are compatible whith itk 1.6.
> for ITK 1.0 i used to install vtk40 and fltk 1.1.4.
> 
> */Luis Ibanez <luis.ibanez at kitware.com>/* wrote:
> 
> 
>     Hi Anis,
> 
> 
>     Desperation is an opportunity for enlightenment !
> 
>     --
> 
>     It seems that you are using InsightApplications from ITK 1.4.
>     The example that you mention was removed because many new
>     examples illustrating the same concepts were added to
> 
>     Insight/Examples/IO
>     Insight/Examples/Filtering
>     Insight/Examples/Segmentation
> 
>     and were used to populate the ITK Software Guide
> 
>     http://www.itk.org/ItkSoftwareGuide.pdf
> 
> 
>     --
> 
>     What you need to change is the way you are looking
>     for ITK in the CMakeLists.txt file.
> 
>     Right now you are using:
> 
>      > INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake)
>      > IF (USE_ITK_FILE)
>      > INCLUDE (${USE_ITK_FILE})
>      > ENDIF (USE_ITK_FILE)
> 
> 
>     You should be using the following instead:
> 
> 
>     FIND_PACKAGE(ITK)
>     IF(ITK_FOUND)
>     INCLUDE(${ITK_USE_FILE})
>     ELSE(ITK_FOUND)
>     MESSAGE(FATAL_ERROR "Cannot build without ITK.Please set ITK_DIR.")
>     ENDIF(ITK_FOUND)
> 
> 
>     You are strongly encouraged to move forward
>     to version ITK 1.6. Many things have been
>     improved between the two versions. If you
>     stick to ITK 1.4 you are probably going to
>     face many problems that we have been fixing
>     in the past 15 months.
> 
>     You are also encouraged to follow the "GettingStarted"
>     tutorial session, where you would have found the
>     correct settings for the CMakeLists.txt file.
> 
>     http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/img0.html
> 
> 
> 
>     Regards,
> 
> 
> 
>     Luis
> 
> 
> 
>     -------------
>     sd d wrote:
> 
>      > i'm going really to be desperate whith ITK!!
>      > Only the sampleproject provided in the examples work correctly.
>      > I did exactly what it said to be necessary to do.
>      > - i c! opy the directory *BasicIOAndFilter *outside from the example
>      > directory
>      > - i modified the makelist file to find the itk directory.
>      > - i run cmake
>      > when i compiled it generates errors.
>      > i didnot understand. Please help.
>      > I will send the makefile, *.cxx and the errors i had.
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      > Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit
>     partout !
>      > Créez votre Yahoo! Mail
>      >
>      >
>      >
>      > Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !
>      >
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      >
>     /*=========================================================================
>      >
>      > Program: Insight Segmentation & Registration Toolkit
>      > Module: $RCSfile: BasicIOAndFilter.cxx,v $
>      > Language: C++
>      > Date! : $Date: 2002/10/16 19:19:53 $
>      > Version: $Revision: 1.1 $
>      >
>      > Copyright (c) 2002 Insight Consortium. All rights reserved.
>      > See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for
>     details.
>      >
>      > This software is distributed WITHOUT ANY WARRANTY; without even
>      > the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
>      > PURPOSE. See the above copyright notices for more information.
>      >
>      >
>     =========================================================================*/
>      >
>      > // This is an example of a simple program involving filters and
>     I/O, expected
>      > // to be modified and compiled as a project outside the Insight
>     source tree.
>      > // This is a good place to start if you have never used Insight
>     before.
>      > //
>      > // Each filter has an Update() method that forces it to make sure its
>      > // output is up to date and available for reading. If Update() has
>      > // been called be! fore, and the input has not changed since that
>     call,
>      > // then no action is performed because the correct data is already
>      > // computed and accessible via GetOutput(). Calling
>      > // someFilter->Update() forces it to call the Update() method of any
>      > // previous filters, so that the updating percolates back to the very
>      > // beginning. The Write() method of a writer calls its Update()
>      > // method. In this program, for instance, the call to writer->Write()
>      > // forces the whole process to execute.
>      > //
>      > // Notice that you must use the smart pointers (e.g.,
>     PNGIOType::Pointer) as
>      > // in the example, since the constructor is protected. This
>     permits the
>      > // bookkeeping that allows the Update() calls to work correctly.
>      > //
>      > // Extensive use of typedefs as in the example is recommended.
>      > //
>      > // To build this project, copy it outside the Insight source tree,
>      > // and then follow the s! ame steps you followed to build itk.
>      >
>      > #if defined(_MSC_VER)
>      > #pragma warning ( disable : 4786 )
>      > #endif
>      >
>      > #include
>      > #include
>      > #include
>      > #include
>      > #include
>      >
>      > typedef itk::Image ImageType;
>      >
>      > int main(int argc, char* argv[])
>      > {
>      >
>      > if (argc < 2)
>      > {
>      > std::cout
>      > << "usage: SampleFilterProject [inputfile] [outputfile]"
>      > << std::endl;
>      > exit(0);
>      > }
>      >
>      > try
>      > {
>      >
>      > // Instantiate a reader for the file.
>      > typedef itk::ImageFileReader ImageReaderType;
>      > ImageReaderType::Pointer reader = ImageReaderType::New();
>      > reader->SetFileName(argv[1]);
>      >
>      > // Instantiate a filter and attach it to the reader.
>      > typedef itk::BinaryThresholdImageFilter
>      > ThresholdFilterType;
>      > ThresholdFilterType::Pointer myFilter = ThresholdFilterType::New();
>      > myFilter->SetInput(reader->GetOutput());
>      > myFilter->SetUpperThreshold(128);
>      > myFilter->SetLowerThreshold(0);
>      >
>      > // Instantiate a witer and attach it to the filter.
>      > typedef itk::ImageFileWriter ImageWriterType;
>      > ImageWriterType::Pointer writer = ImageWriterType::New();
>      > writer->SetImageIO(itk::PNGImageIO::New());
>      > writer->SetInput(myFilter->GetOutput());
>      > writer->SetFileName(argv[2]);
>      >
>      > // Execute the process.
>      > writer->Update();
>      >
>      > }
>      > catch(itk::ExceptionObject &err)
>      > {
>      > std::cerr << err << std::endl;
>      > return 1;
>      > }
>      >
>      > return 0;
>      >
>      > }
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      >
>      > PROJECT(BasicIOAndFilter)
>      >
>      > #
>      > # Find ITK
>      > #
>      > # Uncomment the following lines if you want to
>      > # build this code outside the ITK binary tree
>      > INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake)
>      > IF (USE_ITK_FILE)
>      > INCLUDE (${USE_ITK_FILE})
>      > ENDIF (USE_ITK_FILE)
>      >
>      >
>      > #specify executables
>      > ADD_EXECUTABLE( BasicIOAndFilter BasicIOAndFilter.cxx )
>      > #TARGET_LINK_LIBRARIES( BasicIOAndFilter ITKIO )
>      >
>      >
>      >
>      >
>      > # We only need ITK's Common components. Link to the common libraries.
>      > TARGET_LINK_LIBRARIES(BasicIOAndFilter ${ITK_Common_LIBS}
>     ITKNumerics ITKIO ITKBasicFilters )
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > Linking...
>      > Creating library Debug/BasicIOAndFilter.li! b and object
>     Debug/BasicIOAndFilter.exp
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_destroy_read_struct
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_create_info_struct
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_create_read_struct
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_sig_cmp
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_read_end
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_read_image
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_get_rowbytes
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_read_update_info
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_set_swap
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: u! nresolved
>     external symbol _png_set_tRNS_to_alpha
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_get_valid
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_set_gray_1_2_4_to_8
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_set_palette_to_rgb
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_get_IHDR
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_read_info
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_set_sig_bytes
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_init_io
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_get_channels
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_write_end
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolv! ed
>     external symbol _png_write_image
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_write_info
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_set_compression_level
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_set_IHDR
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_destroy_write_struct
>      > ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external
>     symbol _png_create_write_struct
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: virtual __thiscall
>     MetaImage::~MetaImage(void)" (??1MetaImage@@UAE at XZ)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "bool __cdecl MET_SystemByteOrderMSB(void)"
>     (?MET_SystemByteOrderMSB@@YA_NXZ)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: __thiscall MetaImage::MetaIma! ge(void)"
>     (??0MetaImage@@QAE at XZ)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: void __thiscall
>     MetaImage::ElementDataFileName(char const *)"
>     (?ElementDataFileName at MetaImage@@QAEXPBD at Z)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: float __thiscall
>     MetaObject::Position(int)const " (?Position at MetaObject@@QBEMH at Z)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: float __thiscall
>     MetaObject::ElementSpacing(int)const "
>     (?ElementSpacing at MetaObject@@QBEMH at Z)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: int __thiscall MetaImage::DimSize(int)const
>     " (?DimSize at MetaImage@@QBEHH at Z)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: int __thiscall MetaObject::NDims(void)const
>     " (?NDims at MetaObject@@QBEHXZ)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external sym! bol "public: enum MET_ValueEnumType __thiscall
>     MetaImage::ElementType(void)const "
>     (?ElementType at MetaImage@@QBE?AW4MET_ValueEnumType@@XZ)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: int __thiscall
>     MetaImage::ElementNumberOfChannels(void)const "
>     (?ElementNumberOfChannels at MetaImage@@QBEHXZ)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: bool __thiscall
>     MetaObject::BinaryData(void)const " (?BinaryData at MetaObject@@QBE_NXZ)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: bool __thiscall
>     MetaImage::ElementByteOrderFix(void)"
>     (?ElementByteOrderFix at MetaImage@@QAE_NXZ)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: char const * __thiscall
>     MetaImage::ElementDataFileName(void)const "
>     (?ElementDataFileName at MetaImage@@QBEPBDXZ)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public! : void __thiscall
>     MetaObject::BinaryData(bool)" (?BinaryData at MetaObject@@QAEX_N at Z)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: void __thiscall MetaObject::Position(float
>     const *)" (?Position at MetaObject@@QAEXPBM at Z)
>      > ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved
>     external symbol "public: bool __thiscall
>     MetaImage::InitializeEssential(int,int const *,float const *,enum
>     MET_ValueEnumType,int,void *,bool)"
>     (?InitializeEssential at MetaImage@@QAE_NHPBHPBMW4M
>      > ET_ValueEnumType@@HPAX_N at Z)
>      > Debug/BasicIOAndFilter.exe : fatal error LNK1120: 41 unresolved
>     externals
>      > Error executing link.exe.
>      >
>      > ALL_BUILD - 42 error(s), 0 warning(s)
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Insight-users mailing list
>      > Insight-users at itk.org
>      > http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 
> ------------------------------------------------------------------------
> Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
> Créez votre Yahoo! Mail 
> <http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/mail/mail_taglines/default/*http://fr.benefits.yahoo.com/> 
> 
> 
> Dialoguez en direct avec vos amis grâce à Yahoo! Messenger ! 
> <http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com/> 
> 





More information about the Insight-users mailing list