static void CreateImage1(FloatImageType::Pointer image);
static void CreateImage2(FloatImageType::Pointer image);
int main(int, char *[])
{
FloatImageType::Pointer image1 = FloatImageType::New();
CreateImage1(image1);
FloatImageType::Pointer image2 = FloatImageType::New();
CreateImage2(image2);
Atan2ImageFilterType;
Atan2ImageFilterType::Pointer atan2ImageFilter
= Atan2ImageFilterType::New ();
atan2ImageFilter->SetInput1(image1);
atan2ImageFilter->SetInput2(image2);
atan2ImageFilter->Update();
return EXIT_SUCCESS;
}
void CreateImage1(FloatImageType::Pointer image)
{
FloatImageType::RegionType region(start,size);
image->SetRegions(region);
image->Allocate();
while(!imageIterator.IsAtEnd())
{
imageIterator.Set(imageIterator.GetIndex()[0] - imageIterator.GetIndex()[1]);
++imageIterator;
}
}
void CreateImage2(FloatImageType::Pointer image)
{
FloatImageType::RegionType region(start,size);
image->SetRegions(region);
image->Allocate();
while(!imageIterator.IsAtEnd())
{
imageIterator.Set(imageIterator.GetIndex()[0] - imageIterator.GetIndex()[1]);
++imageIterator;
}
}