17 #ifndef __itkMetaGroupConverter_txx
18 #define __itkMetaGroupConverter_txx
26 template <
unsigned int NDimensions>
35 template <
unsigned int NDimensions>
41 double spacing[NDimensions];
43 for(i=0; i<NDimensions; i++)
45 spacing[i] = group->ElementSpacing()[i];
47 spatialObject->GetIndexToObjectTransform()->SetScaleComponent(spacing);
48 spatialObject->GetProperty()->SetName(group->Name());
49 spatialObject->GetProperty()->SetRed(group->Color()[0]);
50 spatialObject->GetProperty()->SetGreen(group->Color()[1]);
51 spatialObject->GetProperty()->SetBlue(group->Color()[2]);
52 spatialObject->GetProperty()->SetAlpha(group->Color()[3]);
53 spatialObject->SetId(group->ID());
54 spatialObject->SetParentId(group->ParentID());
59 template <
unsigned int NDimensions>
64 MetaGroup* group =
new MetaGroup(NDimensions);
67 for(
unsigned int i=0;i<4;i++)
73 for(
unsigned int i=0;i<NDimensions;i++)
81 group->ParentID(spatialObject->
GetParent()->GetId());
83 group->ID(spatialObject->
GetId());
90 template <
unsigned int NDimensions>
96 MetaGroup* group =
new MetaGroup();
98 spatialObject = this->MetaGroupToGroupSpatialObject(group);
100 return spatialObject;
105 template <
unsigned int NDimensions>
110 MetaGroup* group = this->GroupSpatialObjectToMetaGroup(spatialObject);