PDA

View Full Version : ? storing segmented objects in Labels


durham
12th August 2009, 04:39
Hi:

We can store segmented objects in one single Lable icon or multiple ones.

In the first approach, we can store segmented fat, muscle, and bone in

an icon, myObj.Labels. In the later approach, we segment an object each

time and then save it in separated Label. For example, we segment fat from

non-fat and then store them in fat.Labels. Then we repeat this way to create

muscle.Labels and bone.Labels.

Two different ways are conducted because I use 2 different numerical

software to process the segmented objects. One software take the former

all-in-one Label while the other must load each of the segmented objected

object separately.

Then I am forced to segment the same image set twice, which is not an

efficient approach. How can I segment the image set only once and then

just export them out differently using STL format?

Thanks,

ShawnZhang
12th August 2009, 20:28
Hi Durham,

Mike will provide you with an arithmatic module based solution manipulating the label field.

Here is a surface based work-around.

After you have the geometry with multiple surfaces, attach a "SurfaceView" module, in "Materials" port, choose the materials/tissues that correspond to the surface of interest. Then click in Buffer port "Clear" then "Add".

Now right-click "SurfaceView", and choose "VRML-Export". This will allow you to export only the surface triangle that is selected.

Unfortunately, it will only export to a file, which you can load and use "Compute/IvToSurface" to convert it to Avizo geometry surface, and then export it to STL.

This process involves quite some mouse clicks, which can be automated with a script.

durham
13th August 2009, 15:10
Hi ShawnZhang:

Tried what you suggested but it did not work.

image.surf -> SurfaceView

-> In the Materials (of SurfaceView) there are two drop-down options.

I tried to select only the first to be Bone, hit the botton Clear, and

then hit the botton Add. Then I saw only bone structure in the viewer.

Note: there are Extrior, Fat, Muscle, and Bone in my segmentation.

-> Then I use VRML-Export to save it as bone.wrl.

-> Load bone.wrl -> IvSurface -> SurfaceView2.

What it showed is Fat!

Where did I do wrong?

I also tried to select the two drop-down options to be both Bone. That

still gave me Fat after I save and then re-open it.

mmarsh
13th August 2009, 19:30
97Hi Durham

I have created a ScriptObject that will help you (and others) with this requirement.
To install and execute the script object, follow these two steps.


Copy the two attachments to $AVIZO_LOCAL/share/script-objects.
Select the LabelfieldDemux module from the Labelling menu


The script-object has the choice of three behaviors.
Suppose an input labelfield with three materials: Skin, Muscle, Bone
Option 1:Binary, will create thee binary maps named Skin, Muscle, and Bone, where each map is 1 where the pixels are the appopriate material and 0 elsewhere.

Option2:LUT Value, will use the same lookup-table value that is in your input labelfield. The result would be three maps, named Skin, Muscle and Bone, where the Skin map is 0 or 1, the Muscle map is 0 or 2, and the Bone map is 0 or 3.

Option3:Mask Greyscale Intensity, will make scalarfield outputs that have the same intensity at each voxel as that found in the input scalarfield. For this option, you must also connect an input scalarfield.

Strictly speaking, this script-object will output four maps, because in addition to Skin, Muscle, and Bone, there is probably another material for Exterior.

durham
13th August 2009, 20:38
Hi Mike:

There is no such directory in my PC. I only have

\Avizo60Local\share\

Under the above directory, there is only another directory.

\Avizo60Local\share\resources

I manually created a directory

\Avizo60Local\share\script-objects

then place both attachments there. But I did not see anything like

LabelfieldDemux

in the Labelling option.

I tried to remove them and then put them in

\Avizo6.0\share\script-objects

Neither can I see anything like LabelfieldDemux

in the Labelling option.

What's wrong and what should I do?

Thanks,

mmarsh
13th August 2009, 20:44
Hi Durham,

$AVIZO_LOCAL is an environment variable, that has different meanings on different operating systems.
$AVIZO_ROOT is another environment variable that will also work.

Here are the specific locations for you to copy the files, for the different operating systems

MS Windows: C:\Program Files\Avizo6.0\share\script-objects
Mac OS: /Applications/Avizo-6.0.0/share/script-objects
Linux: /opt/Avizo-6.0.0/share/script-objects


Let me know if this needs more clarification.

Thanks,
Mike

durham
13th August 2009, 20:59
Yes, Mike, I did put them (LabelfieldDemux.scro and LabelfieldDemux.rc) in

C:\Program Files\Avizo6.0\share\script-objects

Then I launched Avizo, imported a set of images. Next I right-clicked on

the image icon and selected Labelling. But I saw only 4 options:

CorrelationPlot, LabelField, LabelVoxel, and Quantification-Threshold.

I did not see LabelfieldDemux

mmarsh
13th August 2009, 21:11
Sorry. It looks like you have already installed them in the right folder. I wasn't clear about another important detail.

My module is designed to be connected directly to an existing labelfield. Load the labelfield, for which you want to extract all of the different labels and make surface and STL files.

Once you have that labelfield loaded, then you can connect the LabelfieldDemux module.

Is this more clear?

-Mike