Skip to content

Commit c1abade

Browse files
author
Stefan Hahmann
committed
Allow setting StarDist data 2d/3d
1 parent 789e3fe commit c1abade

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/org/mastodon/mamut/detection/StarDist.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ public ModelType getModelType()
151151
return modelType;
152152
}
153153

154+
public void setDataIs2D( final boolean dataIs2D )
155+
{
156+
this.dataIs2D = dataIs2D;
157+
}
158+
154159
private String getImportStarDistCommand()
155160
{
156161
if ( modelType.getModelPath() == null )

src/main/java/org/mastodon/mamut/detection/StarDistDetector.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public void compute( final List< SourceAndConverter< ? > > sources, final ModelG
135135
* will have a size of 1.
136136
*/
137137
Img< ? > segmentation = starDist.segmentImage( Cast.unchecked( image ) );
138+
starDist.setDataIs2D( !isData3D );
138139

139140
final AffineTransform3D transform = DetectionUtil.getTransform( sources, timepoint, setup, level );
140141
LabelImageUtils.createSpotsForFrame( graph, Cast.unchecked( segmentation ), timepoint, transform, 1d );

0 commit comments

Comments
 (0)