isis-group / isis

The ISIS project aims to provide a framework to access a large variety of image processing libraries written in different programming languages and environments.
GNU General Public License v3.0
17 stars 14 forks source link

Nifti_sa doesn't overwrite existing files on MAC #44

Closed lydiatgit closed 12 years ago

lydiatgit commented 12 years ago

libisis 0.4.1 with libisisImageFormat_Nifti_sa.dylib as only Nifti plugin on a MAC (!!)

example application: using isisconv to convert whatever data repeatedly with a delay > 1min

result: the output is just written the first time and not overwritten later on

Okay, for converting the same data this is not a real problem but in 'normal' applications it is! It seems if the file is explicitly read in the app and then written again, the problem doesn't occur. But only writing on an existing file is not working!

Seems to be a MAC thing: Same test on "gurke" (with linux) worked fine.

DerOrfa commented 12 years ago

Just tried with isisconv -in nix.null -out /tmp/test.nii. Seems like the modification date is only updated if the file is resized. To me, it looks like a bug in the posix api of MacOS.

But the content of the files is updated in any case! I changed the image generated by the null-plugin, and this changes could be found in the nifti files (although the modification date was not updated)

The System was: Darwin Cassandra.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64

And the Compiler: gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)

lydiatgit commented 12 years ago

Yoah, that's right - the content is updated just the timestamp of the file is not changed. That's better than nothing but nasty for a proper use.

Sounds we need a little nasty hack?!