# Seed grow script , argument size limit

**URL:** <https://discourse.slicer.org/t/seed-grow-script-argument-size-limit/9250>\
**Category:** Support\
**Created:** [November 21, 2019, 2:22pm UTC](https://discourse.slicer.org/t/seed-grow-script-argument-size-limit/9250 "2019-11-21T14:22:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![prorai](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@prorai](https://discourse.slicer.org/u/prorai)\
**Post date:** [November 21, 2019, 2:22pm UTC](https://discourse.slicer.org/t/seed-grow-script-argument-size-limit/9250/1 "2019-11-21T14:22:17Z")

</div>

Hi @lassoan  
Today i was using the seedgrow script , when i’m passing the seeds values , around 100+ seeds XYZ value.  
app just got crashed without any log info.  
before i’ve tried with around 80 seeds XYZ values, and it works all good for me.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 21, 2019, 2:27pm UTC](https://discourse.slicer.org/t/seed-grow-script-argument-size-limit/9250/2 "2019-11-21T14:27:30Z")

</div>

> [@prorai](#):
>
> Today i was using the seedgrow script

Which seedgrow script are you referring to?

---

<div class="post-metadata">

**Author:** ![prorai](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@prorai](https://discourse.slicer.org/u/prorai)\
**Post date:** [November 21, 2019, 2:29pm UTC](https://discourse.slicer.org/t/seed-grow-script-argument-size-limit/9250/3 "2019-11-21T14:29:49Z")

</div>

I’m using the same script which have in your example database , and i’m passing seeds as parameters to it.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 21, 2019, 2:50pm UTC](https://discourse.slicer.org/t/seed-grow-script-argument-size-limit/9250/4 "2019-11-21T14:50:05Z")

</div>

Could you post the link here?

---

<div class="post-metadata">

**Author:** ![prorai](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@prorai](https://discourse.slicer.org/u/prorai)\
**Post date:** [November 22, 2019, 6:52am UTC](https://discourse.slicer.org/t/seed-grow-script-argument-size-limit/9250/5 "2019-11-22T06:52:54Z")

</div>

> <https://gist.github.com/lassoan/2d5a5b73645f65a5eb6f8d5f97abf31b>

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 22, 2019, 2:27pm UTC](https://discourse.slicer.org/t/seed-grow-script-argument-size-limit/9250/6 "2019-11-22T14:27:26Z")

</div>

There is nothing specific in the script that would prevent you from using many seeds, but the approach used in the example is certainly not optimal for 100+ seeds.

If spheres overlap then the behavior is somewhat unpredictable (regions that are in intersection of even number of spheres will be excluded).

If you have so many spheres then it also means that probably they are small, so creating sphere models for them is very inefficient.

Instead, you probably want to just set voxel values directly in the binary labelmap representation. You can compute voxel coordinates of binary labelmap representation in Segmentation nodes similarly to how voxel coordinates are computed for volume nodes in [this example](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get_volume_voxel_coordinates_from_markup_fiducial_RAS_coordinates).

---

<div class="post-metadata">

**Author:** ![prorai](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@prorai](https://discourse.slicer.org/u/prorai)\
**Post date:** [November 22, 2019, 3:04pm UTC](https://discourse.slicer.org/t/seed-grow-script-argument-size-limit/9250/7 "2019-11-22T15:04:17Z")

</div>

> [@lassoan](#):
>
> Instead, you probably want to just set voxel values directly in the binary labelmap representation. You can compute voxel coordinates of binary labelmap representation in Segmentation nodes similarly to how voxel coordinates are computed for volume nodes

can i create a segment\3D model using this?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 22, 2019, 3:06pm UTC](https://discourse.slicer.org/t/seed-grow-script-argument-size-limit/9250/8 "2019-11-22T15:06:47Z")

</div>

Yes, that would work the same way.
