Skip to content

Commit 6a73bc3

Browse files
committed
clean up
1 parent 11d30cd commit 6a73bc3

File tree

4 files changed

+36
-75
lines changed

4 files changed

+36
-75
lines changed

__init__.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (c) 2014, Dignity Health
2+
#
3+
# The GPI core node library is licensed under
4+
# either the BSD 3-clause or the LGPL v. 3.
5+
#
6+
# Under either license, the following additional term applies:
7+
#
8+
# NO CLINICAL USE. THE SOFTWARE IS NOT INTENDED FOR COMMERCIAL
9+
# PURPOSES AND SHOULD BE USED ONLY FOR NON-COMMERCIAL RESEARCH PURPOSES. THE
10+
# SOFTWARE MAY NOT IN ANY EVENT BE USED FOR ANY CLINICAL OR DIAGNOSTIC
11+
# PURPOSES. YOU ACKNOWLEDGE AND AGREE THAT THE SOFTWARE IS NOT INTENDED FOR
12+
# USE IN ANY HIGH RISK OR STRICT LIABILITY ACTIVITY, INCLUDING BUT NOT LIMITED
13+
# TO LIFE SUPPORT OR EMERGENCY MEDICAL OPERATIONS OR USES. LICENSOR MAKES NO
14+
# WARRANTY AND HAS NOR LIABILITY ARISING FROM ANY USE OF THE SOFTWARE IN ANY
15+
# HIGH RISK OR STRICT LIABILITY ACTIVITIES.
16+
#
17+
# If you elect to license the GPI core node library under the LGPL the
18+
# following applies:
19+
#
20+
# This file is part of the GPI core node library.
21+
#
22+
# The GPI core node library is free software: you can redistribute it
23+
# and/or modify it under the terms of the GNU Lesser General Public License as
24+
# published by the Free Software Foundation, either version 3 of the License,
25+
# or (at your option) any later version. GPI core node library is distributed
26+
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
27+
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28+
# See the GNU Lesser General Public License for more details.
29+
#
30+
# You should have received a copy of the GNU Lesser General Public
31+
# License along with the GPI core node library. If not, see
32+
# <http://www.gnu.org/licenses/>.
33+
34+
VERSION = '2.0.0'
35+
RELEASE_DATE = '2019Jul30'
36+

gpi_core/spiral/cpp/WPCompose.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,18 +212,11 @@ void WPCompose::composeKSPnSDC(dVector& kspX, dVector& kspY,
212212
// Calculate base ksp and sdc
213213
mWPOut->ComputeKSPnSDC(mKspOutX, mKspOutY, mSdcOut);
214214

215-
if (cg_crds_sdc) {
216-
mWPOut->ComputeKSPnSDCForCG(mKspOutX, mKspOutY, mSdcOut);
217-
}
218-
219215
kspLengths[2] = mKspOutX.size();
220216

221217
if (mDualTau) {
222218
mWPIn->ComputeKSPnSDC(mKspInX, mKspInY, mSdcIn);
223219

224-
if (cg_crds_sdc) {
225-
mWPIn->ComputeKSPnSDCForCG(mKspInX, mKspInY, mSdcIn);
226-
}
227220
kspLengths[0] = mKspInX.size();
228221

229222
mKspInX = _negative(_flip(mKspInX));

gpi_core/spiral/cpp/WPGen.cpp

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,6 @@ void WPGen::_computeTimings()
198198
totalSpiralPts = spiralReadPts + spiralRampPts;
199199

200200
kspacePts = static_cast<int>(readoutDur / mDwell);
201-
202-
// Constant Gradient crd variables (fast arc followed by constant gradient)
203-
mDwellCG = 1.0 / (mGamma * gradMaxIn * mFov);
204-
mArcDurCG = nyqNumberArms / (2.0 * mGamma * gradMaxIn * mFov);
205-
mG0CG = mDelta / (2.0 * mGamma * gradMaxIn);
206-
mCtaCG = 2.0 * M_PI * (mGamma * mGamma * gradMaxIn * gradMaxIn * mFov * mFov) / (nyqNumberArms * nyqNumberArms);
207-
mTotalCGDur = mArcDurCG + (gradDur1 - mG0CG) + outRingDur;
208201
}
209202

210203
void WPGen::ComputeBaseSpiral(dVector& gradX, dVector& gradY)
@@ -698,63 +691,6 @@ dVector& sdc)
698691
mKSPComputed = true;
699692
}
700693

