CAWorks-ftp lddmm cardiac matching

From CVRG Wiki

Jump to: navigation, search

Contents

User Guide to lddmm-cardiac matching, with examples

Overview

The template-estimation remote processing pipeline provides volume-based creation of a single template from a population of cardiac images.

CAWorks for lddmm-cardiac matching using ftp

For this example, the user will match the following template and target images

Template Image ES_JHU_Template TemplateImage.zip
Template Mask ES_JHU_Template_LV_seg TemplateMask.zip
Template Landmark ES_JHU_Template ES_JHU_Template.lmk
Target Image patient1_t7_short_axis TargetImage.zip
Target Mask patient1_t7_LV_seg_short_axis TargetMask.zip
Target Landmark patient1_t7 patient1_t7.lmk
  1. Create these files, with example contents as follows...
    1. identity.txt - your mristudio registered e-mail
      youremail@yourdomain.com
    2. config.txt - configuration file.
      verbose=false
    3. local_address.txt - contains the local name of the target.img and target.hdr files
      target.hdr patient1_t7_short_axis.hdr
      target.img patient1_t7_short_axis.img
      mask.hdr patient1_t7_LV_seg_short_axis.hdr
      mask.img patient1_t7_LV_seg_short_axis.img
      target.lmk patient1_t7.lmk
      template.hdr ES_JHU_Template.hdr
      template.img ES_JHU_Template.img
      template_struct.hdr  ES_JHU_Template_LV_seg.hdr
      template_struct.img  ES_JHU_Template_LV_seg.img
      template_struct.lmk  ES_JHU_Template.lmk 
    4. The matching target and template image and mask Analyze data (.img) and header (.hdr) files
    5. The matching target and template landmark (.lmk) files
  2. Rename the input data as follows:

    Original Name

    Rename To

    patient1_t7_short_axis.hdr

    target.hdr

    patient1_t7_short_axis.img

    target.img

    patient1_t7_LV_seg_short_axis.hdr

    mask.hdr

    patient1_t7_LV_seg_short_axis.img

    mask.img

    patient1_t7.lmk

    target.lmk

    ES_JHU_Template.hdr

    template.hdr

    ES_JHU_Template.img

    template.img

    ES_JHU_Template_LV_seg.hdr

    template_struct.hdr

    ES_JHU_Template_LV_seg.img

    template_struct.img

    ES_JHU_Template.lmk

    template_struct.lmk


    Or, in Linux:
    mv patient1_t7_short_axis.hdr  target.hdr
    mv patient1_t7_short_axis.img   target.img
    mv patient1_t7_LV_seg_short_axis.hdr   mask.hdr
    mv patient1_t7_LV_seg_short_axis.img    mask.img
    mv patient1_t7.lmk    target.lmk
    mv ES_JHU_Template.hdr    template.hdr
    mv ES_JHU_Template.img    template.img
    mv ES_JHU_Template_LV_seg.hdr    template_struct.hdr
    mv ES_JHU_Template_LV_seg.img    template_struct.img
    mv ES_JHU_Template.lmk     template_struct.lmk 
  3. Compress the following files into tmp.zip...
    1. identity.txt
    2. config.txt
    3. local_address.txt
    4. mask.hdr
    5. mask.img
    6. target.hdr
    7. target.img
    8. target.lmk
    9. template.hdr
    10. template.img
    11. template_struct.hdr
    12. template_struct.img
    13. template_struct.lmk
  4. $ zip tmp.zip config.txt identity.txt local_address.txt mask.hdr target.hdr target.lmk
    template.img template_struct.img mask.img target.img template.hdr template_struct.hdr
    template_struct.lmk # linux zip command 
  5. Calculate the md5 hash of tmp.zip. You have changed the identity.txt to contain your e-mail address, so your md5 sum will be DIFFERENT than the one below...
    $ md5sum tmp.zip
    29b72b7b18e932f7222e1cc88fc95387  tmp.zip 
  6. Rename tmp.zip to its md5 hash. This is your file for upload. Here is an example: 29b72b7b18e932f7222e1cc88fc95387.zip.
    $ mv tmp.zip 29b72b7b18e932f7222e1cc88fc95387.zip 
  7. Login to the mristudio ftp server using your registered email for the password.
    $ ftp ftp.mristudio.org
    Connected to ftp.mristudio.org.
    220 Welcome to MRI STudio FTP service. -- Turn off Passive Mode.
    Name (ftp.mristudio.org:mbowers):  anonymous
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files. 
  8. Put your compressed folder on the queue
    ftp>  cd /pub/INCOMING/lddmm-cardiac/process-queue
    250 Directory successfully changed.
    ftp> put 29b72b7b18e932f7222e1cc88fc95387.zip
    local: 29b72b7b18e932f7222e1cc88fc95387.zip remote: 29b72b7b18e932f7222e1cc88fc95387.zip
    200 PORT command successful. Consider using PASV.
    150 Ok to send data.
    226 File receive OK.
    74416046 bytes sent in ... 
  9. You should receive an email with the subject "ICM lddmm-cardiac Processing: 29b72b7b18e932f7222e1cc88fc95387" informing you that your segmentation is being processed.
  10. You should receive an email with the subject "lddmm-cardiac Process Complete: 29b72b7b18e932f7222e1cc88fc95387" informing you that your segmentation is complete.
  11. Get your results from the mristudio ftp server.
    $ ftp ftp.mristudio.org
    Connected to ftp.mristudio.org.
    220 Welcome to MRI STudio FTP service. -- Turn off Passive Mode.
    Name (ftp.mristudio.org:mbowers): anonymous
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> bin
    200 Switching to Binary mode.
    ftp> cd /pub/OUTGOING/lddmm-cardiac/output/lddmm-cardiac/29b72b7b18e932f7222e1cc88fc95387/
    250 Directory successfully changed.
    ftp> get Result.zip
    local: Result.zip remote: Result.zip
    200 PORT command successful. Consider using PASV.
    150 Opening BINARY mode data connection for Result.zip (508653324 bytes).
    226 File send OK.
    508653324 bytes received
    ftp> exit
    221 Goodbye. 

Example results: Result.zip

  1. Unpack your results from the zip file.
    $ unzip Result.zip 
    Archive:  Result.zip
      inflating: config.txt              
     extracting: identity.txt            
      inflating: local_address.txt       
      inflating: mask.hdr                
      inflating: mask.img                
       creating: output/
      inflating: output/lddmm_template.img  
      inflating: output/lddmm_template.hdr  
      inflating: output/lddmm_template_struct.img  
      inflating: output/lddmm_template_struct.hdr  
      inflating: output/rigid_target.img  
      inflating: output/rigid_target.hdr  
      inflating: output/rigid_mask.img   
      inflating: output/rigid_mask.hdr   
      inflating: output/defPatient.hdr   
      inflating: output/defPatient.img   
      inflating: output/Target2TemplateDetJacobian.vtk  
      inflating: output/Template2TargetDetJacobian.vtk  
      inflating: output/LDDMM_map_momentum.vtk  
     extracting: priority.txt            
      inflating: target.hdr              
      inflating: target.img              
      inflating: target.lmk              
      inflating: template.hdr            
      inflating: template.img            
      inflating: template_struct.hdr     
      inflating: template_struct.img     
      inflating: template_struct.lmk     

Example Data

Example Data for the ftp path to lddmm-cardiac is here: 29b72b7b18e932f7222e1cc88fc95387.zip. Please note that this zip file CAN NOT be used as is. Unzip the file,modify identity.txt with your MRI Studio registered e-mail address, then rezip as described above.

Results from the example data are here: Result.zip..

Personal tools
Project Infrastructures