Developer documentation
Version 3.0.3-105-gd3941f44
MR::Formats::MRtrix_sparse Class Reference

#include "formats/list.h"

Inheritance diagram for MR::Formats::MRtrix_sparse:
MR::Formats::Base

Public Member Functions

 MRtrix_sparse ()
 
virtual std::unique_ptr< ImageIO::Baseread (Header &H) const
 read image file(s) and fill the Image::Header H with the appropriate information. More...
 
virtual bool check (Header &H, size_t num_axes) const
 check whether the Image::Header H can be created using this handler. More...
 
virtual std::unique_ptr< ImageIO::Basecreate (Header &H) const
 create the image corresponding to the Image::Header H. More...
 
- Public Member Functions inherited from MR::Formats::Base
 Base (const char *desc)
 
virtual ~Base ()
 
virtual std::unique_ptr< ImageIO::Baseread (Header &H) const =0
 read image file(s) and fill the Image::Header H with the appropriate information. More...
 
virtual bool check (Header &H, size_t num_axes) const =0
 check whether the Image::Header H can be created using this handler. More...
 
virtual std::unique_ptr< ImageIO::Basecreate (Header &H) const =0
 create the image corresponding to the Image::Header H. More...
 

Additional Inherited Members

- Public Attributes inherited from MR::Formats::Base
const char * description
 a short human-readable description of the image format More...
 

Detailed Description

Definition at line 111 of file list.h.

Constructor & Destructor Documentation

◆ MRtrix_sparse()

MR::Formats::MRtrix_sparse::MRtrix_sparse ( )
inline

Definition at line 111 of file list.h.

Member Function Documentation

◆ check()

virtual bool MR::Formats::MRtrix_sparse::check ( Header H,
size_t  num_axes 
) const
virtual

check whether the Image::Header H can be created using this handler.

This function will check whether this handler can write images in the format suggested by the filename. It will then check whether the format can handle the number of dimensions requested, and modify the header appropriately if needed.

Returns
true if this format handler can write this type of file, false otherwise.
Note
this function should throw an Exception in case of error, or if this image format cannot support the header information.

Implements MR::Formats::Base.

◆ create()

virtual std::unique_ptr< ImageIO::Base > MR::Formats::MRtrix_sparse::create ( Header H) const
virtual

create the image corresponding to the Image::Header H.

This function will create images in the corresponding format, assuming the header has been validated using the check() function beforehand.

Note
this function should throw an Exception in case of error.

Implements MR::Formats::Base.

◆ read()

virtual std::unique_ptr< ImageIO::Base > MR::Formats::MRtrix_sparse::read ( Header H) const
virtual

read image file(s) and fill the Image::Header H with the appropriate information.

This function will check whether this handler can read images in the format suggested by the filename. It will then attempt to read the corresponding image, and update the Image::Header H with the relevant information.

Returns
true if this Format handler can read this type of file, false otherwise. If true, this function should fill the Header H with all the relevant information as read from the images before returning.
Note
this function should throw an Exception in case of error.

Implements MR::Formats::Base.


The documentation for this class was generated from the following file: