shapeworks::QOptimize
Wraps Optimize as a QObject.
#include <QOptimize.h>
Inherits from QObject, shapeworks::Optimize
Public Signals
Name | |
---|---|
void | progress(int , QString ) |
Public Functions
Name | |
---|---|
QOptimize(QObject * parent =nullptr) | |
virtual | ~QOptimize() |
virtual std::vector< std::vector< itk::Point< double > > > | GetLocalPoints() override Return the local points. |
virtual std::vector< std::vector< itk::Point< double > > > | GetGlobalPoints() override Return the global points. |
std::vector< Particles > | GetParticles() |
virtual std::vector< std::vector< std::vector< double > > > | GetProcrustesTransforms() override |
virtual void | UpdateExportablePoints() override |
Protected Functions
Name | |
---|---|
virtual void | SetIterationCallback() override Set the iteration callback. Derived classes should override to set their own callback. |
virtual void | IterateCallback(itk::Object * caller, const itk::EventObject & ) override |
Additional inherited members
Public Types inherited from shapeworks::Optimize
Name | |
---|---|
using itk::Image< float, 3 > | ImageType |
using VectorFunction::VectorType | VectorType |
using Eigen::MatrixXd | MatrixType |
Public Functions inherited from shapeworks::Optimize
Name | |
---|---|
Optimize() Constructor. |
|
virtual | ~Optimize() Destructor. |
bool | Run() Run the optimization. |
bool | LoadParameterFile(std::string filename) Load a parameter file. |
bool | SetUpOptimize(ProjectHandle project) Set up this Optimize object using a ShapeWorks project. |
void | SetProject(std::shared_ptr< Project > project) Set the Project object. |
void | SetIterationCallbackFunction(const std::function< void(void)> & f) Set an iteration callback function to be called after each iteration. |
void | AbortOptimization() Abort optimization. |
bool | GetAborted() Return if the optimization was aborted. |
void | SetCutPlanes(std::vector< std::array< itk::Point< double >, 3 > > cut_planes) Set cutting planes. |
void | SetVerbosity(int verbosity_level) Set the verbosity level (0-5) |
void | SetDomainsPerShape(int domains_per_shape) Set the number of domains per shape. |
int | GetDomainsPerShape() Return the number of domains per shape. |
void | SetDomainType(shapeworks::DomainType type) |
shapeworks::DomainType | GetDomainType() |
void | SetNumberOfParticles(std::vector< int > number_of_particles) Set the numbers of particles (vector of numbers, one for each domain) |
std::vector< int > | GetNumberOfParticles() Return the numbers of particles per domain. |
void | SetTransformFile(std::string filename) Set the transform file. |
std::string | GetTransformFile() Get the transform file. |
void | SetPrefixTransformFile(std::string prefix_transform_file) Set the prefix transform file (TODO: details) |
std::string | GetPrefixTransformFile() Get the prefix transform file. |
void | SetOutputDir(std::string output_dir) Set the output directory. |
void | SetOutputTransformFile(std::string output_transform_file) Set the output transform file. |
void | SetOutputIndividualTransformFiles(bool value) Set whether individual transforms should be written. |
void | SetUseMeshBasedAttributes(bool use_mesh_based_attributes) Set if mesh based attributes should be used. |
bool | GetUseMeshBasedAttributes() Get if mesh based attributes are being used. |
void | SetUseXYZ(std::vector< bool > use_xyz) Set if XYZ is used, one value per domain. |
void | SetUseNormals(std::vector< bool > use_normals) Set if Normals are being used, one value per domain. |
void | SetAttributesPerDomain(std::vector< int > attributes_per_domain) Set the attributes per domain. |
std::vector< int > | GetAttributesPerDomain() Get attributes per domain. |
void | SetDistributionDomainID(int distribution_domain_id) Set the distribution domain ID (TODO: details) |
int | GetDistributionDomainID() Get the distribution domain ID. |
void | SetOutputCuttingPlaneFile(std::string output_cutting_plane_file) Set the output cutting plane file. |
void | SetUseCuttingPlanes(bool use_cutting_planes) Set if using cutting planes. |
void | SetCuttingPlane(unsigned int i, const vnl_vector_fixed< double, 3 > & va, const vnl_vector_fixed< double, 3 > & vb, const vnl_vector_fixed< double, 3 > & vc) Set a given cutting plane for a shape. |
void | SetProcessingMode(int mode) Set processing mode (TODO: details) |
void | SetAdaptivityMode(int adaptivity_mode) Set adaptivity mode (TODO: details) |
void | SetMeshFFCMode(int mesh_ffc_mode) Set Mesh FFC Mode false/0 = mesh clipping mode, true/1 = mesh augmented lagrangian mode. |
void | SetAdaptivityStrength(double adaptivity_strength) Set adaptivity strength (TODO: details) |
void | SetTimePtsPerSubject(int time_pts_per_subject) Set the number of time points per subject (TODO: details) |
int | GetTimePtsPerSubject() Get the number of time points per subject (TODO: details) |
void | SetOptimizationIterations(int optimization_iterations) Set the number of optimization iterations. |
void | SetOptimizationIterationsCompleted(int optimization_iterations_completed) Set the number of optimization iterations already completed (TODO: details) |
void | SetIterationsPerSplit(int iterations_per_split) Set the number of iterations per split. |
void | SetUseShapeStatisticsInInit(bool use_shape_statistics_in_init) Set if shape statistics should be used in initialization. |
void | SetProcrustesInterval(int procrustes_interval) Set the interval for running procrustes (0 to disable) |
void | SetProcrustesScaling(bool procrustes_scaling) Set if procrustes scaling should be used. |
void | SetProcrustesRotationTranslation(bool procrustes_rotation_translation) Set if procrustes rotation/translation should be used. |
void | SetRelativeWeighting(double relative_weighting) Set the relative weighting (TODO: details) |
void | SetInitialRelativeWeighting(double initial_relative_weighting) Set the initial relative weigting (TODO: details) |
void | SetStartingRegularization(double starting_regularization) Set the starting regularization (TODO: details) |
void | SetEndingRegularization(double ending_regularization) Set the ending regularization (TODO: details) |
void | SetRecomputeRegularizationInterval(int recompute_regularization_interval) Set the interval for recomputing regularization (TODO: details) |
void | SetSaveInitSplits(bool save_init_splits) Set if initialization splits should be saved or not. |
void | SetCheckpointingInterval(int checkpointing_interval) Set the checkpointing interval. |
void | SetKeepCheckpoints(int keep_checkpoints) Set if checkpoints should be kept (0=disable, 1=enable) |
void | SetUseRegression(bool use_regression) Set if regression should be used (TODO: details) |
void | SetUseMixedEffects(bool use_mixed_effects) Set if mixed effects should be used (TODO: details) |
void | SetUseDisentangledSpatiotemporalSSM(bool use_disentangled_ssm_4d) Set if optimization should be done using disentangled spatiotemporal SSM method. |
bool | GetUseDisentangledSpatiotemporalSSM() Returns true if optimization is to be done using disentangled spatiotemporal SSM method. |
void | SetNormalAngle(double normal_angle) For good/bad analysis, set the normal angle to use (TODO: details) |
void | SetPerformGoodBad(bool perform_good_bad) Set if good/bad analysis should be done (TODO: details) |
void | SetLogEnergy(bool log_energy) Set the log energy (TODO: details) |
void | AddImage(ImageType::Pointer image, std::string name ="") Set the shape input images. |
void | AddMesh(vtkSmartPointer< vtkPolyData > poly_data) |
void | AddContour(vtkSmartPointer< vtkPolyData > poly_data) |
void | SetFilenames(const std::vector< std::string > & filenames) Set the shape filenames (TODO: details) |
void | SetPointFiles(const std::vector< std::string > & point_files) Set starting point files (TODO: details) |
void | SetInitialPoints(std::vector< std::vector< itk::Point< double > > > initial_points) Set initial particle positions (e.g. for fixed subjects) |
int | GetNumShapes() Get number of shapes. |
void | SetAttributeScales(const std::vector< double > & scales) Set attribute scales (TODO: details) |
void | SetFieldAttributes(const std::vector< std::string > & field_attributes) Set the field attributes. |
void | SetParticleFlags(std::vector< int > flags) Set Particle Flags (TODO: details) |
void | SetFixedDomains(std::vector< int > flags) Set Domain Flags (TODO: details) |
void | SetSharedBoundaryEnabled(bool enabled) Shared boundary settings. |
void | SetSharedBoundaryWeight(double weight) |
const std::vector< int > & | GetDomainFlags() |
void | SetFileOutputEnabled(bool enabled) Set if file output is enabled. |
std::vector< bool > | GetUseXYZ() Return if XYZ is used, per shape. |
std::vector< bool > | GetUseNormals() Return if Normals are used, per shape. |
void | SetNarrowBand(double v) Set the narrow band used to be +/- the given value as a multiple of the spacing. |
double | GetNarrowBand() Return the narrow band to be used. |
void | SetUseShapeStatisticsAfter(int num_particles) Set the number of particles when correspondence based multiscale takes over. |
int | GetUseShapeStatisticsAfter() Return the number of particles when correspondence based multiscale takes over. |
void | PrintParamInfo() Print parameter info to stdout. |
std::shared_ptr< Sampler > | GetSampler() Return the Sampler. |
MatrixContainer | GetParticleSystem() Return the particle system as a matrix. |
void | SetPythonFile(std::string filename) Set the python file to run at startup. |
void | SetGeodesicsEnabled(bool is_enabled) Set whether or not geodesics are enabled. |
void | SetGeodesicsCacheSizeMultiplier(size_t n) |
void | SetGeodesicsRemeshPercent(double percent) Set the remeshing percent for the mesh used for computing geodesics (0-100) |
OptimizationVisualizer & | GetVisualizer() |
void | SetShowVisualizer(bool show) |
bool | GetShowVisualizer() |
bool | GetMeshFFCMode() |
vnl_vector_fixed< double, 3 > | TransformPoint(int domain, vnl_vector_fixed< double, 3 > input) transform a point if necessary |
void | UpdateProgress() |
void | set_particle_format(std::string format) |
Protected Functions inherited from shapeworks::Optimize
Name | |
---|---|
void | ComputeTotalIterations() |
void | OptimizerStop() |
void | ReadTransformFile() |
void | ReadPrefixTransformFile(const std::string & s) |
void | InitializeSampler() |
double | GetMinNeighborhoodRadius() |
void | AddSinglePoint() |
void | Initialize() |
void | AddAdaptivity() |
void | RunOptimize() |
void | ComputeEnergyAfterIteration() |
void | SetCotanSigma() |
void | WriteTransformFile(int iter =-1) const |
void | WriteTransformFile(std::string iter_prefix) const |
void | WriteTransformFiles(int iter =-1) const |
void | WriteTransformFiles(std::string iter_prefix) const |
void | WritePointFiles(int iter =-1) |
void | WritePointFiles(std::string iter_prefix) |
void | WritePointFilesWithFeatures(int iter =-1) |
void | WritePointFilesWithFeatures(std::string iter_prefix) |
void | WriteEnergyFiles() |
void | WriteSplitFiles(std::string name) |
void | WriteCuttingPlanePoints(int iter =-1) |
void | WriteParameters(std::string output_dir ="") |
void | ReportBadParticles() |
int | SetParameters() |
void | WriteModes() |
void | PrintStartMessage(std::string str, unsigned int vlevel =0) const |
void | PrintDoneMessage(unsigned int vlevel =0) const |
void | UpdateProject() |
std::string | GetCheckpointDir() |
Protected Attributes inherited from shapeworks::Optimize
Public Signals Documentation
signal progress
void progress(
int ,
QString
)
Public Functions Documentation
function QOptimize
QOptimize(
QObject * parent =nullptr
)
function ~QOptimize
virtual ~QOptimize()
function GetLocalPoints
virtual std::vector< std::vector< itk::Point< double > > > GetLocalPoints() override
Return the local points.
Reimplements: shapeworks::Optimize::GetLocalPoints
function GetGlobalPoints
virtual std::vector< std::vector< itk::Point< double > > > GetGlobalPoints() override
Return the global points.
Reimplements: shapeworks::Optimize::GetGlobalPoints
function GetParticles
std::vector< Particles > GetParticles()
function GetProcrustesTransforms
virtual std::vector< std::vector< std::vector< double > > > GetProcrustesTransforms() override
Reimplements: shapeworks::Optimize::GetProcrustesTransforms
function UpdateExportablePoints
virtual void UpdateExportablePoints() override
Reimplements: shapeworks::Optimize::UpdateExportablePoints
Protected Functions Documentation
function SetIterationCallback
virtual void SetIterationCallback() override
Set the iteration callback. Derived classes should override to set their own callback.
Reimplements: shapeworks::Optimize::SetIterationCallback
function IterateCallback
virtual void IterateCallback(
itk::Object * caller,
const itk::EventObject &
) override
Reimplements: shapeworks::Optimize::IterateCallback
Updated on 2024-03-17 at 12:58:44 -0600