ITK  5.0.0
Insight Segmentation and Registration Toolkit
WikiExamples/SimpleOperations/RandomImageSource.cxx
#include "itkImage.h"
#include "QuickView.h"
int main(int, char *[])
{
using ImageType = itk::Image< unsigned char, 2 >;
size.Fill(10);
randomImageSource->SetNumberOfWorkUnits(1); // to produce non-random results
randomImageSource->SetSize(size);
randomImageSource->Update();
QuickView viewer;
viewer.AddImage(randomImageSource->GetOutput());
viewer.Visualize();
return EXIT_SUCCESS;
}