Add input_spec declarations to dmri processing nodes#2
Draft
Conversation
Co-authored-by: markus-nilsson <17831339+markus-nilsson@users.noreply.github.com>
Co-authored-by: markus-nilsson <17831339+markus-nilsson@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] I recently implemented a way to specify expected inputs. See dp_node_segm_brats_prepare.m for an example. Inputs that should be declared are all input fields appearing in the i2o and execute methods. Please go trough all files in dmri and suggest an up...
Add input_spec declarations to dmri processing nodes
Sep 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements input_spec declarations for all applicable dmri processing nodes, following the pattern established in
dp_node_segm_brats_prepare.m. The input_spec system allows nodes to formally declare their expected input fields, improving documentation, validation, and user experience.Changes Made
Added
input_spec.add()declarations to 34 out of 43 dmri files, covering all nodes that process data inputs. Each declaration specifies:Example Implementation
Following the established pattern:
Coverage
All input fields appearing in
i2o(),execute(), andpo2i()methods are now properly declared across:Files Not Modified
9 files were intentionally left unchanged:
dp_node_dmri_topup,dp_node_dmri_disco) inherit specs from child nodesdp_node_dmri_preprocess_*) have no direct data inputsdp_node_dmri_topup_io) perform validation without processingdp_node_dmri_xps_force) force predefined parametersThis implementation ensures all input fields are properly documented and can be validated, improving the robustness and usability of the dmri processing pipeline.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.