Maverick/View Virtual Family Together: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(New page: = Create a scene using the virtual family = First convert two members of the virtual family VirtualFamilyTxtToMhdCsv Duke_34y_v5_2mm.txt Duke_34y_v5_2mm.raw Duke.mhd Duke.csv VirtualF...)
 
No edit summary
Line 11: Line 11:
  imageMath Ella.mhd -W 3 Ella.mha
  imageMath Ella.mhd -W 3 Ella.mha


Now Merlin can be used to create a scene containing these labelmaps and indexed via those .csv files
Now Merlin can be used to create a scene containing these labelmaps and indexed via those .csv files.  Use the standard labelmap import process of Merlin to achieve this.


= Create a new version of the woman that is as tall as the man =
= Create a new version of the woman that is as tall as the man =


  RegisterImages Duke.mha Ella.mha --registration Affine --interpolation NearestNeighbor --resampledImage TallElla.mha --saveTransform TallElla.tfm
To simulate different size people, the virtual woman (Ella) can be registered with the virtual man (Duke).  The RegisterImages module accomplishes this
 
  RegisterImages Duke.mha Ella.mha  
    --registration PipelineAffine --interpolation NearestNeighbor  
    --resampledImage TallElla.mha --saveTransform TallElla.tfm
 
All of the above should be on one line.
 
Processing time will vary from 5 minutes to 30 minutes, depending on the PC.
 
The result should be two new files: TallElla.mha and TallElla.tfm
 
The TallElla.mha file can be imported into Merlin.
 
The TallElla.tfm file defines an Affine transform consisting of a matrix and an offset.  The file should look something like this:
 
#Insight Transform File V1.0
# Transform 0
Transform: AffineTransform_double_3_3
Parameters: 0.870992 -0.0224575 -0.0878403
            0.0659526 0.83837 -0.050303
            0.0122104 -0.0274275 0.726458 
            -46.4034 -4.29241 -148.693
FixedParameters: 264 150 840


= View the short and tall ella next to one another in the same volume =
= View the short and tall ella next to one another in the same volume =

Revision as of 03:06, 7 October 2008

Create a scene using the virtual family

First convert two members of the virtual family

VirtualFamilyTxtToMhdCsv Duke_34y_v5_2mm.txt Duke_34y_v5_2mm.raw Duke.mhd Duke.csv
VirtualFamilyTxtToMhdCsv Ella_26y_v2_2mm.txt Ella_26y_v2_2mm.raw Ella.mhd Ella.csv

This produces representations in the .mhd format. The current release of Maverick, however, requires the images to be in the .mha format. So, perform the conversion using imageMath

imageMath Duke.mhd -W 3 Duke.mha
imageMath Ella.mhd -W 3 Ella.mha

Now Merlin can be used to create a scene containing these labelmaps and indexed via those .csv files. Use the standard labelmap import process of Merlin to achieve this.

Create a new version of the woman that is as tall as the man

To simulate different size people, the virtual woman (Ella) can be registered with the virtual man (Duke). The RegisterImages module accomplishes this

RegisterImages Duke.mha Ella.mha 
   --registration PipelineAffine --interpolation NearestNeighbor 
   --resampledImage TallElla.mha --saveTransform TallElla.tfm

All of the above should be on one line.

Processing time will vary from 5 minutes to 30 minutes, depending on the PC.

The result should be two new files: TallElla.mha and TallElla.tfm

The TallElla.mha file can be imported into Merlin.

The TallElla.tfm file defines an Affine transform consisting of a matrix and an offset. The file should look something like this:

#Insight Transform File V1.0
# Transform 0
Transform: AffineTransform_double_3_3
Parameters: 0.870992 -0.0224575 -0.0878403 
            0.0659526 0.83837 -0.050303 
            0.0122104 -0.0274275 0.726458  
            -46.4034 -4.29241 -148.693
FixedParameters: 264 150 840

View the short and tall ella next to one another in the same volume

First move TellElla 500 mm to the right by editing the file TallElla.mha using vi or another text editor.

vi TallElla.mha

Change line containing the keyword Offset to induce the shift

Offset =