Skip to content

Commit

Permalink
Merge branch 'cardiac4d' into cardiac4d_simulate_stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua van Amerom committed Oct 26, 2017
2 parents 789ed90 + fac7569 commit de6ecd0
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions packages/segmentation/src/irtkReconstructionCardiac4D.cc
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,6 @@ class ParallelCoeffInitCardiac4D {
reconstructor->_reconstructed4D.GetPixelSize(&vx, &vy, &vz);
//volume is always isotropic
double res = vx;

//start of a loop for a slice inputIndex
cout << inputIndex << " ";
cout.flush();
//read the slice
irtkRealImage& slice = reconstructor->_slices[inputIndex];

Expand All @@ -598,14 +594,20 @@ class ParallelCoeffInitCardiac4D {

//to check whether the slice has an overlap with mask ROI
slice_inside = false;

if (reconstructor->_slice_excluded[inputIndex] == 0) {

//start of a loop for a slice inputIndex
cout << inputIndex << " ";
cout.flush();

//PSF will be calculated in slice space in higher resolution
//PSF will be calculated in slice space in higher resolution

//get slice voxel size to define PSF
double dx, dy, dz;
slice.GetPixelSize(&dx, &dy, &dz);
//get slice voxel size to define PSF
double dx, dy, dz;
slice.GetPixelSize(&dx, &dy, &dz);

//sigma of 3D Gaussian (sinc with FWHM=dx or dy in-plane, Gaussian with FWHM = dz through-plane)
//sigma of 3D Gaussian (sinc with FWHM=dx or dy in-plane, Gaussian with FWHM = dz through-plane)

double sigmax, sigmay, sigmaz;
if(reconstructor->_recon_type == _3D)
Expand Down Expand Up @@ -735,7 +737,6 @@ class ParallelCoeffInitCardiac4D {
for (i = 0; i < slice.GetX(); i++)
for (j = 0; j < slice.GetY(); j++)
if (slice(i, j, 0) != -1) {
if (reconstructor->_slice_excluded[inputIndex] == 0) {
//calculate centrepoint of slice voxel in volume space (tx,ty,tz)
x = i;
y = j;
Expand Down Expand Up @@ -878,9 +879,10 @@ class ParallelCoeffInitCardiac4D {
slicecoeffs[i][j].push_back(p);
}

} // if(_slice_excluded[inputIndex]==0)
} //end of loop for slice voxels

} // if(_slice_excluded[inputIndex]==0)

reconstructor->_volcoeffs[inputIndex] = slicecoeffs;
reconstructor->_slice_inside[inputIndex] = slice_inside;

Expand Down

0 comments on commit de6ecd0

Please sign in to comment.