[Ctk-developers] DCMTK and cardiac MR cine reader

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Fri May 7 14:43:57 UTC 2010


Hi Perry,

Regarding the technical aspect, assuming you want to get write access to the
repository, here are the steps:

  -> download QT 4.6  (see http://qt.nokia.com/downloads)

  -> create an account on github (upload public key + ask steve pieper to
add you on the project). See http://github.com/pieper/CTK
  -> git clone git at github.com:pieper/CTK.git

  -> create a build directory:
   mkdir CTK-superbuild
   cd CTK-superbuild

  -> ccmake
-DQT_QMAKE_EXECUTABLE:FILEPATH=/home/perry/projects/qtsdk-2010.02/qt/bin/qmake
../CTK

  -> Then you should be able to see the following. See attached image:
ccmake_CTK.png



More details about CTK architecture:

CTK is a collection of librarie:
   CTKCore
   CTKWidgets
   CTKVisualizationVTKCore
   CTKVisualizationVTKWidgets
   ...

Each one of these libraries have dependencies that could be either other CTK
libraries. For example CTKWidgets depends on CTKCore, or third party library
like: QT, VTK, PythonQt, etc ...

Each library is contained in its own directory:
  CTK/Libs/Core
  CTK/Libs/Widgets
  CTK/Libs/Visualization/VTK/Core
  CTK/Libs/Visualization/VTK/Widgets
  ....

The way to add a new library to the build process is:
  - create a new directory.

For example:
      -> CTK/Libs/Visualization/Vurtigo/Core
      -> CTK/Libs/Visualization/Vurtigo/Widgets

Create the following files in each one of these directories:
  -> CMakeLists.txt
   ->  target_libraries.cmake

You could inspire from:
  http://github.com/pieper/CTK/blob/master/Libs/Widgets/CMakeLists.txt

http://github.com/pieper/CTK/blob/master/Libs/Widgets/target_libraries.cmake


Last, to enable your library, edit CTK/CMakeLists.txt and update the
variable CTK_LIBS line 209.


As of today, we are following a "SVN like" workflow were people:
  -> git pull --rebase
  -> git push
See http://www.cmake.org/Wiki/CMake/Git#Rebase

After the Hackfest, we will come up with a branchy workflow and will have a
clear idea on how we will manage topic, branch, pull request, etc ...

########  The S U P E R B U I L D magic !  ########

My new library depends on a third library ... how its working ?

Using the target_libraries.cmake file, the superbuild script is able to
"know" which are the dependencies of your library.
Knowing that, it will be able to include or not the associated external
project.

For example, looking at Libs/DICOM/Core/target_libraries.cmake

#
# See CMake/ctkMacroGetTargetLibraries.cmake
#
# This file should list the libraries required to build the current
CTK libraries
#

SET(target_libraries
  CTKCore
  DCMTK_LIBRARIES
  )


We can see then it depends on:
  CTKCore
  DCMTK_LIBRARIES

Then, in CTK/Superbuild.cmake, line 139,

[...]

SET(DCMTK_DEPENDS)
ctkMacroShouldAddExternalProject(DCMTK_LIBRARIES add_project)
IF(${add_project})

  IF(NOT DEFINED DCMTK_DIR)
    SET(proj DCMTK)
    SET(DCMTK_DEPENDS ${proj})
    ExternalProject_Add(${proj}

        DOWNLOAD_COMMAND ""
        CMAKE_GENERATOR ${gen}
        SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/${proj}

        CMAKE_ARGS
          ${ep_common_args}
          -DDCMTK_BUILD_APPS:BOOL=ON # Build also dmctk tools
(movescu, storescp, ...)

        )
    SET(DCMTK_DIR ${ep_install_dir})
  ENDIF()
ENDIF()

[...]


We notice the use of the macro *ctkMacroShouldAddExternalProject* which
determine if an external project should be added based on dependency of the
different CTK libraries.


######## Remarks on DCMTK ########

For convenience, we added a copy of DCMTK project to CTK repository. See
CTK/Utilities/DCMTK

This later one is also CMake-ified ! If you have contribution to do, it
would be great if we could:
  - update the CTK version of DCMTK
  - contribute back both our CMakefiles.txt and your improvement to the main
DCMTK project ...


If you have any question, do not hesitate.

Thks
Jc








On Fri, May 7, 2010 at 7:59 AM, Steve Pieper <pieper at bwh.harvard.edu> wrote:

> Hi Perry, Stefan -
>
> Another idea - if you have specific user interface ideas it would be great
> to incorporate them into the wishlist for CTKWidgets.
>
>
> http://www.commontk.org/index.php/Documentation/WidgetPlans#Application_Specific_Widgets
>
> Best,
> Steve
>
>
> On May/6/10 9:48 PM, Stephen Aylward wrote:
>
>> Hi Perry,
>>
>> That seems like an outstanding direction to head.   It will provide
>> useful functionality and test DCMTK/VTK/Qt capabilities in a new way.
>>
>> Have you had a chance to download the CTK code in the git repository?
>>
>> A good place to start might be to try to contribute a dashboard build
>> to the CTK dashboard.   Are you familiar with CDash, our coding
>> standards, and other software processes?
>>
>> Eventually you'll need to look to see if you can make use of any of
>> CTK's current widgets or if you have duplicated any of its
>> functionality already.  We can then discuss how to do the integration
>> of our code bases and how to then port your application.
>>
>> s
>>
>> On Thu, May 6, 2010 at 3:25 PM, Perry Radau<perry.radau at gmail.com>
>>  wrote:
>>
>>> Hello all,
>>> I am new to the CTK project, and am interested in contributing to it
>>> after speaking with Will Schroeder and Steve Pieper.  Stefan Pintilie
>>> in our group has been developing a project (www.vurtigo.ca) that
>>> integrates DCMTK with a VTK based visualization platform for
>>> cardiovascular MR-guided applications.  This has been compiled on
>>> Ubuntu, OSX and Windows.  We have also been developing some
>>> improvements to the DCMTK reader to handle vendor specific tags,
>>> especially for cine studies.  Also, we have several example datasets
>>> that have already been placed in the public domain and plan to add
>>> more from other vendors.
>>>
>>> If some of these developments are of interest and fits with the CTK
>>> project, then we would appreciate some guidance about where to begin
>>> and how to contribute.  Unfortunately we won't be able to attend the
>>> upcoming hackfest.
>>>
>>> Cheers,
>>> Perry Radau
>>> _______________________________________________
>>> Ctk-developers mailing list
>>> Ctk-developers at commontk.org
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>>>
>>>
>>
>>
>>  _______________________________________________
> Ctk-developers mailing list
> Ctk-developers at commontk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>



-- 
Phone: 1-518-836-2174
Ext: 304
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20100507/126fa693/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ccmake-CTK.png
Type: image/png
Size: 181804 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20100507/126fa693/attachment.png>


More information about the Ctk-developers mailing list