Skip to content

ImageData.read_from_file unexpected #548

@KrisThielemans

Description

@KrisThielemans
im=sirf.STIR.ImageData.read_from_file("myfile.hv")

TypeError: unbound method read_from_file() must be called with ImageData instance as first argument (got str instance instead)

It seems that syntax is

im=pet.ImageData
im=im.read_from_file("myfile.hv")

(could work with any image constructed). To me, that's surprising. I would have expected read_from_file to be a static method.

It's possible that we don't need this function at all, as it would be equivalent to

im=pet.ImageData("myfile.hv")

@evgueni-ovtchinnikov @rijobro Opinions?

Presumably it's the same for AcquisitionData or GadgetronImageData

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions