using System;
namespace itk.simple.examples
{
class ImageGridManipulation
{
static void Main(string[] args)
{
if (args.Length < 2)
{
Console.WriteLine("Usage: {0} <input-1> <input-2>",
System.AppDomain.CurrentDomain.FriendlyName);
return;
}
Image image1 = SimpleITK.ReadImage(args[0]);
Image image2 = SimpleITK.ReadImage(args[1]);
Image composedImage = compose.
Execute(channel1Image, channel2Image, channel3Image);
VectorInt32 sliceStart = new VectorInt32(new int[] { 10, 10, 0 });
VectorInt32 sliceStop = new VectorInt32(new int[] { 40, 40, 1 });
Image slicedImage = SimpleITK.Slice(composedImage, sliceStart, sliceStop);
VectorUInt32 size = new VectorUInt32(new uint[] { 30, 30, 0 });
VectorInt32 index = new VectorInt32(new int[] { 10, 10, 0 });
VectorUInt32 lowerBoundary = new VectorUInt32(new uint[] { 10, 10, 0 });
VectorUInt32 upperBoundary = new VectorUInt32(new uint[] {
1
});
Console.WriteLine("Sliced image size: {0}x{1}x{2}",
slicedImage.GetWidth(), slicedImage.GetHeight(), slicedImage.GetDepth());
Console.WriteLine("Extracted image size: {0}x{1}x{2}",
Console.WriteLine("Cropped image size: {0}x{1}x{2}",
}
}
}
ComposeImageFilter combine several scalar images into a multicomponent image.
Image Execute(const std::vector< Image > &images)
Decrease the image size by cropping the image by an itk::Size at both the upper and lower bounds of t...
Image Execute(Image &&image1)
void SetUpperBoundaryCropSize(std::vector< unsigned int > UpperBoundaryCropSize)
void SetLowerBoundaryCropSize(std::vector< unsigned int > LowerBoundaryCropSize)
The Image class for SimpleITK.
unsigned int GetDepth() const
unsigned int GetHeight() const
unsigned int GetWidth() const
Join N-D images into an (N+1)-D image.
Image Execute(const std::vector< Image > &images)
Extracts the selected index of the vector that is the input pixel type.
Image Execute(Image &&image1)
void SetOutputPixelType(PixelIDValueEnum OutputPixelType)
Set the output pixel type of the scalar component to extract.
void SetIndex(unsigned int Index)
PixelIDValueEnum
Enumerated values of pixelIDs.