The CSV writer only saves point data. Do you have point data in your dataset or cell data ?
In my current data it just has Point data, but in some other mesh or dataset I can have cells.
Moreover, I am creating new vectors in my Force filter which are also missing from the CSV
Just for clarification after applying the appenDataSet filter I saved the data from the paraview for testing purposes and not from my C++ function (but eventually I would want that)
Yes, behavior will be the same
Any idea why my vector created in Force filters are missing from the CSV?
No idea, try saving the output of the calculator as a csv.
If I save MyFoce Filter output as CSV I can see vtkOriginalPointsIDs, Result:0, Result:1, Result:2, Points:0, Points:1, Points:2.
Ideally I want all the columns in my combined output CSV.
Then you have to combined your data into a single data containing all the columns.
How would I combine it into single data? In paraview or in my C++ logic?
If in C++ logic, is my basic logic which I shared as a code above correct way?
C++ or GUI is the same. Figure out how to do it in the GUI, then do the same in C++.
Makes sense, thank you!
I figured out that if I apply Append Dataset filter in the GUI and then save the append dataset as a vtu or vtk file I achieve what I am trying to do.
But I am not sure how I would do this in C++. I want to apply Append Dataset filter not in the GUI but in my C++ code one “Run Simulation” button is clicked.
pqObjectBuilder will let you create any filter you want.
- Do I need to first get the instance of my model in my runSimulation function and then access all the current filters/sources?
pqServerManagerModel* smModel = pqApplicationCore::instance()->getServerManagerModel(); QList<pqPipelineSource*> sources = smModel->findItems<pqPipelineSource*>(); vtkSMSession* activeSession = vtkSMSession::SafeDownCast(vtkSMProxyManager::GetProxyManager()->GetActiveSession());
- How can I choose filters (which are already applied in the GUI) on which I need to apply append dataset filter? In other words how to set the which datasets I want to combine using append dataset?
QMap< QString, QList< pqOutputPort *>> namedInputs,
Thank you for sharing this.
But how to create this Map in the function? I mean how would I access the filters I have already applied in the GUI?
Your code above
I see. I will give it a try.
How do I check the group and name of the filter (Append Dataset in my case) which is needed for the createFilter function?
all defined in the XML of ParaView:
Perfect, thank you!