Developer documentation
Version 3.0.3-105-gd3941f44
MR::File::NameParser Class Reference

a class to interpret numbered filenames More...

#include "file/name_parser.h"

Classes

class  Item
 

Public Member Functions

void parse (const std::string &imagename, size_t max_num_sequences=std::numeric_limits< size_t >::max())
 
size_t num () const
 
std::string spec () const
 
const Itemoperator[] (size_t i) const
 
const vector< uint32_t > & sequence (size_t index) const
 
size_t ndim () const
 
size_t index_of_sequence (size_t number=0) const
 
bool match (const std::string &file_name, vector< uint32_t > &indices) const
 
void calculate_padding (const vector< uint32_t > &maxvals)
 
std::string name (const vector< uint32_t > &indices)
 
std::string get_next_match (vector< uint32_t > &indices, bool return_seq_index=false)
 

Friends

std::ostream & operator<< (std::ostream &stream, const NameParser &parser)
 

Detailed Description

a class to interpret numbered filenames

Definition at line 32 of file name_parser.h.

Member Function Documentation

◆ calculate_padding()

void MR::File::NameParser::calculate_padding ( const vector< uint32_t > &  maxvals)

◆ get_next_match()

std::string MR::File::NameParser::get_next_match ( vector< uint32_t > &  indices,
bool  return_seq_index = false 
)

◆ index_of_sequence()

size_t MR::File::NameParser::index_of_sequence ( size_t  number = 0) const
inline

Definition at line 112 of file name_parser.h.

◆ match()

bool MR::File::NameParser::match ( const std::string &  file_name,
vector< uint32_t > &  indices 
) const

◆ name()

std::string MR::File::NameParser::name ( const vector< uint32_t > &  indices)

◆ ndim()

size_t MR::File::NameParser::ndim ( ) const
inline

Definition at line 108 of file name_parser.h.

◆ num()

size_t MR::File::NameParser::num ( ) const
inline

Definition at line 92 of file name_parser.h.

◆ operator[]()

const Item & MR::File::NameParser::operator[] ( size_t  i) const
inline

Definition at line 100 of file name_parser.h.

◆ parse()

void MR::File::NameParser::parse ( const std::string &  imagename,
size_t  max_num_sequences = std::numeric_limits< size_t >::max() 
)

◆ sequence()

const vector< uint32_t > & MR::File::NameParser::sequence ( size_t  index) const
inline

Definition at line 104 of file name_parser.h.

◆ spec()

std::string MR::File::NameParser::spec ( ) const
inline

Definition at line 96 of file name_parser.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  stream,
const NameParser parser 
)
friend

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