[med-svn] [mia] 01/03: Imported Upstream version 2.0.11
Gert Wollny
gert-guest at alioth.debian.org
Tue Oct 15 10:43:16 UTC 2013
This is an automated email from the git hooks/post-receive script.
gert-guest pushed a commit to branch master
in repository mia.
commit 0bf45e76dda00cad4bc62fffe14518817d8032c6
Author: Gert Wollny <gw.fossdev at gmail.com>
Date: Mon Oct 14 17:04:28 2013 +0200
Imported Upstream version 2.0.11
---
CMakeLists.txt | 6 +++---
ChangeLog | 12 ++++++++++++
README | 21 ++++++++++++++++++++-
mia/2d/interpolator.cxx | 6 ++++--
mia/2d/perfusion.cc | 2 ++
mia/core/boundary_conditions.cc | 13 ++++++-------
mia/core/boundary_conditions.hh | 4 +++-
mia/core/ica.cc | 2 +-
mia/core/splinekernel/test_bspline.cc | 12 ++++++++----
mia/core/test_boundary_conditions.cc | 4 ++--
src/2dmyocard-icaseries.cc | 10 ++++++----
src/2dmyoica-nonrigid.cc | 8 ++++----
src/2dmyomilles.cc | 15 +++++++++++----
13 files changed, 82 insertions(+), 33 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11240be..16cb2a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,9 +41,9 @@ SET(VENDOR "Gert Wollny")
SET(PACKAGE_NAME "mia")
SET(MAJOR_VERSION 2)
SET(MINOR_VERSION 0)
-SET(MICRO_VERSION 10)
-SET(INTERFACE_AGE 2)
-SET(BINARY_AGE 2)
+SET(MICRO_VERSION 11)
+SET(INTERFACE_AGE 3)
+SET(BINARY_AGE 3)
SET(PACKAGE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}")
SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}")
diff --git a/ChangeLog b/ChangeLog
index 559b04f..406bb9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2.0.11
+
+ Fixes of tracked bugs:
+
+ * #106: mia-2dmyomilles - save feature images also when no segmentation is requested
+ * #122: boundary-condition plug-ins - remove width parameters since it is set internally
+ * #123: Correct handling of ICA instance when RV/LV classification fails for all numbers of components
+
+ Partial fixes:
+
+ * #104: improve some of the command line parameter descriptions
+
2.0.10
Fixes of tracked bugs:
diff --git a/README b/README
index f7cbacd..b890700 100644
--- a/README
+++ b/README
@@ -5,8 +5,27 @@ of gray scale images.
For details, help, etc see http://mia.sourceforge.net
+If you use this software for scientific research, please cite it as
+
+ Wollny G, Kellman P, Ledesma-Carbayo M-J, Skinner MM, Hublin J-J, and Hierl Th,
+ "MIA - A Free and Open Source Software for Gray Scale Medical Image Analysis",
+ Source Code for Biology and Medicine, 2013, 8:20
+
+
+SUPPORT:
+
+For support with running MIA or developing new software using MIA please go to
+
+ https://sourceforge.net/p/mia/discussion/
+
+REPORTING BUGS:
+
+Please use the bug tracker at sourceforge to report new bugs:
+
+ https://sourceforge.net/p/mia/tickets/
+
KNOWN BUGS:
* Image orientation and pixel size information is not honoured in the image registration code.
* the implementation of Mutual information needs testing
-* Further bugs are listed at https://sourceforge.net/p/mia/tickets/
+
diff --git a/mia/2d/interpolator.cxx b/mia/2d/interpolator.cxx
index d10269d..37dcfd1 100644
--- a/mia/2d/interpolator.cxx
+++ b/mia/2d/interpolator.cxx
@@ -67,8 +67,8 @@ template <typename T>
T2DConvoluteInterpolator<T>::T2DConvoluteInterpolator(const T2DDatafield<T>& image, PSplineKernel kernel):
m_coeff(image.get_size()),
m_kernel(kernel),
- m_x_boundary(produce_spline_boundary_condition("mirror", image.get_size().x)),
- m_y_boundary(produce_spline_boundary_condition("mirror", image.get_size().y)),
+ m_x_boundary(produce_spline_boundary_condition("mirror")),
+ m_y_boundary(produce_spline_boundary_condition("mirror")),
m_x_index(kernel->size()),
m_y_index(kernel->size()),
m_x_weight(kernel->size()),
@@ -76,6 +76,8 @@ T2DConvoluteInterpolator<T>::T2DConvoluteInterpolator(const T2DDatafield<T>& ima
m_x_cache(kernel->size(), *m_x_boundary, false),
m_y_cache(kernel->size(), *m_y_boundary, true)
{
+ m_x_boundary->set_width(image.get_size().x);
+ m_y_boundary->set_width(image.get_size().y);
prefilter(image);
}
template <typename T>
diff --git a/mia/2d/perfusion.cc b/mia/2d/perfusion.cc
index 8204ba1..176eaff 100644
--- a/mia/2d/perfusion.cc
+++ b/mia/2d/perfusion.cc
@@ -299,6 +299,8 @@ bool C2DPerfusionAnalysisImpl::run_ica(const vector<C2DFImage>& series)
min_components_nonzero = movement_components + 10;
m_components = i;
m_cls = cls;
+ ica.swap(l_ica);
+ has_one = true;
}
cvwarn() << "LV/RV Classification: for " << i << " components failed\n";
continue;
diff --git a/mia/core/boundary_conditions.cc b/mia/core/boundary_conditions.cc
index a5f4023..3c952c3 100644
--- a/mia/core/boundary_conditions.cc
+++ b/mia/core/boundary_conditions.cc
@@ -115,7 +115,7 @@ CSplineBoundaryConditionPlugin::CSplineBoundaryConditionPlugin(const char * name
TFactory<CSplineBoundaryCondition>(name),
m_width(0)
{
- add_parameter("w", new CIntParameter(m_width, 0, numeric_limits<int>::max(), false, "index range"));
+// add_parameter("w", new CIntParameter(m_width, 0, numeric_limits<int>::max(), false, "index range"));
}
CSplineBoundaryCondition *CSplineBoundaryConditionPlugin::do_create() const
@@ -131,15 +131,14 @@ CSplineBoundaryConditionTestPath::CSplineBoundaryConditionTestPath()
}
-
-PSplineBoundaryCondition produce_spline_boundary_condition(const std::string& descr, int width)
+EXPORT_CORE PSplineBoundaryCondition produce_spline_boundary_condition(const std::string& descr, int width)
{
- stringstream d;
- d << descr << ":w=" << width;
- return CSplineBoundaryConditionPluginHandler::instance().produce_unique(d.str());
+ auto bc = produce_spline_boundary_condition(descr);
+ if (bc)
+ bc->set_width(width);
+ return bc;
}
-
template<>
const char * const TPluginHandler<CSplineBoundaryConditionPlugin>::m_help = "These plug-ins provide various boundary "
"conditions for spline based interpolation.";
diff --git a/mia/core/boundary_conditions.hh b/mia/core/boundary_conditions.hh
index a1bf809..c042ad7 100644
--- a/mia/core/boundary_conditions.hh
+++ b/mia/core/boundary_conditions.hh
@@ -208,13 +208,15 @@ PSplineBoundaryCondition produce_spline_boundary_condition(const std::string& de
return CSplineBoundaryConditionPluginHandler::instance().produce_unique(descr);
}
+
/**
Create a specific instance of a spline interpolation boundary condition.
\param descr Description of the requested boundary conditions
\param width width of the input domain
\returns the actual boundary condition
*/
-EXPORT_CORE PSplineBoundaryCondition produce_spline_boundary_condition(const std::string& descr, int width);
+EXPORT_CORE PSplineBoundaryCondition produce_spline_boundary_condition(const std::string& descr, int width)
+ __attribute__((deprecated));
/// @cond INTERNAL
diff --git a/mia/core/ica.cc b/mia/core/ica.cc
index fe246f4..c6e619d 100644
--- a/mia/core/ica.cc
+++ b/mia/core/ica.cc
@@ -451,7 +451,7 @@ void CICAAnalysisImpl::normalize_ICs()
const double sigma = sqrt((sum2 - m_nlength * ic_shift * ic_shift) / (m_nlength - 1));
// we want to start all slopes with the negative value
- // makes only truely sense, if the 1allover mean was stripped
+ // makes only truely sense, if the allover mean was stripped
float invert = 1.0;
if (m_Mix(0, c) > 0) {
cvdebug() << "Component " << c << " invert sign\n";
diff --git a/mia/core/splinekernel/test_bspline.cc b/mia/core/splinekernel/test_bspline.cc
index 019d6b8..62a0a48 100644
--- a/mia/core/splinekernel/test_bspline.cc
+++ b/mia/core/splinekernel/test_bspline.cc
@@ -698,7 +698,8 @@ BOOST_AUTO_TEST_CASE( test_bspline4_equivalence )
{
CBSplineKernel3 kernel;
- auto bc = produce_spline_boundary_condition("mirror:w=10");
+ auto bc = produce_spline_boundary_condition("mirror");
+ bc->set_width(10);
CSplineKernel::SCache cache(kernel.size(), *bc, false);
CSplineKernel::VWeight weights(kernel.size());
CSplineKernel::VIndex indices(kernel.size());
@@ -728,7 +729,8 @@ BOOST_AUTO_TEST_CASE( test_bspline3_uncached_flat )
{
CBSplineKernel3 kernel;
- auto bc = produce_spline_boundary_condition("mirror:w=10");
+ auto bc = produce_spline_boundary_condition("mirror");
+ bc->set_width(10);
CSplineKernel::SCache cache(kernel.size(), *bc, false);
CSplineKernel::VWeight weights(kernel.size());
CSplineKernel::VIndex indices(kernel.size());
@@ -751,7 +753,8 @@ BOOST_AUTO_TEST_CASE( test_bspline3_uncached_nonflat )
{
CBSplineKernel3 kernel;
- auto bc = produce_spline_boundary_condition("mirror:w=10");
+ auto bc = produce_spline_boundary_condition("mirror");
+ bc->set_width(10);
CSplineKernel::SCache cache(kernel.size(), *bc, false);
CSplineKernel::VWeight weights(kernel.size());
CSplineKernel::VIndex indices(kernel.size());
@@ -777,7 +780,8 @@ BOOST_AUTO_TEST_CASE( test_bspline3_cached )
{
CBSplineKernel3 kernel;
- auto bc = produce_spline_boundary_condition("mirror:w=10");
+ auto bc = produce_spline_boundary_condition("mirror");
+ bc->set_width(10);
CSplineKernel::SCache cache(kernel.size(), *bc, false);
CSplineKernel::VWeight weights(kernel.size());
CSplineKernel::VIndex indices(kernel.size());
diff --git a/mia/core/test_boundary_conditions.cc b/mia/core/test_boundary_conditions.cc
index bc698af..dfda508 100644
--- a/mia/core/test_boundary_conditions.cc
+++ b/mia/core/test_boundary_conditions.cc
@@ -38,8 +38,8 @@ BOOST_AUTO_TEST_CASE( test_BoundaryConditionsPlugins )
BOOST_AUTO_TEST_CASE( test_Produce )
{
- auto bc = produce_spline_boundary_condition("repeat", 10);
- BOOST_CHECK_EQUAL(bc->get_init_string(), "repeat:w=10");
+ auto bc = produce_spline_boundary_condition("repeat");
+ BOOST_CHECK_EQUAL(bc->get_init_string(), "repeat");
}
diff --git a/src/2dmyocard-icaseries.cc b/src/2dmyocard-icaseries.cc
index deb4225..a09cb0b 100644
--- a/src/2dmyocard-icaseries.cc
+++ b/src/2dmyocard-icaseries.cc
@@ -78,7 +78,7 @@ int do_main( int argc, char *argv[] )
// ICA parameters
size_t components = 0;
- bool no_normalize = false;
+ bool normalize = false;
bool no_meanstrip = false;
float box_scale = 1.4;
size_t skip_images = 0;
@@ -92,11 +92,13 @@ int do_main( int argc, char *argv[] )
"Image type and numbering scheme are taken from the input images."));
options.add(make_opt( cropped_filename, "save-cropped", 'c', "save cropped set of the original set to this file, "
"the image files will use the stem of the name as file name base"));
- options.add(make_opt( save_crop_feature, "save-feature", 0, "save segmentation feature images and initial ICA mixing matrix"));
+ options.add(make_opt( save_crop_feature, "save-feature", 0, "save the features images resulting from the ICA and "
+ "some intermediate images used for the RV-LV segmentation with the given file name base to PNG files. "
+ "Also save the coefficients of the initial best and the final IC mixing matrix."));
options.set_group("ICA");
options.add(make_opt( components, "components", 'C', "ICA components 0 = automatic estimation"));
- options.add(make_opt( no_normalize, "no-normalize", 0, "don't normalized ICs"));
+ options.add(make_opt( normalize, "normalize", 0, "normalized ICs"));
options.add(make_opt( no_meanstrip, "no-meanstrip", 0,
"don't strip the mean from the mixing curves"));
options.add(make_opt( box_scale, "segscale", 's',
@@ -120,7 +122,7 @@ int do_main( int argc, char *argv[] )
// run ICA
- C2DPerfusionAnalysis ica(components, !no_normalize, !no_meanstrip);
+ C2DPerfusionAnalysis ica(components, normalize, !no_meanstrip);
if (max_ica_iterations)
ica.set_max_ica_iterations(max_ica_iterations);
diff --git a/src/2dmyoica-nonrigid.cc b/src/2dmyoica-nonrigid.cc
index 38aa0a1..9c11958 100644
--- a/src/2dmyoica-nonrigid.cc
+++ b/src/2dmyoica-nonrigid.cc
@@ -205,12 +205,12 @@ int do_main( int argc, char *argv[] )
options.add(make_opt( cropped_filename, "save-cropped", 0,
"save cropped set to this file"));
- options.add(make_opt( save_crop_feature, "save-feature", 0,
- "save segmentation feature images"
- " and initial ICA mixing matrix"));
+ options.add(make_opt( save_crop_feature, "save-feature", 0, "save the features images resulting from the ICA and "
+ "some intermediate images used for the RV-LV segmentation with the given file name base to PNG files. "
+ "Also save the coefficients of the initial best and the final IC mixing matrix."));
options.add(make_opt( save_ref_filename, "save-refs", 0,
- "save reference images"));
+ "save synthetic reference images"));
options.add(make_opt( save_reg_filename, "save-regs", 0,
"save intermediate registered images"));
diff --git a/src/2dmyomilles.cc b/src/2dmyomilles.cc
index 0f0e3ae..4dfd21a 100644
--- a/src/2dmyomilles.cc
+++ b/src/2dmyomilles.cc
@@ -103,15 +103,20 @@ int do_main( int argc, char *argv[] )
size_t pass = 2;
CCmdOptionList options(g_description);
+
+ options.set_group("File-IO");
options.add(make_opt( in_filename, "in-file", 'i', "input perfusion data set", CCmdOption::required));
options.add(make_opt( out_filename, "out-file", 'o', "output perfusion data set", CCmdOption::required));
options.add(make_opt( registered_filebase, "registered", 'r', "file name base for registered files"));
- options.add(make_opt( ref_filebase, "save-references", 0, "save reference images to this file base"));
+ options.add(make_opt( ref_filebase, "save-references", 0, "save synthetic reference images to this file base"));
options.add(make_opt( cropped_filename, "save-cropped", 0, "save cropped image set to this file"));
- options.add(make_opt( save_crop_feature, "save-feature", 0, "save segmentation feature images to png "
- " with the given file name base "));
+ options.add(make_opt( save_crop_feature, "save-feature", 0, "save the features images resulting from the ICA and "
+ "some intermediate images used for the RV-LV segmentation with the given file name base to PNG files. "
+ "Also save the coefficients of the initial best and the final IC mixing matrix."));
+
+ options.set_group("Registration");
options.add(make_opt( cost_function, "cost", 'c', "registration criterion"));
options.add(make_opt( minimizer, "gsl:opt=simplex,step=1.0", "optimizer", 'O', "Optimizer used for minimization"));
options.add(make_opt( transform_creator, "rigid", "transForm", 'f', "transformation type"));
@@ -120,8 +125,9 @@ int do_main( int argc, char *argv[] )
options.add(make_opt( pass, "passes", 'P', "registration passes"));
+ options.set_group("ICA");
options.add(make_opt( components, "components", 'C', "ICA components 0 = automatic estimation"));
- options.add(make_opt( normalize, "no-normalize", 0, "don't normalized ICs"));
+ options.add(make_opt( normalize, "normalize", 0, "normalized ICs"));
options.add(make_opt( no_meanstrip, "no-meanstrip", 0,
"don't strip the mean from the mixing curves"));
options.add(make_opt( use_guess_model, "guess", 'g', "use initial guess for myocardial perfusion"));
@@ -212,6 +218,7 @@ int do_main( int argc, char *argv[] )
stringstream cfile;
cfile << save_crop_feature << "-coeff.txt";
ica.save_coefs(cfile.str());
+ ica.save_feature_images(save_crop_feature);
}
if (!cropped_filename.empty()) {
--
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/mia.git
More information about the debian-med-commit
mailing list