Skip to content

Commit

Permalink
Important: removes scijava parameter names with upper case
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoKiaru committed Sep 17, 2024
1 parent a02e0bb commit 55a43e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ public class OpenSampleCommand implements Command {
@Parameter(label = "Choose a sample dataset", choices = { "VSI", "JPG_RGB",
"OLYMPUS_OIR", "LIF", "TIF_TIMELAPSE_3D", "ND2_20X", "ND2_60X",
"BOTH_ND2" })
String datasetName;
String datasetname;

@Parameter(type = ItemIO.OUTPUT)
AbstractSpimData<?> spimData;

public void run() {
// Find the datasetname through reflection
Field[] fields = DatasetHelper.class.getFields();
if (datasetName.equals("BOTH_ND2")) {
if (datasetname.equals("BOTH_ND2")) {
File f20 = DatasetHelper.getDataset(DatasetHelper.ND2_20X);
File f60 = DatasetHelper.getDataset(DatasetHelper.ND2_60X);

Expand Down Expand Up @@ -99,16 +99,16 @@ public void run() {
return;
}
for (Field f : fields) {
if (f.getName().equals(datasetName.toUpperCase())) {
if (f.getName().equals(datasetname.toUpperCase())) {
try {
// Dataset found
datasetName = (String) f.get(null);
datasetname = (String) f.get(null);
//System.out.println(datasetName);
if (datasetName.equals(DatasetHelper.VSI)) {
if (datasetname.equals(DatasetHelper.VSI)) {
DatasetHelper.getSampleVSIDataset();
}

File file = DatasetHelper.getDataset(datasetName);
File file = DatasetHelper.getDataset(datasetname);

spimData = OpenersToSpimData.getSpimData(new OpenerSettings().location(file).voxSizeReferenceFrameLength(
new Length(1, UNITS.MILLIMETER)).positionReferenceFrameLength(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class CreateBdvDatasetQuPathCommand implements Command
CreateBdvDatasetQuPathCommand.class);

@Parameter
File quPathProject;
File qupath_project;

@Parameter
Context context;
Expand Down Expand Up @@ -83,7 +83,7 @@ public void run() {

try {
// Deserialize the QuPath project
JsonObject projectJson = ProjectIO.loadRawProject(new File(quPathProject.toURI()));
JsonObject projectJson = ProjectIO.loadRawProject(new File(qupath_project.toURI()));
Gson gson = new Gson();
MinimalQuPathProject project = gson.fromJson(projectJson, MinimalQuPathProject.class);
logger.debug("Opening QuPath project " + project.uri);
Expand All @@ -95,7 +95,7 @@ public void run() {
OpenerSettings openerSettings =
OpenerSettings.QuPath()
.splitRGBChannels(split_rgb_channels)
.location(quPathProject.getAbsolutePath())
.location(qupath_project.getAbsolutePath())
.setEntry(image.entryID)
.unit(unit)
.positionConvention(plane_origin_convention)
Expand All @@ -108,8 +108,8 @@ public void run() {

spimData = OpenersToSpimData.getSpimData(openerSettingsList);

if (datasetname.equals("")) {
datasetname = quPathProject.getParentFile().getName();
if (datasetname.isEmpty()) {
datasetname = qupath_project.getParentFile().getName();
}

} catch (Exception e) {
Expand Down

0 comments on commit 55a43e2

Please sign in to comment.