ITK icon indicating copy to clipboard operation
ITK copied to clipboard

WIP: Update NrrdIO upstream

Open hjmjohnson opened this issue 3 months ago • 7 comments

Update for syncronizing with upstream teem project

git clone https://git.code.sf.net/p/teem/nrrdio/nrrdio.git NrrdIO
  • STYLE: Upstream clang-format changes applied
  • ENH: Update NrrdIO from upstream

PR Checklist

hjmjohnson avatar Oct 03 '25 20:10 hjmjohnson

This seems to work?

dzenanz avatar Oct 05 '25 13:10 dzenanz

This seems to work?

Yes. I'm working with @kindlmann to move Teem and NrrdIO from SVN to git on SourceForge. What is included in this patch set is proposed testing for patch sets that are not yet included upstream in NrrdIO or Teem.

I was just waiting for the dust to settle in the upstream changes before finalizing this and linking it to the stable git hashes upstream.

hjmjohnson avatar Oct 05 '25 16:10 hjmjohnson

Thank you for working on this.

When a new UpdateFromUpstream.sh process is added, as I recall the old code is usually deleted from the repo, then the directory is re-estabished with a sub-tree merge. So once the upstream work is completed, it does not need to be updated here before the new process is established.

blowekamp avatar Oct 23 '25 12:10 blowekamp

Thank you for working on this.

When a new UpdateFromUpstream.sh process is added, as I recall the old code is usually deleted from the repo, then the directory is re-estabished with a sub-tree merge. So once the upstream work is completed, it does not need to be updated here before the new process is established.

@blowekamp This may not work for NrrdIO. The central part of the NrrdIO git repo is a set of scripts that extract code from the teem source code base and replace the LGPL license with a BSD license, drop chunks of code that exist in teem, but are not needed for NrrdIO, and create the mangling headers. It is starter code for other projects to adapt from, but not necessarily useful on its own.

The set of scripts that extract data from teem does different things when the "itk" flag is passed in, and the "itk" variant of the extracted code has specializations for ITK that are not part of the central git repository. I'm working with Gordon to create a single codebase that is easier to maintain, but I'm not sure we will get there.

hjmjohnson avatar Oct 23 '25 13:10 hjmjohnson

I didn't see what occurs with running scripts with the itk variant in the repo: https://sourceforge.net/p/teem/nrrdio/nrrdio.git/ci/main/tree/

But keep in mind the standard update script unarchived the git repo, and runs some scripts and command to clean up the code for the sub-tree commit. It sounds like the approach taken may still fit into the existing update framework. Here is an example of what happens for HDF5:

https://github.com/InsightSoftwareConsortium/ITK/blob/b182514f761d0a6ac24ff59ed0a10f48e100b4a0/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh#L38

blowekamp avatar Oct 23 '25 14:10 blowekamp

I'm grateful for the continued work of @hjmjohnson on this, and I do believe "we will get there" as long as we keep communicating.

The new 0-gen.sh script in NrrdIO is a work-in-progress, but it's main goal is to (like Hans mentioned) do the necessary transformations of Teem source into a minimal set of NrrdIO sources. How much work it should do to anticipate ITK's subsequent use specifically, versus be configurable for any other application, is something I think we're still trying to determine. Anyone else interested is welcome to join the discussion at https://discord.gg/xBBqZGXkF7

kindlmann avatar Oct 23 '25 17:10 kindlmann

FYI: This is still being pursued. Upstream teem modifications are ongoing, and more extensive than originally thought. This is all good, but is taking a bit longer than anticipated.

hjmjohnson avatar Oct 31 '25 13:10 hjmjohnson