From 3bf34f6cc5e4e19abd04689ad9a1a119fe173f20 Mon Sep 17 00:00:00 2001 From: "Stephen R. Aylward" Date: Thu, 29 Jul 2021 16:33:12 -0400 Subject: [PATCH] BUG: SpatialObject writes object color The MetaSceneConverter code did not copy the SpatialObject's color to the metaObject being written. Color wasn't being copied from the SpatialObject to its Meta representation for writing. --- .../Core/SpatialObjects/include/itkMetaSceneConverter.hxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx index 8372fcf0008..17dc525c4dc 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx @@ -355,6 +355,11 @@ MetaSceneConverter::CreateMetaScene(Spatial currentMeta->ParentID((*it)->GetParent()->GetId()); } currentMeta->Name((*it)->GetProperty().GetName().c_str()); + currentMeta->Color((*it)->GetProperty().GetRed(), + (*it)->GetProperty().GetGreen(), + (*it)->GetProperty().GetBlue(), + (*it)->GetProperty().GetAlpha()); + this->SetTransform(currentMeta, (*it)->GetObjectToParentTransform()); metaScene->AddObject(currentMeta); it++;