OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

TIFF loader: Error reding/decoding file . Does OSG support TIFF ( single strip 32 float ) ?


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [forum]
View previous topic :: View next topic  
Author Message
_Alexander_
Newbie


Joined: 25 Feb 2015
Posts: 2

PostPosted: Wed Feb 25, 2015 5:26 pm    Post subject:
TIFF loader: Error reding/decoding file . Does OSG support TIFF ( single strip 32 float ) ?
Reply with quote

Hi,
I have TIFF raster data written as in single strip 32 float. In attempt to visualize
osgviewer.exe –image f32_single_strip.tif
I get an error
TIFF loader: Error reading/decoding file
osgviewer.exe: No data loaded


I tried this in a different version of OSG (3.0.1, 3.2.1 and so on). I suppose it happens in all versions.
Here are the properties of f32_single_strip.tif file:
gdalinfo f32_single_strip.tif
Driver: GTiff/GeoTIFF
Files: f32_single_strip.tif
Size is 256, 256
Coordinate System is `'
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 256.0)
Upper Right ( 256.0, 0.0)
Lower Right ( 256.0, 256.0)
Center ( 128.0, 128.0)
Band 1 Block=256x8 Type=Float32, ColorInterp=Gray


If I execute the next command using GDAL:
gdal_translate -ot Float32 f32_single_strip.tif f32_multi_strip.tif
then there is no reading error in f32_multi_strip.tif file. GDAL writes TIFF as multistrip.
Here are the properties of f32_multi_strip.tif file:
gdalinfo f32_multi_strip.tif
Driver: GTiff/GeoTIFF
Files: f32_multi_strip.tif
Size is 256, 256
Coordinate System is `'
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 256.0)
Upper Right ( 256.0, 0.0)
Lower Right ( 256.0, 256.0)
Center ( 128.0, 128.0)
Band 1 Block=256x8 Type=Float32, ColorInterp=Gray


How can I visualize TIFF data using OSG ( single strip 32 float )?



Thank you!

Cheers,
Alexander
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11278

PostPosted: Wed Feb 25, 2015 7:57 pm    Post subject:
TIFF loader: Error reding/decoding file . Does OSG support TIFF ( single strip 32 float ) ?
Reply with quote

Hi Alexander,


I don't recall others users coming across this specific issue, so it may simply be that the format it not widely used enough for other users to try it with the OSG. The OSG use libtiff to do the actual loading of the .tif file and the error "TIFF loader: Error reading/decoding file" you mention looks like one stemming from libtiff, if this is the case then perhaps changing libtiff version will help.


Could you provide the problem image file so that others can try it?


Another route you could try is to compile the OSG's GDAL plugin and have it handle the image loading. Try appending .gdal to the filename and this will ensure that the file gets passed on to the GDAL plugin that will then attempt to load. At least that I vaguely recall be possible... it might be a decade since I tried that though Smile



Robert.


On 25 February 2015 at 17:26, Alexander Golyakov < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi,
I have TIFF raster data written as in single strip 32 float. In attempt to visualize
osgviewer.exe &ndash;image f32_single_strip.tif
I get an error
TIFF loader: Error reading/decoding file
osgviewer.exe: No data loaded

I tried this in a different version of OSG (3.0.1, 3.2.1 and so on). I suppose it happens in all versions.
Here are the properties of f32_single_strip.tif file:
gdalinfo f32_single_strip.tif
Driver: GTiff/GeoTIFF
Files: f32_single_strip.tif
Size is 256, 256
Coordinate System is `'
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 256.0)
Upper Right ( 256.0, 0.0)
Lower Right ( 256.0, 256.0)
Center ( 128.0, 128.0)
Band 1 Block=256x8 Type=Float32, ColorInterp=Gray

If I execute the next command using GDAL:
gdal_translate -ot Float32 f32_single_strip.tif f32_multi_strip.tif
then there is no reading error in f32_multi_strip.tif file. GDAL writes TIFF as multistrip.
Here are the properties of f32_multi_strip.tif file:
gdalinfo f32_multi_strip.tif
Driver: GTiff/GeoTIFF
Files: f32_multi_strip.tif
Size is 256, 256
Coordinate System is `'
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 256.0)
Upper Right ( 256.0, 0.0)
Lower Right ( 256.0, 256.0)
Center ( 128.0, 128.0)
Band 1 Block=256x8 Type=Float32, ColorInterp=Gray

How can I visualize TIFF data using OSG ( single strip 32 float )?



Thank you!

Cheers,
Alexander

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62809#62809





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
_Alexander_
Newbie


