<html>
<head>
<base href="http://fiji.sc/bugzilla/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - ImageProcessor.flipHorizontal()/flipVertical() requires use of updateImage()"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=1205">1205</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ImageProcessor.flipHorizontal()/flipVertical() requires use of updateImage()
</td>
</tr>
<tr>
<th>Product</th>
<td>ImageJ
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P5
</td>
</tr>
<tr>
<th>Component</th>
<td>Legacy
</td>
</tr>
<tr>
<th>Assignee</th>
<td>imagej-bugs@imagej.net
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dloginov@mit.edu
</td>
</tr></table>
<p>
<div>
<pre>I was using ImageProcessor.flipHorizontal()/flipVertical() and found that its
behavior is sometimes inconsistent, i.e. it may flip the image as referred to
by ImageProcessor, but not necessarily the same image when referred by
ImagePlus. In these cases I have to force the update using
ImagePlus.updateImage(). Could you please elaborate if that is the intended
behavior?
Specific instance is:
BufferedImage img = new BufferedImage(WIDTH, HEIGHT,
BufferedImage.TYPE_USHORT_GRAY);
img.getRaster().setDataElements(0, 0, WIDTH, HEIGHT, objImage);
ImagePlus imp = new ImagePlus("", img);
imp.show(); // shows original image
ImageProcessor ip = imp.getProcessor();
ip.flipVertical();
ip.flipHorizontal();
ImagePlus impNew = new ImagePlus("", ip);
impNew.show(); // flipped image
imp.show(); // old image (!)
If one now issues
imp.updateImage();
then imp.show() will show the correct (flipped) image.
I'm encountered this issue with the latest release version (1.50e).
Thank you.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>