Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
STIR
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
STIR Howto Create Custom InputFileFormat
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Creating classes for Coincidence list mode records == In coincidence list mode data (cLMD) there are usually two types of records: Event data records, which essentially store the coordinates of the two detectors in coincidence, and time data records, which contain a time stamps and are inserted every so and so many event records. Some inspiration of the following can be obtained from CListRecordECAT962.h in the STIR source code. In that you need * class CListEventDataMyScanner ** contains the event data as POD types. Be sure not to have pointers or fancy data types. ECAT962 for example uses unsigned int bitfields. Careful with byte order! * class CListTimeDataMyScanner ** Same as before just for time stamps. One bit of each class data should be reserved for labeling type and both classes data members should have same size, i.e. sizeof(CListEventDataMyScanner) == sizeof(CListTimeDataMyScanner) should be true. * template <class Derived> class CListEventMyScanner : public CListEvent ** needs the following abstract methods to be implemented in the custom class *** virtual bool is_prompt () const =0 *** virtual LORAs2Points< float > get_LOR () const =0 * class CListRecordMyScanner : public CListRecord, public CListTime, public CListEventMyScanner<CListRecordMyScanner> ** needs the following abstract methods to be implemented in the custom class (see also implementation for ECAT962) *** virtual bool is_time () const =0 *** virtual bool is_event () const =0 *** virtual CListEvent & event ()=0 *** virtual const CListEvent & event () const =0 *** virtual CListTime & time ()=0 *** virtual const CListTime & time () const =0 *** virtual bool operator== (const CListRecord &e2) const =0 *** virtual unsigned long get_time_in_millisecs () const =0 *** virtual Succeeded set_time_in_millisecs (const unsigned long time_in_millisecs)=0 ** nice to have is a private union data type to combine time and event data and provide a raw data access, where sizeXX corresponds to the size of an integer data type equal to the size of your event and time classes from above *** union { CListEventDataMyScanner event_data; CListTimeDataMyScanner time_data; sizeXX raw; };
Summary:
Please note that all contributions to STIR may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
STIR:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width