static void
int
main()
{
CreateImage(image);
itk::EncapsulateMetaData<float>(dictionary, "ASimpleFloat", 1.2);
image->SetMetaDataDictionary(dictionary);
dictionary.
Print(std::cout);
auto itr = dictionary.
Begin();
while (itr != dictionary.
End())
{
std::cout << "Key = " << itr->first << std::endl;
std::cout << "Value = ";
itr->second->Print(std::cout);
std::cout << std::endl;
++itr;
}
writer->SetFileName("test.mhd");
writer->SetInput(image);
writer->Update();
reader->SetFileName("test.mhd");
std::cout << "Data read from file:" << std::endl;
reader->GetMetaDataDictionary().Print(std::cout);
return EXIT_SUCCESS;
}
void
{
region.SetIndex(start);
image->SetRegions(region);
image->Allocate();
while (!imageIterator.IsAtEnd())
{
++imageIterator;
}
}