NIRALUser / DTIProcessToolkit

DTIProcess is a DTI processing and analysis toolkit developed in UNC and University of Utah
http://www.nitrc.org/projects/dtiprocess
Apache License 2.0
7 stars 8 forks source link

Update external packages for supporting C++14, VTK9, & ITK 5.3 #50

Closed hjmjohnson closed 2 years ago

hjmjohnson commented 2 years ago

These patches allow building this toolkit with C++14, VTK 9, & ITK 5.3.

hjmjohnson commented 2 years ago

@styner This PR builds as is, but has 2 issues that need to be addressed before committing.

1) https://github.com/NIRALUser/niral_utilities/pull/30 needs to be merged first, and then the desired hash for that version of the repo needs to be put added to the Superbuild/External_niral_utilites.cmake for the GIT_TAG. 2) The spatial objects no longer have a "GetSpacing" option. A conversation with Stephen Aylward indicates that get spacing is no longer relevant because all spatial object representations are in physical space. I don't know the fiberprocess code well enough to understand what the implications are. Could you please help determine what the proper course of action is? Perhaps that code is simply not needed any longer.

From: Stephen Aylward <stephen.aylward@kitware.com>
Date: Thursday, February 17, 2022 at 4:12 PM
To: Johnson, Hans J <hans-johnson@uiowa.edu>
Subject: [External] Re: Spatial Object code updates from ITKv4
Hi,

Spatial objects are now only encoded using physical space.  There is no concept of spacing, since there is no need to translate from index space to physical space.

When an old spatial object is read, it will be converted into physical space.   When it is saved, it will remain in physical space.

New objects are created and saved in physical space.

Hope that helps.  Note there are two other related concepts: object space (the native coordinate system of the object) and world space (the coordinate system of the object after it has been transformed by the hierarchy of transforms defined by its parent-child relationships).  I hope the software guide details on this are clear.  If I need to update them, please let me know.

Thanks for asking!!
Stephen

On Thu, Feb 17, 2022 at 12:01 PM Johnson, Hans J <hans-johnson@uiowa.edu> wrote:
Stephen,

I am trying to update some old DTI processing code from ITKv4 to ITKv5 in order to resurrect some old data analysis processing.

I am struggling to identify how to get the spacing information from a spatial object:

https://github.com/NIRALUser/DTIProcessToolkit/blob/master/Applications/fiberstats.cxx#L46

/Users/johnsonhj/src/DTIProcessToolkit/Applications/fiberstats.cxx:46:34: error: no member named 'GetSpacing' in 'itk::GroupSpatialObject<3>'
  const double* spacing = group->GetSpacing();
                          ~~~~~  ^
Any suggestions would be welcome.

Hans
hjmjohnson commented 2 years ago

@juanprietob I have updated the hashes based on recent merges, and this PR is now ready for merging as well. Build tested locally on my mac computer.