View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002489VTK(No Category)public2005-11-15 08:102016-08-12 09:54
Reporterm.danilouchkine1 
Assigned ToWill Schroeder 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0002489: vtkAssignAttribute Assign problem
DescriptionWhen I tried to assign the scalar attributes to the vector using the Assign methods as follows:

vtkSmartPointer<vtkReassignAttribute> imgComp2Atrrib;
imgComp2Atrrib = vtkSmartPointer<vtkReassignAttribute>::New();
imgComp2Atrrib->SetInput(<and image with 3 scalar component>);
imgComp2Atrrib->Assign(vtkDataSetAttributes::SCALARS,
 vtkDataSetAttributes::VECTORS,
 vtkReassignAttribute::POINT_DATA);

It did not work out.

I fixed the problem by changing the RequestData procedure.

    if (this->FieldType == vtkReassignAttribute::NAME && this->FieldName)
      {
      ods->SetActiveAttribute(this->FieldName, this->AttributeType);
      }
    else if (this->FieldType == vtkReassignAttribute::ATTRIBUTE &&
             (this->InputAttributeType != -1))
      {
      // If labeling an attribute as another attribute, we
      // need to get it's index and call SetActiveAttribute()
      // with that index
      int attributeIndices[vtkDataSetAttributes::NUM_ATTRIBUTES];
      ods->GetAttributeIndices(attributeIndices);
      ods->SetActiveAttribute(attributeIndices[this->InputAttributeType],this->AttributeType);
      //vtkDataArray *oda = ods->GetAttribute(this->InputAttributeType);
      //if (oda)
      // {
      // ods->SetActiveAttribute(oda->GetName(),this->AttributeType);
      // }
      }
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0003839)
m.danilouchkine1 (reporter)
2006-03-07 08:14

The previous code should read:
vtkAssignAttribute instead of vtkReassignAttribute
(0036805)
Kitware Robot (administrator)
2016-08-12 09:54

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:54 Kitware Robot Note Added: 0036805
2016-08-12 09:54 Kitware Robot Status expired => closed
2016-08-12 09:54 Kitware Robot Resolution open => moved


Copyright © 2000 - 2018 MantisBT Team