[Insight-users] problem with ImageDuplicator

Miller, James V (Research) millerjv at crd.ge.com
Mon, 23 Feb 2004 08:54:50 -0500


Sergio, 

The ImageDuplicator filter does not adhere to the pipeline mechanism and
relies on the modified times of DataObjects to do what it needs to do.
However, a DataObject's modified time is usually not altered when the bulk
data is generated.
So the duplicator is probably not executing the second time it is used.

I am not sure where the Duplicator is being used, if you would like, I can
try to fix it to adhere to the pipeline semantics.

Jim



-----Original Message-----
From: Sergio Andres [mailto:sergio at unizar.es]
Sent: Monday, February 23, 2004 8:09 AM
To: insight-users at itk.org
Subject: [Insight-users] problem with ImageDuplicator



Hi all,

I'm using several ITK filters such as :
-RecursiveGaussianImageFilter,
-AddImageFilter,
-MultiplyImageFilter
-and ImageDuplicator


I got surprised when the results weren't as I expected..

My code is like this:

            // auxImage = LxLxLxx + LyLyLyy
            addFilter->SetInput1(imageLxLxLxx);
            addFilter->SetInput2(imageLyLyLyy);
            addFilter->Update();

            duplicatorFilter->SetInputImage(addFilter->GetOutput());
            duplicatorFilter->Update();
            auxImage = duplicatorFilter->GetOutput();

            // outputImage = LxLxLxx + LyLyLyy + 2LxLxyLy
            addFilter->SetInput1(auxImage);
            addFilter->SetInput2(image2LxLyLxy);
            addFilter->Update();

            duplicatorFilter->SetInputImage(addFilter->GetOutput());
            duplicatorFilter->Update();
            outputImage = duplicatorFilter->GetOutput();

           
            diffFilter->SetValidInput(addFilter->GetOutput());
            diffFilter->SetTestInput(outputImage);
            diffFilter->Update();

As you can see above, I use addFilter to calculate = LxLxLxx + LyLyLyy + 
2LxLyLxy, and store it in outputImage.
But then, when I compared the output from addFilter and outputImage ... 
I see that there is an important difference
between its values (mean difference about 68.00), when they should have 
the same values...

addFilter is an AddImageFilter object
diffFilter is an DifferenceImageFilter object

outputImage, auxImage, LxLxLxx and so .. are Image<double,2> objects


I will appreciate your answer..

Thanks!

Sergio.

_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users