shapeworks-users

Text archives Help


Re: [shapeworks-users] Shapeworks does not seem to properly place particles on specimens with different sizes. How can we fix that?


Chronological Thread 
  • From: "Savriama, Yoland F" <yoland.savriama@helsinki.fi>
  • To: "Shapeworks-users@sci.utah.edu" <Shapeworks-users@sci.utah.edu>
  • Subject: Re: [shapeworks-users] Shapeworks does not seem to properly place particles on specimens with different sizes. How can we fix that?
  • Date: Thu, 14 Sep 2017 11:14:43 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=yoland.savriama@helsinki.fi;
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Dear all,


I have been having issues with saving my project and therefore the associated data from Shapeworks. I converted .tiff stacks produced from Amira as compressed .mha files using Fiji. These .mha files are imported properly in shape works and undergo the full analysis. 


However, I am only able to save the project at the stage in which the data are imported in the software, meaning that whenever I try to save the project once the grooming step has been performed or beyond that, the software unexpectedly quits with no error message.


I am working with 37 files and their sizes are ranging from 89kb to 454kb (most of them only reach 100-200kb). The total size of all files put together is less than 7Mb (6.71Mb). 

I use a desktop machine with Windows 7 Intel Xeon CPU X5550 @ 2.67 GHz 2.66 Ghz (2 processors) 48 Gigs of Ram 64 bit OS

Graphic Card: Nvidia GeForce GTX 680 Total available graphics : 7934Mb and dedicated video memory: 4096 MB GDDR 5
Here is the file I managed to save right after the data were imported in the software.

<?xml version="1.0" encoding="UTF-8"?>

<project version="1">

    <cache_enabled>true</cache_enabled>

    <cache_epsilon>0.00100000005</cache_epsilon>

    <cache_memory>25</cache_memory>

    <color_scheme>0</color_scheme>

    <display_state>Groomed</display_state>

    <glyph_quality>11</glyph_quality>

    <glyph_size>4</glyph_size>

    <groom_antialias>true</groom_antialias>

    <groom_antialias_amount>100</groom_antialias_amount>

    <groom_blur>true</groom_blur>

    <groom_blur_sigma>2</groom_blur_sigma>

    <groom_center>true</groom_center>

    <groom_crop>false</groom_crop>

    <groom_fastmarching>false</groom_fastmarching>

    <groom_fastmarching_isovalue>0.5</groom_fastmarching_isovalue>

    <groom_fastmarching_sigma>2</groom_fastmarching_sigma>

    <groom_fill_holes>true</groom_fill_holes>

    <groom_isolate>true</groom_isolate>

    <groom_pad>true</groom_pad>

    <groom_pad_value>5</groom_pad_value>

    <neighborhood>9</neighborhood>

    <num_threads>8</num_threads>

    <optimize_clusters>5</optimize_clusters>

    <optimize_decay_span>1000</optimize_decay_span>

    <optimize_decimation>0.29999999999999999</optimize_decimation>

    <optimize_end_reg>100</optimize_end_reg>

    <optimize_iters>3000</optimize_iters>

    <optimize_maxAngle>30</optimize_maxAngle>

    <optimize_particles>1500</optimize_particles>

    <optimize_start_reg>4000</optimize_start_reg>

    <optimize_weight>0</optimize_weight>

    <parallel_enabled>true</parallel_enabled>

    <pca_range>2</pca_range>

    <pca_steps>20</pca_steps>

    <regression_steps>50</regression_steps>

    <smoothing_amount>0</smoothing_amount>

    <spacing>9</spacing>

    <tool_state>optimize</tool_state>

    <zoom_state>2</zoom_state>

    <cutPlanes_file></cutPlanes_file>

    <shapes>

        <shape id="0">

            <initial_mesh>C:/Users/Yoland/Documents/Yoland/Simone Brain Project/Acontias-meleagris_SURFACE_ALIGNED.mha</initial_mesh>

            <groomed_mesh>E:/Yoland/SimoneBrainShapeWorks/Acontias-meleagris_SURFACE_ALIGNED_DT.nrrd</groomed_mesh>


Best,

Yoland



From: shapeworks-users-request@sci.utah.edu <shapeworks-users-request@sci.utah.edu> on behalf of Savriama, Yoland F <yoland.savriama@helsinki.fi>
Sent: Wednesday, August 30, 2017 1:55:36 PM
To: PENNY ATKINS; Shapeworks-users@sci.utah.edu; Praful Agrawal
Subject: Re: [shapeworks-users] Shapeworks does not seem to properly place particles on specimens with different sizes. How can we fix that?
 

Hi Penny and Praful,


Many thanks for your input and advices. 


Penny, thanks to your crystal clear instructions we managed to process the data in Amira! 


I use Fiji to convert the .tiff stacks exported from Amira as compressed .mha files that are recognised by Shapeworks.


