Commit 6447bb25 authored by ac_22's avatar ac_22

moved source to archive branch, readme to leverjs

parent 5459d7b6
This diff is collapsed.
LEVer.exe 2>&1> LEVerDebugOut.txt
\ No newline at end of file
This diff is collapsed.
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.bak
*.cache
*.ilk
*.log
*.sbr
[Oo]bj/
[Bb]in/
[Dd]ebug*/
[Rr]elease*/
_ReSharper*/
*.exe
*.msi
*.bat
*.wixpdb
dependencies/
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.9</ProductVersion>
<ProjectGuid>376927e6-92fc-432a-9c5a-5470be49b447</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>LEVER Install</OutputName>
<OutputType>Bundle</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>installer\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>installer\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>Debug</DefineConstants>
<OutputPath>installer\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>installer\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<WixExtension Include="WixBalExtension">
<HintPath>$(WixExtDir)\WixBalExtension.dll</HintPath>
<Name>WixBalExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Compile Include="LEVER-Bundle.wxs" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2010
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "LEVER Bundle", "LEVER Bundle.wixproj", "{376927E6-92FC-432A-9C5A-5470BE49B447}"
ProjectSection(ProjectDependencies) = postProject
{1A18D670-4175-494D-BA2E-3D47ACBC10F0} = {1A18D670-4175-494D-BA2E-3D47ACBC10F0}
EndProjectSection
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "lever-install", "lever-install.wixproj", "{1A18D670-4175-494D-BA2E-3D47ACBC10F0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{376927E6-92FC-432A-9C5A-5470BE49B447}.Debug|x64.ActiveCfg = Debug|x64
{376927E6-92FC-432A-9C5A-5470BE49B447}.Debug|x64.Build.0 = Debug|x64
{376927E6-92FC-432A-9C5A-5470BE49B447}.Debug|x86.ActiveCfg = Debug|x86
{376927E6-92FC-432A-9C5A-5470BE49B447}.Debug|x86.Build.0 = Debug|x86
{376927E6-92FC-432A-9C5A-5470BE49B447}.Release|x64.ActiveCfg = Release|x64
{376927E6-92FC-432A-9C5A-5470BE49B447}.Release|x64.Build.0 = Release|x64
{376927E6-92FC-432A-9C5A-5470BE49B447}.Release|x86.ActiveCfg = Release|x86
{376927E6-92FC-432A-9C5A-5470BE49B447}.Release|x86.Build.0 = Release|x86
{1A18D670-4175-494D-BA2E-3D47ACBC10F0}.Debug|x64.ActiveCfg = Debug|x64
{1A18D670-4175-494D-BA2E-3D47ACBC10F0}.Debug|x64.Build.0 = Debug|x64
{1A18D670-4175-494D-BA2E-3D47ACBC10F0}.Debug|x86.ActiveCfg = Debug|x86
{1A18D670-4175-494D-BA2E-3D47ACBC10F0}.Debug|x86.Build.0 = Debug|x86
{1A18D670-4175-494D-BA2E-3D47ACBC10F0}.Release|x64.ActiveCfg = Release|x64
{1A18D670-4175-494D-BA2E-3D47ACBC10F0}.Release|x64.Build.0 = Release|x64
{1A18D670-4175-494D-BA2E-3D47ACBC10F0}.Release|x86.ActiveCfg = Release|x86
{1A18D670-4175-494D-BA2E-3D47ACBC10F0}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="LEVER Lineage Editor" Version="$(env.LEVER_VER)" Manufacturer="http://bioimage.coe.drexel.edu" UpgradeCode="376927e6-92fc-432a-9c5a-5470be49b447">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LicenseFile = "license/license.rtf"
LogoFile ="resources/LEVER_logo.png"/>
</BootstrapperApplicationRef>
<Chain>
<ExePackage Name="MCRInstaller" SourceFile = "dependencies/$(env.MCR_FILE)" />
<ExePackage Name="VCRedistributable" SourceFile = "dependencies/vcredist_x64.exe" />
<MsiPackage Id="lever" SourceFile = "installer/lever.msi" />
</Chain>
</Bundle>
</Wix>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.8</ProductVersion>
<ProjectGuid>1a18d670-4175-494d-ba2e-3d47acbc10f0</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>lever</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>installer\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
<CompilerAdditionalOptions>-arch x64</CompilerAdditionalOptions>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>installer\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>Debug</DefineConstants>
<CompilerAdditionalOptions>-arch x64</CompilerAdditionalOptions>
<OutputPath>installer\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>installer\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="lever-install.wxs" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
Name="LEVER"
Language="1033"
Version="$(env.LEVER_VER)"
Manufacturer="http://bioimage.coe.drexel.edu"
UpgradeCode="49684da6-6259-4985-8be4-c8551290437f">
<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine"
Manufacturer="http://bioimage.coe.drexel.edu"
Description="LEVER"
Comments="(c) 2016 http://bioimage.coe.drexel.edu"/>
<MediaTemplate EmbedCab="yes" />
<Condition Message=
"This installer requires Windows 7 or higher.">
<![CDATA[
Installed OR
VersionNT >= 601
]]>
</Condition>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="LEVER_ProgramDir"
Name="LEVER">
<Directory Id="Subdir" Name="Sample Data" />
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="LEVER_ShortcutsDir"
Name="LEVER" />
</Directory>
</Directory>
<DirectoryRef Id="LEVER_ProgramDir">
<Component Id="CMP_LEVER"
Guid="C5344940-7AE8-4D9A-865A-24933BA22672">
<File Source="../bin64/LEVer.exe" KeyPath="yes" />
<File Source="../bin64/LEVER_SegAndTrackFolders.exe" />
<File Source="../bin64/Segmentor.exe" />
<File Source="../bin64/debugLEVer.bat" />
<File Source="../bin64/gnu gpl v3.txt" />
</Component>
</DirectoryRef>
<Icon Id="leverIcon.ico" SourceFile="resources/LEVER_logo.ico"/>
<Icon Id="uninstallIcon.ico" SourceFile="resources/LEVER_uninstall.ico"/>
<DirectoryRef Id="LEVER_ShortcutsDir">
<Component Id="CMP_LEVERShortcuts"
Guid="7D6042C6-6719-45EA-BD04-116EC1AE4F17">
<Shortcut Id="LEVER_Shortcut"
Name="LEVER"
Description="LEVER lineage editing and validation tool"
Target="[LEVER_ProgramDir]LEVer.exe"
Icon="leverIcon.ico"/>
<Shortcut Id="LEVER_SegAndTrackFolders_Shortcut"
Name="LEVER_SegAndTrackFolders"
Description="LEVER Batch segmentation and tracking tool"
Target="[LEVER_ProgramDir]LEVER_SegAndTrackFolders.exe"
Icon="leverIcon.ico"/>
<Shortcut Id="Uninstall_Shortcut"
Name="Uninstall LEVER"
Description="Uninstall LEVER Software and all of its componets"
Target="[System64Folder]msiexec.exe"
Arguments="/x [ProductCode]"
Icon="uninstallIcon.ico"/>
<RemoveFolder Id="Remove_LEVER_ShortcutsDir"
On="uninstall" />
<RegistryValue Root="HKCU"
Key="Software\Bioimage\LEVER"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</DirectoryRef>
<Feature Id="ProductFeature"
Title="Main Product"
Level="1">
<ComponentRef Id="CMP_LEVER" />
<ComponentRef Id="CMP_LEVERShortcuts" />
</Feature>
</Product>
</Wix>
This diff is collapsed.
......@@ -5,10 +5,11 @@
This project, knows as 'lever.js' unifies the 2-D and 3-D LEVER algorithms in a
new software architecture that is better, faster, stronger, etc.**
**The software will be released publically early-mid 2018. A collaborator/developer
preview will be available fall 2017. Please contact Andy Cohen (https://bioimage.coe.drexel.edu) if you're interested
** Please contact Andy Cohen (https://bioimage.coe.drexel.edu) if you're interested
in learning more about the new version.**
The original lever software can be found in the 'archive' branch on this server,
but it is strongly suggested that you use the new version instead!
LEVER (lineage editing and validation) is a set of software tools for analyzing
time-lapse microscopy images of proliferating cells. LEVER includes algorithms for
......
# Specifically ignore autogenerated version info file
VersionInfo.m
\ No newline at end of file
function graphStruct = BuildDependencyGraph(chkPath, bRecurseExternal)
if ( ~exist('chkPath','var') || isempty(chkPath) )
chkPath = pwd();
end
if ( ~exist('bRecurseExternal','var'))
bRecurseExternal = true;
end
%% Make sure we get back to our current dir even on error.
oldDir = cd(chkPath);
cleanupObj = onCleanup(@()(cd(oldDir)));
%%
filenames = getAllFiles(chkPath);
%% Initialize sparse matrix assuming a fanout of about 10x
n = length(filenames);
graphStruct = struct('nodes',{filenames}, 'graph',{sparse([],[],[],n,n,10*n)});
graphStruct = recursiveGetDeps(chkPath, graphStruct, filenames, bRecurseExternal);
graphStruct = sortNodes(chkPath,graphStruct);
end
function graphStruct = sortNodes(localPath, graphStruct)
bLocal = strncmp(localPath,graphStruct.nodes, length(localPath));
localIdx = find(bLocal);
externalIdx = find(~bLocal);
%% Sort lexicographically, but all local functions are first.
[~,localSrt] = sort(graphStruct.nodes(bLocal));
[~,externalSrt] = sort(graphStruct.nodes(~bLocal));
srtIdx = [localIdx(localSrt); externalIdx(externalSrt)];
graphStruct.nodes = graphStruct.nodes(srtIdx);
graphStruct.graph = graphStruct.graph(srtIdx,:);
graphStruct.graph = graphStruct.graph(:,srtIdx);
end
function graphStruct = recursiveGetDeps(localPath,graphStruct, checkNames, bRecurseExternal)
if ( isempty(checkNames) )
return;
end
newEntries = {};
matRoot = matlabroot();
% Get single-link dependencies
for i=1:length(checkNames)
[fList,pList] = matlab.codetools.requiredFilesAndProducts(checkNames{i}, 'toponly');
toolboxes = arrayfun(@(x)(fullfile(matRoot,'toolbox',x.Name)),pList, 'UniformOutput',false);
selfIdx = find(strcmp(checkNames{i},fList));
if ( isempty(selfIdx) )
selfIdx = 1;
fList = [checkNames(i) fList];
end
newNodes = [fList.'; toolboxes.'];
newGraph = createCallGraph(selfIdx, newNodes);
newStruct = struct('nodes',{newNodes},'graph',{newGraph});
[graphStruct,addedNodes] = Dev.MergeGraphStruct(graphStruct, newStruct);
newEntries = [newEntries; addedNodes];
end
% Don't recurse through external dependencies
bMatlab = strncmp(matRoot,newEntries, length(matRoot));
newEntries = newEntries(~bMatlab);
if ( ~bRecurseExternal )
bNewLocal = strncmp(localPath,newEntries, length(localPath));
newEntries = newEntries(bNewLocal);
end
% Add java jar/class dependencies
% IMPORTANT: This assumes that ALL files in the same folder as the
% JAR or CLASS file depend upon it and that these are the ONLY direct
% dependencies on the java classes!
graphStruct = checkJavaDeps(graphStruct,newEntries);
graphStruct = recursiveGetDeps(localPath,graphStruct, newEntries, bRecurseExternal);
end
function graphStruct = checkJavaDeps(graphStruct,checkNodes)
[checkDirs,~,ic] = unique(cellfun(@(x)(fileparts(x)),checkNodes, 'UniformOutput',false));
for i=1:length(checkDirs)
jarList = dir(fullfile(checkDirs{i},'*.jar'));
classList = dir(fullfile(checkDirs{i},'*.class'));
javaNodes = arrayfun(@(x)(fullfile(checkDirs{i},x.name)), [jarList;classList], 'UniformOutput',false);
if ( isempty(javaNodes) )
continue;
end
depNodes = checkNodes(ic==i);
[javaGraph,mergeNodes] = createCompleteCallGraph(depNodes,javaNodes);
newStruct = struct('nodes',{mergeNodes},'graph',{javaGraph});
graphStruct = Dev.MergeGraphStruct(graphStruct,newStruct);
end
end
% This creates a completely connected caller->callee graph, there cannot be
% any overlap in caller/callee nodes.
function [callGraph,mergeNodes] = createCompleteCallGraph(callerNodes,callNodes)
[iIdx,jIdx] = ndgrid(1:length(callerNodes),length(callerNodes)+(1:length(callNodes)));
numEdges = numel(jIdx);
mergeNodes = [callerNodes;callNodes];
callGraph = sparse(iIdx(:),jIdx(:), ones(numEdges,1), length(mergeNodes),length(mergeNodes));
end
% This uses a pre-merged node entry list with a single caller and connects
% the caller to all the other nodes in the graph.
function callGraph = createCallGraph(callerIdx,newNodes)
jIdx = setdiff(1:length(newNodes),callerIdx);
iIdx = repmat(callerIdx,1,length(jIdx));
callGraph = sparse(iIdx,jIdx, ones(1,length(jIdx)), length(newNodes),length(newNodes));
end
function fullNames = getAllFiles(dirName)
matlabFiles = what(dirName);
funcFileNames = vertcat(matlabFiles.m);
funcFileNames = [funcFileNames; vertcat(matlabFiles.mex)];
fullNames = cellfun(@(x)(fullfile(dirName,x)), funcFileNames, 'UniformOutput',false);
for i=1:length(matlabFiles.packages)
pkgFullNames = getAllFiles(fullfile(dirName, ['+' matlabFiles.packages{i}]));
fullNames = [fullNames; pkgFullNames];
end
for i=1:length(matlabFiles.classes)
classDir = fullfile(dirName, ['@' matlabFiles.classes{i}]);
if ( ~exist(classDir,'dir') )
continue;
end
classFullNames = getAllFiles(classDir);
fullNames = [fullNames; classFullNames];
end
end
function BuildInstaller()
compStruct = Dev.SetupCPPCompiler('vs2015');