How to read a tiff file that has more than one page?

Hi,
I use JAI to read TIFF image and get the pixels from a raster object. A TIFF file can have more than one image in itself. The JAI doc from SUN only mentioned that we can get the number of IFD (image file directory) by using
getNumDirectories() function but no description about how to get different images separately out of one TIFF file. Does any one know how to do it or some example programs implementing such function? Thanks a lot.
Marvin

I'm not sure if this helps, but here's a web page which talks about Image I/O:
http://java.sun.com/products/java-media/jai/iio.html
For your problem, they have a sample solution which can read a specific page of a multi-page tiff file, so perhaps you could make a loop to read all of the pages:
http://java.sun.com/products/java-media/jai/forDevelopers/samples/MultiPageRead.java
Good luck!

Similar Messages

  • How to insert a detail record that has more than one master record

    I have a somewhat complex situation that I am triying to figure out. I have three tables A, B and C. Table C is a detail table that has a foreign key to table A and table B. There are is nothing else in table C (basically it's used to create a many to many relationship between A and B.
    Now I have a application module method that based on some user provided data needs to insert records in tables A and B and link them using table C. I have view links (and associations) between A and C as well as B and C. I can easily go from A and insert (via the view link accessor) a record into C. My problem is that I don't know how to the take that same C row and add it to B as a detail.
    I have kinda hacked it by creating a row in B, using postChanges to get it's primary key ID and set the attribute directly in C. It works but I was hoping to find a way to avoid calling postChanges possibly hundreds of times in a loop. I also cannot commit the AM until the process is completed.
    I tried setting the "composition association" on both associations but that didn't work either.
    Thanks

    I'm not sure if this helps, but here's a web page which talks about Image I/O:
    http://java.sun.com/products/java-media/jai/iio.html
    For your problem, they have a sample solution which can read a specific page of a multi-page tiff file, so perhaps you could make a loop to read all of the pages:
    http://java.sun.com/products/java-media/jai/forDevelopers/samples/MultiPageRead.java
    Good luck!

  • In Music, sometimes an album that has more than one artist, only one shows up, how do I get them all that are all on the album to play in sequence when I select that album?

    I can't figure out why, on my ipod touch in Music, when I select some albums that have more than one artist, the whole album doesn't come up to play all together.  This happens in some compilations, and only ne song shows up from each artist on the album.  Or like on an artist's album that has someone else singing with her.  I get that they are on the same line as an artist, but the album is an album, and when you play an album, the whole thing should play - right?  Thanks for your help!

    Generally all you need do is give tracks from the same album a common Album Artist. See Grouping tracks into albums. The images need an update but the basic info. still holds.
    tt2

  • Error using JAX-WS to consume a WS that has more than one parameter

    I am trying to create a web service proxy in JDeveloper using JAX-WS for an OAM web service from a WSDL (identity/oblix/WebServices/CompositeWebServices/WSDL/um_view_interface.wsdl). I received the following error when I try to run the proxy:
    Exception in thread "main" com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: SEI test.profile.OblixIDXMLPortType has method oblixIDXMLUmView annotated as BARE but it has more than one parameter bound to body. This is invalid. Please annotate the method with annotation: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
    at com.sun.xml.ws.model.RuntimeModeler.validateDocBare(RuntimeModeler.java:1267)
    at com.sun.xml.ws.model.RuntimeModeler.processDocBareMethod(RuntimeModeler.java:1256)
    at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:628)
    at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:416)
    at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:267)
    at com.sun.xml.ws.client.WSServiceDelegate.buildRuntimeModel(WSServiceDelegate.java:715)
    at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.buildRuntimeModel(WLSProvider.java:427)
    at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:703)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:347)
    at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.getPort(WLSProvider.java:409)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:330)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:312)
    at javax.xml.ws.Service.getPort(Service.java:92)
    at test.profile.OblixIDXMLService.getOblixIDXMLPort(OblixIDXMLService.java:79)
    at test.profile.OblixIDXMLPortClient.main(OblixIDXMLPortClient.java:23)
    Process exited with exit code 1.
    It seems like the OAM web service (um_view_interface.wsdl) is not WS-I BP 1.1 compliant. It expects two elements under the body. WS-I BP 1.1 specifies that there should be only one child in the body of the element.
    The expected request body would look like this, there are two elements under the body:
    <soapenv:Body>
    <authentication xmlns="http://www.oblix.com/">
    <login>loginname</login>
    <password>pass</password>
    <domain>dc=test,dc=org</domain>
    </authentication>
    <request application="userservcenter" function="view" mode="dataonly" version="NPWSDL1.0" xmlns="http://www.oblix.com/OblixXMLLocalSchema">
    <params xmlns="">
    <ns1:uid xmlns:ns1="http://www.oblix.com/">cn=tester,cn=Users,dc=test,dc=org</ns1:uid>
    </params>
    </request>
    </soapenv:Body>
    Has anyone encountered the similar problem? Is there a solution to this problem?
    Your help is appreciated!

    Can u pls share ur solution if u have found a way 2 create a web service with 2 ports.I have not yet found a solution so far and nobody reacted to all my posts in the different fourms. It seems nobody is implementing web services with two ports using the EJB annotations technology.

  • How to read from txt file that has words in between?

    Hi all,
    I am using Labview 8.2.
    I would like to read from a text file.  I have data (after each time it is has averaged over 100 waveforms) repeatedly stored on to the file.  The idea is to further improve SNR in post processing by again averaging the data (that has been averaged over the 100 waveforms).  
    I can get LabView  to save the data repeatedly into the file, so it keeps getting appended.
    The problem is to read the data in labview so I can now again average it.  The problem is the labview seperates the sets of data with the following:
    " Channels    1    
    Samples    9925    
    Date    2008/10/28    
    Time    17:16:11.638363    
    X_Dimension    Time    
    X0    -3.0125000000000013E-3    
    Delta_X    2.500000E-6    
    ***End_of_Header***        "
    So When I read it, it only sees the first set of data.
    Can someone please tell me how to read all the sets of data in labview?
    I have attached the file I want to read "acquiredwaveform.txt"  and the basic VI (really basic btw) to read the file.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    ReadFileAndAverage.vi ‏48 KB
    acquiredWaveform.txt ‏605 KB

    Thanks again DFGray for the comments. 
    After the correlations to find the peak positions, i just take the max value.  And you are right the accuracy is limited by the number of  samples per cycle.  Perhaps it would be clearer if you see the code.
    1) Basically I get a signal on the up and downslope of the sine wave.  On the down slope however the signal is negative, i.e. its is flipped.  So before I shift and average...I 'cut' the waveform into 4 (when cycles per buffer = 2, then I get 4 signals, 2 on the up slope and 2 on down slope) bits.  Counting from one, I flip the even number, cut it, and but an array of waveforms which is then sent to be convolved and shifted.
    2) Array of waveforms are stored to be phased shifted (Convolve and shift vi) and averaged (entire averaging vi which uses the convolve and shift vi as a sub vi). 
    * Phase shifting doesn't work when I cut and put it together (So something is wrong in cut waveform vi) 
    * Also if it isn't too time consuming could you give me an example of interpolating and shifting thing.
    * Also if you have any comments regarding the following VIs please let me know.  
    Thanks 
    Attached is:
    1) Cut waveform vi
    2) Convolve and shift
    3) Entire averaging 
    Attachments:
    SubVICutWaveforms.vi ‏37 KB
    SubVIConvolveShift.vi ‏30 KB
    SubVIEntireAveraging2.vi ‏43 KB

  • How to Import Excel 2007 worksheet that has more than 255 columns into SQL Server 2008 table using SSIS 2008.

    I am using Excel source which uses Microsoft ACE 12.0 OLE DB provider, this only allows the first 255 columns to be imported and not the rest.
    I need to export all the columns into the table .
    Any pointers to this is greatly appreciated

    If you can use third-party solutions, check the commercial COZYROC Excel adapters:
    Excel Connection Plus Manager
    Excel Source Plus
    Excel Destination Plus
    Excel Task
    The enhanced components can be used both under 32bit and 64bit modes and doesn't exhibit the 255 columns limitation.
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • How to map when the Context node has more than one element

    Dear SDN Community,
      I am develping a WebDynpro java application with Adobe forms. My goal is to present a user a screen with 10 records of customer details and submit. I have created a context element for the customer(Cust#, address details etc) and mentioned the cardinality as 1..n. Now How do I bind these 10 records in my data view to first element, second element... 10th element of the context. Once the user submits, I need to write the 10 record values to Z table. Can you please advice me here.
    Thanks!
    Surya.

    solved this problem by going through the Interactive forms tutorial.

  • How do you back up or go forward more than one page at a time? Older verisions list all the previous pages when you click on forward or back page arrows new 4.0 only lets you go one page at a time

    see question

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.

  • How to use more than one page to design a form-like report???

    Hi
    I am designing a form-like report. and widening the repeating frame to contain all the page or the window like this page:
    Image: !http://up1.m5zn.com/photo/2008/12/21/07/e728mos12.jpg/jpg!
    Now there is no space at the window to complete designing the report!
    How to make the repeating frame to contain more than one page or one window to complete designing the report?

    change Vertical Panels per Page to 2 (or more as needed) for the Main Section of Layout Model.

  • How to print a PDF file that was display in my page...

    Hi !. My doubt would be the following one... I would like to know how to print a pdf file that was displayed in my page ?... I mean the PDF file not the page...
    The PDF would be in this url:
    http://iprodesa.lasegunda.com.ar:8090/datos/pdf/830.pdf
    How could I implement this ?...

    This first question which comes to mind is how do you display the pdf file in the browser?
    For this the browser uses a plug in (e.g. adobe reader) which already has the ability to print the pdf file. Depending on the version of your plug in, printing is started differently.
    Timo
    Ps: which jdev version do you use?

  • How to upload a file which has more than 999 line item  through BDC ?

    Hello Techards
    Hi to all
    Can any body tell me how to upload a file which has more than 999 line item  through BDC for traction F-02 ?
    Thanks in advance.
    Shovan

    Hello Shovan,
    You split it up to post two accounting documents with the help of a "suspense" a/c.
    Say, you have to post the following line items below:
    line 1 - dr. - GL a/c X - $1000
    line 2 - cr. - GL a/c Y - $1
    line 3 - cr. - GL a/c Y - $1
    line 1001 - cr. - GL a/c Y - $1
    You cannot post the above as a single doc in SAP (because of technical reasons), so you need to break it up into 2 documents as below:
    Doc1
    line 1 - dr - GL a/c X - $1000
    line 2 - cr - GL a/c Y - $1
    line 3 - cr - GL a/c Y - $1
    line 998 - cr - GL a/c Y - $1
    line 999 - cr - SUSPENSE a/c - $3
    Doc2
    line 1 - dr - SUSPENSE a/c - $3
    line 2 - cr - GL a/c Y - $3
    Note that there is no incorrect impact on accounting as first we credit suspense a/c by $3 and next we debit the same suspense a/c by $3 as a result the effect is nil. Similarly, we credit $997 to GL a/c Y (which is less by $3) in the first doc which is compensated by the second doc by crediting the shortfall of $3.
    Hope this helps,
    Cheers,
    Sougata.

  • To check that the ligical file is used more than one program.

    HI all,
    Is there any way to check that the one logical file are used more than one program.
    Ex: one logical file is used in one program. I want to check that the same logical file are used in any other program.

    Hi To all,
    NO ideas...

  • I have an HP Photosmart C4180 all in one printer scanner and copier, I can't figure out how to scan more than one page at a time and then send as a PDF file via email

    I have an HP Photosmart C4180 all-in-one, printer, scanner and copier.  I can't figure out how to scan more than one page?  It will only let me do one page at a time and then I have difficulty sending pages 1, 2 and 3 as one docuement.  Any ideas??
    Thank you, Jetteski

    Hello Jetteski,
    Hello Jetteski, Thanks for the post.
    Since you are running a MAC, check the below links for some excellent information on scanning.  Good Luck!
    http://goo.gl/M8Cl2
    http://goo.gl/cufK6
    http://goo.gl/OTQoR
    I work for HP but my posts and replies are my own....Thank you!

  • When I read a pdf document using Safari I'm unable to read more than one page of a file. A padlock icon is locked on the tab. Please help.

    When I read a pdf document using Safari on my IPad  I'm unable to read more than one page of a file. A padlock icon is locked on the tab. Please help.

    Hi snoreaustralia,
    It sounds like you just need to associate the PDF filename extension with Acrobat, rather than Preview. Please see this document from the Microsoft Help for instructions on choosing the default program for opening a particular file type (in your case, PDF): Change which programs Windows uses by default - Windows Help
    Best,
    Sara

  • Lumia 520 SMS- when a contact has more than one nu...

    Hi- when calling a contact who has more than one phone number it is easy to choose which of the numbers for that contact to use, but when sending SMS there is no option to choose. How does the SMS system decide which of the available numbers to use?
    Solved!
    Go to Solution.

    If I do the following steps: Messaging > + >To + > Select contact > I see all numbers listed for the contact.
    If I do instead: People > Contact > SMS, the number entered as "mobile" is selected by default. If you want to change it to "mobile2", you need to go: ... > switch number and select from there.

Maybe you are looking for

  • SSRS 2012 compatibility with Oracle 11g

    Hello, I have a client that is asking us to implement SSRS 2012 to report on our data warehouse.  We currently support Oracle 11g in our DW. We have tried to connect to 11G using a trial version but have failed in all attempts.  In looking at the Mic

  • Exporting PDF's

    Hi folks I have a major issue and I don't think this will be resolved until there is an update but I wanted to ask if anyone knew the answer or has a workaround. In 'Numbers' I have created a useful spreadsheet to create quotes. Tb one is my quotatio

  • Fail over JMS in clustering

    Hi ,           I'm newbies to weblogic.           Currently I need to use JMS to asychronous messaging.           version I used is weblogic 705.           The environment is clustering. There is one Admin server, and 2 managed servers by multicastin

  • Fn F7 defaults from Presentation on Projector and Notebook back to My Normal Display Settings

    I am using my T61 to project slides in class. When I connect it to the data projector, turn on the data projector, and use Fn F7 to switch from My Normal Display Settings to Presentation on Projector and Notebook, the signal does not get through to t

  • Print spool to html

    Hi! Would it be possible to convert print spool to html file in ABAP? Need your help. Thanks, Cherrie