Functions | |
| function otherwise it will not work makes Assumes but needs to be compiled manually on your machine | cd ('../../../../Slicer3-lib/teem/src/matlab') |
| elseif (foundKeyword('DWMRI_GRADIENT_', cs))[iGNr | |
| elseif (foundKeyword('DWMRI_B-VALUE', cs)) headerInfo.bvalue | |
| elseif (foundKeyword('MODALITY', cs)) headerInfo.modality | |
| elseif (foundKeyword('MEASUREMENT FRAME:', cs)) iMF | |
| elseif (foundKeyword('SPACE ORIGIN:', cs)) iSO | |
| elseif (foundKeyword('SPACE UNITS:', cs)) headerInfo.spaceunits | |
| elseif (foundKeyword('CENTERINGS:', cs)) headerInfo.centerings | |
| elseif (foundKeyword('KINDS:', cs)) headerInfo.kinds | |
| elseif (foundKeyword('THICKNESSES:', cs)) sThicknesses | |
| elseif (foundKeyword('SIZES:', cs)) iSizes | |
| end | elseif (foundKeyword('SPACE DIRECTIONS:', cs))%iSD |
| elseif (foundKeyword('SPACE:', cs)) headerInfo.space | |
| elseif (foundKeyword('DIMENSION:', cs)) headerInfo.dimension | |
| elseif (foundKeyword('DATA FILE:', cs))%headerInfo.datafile | |
| elseif (foundKeyword('ENCODING:', cs)) headerInfo.encoding | |
| elseif (foundKeyword('ENDIAN:', cs)) headerInfo.endian | |
| elseif (foundKeyword('TYPE:', cs)) headerInfo.type | |
| if(csTmp(1)~='#'&~strcmp(cs(1:4),'NRRD')) fprintf('Warning end end end | fclose (fidr) |
| else | fprintf ('Warning:File is not RAS, make sure subsequent matlab processing is consistent!\n') |
| headerInfo | gradients (iGNr+1,:) |
| return end | if (strcmp(csU(1:lenKeyword), keyWordU)) fk |
| if (len< lenKeyword) fk=0 = iSD | |
| else | if (~iLastWasDelimiter) indxList |
| if (numDelimiters >=1) sl | |
| if (isempty(assgnLoc)) dwiGradient = [] | |
| only implemented for RAS | if (iLocation >0) iIsRas |
| if (foundKeyword( 'CONTENT:', cs)) headerInfo.content | |
| iMF (3) iMF(6) iMF(9)] | |
| iMF (2) iMF(5) iMF(8) | |
| iSD (3) iSD(6) iSD(9)] | |
| iSD (2) iSD(5) iSD(8) | |
| while (iEnd >1 &strList(iEnd)==delim) iEnd | |
| while (iStart< len &strList(iStart)==delim) iStart | |
| while (~feof(fidr)) cs | |
Variables | |
| TODO | __pad0__ |
| find where the assignment is | assgnLoc = strfind( st, ':=' ) |
| headerInfo | centerings = [{'?^} {'cell'} {'cell'} {'cell'}] |
| else let s see if we are dealing with a comment | csTmp = removeExcessDelimiters( cs, ' ' ) |
| csU = upper( cs ) | |
| headerInfo | data = '?^ |
| delimiterIndices = strfind(strList,' ') | |
| headerInfo | dimension = '?^ |
| in case of a tensor volume there are | dimensions |
| dwiGradient = extractGradient( cs(length('DWMRI_GRADIENT_')+1:end ) ) | |
| headerInfo | encoding = '?^ |
| headerInfo | endian = '?^ |
| fidr = fileparts( nhdrFileName ) fopen( nhdrFileName, 'r' ) | |
| return function | fk |
| return | function [iGNr, dwiGradient] |
| default | header |
| function | headerInfo |
| end | iEnd = len |
| for | iI |
| end | iLastWasDelimiter = 0 |
| iLocation = strfind( csU(length('SPACE:')+1:end ), 'RIGHT-ANTERIOR-SUPERIOR') | |
| end | indxList = [] |
| return function | iNrs |
| iSD = extractNumbersWithout( space_dir_tmp, {'(',')',','} ) | |
| iStart = 1 | |
| iThicknesses = [] | |
| keyWordU = upper( keyWord ) | |
| tensor has to have headerInfo | kinds |
| end return function | kvs |
| len = length( strList ) | |
| lenKeyword = length( keyWord ) | |
| lenThicknesses = length( sThicknesses ) | |
| decided that the none is not needed in | matlab |
| headerInfo | measurementframe = [NaN NaN NaN |
| NaN NaN | NaN |
| function otherwise it will not work makes Assumes | nrrdStructure |
| numDelimiters = length(delimiterIndices) | |
| these fields are | optional |
| if(fidr==-1) fprintf('ABORT | return |
| headerInfo | sizes = '?^ |
| end return function | sl |
| headerInfo | space = '?^ |
| in case of a tensor volume there are but only of them are in space | space_dir_tmp = strrep( cs(length('SPACE DIRECTIONS:')+1:end), 'none', 'NaN' ) |
| headerInfo scalar data is expected to have values headerInfo | spacedirections = [NaN NaN NaN |
| headerInfo | spaceorigin = [NaN NaN NaN] |
| headerInfo | thicknesses = iThicknesses |
| headerInfo | type = '?^ |
| function otherwise it will not work makes Assumes but needs to be compiled manually on your machine cd | ( | '../../../../Slicer3-lib/teem/src/matlab' | ) |
| elseif | ( | foundKeyword('DWMRI_GRADIENT_', cs) | ) |
| elseif | ( | foundKeyword('DWMRI_B-VALUE', cs) | ) |
| elseif | ( | foundKeyword('MODALITY', cs) | ) |
| elseif | ( | foundKeyword('MEASUREMENT FRAME:', cs) | ) |
| elseif | ( | foundKeyword('SPACE ORIGIN:', cs) | ) |
| elseif | ( | foundKeyword('SPACE UNITS:', cs) | ) |
| elseif | ( | foundKeyword('CENTERINGS:', cs) | ) |
| elseif | ( | foundKeyword('KINDS:', cs) | ) |
| elseif | ( | foundKeyword('THICKNESSES:', cs) | ) |
| elseif | ( | foundKeyword('SIZES:', cs) | ) |
| end elseif | ( | foundKeyword('SPACE DIRECTIONS:', cs) | ) |
| elseif | ( | foundKeyword('SPACE:', cs) | ) |
| elseif | ( | foundKeyword('DIMENSION:', cs) | ) |
| elseif | ( | foundKeyword('ENCODING:', cs) | ) |
| elseif | ( | foundKeyword('ENDIAN:', cs) | ) |
| elseif | ( | foundKeyword('TYPE:', cs) | ) |
| else fprintf | ( | 'Warning:File is not | RAS, | |
| make sure subsequent matlab processing is consistent!\n' | ||||
| ) |
| headerInfo gradients | ( | iGNr+ | 1, | |
| : | ||||
| ) |
Referenced by itk::MRMLIDImageIO::SetDWNodeValues().
| return end if | ( | strcmp(csU(1:lenKeyword), keyWordU) | ) |
| if | ( | ) | = iSD [pure virtual] |
| else if | ( | ~ | iLastWasDelimiter | ) |
| end if | ( | numDelimiters >= | 1 | ) |
References numDelimiters.
| if | ( | isempty(assgnLoc) | ) | = [] |
| only implemented for RAS if | ( | iLocation | , | |
| 0 | ||||
| ) |
| if | ( | foundKeyword( 'CONTENT:', cs) | ) |
| iMF | ( | 3 | ) |
| iMF | ( | 2 | ) |
| iSD | ( | 3 | ) |
| iSD | ( | 2 | ) |
| while | ( | iEnd | , | |
| 1 & | strListiEnd = =delim | |||
| ) |
| while | ( | ) |
| while | ( | ~ | feoffidr | ) |
| TODO __pad0__ |
| find where the assignment is assgnLoc = strfind( st, ':=' ) |
| headerInfo centerings = [{'?^} {'cell'} {'cell'} {'cell'}] |
| headerInfo data = '?^ |
Referenced by qMRMLNodeComboBox::activateExtraItem(), CompareTwoVolumes(), vtkSlicerViewControlGUI::ConfigureNavigationWidgetRender(), MatrixRowCol::Data(), MeshContourEvolver::entry_main(), vtkImageGraph::ExecuteData(), vtkTensorMask::ExecuteData(), vtkTeemEstimateDiffusionTensor::ExecuteData(), vtkNRRDReader::ExecuteData(), vtkImageSetTensorComponents::ExecuteData(), vtkITKTimeSeriesDatabase::ExecuteData(), vtkITKArchetypeImageSeriesVectorReaderSeries::ExecuteData(), vtkITKArchetypeImageSeriesVectorReaderFile::ExecuteData(), vtkITKArchetypeImageSeriesScalarReader::ExecuteData(), vtkImageRectangularSource::ExecuteData(), vtkImageCurveRegion::ExecuteDataGauss(), vtkImageCurveRegion::ExecuteDataReadFile(), vtkImageRectangularSource::ExecuteInformation(), qSlicermiAnnotationModuleImageUtil::fromImageData(), vtkSlicerFixedPointVolumeRayCastCompositeShadeHelper::GenerateImage(), vtkSlicerFixedPointVolumeRayCastCompositeGOShadeHelper::GenerateImage(), vtkSlicerFixedPointVolumeRayCastCompositeGOHelper::GenerateImage(), vtkMRMLVolumePropertyNode::GetColorTransferFunctionFromString(), vtkMRMLVolumePropertyNode::GetColorTransferFunctionString(), vtkMRMLArrayPlotNode::GetDrawObject(), vtkMRMLVolumePropertyNode::GetPiecewiseFunctionFromString(), vtkMRMLVolumePropertyNode::GetPiecewiseFunctionString(), MatrixRowCol::IncrDiag(), MatrixRowCol::IncrLT(), MatrixRowCol::IncrMat(), MatrixRowCol::IncrUT(), ipAllocateData(), mexFunction(), qMRMLNodeSelector::node(), vtkPETCTFusionPlots::OutputAllDataInCSV(), vtkPharmacokineticsIntensityCurves::OutputDataInCSV(), vtkPETCTFusionPlots::OutputDataInCSV(), PaddedImageBaseOf< DATA, 3 >::Pad(), SourceAccessorEqualizeBaseOf< DATA, 2, PRECISION, SOURCE >::PrepareForAccessAction(), PrintImage(), vtkUDPServerGUI::ProcessTimerEvents(), vtkFetchMIResourceUploadWidget::ProcessWidgetEvents(), vtkSlicerMRMLSaveDataWidget::ProcessWidgetEvents(), vtkHyperStreamlineTeem::ProduceFiberContext(), qCTKTestApplication::qCTKTestApplication(), vtkTeemEstimateDiffusionTensor::SetGradientsToContext(), SourceAccessorRangeScaleBaseOf< DATA, 2, PRECISION, SOURCE >::SetMinMaxRangeScale(), SourceAccessorRangeScaleBaseOf< DATA, 2, PRECISION, SOURCE >::SetNormalRangeScale(), sort_ascending(), sort_descending(), and itk::EncodedTransformFileReader::Update().
| delimiterIndices = strfind(strList,' ') |
| headerInfo dimension = '?^ |
| in case of a tensor volume there are dimensions |
Referenced by mimxCheckTypeOfFile::Check(), vtkChangeTrackerLogic::CheckROI(), vtkZFrameRobotToImageRegistration::DoRegistration(), vtkSlicerSlicesControlGUI::FitFOVToBackground(), vtkSlicerSliceLogic::GetVolumeRASBox(), main(), vtkEMSegmentRunSegmentationStep::RetrieveInteractorCoordinates(), vtkChangeTrackerROIStep::RetrieveInteractorCoordinates(), vtkEMSegmentRunSegmentationStep::ROICheck(), vtkEMSegmentRunSegmentationStep::ROIMapShow(), vtkChangeTrackerROIStep::ROIMapShow(), vtkPharmacokineticsGUI::SelectActive4DBundle(), vtkEMSegmentRunSegmentationStep::ShowROIGUI(), vtkChangeTrackerROIStep::ShowUserInterface(), vtkSlicerSliceLayerLogic::UpdateTransforms(), and vtkImageSlicePaintPaint().
| else dwiGradient = extractGradient( cs(length('DWMRI_GRADIENT_')+1:end ) ) |
| headerInfo encoding = '?^ |
| headerInfo endian = '?^ |
| fidr = fileparts( nhdrFileName ) fopen( nhdrFileName, 'r' ) |
| return function[iGNr, dwiGradient] |
extractGradient( st )
% first get the gradient number
iGNr = str2num( st(1:4) )
| default header |
| end clear headerInfo |
loadNrrdStructure( nhdrFileName ) % reads all the header information from a nrrd file % assumes a nhdr
| for iI |
1:lenThicknesses iThicknesses = [iThicknesses, str2num( sThicknesses{iI} ) ]
Referenced by DoIt().
| end iLastWasDelimiter = 0 |
| end indxList = [] |
| end iNrs |
extractNumbersWithout( inputString, withoutTokens ) auxStr = inputString
| iSD = extractNumbersWithout( space_dir_tmp, {'(',')',','} ) |
| iStart = 1 |
| iThicknesses = [] |
| keyWordU = upper( keyWord ) |
[{'3D-masked-symmetric-matrix'}
% {'space'} {'space'} {'space'}]
| len = length( strList ) |
Referenced by vtkSlicerApplication::ArrayToString(), ComputeAdjacency(), vtkPETCTFusionLogic::GetParametersFromDICOMHeader(), main(), mexFunction(), vtkFileOps::pathComponent(), vtkSlicerModuleChooseGUI::PopulateModuleSearchMenu(), vtkFSSurfaceAnnotationReader::ReadEmbeddedColorTable(), vtkMRMLViewNode::ReadXMLAttributes(), recursive_copy(), vtkMRMLSliceNode::RotateToVolumePlane(), SkelGraph::Sample_along_axis(), vtkTransRectalFiducialCalibrationAlgo::SegmentCircle(), vtkMRMLVolumeNode::SetIJKToRASMatrix(), vtkCacheManager::SetRemoteCacheDirectory(), Slicer3_main(), TCLAP::StdOutput::spacePrint(), vtkQueryAtlasUseSearchTermWidget::ToggleQuotesOnSelectedSearchTerms(), vtkNeuroNavLogic::UpdateFiducialSeeding(), vtkSlicerModulesStep::UpdateModulesFromRepository(), vtkCommandLineModuleGUI::UpdateMRML(), and vtkImageConnectivityExecute().
| lenKeyword = length( keyWord ) |
| lenThicknesses = length( sThicknesses ) |
| decided that the none is not needed in matlab |
| function otherwise it will not work makes Assumes nrrdStructure |
| numDelimiters = length(delimiterIndices) |
Referenced by if().
| these fields are optional |
const const T2 &t2 return [inline] |
Referenced by vtkEMSegmentNodeParametersStep::ClassWeightChangedCallback(), vtkKWMimxCreateBBFromRubberBandPickGroup::CreateBBFromRubberBandPickCallback(), vtkKWMimxCreateSurfaceFromContourGroup::CreateSurfaceFromContourTraceContourCallback(), vtkEMSegmentKWDynamicFrame::DefineCheckButton(), vtkEMSegmentKWDynamicFrame::DefineTextEntry(), vtkEMSegmentKWDynamicFrame::DefineTextLabel(), vtkEMSegmentKWDynamicFrame::DefineVolumeMenuButton(), vtkMRMLAnnotationControlPointsNode::DeleteControlPoint(), vtkMRMLAnnotationLinesNode::DeleteLine(), vtkKWMimxEditBBMeshSeedGroup::EditBBMeshSeedPickCellCallback(), vtkKWMimxAssignBoundaryConditionsGroup::ElementSetOutputApplyCallback(), vtkImageEMLocalClass::ExecuteData(), vtkImageEMAtlasClass::ExecuteData(), vtkImageSumOverVoxels::ExecuteData(), vtkMimxCreateElementSetWidgetFEMesh::ExtractElementsBelongingToAFace(), vtkKWMimxCreateBBFromBoundsGroup::ManualBoundCallback(), vtkKWMimxAssignBoundaryConditionsGroup::NodeSetOutputApplyCallback(), vtkMimxPatchSurfaceMesh::PolyDataExecute(), vtkEMSegmentParametersSetStep::SelectedParameterSetChangedCallback(), vtkMimxSelectPointsWidget::SelectPointsOnAFaceFunction(), qSlicerWidget::setMRMLScene(), vtkEMSegmentMRMLManager::SetTargetSelectedVolumeNthID(), vtkEMSegmentMRMLManager::SetTreeNodeDistributionLogCovarianceOffDiagonal(), vtkEMSegmentMRMLManager::SetTreeNodeDistributionLogCovarianceWithCorrection(), vtkKWMimxEditBBMeshSeedGroup::ShowMeshSeedCallback(), vtkSlicermiAnnotationModuleLogic::StartAddingFiducials(), vtkSlicermiAnnotationModuleLogic::StopAddingFiducials(), vtkEMSegmentKWLogic::UpdateIntensityDistributionAuto(), and vtkEMSegmentMRMLManager::UpdateIntensityDistributionFromSample().
| parse sizes headerInfo sizes = '?^ |
Referenced by CountSamplesTest(), DownsampleHeuristicsTest(), qCTKTitleComboBox::paintEvent(), and ScalingHeuristicsTest().
| end end sl |
extractStringList( strList ) strList = removeExcessDelimiters( strList, ' ' )
Referenced by vtkQueryAtlasGUI::BuildQueriesGUI().
| headerInfo space = '?^ |
Referenced by main(), vtkMRMLScriptedModuleNode::ReadXMLAttributes(), and itk::CommandIO::Write().
| decided that the none is not needed in it s nicer to have a matrix space_dir_tmp = strrep( cs(length('SPACE DIRECTIONS:')+1:end), 'none', 'NaN' ) |
| if (length(iSD)~=9 & length(iSD)~=10) fprintf('Warning end headerInfo spacedirections = [NaN NaN NaN |
| if (length(iSO)~=3) % fprintf('Warning end headerInfo spaceorigin = [NaN NaN NaN] |
| headerInfo type = '?^ |
Referenced by vtkPETCTFusionGUI::ApplyDefaultCTLUT(), vtkPETCTFusionGUI::ApplyDefaultPETLUT(), vtkMRMLIGTLConnectorNode::Copy(), qSlicerCLIModuleWidgetPrivate::createGeometryTagWidget(), qSlicerCLIModuleWidgetPrivate::createImageTagWidget(), qSlicerCLIModuleWidgetPrivate::createTableTagWidget(), qSlicerCLIModuleWidgetPrivate::createTransformTagWidget(), vtkImageAccumulateDiscrete::ExecuteData(), vtkOpenIGTLinkIFGUI::IOConfigTreeContextMenu(), IsEnumeration(), IsVectorOfVectors(), NeedsQuotes(), NeedsTemp(), nricMatrix::operator<<(), GeneralMatrix::operator<<(), itk::MGHImageIO::ReadVolumeHeader(), vtkMRMLIGTLConnectorNode::ReadXMLAttributes(), vtkMRMLColorTableNode::ReadXMLAttributes(), vtkMRMLColorNode::ReadXMLAttributes(), vtkMRMLColorTableNode::Reset(), vtkTeemEstimateDiffusionTensor::SetGradientsToContext(), vtkKWMimxAssignBoundaryConditionsGroup::ShowBoundaryConditionRepresentation(), sock_initobj(), GeneralMatrix::Type(), vtkPETCTFusionGUI::UpdateColorRadioButtonsFromMRML(), and qSlicerCLIModuleWidgetPrivate::updateMRMLCommandLineModuleNode().
1.6.1