[Pkg-exppsy-pynifti] [Nipy-devel] Image, design, usecases
Michael Hanke
michael.hanke at gmail.com
Wed May 13 16:52:49 UTC 2009
On Wed, May 13, 2009 at 09:33:19AM -0700, Matthew Brett wrote:
> Hi,
>
> Hmm - now - I worry we are starting to confuse interfaces and implementation.
>
> Michael, I think you are saying that you want to be able to do this:
>
> data, meta = load(filename)
> assert isinstance(data, np.ndarray)
> assert isinstance(meta, dict)
>
> That's really easy with the current brifti code. For example, I
> believe the following will work:
>
> def apparently_basic(filename):
> img = nifti.load(filename)
> meta = {}
> meta.update(img.get_header())
> meta['affine'] = img.get_affine()
> return img.get_data(), meta
>
> That's what Thorsten was proposing, but I think that is not what you mean?
This is totally fine with me. I was just referring to the fact that the
currently get_header() returns something more complicated than a dict.
Above solution is totally fine with me.
> I do think we have to get the interfaces right, but I worry that we
> might be discussing how to get there rather than where we want to go.
Nah, I'd say: SOLVED ;-)
Michael
--
GPG key: 1024D/3144BE0F Michael Hanke
http://apsy.gse.uni-magdeburg.de/hanke
ICQ: 48230050
More information about the Pkg-exppsy-pynifti
mailing list