Commit 891af195 authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Adding a way to select data in a given value interval

parent ac2892a0
...@@ -27,6 +27,7 @@ void vertical_segment::load(const std::string& filename, const arguments& args) ...@@ -27,6 +27,7 @@ void vertical_segment::load(const std::string& filename, const arguments& args)
} }
vec min, max ; vec min, max ;
vec ymin, ymax;
_nX = 0 ; _nY = 0 ; _nX = 0 ; _nY = 0 ;
std::vector<int> vs ; int current_vs = 0 ; std::vector<int> vs ; int current_vs = 0 ;
...@@ -60,11 +61,16 @@ void vertical_segment::load(const std::string& filename, const arguments& args) ...@@ -60,11 +61,16 @@ void vertical_segment::load(const std::string& filename, const arguments& args)
min = args.get_vec("min", _nX, -std::numeric_limits<float>::max()) ; min = args.get_vec("min", _nX, -std::numeric_limits<float>::max()) ;
max = args.get_vec("max", _nX, std::numeric_limits<float>::max()) ; max = args.get_vec("max", _nX, std::numeric_limits<float>::max()) ;
ymin = args.get_vec("ymin", _nY, -std::numeric_limits<float>::max()) ;
ymax = args.get_vec("ymax", _nY, std::numeric_limits<float>::max()) ;
/*
for(int k=0; k<dimX(); ++k) for(int k=0; k<dimX(); ++k)
{ {
_min[k] = std::numeric_limits<double>::max() ; _min[k] = std::numeric_limits<double>::max() ;
_max[k] = -std::numeric_limits<double>::max() ; _max[k] = -std::numeric_limits<double>::max() ;
} }
*/
} }
else if(comment == std::string("VS")) else if(comment == std::string("VS"))
{ {
...@@ -173,6 +179,13 @@ void vertical_segment::load(const std::string& filename, const arguments& args) ...@@ -173,6 +179,13 @@ void vertical_segment::load(const std::string& filename, const arguments& args)
is_in = false ; is_in = false ;
} }
} }
for(int i=0; i<dimY(); ++i)
{
if(v[dimX()+i] < ymin[i] || v[dimX()+i] > ymax[i])
{
is_in = false ;
}
}
if(!is_in) if(!is_in)
{ {
continue ; continue ;
......
...@@ -157,10 +157,21 @@ int main(int argc, char** argv) ...@@ -157,10 +157,21 @@ int main(int argc, char** argv)
int nb = 1; int nb = 1;
for(int k=0; k<nX; ++k) for(int k=0; k<nX; ++k)
{ {
dt *= d->max()[k] - d->min()[k]; const double length = d->max()[k] - d->min()[k];
nb *= samples[k];
if(length > 0.0)
{
dt *= length;
nb *= samples[k];
}
else
{
samples[k] = 1;
}
} }
std::cout << "<<DEBUG>> volume of the integration domain: " << dt << std::endl;
dt /= double(nb); dt /= double(nb);
std::cout << "<<DEBUG>> volume of an integration step: " << dt << std::endl;
// Set all values to zero // Set all values to zero
m_0 = vec::Zero(nY); m_0 = vec::Zero(nY);
......
...@@ -11,45 +11,90 @@ ...@@ -11,45 +11,90 @@
<parameter name="lib-dir" value="./build" /> <parameter name="lib-dir" value="./build" />
</configuration> </configuration>
<!-- Convert the data from a TV_PROJ_DPHI parametrization to a TK_PROJ_DPHI one -->
<action name="data2data">
<!-- Input and output arguments of the action -->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR__brdf_min_retro_lobe_dense.alta" />
<output name="/tmp/3M_jaune_inc-15_retro.alta" />
<!-- Parameters -->
<parameter name="param" value="RETRO_TL_TVL_PROJ_DPHI" />
<parameter name="min" value="[0.2, -2, -2]" />
<parameter name="max" value="[0.3, 2, 2]" />
</action>
<!-- Compute the moments on the 15 degrees data slice --> <!-- Compute the moments on the 15 degrees data slice -->
<action name="data2moments"> <action name="data2moments">
<!-- Input and output arguments of the action --> <!-- Input and output arguments of the action -->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_inci-15_BRDF_2D_retro_lobe.alta" /> <input name="/tmp/3M_jaune_inc-15_retro.alta" />
<output name="./results/3d/retro/3M_jaune_inc-15.mnt" /> <output name="./results/3d/retro/3M_jaune_inc-15.mnt" />
<!-- Define the data interpolant to use --> <!-- Define the data interpolant to use -->
<plugin type="data" name="data_interpolant" /> <plugin type="data" name="data_interpolant" />
<!-- Parameters --> <!-- Parameters -->
<parameter name="dim" value="[1, 2]" />
<parameter name="sampels" value="[1, 1000, 1000]" />
</action> </action>
<!-- Convert the data from a TV_PROJ_DPHI parametrization to a TK_PROJ_DPHI one -->
<action name="data2data">
<!-- Input and output arguments of the action -->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR__brdf_min_retro_lobe_dense.alta" />
<output name="/tmp/3M_jaune_inc-30_retro.alta" />
<!-- Parameters -->
<parameter name="param" value="RETRO_TL_TVL_PROJ_DPHI" />
<parameter name="min" value="[0.3, -2, -2]" />
<parameter name="max" value="[0.8, 2, 2]" />
</action>
<!-- Compute the moments on the 30 degrees data slice --> <!-- Compute the moments on the 30 degrees data slice -->
<action name="data2moments"> <action name="data2moments">
<!-- Input and output arguments of the action --> <!-- Input and output arguments of the action -->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_inci-30_BRDF_2D_retro_lobe.alta" /> <input name="/tmp/3M_jaune_inc-30_retro.alta" />
<output name="./results/3d/retro/3M_jaune_inc-30.mnt" /> <output name="./results/3d/retro/3M_jaune_inc-30.mnt" />
<!-- Define the data interpolant to use --> <!-- Define the data interpolant to use -->
<plugin type="data" name="data_interpolant" /> <plugin type="data" name="data_interpolant" />
<!-- Parameters --> <!-- Parameters -->
<parameter name="dim" value="[1, 2]" />
<parameter name="sampels" value="[1, 1000, 1000]" />
</action> </action>
<!-- Convert the data from a TV_PROJ_DPHI parametrization to a TK_PROJ_DPHI one -->
<action name="data2data">
<!-- Input and output arguments of the action -->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR__brdf_min_retro_lobe_dense.alta" />
<output name="/tmp/3M_jaune_inc-60_retro.alta" />
<!-- Parameters -->
<parameter name="param" value="RETRO_TL_TVL_PROJ_DPHI" />
<parameter name="min" value="[0.9, -2, -2]" />
<parameter name="max" value="[1.1, 2, 2]" />
</action>
<!-- Compute the moments on the 60 degrees data slice --> <!-- Compute the moments on the 60 degrees data slice -->
<action name="data2moments"> <action name="data2moments">
<!-- Input and output arguments of the action --> <!-- Input and output arguments of the action -->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR_inci-60_BRDF_2D_retro_lobe.alta" /> <input name="/tmp/3M_jaune_inc-60_retro.alta" />
<output name="./results/3d/retro/3M_jaune_inc-60.mnt" /> <output name="./results/3d/retro/3M_jaune_inc-60.mnt" />
<!-- Define the data interpolant to use --> <!-- Define the data interpolant to use -->
<plugin type="data" name="data_interpolant" /> <plugin type="data" name="data_interpolant" />
<!-- Parameters --> <!-- Parameters -->
<parameter name="dim" value="[1, 2]" />
<parameter name="sampels" value="[1, 1000, 1000]" />
</action> </action>
...@@ -58,7 +103,7 @@ ...@@ -58,7 +103,7 @@
<action name="data2data"> <action name="data2data">
<!-- Input and output arguments of the action --> <!-- Input and output arguments of the action -->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR__clusterized_BRDF_retro_lobe.alta" /> <input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR__brdf_min_retro_lobe_dense.alta" />
<output name="/tmp/3M_jaune_inc-15.alta" /> <output name="/tmp/3M_jaune_inc-15.alta" />
<!-- Parameters --> <!-- Parameters -->
...@@ -79,6 +124,7 @@ ...@@ -79,6 +124,7 @@
<!-- Parameters --> <!-- Parameters -->
<parameter name="dim" value="[1, 2]" /> <parameter name="dim" value="[1, 2]" />
<parameter name="sampels" value="[1, 1000, 1000]" />
</action> </action>
...@@ -86,7 +132,7 @@ ...@@ -86,7 +132,7 @@
<action name="data2data"> <action name="data2data">
<!-- Input and output arguments of the action --> <!-- Input and output arguments of the action -->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR__clusterized_BRDF_retro_lobe.alta" /> <input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR__brdf_min_retro_lobe_dense.alta" />
<output name="/tmp/3M_jaune_inc-30.alta" /> <output name="/tmp/3M_jaune_inc-30.alta" />
<!-- Parameters --> <!-- Parameters -->
...@@ -107,6 +153,7 @@ ...@@ -107,6 +153,7 @@
<!-- Parameters --> <!-- Parameters -->
<parameter name="dim" value="[1, 2]" /> <parameter name="dim" value="[1, 2]" />
<parameter name="sampels" value="[1, 1000, 1000]" />
</action> </action>
...@@ -114,7 +161,7 @@ ...@@ -114,7 +161,7 @@
<action name="data2data"> <action name="data2data">
<!-- Input and output arguments of the action --> <!-- Input and output arguments of the action -->
<input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR__clusterized_BRDF_retro_lobe.alta" /> <input name="../papers/retro/mesures/original/3M_jaune/3d/633nm/Fichiers\ definitifs/densify_helmholtz/3M_jaune_3D+3DS+3DR__brdf_min_retro_lobe_dense.alta" />
<output name="/tmp/3M_jaune_inc-60.alta" /> <output name="/tmp/3M_jaune_inc-60.alta" />
<!-- Parameters --> <!-- Parameters -->
...@@ -135,5 +182,6 @@ ...@@ -135,5 +182,6 @@
<!-- Parameters --> <!-- Parameters -->
<parameter name="dim" value="[1, 2]" /> <parameter name="dim" value="[1, 2]" />
<parameter name="sampels" value="[1, 1000, 1000]" />
</action> </action>
</alta> </alta>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment