Re: [visad] (no subject) (Devanshi Prajapati)

Hello,

I would suggest rather than using hdf5 adapter available in visad,
you should netcdf-java library for reading hdf5 images.
It is pretty simple and straight forward.

NetcdfFile ncFile = NetcdfFile.open("myfile.h5");
Variable var = ncFile.findVariable("my_variable"); //the dataset you want to read
//Assuming image is 2 dimension
int scans = var.getDimension(0).getLength(); //Getting scans
int pixels = var.getDimension(1).getLength(); //Getting pixels
float samples[] =var.read(float.class); //suppose dataset is float data

Given the width, height and pixels of the image (range), you can use any of the example provided in examples with visad source code to construct the flatfield and create a display.

To find netcdf-java library, just google "netcdf-java".


Ghansham

On 03/20/2014 11:30 PM, visad-request@xxxxxxxxxxxxxxxx wrote:
Send visad mailing list submissions to
        visad@xxxxxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        http://mailman.unidata.ucar.edu/mailman/listinfo/visad
or, via email, send a message with subject or body 'help' to
        visad-request@xxxxxxxxxxxxxxxx

You can reach the person managing the list at
        visad-owner@xxxxxxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of visad digest..."


Today's Topics:

    1. (no subject) (Devanshi Prajapati)


----------------------------------------------------------------------

Message: 1
Date: Wed, 19 Mar 2014 23:52:35 +0530
From: Devanshi Prajapati<prajapati.devanshi@xxxxxxxxx>
To: visad@xxxxxxxxxxxxxxxx
Subject: [visad] (no subject)
Message-ID:
        <CAH3DJ6K15usGntrtRSBxqR9oGFThqHiDx2j-dAqTQuioP1aGdQ@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"

Hello ,

              I want an example that how to plot an hdf5 image in visAD,
using it's adapter.I have tried but it is not working.



  • 2014 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: