STIR  6.2.0
Public Member Functions | Protected Types | Protected Member Functions | List of all members
stir::DataSymmetriesForViewSegmentNumbers Class Referenceabstract

A class for encoding/finding symmetries. Works only on ViewSegmentNumbers (instead of Bin). More...

#include "stir/DataSymmetriesForViewSegmentNumbers.h"

Inheritance diagram for stir::DataSymmetriesForViewSegmentNumbers:
Inheritance graph
[legend]

Public Member Functions

virtual DataSymmetriesForViewSegmentNumbersclone () const =0
 
bool operator== (const DataSymmetriesForViewSegmentNumbers &) const
 Check equality. More...
 
bool operator!= (const DataSymmetriesForViewSegmentNumbers &) const
 Check inequality. More...
 
virtual void get_related_view_segment_numbers (std::vector< ViewSegmentNumbers > &, const ViewSegmentNumbers &v_s) const =0
 fills in a vector with all the view/segments that are related to 'v_s' (including itself)
 
virtual int num_related_view_segment_numbers (const ViewSegmentNumbers &v_s) const
 returns the number of view_segment_numbers related to 'v_s' More...
 
std::size_t num_related_viewgram_indices (const ViewgramIndices &ind) const
 
virtual bool find_basic_view_segment_numbers (ViewSegmentNumbers &v_s) const =0
 given an arbitrary view/segment, find the basic view/segment More...
 
virtual bool is_basic (const ViewSegmentNumbers &v_s) const
 test if a view/segment is 'basic' More...
 

Protected Types

typedef DataSymmetriesForViewSegmentNumbers root_type
 

Protected Member Functions

virtual bool blindly_equals (const root_type *const) const =0
 

Detailed Description

A class for encoding/finding symmetries. Works only on ViewSegmentNumbers (instead of Bin).

This class (mainly used in RelatedViewgrams and the projectors) is useful to store and use all information on symmetries common between the image representation and the projection data.

The class mainly defines members to find basic ViewSegmentNumbers. These form a 'basis' for all ViewSegmentNumbers in the sense that all ViewSegmentNumbers can be obtained by using symmetry operations on the 'basic' ones.

Warning: This class wil be renamed/revised to work with ViewgramIndices instead.

Member Function Documentation

◆ operator==()

bool stir::DataSymmetriesForViewSegmentNumbers::operator== ( const DataSymmetriesForViewSegmentNumbers that) const

Check equality.

Implemented in terms of blindly_equals, after checking the type

◆ operator!=()

bool stir::DataSymmetriesForViewSegmentNumbers::operator!= ( const DataSymmetriesForViewSegmentNumbers that) const

Check inequality.

Implemented in terms of operator==()

◆ num_related_view_segment_numbers()

int stir::DataSymmetriesForViewSegmentNumbers::num_related_view_segment_numbers ( const ViewSegmentNumbers v_s) const
virtual

returns the number of view_segment_numbers related to 'v_s'

The default implementation is in terms of get_related_view_segment_numbers, which will be slow of course

Reimplemented in stir::DataSymmetriesForBins_PET_CartesianGrid, stir::TrivialDataSymmetriesForBins, and stir::TrivialDataSymmetriesForViewSegmentNumbers.

Referenced by stir::PoissonLogLikelihoodWithLinearModelForMeanAndProjData< TargetT >::actual_subsets_are_approximately_balanced().

◆ find_basic_view_segment_numbers()

virtual bool stir::DataSymmetriesForViewSegmentNumbers::find_basic_view_segment_numbers ( ViewSegmentNumbers v_s) const
pure virtual

given an arbitrary view/segment, find the basic view/segment

sets 'v_s' to the corresponding 'basic' view/segment and returns true if 'v_s' is changed (i.e. it was NOT a basic view/segment).

Implemented in stir::DataSymmetriesForBins_PET_CartesianGrid, stir::TrivialDataSymmetriesForBins, and stir::TrivialDataSymmetriesForViewSegmentNumbers.

Referenced by stir::BackProjectorByBin::back_project(), and stir::ForwardProjectorByBin::forward_project().

◆ is_basic()

bool stir::DataSymmetriesForViewSegmentNumbers::is_basic ( const ViewSegmentNumbers v_s) const
virtual

test if a view/segment is 'basic'

The default implementation uses find_basic_view_segment_numbers

Referenced by stir::PoissonLogLikelihoodWithLinearModelForMeanAndProjData< TargetT >::actual_subsets_are_approximately_balanced(), and stir::detail::find_basic_vs_nums_in_subset().

◆ blindly_equals()

bool stir::DataSymmetriesForViewSegmentNumbers::blindly_equals ( const root_type * const  ) const
protectedpure virtual

Default implementation always returns true. Needs to be overloaded.

Implemented in stir::DataSymmetriesForBins.


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