Пример #1
0
# The list of files.
#imFileNames = ["test_file.nrrd", "test_file2.nrrd", "test_file3.nrrd"]
# The list of roi files (Needs to have same number of entries as .im files above).
#roiFileNames = ["test_file.rois.zip", "test_file2.rois.zip", "test_file3.rois.zip"]

# List of statistics.
# Others: "mean", "stddev", "median", "N/D",
#         "min", "max", "sum", "mode", "area",
#         "group", "roix", "roiy",
#         "roiwidth", "roiheight"
stats = ["group", "area", "mean", "stddev", "N/D"]

#////////////////////////////
# Initialize stuff.
#////////////////////////////
ui = UI()
ui.show()

#////////////////////////////
# Loop over files.
#////////////////////////////
for i in range(len(imFileNames)):

    imFile = File(imFileNames[i])
    roiFile = File(roiFileNames[i])
    #IJ.log("Opening: "+imFileNames[i])
    ui.openFile(imFile)
    #IJ.log("Opening: "+roiFileNames[i])
    ui.openFile(roiFile)

    #////////////////////////////
imFileName = ["test_file.nrrd", "test_file2.nrrd", "test_file3.nrrd"]

# The list of roi files (Needs to have same number of entries as .im files above).
roiFileName = ["test_file.rois.zip", "test_file2.rois.zip", "test_file3.rois.zip"]

# List of statistics.
# Others: "mean", "stddev", "median", "N/D", 
#         "min", "max", "sum", "mode", "area", 
#         "group (table only)", "roix", "roiy", 
#         "roiwidth", "roiheight"
stats = ["mean", "stddev"]

#////////////////////////////
# Initialize stuff.
#////////////////////////////
ui = UI()
ui.show()

#////////////////////////////
# Loop over files.
#////////////////////////////
for i in range(len(imFileName)):
	#where is this going?
	#print "Opening: " #+ imFileName[i] + ", " roiFileName[i]
	
	imFile = File(imDirName, imFileName[i])
	roiFile = File(imDirName, roiFileName[i])
	IJ.log("Opening: "+imFileName[i])
	ui.openFile(imFile)
	IJ.log("Opening: "+roiFileName[i])
	ui.openFile(roiFile)
Пример #3
0
import com.nrims.data as nrimsData
import com.nrims.UI as nrimsUI

import java.io.File as File
import java.lang as lang
import java.util.ArrayList as ArrayList
import java.lang.Integer as Integer

import sys
from java.lang.System import getProperty
sys.path.append(getProperty("fiji.dir") + "/plugins/Scripts/Plugins/OpenMIMS Scripts/")
import os
import jarray

IJ.log("Starting auto Turbo reg")
ui = nrimsUI.getInstance()

if ui == None:
	IJ.log("No instance of OpenMims window")
else:
	openSum = ui.getOpenSumImages()
	if len(openSum) != 0:

		#copy sum and source image
		#setting sum image to first one for testing's sake
		sumImage = openSum[0]
		target = sumImage.duplicate()
		source = IJ.getImage().duplicate()
		
		#scale image
		targetProcessor = target.getProcessor()
Пример #4
0
import java.io.File as File
import java.lang as lang
import java.util.ArrayList as ArrayList
import java.lang.Integer as Integer

import sys
from java.lang.System import getProperty
sys.path.append(getProperty("fiji.dir") + "/plugins/Scripts/Plugins/OpenMIMS Scripts/")
import os
import jarray

#////////////////////////////
# Get existing instance of OpenMims
#////////////////////////////
IJ.log("Starting auto Turbo reg")
ui = nrimsUI.getInstance()

if ui == None:
IJ.log("No instance of OpenMims window")
  else:
  openSum = ui.getOpenSumImages()
  if len(openSum) != 0:
    #////////////////////////////
    # copy sum and source image 
    # source = image we want to modify through turboreg
    # target = image that we are fitting source to
    # note: setting sum image to first one for testing's sake, ideally we'll find another solution
    #////////////////////////////
    sumImage = openSum[0]
    target = sumImage.duplicate()
    source = IJ.getImage().duplicate()
Пример #5
0
from org.jfree.data.xy import DefaultXYDataset

from java.awt import Color, Rectangle


print "\nStarting 'QSA-ScatterPlot'."
print "Grab images."

#imgA = WindowManager.getImage("25.90:test_file")
#imgB = WindowManager.getImage("26.93/25.90:test_file")

imgA = WindowManager.getImage("12.12:test_file")
imgB = WindowManager.getImage("13.01/12.12:test_file")


ui = UI.getInstance()
rois = ui.getRoiManager().getAllROIs()

print "Create empty dataset"
dataset = DefaultXYDataset()

print "Create ScatterPlot"

chart = ChartFactory.createScatterPlot(
	"Scatter Plot", imgA.getTitle(), imgB.getTitle(),
	dataset, PlotOrientation.VERTICAL,
	True, False, False);

# random test data
#
#print "Add series to dataset"
Пример #6
0
# The list of files.
#imFileNames = ["test_file.nrrd", "test_file2.nrrd", "test_file3.nrrd"]
# The list of roi files (Needs to have same number of entries as .im files above).
#roiFileNames = ["test_file.rois.zip", "test_file2.rois.zip", "test_file3.rois.zip"]

# List of statistics.
# Others: "mean", "stddev", "median", "N/D", 
#         "min", "max", "sum", "mode", "area", 
#         "group", "roix", "roiy", 
#         "roiwidth", "roiheight"
stats = ["group", "area", "mean", "stddev", "N/D"]

#////////////////////////////
# Initialize stuff.
#////////////////////////////
ui = UI()
ui.show()

#////////////////////////////
# Loop over files.
#////////////////////////////
for i in range(len(imFileNames)):
  
  imFile = File(imFileNames[i])
  roiFile = File(roiFileNames[i])
  #IJ.log("Opening: "+imFileNames[i])
  ui.openFile(imFile)
  #IJ.log("Opening: "+roiFileNames[i])
  ui.openFile(roiFile)
  
  #////////////////////////////