I am developing a PyQGIS plugin using python. I facing a problem during the implementation of threading in my plugin. I have written a Python script which contains a class wrapping all geo-processing methods in use. The problem I am facing is processing the methods in threads. To give a better picture of my problem, I have a UI which calls the method
self.lst.calcNDVI(self.RedBand, self.NIRBand, None, self.outputRaster, self.sensorType, self.dataType, self.addToQGIS)
This function call, calls a calcNDVI() method which does all the magic and adds the result to a QGIS project. The method call is also associated with passing some arguments.
I have gone through many sources but I can't get to understand how I can implement my algorithms in a threaded way. The code I have come through implements everything in the run method which makes it difficult for me as I have more than one method to be processed in my class, and I would also like the user to be able to choose which method to be run through the UI.
I am processing Landsat datasets which take too much time to process.