comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Read Binary
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Read Binary [message #93476] Sun, 31 July 2016 13:43 Go to next message
dashtabadi.m.r is currently offline  dashtabadi.m.r
Messages: 10
Registered: May 2016
Junior Member
Dear all,I have a binary image with dimension of [7731,7871,9] with BSQ format. According to this I want to know that how can I select a band like band 4 from this file without read other Bands? could you help me, please?
Re: Read Binary [message #93479 is a reply to message #93476] Mon, 01 August 2016 06:20 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 7/31/16 2:43 PM, dashtabadi.m.r@gmail.com wrote:
> Dear all,I have a binary image with dimension of [7731,7871,9] with
> BSQ format. According to this I want to know that how can I select a
> band like band 4 from this file without read other Bands? could you
> help me, please?

This is untested code, but something like the following should work:

band = read_binary(data_start=7731L * 7871L * 3, $
data_dims=[7731, 7871], $
data_type=1)

Assuming "binary image" means byte data, (otherwise, change the
DATA_TYPE value accordingly) and you are numbering bands starting with 1
(change the 3 above accordingly).

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Scrollwindow WSET problem
Next Topic: Lossless compression with IDLffVideoWrite

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:17:22 PDT 2025

Total time taken to generate the page: 0.00420 seconds