ITK/Git/Develop/Data
This page documents how to add test data while developing ITK. See our table of contents for more information.
Workflow
Our workflow for adding data integrates with our standard Git development process. Start by creating a topic. Return here when you reach the "edit files" step.
Add Data
Copy the data file into your local source tree. | |
|
Add Test
Edit the test CMakeLists.txt file and reference the data file in an itk_add_test call.
Specify the file inside
|
Run CMake
Run cmake on the build tree:
|
||
During configuration CMake will display a message such as:
This means that CMake converted the file into a data object referenced by a "content link". |
Commit
Continue to create the topic and edit other files as necessary. Add the content link and commit it along with the other changes:
The local
This means that the pre-commit hook recognized that the content link references a new data object. The hook stores new objects in a local .ExternalData directory at the top of the source tree. It also adds them to the local Git repository in a location disjoint from the project history. |
Push
Follow the instructions to share the topic. When you push it to Gerrit for review using
part of the output will be of the form
This means that the git-gerrit-push script pushed the topic and uploaded the data it references. |