[Insight-users] Tiff Tag Warning on image load

Luis Ibanez luis.ibanez at kitware.com
Sun Oct 17 10:27:27 EDT 2010


Hi Michael,

Yeap, you got it.

      Google beats grep...      :-(

---

This page looks detailed enough for us
to be able to expose the functionality at
the level of TIFFImageIO.

Would it interest you to give it a shot
at implementing this in TIFFImageIO ?

We are about to move the TIFF 4.0
branch into master (early next week),
so, once the new version is in, it could
be a good time for adding this feature.


      Regards,


             Luis



------------------------------------------------------
On Sun, Oct 17, 2010 at 9:45 AM, Michael Jackson <
mike.jackson at bluequartz.net> wrote:

> Taking that information and looking around some more on the internet I came
> across this page:
>
> http://www.remotesensing.org/libtiff/addingtags.html
>
> Which on a cursory glance may be what is needed to figure out how to add a
> custom tag to be read.
> ___________________________________________________________
> Mike Jackson                      www.bluequartz.net
> Principal Software Engineer       mike.jackson at bluequartz.net
> BlueQuartz Software               Dayton, Ohio
>
> On Oct 17, 2010, at 9:16 AM, Luis Ibanez wrote:
>
> >
> > Hi Michael,
> >
> > I'm browsing through the TIFF code looking
> > for a place where such a callback could be
> > inserted.
> >
> > So, far I have not found a clear place where
> > this could be done, but there are many hints
> > that lead to think that it is indeed possible to
> > do it.
> >
> > Let me list what I have found so far, in the
> > hope that other people can follow the trail
> > or find additional hits.
> >
> > ---
> >
> > Here are some functions and variables in
> > the TIFF library that seem to be related to
> > a potential management of custom tags:
> >
> >
> > A) tif->tif_nfields :  number of known tags
> >
> > if we could insert the id of that custom tag
> > in the structure for which nfields counts,
> > then it could be accepted during the initial
> > parsing in line 283 of tif_dirread.c
> >
> >
> > B) TIFFTagValue: struct in tif_dir.c
> >
> >    In particular, its appearances in lines
> >    526-543 give us some hope:
> >
> >    namely:
> >
> >              /*
> >              * Grow the custom list if the entry was not found.
> >              */
> >             if( tv == NULL )
> >             {
> >     TIFFTagValue  *new_customValues;
> >
> >     td->td_customValueCount++;
> >     new_customValues = (TIFFTagValue *)
> >       _TIFFrealloc(td->td_customValues,
> >              sizeof(TIFFTagValue) * td->td_customValueCount);
> >     if (!new_customValues) {
> >       TIFFError(module,
> >     "%s: Failed to allocate space for list of custom values",
> >           tif->tif_name);
> >       status = 0;
> >       goto end;
> >     }
> >
> >
> > -----
> >
> >
> > Once we figure out how to do this at the
> > level of the TIFF library, we will be able
> > to expose that functionality at the level
> > of the TIFFImageIO class.
> >
> >
> >     Regards,
> >
> >
> >           Luis
> >
> >
> >
> > ----------------------------------------------------------
> > On Thu, Sep 30, 2010 at 2:07 PM, Michael Jackson <
> mike.jackson at bluequartz.net> wrote:
> > I get the following warning when I open some of my Tiff files:
> >
> > TIFFReadDirectory: Warning, 7001.tif: unknown field with tag 34681
> (0x8779) encountered.
> >
> > I know what the field is and I know how to parse it. Are there any
> facilities for setting a callback function or anything like that to the Tiff
> file reader?
> >
> > Thanks
> > ___________________________________________________________
> > Mike Jackson                      www.bluequartz.net
> > Principal Software Engineer       mike.jackson at bluequartz.net
> > BlueQuartz Software               Dayton, Ohio
> >
> >
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101017/95861031/attachment.htm>


More information about the Insight-users mailing list