{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Create interfaces\n", "\n", "This section is meant for the more advanced user. In it we will discuss how you can create your own interface, i.e. wrapping your own code, so that you can use it with Nipype.\n", "\n", "In this notebook we will show you:\n", "\n", "1. Example of an already implemented interface\n", "2. What are the main parts of a Nipype interface?\n", "3. How to wrap a CommandLine interface?\n", "4. How to wrap a Python interface?\n", "5. How to wrap a MATLAB interface?\n", "\n", "But before we can start, let's recap again the difference between interfaces and workflows." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Interfaces vs. Workflows\n", "\n", "Interfaces are the building blocks that solve well-defined tasks. We solve more complex tasks by combining interfaces with workflows:\n", "\n", "
Interfaces | \n", "Workflows | \n", " \n", " \n", "
---|---|
Wrap *unitary* tasks | \n", "Wrap *meta*-tasks\n",
" | \n",
"
Keep track of the inputs and outputs, and check their expected types | \n", "Do not have inputs/outputs, but expose them from the interfaces wrapped inside | \n", "
Do not cache results (unless you use [interface caching](advanced_interfaces_caching.ipynb)) | \n", "Cache results | \n", "
Run by a nipype plugin | \n", "Run by a nipype plugin | \n", "