File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes scanning pixels of .tiff image using imageJ library Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "scanning pixels of .tiff image using imageJ library" Watch "scanning pixels of .tiff image using imageJ library" New topic
Author

scanning pixels of .tiff image using imageJ library

me erum
Greenhorn

Joined: Feb 05, 2012
Posts: 2
im using the imageJ library to read a .tiff image file. But when im trying to read the pixels of image1 in variable c, i get an error saying "incompatible types: required int, found int[]. im quiet new to java, so can somebody tell me how to get around this problem. The code is otherwise working fine with other image formats.

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

The error means that the method you are calling returns an int[] (array of int), but you are trying to assign that to an int (because c is an int). That won't fit; you cannot put an array of integers in a single integer. Find the documentation of the ImagePlus class and read what the getPixel() method returns exactly.

(Please UseCodeTags and indent your code properly).


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/new-java/55229-scanning-pixels-tiff-image-using-imagej-library.html
http://stackoverflow.com/questions/9171531/scanning-pixels-of-tiff-image-using-imagej-library


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scanning pixels of .tiff image using imageJ library
 
Similar Threads
How to fade an image?
Find column number by StringCellValue
scanning an image for a certain pixel color in java
compare two text files
How to encode image in parts?