#include <stdlib.h>
#include <iostream>
int
main(int, char *[])
{
uint8_t * in = new uint8_t[100 * 100 * 100];
for (unsigned int i = 0; i < 100 * 100 * 100; ++i)
{
in[i] = i % 255;
}
importer.
SetOrigin(std::vector<double>(3, .123));
importer.
SetSize(std::vector<unsigned int>(3, 100));
for (unsigned int i = 0; i < 10; ++i)
{
std::cout << int(out[i]) << " ";
}
std::cout << std::endl;
return EXIT_SUCCESS;
}
The Image class for SimpleITK.
PixelIDValueEnum GetPixelID() const
uint8_t * GetBufferAsUInt8()
Get a pointer to the image buffer.
Compose a 2D or 3D image and return a smart pointer to a SimpleITK image.
Self & SetSpacing(const std::vector< double > &spacing)
Self & SetSize(const std::vector< unsigned int > &size)
Image Execute() override
Set/Get The output PixelType of the image.
Self & SetOrigin(const std::vector< double > &origin)
Self & SetBufferAsUInt8(uint8_t *buffer, unsigned int numberOfComponents=1)
void SITKIO_EXPORT Show(const Image &image, const std::string &title="", const bool debugOn=ProcessObject::GetGlobalDefaultDebug())
Image GrayscaleErode(const Image &image1, std::vector< unsigned int > kernelRadius=std::vector< uint32_t >(3, 1), KernelEnum kernelType=itk::simple::sitkBall)
Grayscale erosion of an image.