void SetInfoParameters( void ) { int slices, i, spatDim; DB_MSG(("-->SetInfoParameters\n")); spatDim = PTB_GetSpatDim(); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetInfoParameters: In function call!"); return; } ATB_SetAcqMethod(); ATB_SetAcqFov( Spatial, spatDim, PVM_Fov, PVM_AntiAlias ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetInfoParameters: In function call!"); return; } ACQ_flip_angle = PVM_ExcPulseAngle; PARX_change_dims("ACQ_echo_time",PVM_NEchoImages); for(i=0; i<PVM_NEchoImages; i++) ACQ_echo_time[i] = EffectiveTE[i]; PARX_change_dims("ACQ_inter_echo_time",1); ACQ_inter_echo_time[0] = PVM_EchoTime; PARX_change_dims("ACQ_repetition_time",1); ACQ_repetition_time[0] = PVM_RepetitionTime; PARX_change_dims("ACQ_recov_time",1); ACQ_recov_time[0] = PVM_RepetitionTime - PVM_ExSlicePulseLength; PARX_change_dims("ACQ_inversion_time",1); ACQ_inversion_time[0] = PVM_InversionTime; strcpy(ACQ_fit_function_name,FitFunctionName); if( ParxRelsVisibleForEdit("ProcessingMacro") == 1) { GO_use_macro = ProcessingMacro; ParxRelsParRelations("GO_use_macro", Yes); if(ProcessingMacro == Yes) strcpy(GO_macro,ProcessingMacroName); } else { GO_use_macro = No; ParxRelsParRelations("GO_use_macro", Yes); } ATB_SetAcqSliceAngle( PtrType3x3 PVM_SPackArrGradOrient[0], PVM_NSPacks ); ACQ_slice_orient = Arbitrary_Oblique; ACQ_slice_thick = PVM_SliceThick; slices = GTB_NumberOfSlices( PVM_NSPacks, PVM_SPackArrNSlices ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetInfoParameters: In function call!"); return; } PARX_change_dims("ACQ_slice_offset",slices); PARX_change_dims("ACQ_read_offset",slices); PARX_change_dims("ACQ_phase1_offset",slices); PARX_change_dims("ACQ_phase2_offset",slices); for(i=0;i<slices;i++) { ACQ_slice_offset[i] = PVM_SliceOffset[i]; ACQ_read_offset[i] = PVM_ReadOffset[i]; ACQ_phase1_offset[i] = PVM_Phase1Offset[i]; ACQ_phase2_offset[i] = PVM_Phase2Offset[i]; } ACQ_read_ext = (int)PVM_AntiAlias[0]; PARX_change_dims("ACQ_slice_sepn", slices==1 ? 1 : slices-1); if( slices == 1 ) { ACQ_slice_sepn[0] = 0.0; } else { for( i=1; i<slices;i++ ) { ACQ_slice_sepn[i-1]=PVM_SliceOffset[i]-PVM_SliceOffset[i-1]; } } ATB_SetAcqSliceSepn( PVM_SPackArrSliceDistance, PVM_NSPacks ); ATB_SetAcqPatientPosition(); ATB_SetAcqExpType( Imaging ); ACQ_n_t1_points = 1; if( ParxRelsParHasValue("ACQ_transmitter_coil") == No ) { ACQ_transmitter_coil[0] = '\0'; } if( ParxRelsParHasValue("ACQ_receiver_coil") == No ) { ACQ_receiver_coil[0] = '\0'; } if( ParxRelsParHasValue("ACQ_contrast_agent") == No ) { ACQ_contrast_agent[0] = '\0'; } if( ParxRelsParHasValue("ACQ_contrast") == No ) { ACQ_contrast.volume = 0.0; ACQ_contrast.dose = 0.0; ACQ_contrast.route[0] = '\0'; ACQ_contrast.start_time[0] = '\0'; ACQ_contrast.stop_time[0] = '\0'; } ParxRelsParRelations("ACQ_contrast_agent",Yes); ACQ_position_X = 0.0; ACQ_position_Y = 0.0; ACQ_position_Z = 0.0; PARX_change_dims("ACQ_temporal_delay",1); ACQ_temporal_delay[0] = 0.0; ACQ_RF_power = 0; ACQ_flipback = No; ACQ_n_echo_images = PVM_NEchoImages; ACQ_n_movie_frames = 1; DB_MSG(("<--SetInfoParameters\n")); }
void SetBasicParameters( void ) { int spatDim, specDim; int nSlices; int echo; DB_MSG(("-->SetBasicParameters\n")); /* ACQ_dim */ spatDim = PTB_GetSpatDim(); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } specDim = PTB_GetSpecDim(); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } ACQ_dim = spatDim + specDim; ParxRelsParRelations("ACQ_dim",Yes); /* ACQ_dim_desc */ ATB_SetAcqDimDesc( specDim, spatDim, NULL ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } /* ACQ_size */ /* With the Encoding group, this call ATB_SetAcqSize( Spatial, spatDim, PVM_Matrix, PVM_AntiAlias, No ); is replaced by: */ ATB_SetAcqSize( Spatial, spatDim, PVM_EncMatrix, NULL, No ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } /* NSLICES */ nSlices = GTB_NumberOfSlices( PVM_NSPacks, PVM_SPackArrNSlices ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } ATB_SetNSlices( nSlices ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } /* NR */ ATB_SetNR( PVM_NRepetitions ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } /* NI */ ATB_SetNI( nSlices * PVM_NEchoImages ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } /* AVERAGING */ switch(PVM_MotionSupOnOff) { default: case Off: ATB_SetNA( PVM_NAverages ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } ATB_SetNAE( 1 ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } break; case On: ATB_SetNAE( PVM_NAverages ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } ATB_SetNA( 1 ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } break; } /* ACQ_ns */ ACQ_ns_list_size = PVM_NEchoImages; ParxRelsParRelations("ACQ_ns_list_size",Yes); for(echo=0; echo<PVM_NEchoImages; echo++) { ACQ_ns_list[echo] = nEchoesPerEchoImage[echo]; } NS = ACQ_ns = ACQ_ns_list[0]; /* NECHOES */ NECHOES = NEchoes; /* ACQ_obj_order */ PARX_change_dims("ACQ_obj_order",NI); ATB_SetAcqObjOrder( nSlices, PVM_ObjOrderList, PVM_NEchoImages, 1 ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } /* DS */ DS = NDummyScans; ACQ_DS_enabled = Yes; ATB_DisableAcqUserFilter(); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } ATB_SetAcqScanSize( One_scan ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetBasicParameters: In function call!"); return; } DB_MSG(("<--SetBasicParameters\n")); }
void SetGradientParameters( void ) { int spatDim, dim; DB_MSG(("-->SetGradientParameters\n")); ATB_SetAcqPhaseFactor( 1 ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetGradientParameters: In function call!"); return; } spatDim = PTB_GetSpatDim(); dim = PARX_get_dim("ACQ_phase_encoding_mode", 1 ); PARX_change_dims("ACQ_phase_encoding_mode", spatDim ); PARX_change_dims("ACQ_phase_enc_start", spatDim ); switch(spatDim) { case 3: ACQ_phase_encoding_mode[2] = User_Defined_Encoding; ACQ_phase_enc_start[2] = -1; /* set, but no used */ ACQ_spatial_size_2 = PVM_EncMatrix[2]; ParxRelsCopyPar("ACQ_spatial_phase_2","PVM_EncValues2"); /* no break */ case 2: ACQ_phase_encoding_mode[1] = User_Defined_Encoding;; ACQ_phase_enc_start[1] = -1.0; /* set, but no used */ ACQ_spatial_size_1 = PVM_EncMatrix[1]; ParxRelsCopyPar("ACQ_spatial_phase_1","PVM_EncValues1"); /* no break */ default: ACQ_phase_encoding_mode[0] = Read; ACQ_phase_enc_start[0] = -1; } ATB_SetAcqGradMatrix( PVM_NSPacks, PVM_SPackArrNSlices, PtrType3x3 PVM_SPackArrGradOrient[0], PVM_ObjOrderList ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetGradientParameters: In function call!"); return; } ACQ_scaling_read = 1.0; ACQ_scaling_phase = 1.0; ACQ_scaling_slice = 1.0; ACQ_rare_factor = 1; ACQ_grad_str_X = 0.0; ACQ_grad_str_Y = 0.0; ACQ_grad_str_Z = 0.0; strcpy(GRDPROG, ""); ATB_SetAcqTrims( 10, PVM_ExSliceGradient, /* t0 */ -PVM_ExSliceRephaseGradient, /* t1 */ PVM_ExSliceGradient, /* t2 */ SliceSpoilerStrength, /* t3 */ PVM_ReadDephaseGradient, /* t4 */ PVM_ReadGradient, /* t5 */ PVM_2dPhaseGradient, /* t6 */ -PVM_3dPhaseGradient, /* t7 */ -PVM_2dPhaseGradient, /* t8 */ PVM_3dPhaseGradient /* t9 */ ); if( PVM_ErrorDetected == Yes ) { UT_ReportError("SetGradientParameters: In function call!"); return; } DB_MSG(("<--SetGradientParameters\n")); }
void SetRecoParam( void ) { int dim,i,size,ftSize[3]; DB_MSG(("-->SetRecoParam\n")); /* set baselevel reconstruction parameter */ /* default initialization of reco based on acqp pars allready set */ ATB_InitDefaultReco(); for(i=0; i<PTB_GetSpatDim(); i++) ftSize[i] = (int)(PVM_Matrix[i]*PVM_AntiAlias[i]); if(PVM_EncUseMultiRec == Yes || PVM_EncPftAccel1 > 1.0) { int k=0; /* select method specific reconstruction method */ RECO_mode = USER_MODE; ParxRelsParRelations("RECO_mode",Yes); ATB_InitUserModeReco(ACQ_dim, PVM_EncMatrix, ftSize, PVM_EncSteps1, PVM_EncSteps2, PVM_EncNReceivers, PVM_EncPpiAccel1, PVM_EncPpiRefLines1, NI, ACQ_obj_order, ACQ_phase_factor, PVM_EchoPosition); /* set scaling values for phased array coils */ for(k=0; k<PVM_EncNReceivers;k++) RecoScaleChan[k] = PVM_EncChanScaling[k]; } dim = PTB_GetSpatDim(); /* set reco sizes and ft_mode (dim 2&3) */ /* (dim 1 is kept as it was set by ATB_InitDefaultReco) */ for(i=0; i<dim; i++) { size = (int)(PVM_Matrix[i]*PVM_AntiAlias[i]); RECO_ft_mode[i] = (size == PowerOfTwo(size)) ? COMPLEX_FFT:COMPLEX_FT; RECO_ft_size[i] = size; RECO_size[i] = PVM_Matrix[i]; } ParxRelsParRelations("RECO_ft_mode",Yes); ParxRelsParRelations("RECO_ft_size",Yes); ParxRelsParRelations("RECO_size",Yes); /* set reco rotate according to phase offsets */ ATB_SetRecoRotate(PVM_EffPhase1Offset, PVM_Fov[1]*PVM_AntiAlias[1], NSLICES, PVM_NEchoImages, 1) ; /* phase1 direction*/ if(dim==3) { ATB_SetRecoRotate(PVM_EffPhase2Offset, PVM_Fov[2]*PVM_AntiAlias[2], NSLICES, PVM_NEchoImages, 2) ; /* phase2 direction*/ } /* set reco offset */ ATB_SetRecoOffset(RECO_ft_size, PVM_AntiAlias, NI, dim); for(i=0;i<dim;i++) RECO_fov[i]= PVM_FovCm[i]; ParxRelsParRelations("RECO_fov",Yes); ATB_SetRecoTransposition(PtrType3x3 ACQ_grad_matrix[0], PVM_NSPacks, NSLICES, ACQ_ns_list_size, ACQ_obj_order) ; DB_MSG(("<--SetRecoParam\n")); }