I have the file that is being read and then is processed by several filters. However, I want to use the original file name in one of the consequent filters to dump some data to relevant file for debug purposes.
However, I am not able to do that.
Logically seems like information should be in vtkInformation
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.