Difference between revisions of "Projects:ARRA:SlicerWF"

From NAMIC Wiki
Jump to: navigation, search
Line 34: Line 34:
  
 
== July 7, 2010 ==
 
== July 7, 2010 ==
 +
 +
===Alex's workflow===
 +
 +
1. Organize inputs:
 +
  USER Activity
 +
  1.1. Select DICOM Series
 +
  1.2 Specify subject ID, time point, image modality
 +
  AUTOMATION:
 +
  1.3 Create Subject folder
 +
  1.4 Convert DICOM series into Slicer NRRD format
 +
  1.5 Save NRRD images in the Subject folder
 +
  1.6 Extract PET pharmaceutical data from DICOM headers. Save them in the Subject folder
 +
 +
2. Crop Volumes
 +
  USER Activity:
 +
  2.1 Select head region for PET/CT scans. For each time point.
 +
  2.2 Save cropped volumes
 +
 +
3. Create ROI Label Map
 +
  USER Activity:
 +
  3.1 Use Timepoint 1 cropped PET scan (AZ: technically, any PET scan can be selected for ROI label map building)
 +
  AUTOMATION:
 +
  3.2 Create blank label map that matches PET
 +
  USER Activity:
 +
  3.3. Identify ROI using custom color label lookup table (Slicer3 Feature)
 +
  3.4. Save ROI Label
 +
 +
4. Identify reference CT scan
 +
  USER Activity:
 +
  4.1. Point to appropriate CT volume
 +
  4.2. [Optional] Manual alignment of reference CT volume
 +
  4.3  [If 4.2 performed] Save Aligned CT volume
 +
 +
5. Launch Registration Pipeline
 +
AUTOMATION:
 +
5.1 For each timepoint, register PET scan to CT scan
 +
5.2 For timepoint 1, safe transformation matrix from 5.1
 +
5.3 For each timepoint, register CT scan to reference CT scan
 +
5.4 For each timepoint, safe transformation  matrix  from  5.3.
 +
5.5  For each timepoint, registered PET scans using transformation matrix from 5.4.
 +
5.6 Resample ROI label map the reference CT using transformation matrixes from 5.2 and 5.4
 +
5.7 Generate result review scenes descriptor files
 +
 +
6. Compute SUVs
 +
AUTOMATION:
 +
6.1 Merge PET pharmaceutical data with registered PET images' headers
 +
6.2 Compute SUVs. Save results in CSV format in the Subject folder
 +
 +
7. Results Preview:
 +
USER Activity
 +
7.1 Load results' sets along with resampled RIO label map via Slicer scene files.
 +
7.2 (TBD) Build time series intensity plots
  
 
=== workflow proposed by Ron ===
 
=== workflow proposed by Ron ===

Revision as of 21:11, 7 July 2010

Home < Projects:ARRA:SlicerWF

Back to Slicer ARRA home page

Aim

Supplement 3D Slicer and Extensible Neuroimaging Archive Toolkit (XNAT) with workflow management system. Provide integration and interoperability between 3D Slicer, XNAT Services and 3-rd party image processing applications and high performance computing systems. Implement it as within currently developed Structural Planning and Implementation in Neurological Exploration (SPINE) System.

SPINE Project Documentation

SPINE Docs

Presentations

  • Segmentation Workflow. PECS University Social Cognition Study.

File:SlicerWF NAC PECS Workflow.pdf

Research Plan

  • Create a stand-alone SPINE desktop agent with fully functional data exchange and communication mechanisms towards 3D Slicer and XNAT.
  • Develop Service Oriented Architecture (SOA) SPINE System that will include 3D Slicer image processing modules deployed as web services as well as a workflow management system to orchestrate interaction between 3D Slicer, XNAT, and 3-rd party tools.
  • Implement two-way control and communications between 3D Slicer and SPINE modules.
  • Adapt SPINE System for cluster and grid computing scenarios.
  • Provide with workflow and 3D Slicer web service wrappers editing tools.
  • Use Case scenarios

