Read Binary [message #93476] |
Sun, 31 July 2016 13:43  |
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  |
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)
|
|
|