SCI Seg3D Mailing List

Text archives Help


Re: [Seg3D] Batch resample from multiple size masks


Chronological Thread 
  • From: Ayla Khan <ayla@sci.utah.edu>
  • To: seg3d@sci.utah.edu
  • Cc: George Spirou <gspirou@hsc.wvu.edu>, Michael Morehead <mmorehea@mix.wvu.edu>, Gianfranco Doretto <gianfranco.doretto@mail.wvu.edu>, Paul Holcomb <paul.holcomb@gmail.com>
  • Subject: Re: [Seg3D] Batch resample from multiple size masks
  • Date: Tue, 14 Apr 2015 23:04:27 -0600

Hi Paul,

I've uploaded a very preliminary Windows build of the next release candidate:  http://www.sci.utah.edu/devbuilds/seg3d/Seg3D2-2.2.0-win64.exe. It's rough, but should be sufficient for you to test.

I haven't had a chance to dig into the script you sent - I will have a look at it as soon as I have some time available.

Thanks,

Ayla

On Apr 9, 2015, at 8:27 AM, Paul Holcomb wrote:

Seg3D Team,

I had a few questions and one piece of code that I wanted to share.

First, in relation to masks being resampled from different geometry groups into a single group simultaneously, how would you suggest to implement that in Seg3D using the python console?

Second, Ayla mentioned that ITK4 is being included in the next version of Seg3D.  Do you have a beta version with this implemented that I could test?  I'm dealing with very large image volumes, and ITK filter failure is the major problem we're having with implementing a fast segmentation solution in Seg3D.

Because of the ITK problem, as well as inherent noisiness in our data, I've written a Matlab script to address a consistent problem we have with pulling segmentations using connected component analysis.  Currently, after using a histogram equalization and thresholding, we can get an approximate mask for structures we are interested in.  However, these structures are almost invariably linked to unwanted structures, sometimes by as little as one pixel.  These connections are tedious to find and remove by eye, especially if the connection is small.  To speed this up, I've created a flood fill path script.  The script takes as its input a series of TIFF images exported from the mask in Seg3D that needs to be refined, as well as two points: one point (x y z) inside the structure that should be preserved, and one point (x y z) inside the unwanted structure.  Using flood fill followed by a backward walk from the last point to the first, a binary mask is generated that is the approximate shortest path within the original mask between the two points.  By tracking along this path, the user can quickly find points of erroneous connection.

There are a few problems with this, however.  First, in order for the script to work, the user has to have ImageMagick, Python, and Matlab installed.  Second, the user has to leave the Seg3D environment, exporting the masks as TIFF files, running the script on the command line, and then importing the result back into Seg3D.  Third, the origin and scaling data for the result is currently default (origin: 0,0,0 scale: 1,1,1) and therefore has no relationship to the original mask or data, meaning the user has to manually transform the result mask.  Fourth, the current path is only approximate, contains a lot of data spread, and is somewhat slow on larger datasets.  Finally, as the process isn't integrated with Seg3D, it is necessary to iterate to a solution manually; that is, the user creates one result path, eliminates the erroneously connected pixels, and if the connected component analysis still does not remove the unwanted structure(s), the user must repeat all of the steps of the process again.

I think most, if not all, of these issues could be addressed by integrating this or a similar tool into the standard toolkit for Seg3D, but unfortunately I lack the C++ experience necessary to create it.  I've included a test data set and test mask, as well as the code and a short instruction sheet on how to set up and use it.

Thanks for all of your help,

Paul Holcomb

On Fri, Mar 27, 2015 at 12:38 AM, Ayla Khan <ayla@sci.utah.edu> wrote:
Hi Paul,

Having the masks belong to different geometry groups makes things interesting for the Resample tool. Maybe this would be best handled in Python?

Ayla

On Mar 25, 2015, at 8:23 AM, Paul Holcomb wrote:

Ayla,

Here's a picture with masks that I want to resample.  The VCN_c18_input04_part1-3 masks need to be resampled into the large (1442x1344x1852) data volume to be combined with other segmentations.  Ideally, I would like a way to resample all of them at once.

Thanks!

Paul

On Tue, Mar 24, 2015 at 3:42 PM, Ayla Khan <ayla@sci.utah.edu> wrote:
Hi Paul,

Could you please send pictures?

Thanks,

Ayla

On Mar 23, 2015, at 8:12 AM, Paul Holcomb wrote:

> Dear Seg3D team,
>
> I have a single object that has been segmented incrementally, so it exists as several different masks of varying sizes, but all in the context of a larger single volume.  I'd like to piece this object back together as quickly as possible.  Is there a way to set up a batch resample to put multiple layers into a single larger volume?
>
> I hope that makes sense.  If not, let me know and I can send pictures.
>
> Paul Holcomb
>
> --
> "Hope is a state of mind, not of the world. Hope, in this deep and powerful sense, is not the same as joy that things are going well, or willingness to invest in enterprises that are obviously heading for success, but rather an ability to work for something because it is good." ~Vaclav Havel




--
"Hope is a state of mind, not of the world. Hope, in this deep and powerful sense, is not the same as joy that things are going well, or willingness to invest in enterprises that are obviously heading for success, but rather an ability to work for something because it is good." ~Vaclav Havel
<Three segmentations to resample to large volume.tif>




--
"Hope is a state of mind, not of the world. Hope, in this deep and powerful sense, is not the same as joy that things are going well, or willingness to invest in enterprises that are obviously heading for success, but rather an ability to work for something because it is good." ~Vaclav Havel
<floodfillpath.zip>




Archive powered by MHonArc 2.6.18.

Top of page