[Insight-users] Re: Insight-users Digest, Vol 25, Issue 47

kurt kurtzhao at yeah.net
Mon May 15 13:20:31 EDT 2006


Hi Kathy, 

To use the filter, u need to specify desitination image, soure image, SetDestinationIndex specifies where the pasting occurs. In the code below, the srcImage will be pasted to destImage from 0,0,i of the destImage. Let me know if you have further questions. Thanks!

Best Regards
Kurt 

typedef itk::PasteImageFilter<ImageType> 
    PasteFilterType;

PasteFilterType::Pointer paster = PasteFilterType::New();
        paster->SetDestinationImage(destImage);
        paster->SetSourceImage( srcImage );

PasteFilterType::InputImageIndexType destIndex;
        destIndex[0] = 0;
        destIndex[1] = 0;
        destIndex[2] = i;
    
        paster->SetDestinationIndex( destIndex );

        paster->SetSourceRegion( srcImage->GetLargestPossibleRegion() );

        try
          {
          paster->Update();
          }
        catch( itk::ExceptionObject & excp )
          {
          std::cerr << "Exception thrown while pasting the Images" << std::endl;
          std::cerr << excp << std::endl;
          }
>
>Message: 7
>Date: Mon, 15 May 2006 08:44:07 -0700 (PDT)
>From: smythek at u.washington.edu
>Subject: [Insight-users] Paste Image filter?
>To: insight-users at itk.org
>Message-ID:
>	<Pine.LNX.4.43.0605150844070.24766 at hymn10.u.washington.edu>
>Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
>Hello,
>
>Does anyone know what I need to do to use PasteImageFilter?  It's not in the user document, and the Doxygen page isn't clear.
>
>
>Thanks,
>Kathy
>
>
>
>
>
>
>------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>
>
>End of Insight-users Digest, Vol 25, Issue 47
>*********************************************
>

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        kurt
        kurtzhao at yeah.net
          2006-05-15



More information about the Insight-users mailing list