Skip to content

Commit

Permalink
Fixing improper pixel size changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSNelson committed Jan 16, 2024
1 parent 7cb98a7 commit c5ca5ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,6 @@ class QP_scope_GUI {
}
String imageName = QP.getCurrentImageName()

// Determine the pixel size based on imageName
if (imageName.contains("3600")) {
pixelSize = "2.0"
} else if (imageName.contains("7200")) {
pixelSize = "1.0"
}

// Expect the classifier file path to be in a specific location
// get the classifier from the groovyScripts folder, which should be "next to" the pythonScripts folder
Expand Down Expand Up @@ -450,6 +444,7 @@ class QP_scope_GUI {
// the transformation consists of an X-shift in stage microns, a Y-shift in stage microns, and a magnification
def viewer = QuPathGUI.getInstance().getViewer()
viewer.centerImage()
viewer.getOverlayOptions().setShowNames(true)
def x= viewer.getCenterPixelX()
def y= viewer.getCenterPixelY()
def frameWidth = (preferences.frameWidth as Double)
Expand All @@ -459,6 +454,7 @@ class QP_scope_GUI {
def FOVAnnotation = PathObjects.createAnnotationObject(tileROI)
FOVAnnotation = PathObjectTools.transformObject(FOVAnnotation,transformation, true)
QP.addObject(FOVAnnotation)
FOVAnnotation.setName("MOVE ME AND THE LIVE VIEW UNTIL THE VIEWS MATCH!\n Tissue edge might be easiest.")
boolean gui4Success = stageToQuPathAlignmentGUI1()
if (!gui4Success) {
// User cancelled GUI4, so end GUI3 and do not proceed
Expand Down
2 changes: 1 addition & 1 deletion src/main/groovyScripts/DetectTissue.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ setColorDeconvolutionStains('{"Name" : "H&E default", "Stain 1" : "Hematoxylin",
//Set pixel size
setPixelSizeMicrons(2.0, 2.0)
//createFullImageAnnotation(true)
createAnnotationsFromPixelClassifier("C:/ImageAnalysis/python/Tissue-lowres.json", 500000.0, 50000.0, "SPLIT", "SELECT_NEW")
createAnnotationsFromPixelClassifier("C:/ImageAnalysis/python/Tissue-lowres.json", 5000000.0, 50000.0, "SPLIT", "SELECT_NEW")

0 comments on commit c5ca5ee

Please sign in to comment.