IntelliJ Java IDE
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
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply 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
Bartender

Joined: Aug 16, 2005
Posts: 11642

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: 3221

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.
 
 
subject: scanning pixels of .tiff image using imageJ library
 
Threads others viewed
How to encode image in parts?
How to fade an image?
compare two text files
Find column number by StringCellValue
scanning an image for a certain pixel color in java
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture