[Insight-users] ShiftscaleImageFilter
Luis Ibanez
luis.ibanez at kitware.com
Tue, 06 Apr 2004 15:52:59 -0400
Hi Radhika,
You could also use the
IntensityWindowingImageFilter for this purpose.
http://www.itk.org/Insight/Doxygen/html/classitk_1_1IntensityWindowingImageFilter.html
Inversion with this filter is achieved by setting
WindowMinimum = 0
WindowMaximum = 255
OutputMinimum = 255
OutputMaximum = 0
Regards
Luis
--------------------------------
Radhika Sivaramakrishna wrote:
> Hi
>
> I was trying to invert an image using shift scale image filter. But
> looks like I am making a mistake because I get a blank image.
>
> I have an unsigned char image. Here is what I am doing
>
>
>
> ShiftScaleFilterType::Pointer ssfilter1 = ShiftScaleFilterType::New();
>
> ssfilter1->SetInput(mask);
>
> ssfilter1->SetShift(-255.0);
>
> ssfilter1->SetScale(-1.0);
>
>
>
> I put the shift factor as -255, because I checked the code for
> ShiftScale... and it calculates the new values as (old_value +
> shift)*scale, unless I am misinterpreting this.
>
> Can someone help me figure out where I am making a mistake?
>
> Thanks
>
> Radhika
>
>
>
>
>
>
>
> -----------------------------------------------------
>
> Confidentiality Notice.
>
> This email message is for the sole use of the intended recipient(s) and
> may contain confidential and privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not
> the intended recipient, please contact the sender by reply email and
> destroy all copies of the original message. If you are the intended
> recipient, please be advised that the content of this message is subject
> to access, review and disclosure by the sender's Email System Administrator.
>