Key Personnel

  • Charles Gutmann, MD., 4%, 9-17-2009 through 9-16-2011
  • Alexander Zaitsev, Ph.D., 75%, 9-17-2009 through 9-16-2011

Quarterly Progress

  • 2d Qtr, 2010
    • Completed Social Cognition Workflow Implementation. This includes EM Segmetnation pre- and post-processing pipelines, data tracking, and integration with 3d party image processing utilities, as well as processing results acquired manually with Slicer GUI.
    • Multi-modality image registration and ROI selection/alignment workflow for longitudinal studies.
      • Use case: PET/CT image processing for longitudinal studies.
      • Build portable library of Slicer modules as web services and workflow that are deployed and run on a end-users' worksatations without utilization of SPL and other servers. The web services include novel Slicer3 modules, such as BRAINSFit and BRAINSResamle
      • Started working with Slicer3 developers on Slicer 3.8 GUI wizard to communicate with workflow instances.
    • Participated at NA-MIC Summer 2010 Project Week: Summer_project_week_2010_Workflows_SOA

Progress

July 7, 2010

Alex's workflow

1. Organize inputs:

  USER Activity
  1.1. Select DICOM Series
  1.2 Specify subject ID, time point, image modality
  AUTOMATION:
  1.3 Create Subject folder
  1.4 Convert DICOM series into Slicer NRRD format
  1.5 Save NRRD images in the Subject folder
  1.6 Extract PET pharmaceutical data from DICOM headers. Save them in the Subject folder

2. Crop Volumes

 USER Activity:
 2.1 Select head region for PET/CT scans. For each time point.
 2.2 Save cropped volumes

3. Create ROI Label Map

 USER Activity:
 3.1 Use Timepoint 1 cropped PET scan (AZ: technically, any PET scan can be selected for ROI label map building)
 AUTOMATION:
 3.2 Create blank label map that matches PET
 USER Activity:
 3.3. Identify ROI using custom color label lookup table (Slicer3 Feature)
 3.4. Save ROI Label

4. Identify reference CT scan

 USER Activity:
 4.1. Point to appropriate CT volume
 4.2. [Optional] Manual alignment of reference CT volume
 4.3  [If 4.2 performed] Save Aligned CT volume

5. Launch Registration Pipeline

AUTOMATION:
5.1 For each timepoint, register PET scan to CT scan
5.2 For timepoint 1, safe transformation matrix from 5.1
5.3 For each timepoint, register CT scan to reference CT scan
5.4 For each timepoint, safe transformation  matrix  from  5.3.
5.5  For each timepoint, registered PET scans using transformation matrix from 5.4.
5.6 Resample ROI label map the reference CT using transformation matrixes from 5.2 and 5.4
5.7 Generate result review scenes descriptor files

6. Compute SUVs

AUTOMATION:
6.1 Merge PET pharmaceutical data with registered PET images' headers
6.2 Compute SUVs. Save results in CSV format in the Subject folder

7. Results Preview:

USER Activity
7.1 Load results' sets along with resampled RIO label map via Slicer scene files.
7.2 (TBD) Build time series intensity plots

workflow proposed by Ron

(First)

  • tech (or we) organize data (maybe as described at bottom)

(Second)

  • tech launches workflow engine GUI with root data dir as argument
    • (code parses data dir to produce selectable items)
  • tech chooses a patient by ID and chooses timepoint by number.
    • code converts dcm->nrrd,
    • extracts dcm headers and
    • saves file into appropriate dir, (all under the hood)
    • tech is shown choose registration reference stepby default
    • clicks go & slicer is launched with all CT scans for patient.
  • tech chooses a ct reference by timepoint in workflow engine GUI.
    • this clears Slicer scene and
    • loads all pets plus ct reference into slicer
  • tech crops all volumes for patient and manually saves them
  • tech runs registration
    • code checks to make sure all crop volumes are written.
    • registers pet_i to pet_ref, -->pet_i',
    • then pet_i' to ct_ref --> pet_i,
    • saves results into directory tree appropriately.

