After finding out how nicely the GDAL library is giving me the georeferencing not only of Geotiff files, but also other types of georeferencing (like ESRI world files), I was able to generate a filter like the “Texture Map to Plane”, but not taking coordinates as input, but the user is asked to specify a georeferenced image file. The filter uses internally the “Texture Map to Plane” to do it’s job.
With this, the user is then able to go to the “Display” section of the property panel and load the same file again as a texture.
But this is for a user not really intuitive: Why should he load the same file twice - once for defining the texture and then once again for the actual texturing?
I found some “plain VTK” example code that does the trick of applying first texture mapping to a quad, then also the texture - in one run: https://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/TextureMapQuad
There they use a vtkTexture object, a vtkPolyDataMapper and finally bring everything together with a vtkActor - but there I am lost how to apply this logic inside paraview and where I would have to put such kind of code: maybe not in the “RequestData” function of my filter code!? But where else!?
Any helpful hint or example?
Of course this “one step texturing” is the “nice to have” part of my job: the automatic extraction of texture coordinates from the image georeferencing is already the big achievement - and if it is not otherwise possible, I will have to explain the customers that they need to load the image twice - no matter if they find it intuitive or not…