[Insight-users] PasteImage Filter

Kannan U V kannanuv at cshl.edu
Fri Oct 5 18:00:52 EDT 2012


I was missing a update on the pasteFilter. Now that the paste image
filter works. but the performance is 1:4 times worse than just copying
pixels from tile to mosaic from the tiles. Is there a way I can
improve this performance issue?

On Thu, Sep 20, 2012 at 6:08 PM, Kannan U V <kannanuv at cshl.edu> wrote:
> Hi All,
> I am trying to use PasteImageFilter on a grid of image tiles. (These
> are tiles with overlap) I know the position of the tiles and I want to
> paste them on to the montage. I am using pasteImage filter. When I use
> the following routine and I get only the last written time in the
> mosaic image and all other regions are set to zero.
>
> Moreover if I don't do a set regions on the mosaicImage I get a write
> error on image writer. I need help figuring out how it has to be run.
>
>  for (int iY = 1; iY < 2; iY++) {
>     for (int iX = 1; iX < 3; iX++) {
>       cout << "Processing tile : (" << iX << "," << iY << ")" << endl;
>       CreateConstantImage (tileImage, (iX + iY));
>       pasteFilter->SetSourceImage(tileImage);
>       pasteFilter->SetDestinationImage (mosaicImage);
>       pasteFilter->SetSourceRegion(tileImage->GetLargestPossibleRegion());
>
>       mosaicIndex1[0] = iX * 812;
>       mosaicIndex1[1] = iY * 812;
>       pasteFilter->SetDestinationIndex(mosaicIndex1);
>
>       mosaicImage = pasteFilter->GetOutput();
>       mosaicImage->SetRegions(region);
>
>   }
>
>
>
> --
> Thanks,
> Kannan



-- 
Thanks,
Kannan


More information about the Insight-users mailing list