21 #include <odinreco/odinreco.h>
23 #include <odindata/gridding.h>
48 enum indexMode {separate=0, ignore, single, collected, any};
54 RecoIndex(
unsigned short v=0) : mode(separate), val(v), numof(1) {}
66 if( mode==separate && ri.mode==separate ) {
75 operator unsigned short ()
const {
if(mode==single)
return 0;
return val;}
91 if(mode==any || ri.mode==any)
return true;
92 if(mode==collected && ri.mode!=collected)
return false;
93 if(mode!=collected && ri.mode==collected)
return false;
94 if(mode==single && ri.mode==single && val!=ri.val)
return false;
103 if(mask.mode==single) {
104 if(val!=mask.val)
return false;
119 unsigned short get_numof()
const {
if(mode==single)
return 1;
return numof;}
140 unsigned short numof;
151 typedef STD_pair<Data<float,1>,
int> ReadoutShape;
171 for(
int i=0; i<n_recoDims; i++) {
174 if(rc_larger || rc_smaller)
return rc_larger;
184 return !((*this)<rc || rc<(*this));
192 for(
int i=0; i<n_recoDims; i++) {
203 for(
int i=0; i<n_recoDims; i++) {
256 result.
set_mode(m,d1,d2,d3,d4,d5,d6,d7,d8);
371 template<
unsigned int Ndim, recoDim d1=n_recoDims, recoDim d2=n_recoDims, recoDim d3=n_recoDims, recoDim d4=n_recoDims, recoDim d5=n_recoDims, recoDim d6=n_recoDims>
377 static unsigned int dim() {
return Ndim;}
394 if(d1!=n_recoDims) {index(idim)=coord.
index[d1]; idim++;}
395 if(d2!=n_recoDims) {index(idim)=coord.
index[d2]; idim++;}
396 if(d3!=n_recoDims) {index(idim)=coord.
index[d3]; idim++;}
397 if(d4!=n_recoDims) {index(idim)=coord.
index[d4]; idim++;}
398 if(d5!=n_recoDims) {index(idim)=coord.
index[d5]; idim++;}
399 if(d6!=n_recoDims) {index(idim)=coord.
index[d6]; idim++;}
407 if(d1!=n_recoDims) {shape(idim)=coord.
numof(d1); idim++;}
408 if(d2!=n_recoDims) {shape(idim)=coord.
numof(d2); idim++;}
409 if(d3!=n_recoDims) {shape(idim)=coord.
numof(d3); idim++;}
410 if(d4!=n_recoDims) {shape(idim)=coord.
numof(d4); idim++;}
411 if(d5!=n_recoDims) {shape(idim)=coord.
numof(d5); idim++;}
412 if(d6!=n_recoDims) {shape(idim)=coord.
numof(d6); idim++;}
421 if(d1!=n_recoDims) {coord.
index[d1]=index(idim); idim++;}
422 if(d2!=n_recoDims) {coord.
index[d2]=index(idim); idim++;}
423 if(d3!=n_recoDims) {coord.
index[d3]=index(idim); idim++;}
424 if(d4!=n_recoDims) {coord.
index[d4]=index(idim); idim++;}
425 if(d5!=n_recoDims) {coord.
index[d5]=index(idim); idim++;}
426 if(d6!=n_recoDims) {coord.
index[d6]=index(idim); idim++;}
indexMode get_mode() const
unsigned short get_numof() const
STD_string print(recoDim dim, printMode printmode=brief) const
bool prep_count(const RecoIndex &mask)
RecoIndex & operator=(unsigned short v)
RecoIndex & set_numof(unsigned short n)
RecoIndex & set_mode(indexMode m)
bool compatible(const RecoIndex &ri) const
RecoIndex(unsigned short v=0)
bool operator<(const RecoIndex &ri) const
STD_map< RecoCoord, UInt > CoordCountMap
RecoIndex index[n_recoDims]
static RecoCoord coord_with_mode(RecoIndex::indexMode m, recoDim d1=n_recoDims, recoDim d2=n_recoDims, recoDim d3=n_recoDims, recoDim d4=n_recoDims, recoDim d5=n_recoDims, recoDim d6=n_recoDims, recoDim d7=n_recoDims, recoDim d8=n_recoDims)
RecoCoord & set_uniform_mode(RecoIndex::indexMode m)
const ReadoutShape * readoutShape
RecoCoord & set_mode(RecoIndex::indexMode m, recoDim d1=n_recoDims, recoDim d2=n_recoDims, recoDim d3=n_recoDims, recoDim d4=n_recoDims, recoDim d5=n_recoDims, recoDim d6=n_recoDims, recoDim d7=n_recoDims, recoDim d8=n_recoDims)
STD_string print(RecoIndex::printMode printmode=RecoIndex::brief) const
const ComplexData< 1 > * weightVec
bool operator==(const RecoCoord &rc) const
const KspaceTraj * kspaceTraj
bool compatible(const RecoCoord &rc) const
bool operator<(const RecoCoord &rc) const
bool prep_count(const RecoCoord &mask)
unsigned short numof(recoDim dim) const
static RecoCoord preset_coord(RecoIndex::indexMode m)
static unsigned int dim()
static void set_index(const TinyVector< int, Ndim > &index, RecoCoord &coord)
static void create_shape(const RecoCoord &coord, TinyVector< int, Ndim > &shape)
static void create_index(const RecoCoord &coord, TinyVector< int, Ndim > &index)
static void modify(RecoIndex::indexMode m, RecoCoord &coord)