<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<small><font face="Helvetica, Arial, sans-serif">Hi Andreas,<br>
<br>
The <font face="Courier New, Courier, monospace">itk::ShiftScaleImageFilter</font>
may be what you are after:
<a class="moz-txt-link-freetext" href="http://www.itk.org/Doxygen/html/classitk_1_1ShiftScaleImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1ShiftScaleImageFilter.html</a><br>
<br>
This filter allows you to specify a shift value (0.0 in your case)
which is added to each pixel, and a scale value (0.3333 in your case)
with is multiplied with each pixel. You'll probably need a real-valued
image (float or double).<br>
<br>
HTH<br>
<br>
Cheers, Dan<br>
<br>
Andreas Keil wrote:</font></small>
<blockquote cite="mid007101c7819d$9dfe8460$690a9f83@08keil" type="cite">
  <pre wrap=""><font face="Helvetica, Arial, sans-serif">Dear all,

how is it possible to do perform scalar operations with images, e.g.

  1 / 3 * myImage

The solution of filling an image with constant values and using
AddImageFilter etc. is of course not the way to go. Do I have to subclass
UnaryFunctorImageFilter or is there an easier way?

Thank you,
Andreas.

_______________________________________________
Insight-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a>
<a class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
</font></pre>
</blockquote>
</body>
</html>