[Insight-users] Upgrading, and debs

Gavin Baker gavinb+xtk at cs.mu.OZ.AU
Fri, 13 Feb 2004 15:52:09 +1100


Hi all,

(Mostly FYI stuff...)

I have just completed upgrading one of my apps (about 15,000 lines) from ITK
1.4 to 1.6.  I was going to write up some notes on my experiences in
upgrading, to help others in the same boat.  Unfortunately ;} it was
terribly easy, quite painless and I only found 1 thing to complain about...

The changes I needed to make were already described on the list, namely to
do with the image spacing and origin using proper types (instead of raw
float* pointers).

- change variables receiving GetSpacing() to ImageType::SpacingType
- change variables receiving GetOrigin() to ImageType::PointType

For example, code that was using this:

  const double* in_spacing = this->GetInput()->GetSpacing();
  const double* in_origin  = this->GetInput()->GetOrigin();

gets changed to this:

  typename InputImageType::SpacingType in_spacing = 
                                       this->GetInput()->GetSpacing();
  typename InputImageType::PointType in_origin = 
                                     this->GetInput()->GetOrigin();

Surprisingly, I wasn't hit by any of the other interface changes (although
most of those would have been tracked through CVS anyway I guess).

The only complaint I have is that vnl_vector_fixed has had the x(), y() and
z() accessors deprecated.  It isn't at all clear to me why they would remove
such a useful thing from VNL.  I also note that they still exist in
vnl_vector.  Anyway, switching to the subscript notation worked around that
one (ie. vec[0] for x() and so on).

Any chance of getting them "un-deprecated" ? :)

In other news...

This upgrade, including a build of InsightApplications, was all built
against my brand new ITK-1.6 Debian packages.  After quite some hiatus, I
have picked up the debs again and am producing full 1.6 debs now.

Now that this all works, the core libs and the -dev package are ready to be
released (I will post an announcement once the debs are uploaded in the next
few days).  The applications package will follow soon after.

Regards to all,

  :: Gavin

-- 
Gavin Baker                                      Complex Systems Group
http://www.cs.mu.oz.au/~gavinb             The University of Melbourne