(Third -- QA)

  • if not already running, tech launches workflow engine GUI with root data dir as argument
  • selects patient.
  • selects preview registration
    • slicer launches or scene is closed in existing slicer;
    • opens all cropped, registered volumes for patient
  • tech reviews, if not good, goes back to choose reference step and repeat registration.

(Forth)

  • laura launches workflow engine GUI with root data dir as argument.
  • code parses data dir to produce selectable items)
  • laura chooses a patient by ID and then drawVOI step.
    • slicer is launched or scene is closed in an existing slicer;
    • pet baseline is loaded,
    • label map is created, and
    • her color map is selected.
  • she paints VOIs using editor, saves label map.
  • repeats for none, some, or all patients.
  • clicks compute SUV step
    • workflow GUI shows all patients in directory who are ready for processing, and
    • shows those that have already been processed.
  • she modifies selection of patients for processing, clicks 'go' for all selected patients.
  • goes home or out for coffee.
    • processing is launched and run
    • results are saved to appropriate dirs

(Fifth Step):

  • later, laura/tech launch workflow engine with root data dir as argument.
  • select single patient or ALL patients for viewing results step
  • view tables & plot.

data organization suggestion

directory structure could be parsed and used to populate the GUI when the GUI client is launched with the root dir as a command line argument.

Then user chooses:

select patient {p_1, p_2, ..., p_N}:
select timepoint {t_1, t_2, ..., t_M}:


Maybe something the directory structure could look something like this, for all patients and timepoints:

input:
./patient_1/input/timepoint_1/pet_orig/petdata.dcm
./patient_1/input/timepoint_1/pet_orig/petdata.nrrd
(tech only needs to know about this. -- the rest of the
structure your logic would use as convention...)
convert:
./patient_1/convert/timepoint_1/ct/ctdata.dcm
./patient_1/convert/timepoint_1/ct/ctdata.nrrd
./patient_1/convert/timepoint_1/parameters/dicomheader.txt
reference:
./patient_1/reference/ct/ctdata.nrrd
./patient_1/reference/pet/petdata.nrrd
crop results: 
./patient_1/crop/pet/timepoint_1/petdata.nrrd
./patient_1/crop/ct/ctdata.nrrd
registered data:
./patient_1/register/pet/timepoint_1/petdata.nrrd
./patient_1/register/voi/voi.nrrd
voi:
./patient_1/VOIs/voi.nrrd
suv:
./patient_1/results/suv/file.csv
./patient_1/results/plots/plotfiles.
study:
./results/suv/file.csv
./results/plots/plotfiles


  • June 11, 2010

PET/CT ROI/Longitudinal Study
- Registration modules completed
- Irregular cases registration problem solved (when whole body and brain only scans are mixed for a timepoint)
- Live demo of case setup and registration workflow for end users. Real case with 4 timepoints used

Coming week plans
- Adjust workflow based on end users' feedback
- Integration with SUVs computing for PET scans
- GUI for workflows dispatching and data organizing
- (TBD) Integration with 4D time series analysis Slicer module

  • May 28, 2010

PET/CT ROI/Longitudinal Study Registration :
- Migration to the latest Slicer 3.6 release candidate
- Added webservice for new registration module: BRAINSFit
- Test runs for new patients with 4 timepoints' scans

Plans for next week:
- integrate workflow with SUVs values computing for PET/CT fusion in Slicer GUI
- processing workflow demo for end user

  • May 21, 2010

PET/CT ROI/Longitudinal Study Registration :
Pilot version of portable web services and automated workflow tested:
Linux: workflow and visual review passed
Stress test for 25 timepoints passed
MAC OS: workflow passed, visual review failing when PET/CT images are loaded into GUI simultaneously (bug report submitted)
Windows: need to adapt command line modules and workflow management system to sygwin environment
Plans for next week: integrate workflow with SUVs values computing for PET/CT fusion in Slicer GUI

  • May 7, 2010
  • Use Cases:

PET/CT ROI/Longitudinal Study Registration :
Selected registration and resampling modules with more precise and stable outputs.
Started building portable web services and automated workflow

  • April 30, 2010
  • Use Cases:

