Problem with partial reads of HDF5 dataset

I'm having a problem figuring out how to to a partial read of an HDF5 dataset using LVHDF5 by Jason S. I can save a dataset in a file, and I can read it out whole, but I can't figure out how to read a portion of it. For example
I save a 235x235x1024 dataset in a file. I want to read a 5x5x1024 array from this dataset. I am trying the following:
- use H5Dopen.vi to open the dataset
- use H5Dget_space.vi to get a reference to a dataspace that I assume (guess) is the dataspace associated w/ the dataset
- use H5Sselect_hyperslab.vi to select my 5x5x1024 portion using the "block" input. My starting location is 0,0,0 and stride and count are 1,1,1
- use Create Matching DataSpace.vi to create a dataspace that is 5x5x1024 in size, with the same datatype as my dataset (float).
- read the data in the "hyperslab" into an array using H5Dread.vi followed by the Variant to Data function.
If I don't wire the file space input, H5Dread.vi reads the whole dataset.  However, if I try to use the reference obtained w/ H5Dget_space.vi as the file space, I get an error from Variant to Data that says "The data type of the variant is not compatible with the data type wired to the type input.". 
I would appreciate any help in getting this to work.
Solved!
Go to Solution.

Aha. I found my problem. I have to use H5Dselect_hyperslab in my memory space as well as my file space.