My data contain specimens with vast morphological and size differences. The preliminary runs I had so far are unable to evenly place the particles on the biggest specimens, they are concentrated on one portion of a given specimen (the part which differs the most compared to the others) while an entire side of the specimen does not have any particles. 


I will try different approaches and I'll let you know if I need further help.


Best!

Yoland


From: PENNY ATKINS <penny.atkins@utah.edu>
Sent: Friday, May 19, 2017 7:11:40 PM
To: shapeworks-users@sci.utah.edu; Praful Agrawal; Savriama, Yoland F
Subject: RE: [shapeworks-users] Shapeworks does not seem to properly place particles on specimens with different sizes. How can we fix that?
 

Hi Yoland,

 

I may be able to supply some information on the use of Amira for preprocessing shapes for ShapeWorks. 

 

In Amira, after you have aligned the surfaces with the AlignSurfaces tool, you must apply the transform before using the ScanConvertSurface tool.   If you have not applied the transform, the surface still ‘lives’ in the original space and will therefore not ScanConvert to the aligned position.

 

Second, when you ScanConvert the surface you can modify the Bbox and Dimensions to give you the desired voxel size.  Once you have ScanConverted one surface, you can attach it as the Field of the ScanConvertSurface to use the same volume dimensions.

 

You can then save the ScanConverted and aligned labels files (.am) as DICOM images.  This will give you a binary image.  However, you will have to convert the files to .nrrd or .mha for ShapeWorks.

 

Hope this helps!

 

Thanks,

Penny

 

From: shapeworks-users-request@sci.utah.edu [mailto:shapeworks-users-request@sci.utah.edu] On Behalf Of Praful Agrawal
Sent: Friday, May 19, 2017 9:19 AM
To: Savriama, Yoland F
Cc: shapeworks-users@sci.utah.edu
Subject: Re: [shapeworks-users] Shapeworks does not seem to properly place particles on specimens with different sizes. How can we fix that?

 

Hi Yoland,

 

I am not much familiar with AMIRA, however, based on some google search I think label field is a segmentation volume aka binary volume which contains label value for every voxel [0 or 1 in case of two labels]. In case ScanConvert reverts the alignment, you can just use AMIRA to do ICP alignment of meshes and use the tool I shared in previous mail to generate binary volumes from mesh files.

 

Hope this helps!

Praful

 

On May 19, 2017, at 8:46 AM, Savriama, Yoland F <yoland.savriama@helsinki.fi> wrote:

 

Hi Praful!

 

Thank you again for your feedback!

 

I guess that the binary files you mentioned are the labelfields, right? (in the save option in AMIRA, there is a way to save the labelfields as binary .am files).

 

There is a command in Amira that allows to "revert" from surface to  labelfield (ScanConvertSurface) but, when it is used with the surfaces aligned through ICP it gives a labelfield that is the same as the original one, so not "centered" on the new position the surface acquired with the alignment.

This ScanConvert allows also to set a bounding box and slicenumber (but no a voxel size). I was wondering if it is worth aligning the surfaces if one cannot generate labelfield centered on them. 

 

How did you in AMIRA, go back from the ICP aligned surfaces to the labelfields, keeping the alignment and setting a correct bounding box and did you use this "ScanConvertSurface" module?

 

It seems that one can achieve the alignment of the labelfields by directly algning them instead of first align the surfaces with ICP since we cannot generate aligned labelfields from ICP aligned surfaces in AMIRA.

 

Best,

Yoland


From: Praful Agrawal <prafulag@cs.utah.edu>
Sent: Thursday, May 18, 2017 11:07:07 PM
To: shapeworks-users@sci.utah.edu; Savriama, Yoland F
Subject: Re: [shapeworks-users] Shapeworks does not seem to properly place particles on specimens with different sizes. How can we fix that?

 

Hi Yoland,

 

We also have them as .ply files and we can align these surfaces using an algorithm similar to the ICP one that you mention here. 

 

This is what we usually do. We align the surfaces then rasterize them with size and origin common to all shapes. Size is selected such that every shape can be covered in that bounding box. Also, leave about 10-20% padding (background) on all sides, needed for particle movement in ShapeWorks. 

 

Also, is there a way to convert .ply files or save them as .nrrd files?

 

I am assuming you want to generate a binary image from ply files.. right ? I think here is the answer:

 

Good Luck!

Praful

 

On May 18, 2017, at 3:24 AM, Savriama, Yoland F <yoland.savriama@helsinki.fi> wrote:

 

Hi Praful!

 

Thanks a lot for your quick and thorough message! 

 

Yes, I have read that there is a Procrustes superimposition included in ShapeWorks. I used the .wpts coordinates to redo a PCA on the femur data and I found the same values for eigenvectors and eigenvalues. 

 

