OpenChemistry / tomviz

Cross platform, open source application for the processing, visualization, and analysis of 3D tomography data
https://tomviz.org/
BSD 3-Clause "New" or "Revised" License
325 stars 87 forks source link

Is there any docs for the python API? #2274

Closed RupertPaoZ closed 1 year ago

RupertPaoZ commented 1 year ago

hello, I am working with tomviz now and I want to process my data with the python API. But I couldn't find the docs for the python API. Actually, now I want to save the 'Volume' results in my pipeline, however the tomviz.io.Writer.write() seems not work.

psavery commented 1 year ago

Some of the Python docs are here. But I'm not sure if there's a way right now to write out a data source via the python API. If we had some way to access the vtkDataObject, we could definitely do that.

@cjh1 Do you know?

cjh1 commented 1 year ago

@psavery Yes, that is the only doc we have for the interactive Python interface. @RupertPaoZ Are you trying to write an operator or using the interactive Python interface to interact with the pipeline?

RupertPaoZ commented 1 year ago

@psavery Yes, that is the only doc we have for the interactive Python interface. @RupertPaoZ Are you trying to write an operator or using the interactive Python interface to interact with the pipeline?

yeah, I am trying to use the interactive Python interface to interact with the pipeline, since I have to deal with the data of hundreds of objects. So now the solution is to get access of the Volume data and then there will be some way to save it?

psavery commented 1 year ago

There is a tomviz-pipeline executable packaged with Tomviz that is designed to process data in batch. Have you looked into that?

The way it works is that you open Tomviz and perform all of the operations needed for a single dataset, then save that state file, and then you can use the tomviz-pipeline executable to run that state file and apply the same operators to many data files in batch.