Order of parameters for ITKFileIO functions should be changed

Issue #35 resolved
Sam Preston created an issue

To be consistent with the ordering of parameters in the rest of PyCA, the image/field argument should be first, and the filename second. This should be minimal impact, especially if you're using common.LoadITKImage(). Any objections?

Comments (6)

  1. Sam Preston reporter

    Actually I'm proposing changing ITKFileIO.[Load|Save][Image|Field](...) -- I was saying you wouldn't see any change if you use common.LoadITKImage() since this would hide the change. For the ITKFileIO functions, you'd need to swap the order of the arguments.

  2. Jacob Hinkle

    we could prob just make the common functions the only exposed way to load ITK images right? I'm imagining just swigging ITKFileIO with a leading underscore so it's clear that we should only use the common.* stuff for that. We'd just need a couple common functions for saving.

  3. Nikhil Singh

    I'm only using common.LoadITKImage() that too only in a few places. So, I'm ok with the change. Also I agree with Jacob: if ITKFileIO and LoadITKImage are essentially the same functionality, we could hide one of these to avoid confusion.

  4. Sam Preston reporter

    Yeah, I agree -- since everyone is going to have to modify ITKFileIO.* for this change, it's a good time to hide that functionality and have everyone standardize on common.LoadITKImage(). That should probably just be common.LoadImage() and have that deal with using either ITK or matplotlib to load images depending on the type and what support is available, but lets keep this a simple change and leave that for later.

  5. Sam Preston reporter

    Hid ITKFileIO (now _ITKFileIO) and changed parameter order

    Parameter order for ITKFileIO functions now match the rest of PyCA with the output object listed first. Hiding ITKFileIO in Core is to encourage the use of PyCA.Common.LoadITKImage instead. Also, this commit adds documentation to _ITKFileIO and fixes a bug in doxy2swig.py which caused the documentation of static memeber functions to be ignored.

    This closes issue # 35

    → <<cset eb8d76ee1378>>

  6. Log in to comment