The file name of a reader is not passed as vtkInformation
. You might be able to traverse your pipeline back to the source from the current filter with something like
vtkAlgorithm* input = this;
vtkAlgorithmOutput* conn = nullptr;
do
{
conn = input->GetInputConnection(0,0);
if (conn)
{
input = conn->GetProducer();
}
} while (conn);
the cast the final vtkAlgorthm
to the reader type and access the FileName
member from it.