def runAlignment(parameter): """Align data""" pa = parameter.Alignment; fi = pa.FixedImage; mi = pa.MovingImage; af = pa.AffineParameterFile; bf = pa.BSplineParameterFile; od = pa.AlignmentDirectory; alignData(fi, mi, af, bf, od); return od;
def runAlignment(parameter): """Align data""" pa = parameter.Alignment fi = pa.FixedImage mi = pa.MovingImage af = pa.AffineParameterFile bf = pa.BSplineParameterFile od = pa.AlignmentDirectory alignData(fi, mi, af, bf, od) return od
alignmentParameter = { #moving and reference images "movingImage" : os.path.join(baseDirectory, 'Synthetic/test_iDISCO_reference.tif'), "fixedImage" : os.path.join(baseDirectory, 'Synthetic/test_iDISCO_resample.tif'), #elastix parameter files for alignment "affineParameterFile" : os.path.join(alignmentDirectory, 'ElastixParameterAffine.txt'), "bSplineParameterFile" : None, #directory of the alignment result "resultDirectory" : alignmentDirectory }; result = alignData(**alignmentParameter); print "Aligned images: result directory: %s" % result ############################################################################## # Test Detect Points ############################################################################## import os import iDISCO.Settings as settings from iDISCO.ImageProcessing.CellDetection import detectCells