-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collection table with contrasts per grid position
- Loading branch information
Showing
45 changed files
with
725 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
356acc218258751f5e1ed53ee870d42ab21dd673 20231226200404 README.md | ||
2c83491b886d08de395d00c4022aba2a85c71bba 20230807160348 images/74152530-c9603500-4c0e-11ea-81d8-d518b9ed1ef3.png | ||
82fdb8b52f6193f76125d9890d321bef40df48c1 20230807160348 images/74152904-98cccb00-4c0f-11ea-9819-6c772174a2c0.png | ||
a375450e7776d246071f5b50c9f477b8f96eccde 20230807160348 images/74152986-cc0f5a00-4c0f-11ea-869d-23456fec0cdc.png | ||
bec35cfbf13684d4ef73521e737b7f691492c7f6 20230807160348 images/74168546-37febc00-4c2a-11ea-9981-85232ed5322e.png | ||
11f8d83f03952423124d3f46a7a22189fb052190 20230807160348 images/74252332-d2740380-4ced-11ea-9a4e-d25cb1e83859.png | ||
d238dc37c990bc99d20ed721e1fc7830f999fadc 20230807160348 images/mobie-beta-update-site.png | ||
2c4cbd6b245d453691974d4d94d6a95e3a5441a6 20230807160348 images/mobie-logo-highres.png | ||
25f4e1de2d22ac36510a496229e4b51d47134f13 20231206194322 scripts/visualise_morpholibj_2d_output.ijm | ||
6163a44341132da743ca32573b1b8bed7139b85c 20231206194322 scripts/visualise_morpholibj_3d_output.ijm | ||
c0b74dc4fb1134303d666aa3e4455c6d54487e05 20231206194322 scripts/visualise_particleanalyzer_2d_output.ijm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
src/main/java/org/embl/mobie/command/open/special/OpenMicrogliaTableCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
/*- | ||
* #%L | ||
* Fiji viewer for MoBIE projects | ||
* %% | ||
* Copyright (C) 2018 - 2024 EMBL | ||
* %% | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, | ||
* this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE | ||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
* #L% | ||
*/ | ||
package org.embl.mobie.command.open.special; | ||
|
||
import loci.common.DebugTools; | ||
import org.embl.mobie.MoBIE; | ||
import org.embl.mobie.MoBIESettings; | ||
import org.embl.mobie.command.CommandConstants; | ||
import org.embl.mobie.command.SpatialCalibration; | ||
import org.embl.mobie.lib.MoBIEHelper; | ||
import org.embl.mobie.lib.transform.GridType; | ||
import org.scijava.ItemVisibility; | ||
import org.scijava.command.Command; | ||
import org.scijava.plugin.Parameter; | ||
import org.scijava.plugin.Plugin; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
@Plugin(type = Command.class, menuPath = CommandConstants.MOBIE_PLUGIN_OPEN + "Special>Open Microglia Morphometry Table..." ) | ||
public class OpenMicrogliaTableCommand implements Command { | ||
|
||
static { net.imagej.patcher.LegacyInjector.preinit(); } | ||
|
||
@Parameter( label = "Table", required = true ) | ||
public File table; | ||
|
||
@Parameter(visibility = ItemVisibility.MESSAGE, | ||
persist = false, | ||
required = false ) | ||
private String message = "Opens tables created with the Microglia-Morphometry plugin."; | ||
|
||
@Parameter(visibility = ItemVisibility.MESSAGE, | ||
persist = false, | ||
required = false) | ||
private String info = "More info: https://github.com/embl-cba/microglia-morphometry"; | ||
|
||
|
||
private String images = "Path_Intensities,Path_Skeletons,Path_Annotations"; | ||
|
||
private String labels = "Path_LabelMasks"; | ||
|
||
private File root; | ||
|
||
private String pathMapping; | ||
|
||
private SpatialCalibration spatialCalibration = SpatialCalibration.FromImage; | ||
|
||
private GridType gridType = GridType.Transformed; | ||
|
||
@Override | ||
public void run() | ||
{ | ||
run( gridType ); | ||
} | ||
|
||
private void run( GridType gridType ) | ||
{ | ||
DebugTools.setRootLevel( "OFF" ); | ||
|
||
final MoBIESettings settings = new MoBIESettings(); | ||
|
||
spatialCalibration.setVoxelDimensions( settings, table != null ? table.getAbsolutePath() : null ); | ||
root = table.getParentFile(); | ||
|
||
List< String > imageList = new ArrayList<>(); | ||
if ( images != null && ! images.equals( "" ) ) | ||
{ | ||
imageList = Arrays.asList( images.split( "," ) ); | ||
imageList = imageList.stream().map( s -> s.trim() ).collect( Collectors.toList() ); | ||
} | ||
|
||
List< String > labelList = new ArrayList<>(); | ||
if ( labels != null && ! labels.equals( "" ) ) | ||
{ | ||
labelList = Arrays.asList( labels.split( "," ) ); | ||
labelList = labelList.stream().map( s -> s.trim() ).collect( Collectors.toList() ); | ||
} | ||
|
||
try | ||
{ | ||
String rootPath = root == null ? null : root.getAbsolutePath(); | ||
new MoBIE( table.getAbsolutePath(), imageList, labelList, rootPath, pathMapping ,gridType, settings ); | ||
} | ||
catch ( IOException e ) | ||
{ | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
Oops, something went wrong.