[Insight-users] FltkImageViewer : using the ITK to VTK adaptors

Luis Ibanez luis . ibanez at kitware . com
Sun, 12 Oct 2003 14:40:37 -0400


Hi Robert,

Thanks for posting your CMakeCache.txt file.

The problem is that you are providing the full path to
Auxiliary/vtk  for the variable InsightApplications,
acccording to your cache, you have:


   InsightApplications:PATH=G:/RP/ITK/InsightApplications/Auxiliary/vtk

Instead, you should have only

   InsightApplications:PATH=G:/RP/ITK/InsightApplications


Because in the CMakeLists.txt file you are doing:


 > FIND_PATH( InsightApplications  CMakeLists.txt)
 > INCLUDE_DIRECTORIES(
 >    ${InsightApplications}/Auxiliary/vtk
 > )



Regards,


   Luis



--------------------------------------
Robert-Paul Buitendijk wrote:
> hi luis
> 
> here is the CMakeCache.txt file
> 
> grtz Robert
> 
> -----Oorspronkelijk bericht-----
> Van: insight-users-admin at itk . org
> [mailto:insight-users-admin at itk . org]Namens Luis Ibanez
> Verzonden: dinsdag 7 oktober 2003 0:27
> Aan: Robert-Paul Buitendijk
> CC: Insight-users at public . kitware . com
> Onderwerp: Re: [Insight-users] FltkImageViewer : using the ITK to VTK
> adaptors
> 
> 
> 
> Hi Robert,
> 
> The path for these headers should be set to the source
> directory of InsightApplications.
> 
> Your lines:
> 
>  > FIND_PATH( InsightApplications  CMakeLists.txt)
>  > INCLUDE_DIRECTORIES(
>  >    ${InsightApplications}/Auxiliary/vtk
>  > )
> 
> seem to be ok.
> 
> Can you please look at and eventually post the relevant
> lines of the CMakeCache.txt file created by CMake in the
> binary directory of your project.
> 
> We should be able to see the value taken by the
> "InsightApplications" variable.
> 
> It may be that it is not pointing to the right location
> in your disk.
> 
> 
> Thanks
> 
> 
> 
>     Luis
> 
> 
> ----------------------------
> Robert-Paul Buitendijk wrote:
> 
>>hi luis
>>
>>here it is
>>still i allready did what you told me to but still Visual C++ can't find
> 
> it
> 
>>does the path have to be the source or the binary code??
>>for ITK and VTK it is the Binary code directory which is included.
>>but Visual C++ explicitly asks for  the *.h file because it is included in
>>the header file for the program, and the header file is in the Source
>>directory
>>
>>tnx Robert
>>
>>-----Oorspronkelijk bericht-----
>>Van: insight-users-admin at itk . org
>>[mailto:insight-users-admin at itk . org]Namens Luis Ibanez
>>Verzonden: dinsdag 7 oktober 2003 0:06
>>Aan: Robert-Paul Buitendijk
>>CC: Insight-users at public . kitware . com
>>Onderwerp: Re: [Insight-users] FltkImageViewer : using the ITK to VTK
>>adaptors
>>
>>
>>
>>Hi Robert,
>>
>>Unfortunately I didn't got the CMakeLists.txt
>>file that you intended to attach to your email.
>>
>>Given that this filter is a templated class, you simply
>>need to add its path to your project as an include path.
>>
>>Something like
>>
>>   INCLUDE_DIRECTORIES(
>>     ${myPathToInsightApplicationsAuxialiaryVtk}
>>     )
>>
>>
>>
>>Regards,
>>
>>
>>   Luis
>>
>>
>>-------------------------------
>>Robert-Paul Buitendijk wrote:
>>
>>
>>>Hi Luis
>>>
>>>I am using the added CMakeList file for my application.
>>>I am adding the path Auxiliary/vtk , because in my code i #include
>>>"itkImageToVtkImageFilter.h" and construct a filtertype
>>>	typedef itk::ImageToVTKImageFilter<ImageType>	FilterType;
>>>
>>>But when using the CMakeList file which i added CMake does add the wanted
>>>libraries .
>>>I can't see where the data from my path goes. When i compile my project
>>>using Visual C++ i get an error
>>>stating that the program can't find itkImageToVtkImageFilter.h
>>>Why is this, did i incorrectly add the path in which
>>>itkImageToVtkImageFilter.h is located??
>>>
>>>Tnx
>>>Robert,
>>>
>>>ps Your help means a lot
>>>
>>>-----Oorspronkelijk bericht-----
>>>Van: Luis Ibanez [mailto:luis . ibanez at kitware . com]
>>>Verzonden: maandag 6 oktober 2003 1:29
>>>Aan: Robert-Paul Buitendijk
>>>CC: insight-users at itk . org
>>>Onderwerp: Re: [Insight-users] FltkImageViewer
>>>
>>>
>>>Hi Robert,
>>>
>>>Insight Application doesn't have an installation process.
>>>Maybe you mean "compilation" when you say "installation"  ??
>>>
>>>FltkImageViewer will simply create a library that is used
>>>by other applications.  The library should appear in the
>>>binary directory where you build InsightApplications,
>>>under the subdirectory
>>>
>>>  Auxiliary/FltkImageViewer /  { Debug, Release }
>>>
>>>Where "Debug/Release" is the compilation mode that you
>>>selected.
>>>
>>>Please check that the library is in one of these two
>>>directories.
>>>
>>>You may try an application like:  "GaussianFilter",
>>>this is one of the simplest applications that make use
>>>of the FltkImageViewer library.
>>>
>>>
>>>Regards,
>>>
>>>
>>>  Luis
>>>
>>>------------------------------------
>>>Robert-Paul Buitendijk wrote:
>>>
>>>
>>>
>>>
>>>>Hello Luis
>>>>
>>>>I tried to figure out where the error in InsightApplications.dsw
>>>
> occurred.
> 
>>>>It turned out that it was in the ITKAPPBIN\Auxiliary\FltkImageViewer
>>>>directory.
>>>>So I tried to see if reinstalling Insight Applications via CMake would
>>>
>>>work.
>>>
>>>
>>>
>>>>No result
>>>>
>>>>So I Recompiled the FLTK files which are needed for that directory, no
>>>>errors.
>>>>Next I reinstalled InisghtApplications again but still it would not
>>>
>>install
>>
>>
>>>>the FltkImageViewer directory in full
>>>>
>>>>Is there anything i've missed or haven't done what WOULD make it work???
>>>>
>>>>tnx in advance
>>>>Robert
>>>>
>>>>
>>>>_______________________________________________
>>>>Insight-users mailing list
>>>>Insight-users at itk . org
>>>>http://www . itk . org/mailman/listinfo/insight-users
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk . org
>>http://www . itk . org/mailman/listinfo/insight-users
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>PROJECT(30_09)
>>
>>FIND_PACKAGE(ITK)
>>IF(ITK_FOUND)
>>   INCLUDE(${ITK_USE_FILE})
>>ELSE(ITK_FOUND)
>>   MESSAGE(FATAL_ERROR
>>           "Cannot build InsightApplications without ITK.  Please set
>>ITK_DIR.")
>>ENDIF(ITK_FOUND)
>>
>>
>>FIND_PACKAGE(VTK)
>>IF (VTK_FOUND)
>>   INCLUDE (${VTK_USE_FILE})
>>ELSE(VTK_FOUND)
>>   MESSAGE(FATAL_ERROR
>>           "Cannot build InsightApplications without ITK.  Please set
>>VTK_DIR.")
>>ENDIF(VTK_FOUND)
>>
>>FIND_PATH( InsightApplications  CMakeLists.txt)
>>INCLUDE_DIRECTORIES(
>>   ${InsightApplications}/Auxiliary/vtk
>>)
>>
>>
>>INCLUDE_DIRECTORIES(
>>  ${30_09}
>>  )
>>
>>#
>>#  Define the list of source files
>>#
>>SET( 30_09_SRCS
>>	StdAfx
>>	positie
>>	positieDlg
>>	positie.rc
>>	res/positie.ico
>>	res/positie.rc2)
>>
>>
>>
>>LINK_LIBRARIES( 30_09
>>		VXLNumerics
>>		ITKCommon
>>		ITKBasicFilters
>>		ITKIO
>>		ITKMetaIO
>>		itkpng
>>		itkzlib
>>		vtkRendering
>>		vtkGraphics
>>		vtkHybrid
>>		vtkImaging
>>		vtkIO
>>		vtkFiltering
>>		vtkCommon )
>>
>>
>>ADD_DEFINITIONS(-D_AFXDLL)
>>
>>SET(CMAKE_MFC_FLAG 6)
>>
>>
>>ADD_EXECUTABLE(30_09 WIN32 ${30_09_SRCS}  )
>>