[Insight-users] Photographic Negative ?

Luis Ibanez luis.ibanez at kitware.com
Mon, 19 Apr 2004 14:46:16 -0400


Hi Robert,

Sorry, this filter was added to the toolkit after the
publication of the SoftwareGuide.

There is however, an example of its use under:

     Insight/Examples/Filtering/
        ResampleVolumesToBeIsotropic.cxx


All the material on the "/Examples" directory will
be included in the next edition of the SoftwareGuide.


Regards,


     Luis


-------------------------
Atwood, Robert C wrote:

> Yes that does indeed do the trick... 
> (but I cannot find it in the ITK software guide( PDF, Aug 21 2003 )? )
> 
> Thanks again,
> 
> Robert
> 
> 
> 
> 
> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
> Sent: 16 April 2004 19:38
> To: Atwood, Robert C
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] Photographic Negative ?
> 
> 
> Hi Robert,
> 
> The itkIntensityWindowingImageFilter will do the trick:
> 
> http://www.itk.org/Insight/Doxygen/html/classitk_1_1IntensityWindowingIm
> ageFilter.html
> 
> Just set up the OutputMinimum and OutputMaximum
> inverted, that is:
> 
>    SetOutputMinimum( 255 );
>    SetOutputMaximum(   0 );
> 
> Please let us know if you find any problem with it.
> 
>    Thanks
> 
>     Luis
> 
> 
> 
> ----------------------
> Atwood, Robert C wrote:
> 
> 
>>I cannot figure out a simple filter that returns the negative of an 
>>image. The RescaleImageFilter does not allow a negative scale, and 
>>ScaleShift also seems to choke if the scale is -1
>>
>>
>>For example I have an image containing values (x) between 0 and 200, I
> 
> 
>>want to pass through an image in which each value is 200-x (output of 
>>distance map)
>>
>>Outputting the dmap->GetOutput() data shows me the correct distance 
>>map, but output of rescaler->GetOutput() creates a file that is all 
>>zeros. RescaleImageFilter simply returns an error if the minimum is 
>>greater than the maximum. I am guessing that negative SetScale value 
>>is not intended to be used in the ShiftScaleImageFilter?
>>
>>
>>What is the correct filter to use for this purpose?
>>
>>Thanks,
>>Robert
>>
>> 
>>Here are the important definitions and statements used to get all 
>>zeros:
>>
>>
>>
>>typedef itk::Image<unsigned long, 3>   LabeledImageType;
>>typedef itk::ShiftScaleImageFilter<LabeledImageType,LabeledImageType>
>>RescaleType;
>>RescaleType::Pointer rescaler = RescaleType::New();
>>
>>rescaler->SetScale(-1);
>>rescaler->SetShift(200);
>>
>>rescaler->SetInput(dmapvol->GetOutput());
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk.org 
>>http://www.itk.org/mailman/listinfo/insight-users
>>
> 
> 
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>