Skip to content

Commit

Permalink
Update 2d_feature_extraction tool
Browse files Browse the repository at this point in the history
  • Loading branch information
kostrykin committed Apr 23, 2024
1 parent 14e6d71 commit 8772c79
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tools/2d_feature_extraction/2d_feature_extraction.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import argparse

import giatools.io
import numpy as np
import pandas as pd
import skimage.feature
import skimage.io
import skimage.measure
import skimage.morphology
import skimage.segmentation
Expand Down Expand Up @@ -57,9 +57,9 @@

raw_image = None
if args.raw_file is not None:
raw_image = skimage.io.imread(args.raw_file.name)
raw_image = giatools.io.imread(args.raw_file.name)

raw_label_image = skimage.io.imread(label_file)
raw_label_image = giatools.io.imread(label_file)

df = pd.DataFrame()
if label_file_binary:
Expand Down Expand Up @@ -124,4 +124,4 @@
df['convexity'] = area / (perimeter * perimeter)

del df['it']
df.to_csv(out_file, sep='\t', line_terminator='\n', index=False)
df.to_csv(out_file, sep='\t', lineterminator='\n', index=False)
9 changes: 5 additions & 4 deletions tools/2d_feature_extraction/2d_feature_extraction.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>with scikit-image</description>
<macros>
<import>creators.xml</import>
<token name="@TOOL_VERSION@">0.14.2</token>
<token name="@TOOL_VERSION@">0.18.1</token>
<token name="@VERSION_SUFFIX@">0</token>
</macros>
<creator>
Expand All @@ -17,9 +17,10 @@
</xrefs>
<requirements>
<requirement type="package" version="@TOOL_VERSION@">scikit-image</requirement>
<requirement type="package" version="0.23.4">pandas</requirement>
<requirement type="package" version="1.15.4">numpy</requirement>
<requirement type="package" version="0.15.1">tifffile</requirement>
<requirement type="package" version="2.2.2">pandas</requirement>
<requirement type="package" version="1.23.3">numpy</requirement>
<requirement type="package" version="2020.10.1">tifffile</requirement>
<requirement type="package" version="0.1">giatools</requirement>
</requirements>
<command detect_errors="aggressive">
<![CDATA[
Expand Down

0 comments on commit 8772c79

Please sign in to comment.