[Insight-users] PasteImage Filter

Bill Lorensen bill.lorensen at gmail.com
Fri Oct 5 18:25:34 EDT 2012


Make sure you build your application in Release mode. If you are building
Debug, ITK can be 10 to 50 times slower.

On Fri, Oct 5, 2012 at 6:00 PM, Kannan U V <kannanuv at cshl.edu> wrote:

> 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
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>



-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121005/de2cb3f1/attachment-0001.htm>


More information about the Insight-users mailing list