// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void AlignSectionsFeatureCentroid::dataCheck() { setErrorCondition(0); // Set the DataContainerName and AttributematrixName for the Parent Class (AlignSections) to Use. // These are checked for validity in the Parent Class dataCheck setDataContainerName(m_GoodVoxelsArrayPath.getDataContainerName()); setCellAttributeMatrixName(m_GoodVoxelsArrayPath.getAttributeMatrixName()); AlignSections::dataCheck(); if(getErrorCondition() < 0) { return; } ImageGeom::Pointer image = getDataContainerArray()->getPrereqGeometryFromDataContainer<ImageGeom, AbstractFilter>(this, m_GoodVoxelsArrayPath.getDataContainerName()); if(getErrorCondition() < 0) { return; } if (m_ReferenceSlice > image->getZPoints()) { QString ss = QObject::tr("The Image Geometry extent (%1) is smaller than the supplied reference slice (%2)").arg(image->getZPoints()).arg(m_ReferenceSlice); setErrorCondition(-5556); notifyErrorMessage(getHumanLabel(), ss, getErrorCondition()); } QVector<size_t> cDims(1, 1); m_GoodVoxelsPtr = getDataContainerArray()->getPrereqArrayFromPath<DataArray<bool>, AbstractFilter>(this, getGoodVoxelsArrayPath(), cDims); /* Assigns the shared_ptr<> to an instance variable that is a weak_ptr<> */ if( NULL != m_GoodVoxelsPtr.lock().get() ) /* Validate the Weak Pointer wraps a non-NULL pointer to a DataArray<T> object */ { m_GoodVoxels = m_GoodVoxelsPtr.lock()->getPointer(0); } /* Now assign the raw pointer to data from the DataArray<T> object */ if(getErrorCondition() < 0) { return; } }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void ReadImage::readFilterParameters(AbstractFilterParametersReader* reader, int index) { reader->openFilterGroup(this, index); setInputFileName( reader->readString( "InputFileName", getInputFileName() ) ); setDataContainerName( reader->readString( "DataContainerName", getDataContainerName() ) ); setCellAttributeMatrixName( reader->readString( "CellAttributeMatrixName", getCellAttributeMatrixName() ) ); setImageDataArrayName( reader->readString( "ImageDataArrayName", getImageDataArrayName() ) ); reader->closeFilterGroup(); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void VtkStructuredPointsReader::readFilterParameters(AbstractFilterParametersReader* reader, int index) { reader->openFilterGroup(this, index); setVertexDataContainerName(reader->readString("VertexDataContainerName", getVertexDataContainerName())); setVolumeDataContainerName(reader->readString("VolumeDataContainerName", getVolumeDataContainerName() ) ); setCellAttributeMatrixName(reader->readString("CellAttributeMatrixName", getCellAttributeMatrixName() ) ); setVertexAttributeMatrixName(reader->readString("VertexAttributeMatrixName", getVertexAttributeMatrixName() ) ); setInputFile( reader->readString( "InputFile", getInputFile() ) ); setReadPointData(reader->readValue("ReadPointData", getReadPointData())); setReadCellData(reader->readValue("ReadCellData", getReadCellData())); reader->closeFilterGroup(); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void InitializeSyntheticVolume::readFilterParameters(AbstractFilterParametersReader* reader, int index) { reader->openFilterGroup(this, index); setDataContainerName(reader->readString("DataContainerName", getDataContainerName() ) ); setCellAttributeMatrixName(reader->readString("CellAttributeMatrixName", getCellAttributeMatrixName() ) ); setDimensions( reader->readIntVec3("Dimensions", getDimensions() ) ); setResolution( reader->readFloatVec3("Resolution", getResolution() ) ); setOrigin( reader->readFloatVec3("Origin", getOrigin() ) ); setInputStatsArrayPath(reader->readDataArrayPath("InputStatsArrayPath", getInputStatsArrayPath() ) ); setInputPhaseTypesArrayPath(reader->readDataArrayPath("InputPhaseTypesArrayPath", getInputPhaseTypesArrayPath() ) ); setInputStatsFile(reader->readString("InputStatsFile", getInputStatsFile() ) ); setEstimateNumberOfFeatures(reader->readValue("EstimateNumberOfFeatures", getEstimateNumberOfFeatures() ) ); reader->closeFilterGroup(); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void RegularGridSampleSurfaceMesh::readFilterParameters(AbstractFilterParametersReader* reader, int index) { SampleSurfaceMesh::readFilterParameters(reader, index); reader->openFilterGroup(this, index); setXPoints(reader->readValue("XPoints", getXPoints())); setYPoints(reader->readValue("YPoints", getYPoints())); setZPoints(reader->readValue("ZPoints", getZPoints())); setResolution(reader->readFloatVec3("Resolution", getResolution())); setOrigin(reader->readFloatVec3("Origin", getOrigin())); setDataContainerName(reader->readString("DataContainerName", getDataContainerName())); setCellAttributeMatrixName(reader->readString("CellAttributeMatrixName", getCellAttributeMatrixName() ) ); setFeatureIdsArrayName(reader->readString("FeatureIdsArrayName", getFeatureIdsArrayName() ) ); reader->closeFilterGroup(); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void FeatureInfoReader::readFilterParameters(AbstractFilterParametersReader* reader, int index) { reader->openFilterGroup(this, index); setCellAttributeMatrixName(reader->readDataArrayPath("CellAttributeMatrixName", getCellAttributeMatrixName() ) ); setCellFeatureAttributeMatrixName(reader->readString("CellFeatureAttributeMatrixName", getCellFeatureAttributeMatrixName() ) ); setFeatureEulerAnglesArrayName(reader->readString("FeatureEulerAnglesArrayName", getFeatureEulerAnglesArrayName() ) ); setFeaturePhasesArrayName(reader->readString("FeaturePhasesArrayName", getFeaturePhasesArrayName() ) ); setCellEulerAnglesArrayName(reader->readString("CellEulerAnglesArrayName", getCellEulerAnglesArrayName() ) ); setCellPhasesArrayName(reader->readString("CellPhasesArrayName", getCellPhasesArrayName() ) ); setFeatureIdsArrayPath(reader->readDataArrayPath("FeatureIdsArrayPath", getFeatureIdsArrayPath() ) ); setInputFile( reader->readString( "InputFile", getInputFile() ) ); setCreateCellLevelArrays( reader->readValue("CreateCellLevelArrays", getCreateCellLevelArrays()) ); setRenumberFeatures( reader->readValue("RenumberFeatures", getRenumberFeatures()) ); reader->closeFilterGroup(); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void AdaptiveAlignmentMutualInformation::dataCheck() { setErrorCondition(0); // Set the DataContainerName and AttributematrixName for the Parent Class (AdaptiveAlignment) to Use. setDataContainerName(m_QuatsArrayPath.getDataContainerName()); setCellAttributeMatrixName(m_QuatsArrayPath.getAttributeMatrixName()); AdaptiveAlignment::dataCheck(); if (getErrorCondition() < 0) { return; } INIT_DataArray(m_FeatureCounts, int32_t); QVector<DataArrayPath> dataArrayPaths; QVector<size_t> cDims(1, 4); m_QuatsPtr = getDataContainerArray()->getPrereqArrayFromPath<DataArray<float>, AbstractFilter>(this, getQuatsArrayPath(), cDims); /* Assigns the shared_ptr<> to an instance variable that is a weak_ptr<> */ if (NULL != m_QuatsPtr.lock().get()) /* Validate the Weak Pointer wraps a non-NULL pointer to a DataArray<T> object */ { m_Quats = m_QuatsPtr.lock()->getPointer(0); } /* Now assign the raw pointer to data from the DataArray<T> object */ if (getErrorCondition() >= 0) { dataArrayPaths.push_back(getQuatsArrayPath()); } cDims[0] = 1; m_CellPhasesPtr = getDataContainerArray()->getPrereqArrayFromPath<DataArray< int32_t>, AbstractFilter>(this, getCellPhasesArrayPath(), cDims); /* Assigns the shared_ptr<> to an instance variable that is a weak_ptr<> */ if (NULL != m_CellPhasesPtr.lock().get()) /* Validate the Weak Pointer wraps a non-NULL pointer to a DataArray<T> object */ { m_CellPhases = m_CellPhasesPtr.lock()->getPointer(0); } /* Now assign the raw pointer to data from the DataArray<T> object */ if (getErrorCondition() >= 0) { dataArrayPaths.push_back(getCellPhasesArrayPath()); } if (m_UseGoodVoxels == true) { m_GoodVoxelsPtr = getDataContainerArray()->getPrereqArrayFromPath<DataArray<bool>, AbstractFilter>(this, getGoodVoxelsArrayPath(), cDims); /* Assigns the shared_ptr<> to an instance variable that is a weak_ptr<> */ if (NULL != m_GoodVoxelsPtr.lock().get()) /* Validate the Weak Pointer wraps a non-NULL pointer to a DataArray<T> object */ { m_GoodVoxels = m_GoodVoxelsPtr.lock()->getPointer(0); } /* Now assign the raw pointer to data from the DataArray<T> object */ if (getErrorCondition() >= 0) { dataArrayPaths.push_back(getGoodVoxelsArrayPath()); } } m_CrystalStructuresPtr = getDataContainerArray()->getPrereqArrayFromPath<DataArray<unsigned int>, AbstractFilter>(this, getCrystalStructuresArrayPath(), cDims); /* Assigns the shared_ptr<> to an instance variable that is a weak_ptr<> */ if (NULL != m_CrystalStructuresPtr.lock().get()) /* Validate the Weak Pointer wraps a non-NULL pointer to a DataArray<T> object */ { m_CrystalStructures = m_CrystalStructuresPtr.lock()->getPointer(0); } /* Now assign the raw pointer to data from the DataArray<T> object */ getDataContainerArray()->validateNumberOfTuples<AbstractFilter>(this, dataArrayPaths); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void AlignSectionsFeature::dataCheck() { setErrorCondition(0); // Set the DataContainerName and AttributematrixName for the Parent Class (AlignSections) to Use. // These are checked for validity in the Parent Class dataCheck setDataContainerName(m_GoodVoxelsArrayPath.getDataContainerName()); setCellAttributeMatrixName(m_GoodVoxelsArrayPath.getAttributeMatrixName()); AlignSections::dataCheck(); if(getErrorCondition() < 0) { return; } QVector<size_t> cDims(1, 1); m_GoodVoxelsPtr = getDataContainerArray()->getPrereqArrayFromPath<DataArray<bool>, AbstractFilter>(this, getGoodVoxelsArrayPath(), cDims); /* Assigns the shared_ptr<> to an instance variable that is a weak_ptr<> */ if( NULL != m_GoodVoxelsPtr.lock().get() ) /* Validate the Weak Pointer wraps a non-NULL pointer to a DataArray<T> object */ { m_GoodVoxels = m_GoodVoxelsPtr.lock()->getPointer(0); } /* Now assign the raw pointer to data from the DataArray<T> object */ }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void YSChoiAbaqusReader::readFilterParameters(AbstractFilterParametersReader* reader, int index) { reader->openFilterGroup(this, index); setDataContainerName(reader->readString("DataContainerName", getDataContainerName() ) ); setCellAttributeMatrixName(reader->readString("CellAttributeMatrixName", getCellAttributeMatrixName() ) ); setCellFeatureAttributeMatrixName(reader->readString("CellFeatureAttributeMatrixName", getCellFeatureAttributeMatrixName() ) ); setCellEnsembleAttributeMatrixName(reader->readString("CellEnsembleAttributeMatrixName", getCellEnsembleAttributeMatrixName() ) ); setCrystalStructuresArrayName(reader->readString("CrystalStructuresArrayName", getCrystalStructuresArrayName() ) ); setFeatureIdsArrayName(reader->readString("FeatureIdsArrayName", getFeatureIdsArrayName() ) ); setSurfaceFeaturesArrayName(reader->readString("SurfaceFeaturesArrayName", getSurfaceFeaturesArrayName() ) ); setCellPhasesArrayName(reader->readString("CellPhasesArrayName", getCellPhasesArrayName() ) ); setAvgQuatsArrayName(reader->readString("AvgQuatsArrayName", getAvgQuatsArrayName() ) ); setQuatsArrayName(reader->readString("QuatsArrayName", getQuatsArrayName() ) ); setCellEulerAnglesArrayName(reader->readString("CellEulerAnglesArrayName", getCellEulerAnglesArrayName() ) ); setInputFile( reader->readString( "InputFile", getInputFile() ) ); setInputFeatureInfoFile( reader->readString( "InputFeatureInfoFile", getInputFeatureInfoFile() ) ); reader->closeFilterGroup(); }