Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/include/stir/recon_buildblock/PinholeSPECTUB_Tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ typedef struct
bool do_round; // true: round shape || false: rectangular shape
float dxcm; // horizontal size of the hole (cm): horizontal axis, diameter
float dzcm; // vertical size of the hole (cm): vertical axis, diameter
float dycm; // channel edge width (cm)

} hole_type;

Expand All @@ -97,6 +98,7 @@ typedef struct
typedef struct
{
std::string model; // cylindrical (cyl) or polygonal prism (pol)
std::string type; // knife-edge (knife) or channel-edge (channel)

float rad; // radius of cylinder containig holes (cyl) or apothem (pol)
float L; // collimator thickness
Expand Down
17 changes: 16 additions & 1 deletion src/recon_buildblock/PinholeSPECTUB_Tools.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,10 @@ read_coll_params_mph(wmh_mph_type& wmh)

wmh.collim.model = wm_SPECT_read_value_1d(&stream1, DELIMITER);

// collimator type: knife or channel
token = wm_SPECT_read_value_1d(&stream1, DELIMITER);
wmh.collim.type = token;

token = wm_SPECT_read_value_1d(&stream1, DELIMITER);
wmh.collim.rad = std::stof(token);

Expand Down Expand Up @@ -481,7 +485,8 @@ read_coll_params_mph(wmh_mph_type& wmh)
stream1.close();

info_stream << "Collimator parameters" << endl;
info_stream << "\nCollimator model: " << wmh.collim.model << endl;
info_stream << "\nCollimator type: " << wmh.collim.type << endl;
info_stream << "Collimator model: " << wmh.collim.model << endl;
info_stream << "Collimator rad: " << wmh.collim.rad << endl;
info_stream << "Number of holes: " << wmh.collim.Nht << endl;

Expand Down Expand Up @@ -614,6 +619,16 @@ wm_SPECT_read_hvalues_mph(ifstream* stream1, char DELIMITER, int* nh, bool do_cy
max_hsxcm = h.dxcm;
pos1 = pos3;

//... channel-edge width y cm .......................

pos2 = line.find_first_not_of(" \t\f\v\n\r", pos1 + 1);
pos3 = line.find_first_of(" \t\f\v\n\r", pos2);
if (pos2 == string::npos)
error_wmtools_SPECT_mph(333, *nh, "dycm");
token = line.substr(pos2, pos3 - pos2);
h.dycm = std::stof(token);
pos1 = pos3;

//... dimension z cm .......................

pos2 = line.find_first_not_of(" \t\f\v\n\r", pos1 + 1);
Expand Down
Loading
Loading