Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More miscellaneous fixes for 1.9 #1482

Merged
50 changes: 25 additions & 25 deletions data/links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,62 +8,62 @@ inputs:
Model Library:
Data: https://www.cbica.upenn.edu/CaPTk_Model_Library
EGFRvIIISVMIndex:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/EGFRvIIISVMIndex.zip
Model: ftp://www.nitrc.org/home/groups/captk/downloads/models/1.8.0/EGFRvIIIIndexPredictor_PretrainedModel.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/EGFRvIIISVMIndex.zip
Model: https://captk.projects.nitrc.org/downloads/downloads/EGFRvIIIIndexPredictor_PretrainedModel.zip
EGFRvIIISurrogateIndex:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/EGFRvIIISurrogateIndex.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/EGFRvIIISurrogateIndex.zip
Model: N.A.
DirectionalityEstimate:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/DirectionalityEstimate.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/DirectionalityEstimate.zip
Model: N.A.
DiffusionDerivatives:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/DiffusionDerivatives.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/DiffusionDerivatives.zip
Model: N.A.
TrainingModule:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/TrainingModule.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/TrainingModule.zip
Model: N.A.
RecurrenceEstimator:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/RecurrenceEstimator.zip
Model: ftp://www.nitrc.org/home/groups/captk/downloads/models/RecurrenceEstimator_Model.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/RecurrenceEstimator.zip
Model: https://captk.projects.nitrc.org/downloads/downloads/RecurrenceEstimator_Model.zip
PseudoProgressionEstimator:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/PseudoProgressionEstimator.zip
Model: ftp://www.nitrc.org/home/groups/captk/downloads/models/1.8.0/PseudoProgressionEstimator_PretrainedModel.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/PseudoProgressionEstimator.zip
Model: https://captk.projects.nitrc.org/downloads/downloads/PseudoProgressionEstimator_PretrainedModel.zip
SurvivalPredictor:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/SurvivalPredictor.zip
Model: ftp://www.nitrc.org/home/groups/captk/downloads/models/1.8.0/SurvivalPredictor_PretrainedModel.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/SurvivalPredictor.zip
Model: https://captk.projects.nitrc.org/downloads/downloads/SurvivalPredictor_PretrainedModel.zip
MolecularSubtypePredictor:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/MolecularSubtypePredictor.zip
Model: ftp://www.nitrc.org/home/groups/captk/downloads/models/MolecularSubtypePredictor_Model.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/MolecularSubtypePredictor.zip
Model: https://captk.projects.nitrc.org/downloads/downloads/MolecularSubtypePredictor_Model.zip
PerfusionDerivatives:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/PerfusionDerivatives.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/PerfusionDerivatives.zip
Model: N.A.
PerfusionPCA:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData/1.8.0/PerfusionPCA.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/PerfusionPCA.zip
Model: N.A.
PerfusionAlignment:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/PerfusionAlignment.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/PerfusionAlignment.zip
Model: N.A.
PopulationAtlases:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/PopulationAtlases.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/PopulationAtlases.zip
Model: N.A.
DeepMedic:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/DeepMedic.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/DeepMedic.zip
Model: N.A.
LungCancer:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/LungCancer.zip
Model: ftp://www.nitrc.org/home/groups/captk/downloads/models/LungCancer_Model.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/LungCancer.zip
Model: https://captk.projects.nitrc.org/downloads/downloads/LungCancer_Model.zip
LIBRA:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/LIBRA.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/LIBRA.zip
Model: N.A.
Confetti:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/Confetti.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/Confetti.zip
Model: N.A.
WhiteStripe:
Data: ftp://www.nitrc.org/home/groups/captk/downloads/SampleData_1.6.0/WhiteStripe.zip
Data: https://captk.projects.nitrc.org/downloads/downloads/WhiteStripe.zip
Model: N.A.
hints:
SoftwareRequirement:
packages:
CaPTk:
version:
- 1.8.0
- 1.9.0
14 changes: 14 additions & 0 deletions src/applications/Preprocessing/src/Preprocessing.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ std::string inputImageFile, inputMaskFile, outputImageFile, outputDir, targetIma
std::vector< std::string > inputImageFiles; // store multiple image files
std::string registrationFixedImageFile, registrationType = "Affine", registrationMetrics = "NMI", registrationIterations = "100,50,5",
registrationAffineTransformInput, registrationDeformableTransformInput;
std::string registrationInterp = "Linear";

int histoMatchQuantiles = 40, histoMatchBins = 100,
registrationTypeInt, registrationRigidDof = 12;
Expand Down Expand Up @@ -307,6 +308,9 @@ int algorithmsRunner()

std::string commonCommands; // put all the common things for the affine/deform/reslice in single place

// add interpolation
commonCommands += " -rI " + registrationInterp;

// add iterations to command
std::string iterations;
{
Expand Down Expand Up @@ -714,6 +718,7 @@ int main(int argc, char** argv)
parser.addOptionalParameter("rIA", "regInterAffn", cbica::Parameter::FILE, "mat", "The path to the affine transformation to apply to moving image", "If this is present, the Affine registration step will be skipped", "Also used for rigid transformation");
parser.addOptionalParameter("rID", "regInterDefm", cbica::Parameter::FILE, "NIfTI", "The path to the deformable transformation to apply to moving image", "If this is present, the Deformable registration step will be skipped");
parser.addOptionalParameter("rsc", "rescaleImage", cbica::Parameter::STRING, "Output Intensity range", "The output intensity range after image rescaling", "Defaults to " + std::to_string(rescaleLower) + ":" + std::to_string(rescaleUpper), "If multiple inputs are passed (comma-separated), the rescaling is done in a cumulative manner,", "i.e., stats from all images are considered for the scaling");
parser.addOptionalParameter("rIP", "regInterpolation", cbica::Parameter::STRING, "Linear or NN", "The interpolation mode to use. NN is nearest neighbor, useful for registering masks and segmentations.", "Defaults to Linear.");

parser.addOptionalParameter("d", "debugMode", cbica::Parameter::BOOLEAN, "0 or 1", "Enabled debug mode", "Default: 0");

Expand Down Expand Up @@ -991,6 +996,15 @@ int main(int argc, char** argv)
{
parser.getParameterValue("rID", registrationDeformableTransformInput);
}
if (parser.isPresent("rIP"))
{
parser.getParameterValue("rIP", registrationInterp);
if (!(registrationInterp == "NN" || registrationInterp == "LINEAR"))
{
std::cerr << "Requested an unsupported interpolation method. Please specify LINEAR or NN." << std::endl;
return EXIT_FAILURE;
}
}
}
else if (parser.isPresent("rsc"))
{
Expand Down
Loading