701-
void WPGen::ComputeKSPnSDCForCG(dVector& kspX, dVector& kspY, dVector& sdc)
702-
{
703-
const double cgg = gradMaxSpiral;
704-
const double csg = cgg / gradMaxSpiral;
705-
int kpts_cg = static_cast<int>(mTotalCGDur / mDwellCG);
706-
707-
kspX.resize(kpts_cg, 0.0);
708-
kspY.resize(kpts_cg, 0.0);
709-
sdc.resize(kpts_cg, 0.0);
710-
711-
double ctg = sqrt(2.0 * mGamma * gradMax / mDelta);
712-
double theta, phi = 0., arm2arm, krad = 0., phi0, alpha;
713-
714-
for (int i = 0; i < kpts_cg; i++) {
715-
double t = static_cast<double>(i) * mDwellCG;
716-
717-
// ARC
718-
if (t < mArcDurCG) {
719-
theta = mCtaCG * t * t;
720-
krad = mDelta * sqrt(2.0 * (1.0 - cos(theta)));
721-
phi = atan2(1.0 - cos(theta), sin(theta)) + 1.0 - 0.5 * M_PI;
722-
arm2arm = sin(theta);
723-
sdc[i] = (t / mArcDurCG) * arm2arm;
724-
} else {
725-
t = t - mArcDurCG + mG0CG;
726-
727-
// GRAD
728-
if (mAddOuterRing) {
729-
if (t < mTotalCGDur) {
730-
sdc[i] = 1.0;
731-
theta = ctg * sqrt(t);
732-
krad = mDelta * sqrt(theta * theta + 1.0);
733-
phi = theta - acos(mDelta / krad);
734-
} else {
735-
// RING
736-
phi0 = ctg * sqrt(outRingDur1);
737-
if (t < outRingDur1) {
738-
alpha = 0.5 * M_PI * (outRingDur1 - t) / outRingDur;
739-
sdc[i] = csg * sin(alpha); // Sin() is ad-hoc for inter-arm distance
740-
theta = thetaPrimeRing * (t - gradDur1);
741-
krad = sqrt(rcLim * rcLim + mDelta * mDelta + 2.0 * rcLim * mDelta * sin(theta));
742-
phi = phi0 - acos((rcLim * sin(theta) + mDelta) / krad);
743-
}
744-
}
745-
} else {
746-
sdc[i] = 1.0;
747-
theta = ctg * sqrt(t);
748-
krad = mDelta * sqrt(theta * theta + 1.0);
749-
phi = theta - acos(mDelta / krad);
750-
}
751-
}
752-
753-
kspX[i] = krad * cos(phi) * mGridRes * mRes * coordsScaleFactor;
754-
kspY[i] = krad * sin(phi) * mGridRes * mRes * coordsScaleFactor;
755-
}
756-
}
757-
758694
void WPGen::ComputeTimeMap(std::vector<dVector > & timeMap)
759695
{
760696
//////////////////////////////////////

gpi_core/spiral/cpp/WPGen.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,10 @@ class DLL_PUBLIC WPGen {
4545

4646
~WPGen(); // Destructor
4747

48-
//void ComputeGradients(dVector& gradX, dVector& gradY);
49-
5048
void ComputeBaseSpiral(dVector& gradX, dVector& gradY);
5149
void ComputeRampDown(dVector& rampX, dVector& rampY);
5250
bool ComputeM0M1Trapezoids(dVector& m0m1X, dVector& m0m1Y);
5351
void ComputeKSPnSDC(dVector& kspX, dVector& kspY, dVector& sdc);
54-
void ComputeKSPnSDCForCG(dVector& kspX, dVector& kspY, dVector& sdc);
55-
5652
void ComputeTimeMap(std::vector<dVector >& timeMap);
5753

5854
// Getter methods

0 commit comments

Comments
 (0)