Joined: 25 Feb 2015
Posts: 2

PostPosted: Thu Feb 26, 2015 3:58 am    Post subject:
Reply with quote

Hi,

this is file data


Thank you!

Cheers,
Alexander
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11278

PostPosted: Thu Feb 26, 2015 2:34 pm    Post subject:
TIFF loader: Error reding/decoding file . Does OSG support TIFF ( single strip 32 float ) ?
Reply with quote

Hi Alexander,


On 26 February 2015 at 03:58, Alexander Golyakov < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
this is file data


Thanks for the file.  I can reproduce the issue when I run:

  osgviewer --image f32_single_strip_120.tif


But if I use the .gdal plugin to load the image it loads:


  osgviewer --image f32_single_strip_120.tif.gdal


So there is a workaround you could employ.


I have put some debugging code into TIFF plugin and the point of failure comes when the plugin checks the TIFFTAG_SAMPLESPERPIXEL in the line:

    if (TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel) == 1)


But this fails and the plugin fallbacks to generating the read error.


I'm not the author of the tiff plugin so haven't ever learnt about libtiff so don't know if this issue is a possible problem in libtiff or that their might be a suitable fallback that we could use.  The SAMPLESPERPIXEL value is used by the OSG to set the image format so not something that can be ignored.


I'm afraid I don't have any other insights to provide, perhaps others who are familiar with libtiff can chip in.  Right now I'd recommend using the .gdal plugin as a fallback.



Robert.



 

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Paul_
Newbie


Joined: 29 Jan 2016
Posts: 2

PostPosted: Fri Jan 29, 2016 4:30 pm    Post subject:
osgviewer cannot decode GeoTiff
Reply with quote

Dear All,

Using osgViewer I cannot decode a tiff. I read that adding .gdal at the end would change the driver but it still fails for me.

What could I do ?

Quote:

C:\work\libs\openSceneGraph\OpenSceneGraph-3.4.0\build\bin>osgviewer.exe --image "C:\tmp\wcs.tiff.gdal"
osgviewer.exe: No data loaded

C:\work\libs\openSceneGraph\OpenSceneGraph-3.4.0\build\bin>osgviewer.exe --image "C:\tmp\wcs.tiff"
osgviewer.exe: No data loaded

C:\work\libs\openSceneGraph\OpenSceneGraph-3.4.0\build\bin>ls c:\tmp\wcs.tiff
c:\tmp\wcs.tiff


Enclosed is the file.

Thanks,

Paul
Back to top
View user's profile Send private message
Trajce Nikolov NICK
Guest





PostPosted: Sun Feb 07, 2016 12:08 am    Post subject:
TIFF loader: Error reding/decoding file . Does OSG support TIFF ( single strip 32 float ) ?
Reply with quote

Hi,

it should work just fine. The tiff plugin is based on 3rd party libs (see dependencies on the osg web). Try finding the following file in your plugins folder: osgdb_tiff.dll. If it is not there then you have to rebuild osg with the tiff dependency (libtiff I think it is)


On Fri, Jan 29, 2016 at 5:30 PM, Paul PURNELLE < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Dear All,

Using osgViewer I cannot decode a tiff. I read that adding .gdal at the end would change the driver but it still fails for me.

What could I do ?


Quote:

C:worklibsopenSceneGraphOpenSceneGraph-3.4.0buildbin>osgviewer.exe --image "C:tmpwcs.tiff.gdal"
osgviewer.exe: No data loaded

C:worklibsopenSceneGraphOpenSceneGraph-3.4.0buildbin>osgviewer.exe --image "C:tmpwcs.tiff"
osgviewer.exe: No data loaded

C:worklibsopenSceneGraphOpenSceneGraph-3.4.0buildbin>ls c:tmpwcs.tiff
c:tmpwcs.tiff



Enclosed is the file.

Thanks,

Paul

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66166#66166





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [forum] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Build OSG on iOS with support OpenGLE... xerxses Build system [build] 1 Tue Dec 12, 2017 1:09 pm View latest post
No new posts Fine grained GL error checking during... robertosfield General 0 Wed Dec 06, 2017 10:33 am View latest post
No new posts Unable to load texture in the same fo... EonStrife Plugins [osgPlugins] 1 Mon Nov 27, 2017 2:37 am View latest post
No new posts obj plugin does not support diffuse ... Ralf Habacker Submission 0 Tue Nov 14, 2017 4:18 pm View latest post
No new posts Warning: Error in reading to jpg images romulogcerqueira General 4 Sat Nov 04, 2017 10:37 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP