Format integration and I/O factories
Format integration separates the common I/O contract from the code that understands one file format. Image, mesh, and transform readers and writers use this boundary to select a format at run time while keeping data-flow code independent of the format set. See Image and transform I/O for the larger I/O flow, Image data representation for the in-memory image model, and Mesh and spatial objects for mesh data. Module declaration and dependencies explains how optional format modules reach an application.
I/O interface families
Each I/O family defines a base interface for one kind of data and lets format adapters provide the file-specific behavior. The reader or writer works with the base type. The adapter reports whether it can handle a path and then transfers data through that contract.
| Data kind | Base interface | Runtime factory | Typical format role |
|---|---|---|---|
| Medical and general images | ImageIOBase | ImageIOFactory | Volumes, slices, and image metadata |
| Raster images | ImageIOBase | ImageIOFactory | Formats such as PNG and JPEG use the same image contract |
| Meshes | MeshIOBase | MeshIOFactory | Points, cells, and mesh metadata |
| Transforms | TransformIOBaseTemplate<TParametersValueType> | TransformIOFactoryTemplate<TParametersValueType> | Transform lists and their parameters |
The image and mesh interfaces cover both reading and writing. The transform interface also carries the list of transforms produced by a read or consumed by a write. This common shape lets higher-level file readers and writers choose an adapter without knowing its format.
References: Modules/…/itkImageIOBase.h• L50-67 Modules/…/itkMeshIOBase.h• L46-61 Modules/…/itkTransformIOBase.h• L43-53
Format adapters
A format adapter is the concrete I/O service for one format. It implements the base interface and answers two key questions: whether it can read a path and whether it can write a path. The adapter then performs the format-specific transfer and exposes the metadata needed by the data pipeline.
Format modules serve different parts of the same product space. Medical-image adapters handle clinical or scientific image formats. Raster adapters handle common two-dimensional image files. Mesh adapters handle surface and geometry files. Transform adapters handle saved spatial mappings. The base interfaces keep these roles separate even when a third-party library supports more than one kind of file.
PNGImageIO illustrates the adapter boundary for a raster format. It recognizes PNG content by its file signature for reads and accepts .png or .PNG names for writes. It maps two-dimensional grayscale, gray-alpha, RGB, RGBA, and palette images with unsigned 8-bit or 16-bit samples into the common image contract. Palette input can remain indexed or expand to RGB, transparency can become alpha, and pixel spacing can travel through PNG scale information. Writing accepts one to four supported components and selects the matching PNG color form.
TIFFImageIO provides the same read and write boundary for TIFF images. Its multi-page behavior treats primary pages as image slices, keeps their geometry and sample format consistent, and separates image metadata from storage-layout data. Its tests also cover native strip and tile reads, palette and color samples, and the point at which unsupported codecs fail.
GE5ImageIO is a read-only medical-image adapter for GE Signa 5.x files. Its read probe checks the file and its GE header content instead of relying only on a suffix. It maps header geometry, orientation, and slice position into the image model so a series can form a correctly oriented volume.
MINCImageIO is a read/write medical-image adapter for regularly sampled MINC volumes. It maps spatial axes, an optional time axis, and vector components into the image contract. It also carries coordinate orientation, scaling, storage type, history, and supported MINC attributes through image metadata.
GDCMImageIO illustrates a DICOM adapter that supports both directions. It recognizes DICOM content for reading and .dcm or .dicom names for writing. During a read, it turns DICOM pixel data, geometry, and tags into the image model. During a write, it maps image metadata and pixels back to DICOM.
HDF5ImageIO illustrates a structured image adapter that supports both read and write selection. It accepts several HDF5-related output suffixes, then confirms that an input is an HDF5 file with the expected ITK image group before it claims the path. Its file contract carries image geometry, voxel type, voxel data, and supported metadata. HDF5 access is kept safe for the adapter's shared library use while image regions can still be read and written through the common contract.
NiftiImageIO is a read/write medical-image adapter for NIfTI and compatible Analyze files. It identifies input from the file structure and applies the configured policy for legacy Analyze files. It maps dimensions, component and pixel types, spatial orientation, units, metadata, and scale values into the image model. It also handles the layout differences for vector and tensor pixels when data moves between NIfTI and ITK.
StimulateImageIO is a read/write medical-image adapter for Stimulate .spr headers and their binary .sdt data. The header describes the dimensions, origin, spacing, and data type. The adapter uses the explicit data-file name when present and otherwise follows the format's related-file naming convention. It supports one through four dimensions for reading, writes two through four dimensions, and treats the stored samples as big-endian.
SWCMeshIO illustrates the mesh side of the same boundary. It reads and writes neuron morphology in SWC files through MeshIOBase. Its format contract carries points, parent links, header text, and selected point data.
Transform adapters use the same boundary for different on-disk representations. TxtTransformIOTemplate reads and writes .txt and .tfm files as ordered transform records, and can expand component files for a composite transform. MatlabTransformIOTemplate reads and writes .mat files as transform parameter and fixed-parameter vectors. Both adapters support the float and double parameter forms used by the transform factory.
References: Modules/…/itkPNGImageIO.cxx• L79-129 Modules/…/itkPNGImageIO.cxx• L275-304 Modules/…/itkPNGImageIO.cxx• L325-501 Modules/…/itkPNGImageIO.cxx• L503-705 Modules/…/itkTIFFImageIO.h• L31-45 Modules/…/itkTIFFImageIO.cxx• L35-55 Modules/…/itkTIFFImageIO.cxx• L348-563 Modules/…/itkTIFFImageIOGTest.cxx• L126-243 Modules/…/itkTIFFImageIOGTest.cxx• L786-845 Modules/…/itkTIFFImageIOGTest.cxx• L1093-1161 Modules/…/itkGE5ImageIO.h• L41-51 Modules/…/itkGE5ImageIO.cxx• L40-115 Modules/…/itkGE5ImageIO.cxx• L165-225 Modules/…/itkGE5ImageIO.cxx• L459-539 Modules/…/itkMINCImageIO.h• L44-71 Modules/…/itkMINCImageIO.cxx• L171-181 Modules/…/itkMINCImageIO.cxx• L321-355 Modules/…/itkMINCImageIO.cxx• L372-455 Modules/…/itkMINCImageIO.cxx• L512-655 Modules/…/itkMINCImageIO.cxx• L993-1057 Modules/…/itkMINCImageIO.cxx• L1444-1557 Modules/…/itkGDCMImageIO.h• L64-114 Modules/…/itkGDCMImageIO.cxx• L195-262 Modules/…/itkHDF5ImageIO.h• L47-90 Modules/…/itkHDF5ImageIO.cxx• L41-55 Modules/…/itkHDF5ImageIO.cxx• L619-671 Modules/…/itkHDF5ImageIO.cxx• L704-815 Modules/…/itkHDF5ImageIO.cxx• L1171-1505 Modules/…/itkNiftiImageIO.cxx• L173-224 Modules/…/itkNiftiImageIO.cxx• L618-653 Modules/…/itkNiftiImageIO.cxx• L789-858 Modules/…/itkNiftiImageIO.cxx• L1022-1153 Modules/…/itkStimulateImageIO.cxx• L36-100 Modules/…/itkStimulateImageIO.cxx• L102-183 Modules/…/itkStimulateImageIO.cxx• L185-482 Modules/…/itkStimulateImageIO.cxx• L492-611 Modules/…/itkMeshIOBase.h• L73-109 Modules/…/itkSWCMeshIO.h• L56-64 Modules/…/itkSWCMeshIO.cxx• L47-89 Modules/…/itkTxtTransformIO.cxx• L31-57 Modules/…/itkTxtTransformIO.cxx• L83-108 Modules/…/itkTxtTransformIO.cxx• L112-234 Modules/…/itkTxtTransformIO.cxx• L253-310 Modules/…/itkMatlabTransformIO.cxx• L27-45 Modules/…/itkMatlabTransformIO.cxx• L80-126 Modules/…/itkMatlabTransformIO.cxx• L128-147
Factory registration
An I/O factory connects a format adapter to the shared object-factory registry. The registry is the run-time list of factories that can create objects for a named base interface. Registration declares that relationship and provides a way to construct the adapter later.
The Scanco image format follows this same registration path. ScancoImageIOFactory is an object-factory class whose RegisterOneFactory() method creates a factory instance and sends it to the shared registry. This gives run-time image selection a way to create the Scanco I/O object when its module is available.
ITK supports two registration paths:
- Static registration generates a registration manager from the formats enabled by the build. The resulting factories become available when the related module is linked.
- Dynamic registration loads factory libraries from
ITK_AUTOLOAD_PATH. A library must export the configured load entry point so the object-factory system can obtain and register its factory.
Registration order matters because object creation and candidate probing use factory order. The registry also avoids duplicate library loads and checks the factory's ITK source version. Strict version checking can turn a version mismatch into an error instead of a warning.
The module declaration is part of this path. A compiled adapter is not enough if its module is not linked or loaded, or if its factory registers under the wrong base interface. Optional image and mesh formats therefore depend on both module availability and successful factory registration. The Stimulate module declares an image-base dependency and exposes ImageIO::Stimulate as its factory name, which makes its adapter available through image selection when the module is included.
References: CMake/ITKFactoryRegistration.cmake• L5-34 CMake/ITKFactoryRegistration.cmake• L71-114 CMake/ITKFactoryRegistration.cmake• L239-299 Modules/…/itkObjectFactoryBase.h• L40-56 Modules/…/itkObjectFactoryBase.h• L74-105 Modules/…/itkObjectFactoryBase.cxx• L188-243 Modules/…/itkObjectFactoryBase.cxx• L477-595 Modules/…/itk-module.cmake• L1-14 Modules/…/itk-module.cmake• L11-25 Modules/…/itkSWCMeshIOFactory.cxx• L31-59 Modules/…/itk-module.cmake• L8-18 Modules/…/itkScancoImageIOFactory.h• L22-62 Modules/…/itkFileFreeImageIOFactory.cxx• L25-55 Modules/…/CMakeLists.txt• L933-966
Runtime format selection
Runtime selection starts when a reader or writer needs an I/O object and has not received one directly. The family factory asks the registry for candidates, then probes each candidate in the requested mode. A successful CanReadFile or CanWriteFile result selects the adapter that claims the path.
The image factory gives extension matches priority. It first probes adapters whose advertised extension fits the path, then probes the remaining adapters so a format with no useful extension can still identify the file. Read and write probes remain separate. A read-only adapter must not become an automatic output choice.
Image adapters may use stronger content checks than suffix checks. PNG checks its file signature when reading, while its write probe uses supported .png names. TIFF checks its file structure. DICOM checks for a marker or a valid no-preamble structure. HDF5 checks the file signature and expected ITK image group. NIfTI checks its file structure and applies its Analyze compatibility policy. GE checks its header content. MINC uses its supported suffixes. Stimulate requires a .spr name and a header line that identifies Stimulate fields. These rules let selection reject unrelated files while still accepting valid files with unusual names when the format can identify them.
Mesh and transform factories use the same broad contract. Their probing follows registered candidate order. Text transform selection accepts .txt and .tfm paths, while Matlab transform selection accepts .mat paths. Transform selection is type-aware because the factory is templated on the transform parameter value type. The default public alias uses double, with float also supported. Composite transforms use the same type-aware boundary: their outer transform and ordered component list are flattened for file I/O and rebuilt for the supported dimensions from two through nine.
This diagram shows how a path becomes a selected adapter and then serves the higher-level file operation.
flowchart LR
A[File reader or writer] --> B[Family factory]
B --> C[Registered I/O candidates]
C --> D{Read or write probe}
D -->|Can handle path| E[Selected format adapter]
D -->|No candidate| F[Selection failure]
E --> G[Image, mesh, or transform transfer]
References: Modules/…/itkImageIOFactory.h• L27-62 Modules/…/itkImageIOFactory.cxx• L29-109 Modules/…/itkPNGImageIO.cxx• L79-129 Modules/…/itkPNGImageIO.cxx• L503-514 Modules/…/itkMINCImageIO.cxx• L171-181 Modules/…/itkMINCImageIO.cxx• L977-987 Modules/…/itkGE5ImageIO.cxx• L40-115 Modules/…/itkTIFFImageIO.cxx• L35-55 Modules/…/itkTIFFImageIOGTest.cxx• L570-608 Modules/…/itkStimulateImageIO.cxx• L56-100 Modules/…/itkStimulateImageIO.cxx• L492-512 Modules/…/itkMeshIOFactory.h• L27-71 Modules/…/itkMeshIOFactory.cxx• L29-66 Modules/…/itkTransformIOFactory.h• L33-69 Modules/…/itkTransformIOFactory.cxx• L30-54 Modules/…/itkCompositeTransformIOHelper.cxx• L37-74 Modules/…/itkTxtTransformIO.cxx• L39-56 Modules/…/itkMatlabTransformIO.cxx• L35-45 Modules/…/itkObjectFactoryBase.cxx• L192-220
Reader and writer control
Readers and writers normally obtain their I/O object through the family factory. They also allow a caller to set an I/O object directly when a path has an unusual suffix, has no useful suffix, or needs a deliberate format choice. This override is the escape path when runtime selection cannot infer the format.
The selected object remains the format boundary for the rest of the operation. Image readers and writers use ImageIOBase. Mesh readers and writers use MeshIOBase. Transform readers and writers use the matching transform I/O template. Changing the selected format therefore does not require changing the surrounding data pipeline.
An image reader also turns the selected adapter's file description into the output image's size, spacing, origin, direction, components, and metadata. When the file has more dimensions than the requested output image, the reader collapses the trailing axes by an explicit strategy. The default uses identity direction, while submatrix and guessed direction modes let the caller preserve spatial direction when the source has extra axes. The same strategy is used by extraction workflows so the resulting physical coordinates stay aligned.
References: Modules/…/itkImageFileReader.h• L35-61 Modules/…/itkImageFileReader.h• L104-158 Modules/…/itkImageFileReader.hxx• L94-277 Modules/…/itkImageFileReader.hxx• L314-370 Modules/…/itkImageFileWriter.h• L115-142 Modules/…/itkTransformFileReader.cxx• L81-107 Modules/…/itkTransformFileWriterSpecializations.cxx• L115-134 Modules/…/itkImageFileReaderGTest1.cxx• L164-230 Modules/…/itkImageFileReaderGTest1.cxx• L232-269
Medical-image series preparation
Some medical-image workflows need a list of files before an image reader can load a volume. GDCMSeriesFileNames prepares that list by scanning a directory, grouping image files into series, and ordering the files by their physical slice position.
The default grouping uses the DICOM Series Instance UID. Applications can request more detail or add DICOM tag restrictions when one UID contains multiple volumes. Geometric order is the trusted path. If duplicate positions or inconsistent orientation make that order impossible, the default behavior raises an error. A compatibility mode can use instance numbers or file names instead and marks that ambiguous ordering was used.
This service prepares input paths; it does not replace the image I/O factory. The resulting list is passed to the DICOM image reader, which still uses the normal image I/O contract.
References: Modules/…/itkGDCMSeriesFileNames.h• L31-53 Modules/…/itkGDCMSeriesFileNames.h• L147-190 Modules/…/itkGDCMSeriesFileNames.cxx• L112-206 Modules/…/itkGDCMSeriesFileNames.cxx• L208-274
Format availability
Format support is available only when the relevant adapter and its factory are part of the run-time registry. The base family can exist without any usable format adapter, and a build can include one family while leaving another optional format out.
For a new or optional format, the important contract is:
- The adapter derives from the correct base interface.
- Its factory registers that adapter under the correct base type.
- The module is linked or loaded so registration occurs.
- The adapter accepts the intended read and write paths.
When no candidate claims a path, the operation cannot create an I/O object. Transform readers and writers make this distinction explicit by reporting whether factories were absent or whether registered factories rejected the path. The same distinction is useful when diagnosing image and mesh selection problems.
The changed format integrations reinforce that availability also depends on the format's data contract. HDF5 input must have a valid HDF5 signature and the expected ITK image group. Its image description must contain consistent direction, origin, spacing, dimensions, voxel data, and supported metadata. NIfTI input must be recognized as NIfTI or as an allowed Analyze file. Its dimensions, intent, component type, orientation, and scale rules must map to the image contract. Text transform input must use the supported .txt or .tfm form and provide complete transform records. Matlab transform input must contain paired parameter vectors that the selected transform can use. PNG input must have a valid PNG signature and decodable image data, while PNG output must use a supported name, component type, and component count. GE input must contain a recognizable GE header. MINC input must expose supported regular dimensions and data classes. Stimulate input must contain a recognized header with valid dimensions and required values, and its associated binary data must provide the expected number of big-endian bytes. Stimulate output must use a supported .spr name and a writable two-, three-, or four-dimensional image. TIFF can describe a file before pixel decode, but a missing codec or corrupt tile fails when the pixels are read. Multi-page TIFF input must keep one image shape and sample contract across its primary pages.
Image reader availability also depends on a valid image description after selection. A file can be recognized by an adapter but still fail when its dimensions, component count, or direction cannot map to the requested output image. For a file with more axes than the output type, the chosen direction-collapse strategy must be valid for the source direction matrix.
References: Modules/…/itkTransformFileReader.cxx• L90-125 Modules/…/itkTransformFileWriterSpecializations.cxx• L128-153 Modules/…/itkImageIOFactory.cxx• L59-109 Modules/…/itkImageFileReader.h• L126-158 Modules/…/itkImageFileReader.hxx• L162-277 Modules/…/itkHDF5ImageIO.cxx• L619-671 Modules/…/itkHDF5ImageIO.cxx• L704-815 Modules/…/itkHDF5ImageIO.cxx• L1171-1505 Modules/…/itkNiftiImageIO.cxx• L218-224 Modules/…/itkNiftiImageIO.cxx• L635-653 Modules/…/itkNiftiImageIO.cxx• L789-858 Modules/…/itkNiftiImageIO.cxx• L1022-1153 Modules/…/itkTxtTransformIO.cxx• L39-57 Modules/…/itkTxtTransformIO.cxx• L112-234 Modules/…/itkTxtTransformIO.cxx• L253-310 Modules/…/itkMatlabTransformIO.cxx• L35-45 Modules/…/itkMatlabTransformIO.cxx• L80-147 Modules/…/itkPNGImageIO.cxx• L79-129 Modules/…/itkPNGImageIO.cxx• L503-547 Modules/…/itkPNGImageIO.cxx• L559-705 Modules/…/itkGE5ImageIO.cxx• L40-115 Modules/…/itkMINCImageIO.cxx• L372-455 Modules/…/itkMINCImageIO.cxx• L512-779 Modules/…/itkStimulateImageIO.cxx• L185-482 Modules/…/itkStimulateImageIO.cxx• L516-611 Modules/…/itkStimulateImageIOGTest.cxx• L62-99 Modules/…/itkStimulateImageIOInvalidHeaderTest.cxx• L27-56 Modules/…/itkTIFFImageIOGTest.cxx• L210-312 Modules/…/itkTIFFImageIOGTest.cxx• L570-608 Modules/…/itkTIFFImageIOGTest.cxx• L1093-1125 Modules/…/itkImageFileReaderGTest1.cxx• L164-230
Change checklist
When these files or sections are changed, remember to consider these:
- A change to an adapter's accepted suffixes or content checks changes automatic read selection and write selection.
- A new optional format must be available through the module's link or load path before selection starts.
- A factory registration target must match the adapter's base interface.
- An image factory's registration entry point must continue to create the factory and pass it to the shared object-factory registry.
- A change to static format inputs or dynamic factory loading can change registration order and selection priority.
- Read-only and read/write capability must remain distinct so output selection does not choose an adapter that cannot write.
- A transform I/O change must preserve the supported parameter value types across the templated factory and registered adapters.
- Composite transform serialization must preserve the outer transform and the ordered component list for every supported dimension.
- A direct I/O override must remain valid for unusual names because it bypasses automatic format inference.
- A reader change that maps extra file axes to a lower-dimensional output must preserve the direction-collapse choices and their physical-coordinate contract.
- A direction-collapse strategy change must remain aligned with the extraction behavior that users expect for the same source direction matrix.
- A PNG recognition or sample-mapping change must keep read signature checks, write extension checks, supported component types, and palette or alpha behavior aligned.
- An HDF5 recognition or storage change must keep the ITK image group, geometry, voxel layout, metadata types, and safe shared-library access aligned.
- A NIfTI change must preserve file-type recognition, Analyze policy, orientation and unit conversion, vector or tensor layout, and scale handling.
- A text transform change must preserve .txt and
.tfmselection, transform ordering, parameter pairing, and composite component-file behavior. - A Matlab transform change must preserve
.matselection and the pairing of parameter and fixed-parameter vectors for both supported precisions. - A GE geometry change must preserve the conversion from scanner coordinates to the image coordinate system and the order of series slices.
- A MINC dimension, component, scaling, orientation, or metadata change must preserve the mapping between the MINC volume and the image contract.
- A Stimulate header or sidecar-file change must keep recognition, dimension and type mapping, endianness, and the
.spr/.sdtrelationship consistent. - A TIFF page or sample change must preserve primary-page packing, uniform volume geometry, component strides, and the split between metadata inspection and pixel decode.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| No factory for the needed format is registered | The family factory returns no I/O object and the reader or writer cannot start | Link or load the format module and confirm its factory registration |
| A factory registers under the wrong base interface | The adapter is invisible to image, mesh, or transform selection | Match the registration target to the adapter's base type |
| A read-only adapter is selected for output | Reading works but automatic writing fails | Keep read and write probes separate and use a writable adapter |
| A path has an unsupported or misleading suffix | Automatic selection finds no adapter or probes the wrong candidate | Use a supported suffix or set the matching I/O object directly |
| An HDF5 path is not an HDF5 file or lacks the ITK image group | The HDF5 adapter rejects the path | Preserve the expected HDF5 signature and ITK image structure |
| An HDF5 image has inconsistent geometry, voxel dimensions, or unsupported data type | Image information or pixel transfer fails | Keep the stored geometry and voxel contract consistent with supported component types |
| A NIfTI path is not recognized or an Analyze file conflicts with the configured policy | The NIfTI adapter rejects the path or stops during image description | Use a valid NIfTI file and select the intended Analyze compatibility mode |
| NIfTI scale, orientation, vector layout, or component type cannot map to the image contract | Values or physical coordinates are wrong, or the read fails | Preserve the format's intent, scale, units, and layout rules |
| A text transform file has an incomplete record or an invalid composite component reference | Transform creation or list assembly fails | Keep transform, fixed-parameter, parameter, and component-file records complete and ordered |
| A Matlab transform file does not contain paired vector parameters | Transform reading stops before a usable transform list is produced | Store one parameter vector and one fixed-parameter vector for each transform |
| A PNG path has no valid signature for reading | The PNG adapter rejects the path and another adapter may be tried | Preserve the PNG signature or select the correct I/O object directly |
| PNG output uses an unsupported component type or component count | Writing stops before a valid PNG file is produced | Use supported unsigned 8-bit or 16-bit samples with one to four components |
| PNG data is malformed or a libpng operation reports a critical error | Reading or writing throws after selection | Validate the PNG data and keep the linked PNG library compatible |
A Stimulate path does not end in .spr or its first header line has no recognized field | Automatic image selection rejects the path | Use the Stimulate suffix and a valid identifying header |
| A Stimulate header has an invalid dimension, incomplete field, zero dimension, or unsupported type | Image information fails before pixel transfer | Keep the header within the one-to-four-dimensional contract and provide complete supported fields |
| A Stimulate header points to missing or short binary data, or declares little-endian data | Reading cannot provide the expected image samples | Keep the related .sdt file present, complete, and big-endian |
| A selected image has more axes than the output type and its direction cannot satisfy the chosen collapse strategy | Output information generation fails or the output direction does not preserve the intended physical space | Select a valid collapse strategy and compare it with the matching extraction behavior |
| A GE file lacks a valid GE header or has invalid header lengths | The medical-image adapter rejects the file instead of describing unsafe data | Preserve a valid GE header and its declared regions |
| A MINC file has unsupported dimensions, data class, or component type | The image cannot be described or written through the common contract | Keep the volume within the supported regular-dimension and type model |
| TIFF primary pages have different shape or sample format | Multi-page reading stops instead of creating an incompatible volume | Keep pages uniform or split them into separate images |
| A TIFF tile is corrupt or its codec is not available | Image information may succeed but pixel reading throws | Install the codec and validate tile data before the read |
| A dynamically loaded factory has an incompatible ITK source version | The factory can be rejected or load with a warning | Keep application and factory builds aligned and use strict version checks when needed |
| DICOM slice positions are duplicate or inconsistent | Default series ordering raises an error instead of returning an unsafe order | Fix the source series or explicitly accept the marked compatibility fallback |
| A composite transform has an unsupported dimension or an incompatible component list | Transform I/O cannot flatten or rebuild the composite | Use a supported dimension and preserve the composite-first ordered list |
Key files
| File | Why to read it |
|---|---|
| Modules/…/itkImageIOBase.h | Defines the shared image I/O contract for medical-image and raster-image formats. |
| Modules/…/itkImageIOFactory.h | Defines image format selection by path and read or write mode. |
Modules/IO/ImageBase/src/itkImageIOFactory.cxx | Shows extension-aware image candidate probing. |
| Modules/…/itkScancoImageIOFactory.h | Shows the Scanco image factory entry point that registers the format with the shared object-factory registry. |
| Modules/…/itkImageFileReader.h | Defines the image reader's format override and dimensional direction policy. |
Modules/IO/ImageBase/include/itkImageFileReader.hxx | Shows how selected image metadata and pixel regions become output image data. |
Modules/IO/ImageBase/test/itkImageFileReaderGTest1.cxx | Demonstrates missing-file handling and direction-collapse behavior against extraction. |
Modules/IO/PNG/src/itkPNGImageIO.cxx | Shows PNG recognition, image description, supported pixel forms, palette handling, and data transfer. |
Modules/IO/TIFF/src/itkTIFFImageIO.cxx | Shows TIFF format recognition, image description, pixel transfer, and writing. |
Modules/IO/TIFF/test/itkTIFFImageIOGTest.cxx | Demonstrates TIFF multi-page, tiled, typed, palette, orientation, and failure behavior. |
| Modules/…/itkGE5ImageIO.h | Defines the GE medical-image adapter boundary. |
Modules/IO/GE/src/itkGE5ImageIO.cxx | Shows GE format recognition and transfer of header geometry into the image model. |
| Modules/…/itkMINCImageIO.h | Defines the MINC read/write image contract and supported dimension scope. |
Modules/IO/MINC/src/itkMINCImageIO.cxx | Shows MINC dimension, geometry, metadata, scaling, and pixel transfer. |
Modules/IO/HDF5/src/itkHDF5ImageIO.cxx | Shows HDF5 recognition, ITK image structure, geometry and metadata mapping, streaming, and synchronized transfer. |
Modules/IO/NIFTI/src/itkNiftiImageIO.cxx | Shows NIfTI and Analyze recognition plus image dimensions, orientation, scaling, metadata, and pixel layout. |
Modules/IO/Stimulate/itk-module.cmake | Declares the Stimulate image module, its image-base dependency, and factory name. |
Modules/IO/Stimulate/src/itkStimulateImageIO.cxx | Shows Stimulate recognition, header and sidecar data handling, geometry mapping, and binary transfer. |
Modules/IO/Stimulate/test/itkStimulateImageIOGTest.cxx | Demonstrates Stimulate round-trip preservation of pixels and geometry across header forms. |
Modules/IO/Stimulate/test/itkStimulateImageIOInvalidHeaderTest.cxx | Defines the invalid Stimulate header cases that must fail with clear errors. |
| Modules/…/itkMeshIOBase.h | Defines the shared mesh I/O contract. |
Modules/IO/MeshBase/src/itkMeshIOFactory.cxx | Shows mesh candidate probing for reads and writes. |
| Modules/…/itkTransformIOFactory.h | Defines type-aware transform factory selection. |
Modules/IO/TransformBase/src/itkCompositeTransformIOHelper.cxx | Shows how supported composite transforms become ordered transform lists and are rebuilt. |
Modules/IO/TransformInsightLegacy/src/itkTxtTransformIO.cxx | Shows text transform path selection, ordered records, and composite component-file handling. |
Modules/IO/TransformMatlab/src/itkMatlabTransformIO.cxx | Shows Matlab transform path selection and parameter-vector transfer. |
| Modules/…/itkObjectFactoryBase.h | Defines the shared registry and static and dynamic factory entry points. |
Modules/Core/Common/src/itkObjectFactoryBase.cxx | Shows dynamic loading, ordering, duplicate checks, and version checks. |
CMake/ITKFactoryRegistration.cmake | Shows how build-time format lists become static factory registration. |
Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx | Shows DICOM series grouping and ordering before image reading. |
| docs/image-and-transform-io.md | Provides the parent-page view of image and transform file flow. |
| docs/module-declaration-and-dependencies.md | Explains how module declarations and dependencies make optional I/O formats available. |