int
main(int, char *[])
{
random->SetMin(0.0);
random->SetMax(1000.0);
using SpacingValueType = FloatImage2DType::SpacingValueType;
using PointValueType = FloatImage2DType::PointValueType;
random->SetSize(size);
SpacingValueType spacing[2] = { 0.7, 2.1 };
random->SetSpacing(spacing);
PointValueType origin[2] = { 15, 400 };
random->SetOrigin(origin);
CasterType::Pointer caster = CasterType::New();
caster->SetInput(random->GetOutput());
caster->Update();
SampleType::Pointer sample = SampleType::New();
sample->SetImage(caster->GetOutput());
SampleType::Iterator iter = sample->Begin();
while (iter != sample->End())
{
std::cout << iter.GetMeasurementVector() << std::endl;
++iter;
}
return EXIT_SUCCESS;
}