[Writers] - Issue while writing images with no extension

AIMS library and commands usage

Moderators: riviere, denghien

souedet
Posts: 15
Joined: Fri Sep 22, 2006 10:57 am
Contact:

[Writers] - Issue while writing images with no extension

Postby souedet » Wed Jul 02, 2008 4:51 pm

Hello Denis,

since I implemented the writeFrame method for the writer of tiff format plugin, files that do not have extensions are automatically generated in tiff format and not in GIS anymore.
The issue occurs because tiff plugin format is registered before the GIS format in the format map and found first during the call to the Finder::check() method (//depot/aimsdata/3.1/src/aimsdata/io/finder.cc - perforce version 1 - line 348).
To fix this issue, I think we need to add finder priority for formats (and GIS will have the highest priority value). According to you, is it a good idea to implement this ? Do you think that another solution would be better ?

It is possible to view the issue using the following command :
AimsFileConvert -i test.ima -o output_test

Nico

User avatar
riviere
Site Admin
Posts: 1358
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: [Writers] - Issue while writing images with no extension

Postby riviere » Wed Jul 02, 2008 5:36 pm

Hi Nico,
This priority already exists: see in Finder, the registerFormat() method accepts an optional arg "before" which allows to register a format before another existing one. It is a bit strange, however, that the TIFF format (which is a plugin which registers after the builtin GIS) gets a higher priority than GIS. I'll check this...
Denis

souedet
Posts: 15
Joined: Fri Sep 22, 2006 10:57 am
Contact:

Re: [Writers] - Issue while writing images with no extension

Postby souedet » Thu Jul 03, 2008 10:32 am

Hello Denis,

Thank you for your answer. Could you just check that the changes made in changelist n° 29298 is ok for you ? For me it works better like this, but I'd like to be sure it is right for you.
Moreover, I fixed the issue in the case where the output file has no extension, but I think priorities are not used in other blocks of the method Writer<T>::write (file : //depot/aimsdata/3.1/src/aimsdata/io/writer_d.h).

Nico


Return to “AIMS”

Who is online

Users browsing this forum: No registered users and 5 guests