PET/CT ROI/Longitudinal Study Registration :
- manual walk through the processing steps: ROI cropping, registration/resampling, PET pharmaceutical DICOM data retention.
- testing workflow and web services packages distribution to end-users' machines

  • April 23, 2010
  • Use Cases:

PET/CT ROI/Longitudinal Study Registration : testing various registration and re-sampling algorithms (work in progress)
EM Segmentation: as of collaborators' request, run existing EM Segmentation workflow for older low resolution pseudo-T1 images. The EM Segmentation works for those images with manual sampling.

  • April 16, 2010
  • Use Cases:
 Social Cognition Study: started Cortical Thickness Measurement module build (bases on NA-MIC ARCTIC pipeline) 
PET/CT ROI/Longitudinal Study Registration : Design specs, PET-to-CT images registration tests on training data.
  • April 9, 2010
  • Use Cases.

Social Cognition Study. GUI update based on end-user experience.
User request: automated label maps' volumes calculation (Currently possible from Slicer3 GUI)
PET/CT ROI Project. Initial design specs discussion with end-users and co-developers

  • Infrastructure

Verification of segmentation workflow GUI: from registering new case to reviewing results
Cross study test of segmentation workflow: MGH/MS Center data - success, HIV Project data - some EM Segmentation scene tuning is needed

  • April 2, 2010
  • Use Cases.

Social Cognition Study. Segmentation workflow completed

  • Coming Week plans:

- Document Segmentation Workflow. Follow up with end users
- Start with Cortical Thickness and ROI-in-longitudinal studies workflows

  • March 26, 2010
  • Use Cases.

Social Cognition Study.
- All essential processing and workflow interaction clients are ready.
- Completed segmentation for 10 out of 50 patients. The remaining cases will be finalized upon manual lesion segmentation and QC verification of WM/GM/CSF and Deep GM segmentation's.
- TODO next week: refine QC GUI and data tracking / progress monitoring schema.

  • Infrastructure

- New Slicer3 web services added: re-slicing with reference image volume, casting image scalar type

  • Use Cases.
  • March 19, 2010
  • Use Cases.

Social Cognition Study.
- Segmentation maps Merging Services for GM/WM/CSF (Slicer EM Segemnter), Lesion (Slicer, Manual), and Deep GM (FreeSurfer)
- Deep GM segmentation pipeline adopted as optional service for Social Cognition Study (22 out of 50 cases processed)
- (In progress) GUI client for Launching Segmentation results merging with optional Deep GM segmentation with FreeSurfer

TODO next week:
- Complete GUI Client for Segmentation result merging
- Progress Monitoring services for entire Study processing: EM Segmenter Preprocessing, EM Segmentation, Lesion Segmentation (including human activities assignments), Deep GM segmentation, and results consolidation.


  • March 12, 2010
  • Use Cases.

Social Cognition Study.
- All 50 cases went through "basic" One-channel EM segmentation (GM/WM/CSF)
- Basic pipeline start-up command line client created: user has two options - request brainmask extraction or provide with previously extracted brainmask for a given subject
- Comparison of GM/WN/CSF performed for Slicer EM Segmenter and FreeSurfer recon-all (used with default settings).
-- EM Segmenter provides more accurate output
-- EM Segmentation pipeline runs faster (40 minutes vs 12 hrs when no brainmask extraction requested)

TODO:
- merging modules for automatic 1-channel EM segmentation and manual lesion segmentation
- Emerge Cortical Thickness pipeline project: use NAC ARCTIC processing steps and modules

  • March 5, 2010
  • Use Cases.

Social Cognition Study.
- Selected stable EM Segmentation scenario: White Matter, Gray Matter, and Cerebrospinal Fluid
- First 16 cases are segmented for selected scenario. Nine more cases are preprocessed for EM Segmentation.
- Comparison to segmentation with FreeSurfer showed better accuracy for Slicer2 EMSegmenter

  • Infrastructure

