Skip to content

Commit

Permalink
Fixing some file paths
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSNelson committed Jan 11, 2024
1 parent 3fdd3ce commit 4bc72ed
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,13 @@ class QP_scope_GUI {
}

// Expect the classifier file path to be in a specific location
// Extract the directory from pythonScriptPath
Path scriptDirectory = Paths.get(pythonScriptPath).getParent();
// get the classifier from the groovyScripts folder, which should be "next to" the pythonScripts folder
Path groovyScriptDirectory = Paths.get(pythonScriptPath).getParent();
groovyScriptDirectory = groovyScriptDirectory.resolveSibling("groovyScripts")

// Combine the directory with the new filename
Path jsonFilePath = scriptDirectory.resolve("Tissue-lowres.json");
Path exportScriptPath = scriptDirectory.resolve("save4xMacroTiling.groovy")
Path jsonFilePath = groovyScriptDirectory.resolve("Tissue-lowres.json");
Path exportScriptPath = groovyScriptDirectory.resolve("save4xMacroTiling.groovy")
// Convert Path back to String and fix slashes to not be escape chars
String jsonFilePathString = jsonFilePath.toString().replace("\\", "/");
String exportScriptPathString = exportScriptPath.toString().replace("\\", "/");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class utilityFunctions {
return [installation : "C:\\ImageAnalysis\\QPExtensionTest\\qp_scope\\src\\main\\pythonScripts/4x_bf_scan_pycromanager.py",
environment : "C:\\Anaconda\\envs\\paquo",
projects : "C:\\ImageAnalysis\\slides",
tissueDetection: "C:\\ImageAnalysis\\QPExtensionTest\\qp_scope\\src\\main\\groovyScripts/DetectTissueSize.groovy",
tissueDetection: "C:\\ImageAnalysis\\QPExtensionTest\\qp_scope\\src\\main\\groovyScripts/DetectTissue.groovy",
firstScanType : "4x_bf",
secondScanType : "20x_bf",
tileHandling : "Zip"] //Zip Delete or anything else is ignored
Expand Down
61 changes: 61 additions & 0 deletions src/main/groovyScripts/Tissue-lowres.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"pixel_classifier_type": "OpenCVPixelClassifier",
"metadata": {
"inputPadding": 0,
"inputResolution": {
"pixelWidth": {
"value": 8.0,
"unit": "µm"
},
"pixelHeight": {
"value": 8.0,
"unit": "µm"
},
"zSpacing": {
"value": 1.0,
"unit": "z-slice"
},
"timeUnit": "SECONDS",
"timepoints": []
},
"inputWidth": 512,
"inputHeight": 512,
"inputNumChannels": 3,
"outputType": "CLASSIFICATION",
"outputChannels": [],
"classificationLabels": {
"0": {
"name": "Tissue",
"color": [
83,
47,
31
]
}
}
},
"op": {
"type": "data.op.channels",
"colorTransforms": [
{
"combineType": "MEAN"
}
],
"op": {
"type": "op.core.sequential",
"ops": [
{
"type": "op.filters.gaussian",
"sigmaX": 1.0,
"sigmaY": 1.0
},
{
"type": "op.threshold.constant",
"thresholds": [
230.0
]
}
]
}
}
}

0 comments on commit 4bc72ed

Please sign in to comment.