Difference between revisions of "2011 Winter Project Week: Slicer4-ITK4 Continuous Integration"

From NAMIC Wiki
Jump to: navigation, search
Line 42: Line 42:
 
*'''''M'''easure''
 
*'''''M'''easure''
 
** A [http://www.cdash.org/CDash/index.php?project=Slicer4&date=2010-12-28&filtercount=1&showfilters=1&field1=site/string&compare1=63&value1=BillsBasement baseline dashboard] was created on December 27, 2010. There mere 605 compilation errors.
 
** A [http://www.cdash.org/CDash/index.php?project=Slicer4&date=2010-12-28&filtercount=1&showfilters=1&field1=site/string&compare1=63&value1=BillsBasement baseline dashboard] was created on December 27, 2010. There mere 605 compilation errors.
** Source code downloaded as "svn co http://svn.slicer.org/Slicer3/branches/Slicer4/"
+
** Source code downloaded as:
 +
*** "svn co http://svn.slicer.org/Slicer3/branches/Slicer4/"
 
** Dasboard submissions:
 
** Dasboard submissions:
 
*** Linux 64 bits (eldorado.kitware)
 
*** Linux 64 bits (eldorado.kitware)

Revision as of 16:10, 9 January 2011

Home < 2011 Winter Project Week: Slicer4-ITK4 Continuous Integration

Key Investigators

  • Bill Lorensen - Noware
  • Luis - Kitware
  • Mark Scully (Kent Williams/Hans Johnson) - Iowa

Objective

Identify API changes in ITK4 that cause compilation or run-time errors in Slicer4. NA-MIC is a major customer of the insight Toolkit, ITK. It is critical that ITK developers understand the impact of API changes on customers. As part of the ITKv4 contract Slicer3 will be one of the sequestered applications. This project goes beyond that and will continuously integrate Slicer4 and ITK4.

Slicer4 development is under-way and ITK version 4 has recently started. One of the goals of ITK 4 is to improve, simplify and clean-up the application programming interface (API). Every attempt is being made to keep the API compatible with ITK 3.x.

The API changes may be planned or accidental. This project will establish mechanisms to discover, resolve and document API issues that affect Slicer4. We expect that a similar process will be created for other major ITK customers.

Approach, Plan

This project will use the DMAIC methodology of the Six Sigma management process to "Define", "Measure", "Analyze", "Improve" and "Control" the integration of Slicer4 and ITK4.

The basic methodology (from Wikipedia) consists of the following five steps:

  • Define process goals that are consistent with customer demands and the NA-MIC's strategy.
  • Measure key aspects of the current process and collect relevant data.
  • Analyze the data to verify cause-and-effect relationships. Determine what the relationships are, and attempt to ensure that all factors have been considered.
  • Improve or optimize the process.
  • Control to ensure that any deviations from target are corrected before they result in defects. Set up pilot runs to establish software quality, move on to production, set up control mechanisms and continuously monitor the process.

Progress

  • Define
    • The goal is to provide a mechanism to identify and document incompatible Slicer4/ITK4 API changes.


Measure - ITK4 Changes that Affect Slicer4

Here we summarize the API change that caused Slicer4 to not compile or run incorrectly. For each API change we list the major classes affected, how the issue was resolved and whether the change is compatible with ITK3.x. We also include a pointer to the Migration Guide section that deals with the issue.

API Change Classes Affected Resolution Works for ITK3 ITK Migration Doc

Remove OStringStream

Many

Replace OStringStream with std::stringstream

Yes

Nothing yet

Remove New method for Rigid3DTransform

vtkSlicerTransformLogic ResampleVolume2.cxx

Introduced ITKv3_COMPATIBILITY cmake variable that when ON, permits a New() on Rigid3DTransform. This mimics the old behaviour.

NA

Nothing yet

New Transform pure virtual methods

itkWarpTransform3D.h

Added itkExceptionMacro to each pure virtual method that was not implemented.

Yes

Nothing yet

Remove Brains2MaskImageIO

BRAINSTools

Skip building for ITKv4. Mark Scully is nearly done with necessary refactorings.

Yes

Task assigned to Kent Williams

Upgrade GDCM to v2

DicomToNrrdConverter

Skip building for ITKv4. This will be upgraded to gdcm2. See other project week item: [[1]]

NA

Not Yet

Analyze

Here we rationalize the ITK4 API changes.

  • Remove OStringStream
Early in the development of ITK, some compilers did not support stringstream. There was a wrapper to hide differences between std::stringstream and the old ostrstream(which has been deprecated).
  • Remove New method for Rigid3DTransform
Rigid3DTransform was meant to be a base class for 3D rigid registration. Unfortunately, in prior versions of ITK, it had a New() method. Since it has 12 optimization parameters, its use in registration is unstable. The preferred rigid registration is Versor3DRigidRegistration. In ITK4 we decided to enforce the intent of the original class (as an abstract base class). Since Slicer/3/4 was using it as a non-virtual class, we added two backward compatible solutions:
  1. If the ITK cmake variable ITKV3_COMPATIBILITY flag is ON, itk::Rigid3DTransform behaves exactly as it did in ITK3.x.
  2. When Slicer4 transitions to ITK4 and uses new ITK4 capabilities, the old behavior of itk::Rigid3DTransform is available in itkv3::Rigid3DTransform.
  3. http://review.source.kitware.com/#change,680
  • New Transform pure virtual methods
In ITK3, itk::Transform provided dummy implementations for some methods that should be implemented by derived classes. These dummy methods printed a warning "This method should be implemented in subclasses".In ITK4, to make developers aware that they should implement these methods for derived subclasses, these methods are pure virtual. This means that subclasses that do not provide an implementation for these methods will no longer compile. Slicer's Applications/CLI/DiffusionApplications/ResampleDTI/itkWarpTransform3D did not implement SetParameters(),SetFixedParameters(), TransformVector() and TransformCovariantVector(). The Slicer4 code now provides these methods and throws an exception if they are used.
  • Remove Brains2MaskImageIO
  • Upgrade GDCM to v2

References