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: 14193
    
  20

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 8 API documentation
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4571
    
    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.
 
GeeCON Prague 2014
 
subject: scanning pixels of .tiff image using imageJ library