Similar Messages

  • Problem with Adobe Reader not being able to run with Maverick  10.9.2?

    problem with Adobe Reader not being able to run with Maverick  10.9.2?

    Have you updated your version of Adobe Reader?

  • Problem with adobe reader, commenting

    one of our authors is using adobe reader x 11,1, and I send him a pdf (enabled commenting and measuring), but for some reason the commenting-fields does not show on his screen?
    should I save the pdf in another way?

    What do you mean by "commenting fields" exactly? By “commenting filds” I mean the tools in top of the page – delete, highlight etc. When I send the pdf, I save it as “file - save as -  reader extended pdf – enable commenting and measuring”, otherwise the commenting tools normally don’t appear by the author.
    Are they existing comments? no, it is the text in his pdf-book he needs to correct
    Is he able to access the commenting tools? no
    You can try sending a non-enabled version since Reader 11 can add comments to a non-enabled document. will try that J
    Fra: George Johnson [email protected]
    Sendt: 6. november 2012 16:16
    Til: Forlagene Idag & Nordan
    Emne: problem with adobe reader, commenting
    Re: problem with adobe reader, commenting
    created by George Johnson <http://forums.adobe.com/people/George_Johnson>  in Creating, Editing & Exporting PDFs - View the full discussion <http://forums.adobe.com/message/4826849#4826849

  • Continued problems with Adobe Reader 9.3.1

    Adobe Reader stops at the half-way mark in the progress block when loading a form to print.  Cannot get this fixed. Does anyone out there have a fix for this.  Is Adobe even recognizing that there is a problem with this.  Error message keeps telling me that there is a problem with Adobe Reader, exit and try again.

    I haven't been able to print any .pdf files since I downloaded 9.3.
    My message says Internet Explorer has closed it down because of data executable files.  I've changed my DEF settings to allow
    Adobe Reader but it still doesn't work.  I never had any problems before with newer versions.

  • Having problem with adobe reader

    Hi,
    I have a problem with adobe reader in my cell phone E71 model recently.I could open any pdf files till yesterday,but now without any reason the adobe reader icon in the office folder does not open.I wanna know what should I do.

    Might be some problem with adobe reader. You may Google another pdf app called pdf plus. Install it and see if the problem is solved or not.
    Nokia C7

  • Problems with flash reader, flash reader

    problems with flash reader, flash reader

    flash reader is an App for iPhone, iPad and iPod. Do you mean Flash Player?
    And, what is the problem?

  • Trying to open PDF getting error message " there is a problem with Acrabat /Reader. Please exit Adob

    I have windows XP, when I am trying open PDF getting a error message " there is a problem with Acrabot /Reader. Please exit Adobe Acrabat/Reader Please try again'  It was working earlier today  HELP

    If all else fails, you can try one of 2 things (I will assume you are talking about Reader - though this is not the Reader forum). Use ctrl-alt-del to go to the task list. Kill AcroRd32.exe. Then try again. If that does not work, a reboot will probably solve the problem.

  • Problem with ImageIO.read and ImageReader JPG colors are distorted/wrong

    (Using JDK 1.5)
    ImageIO incorrectly reads some jpg images.
    I have a jpg image that, when read by the ImageIO api, all the colors become reddish.
            try
                java.awt.image.BufferedImage bi = javax.imageio.ImageIO.read( new java.io.File("javabug.jpg") );
                javax.imageio.ImageIO.write( bi, "jpg", new java.io.File("badcolors.jpg") );
                javax.imageio.ImageIO.write( bi, "png", new java.io.File("badcolors.png") );
            catch ( java.io.IOException ioe )
                ioe.printStackTrace();
            }Why is this happening??? My guess is there is a problem with the ImageIO.read ?
    the jpg can be downloaded at http://www.alwaysvip.com/javabug.jpg
    <BufferedImage@11faace: type = 5 ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@1ebbfde transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 1691 height = 1269 #numDataElements 3 dataOff[0] = 2>
    I have even tried creating a new buffered image but still have the same problem:
    (suggested by http://forum.java.sun.com/thread.jspa?forumID=20&threadID=665585) "Java Forums - ImageIO: scaling and then saving to JPEG yields wrong colors"
            try
                java.awt.image.BufferedImage bi = javax.imageio.ImageIO.read( new java.io.File("javabug.jpg") );
                java.awt.image.BufferedImage out = new java.awt.image.BufferedImage( bi.getWidth(), bi.getHeight(), java.awt.image.BufferedImage.TYPE_INT_RGB );
                java.awt.Graphics2D g = out.createGraphics();
                g.drawRenderedImage(bi, null);
                g.dispose();
                javax.imageio.ImageIO.write( out, "jpg", new java.io.File("badcolors.jpg") );
            catch ( java.io.IOException ioe )
                ioe.printStackTrace();
            }I have used the following which works but does not use the ImageIO api. However, I tried using the ImageIO to write and it worked for writing which leads me to believe there is a problem with the reader.
    (suggested by http://developers.sun.com/solaris/tech_topics/java/articles/awt.html "Server-Side AWT")
            try
                java.awt.Image image = new javax.swing.ImageIcon(java.awt.Toolkit.getDefaultToolkit().getImage("javabug.jpg")).getImage();
                java.awt.image.BufferedImage bufferedImage = new java.awt.image.BufferedImage( image.getWidth( null ), image.getHeight( null ), java.awt.image.BufferedImage.TYPE_INT_RGB );
                java.awt.Graphics g = bufferedImage.createGraphics();
                g.setColor( java.awt.Color.white );
                g.fillRect( 0, 0, image.getWidth( null ), image.getHeight( null ) );
                g.drawImage( image, 0, 0, null );
                g.dispose();
                com.sun.image.codec.jpeg.JPEGImageEncoder encoder = com.sun.image.codec.jpeg.JPEGCodec.createJPEGEncoder( new java.io.FileOutputStream( "goodcolors.jpg" ) );
                encoder.encode( bufferedImage );
                javax.imageio.ImageIO.write( bufferedImage, "jpg", new java.io.File("goodiocolors.jpg") );
                javax.imageio.ImageIO.write( bufferedImage, "png", new java.io.File("goodiocolors.png") );
            catch ( java.io.IOException ioe )
                ioe.printStackTrace();
            }BTW, the following does not work either:
                java.util.Iterator readers = javax.imageio.ImageIO.getImageReadersByFormatName( "jpg" );
                javax.imageio.ImageReader reader = ( javax.imageio.ImageReader ) readers.next();
                javax.imageio.stream.ImageInputStream iis = javax.imageio.ImageIO.createImageInputStream( new java.io.File("javabug.jpg") );
                reader.setInput( iis, true );
                java.awt.image.BufferedImage bufferedImage = reader.read( 0 );

    I figured out the problem. It was an actual BUG in the JDK!
    The code failed with the following JDKs:
    java version "1.5.0_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
    Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
    java version "1.5.0_03"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
    Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode)
    The code ran sucessful with this JDK:
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
    If you are using the ImageIO classes, I highly suggest you upgrade to the latest JDK.
    Best,
    Scott

  • Problem with Adobe Reader (GUI)

    Hi,
    I´ve got a problem with my Adobe Reader (v. 11.0.10). Everytime when I open some document, I´m getting graphical problems:
    Menu is hidden
    When I move by mouse over the menu, it dissappears.
    And when I maximize the window..
    Thanks for your help.

    Do you have any Kaspersky software installed?  If so, update to the latest version.

  • Problems with Adobe Reader and Flash Player

    I had an Adobe update last Monday and, ever since then, I can't view documents (eg credit card statements) on screen and sites that I previously visited regularly without problem suddenly say that I need to have Adobe Flash Player installed. I've downloaded Adobe Flash Player and it says it's installed correctly but when I return to the site, it still says I need Adobe Flash Player. I've also tried doing an uninstall first and then an instal but the same thing happens. I've run disk first aid and it found a problem with the Head which it fixed but I still can't open documents using Adobe in Safari. Adobe Plug ins tells me that the Internet Access plug in is not loaded but when I ran 'repair Adobe Reader installation", it said there were no missing components detected and repair was not needed. I don't know if it's relevant but I've been having problems with Safari for several weeks, quitting 3 or 4 times a day, mainly when I'm switching from Safari to another programme such as Entourage or Excel.
    Message was edited by: Aileen2

    Hi Carolyn
    I don't think I made it clear on the original post that I'm having problems with both Adobe Reader AND Adobe Flash Player. Unfortunately, all the Adobe Reader sites are confidential so I can't give you an illustration on that but for the Adobe Flash Player, try www.jacquielawson.com/ - you can preview cards without being signed in. With the Adobe Reader problems, I get a picture of a blank 'piece of paper' with a small blue square in the top right hand corner that has a white question mark inside it. The first time this happened to me, I was on the UK Inland Revenue site trying to print out some end of year forms. I phoned the Revenue's helpline and they said to try doing a 'save as' to my desktop. It seemed bizarre - saving a blank piece of paper - but lo and behold, when I opened it on my desktop, the forms appeared exactly as normal. However, I've since tried this 'save as' technique with my credit card statement and I still get a blank piece of paper with a blue square and white question mark when I open the desktop copy.
    Thanks for your help and patience. I really appreciate it.
    Aileen

  • Problem with Adobe Reader Plug-In (7, 8, and 9) on Windows XP

    We are experiencing a problem with the Adobe Reader plug-in and viewing documents hosted at our site.  The problem seems to happen with larger (over 5 MB) PDF files enabled for fast web viewing.  The problem never happens when viewing PDF image only files which are not enabled for fast web viewing.  The problem happens inside and outside our firewall, so it is not a firewall problem.  My organization has been hosting PDF files to the web at least all this decade, and this is the first time we have experienced and documented this problem on this scale.  We have ruled out the program creating the PDF file is causing the problem as I have eight sample PDF files created and modified by a variety of programs exhibiting the same issue.
    www.osti.gov/servlets/purl/945213-1jsnyF/
    Adobe Capture 3.0 / Adobe PDF Library 4.0
    www.osti.gov/servlets/purl/948577-R7PH1d/
    Adobe Capture 3.0 / Adobe PDF Library 4.0
    www.osti.gov/servlets/purl/959040-nPWEVJ/
    Adobe Acrobat 8.15 / Abbyy Recognition Server
    www.osti.gov/servlets/purl/961608-uR6ukp/
    PaperPort 10.0 / Abbyy Recognition Server
    www.osti.gov/servlets/purl/963955-8wBmHp/
    Adobe Acrobat 8.15 / Abbyy Recognition Server
    www.osti.gov/servlets/purl/964418-Ingskm/
    Adobe Acrobat 7.1 / Adobe Acrobat 7.1 Paper Capture Plug-in
    www.osti.gov/servlets/purl/963372-yhIUhW/
    Adobe Acrobat 7.08 / Abbyy Recognition Server
    www.osti.gov/servlets/purl/965399-4MBPMy/
    Xerox WorkCentre 7345 / Abbyy Recognition Server
    I can reproduce the problem with Internet Explorer 8.0.6 and Firefox 3.5.4 using Adobe Acrobat Plug-In 7.0.9.50 running on Windows XP Professional SP3.  Others have reproduced the problem with 8 and 9 versions of the plug-in on Windows XP Professional and Home.  Oddly, no one has been able to reproduce the problem with Unix/Linux versions of the plug-in or third party plug-ins.  This points to it being something wrong with Adobe Reader.
    The problem is when I attempt to view one of the eight PDFs in my browser, I can severely stall or lock it up if I attempt to view more than the first page before the whole document downloads.  Sometimes if you wait it out, the browser will unlock, but not display text on the pages.  Sometimes if you wait for the whole document to load before switching pages, it works.  Sometimes you can start switching pages and the document will not lock up at all.  All eight documents can be viewed without issue if downloaded to the PC's hard drive and then viewed with Adobe Acrobat 7.0.
    Can anyone point me to a technical document or reason why we would be experiencing this issue?  Even better, does anyone know the solution to these issues?
    Any help will be much appreciated.

    I looked at a few documents. They appear to be scans and scans that have been OCRd. It is also likely they have not been optimized for page view. This means that the document has to be fully downloaded before viewed. That means the browser may appear to freeze until the entire document is downloaded. Downloading the entire document appears to be a reasonable way to handle these files.

  • Problem With File Reading And Sorting

    I'm having problems with a particular task. Here is what I have to do:
    Write a program which reads 100 integers from a file. Store these integers
    in an array in the order in whcih they are read. Print them to the screen.
    Sort the integers in place using bubble sort. Print the sorted array to the
    screen. Now implement the sieve of Eratosthenes to place all prime numbers
    in an ArrayList. Print that list to the screen.
    Here is the code I have so far:
    import java.util.ArrayList;
    import java.io.*;
    public class Eratosthenes
        private ArrayList numbers;
        private String inputfile1 = "numbers.txt";
        public Eratosthenes()
            numbers = new ArrayList();
        public void readData()
            try {
                BufferedReader reader = new BufferedReader(new FileReader(inputfile1));
                for(int i = 1; i <= 100; i++) {
                    String temp = reader.readLine();
                    numbers.add();
            catch(Exception e)
    This is the file reading part I have done but it doesn't recognise the line numbers.add() . It brings up the error - 'Cannot resolve symbol - method add(). Thats the first problem I have, can anyone see any way to fix it and to achieve the task. Also can someone help with the structure of a bubble sort method and a sieve of Eratosthenes method as I have no clue whatsoever. Any help will be greatly appreciated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Ok, I've done that but I'm having another problem. When I'm printing an output to the screen, it prints 100 lines of integers and not 1 line of 100 integers. Can you see the problem in the code that is doing this?
    import java.util.ArrayList;
    import java.io.*;
    public class Eratosthenes
        private ArrayList numbers;
        private String inputfile1 = "numbers.txt";
        public Eratosthenes()
            numbers = new ArrayList();
        public void readData()
            try {
                BufferedReader reader = new BufferedReader(new FileReader(inputfile1));
                for(int i = 1; i <= 100; i++) {
                    String temp = reader.readLine();
                    numbers.add(temp);
                    System.out.println(numbers);
            catch(Exception e)
    }

  • Problem with Adobe Reader 9 and HTML Help, IE 7 and Firefox

    Hello everyone
    I have some Problems with the Adobe Reader 9.1.0 and different browsers.
    If I want to open a PDF document in one of these browser the browser-window freezes for 30 seconds and the document is built-on line by line.
    The Trouble is that if the document is comlete loaded an i want to scroll down, the windows freezes again and the document starts again with built-on...
    I have tried to open the documents with Reader 8.1.3 and this works fine, but i need to open the documents with Reader 9.1.0 because this is a customer preference to open the document with the newer version!
    Sorry for my english but i hope my problem is understandable :-)
    Does anyone know how to solve this problem?
    kind regards
    Marcel

    1. It happens with any file i want to open in browser.
    2. The Problem is specific to browser. When I open a document in the Reader application everithing works fine.
    kind regards
    Marcel

  • Problem with Adobe reader on iPad air

    I have looked all through Google to solve this problem but can't find help anywhere.
    I Have an IPad Air and want to open some PDFs files which are in a password area on a website. this works fine except for on my IPad. When I click on the file I want to open a page appears but only the first page and it doesn't even seem to be a PDF file. The first page is a school exercise but I can't read the answers on the second page. If I click on the box with the menu I can't even find the open with Adobe reader. I Have the newest version of reader for iOS and have also signed in but nothing opens the PDFs file.
    I Really hope someone can help me.

    I Have an IPad Air and want to open some PDFs files which are in a password area on a website.
    I am not sure what the "PDFs files which are in a password area on a website" mean.
    Are the PDFs from your school called "protectedPDF" by Vitrium by any chance?  Or do they use some other third-party technology for DRM (Digital Rights Management)?
    Would you share one of the PDF documents with us?  I have sent you the instructions on how to share a PDF document with us (Adobe).
    Thank you for your help.

  • Problem with Adobe Reader and IE

    I'm using Vista Home Premium and IE9 with the latest Reader available.  Starting yesterday, I cannot read PDF files on the web.  This is a new problem.  I tried to download newer versions of IE and the Reader, but both tell me I've got the newest versions I can use.
    I have no problem with Firefox.  Just IE.  I prefer using IE.  Can someone guide me -- without using technical language.  Many thanks!!

    Thanks for your input.  I opened the standalone Adobe Reader X, clicked Edit, Preferences, Security, Advanced Preferences.  Then clicked each of the 3 tabs on top, but nothing looked like "Protected Mode."
    Then I went back and clicked Security (Enhanced) and unchecked Enable Enhanced Security.  Tested this change, but I still get the gray screen and messages:  "A problem has caused IE to close."  "A problem with this website has caused IE to close and re-open the tab."  I then went back and re-checked Enable Enhanced Security.
    I should mention that I have used this particular website for about 10 years and never had a problem.  But I now have the same problem with any online PDF that I try to open using IE.
    Can you think of anything else?  If not, here's my plan of attack.  Please let me know if you think it will work.
    1)  Copy over all my favorite sites from IE to Firefox.  (I've already started doing that.)
    2)  Uninstall IE and re-install it.
    3)  If I still have a problem, uninstall Adobe Reader and re-install it.
    Do you think this will do the job if all else fails?
    Many, many thanks for the time you have put into this.

Maybe you are looking for