Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis12/bugs/open/bug038.diderot
ViewVC logotype

View of /branches/vis12/bugs/open/bug038.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3337 - (download) (annotate)
Wed Oct 21 16:36:10 2015 UTC (4 years, 8 months ago) by glk
File size: 1258 byte(s)
should check on nrrd orientation meta data before use at run-time
/*

The problem here is that the nrrd normalization performed by "unu
dnorm" is not enforced: the fields that the run-time assumes are used
(or try to be used) before checking if they've been set.  This creates
a confusing error message at run-time when loading
"../data/synthetic.nrrd":

running: diderotc --exec bug038.diderot && ./bug038
produces:
Error in global initialization:
[DIDEROT] nrrd has unexpected dimension 0, expected 2

This is not actually true; it is certainly a 2-D nrrd;
"unu head ../data/synthetic.nrrd" reports:

    NRRD0003
    # Complete NRRD file format specification at:
    # http://teem.sourceforge.net/nrrd/format.html
    type: float
    dimension: 2
    sizes: 30 30
    kinds: space space
    endian: little
    encoding: raw

What is missing is the  meta-data generated by unu dnorm,
(which is present in ../data/synthetic-ornt.nrrd).
*/

field#0(2)[] V = tent ⊛ image("../data/synthetic.nrrd");

/*
** but this dataset works ok since it has the needed meta-data
*/
//field#0(2)[] V = tent ⊛ image("../data/synthetic-ornt.nrrd");
int  grid=30;

strand RootFind(real xi,real yi) {

    output real m=V([xi,yi]);

   update {
    stabilize;
   }
}

initially [ RootFind(ui, vi) | vi in 2..(grid-3), ui in 2..(grid-3) ];

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0