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: PENNY ATKINS <penny.atkins@utah.edu>, "Shapeworks-users@sci.utah.edu" <Shapeworks-users@sci.utah.edu>, Praful Agrawal <prafulag@cs.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: Wed, 30 Aug 2017 10:55:36 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=yoland.savriama@helsinki.fi;
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

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, 08/30/2017

Archive powered by MHonArc 2.6.18.

Top of page