Skip to content

Commit

Permalink
Fixed a bug where the offset corrections would not work on Elekta mac…
Browse files Browse the repository at this point in the history
…hines
  • Loading branch information
dchansen committed Apr 19, 2017
1 parent cf684b9 commit 385e7de
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
3 changes: 3 additions & 0 deletions xray/conebeam_projection.cu
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ offset_correct_kernel( float *projections,
float w = sqrt_w*sqrt_w;
projections[idx] *= w;
}
if (t < -omega){
projections[idx] *= 0;
}
}
}

Expand Down
21 changes: 15 additions & 6 deletions xray/cuCBOS_reconstruct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ int main(int argc, char** argv)
unsigned int subsets;
float rho,tau,nlm_noise,bil_weight;
float tv_weight,pics_weight, wavelet_weight,huber,sigma,dct_weight,sfr_weight,framelet_weight,atv_weight;
float framelet_weight4d;
float tv_4d,atv_4d;
bool use_non_negativity;
int reg_iter;
Expand Down Expand Up @@ -163,6 +164,7 @@ int main(int argc, char** argv)
("PICS",po::value<float>(&pics_weight)->default_value(0),"PICS weight")
("Wavelet,W",po::value<float>(&wavelet_weight)->default_value(0),"Weight of the wavelet operator")
("Framelet",po::value<float>(&framelet_weight)->default_value(0),"Weight of the framelet operator")
("Framelet4D",po::value<float>(&framelet_weight4d)->default_value(0),"Weight of the framelet operator")
("Huber",po::value<float>(&huber)->default_value(0),"Huber weight")
("use_prior","Use an FDK prior")
("use_non_negativity",po::value<bool>(&use_non_negativity)->default_value(true),"Prevent image from having negative attenuation")
Expand Down Expand Up @@ -406,13 +408,20 @@ int main(int argc, char** argv)
Rz->set_codomain_dimensions(&is_dims);
solver.add_regularization_group({Rx, Ry, Rz});

auto Rt = boost::make_shared<cuSmallConvOperator<float, 4, 3>>(stencil, 3);
Rt->set_weight(framelet_weight*5e-6);
Rt->set_domain_dimensions(&is_dims);
Rt->set_codomain_dimensions(&is_dims);
solver.add_regularization_operator(Rt);

}
}
if (framelet_weight4d > 0){
auto stencils = std::vector<vector_td<float,3>>({
vector_td<float,3>(-1,0,1),vector_td<float,3>(-1,2,-1),vector_td<float,3>(1,2,1) });
for (auto stencil : stencils) {
auto Rt = boost::make_shared<cuSmallConvOperator<float, 4, 3>>(stencil, 3);
Rt->set_weight(framelet_weight4d);
Rt->set_domain_dimensions(&is_dims);
Rt->set_codomain_dimensions(&is_dims);
solver.add_regularization_operator(Rt);
}
}



Expand All @@ -428,7 +437,7 @@ int main(int argc, char** argv)
if (sfr_weight > 0){
auto sfrOp = boost::make_shared<cuTFFT>();
sfrOp->set_domain_dimensions(&is_dims);
sfrOp->set_weight(dct_weight);
sfrOp->set_weight(sfr_weight);
solver.add_regularization_operator(sfrOp);
}

Expand Down

0 comments on commit 385e7de

Please sign in to comment.