-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic operators #114
Comments
Current type model: One Operator has one input sequence of input types returns struct with fixed output types.
Types can be inherited. Not implemented is overloading or parametrization. |
Oky then we can use a basetype like vtkPointData as input type for an operator an pass e.g. vtkPolyData to that operator, when we define that vtkPolyData extends vtkPointData? Tha would be nice. How about the return type? Because such an operator would return vtkPolyData in a vtkPointData output type defintion and the next operator migh have only a vtkPolyData input type definition. |
Something I would target in MSML 2.0 |
I now have a similar problem. Would it be helpful to add an explicit conversion operator, for now? |
The idea is not to need an explicit conversion. A quick solution is to create an Operator with the identity function, but it is ugly:
Nevertheless, your programm should work, but give you an error message about the type mismatch. |
VTKReadPolyData and UnstructuredGrid are usually not easily convertable. For UnstructuredGrid -> VTKReadPolyData Vice versa: VTKReadPolyData -> UnstructuredGrid |
Okay, thanks to both of you! For downcasting, vtkPolyData is narrower than vtkUnstructuredGrid, right? Looking at this from an operator like CalculateSubdivisionSurface, it makes sense. |
I think these are very important points, maybe we can have a short discussion at the hackfest to make sure we have the same understanding of this topic and can answer the following questions: -How to implement Operators that only care for points in data (polyData and unstructuredGrids) But like areku, I would target the 2.0 for the actual implementation of discussed concepts. |
There are operators task that could be applied on different mesh types (e.g. polyData and unstructuredGrid). And there are vtk representations (e.g. point data) that could be used for passing in this datatypes.
Does this fit into our type concept? Should we add a point data type? For example: Can we merge https://github.com/CognitionGuidedSurgery/msml/blob/d1373c198c54b2d586c5027101f24b85464a959c/share/alphabet/msml_operators/misc/TransformSurfaceBarycentric.xml and https://github.com/CognitionGuidedSurgery/msml/blob/d1373c198c54b2d586c5027101f24b85464a959c/share/alphabet/msml_operators/misc/TransformMeshBarycentric.xml ?
The text was updated successfully, but these errors were encountered: