SCIRun User Mailing List

Text archives Help


[SCIRUN-USERS] Biomesh 3D question


Chronological Thread 
  • From: Purbasha Garai <pg0222@gmail.com>
  • To: scirun-users@sci.utah.edu
  • Subject: [SCIRUN-USERS] Biomesh 3D question
  • Date: Wed, 17 Dec 2014 00:02:31 -0500


Hello Brett, 

Thank you so much for the response.

I have 8GB RAM memory.

In output, I have _sf.nrrd file, which I have converted into _sf.fld. I have then changed the sizing field and saved in the output file as _sf.nrrd format. I have tried changing the sf and re-meshing. It is giving an error in pid-8

Also, while computing element lead field matrix using the network "build-fem-elem-lead-field.srn", with "particle-union.tets-labeled_transformed.fld" and "electrode nodes.fld" its giving an error of "going out of memory". 

Your help will be highly appreciated. 

Regards
Purbasha

On 11 December 2014 at 18:12, Brett Burton <bburton@sci.utah.edu> wrote:
How much memory do you have?  You may be able to run the simulation without visualization and then map that information onto a smaller  mesh and visualize, but that probably isn't what you want.

For visualization, you can try the SplitFieldByDomain module and then run GetFieldBoundary module before trying to visualize.  For the first attempt of visualization, I wouldn't visualize more than one tissue at a time.  This will also allow you to see if you have holes in your mesh.  If that works, then you can use the suggestion in the above paragraph.  If it doesn't, you'll probably have to do one of two things:

1 - manually alter your sizing field and remesh (instructions below)
2 - remesh from scratch (perhaps using Cleaver, but don't do that yet - Cleaver might be broken)

Manually changing your sizing field:

- Find the _sf.fld files associated with each of your tissues in the Biomesh output.
- Make a copy of each (just to be safe)
- Open the original sf files in SCIRun (each one individually)
- Connect a CalculateFieldData module
- in the UI of that module type RESULT = DATA + 1; 
(1 being the minimum value that you want your sizing field to have -- make this number anything you want)
- Double check that you did it right by hooking a ReportFieldInfo module to the CalculateFieldData module and comparing it to one attached to the original ReadField module
- Save out the new sizing fields by hooking the CalculateFieldData module to the WriteFieldData module
- If you hook the Green output port of the original ReadField module to the Green input port of the WriteField it will popular the file name and path for you.
- Once you have saved out all of the independent sizing fields re-run Biomesh like you would normally, except you need to run it from stage 5 on.

ex.

./BuildMesh.py -s5:8 model_config.py

(the -s5:8 means stages 5 through 9)

Let me know if that helps.


On Dec 10, 2014, at 2:15 PM, Purbasha Garai <pg0222@gmail.com> wrote:

Hello Brett, 

I need it for the simulation of various neural interfaces on it. But, at the same time I would life to see the visualization of the nerve.

Regards
Purbasha

On 10 December 2014 at 13:53, Brett Burton <bburton@sci.utah.edu> wrote:
What is your final intent for this file?  Do you want to run simulations on it or just visualize it?


On Dec 9, 2014, at 1:32 PM, Purbasha Garai <pg0222@gmail.com> wrote:

Hello Brett, 

I have generated the whole mesh, but the final mesh size is too big (around 450MB); . Now when I try to run and visualize it in SCIRun, it is going out of memory. while looking at the biomesh 3d manual, i came across the following solution, but I am unsure how to implement it. 
(Large data sets require more memory than is available - A temporary,
hard-coded x has been implemented for relatively large datasets by multiplying
the binning radius by 4. This will be changed to allow for a more dynamic
handling of method so that large data sets will automatically reduce the size of
the binning radius and allow for proper memory management.) 

Also, I have modeled another simplified version of sciatic nerve with less number of masks. 
I have run this simulation with the  following model_config. 

[model_input_file="C:\Users\Purbasha\Desktop\Simulation_nets\simple_geometry\Dec_Setr\sciatic nerve with saline.nrrd"

model_output_path="C:\Users\Purbasha\Desktop\Simulation_nets\output_sn with saline"

# -1 means all the rest of the materials combined
mats = (0, 1, 2, 3, 4, 5)
mat_names = ('background', 'saline', 'electrode', 'epineurium', 'perineurium', 'endoneurium')
mat_radii = 0.01
refinement_levels=2
# Cap number of processes
max_procs=2
MAX_SIZING_FIELD = 50.0
SIZING_SCALE_VAR = 20.0
# tetgen flags to use when making a volume from all the materials
# combined
tetgen_joined_vol_flags = "zpAAqa10"
num_particle_iters = 20 ] 

So far, it is running stage 8. 

Is there any way to downstream such a big file? 


Regards
Purbasha

On 4 December 2014 at 14:10, Brett Burton <bburton@sci.utah.edu> wrote:
Purbasha,

The BioMesh run has been in process 4 for over 24 hours…it may be hung.  I will try to restart it with a value of 20 particle iterations instead of the 1000 it has now to see if we can get it to complete at least.


On Dec 3, 2014, at 11:31 AM, Brett Burton <bburton@sci.utah.edu> wrote:

Purbasha,

Here are some images of the surfaces created.  The sizing fields look questionable, but I'll keep checking in on it on my end.  I've also attached the model_config file.  If I remember right, I changed the number of refinement levels used in the medial axis (which is step 3 and should not affect step 2), commented out the constant sizing field parameter (Also downstream from step 2) and increased the number of particle system iterations.  You might want to make the particle system iterations much smaller than what I have.  The process is taking a long time with mine set to 1000.  Maybe try 20 as a first pass test.  If that works, start ramping up the number to something more reasonable.  Consider 1000 to be your ceiling for that parameter.
<model_config_modified_again.py>
<Screen Shot 2014-12-03 at 11.21.29 AM.png>
<Screen Shot 2014-12-03 at 11.23.38 AM.png>



On Dec 3, 2014, at 9:10 AM, Purbasha Garai <pg0222@gmail.com> wrote:

Dear Brett, 

Thank you so much. Your help is really appreciated. 

I was wondering if the parameters in the model_config file is correct. 
Could you please send me the model_config file that you have used for the model? 

Regards
Purbasha

On 3 December 2014 at 11:05, Brett Burton <bburton@sci.utah.edu> wrote:
Purbasha,

Over the past 30 hours, Biomesh has gotten through 4 process of the particle system.  The particle system is stage 6 and is the biggest bottleneck of the system.  I don't know why you are getting errors in stage 2.  It may be something to do with your settings on Windows…but I am not an operating system expert, so that is just a guess.  I will send you image files of the field boundaries as soon as I get into the office so that you can inspect them and see if they are what you want.


On Dec 2, 2014, at 6:09 AM, Purbasha Garai <pg0222@gmail.com> wrote:

I have also tried it without constant size, but I'm still getting the same error.

Surely. That will be a great help.

On Tue, Dec 2, 2014, 1:27 AM Brett Burton <bburton@sci.utah.edu> wrote:
I have let it go on my machine (Mac OS 10.8) and have had it complete through stage 3 so far.  I commented out the Constant sizing field parameter (although that shouldn't matter in stage 2 anyway).  Perhaps there is something wrong with the Windows build.  I'll let it run through the entire process tomorrow on a bigger computer than my laptop and see if I can get this to generate completely.  I'm not sure how long it will take.  There are several 1 pixel thick volumes defined.


On Dec 1, 2014, at 7:02 PM, Purbasha Garai <pg0222@gmail.com> wrote:

Yes. While computing stage 2

On Mon, Dec 1, 2014, 6:46 PM null <darrell.swenson@gmail.com> wrote:
Do you get this in stage 2?
Sent via BlackBerry by AT&T

From: Purbasha Garai <pg0222@gmail.com>
Date: Mon, 1 Dec 2014 18:22:27 -0500
To: Darrell Swenson<darrell.swenson@gmail.com>
Cc: Brett Burton<bburton@sci.utah.edu>; Petar Petrov<pip010@gmail.com>; Elizabeth Jurrus<liz@sci.utah.edu>
Subject: Re: [SCIRUN-USERS] Biomesh 3D question

Hello all, 

I was trying to generate mesh for the sciatic nerve using Biomesh3D, but its giving me the an error in JoinField.exe I am attaching the model_config.py code. I have tried generating the mesh using Scirun 4.7 (with tetgen_joined_vol_flags = "pYzqA")  as well as SciRun 4.6 (with tetgen_joined_vol_flags = "zpAAqa10"), but getting the same error. Any help will be really appreciated. 

Thank you




Regards
Purbasha

On 24 November 2014 at 18:41, Darrell Swenson <darrell.swenson@gmail.com> wrote:
They added it per my suggestion for the gui version of Biomesh3D. I have never tried it in the script version of BM3D, but I hope it would work there as well.

Darrell

On Mon, Nov 24, 2014 at 11:13 AM, Brett Burton <bburton@sci.utah.edu> wrote:
I have also not seen this call. I thought someone had perhaps added it.

The way that we apply a constant sizing field is to open up the sf file in SCIRun, connect it to a CalculateSizingField module and define the sf (DATA = "2). " Then we save it over the original sizing field file and continue running Biomesh after the sizing field (add the -s5:8 flag in the Biomesh call).  I can provide a network and a step-by-step walk thru if needed.


On Nov 24, 2014, at 11:49 AM, Petar Petrov <pip010@gmail.com> wrote:

Hi Brett,
do you mean:
CONSTAN_SIZING_FIELD

because, this one I haven't seen anywhere. not in any sample model_config.py nor in the code for the particle optimization (step 6).

Cheers,
Petar

On Thu, Nov 20, 2014 at 6:56 PM, Brett Burton <bburton@sci.utah.edu> wrote:
Is the constant sizing field parameter supposed to be misspelled?


On Nov 19, 2014, at 7:05 AM, Petar Petrov <pip010@gmail.com> wrote:

From your model_config.py
MAX_SIZING_FIELD = 5.0
SIZING_SCALE_VAR = 2.0
CONSTAN_SIZING_FIELD = 5

AFAIK only MAX_SIZING_FIELD is used!

try changing it like lower and also matt_radii to 0.1 or 0.01 but not 0

i experience crashes with some combination of the two params but not with other. 
using the same model!

On Tue, Nov 18, 2014 at 8:32 PM, Elizabeth Jurrus <liz@sci.utah.edu> wrote:
Forwarding to scirun-users.
- liz


-------- Forwarded Message --------
Subject: Message distribution: Authorization denied
Date: Tue, 18 Nov 2014 14:02:02 -0500
From: Purbasha Garai <pg0222@gmail.com>
To: scirun-users-request@sci.utah.edu


Hello,

I am trying to mesh a nerve using Biomesh 3D. It was terminating abruptly at stage 6. 

i am attaching the 'model_config' code  and the error below. 
Please guide me.

Thank you so much
Regards
Purbasha







--
All the best,
Petar Petrov
http://ppetrov.net




--
All the best,
Petar Petrov
http://ppetrov.net









<value.JPG><sciatic nerve with saline.nrrd>





  • [SCIRUN-USERS] Biomesh 3D question, Purbasha Garai, 12/16/2014

Archive powered by MHonArc 2.6.18.

Top of page