Background
MeshReadNode (graph layer) exposes both a plural images output port (the canonical texture output, a std::vector<cv::Mat> indexed by UV chart) and a singular image output port. As of #21, image is an explicitly-documented stopgap scalar convenience, backed by a getter lambda that returns images[0] (or an empty cv::Mat when the mesh has no textures).
It exists only because some downstream single-image consumers can't yet accept the image vector directly. Its only consumer today is Register.cpp (the 2D→3D fixed image), which feeds a registration subgraph that is scalar all the way through (LandmarkDetectorNode, ImageResampleNode, DeformableRegistrationNode, TransformUVMapNode — all take InputPort<cv::Mat>).
Goal
Remove the image port so the reader's output contract is purely plural (images), and let each consumer decide its own arity at its input boundary.
Approach
smgl input ports can be lambda-/callback-backed (see ReorderTextureNode::imagesIn wiring ReorderUnorganizedTexture::setTextureMats, and MeshWriteNode's image/imageSource ports), so a consumer that only needs one texture can accept the plural std::vector<cv::Mat> and collapse to [0] internally. The registration fan-out makes this non-trivial: results["fixedImage"] is a single OutputPort<cv::Mat>* shared across the 2D→3D and 2D→2D branches and wired into several scalar input ports. Bridging the plural reader to that fan-out likely wants a small reusable adapter node (plural lambda-backed input + index → scalar image output), rather than pushing vectors through the (inherently single-image) registration nodes.
Done when
MeshReadNode.image (and its getter lambda) is removed; images is the only texture output.
Register.cpp and any other single-image consumers are migrated (via a select/index adapter or plural-accepting input ports).
- Build + tests pass.
Follow-up to #21.
Background
MeshReadNode(graph layer) exposes both a pluralimagesoutput port (the canonical texture output, astd::vector<cv::Mat>indexed by UV chart) and a singularimageoutput port. As of #21,imageis an explicitly-documented stopgap scalar convenience, backed by a getter lambda that returnsimages[0](or an emptycv::Matwhen the mesh has no textures).It exists only because some downstream single-image consumers can't yet accept the image vector directly. Its only consumer today is
Register.cpp(the 2D→3D fixed image), which feeds a registration subgraph that is scalar all the way through (LandmarkDetectorNode,ImageResampleNode,DeformableRegistrationNode,TransformUVMapNode— all takeInputPort<cv::Mat>).Goal
Remove the
imageport so the reader's output contract is purely plural (images), and let each consumer decide its own arity at its input boundary.Approach
smgl input ports can be lambda-/callback-backed (see
ReorderTextureNode::imagesInwiringReorderUnorganizedTexture::setTextureMats, andMeshWriteNode'simage/imageSourceports), so a consumer that only needs one texture can accept the pluralstd::vector<cv::Mat>and collapse to[0]internally. The registration fan-out makes this non-trivial:results["fixedImage"]is a singleOutputPort<cv::Mat>*shared across the 2D→3D and 2D→2D branches and wired into several scalar input ports. Bridging the plural reader to that fan-out likely wants a small reusable adapter node (plural lambda-backed input + index → scalarimageoutput), rather than pushing vectors through the (inherently single-image) registration nodes.Done when
MeshReadNode.image(and its getter lambda) is removed;imagesis the only texture output.Register.cppand any other single-image consumers are migrated (via a select/index adapter or plural-accepting input ports).Follow-up to #21.