[vtkusers] error in vtkDataSetAttributes.h ?

verena kinder verena.kinder at web.de
Thu Apr 21 06:16:56 EDT 2005


Hello!
 I try to write an unsignedInt array into imagedata.
	
	vtkUnsignedIntArray *array =vtkUnsignedIntArray::New();
 	array->SetArray(data,w*h*d,1);
 	vtkImageData * str =vtkImageData ::New();
	str->SetScalarType(VTK_UNSIGNED_INT);
 	str->GetPointData()->SetScalars(array);
 	str->SetDimensions(w,h,d);
	str->SetSpacing(1.0,1.0,1.0); 	
	str->SetOrigin(0.0,0.0,0.0);

When call make I get an error: "Don't know SetScalars" --
so I include "vtkDatasetAttributes.h" because the SetSyalars() function contains to that class.
But then I get many errors concerning the class "vtkDataSetAttributes.h".
	/home/VTK/Common/vtkDataSetAttributes.h:337: error: parse error before numeric
   constant
/home/VTK/Common/vtkDataSetAttributes.h:340: error: missing ';' before right
   brace
/home/VTK/Common/vtkDataSetAttributes.h:347: error: `FieldList' is not a member
   of type `vtkDataSetAttributes'
/home/VTK/Common/vtkDataSetAttributes.h:347: error: `list' was not declared in
   this scope
/home/VTK/Common/vtkDataSetAttributes.h:347: error: parse error before `='
   token
/home/VTK/Common/vtkDataSetAttributes.h:355: error: `FieldList' is not a member
   of type `vtkDataSetAttributes'
/home/VTK/Common/vtkDataSetAttributes.h:355: error: `list' was not declared in
   this scope
/home/VTK/Common/vtkDataSetAttributes.h:356: error: parse error before `*'
   token
/home/VTK/Common/vtkDataSetAttributes.h:359: error: no type named `FieldList'
   in `class vtkDataSetAttributes'
/home/VTK/Common/vtkDataSetAttributes.h:359: error: `friend' can only be
   specified inside a class
/home/VTK/Common/vtkDataSetAttributes.h:362: error: parse error before `
   protected'
/home/VTK/Common/vtkDataSetAttributes.h:364: error: destructors must be member
   functions
/home/VTK/Common/vtkDataSetAttributes.h:376: error: virtual outside class
   declaration
/home/VTK/Common/vtkDataSetAttributes.h:378: error: `NUM_ATTRIBUTES' was not
   declared in this scope
/home/VTK/Common/vtkDataSetAttributes.h:379: error: `NUM_ATTRIBUTES' was not
   declared in this scope
/home/VTK/Common/vtkDataSetAttributes.h:387: error: virtual outside class
   declaration
/home/VTK/Common/vtkDataSetAttributes.h:389: error: `NUM_ATTRIBUTES' was not
   declared in this scope
/home/VTK/Common/vtkDataSetAttributes.h:390: error: `NUM_ATTRIBUTES' was not
   declared in this scope
/home/VTK/Common/vtkDataSetAttributes.h:391: error: `NUM_ATTRIBUTES' was not
   declared in this scope
/home/VTK/Common/vtkDataSetAttributes.h:393: error: parse error before `private
   '
/home/VTK/Common/vtkDataSetAttributes.h:398: error: `pd' was not declared in
   this scope
/home/VTK/Common/vtkDataSetAttributes.h:400: error: parse error before `private
   '
/home/VTK/Common/vtkDataSetAttributes.h:402: error: parse error before `&'
   token
/home/VTK/Common/vtkDataSetAttributes.h:402: error: `void operator=(...)' must
   be a nonstatic member function
/home/VTK/Common/vtkDataSetAttributes.h:402: error: `void operator=(...)' must
   take exactly two arguments
/home/VTK/Common/vtkDataSetAttributes.h:412: error: destructors must be member
   functions
/home/VTK/Common/vtkDataSetAttributes.h:414: error: `dsa' was not declared in
   this scope
/home/VTK/Common/vtkDataSetAttributes.h:414: error: variable or field `
   InitializeFieldList' declared void
/home/VTK/Common/vtkDataSetAttributes.h:415: error: `dsa' was not declared in
   this scope
/home/VTK/Common/vtkDataSetAttributes.h:415: error: variable or field `
   IntersectFieldList' declared void
/home/VTK/Common/vtkDataSetAttributes.h: In function `int GetNumberOfFields()':
/home/VTK/Common/vtkDataSetAttributes.h:421: error: invalid use of `this' in
   non-member function
/home/VTK/Common/vtkDataSetAttributes.h: In function `int GetFieldIndex(int)':
/home/VTK/Common/vtkDataSetAttributes.h:422: error: invalid use of `this' in
   non-member function
/home/VTK/Common/vtkDataSetAttributes.h: In function `int GetDSAIndex(int, int)
   ':
/home/VTK/Common/vtkDataSetAttributes.h:423: error: invalid use of `this' in
   non-member function
/home/VTK/Common/vtkDataSetAttributes.h: At global scope:
/home/VTK/Common/vtkDataSetAttributes.h:425: error: `friend' can only be
   specified inside a class
/home/VTK/Common/vtkDataSetAttributes.h:427: error: parse error before `
   protected'
/home/VTK/Common/vtkDataSetAttributes.h:429: error: parse error before `&'
   token
/home/VTK/Common/vtkDataSetAttributes.h:429: error: `void operator=(...)' must
   be a nonstatic member function
/home/VTK/Common/vtkDataSetAttributes.h:429: error: `void operator=(...)' must
   take exactly two arguments
/home/VTK/Common/vtkDataSetAttributes.h:431: error: parse error before `private
   '
/home/VTK/Common/vtkDataSetAttributes.h:456: error: parse error before `}'
   token
/home/praktikum/programme/komplett/MR/Visualization/VTK_CODE/MAIN/test.cxx: In
   function `int main(int, char**)':
/home/praktikum/programme/komplett/MR/Visualization/VTK_CODE/MAIN/test.cxx:54: error: `
   SetScalars' undeclared (first use this function)
/home/praktikum/programme/komplett/MR/Visualization/VTK_CODE/MAIN/test.cxx:54: error: (Each
   undeclared identifier is reported only once for each function it appears
   in.)


Thanks for help

verena




______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193




More information about the vtkusers mailing list