<div dir="ltr">Hi Bill<br>
<br>
Thanks for prompt reply. Here is my code...Since I am newbie in ITK. I
really dont get how to set parameters for itkNormalizeImageFilter.h .<br>
<br>
Any ways here is my code<br>
<br>
#if defined(_MSC_VER)<br>
#pragma warning ( disable : 4786 )<br>
#endif<br>
#include "itkImageFileReader.h"<br>
#include "itkImageFileWriter.h"<br>
#include "itkImage.h"<br>
#include "itkNormalizeImageFilter.h"<br>
<br>
int main( int argc, char *argv[] )<br>
{<br>
const unsigned int ImageDimension = 2;<br>
typedef unsigned short PixelType;<br>
<br>
typedef itk::Image< PixelType, ImageDimension > FixedImageType;<br>
typedef itk::ImageFileReader< FixedImageType > FixedImageReaderType;<br>
FixedImageReaderType::Pointer fixedImageReader = FixedImageReaderType::New();<br>
fixedImageReader->SetFileName( "Source.png" );<br>
typedef unsigned short InternalPixelType;<br>
typedef itk::Image <InternalPixelType,ImageDimension> InternalImageType;<br>
typedef itk::NormalizeImageFilter<FixedImageType,InternalImageType>fixedNormalizeFilterType;<br>
<br>
fixedNormalizeFilterType::Pointer normlizer = fixedNormalizeFilterType::New();<br>
<br>
normlizer->SetInput(fixedImageReader->GetOutput());<br>
<br>
typedef itk::ImageFileWriter< InternalImageType > WriterType;<br>
WriterType::Pointer writer = WriterType::New();<br>
writer->SetFileName( "NormalizedImage_OP.png");<br>
writer->SetInput(normlizer->GetOutput());<br>
<br>
try<br>
{<br>
writer->Update();<br>
}<br>
catch( itk::ExceptionObject & err ) <br>
{ <br>
std::cerr << "ExceptionObject caught !" << std::endl; <br>
std::cerr << err << std::endl; <br>
return -1;<br>
} <br>
return 0;<br>
}<br><br><br><div class="gmail_quote">On Mon, Oct 20, 2008 at 4:20 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
itkNormalizeImageFilter should do the job. Can you post your code?<br>
<div><div></div><div class="Wj3C7c"><br>
On Mon, Oct 20, 2008 at 10:15 AM, robertsen p <<a href="mailto:itkseeker@gmail.com">itkseeker@gmail.com</a>> wrote:<br>
> Dear All<br>
><br>
> I want to normalize images into zero mean and unit variance for intensity<br>
> based Image registration. I have tried itkNormalizeImageFilter.h<br>
> but It doesnt give a desired output (Image looks binary). Why???<br>
><br>
> I tried with sigmoid filter but how to set values of alpha and beta so as to<br>
> get unit variance and zero mean ....still output image to be gray scale??<br>
><br>
> Please help . looking forward to receive your reply.<br>
><br>
> Regards<br>
> Robert/<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Insight-users mailing list<br>
> <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</blockquote></div><br></div>