[vtkusers] Is it possible...
Jean M. Favre
jfavre at cscs.ch
Fri Jan 31 04:47:01 EST 2003
John David Fleig wrote:
>
> Do the VtkImageData types have the capability of storing say... a
> description? or the original image filename?
You can do it just like any other data values. I have started using it
because ParaView likes it for its Extract Parts filter.
>From the vtkMultiOut3.cxx code:
image = static_cast<vtkImageData*>(this->GetOutput(0));
// Now name the first output.
vtkCharArray *nameArray = vtkCharArray::New();
nameArray->SetName("Name");
char *str = nameArray->WritePointer(0, 20);
sprintf(str, "Mandelbrot left"); // put your filename here
image->GetFieldData()->AddArray(nameArray);
nameArray->Delete();
--
Dr. Jean M. Favre, email:favre at cscs.ch
http://www.cscs.ch/people/Favre.html
CSCS, Swiss Center for Scientific Computing | Tel: +41 (91) 610.82.40
Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
More information about the vtkusers
mailing list