Giter Club home page Giter Club logo

groups's Issues

Fix -Wunused-variable in GroupwiseRegistration.cpp

/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp: In member function ‘void GroupwiseRegistration::initProperties(int, const char**, int)’:
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:572:6: warning: unused variable ‘nFace’ [-Wunused-variable]
  int nFace = m_spharm[subj].sphere->nFace();
      ^
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp: In member function ‘void GroupwiseRegistration::updateDeformation(int)’:
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:953:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < m_spharm[subject].vertex.size() && !updated; i++)
                    ^
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:957:16: warning: unused variable ‘v0’ [-Wunused-variable]
   const float *v0 = v->fv();
                ^
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp: In member function ‘void GroupwiseRegistration::updateLandmark()’:
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:977:8: warning: unused variable ‘id’ [-Wunused-variable]
    int id = m_spharm[subj].landmark[i]->id;
        ^
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp: In member function ‘void GroupwiseRegistration::updateLandmarkMedian()’:
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:1019:8: warning: unused variable ‘id’ [-Wunused-variable]
    int id = m_spharm[subj].landmark[i]->id;
        ^
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp: At global scope:
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:1165:42: warning: unused parameter ‘coeff’ [-Wunused-parameter]
 float GroupwiseRegistration::cost(float *coeff, int statusStep)
                                          ^
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp: In member function ‘void GroupwiseRegistration::optimization()’:
/tmp/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:1229:6: warning: unused variable ‘n2’ [-Wunused-variable]
  int n2 = m_csize * 2 - n1;
      ^

Update FindVcvars.cmake

The version of FindVcvars.cmake used here is a bit out-of-date and does not support any VS 2019 build.

In particular, I am on VS 1929, which would be added by this PR: scikit-build/cmake-FindVcvars#1

It would also be helpful to update FindVcvars in Slicer proper once the above PR is merged; both on the master and v4.11 branches.

GroupwiseRegistration::optimization doesn't make use of cost_function

In the GroupwiseRegistration::optimization function, the cost_function is not used hence the warning reported below.

Indeed, if we trace the flow, there functions are called:

GroupwiseRegistration::optimization -> min_newuoa -> min_newuoa -> newuoa_ -> newuob_ -> biglag_ -> no use of "func"
void GroupwiseRegistration::optimization(void)
{
	cost_function costFunc(this);
	int prev = 0;
	int step = 1;

	while (m_degree_inc < m_degree)
	{
		nIter = 0;
		int n = (m_degree_inc + 1) * (m_degree_inc + 1) * m_nSubj * 2 - prev;
		min_newuoa(n, &m_coeff[prev], costFunc, 1.0f, 1e-5f, m_maxIter);
		prev = (m_degree_inc + 1) * (m_degree_inc + 1) * m_nSubj * 2;
		m_degree_inc = min(m_degree_inc + step, m_degree);
	}
	
	// the entire optimization together
	nIter = 0;
	min_newuoa(m_csize * 2, m_coeff, costFunc, 1.0f, 1e-6f, m_maxIter);
}
In file included from /home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:19:0:
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/newuoa.h: In instantiation of ‘int biglag_(int, int, TYPE*, TYPE*, TYPE*, TYPE*, int*, int*, int*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, Func&) [with TYPE = float; Func = cost_function]’:
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/newuoa.h:1311:10:   required from ‘TYPE newuob_(int, int, TYPE*, TYPE, TYPE, int*, int, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, int*, TYPE*, TYPE*, TYPE*, Func&) [with TYPE = float; Func = cost_function]’
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/newuoa.h:1709:16:   required from ‘TYPE newuoa_(int, int, TYPE*, TYPE, TYPE, int*, int, TYPE*, Func&) [with TYPE = float; Func = cost_function]’
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/newuoa.h:1720:15:   required from ‘TYPE min_newuoa(int, TYPE*, Func&, TYPE, TYPE, int) [with TYPE = float; Func = cost_function]’
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:1263:65:   required from here
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/newuoa.h:59:42: warning: unused parameter ‘func’ [-Wunused-parameter]
        TYPE *gd, TYPE *s, TYPE *w, Func &func)
                                          ^

Simplify RigidAlignmentModule and GroupWiseRegistrationModule

When built against Slicer, the latest version of ShapePopulationViewer (SPV) is built as a loadable module.

This means that models already loaded in Slicer can easily be loaded in SPV, models can also be drag-and-dropped and loaded automatically.

This means that that the workflow in RigidAlignmentModule (or GroupWiseRegistrationModule) should be updated.

Currently the workflow is expected to be the following:

  1. Display shape in shape population viewer by starting the CLI and expect the user to select entries from the CSV dialog. See here
  2. Run rigid alignment CLI (or GROUPS CLI)
  3. Run surf remesh CLI
  4. Display shape in shape population viewer by starting the CLI and expecting the user to select entries from the CSV dialog. See here

A possible workflow could be the following:

  1. Run rigid alignment CLI (or GROUPS CLI)
  2. Run surf remesh CLI
  3. Automatically select SPV and load shapes (without creating intermediate CSV files)

Remove LAPACK dependency

It am unable to find where lapack is being used in this extension, and having LAPACK as a dependency is a bit of overhead with needing fortran and all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.