- Three prerpcocessed cases failed during volume ICC masking with in-house build utility. Evaluated switching to Slicer3 Mask and island removing modules.
- Initial design specs discussion for cortical thickness measurement pipeline. ARCTIC pipeline selected. ARCTIC preprocessing steps signifficantly overlap with EM Segmentation preprocessing workflow.

  • February 26, 2010
  • Use Cases.

- Social Cognition Study. Slicer EM Segmenter module:
A) parameters tuning for EM Segmenter itself (work with EM Segmenter developer), template scenes creation
B) update preprocessing pipeline - deep gray matter atlases included
C) test and debug preprocesing pipeline
D) identified missing modules: atlas autocalibration for EM Segmentation scene, Island removal for ICC mask

  • Infrastructure

- Review currently deployed modules.


  • February 19, 2010
  • Use Cases.

- Social Cognition Study. Slicer EM Segmenter module: reviewed firts seven subjects' outputs, added volume orientation module into pipeline (prevents ICBM atlas linear registration failures)
- Fused ICC(brainmask) extraction module with EM Segmenter preprocessing. Three scenarious implemented: start with pre-extracted ICC mask (longitudinal studies case), run with ICC ectration, run with ICC extraction AND ICC correction before ICBM atlas preporcessing.
- Completion of Human activities GUI (QC, ICC Correction) planned for coming week

  • Infrastructure

- The following Slicer3.5 Modules deployed as web services: Volume Orientation.

  • February 12, 2010
    • Use Cases.

- Social Cognition Study. Slicer EM Segmenter module: automated preprocessing pipeline for Slicer2 EM Segmenter test version deployed. Seven cases pre-processed. - PET Quantitative measurements: Preliminary design specs discussion.

    • Infrastructure

- The following Slicer3.5 Modules deployed as web services: BSplineRegistration (for non-linear registration), ResampleVolume2 (for atlases resampling based on image atlase templates registration). Local and Network runs are implemented, Cluster/GridWizard implementation pending.

  • February 5, 2010
    • Use Cases.

- Slicer EM Segmenter module: preprocessing design for Slicer2 EM Segmenter

    • Infrastructure

- Adapting for Slicer2 EM Segmenter (mostly from pipelines and services for previous projects)

 -- Integration with FreeSurfer modules for bisafield correction, brainmask extraction, and linear registration of ICBM atlases
 -- Preprocessing updates for non-linear registration of ICBM atlases with Slicer2 (image re-orientation service designed)


  • January 29, 2010
    • Use Cases.

- EM Segmentaton pipeline: preprocessing results are being transferred to XNat (anonymized data, Central XNat)
- Slicer EM Segmenter module: discussed agenda and scheduled a work meeting for Social Cognition Study image segmentation.

    • Infrastructure

- Work on Web Services for structured data exchange between XNat and Workflow Instances (Testing stage, 95% completion)
- SPL XNat server: verified data exchange via RESTfull web services.

  • January 22, 2010
    • Use Cases.

- Follow up with White Matter Lesion Segmenter and Scull Stripping Modules developers: Work in Progress

    • Infrastructure

- Work on Web Services for structured data exchange between XNat and Workflow Instances (Work in Progress, 60%+ completion)
- Discussed SPINE image repository migration to XNat

  • January 15, 2010
    • Use Cases.

- Social Cognition Study: Work-in-progress on intermediate (reconstruction) and results (resources) data storage at XNat.
Reviewing and preparation more cases for EM Segmentor (Slicer 3.5) tuning.

  • NA-MIC Project Week

Selecting candidate Slicer modules for other than Lesion EM Segmentation topics of Social Cognition study: Withe Matter Lesion Segmenter (UNC), Scull Stripping utility from UIOWA. Reviewing issues of currently used Scull Stripping Slicer Extension and Slicer 3.5 EM Segmenter.
XNat Data organizing training

  • January 1, 2010
    • Use Cases. Preparation of Demo for NA-MIC work week:

- COPD Study. Added Remote pipepline start interface (represents real world scenario where Xnat repository, Processing modules and User are at different sites)
- EM Segmentation. Added human activities steps to the workflow: ICC (brainmask) correction and EM Segmantation scena load per se.


  • December 25, 2009
    • Use Cases. Pilot workflow pipeline for EM Segmentation (all steps except user-activity step: ICC correction assignment and tracking)


  • December 18, 2009
    • Use Cases. Build and tested web services for EM Segmentation image preprocessing: DICOM-to-NRRD conversion, registration, skull stripping, image masking.

Started building workflow pipeline (subject to finish first version next week)

    • Infrastructure.

Started Collecting Library of Slicer Build number vs. functional modules and extensions. Plan for NAMIC project week: scheduled meetings for XNat data customization, Skull-stripping modules tuning, identified Social Cognition study cases that fail EM Segmentation processing.

  • December 11, 2009
    • Use Cases. Updating and verification of EM Segmentation Scenario

http://wiki.na-mic.org/Wiki/index.php/Projects:ARRA:SlicerWF:UseCaseScenarios#Usecase_MS_lesion_Assessment

    • Infrastructure.

Familiarizing with Slicer3.4/5 Modules required for implementation of EM Segmentation Scenario. Participation in debugging and/or usage tuning of Dicom Conversion, Registration, Skull Stripping, Masking, and Image Casting modules.

  • December 4, 2009
    • Use Cases. Slicer3.4's EM Segmentation and Visual QC as part of image processing pipeline for Social Cognition Study for MS Patients.

Project emerged. EM Segmentation template creation debugged.

    • Infrastructure

Emphysema Measurements (COPD Study) - workflow stability and scalability test.

  • November 27, 2009
    • Use Cases. Emphysema Measurements (COPD Study).

Added compensation for long running calculations and time-outs to the main computing pipeline. Visual QC (work in progress)

    • Infrastructure

XNat data structure customization, metadata storage, results consolidation: new feature request list creation (work in progress)

  • November 13, 2009
    • Use Cases
      • Pilot system for whole processing cycle for Emphysema Measurements (COPD Study) including the following:

Web query for CT session file list download Pilot user interface for submitting the file list and starting processing pipeline Notification about processing steps and failures Upload results to XNat repository (at this stage results are uploaded into same folder where original scans are(*))

      • Immediate Plans

Complete Visual QC module Design and implement meta-data transfer to XNat (including processing details and MRML files for loading images into the 3D Slicer)

(*)Customization of results storage


  • November 6, 2009
    • Use Cases
      • Tuned and debugged multiple subjects processing for: Fetch Data From XNat - Process Emphysema Measurements - Upload Results to XNat.
      • Started working on quality control embedding into the above scenario. Plan to complete and video-record demo next week.
    • Infrastructure
      • Published general Product Integration scenario flow chart to collaborators' community. Discussion is open and in progress
  • October 30, 2009
    • Use Cases
      • Piloted and tested the sequence: Fetch Data From XNat - Process Emphysema Measurements - Upload Results to XNat(1).
      • Performance test of overall cycle: data transfer from remote serve is a bottleneck as expected
    • Infrastructure
      • XNat customization and data browsing features reviewed.

(1) Not automated yet

  • October 23, 2009
    • Use Cases
      • Defined COPD processing scenario with interoperability between Xnat, 3D Slicer Command Modules, Workflow, and Gridwizard Enterprise.
      • Pilot version of Emphysema Measurements workflow pipeline deployed.
    • Infrastructure
      • XNat customization and data transfer features reviewed. Use account at XNat Central during learning curve.
      • Feasibility test of 3D Slicer fiducials module for ROI highlights during QC and manual image processing activities.
  • October 16, 2009
    • Lung CT Scans Processing. Pilot project emerged. GenerateEmphysemaMeasurements module deployed as a webservice that submits jobs to computational cluster.
    • EM Segmentation. Familiarized with GUI steps. Started working on automation steps outlining
    • 3D Slicer and XNat interaction. Got an overview from Wendy Plesniak.
  • October 1 - 7, 2009
    • Selected two first priority Projects: EM Segmentation of brain MRI images; Lung CT Scans Processing (COPD Study)
    • Got initial outline of user requirements and design specs