We work on volume data and we decided to save these data as .tiff stack that are later converted as .nrrd files via Fiji. So, we actually align the .tiff stacks using one of Amira's tools for alignment (center) and we used a common bounding box to produce .tiff stacks with the same dimensions. However, way too many extra slices (empty) are produced for the smallest specimens. I can later reslice them using "slice keeper" in fiji to keep the same number of slices for all specimens. This is way to reduce file sizes, but it is a quite tedious one. We also have them as .ply files and we can align these surfaces using an algorithm similar to the ICP one that you mention here. 

 

I was wondering if you happen to know a better pipeline to import these data in ShapeWorks (from volume or surface data, aligned and converted as .nrrd files)?

 

Also, is there a way to convert .ply files or save them as .nrrd files?

 

I much appreciate your recommandations. I have tried several settings (there was even a case in which the smallest specimen has been flipped) and I am sending you screenshots of one setting which gives sensible results, albeit the coverage is still not optimum. You can see that some regions are left empty. Please, see attached screenshots for the reconstructed shapes and the shape changes exhibited for extreme negative and positive values of PC1.

 

Best!

Yoland

 

 


From: Praful Agrawal <prafulag@cs.utah.edu>
Sent: Monday, May 15, 2017 7:23:30 PM
To: shapeworks-users@sci.utah.edu; Savriama, Yoland F
Subject: Re: [shapeworks-users] Shapeworks does not seem to properly place particles on specimens with different sizes. How can we fix that?

 

Okay.

 

Shapeworks has an implicit procrustes scaling for shapes with varying sizes, the points being visualized are local coordinate points (local to the input shapes). If world coordinate points (transformed space with all shapes scaled and rigid aligned by generalized procrustes) are visualized, they should have common size.

 

Usually in our experiments, we do an ICP registration to align all shapes (Amira should have an option). Once aligned, it should be okay to run in ShapeWorks.

 

Following parameters should be tuned for good correspondence model:

 

Relative Weighting - Should be tuned if mean shape looks somewhat like the expected shape with some bad corresponding regions (indicated by distortions in mean shape)

Starting Regularization -

Ending Regularization  - These should be tuned if mean shape seems completely random.

 

Also, I would recommend to use atleast 2-3K iterations.

 

Good Luck!

Praful

 

On May 15, 2017, at 9:17 AM, Savriama, Yoland F <yoland.savriama@helsinki.fi> wrote:

 

Hi Praful,

 

Thanks for getting in touch. Here are the snapshots of the parameters for Grooming and Optimize.

 

Best,

Yoland


From: Praful Agrawal <prafulag@cs.utah.edu>
Sent: Monday, May 15, 2017 5:49:44 PM
To: shapeworks-users@sci.utah.edu; Savriama, Yoland F
Subject: Re: [shapeworks-users] Shapeworks does not seem to properly place particles on specimens with different sizes. How can we fix that?

 

Hi Yoland,

 

Please share the snapshot of Optimization tab with parameters, it could be very helpful in debugging these results.

 

Thanks,

Praful

On May 15, 2017, at 8:39 AM, Savriama, Yoland F <yoland.savriama@helsinki.fi> wrote:

 


Greetings,

 

I have been recently using the latest version of ShapeWorksStudio on a Mac Book Pro with Mac Os X 10.16.6 and I am dealing with brains of snakes and lizards. The volumes have been reconstructed and aligned with Amira. In our dataset, brains can have very different shapes and also very different sizes. When I use 200 particles placed on a couple of specimens, it is obvious that the coverage is more than enough for the smallest specimen, and it is problematic for the much larger one since it is clear that the coverage is not the same for both specimens. 

 

Please see attached screenshots that illustrate this issue.

 

I was wondering if all specimens have to be somehow scaled to a common unit size such that they can properly treated in ShapeWorks? If so, could you explain to me the procedure for this scaling in Amira, please?

 

Also, does the color of particles have a meaning? For instance, does the color reflect the "homology" in placing a given particle on different surfaces?

 

Best wishes,

Yoland Savriama, PhD

P/O Jernvall
Institute of Biotechnology
P.O. Box 56 (Viikinkaari 5)
FIN-00014 FINLAND

 

<Screen Shot 2017-05-15 at 17.21.42.png><Screen Shot 2017-05-15 at 17.22.21.png>

 

<Screen Shot 2017-05-15 at 18.14.28.png><Screen Shot 2017-05-15 at 18.14.37.png>

 

<Screen Shot 2017-05-18 at 12.15.38.png><Screen Shot 2017-05-18 at 12.16.22.png><Screen Shot 2017-05-18 at 12.17.12.png><Screen Shot 2017-05-18 at 12.17.38.png><Screen Shot 2017-05-18 at 12.17.49.png>

 



  • Re: [shapeworks-users] Shapeworks does not seem to properly place particles on specimens with different sizes. How can we fix that?, Savriama, Yoland F, 09/14/2017

Archive powered by MHonArc 2.6.18.

Top of page