[Insight-users] Creating a workspace for a project

Luis Ibanez luis . ibanez at kitware . com
Thu, 18 Sep 2003 22:08:47 -0400


Hi Sandhya,


Here are some options

A) The quick and dirty way
B) The not so dirty and not so quick way
C) The clean and slow way
D) The nice way

It all depends on how fast do you want to have this
running in a separate workspace, and how long after
that you anticipate to keep using this code.


----

(A) Is to create a new directory,
     and simply *copy* on it the content
     of the directories

     - InsightApplication/Auxiliary/FltkImageViewer
     - InsightApplication/DicomImageViewe

    Then you create a unified CMakeLists.txt file
    with a single executable whose sources are all
    the .cxx files in the new directory.

    This is really quick,... and really dirty.



(B) Is to create a new directory only
     for the DicomImageViewer application.
     and still build the FltkImageViewer library
     as part of the InsightApplications workspace

     In your new DicomImageViewer directory
     you set up a CMakeLists.txt file that configures
     to ITK and to FLTK. This done with the famous
     CMake lines:

 >
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
>   INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
>   MESSAGE(FATAL_ERROR "Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
> 

and

>   FIND_PACKAGE(FLTK)
>   IF(FLTK_FOUND)
>     INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
>   ENDIF(FLTK_FOUND)


    In this CMakeLists.txt file you addd the location
    of the FltkImageViewer library and link with it.



(C) The clean and slow way is to move FltkImageViewer
     to an independent directory too and built it
     as an isolated library.
     You also move the DicomImageViewer to an isolated
     directory and then you do a CMakeLists.txt file
     similar to the one in option (B).



(D) The nice way is to use VTK for visualization instead
     of using the FltkImageViewer library.  In that case
     you simply need to use the ITK-to-VTK adaptors and
     in VTK use the class vtkImageViewer2 .






Regards,



    Luis



--------------------------
Thimmaiah, Sandhya wrote:
> Hi,
> I am trying to create a seperate workspace for DicomImageViewer. I don't
> want to load the whole insight application workspace just to use
> DicomImageViewer application. How can I make DicomImageViewer run in
> seperate workspace and how do I use fltk with DicomImageViewer if I run it
> in a seperate workspace. Thank you in advance
> 
> Regards,
> Sandhya Thimmaiah
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>