Paste an image (or a constant value) into another image.
PasteImageFilter allows a region in a destination image to be filled with a source image or a constant pixel value. The SetDestinationIndex() method prescribes where in the destination input to start pasting data from the source input. The SetSourceRegion method prescribes the section of the second image to paste into the first. When a constant pixel value is set, the SourceRegion describes the size of the region filled. If the output requested region does not include the SourceRegion after it has been repositioned to DestinationIndex, then the output will just be a copy of the input.
This filter supports running "InPlace" to efficiently reuses the destination image buffer for the output, removing the need to copy the destination pixels to the output.
When the source image is a lower dimension than the destination image then the DestinationSkipAxes parameter specifies which axes in the destination image are set to 1 when copying the region or filling with a constant.
- Examples
- SliceBySliceDecorator/SliceBySliceDecorator.cxx.
Definition at line 55 of file sitkPasteImageFilter.h.
|
template<class TImageType > |
Image | ExecuteInternal (const Image *destinationImage, const Image *sourceImage) |
|
template<class TImageType > |
Image | ExecuteInternal (const Image *image, double constant) |
|
template<class TImageType > |
Image | ExecuteInternal (const TImageType *destinationImage, const Image *sourceImage, std::integral_constant< unsigned int, 1 > meta) |
|
template<class TImageType , unsigned int OutputDimension> |
Image | ExecuteInternal (const TImageType *destinationImage, const Image *sourceImage, std::integral_constant< unsigned int, OutputDimension > meta) |
|
|
static bool | GetGlobalDefaultDebug () |
|
static void | GlobalDefaultDebugOff () |
|
static void | GlobalDefaultDebugOn () |
|
static void | SetGlobalDefaultDebug (bool debugFlag) |
|
static void | GlobalWarningDisplayOn () |
|
static void | GlobalWarningDisplayOff () |
|
static void | SetGlobalWarningDisplay (bool flag) |
|
static bool | GetGlobalWarningDisplay () |
|
static double | GetGlobalDefaultCoordinateTolerance () |
| Access the global tolerance to determine congruent spaces. More...
|
|
static void | SetGlobalDefaultCoordinateTolerance (double) |
| Access the global tolerance to determine congruent spaces. More...
|
|
static double | GetGlobalDefaultDirectionTolerance () |
| Access the global tolerance to determine congruent spaces. More...
|
|
static void | SetGlobalDefaultDirectionTolerance (double) |
| Access the global tolerance to determine congruent spaces. More...
|
|
static bool | SetGlobalDefaultThreader (const std::string &threader) |
| Set/Get the default threader used for process objects. More...
|
|
static std::string | GetGlobalDefaultThreader () |
| Set/Get the default threader used for process objects. More...
|
|
static void | SetGlobalDefaultNumberOfThreads (unsigned int n) |
|
static unsigned int | GetGlobalDefaultNumberOfThreads () |
| Set/Get the default threader used for process objects. More...
|
|
void | CheckImageMatchingDimension (const Image &image1, const Image &image2, const std::string &image2Name) |
|
void | CheckImageMatchingPixelType (const Image &image1, const Image &image2, const std::string &image2Name) |
|
void | CheckImageMatchingSize (const Image &image1, const Image &image2, const std::string &image2Name) |
|
virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
|
virtual itk::ProcessObject * | GetActiveProcess () |
|
virtual void | OnActiveProcessDelete () |
|
virtual void | onCommandDelete (const itk::simple::Command *cmd) noexcept |
|
virtual void | PreUpdate (itk::ProcessObject *p) |
|
virtual void | RemoveITKObserver (EventCommand &e) |
|
| NonCopyable ()=default |
|
| NonCopyable (const NonCopyable &)=delete |
|
NonCopyable & | operator= (const NonCopyable &)=delete |
|
template<class TImageType > |
static void | FixNonZeroIndex (TImageType *img) |
|
template<class TImageType > |
static TImageType::ConstPointer | CastImageToITK (const Image &img) |
|
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector> |
static Image | CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img) |
|
template<unsigned int VImageDimension, unsigned int VLength, template< unsigned int > class TVector> |
static Image | CastITKToImage (itk::Image< TVector< VLength >, VImageDimension > *img) |
|
template<class TImageType > |
static Image | CastITKToImage (TImageType *img) |
|
static const itk::EventObject & | GetITKEventObject (EventEnum e) |
|
template<typename T > |
static std::ostream & | ToStringHelper (std::ostream &os, const T &v) |
|
static std::ostream & | ToStringHelper (std::ostream &os, const char &v) |
|
static std::ostream & | ToStringHelper (std::ostream &os, const signed char &v) |
|
static std::ostream & | ToStringHelper (std::ostream &os, const unsigned char &v) |
|
std::vector<bool> itk::simple::PasteImageFilter::GetDestinationSkipAxes |
( |
| ) |
const |
|
inline |
Set/Get the array describing which axes in the destination image to skip
The axes with true values are set to 1, to fill the difference between the dimension of the input and source image. The number of true values in DestinationSkipAxes plus the DestinationImageDimension must equal the InputImageDimension.
By default this array contains SourceImageDimension false values followed by true values for the remainder.
Definition at line 149 of file sitkPasteImageFilter.h.
Self& itk::simple::PasteImageFilter::SetDestinationSkipAxes |
( |
std::vector< bool > |
DestinationSkipAxes | ) |
|
|
inline |
Set/Get the array describing which axes in the destination image to skip
The axes with true values are set to 1, to fill the difference between the dimension of the input and source image. The number of true value in DestinationSkipAxes plus the DestinationImageDimension must equal the InputImageDimension.
By default this array contains SourceImageDimension false values followed by true values for the remainder.
Definition at line 134 of file sitkPasteImageFilter.h.