<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<style><!--.hmmessage P{margin:0px;padding:0px}body.hmmessage{font-size: 10pt;font-family:Tahoma}--></style>My code is:<br><br>[...]<br><br> OutputImageType::Pointer D = OutputImageType::New();<br> OutputImageType::Pointer Daverage = OutputImageType::New();<br> <br> D=filter->GetOutput();<br> Daverage=filterM->GetOutput();<br><br> OutputImageType::Pointer Dfinal = OutputImageType::New();<br> Dfinal->SetBufferedRegion( Dfinal->GetRequestedRegion() );<br> Dfinal->Allocate();<br><br> typedef itk::ImageRegionIterator<OutputImageType> IteratorType;<br> typedef itk::ImageRegionConstIterator<OutputImageType> ConstIteratorType;<br> <br> IteratorType DfinalIt (Dfinal, Dfinal->GetRequestedRegion());<br> ConstIteratorType DaverageIt (Daverage, Daverage->GetRequestedRegion());<br> ConstIteratorType DIt (D, D->GetRequestedRegion());<br> <br>for (DfinalIt.GoToBegin(), DaverageIt.GoToBegin(), DIt.GoToBegin();!DaverageIt.IsAtEnd(); ++DfinalIt, ++DaverageIt, ++DIt)<br> DfinalIt.Set(DaverageIt.Get() < (DIt.Get() - 0.55) ? 1 : 0);<br> <br>//After this code Dfinal image will have "1" value at voxels where Daverage < D - 0.5.<br> <br> WriterType::Pointer writer3 = WriterType::New();<br><br> <br> writer3->SetFileName("Final.dcm");<br> <br> writer3->SetInput(Dfinal);<br> writer3->Update();<br><br>[...]<br><br>Thanks for your time...<br><br><br>> Date: Fri, 6 Aug 2010 08:32:35 -0700<br>> From: volkovych@gmail.com<br>> To: insight-users@itk.org<br>> Subject: Re: [Insight-users] itkDifferenceImageFilter: Comparison between        two images<br>> <br>> <br>> Could you put here the corresponding part of your code?<br>> It's hard to analyze the reason without any code.<br>> Sergiy.<br>> -- <br>> View this message in context: http://itk-insight-users.2283740.n2.nabble.com/itkDifferenceImageFilter-Comparison-between-two-images-tp5380586p5381029.html<br>> Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>> _____________________________________<br>> Powered by www.kitware.com<br>> <br>> Visit other Kitware open-source projects at<br>> http://www.kitware.com/opensource/opensource.html<br>> <br>> Kitware offers ITK Training Courses, for more information visit:<br>> http://www.kitware.com/products/protraining.html<br>> <br>> Please keep messages on-topic and check the ITK FAQ at:<br>> http://www.itk.org/Wiki/ITK_FAQ<br>> <br>> Follow this link to subscribe/unsubscribe:<br>> http://www.itk.org/mailman/listinfo/insight-users<br>                                            </body>
</html>