[vtkusers] 2's complement

David Gobbi david.gobbi at gmail.com
Fri Jul 16 12:21:15 EDT 2010


Without context, this is a hard question to answer properly.  I think
the answer is no, because both vtkImageShiftScale and
vtkImageMathematics use floating-point math instead of integer math.
If there was a VTK imaging filter that did integer math, then you
could get two's complement by taking the negative value of each pixel.

But taking two's complement of an image is a rather odd thing to do,
and my guess is that whatever you are trying to achieve, there is some
other way to do it.

   David


On Thu, Jul 15, 2010 at 9:02 AM, Raúl Ferriz <raul at torresyvalero.com> wrote:
> Hello again!
>
> Is there an easy  way to apply a 2's complement to a dicom series data?
>
> Many thanks
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list