Class: Reconstruction

Inherits:
JobStep show all
Includes:
DefaultRecon
Defined in:
lib/rpipe.rb

Overview

A class for performing initial reconstruction of both functional and anatomical MRI scan acquisitions. Uses AFNI to convert from dicoms to 3D or 4D nifti files, initial volume stripping, and slice timing correction. Currently, supports dicoms or P-Files.

Constant Summary collapse

VOLUME_SKIP =

number of volumes to strip from beginning of functional scans.

3

Constants inherited from JobStep

JobStep::COLLISION_POLICY

Instance Attribute Summary collapse

Attributes inherited from JobStep

#collision_policy, #libdir, #origdir, #procdir, #rawdir, #spmdir, #statsdir, #step, #subid

Instance Method Summary collapse

Methods included from DefaultRecon

#build_physionoise_run_spec, #build_retroicor_cmd, #create_physiosnoise_regressors, #generate_physiospec, #recon_visit, #reconstruct_scan, #run_retroicor, #slice_time_correct, #strip_leading_volumes

Methods inherited from JobStep

#check_instance_vars, #default_spmdir, #include_custom_methods, #job_requires, #setup_directory, #validate_existence_of

Constructor Details

#initialize(workflow_spec, recon_spec) ⇒ Reconstruction

Instances are initialized with a properly configured hash containing all the information needed to drive reconstruction tasks. This hash is normally generated with a Pipe object.

Raises:

  • (ScriptError)


152
153
154
155
156
157
158
# File 'lib/rpipe.rb', line 152

def initialize(workflow_spec, recon_spec)
	super(workflow_spec, recon_spec)
	raise ScriptError, "At least one scan must be specified." if @scans.nil?
	@volume_skip = recon_spec['volume_skip'] || VOLUME_SKIP
	
	job_requires 'rawdir', 'origdir', 'scans'
end

Instance Attribute Details

#scansObject

Returns the value of attribute scans.



148
149
150
# File 'lib/rpipe.rb', line 148

def scans
  @scans
end

#volume_skipObject

Returns the value of attribute volume_skip.



148
149
150
# File 'lib/rpipe.rb', line 148

def volume_skip
  @volume_skip
end