[Insight-users] PasteImage Filter

Kannan U V kannanuv at cshl.edu
Fri Oct 5 18:46:06 EDT 2012


Thanks Bill. I built it in Release mode and still it is nearly a 1:2
slower performance.

For release, I am using the following gcc arguments.

CMAKE_CXX_FLAGS_RELEASE -O3 -DNDEBUG

Is there any thing else that I can do?

On Fri, Oct 5, 2012 at 6:25 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> 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
>



-- 
Thanks,
Kannan


More information about the Insight-users mailing list