<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 - Process-Math-Macro..."
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1169">1169</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Process-Math-Macro...
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Fiji
          </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>critical
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P5
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Plugins
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>imagej-bugs@imagej.net
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>d.krunic@dkfz.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=263" name="attach_263" title="Picture can say 1000 words.">attachment 263</a> <a href="attachment.cgi?id=263&action=edit" title="Picture can say 1000 words.">[details]</a></span>
Picture can say 1000 words.

Can you please help, I wanted to use the Process-Math-Macro... option in FIJI
developed based on the Expression plugin, but I cannot get it to work with
16-bit grey images properly. So I wrote the macro for this, but it is much to
slow comparing to the Macro... plugin. 
The Process-Math-Macro... works great for 8-bit, but it does some strange
calculation when it comes to 16-bit. Simple operation, such as

v=getPixel(x, y)-getPixel(x-1, y-1);

gives funny result with 16-bit.
It appears that the new 16-bit processed image is OK but only for the first 2
rows / columns of pixels. All the other pixels are not OK because I guess the
wrong image is targeted; the plugin should target the original image again, but
instead it targets the new image to calculate new values from new values. This
is obviously wrong; it should get pixels from the original image and after that
target the new image and change the values there. Interestingly, it does not do
this for the 8-bit.
Just create a simple File-New-Image with 5x5 pxl 16-bit random fill and try it,
check the middle pixel and you will see what is the problem. Also, create 8-bit
out of the same 16-bit and try the same operation again - you will see that it
works.

Would you have any idea how to fix this?
Thank you very much for your help.

Best regards,
Damir</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>