## teem-users

 [Teem-users] Sum of all values in a volume From: Chourasia, Amit - 2013-10-01 20:00:55 ```Hi, Is there a way to find the sum of all values in a volume? I thought this method may be there in unu 1op, but its not. Say I have a binary floating point 3D scalar data as "blob" . I could use project and sum along axes to get a 1d data, but is there a way to sum 1D data using teem. unu make -t float -s 64 64 64 -i blob | \ unu project -a 0 -m sum -i - | \ unu project -a 0 -m sum -i - ??? I would appreciate any pointers. Thanks -Amit PS: I am writing a very short documentation for quickly inspecting binary data using teem. ```
 Re: [Teem-users] Sum of all values in a volume From: Gordon L. Kindlmann - 2013-10-02 15:40:40 ```Hi Amit, As of some recent revision on the SVN trunk, you can unu project 1D arrays, and get out a singleton 1-element 1-D array. Also, you can use unu axmerge to lose the raster structure, so for your data, you could: unu make -h -t float -s 64 64 64 -i blob \ | unu axmerge -a 0 1 \ | unu project -a 0 -m sum \ | unu save -f text Note the -h on "unu make"; it delays the actual read of blob and saves you one piping of data. Probably a minor difference but might help with larger data. But if all you care about is the sum, and you're creating the nrrd as needed (with unu make), you could also just: unu make -h -t float -s 262144 -i blob | unu project -a 0 -m sum | unu save -f text I'm using "unu save -f text" here as a way of getting out a textual representation, but that's only a 32-bit float in ASCII; you could also save it (the 1-element 1-D array) to a .nrrd file to record the value exactly. Or you could pipe to "unu minmax" which does an exact ASCII representation of a 64-bit double (via printf with %.17g). Gordon On Oct 1, 2013, at 2:25 PM, Chourasia, Amit wrote: > Hi, > > Is there a way to find the sum of all values in a volume? > I thought this method may be there in unu 1op, but its not. > > Say I have a binary floating point 3D scalar data as "blob" . > I could use project and sum along axes to get a 1d data, but is there a way to sum 1D data using teem. > > unu make -t float -s 64 64 64 -i blob | \ > unu project -a 0 -m sum -i - | \ > unu project -a 0 -m sum -i - > ??? > > I would appreciate any pointers. > > Thanks > -Amit > > PS: I am writing a very short documentation for quickly inspecting binary data using teem. > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk > _______________________________________________ > teem-users mailing list > teem-users@... > https://lists.sourceforge.net/lists/listinfo/teem-users ```
 Re: [Teem-users] Sum of all values in a volume From: Chourasia, Amit - 2013-10-02 16:57:32 ```Gordon, I checked out revision 6124, via %svn co https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem I still get the error with unu project that it cannot sum 1-D array % unu make -t float -s 1000000 -i vol.bin \ | unu project -a 0 -m sum -i - (_nrrdFormatNRRD_read: reading raw data ... done) unu project: error projecting nrrd: [nrrd] nrrdProject: sorry, currently need at least 2-D array to project Could you tell me which version has this capability and how to fetch it? House keeping note: I get the following warning with SVN perhaps make this change on the webpage svn: Repository moved permanently to 'https://svn.code.sf.net/p/teem/code/teem/trunk';; please relocate I have the following work around, but a full unu solution like you mentioned will be perfect unu make -t float -s 10000 100 -i vol.bin \ | unu project -a 0 -m sum -i - \ | unu save -f text \ | paste -sd + - \ | bc BTW, thanks for reminding the -h option, one less pipe can save a lot of time for large data. Cheers --Amit On Oct 2, 2013, at 10:19 AM, Gordon L. Kindlmann wrote: > Hi Amit, > > As of some recent revision on the SVN trunk, you can unu project 1D arrays, and get out a singleton 1-element 1-D array. > > Also, you can use unu axmerge to lose the raster structure, so for your data, you could: > > unu make -h -t float -s 64 64 64 -i blob \ > | unu axmerge -a 0 1 \ > | unu project -a 0 -m sum \ > | unu save -f text > > Note the -h on "unu make"; it delays the actual read of blob and saves you one piping of data. Probably a minor difference but might help with larger data. > > But if all you care about is the sum, and you're creating the nrrd as needed (with unu make), you could also just: > > unu make -h -t float -s 262144 -i blob | unu project -a 0 -m sum | unu save -f text > > I'm using "unu save -f text" here as a way of getting out a textual representation, but that's only a 32-bit float in ASCII; you could also save it (the 1-element 1-D array) to a .nrrd file to record the value exactly. Or you could pipe to "unu minmax" which does an exact ASCII representation of a 64-bit double (via printf with %.17g). > > Gordon > > On Oct 1, 2013, at 2:25 PM, Chourasia, Amit wrote: > >> Hi, >> >> Is there a way to find the sum of all values in a volume? >> I thought this method may be there in unu 1op, but its not. >> >> Say I have a binary floating point 3D scalar data as "blob" . >> I could use project and sum along axes to get a 1d data, but is there a way to sum 1D data using teem. >> >> unu make -t float -s 64 64 64 -i blob | \ >> unu project -a 0 -m sum -i - | \ >> unu project -a 0 -m sum -i - >> ??? >> >> I would appreciate any pointers. >> >> Thanks >> -Amit >> >> PS: I am writing a very short documentation for quickly inspecting binary data using teem. >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >> _______________________________________________ >> teem-users mailing list >> teem-users@... >> https://lists.sourceforge.net/lists/listinfo/teem-users > ```
 Re: [Teem-users] Sum of all values in a volume From: David Weinstein - 2013-10-02 19:45:20 ```Hi Amit, Another solution, which will work with older version of Teems, is to insert a last stub axis before projecting: unu make -t float -s 1000000 -i vol.bin \ | unu axinsert -a 1 \ | unu project -a 0 -m sum \ | unu save -f text Cheers, Dave On Oct 2, 2013, at 10:56 AM, "Chourasia, Amit" wrote: > Gordon, > > I checked out revision 6124, via > %svn co https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem > > I still get the error with unu project that it cannot sum 1-D array > % unu make -t float -s 1000000 -i vol.bin \ > | unu project -a 0 -m sum -i - > (_nrrdFormatNRRD_read: reading raw data ... done) > unu project: error projecting nrrd: > [nrrd] nrrdProject: sorry, currently need at least 2-D array to project > > Could you tell me which version has this capability and how to fetch it? > > House keeping note: I get the following warning with SVN perhaps make this change on the webpage > svn: Repository moved permanently to 'https://svn.code.sf.net/p/teem/code/teem/trunk';; please relocate > > I have the following work around, but a full unu solution like you mentioned will be perfect > unu make -t float -s 10000 100 -i vol.bin \ > | unu project -a 0 -m sum -i - \ > | unu save -f text \ > | paste -sd + - \ > | bc > > BTW, thanks for reminding the -h option, one less pipe can save a lot of time for large data. > > Cheers > --Amit > > > > On Oct 2, 2013, at 10:19 AM, Gordon L. Kindlmann wrote: > >> Hi Amit, >> >> As of some recent revision on the SVN trunk, you can unu project 1D arrays, and get out a singleton 1-element 1-D array. >> >> Also, you can use unu axmerge to lose the raster structure, so for your data, you could: >> >> unu make -h -t float -s 64 64 64 -i blob \ >> | unu axmerge -a 0 1 \ >> | unu project -a 0 -m sum \ >> | unu save -f text >> >> Note the -h on "unu make"; it delays the actual read of blob and saves you one piping of data. Probably a minor difference but might help with larger data. >> >> But if all you care about is the sum, and you're creating the nrrd as needed (with unu make), you could also just: >> >> unu make -h -t float -s 262144 -i blob | unu project -a 0 -m sum | unu save -f text >> >> I'm using "unu save -f text" here as a way of getting out a textual representation, but that's only a 32-bit float in ASCII; you could also save it (the 1-element 1-D array) to a .nrrd file to record the value exactly. Or you could pipe to "unu minmax" which does an exact ASCII representation of a 64-bit double (via printf with %.17g). >> >> Gordon >> >> On Oct 1, 2013, at 2:25 PM, Chourasia, Amit wrote: >> >>> Hi, >>> >>> Is there a way to find the sum of all values in a volume? >>> I thought this method may be there in unu 1op, but its not. >>> >>> Say I have a binary floating point 3D scalar data as "blob" . >>> I could use project and sum along axes to get a 1d data, but is there a way to sum 1D data using teem. >>> >>> unu make -t float -s 64 64 64 -i blob | \ >>> unu project -a 0 -m sum -i - | \ >>> unu project -a 0 -m sum -i - >>> ??? >>> >>> I would appreciate any pointers. >>> >>> Thanks >>> -Amit >>> >>> PS: I am writing a very short documentation for quickly inspecting binary data using teem. >>> ------------------------------------------------------------------------------ >>> October Webinars: Code for Performance >>> Free Intel webinars can help you accelerate application performance. >>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>> the latest Intel processors and coprocessors. See abstracts and register > >>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> teem-users mailing list >>> teem-users@... >>> https://lists.sourceforge.net/lists/listinfo/teem-users >> > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk > _______________________________________________ > teem-users mailing list > teem-users@... > https://lists.sourceforge.net/lists/listinfo/teem-users ```
 Re: [Teem-users] Sum of all values in a volume From: Chourasia, Amit - 2013-10-02 21:07:43 ```David: Nice, that works. Gordon: unu minmax is not reporting correct result for a binary data with doubles Here is an example unu make -h -t double -s 393 892 23 -i dump.bin \ | unu minmax - min: 0 max: 0.000000 Whereas the correct result should be > Min = 0 > Max = 4.08852e-11 The data dump.bin is available here http://users.sdsc.edu/~amit/forums/dump.bin Could this be a bug or my teem compilation is borked (In cmake configuration I see that its linking to 64 bit libraries.) -A On Oct 2, 2013, at 1:45 PM, David Weinstein wrote: > Hi Amit, > > Another solution, which will work with older version of Teems, is to insert a last stub axis before projecting: > > unu make -t float -s 1000000 -i vol.bin \ > | unu axinsert -a 1 \ > | unu project -a 0 -m sum \ > | unu save -f text > > Cheers, > Dave > > > On Oct 2, 2013, at 10:56 AM, "Chourasia, Amit" wrote: > >> Gordon, >> >> I checked out revision 6124, via >> %svn co https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem >> >> I still get the error with unu project that it cannot sum 1-D array >> % unu make -t float -s 1000000 -i vol.bin \ >> | unu project -a 0 -m sum -i - >> (_nrrdFormatNRRD_read: reading raw data ... done) >> unu project: error projecting nrrd: >> [nrrd] nrrdProject: sorry, currently need at least 2-D array to project >> >> Could you tell me which version has this capability and how to fetch it? >> >> House keeping note: I get the following warning with SVN perhaps make this change on the webpage >> svn: Repository moved permanently to 'https://svn.code.sf.net/p/teem/code/teem/trunk';; please relocate >> >> I have the following work around, but a full unu solution like you mentioned will be perfect >> unu make -t float -s 10000 100 -i vol.bin \ >> | unu project -a 0 -m sum -i - \ >> | unu save -f text \ >> | paste -sd + - \ >> | bc >> >> BTW, thanks for reminding the -h option, one less pipe can save a lot of time for large data. >> >> Cheers >> --Amit >> >> >> >> On Oct 2, 2013, at 10:19 AM, Gordon L. Kindlmann wrote: >> >>> Hi Amit, >>> >>> As of some recent revision on the SVN trunk, you can unu project 1D arrays, and get out a singleton 1-element 1-D array. >>> >>> Also, you can use unu axmerge to lose the raster structure, so for your data, you could: >>> >>> unu make -h -t float -s 64 64 64 -i blob \ >>> | unu axmerge -a 0 1 \ >>> | unu project -a 0 -m sum \ >>> | unu save -f text >>> >>> Note the -h on "unu make"; it delays the actual read of blob and saves you one piping of data. Probably a minor difference but might help with larger data. >>> >>> But if all you care about is the sum, and you're creating the nrrd as needed (with unu make), you could also just: >>> >>> unu make -h -t float -s 262144 -i blob | unu project -a 0 -m sum | unu save -f text >>> >>> I'm using "unu save -f text" here as a way of getting out a textual representation, but that's only a 32-bit float in ASCII; you could also save it (the 1-element 1-D array) to a .nrrd file to record the value exactly. Or you could pipe to "unu minmax" which does an exact ASCII representation of a 64-bit double (via printf with %.17g). >>> >>> Gordon >>> >>> On Oct 1, 2013, at 2:25 PM, Chourasia, Amit wrote: >>> >>>> Hi, >>>> >>>> Is there a way to find the sum of all values in a volume? >>>> I thought this method may be there in unu 1op, but its not. >>>> >>>> Say I have a binary floating point 3D scalar data as "blob" . >>>> I could use project and sum along axes to get a 1d data, but is there a way to sum 1D data using teem. >>>> >>>> unu make -t float -s 64 64 64 -i blob | \ >>>> unu project -a 0 -m sum -i - | \ >>>> unu project -a 0 -m sum -i - >>>> ??? >>>> >>>> I would appreciate any pointers. >>>> >>>> Thanks >>>> -Amit >>>> >>>> PS: I am writing a very short documentation for quickly inspecting binary data using teem. >>>> ------------------------------------------------------------------------------ >>>> October Webinars: Code for Performance >>>> Free Intel webinars can help you accelerate application performance. >>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>>> the latest Intel processors and coprocessors. See abstracts and register > >>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> teem-users mailing list >>>> teem-users@... >>>> https://lists.sourceforge.net/lists/listinfo/teem-users >>> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >> _______________________________________________ >> teem-users mailing list >> teem-users@... >> https://lists.sourceforge.net/lists/listinfo/teem-users > ```
 Re: [Teem-users] Sum of all values in a volume From: Gordon L. Kindlmann - 2013-10-03 07:26:18 ```Hi Amit, You've run into the problem that sourceforge continues to serve some version, an old and un-update-able version, from https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem but you really should only be using, as SF said, https://svn.code.sf.net/p/teem/code/teem/trunk Try checking that code out and building it. With that, when I do your command, I get: min: 0 max: 4.0885190722395799e-11 Or with this: unu make -h -t double -s 393 892 23 -i dump.bin \ | unu axmerge -a 0 1 \ | unu project -a 0 -m sum \ | unu save -f text 6.1351656e-08 Let me know if you get something different. Gordon On Oct 2, 2013, at 4:07 PM, Chourasia, Amit wrote: > David: Nice, that works. > > Gordon: unu minmax is not reporting correct result for a binary data with doubles > Here is an example > > unu make -h -t double -s 393 892 23 -i dump.bin \ > | unu minmax - > min: 0 > max: 0.000000 > > Whereas the correct result should be >> Min = 0 >> Max = 4.08852e-11 > > > The data dump.bin is available here > http://users.sdsc.edu/~amit/forums/dump.bin > > Could this be a bug or my teem compilation is borked (In cmake configuration I see that its linking to 64 bit libraries.) > > -A > > > > > > On Oct 2, 2013, at 1:45 PM, David Weinstein wrote: > >> Hi Amit, >> >> Another solution, which will work with older version of Teems, is to insert a last stub axis before projecting: >> >> unu make -t float -s 1000000 -i vol.bin \ >> | unu axinsert -a 1 \ >> | unu project -a 0 -m sum \ >> | unu save -f text >> >> Cheers, >> Dave >> >> >> On Oct 2, 2013, at 10:56 AM, "Chourasia, Amit" wrote: >> >>> Gordon, >>> >>> I checked out revision 6124, via >>> %svn co https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem >>> >>> I still get the error with unu project that it cannot sum 1-D array >>> % unu make -t float -s 1000000 -i vol.bin \ >>> | unu project -a 0 -m sum -i - >>> (_nrrdFormatNRRD_read: reading raw data ... done) >>> unu project: error projecting nrrd: >>> [nrrd] nrrdProject: sorry, currently need at least 2-D array to project >>> >>> Could you tell me which version has this capability and how to fetch it? >>> >>> House keeping note: I get the following warning with SVN perhaps make this change on the webpage >>> svn: Repository moved permanently to 'https://svn.code.sf.net/p/teem/code/teem/trunk';; please relocate >>> >>> I have the following work around, but a full unu solution like you mentioned will be perfect >>> unu make -t float -s 10000 100 -i vol.bin \ >>> | unu project -a 0 -m sum -i - \ >>> | unu save -f text \ >>> | paste -sd + - \ >>> | bc >>> >>> BTW, thanks for reminding the -h option, one less pipe can save a lot of time for large data. >>> >>> Cheers >>> --Amit >>> >>> >>> >>> On Oct 2, 2013, at 10:19 AM, Gordon L. Kindlmann wrote: >>> >>>> Hi Amit, >>>> >>>> As of some recent revision on the SVN trunk, you can unu project 1D arrays, and get out a singleton 1-element 1-D array. >>>> >>>> Also, you can use unu axmerge to lose the raster structure, so for your data, you could: >>>> >>>> unu make -h -t float -s 64 64 64 -i blob \ >>>> | unu axmerge -a 0 1 \ >>>> | unu project -a 0 -m sum \ >>>> | unu save -f text >>>> >>>> Note the -h on "unu make"; it delays the actual read of blob and saves you one piping of data. Probably a minor difference but might help with larger data. >>>> >>>> But if all you care about is the sum, and you're creating the nrrd as needed (with unu make), you could also just: >>>> >>>> unu make -h -t float -s 262144 -i blob | unu project -a 0 -m sum | unu save -f text >>>> >>>> I'm using "unu save -f text" here as a way of getting out a textual representation, but that's only a 32-bit float in ASCII; you could also save it (the 1-element 1-D array) to a .nrrd file to record the value exactly. Or you could pipe to "unu minmax" which does an exact ASCII representation of a 64-bit double (via printf with %.17g). >>>> >>>> Gordon >>>> >>>> On Oct 1, 2013, at 2:25 PM, Chourasia, Amit wrote: >>>> >>>>> Hi, >>>>> >>>>> Is there a way to find the sum of all values in a volume? >>>>> I thought this method may be there in unu 1op, but its not. >>>>> >>>>> Say I have a binary floating point 3D scalar data as "blob" . >>>>> I could use project and sum along axes to get a 1d data, but is there a way to sum 1D data using teem. >>>>> >>>>> unu make -t float -s 64 64 64 -i blob | \ >>>>> unu project -a 0 -m sum -i - | \ >>>>> unu project -a 0 -m sum -i - >>>>> ??? >>>>> >>>>> I would appreciate any pointers. >>>>> >>>>> Thanks >>>>> -Amit >>>>> >>>>> PS: I am writing a very short documentation for quickly inspecting binary data using teem. >>>>> ------------------------------------------------------------------------------ >>>>> October Webinars: Code for Performance >>>>> Free Intel webinars can help you accelerate application performance. >>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>>>> the latest Intel processors and coprocessors. See abstracts and register > >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>>> _______________________________________________ >>>>> teem-users mailing list >>>>> teem-users@... >>>>> https://lists.sourceforge.net/lists/listinfo/teem-users >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> October Webinars: Code for Performance >>> Free Intel webinars can help you accelerate application performance. >>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>> the latest Intel processors and coprocessors. See abstracts and register > >>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> teem-users mailing list >>> teem-users@... >>> https://lists.sourceforge.net/lists/listinfo/teem-users >> > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk > _______________________________________________ > teem-users mailing list > teem-users@... > https://lists.sourceforge.net/lists/listinfo/teem-users ```
 Re: [Teem-users] Sum of all values in a volume From: Chourasia, Amit - 2013-10-03 15:51:51 ```Hi Gordon, A fresh checkout from new repo address worked https://svn.code.sf.net/p/teem/code/teem/trunk While I was updating my earlier checkout version with older address, some stuff may not be updating, hence the issue. None the less thanks for helping out. Cheers -A On Oct 3, 2013, at 2:26 AM, Gordon L. Kindlmann wrote: > Hi Amit, > > You've run into the problem that sourceforge continues to serve some version, an old and un-update-able version, from https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem > but you really should only be using, as SF said, > https://svn.code.sf.net/p/teem/code/teem/trunk > > Try checking that code out and building it. With that, when I do your command, I get: > > min: 0 > max: 4.0885190722395799e-11 > > Or with this: > unu make -h -t double -s 393 892 23 -i dump.bin \ > | unu axmerge -a 0 1 \ > | unu project -a 0 -m sum \ > | unu save -f text > > 6.1351656e-08 > > Let me know if you get something different. > > Gordon > > On Oct 2, 2013, at 4:07 PM, Chourasia, Amit wrote: > >> David: Nice, that works. >> >> Gordon: unu minmax is not reporting correct result for a binary data with doubles >> Here is an example >> >> unu make -h -t double -s 393 892 23 -i dump.bin \ >> | unu minmax - >> min: 0 >> max: 0.000000 >> >> Whereas the correct result should be >>> Min = 0 >>> Max = 4.08852e-11 >> >> >> The data dump.bin is available here >> http://users.sdsc.edu/~amit/forums/dump.bin >> >> Could this be a bug or my teem compilation is borked (In cmake configuration I see that its linking to 64 bit libraries.) >> >> -A >> >> >> >> >> >> On Oct 2, 2013, at 1:45 PM, David Weinstein wrote: >> >>> Hi Amit, >>> >>> Another solution, which will work with older version of Teems, is to insert a last stub axis before projecting: >>> >>> unu make -t float -s 1000000 -i vol.bin \ >>> | unu axinsert -a 1 \ >>> | unu project -a 0 -m sum \ >>> | unu save -f text >>> >>> Cheers, >>> Dave >>> >>> >>> On Oct 2, 2013, at 10:56 AM, "Chourasia, Amit" wrote: >>> >>>> Gordon, >>>> >>>> I checked out revision 6124, via >>>> %svn co https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem >>>> >>>> I still get the error with unu project that it cannot sum 1-D array >>>> % unu make -t float -s 1000000 -i vol.bin \ >>>> | unu project -a 0 -m sum -i - >>>> (_nrrdFormatNRRD_read: reading raw data ... done) >>>> unu project: error projecting nrrd: >>>> [nrrd] nrrdProject: sorry, currently need at least 2-D array to project >>>> >>>> Could you tell me which version has this capability and how to fetch it? >>>> >>>> House keeping note: I get the following warning with SVN perhaps make this change on the webpage >>>> svn: Repository moved permanently to 'https://svn.code.sf.net/p/teem/code/teem/trunk';; please relocate >>>> >>>> I have the following work around, but a full unu solution like you mentioned will be perfect >>>> unu make -t float -s 10000 100 -i vol.bin \ >>>> | unu project -a 0 -m sum -i - \ >>>> | unu save -f text \ >>>> | paste -sd + - \ >>>> | bc >>>> >>>> BTW, thanks for reminding the -h option, one less pipe can save a lot of time for large data. >>>> >>>> Cheers >>>> --Amit >>>> >>>> >>>> >>>> On Oct 2, 2013, at 10:19 AM, Gordon L. Kindlmann wrote: >>>> >>>>> Hi Amit, >>>>> >>>>> As of some recent revision on the SVN trunk, you can unu project 1D arrays, and get out a singleton 1-element 1-D array. >>>>> >>>>> Also, you can use unu axmerge to lose the raster structure, so for your data, you could: >>>>> >>>>> unu make -h -t float -s 64 64 64 -i blob \ >>>>> | unu axmerge -a 0 1 \ >>>>> | unu project -a 0 -m sum \ >>>>> | unu save -f text >>>>> >>>>> Note the -h on "unu make"; it delays the actual read of blob and saves you one piping of data. Probably a minor difference but might help with larger data. >>>>> >>>>> But if all you care about is the sum, and you're creating the nrrd as needed (with unu make), you could also just: >>>>> >>>>> unu make -h -t float -s 262144 -i blob | unu project -a 0 -m sum | unu save -f text >>>>> >>>>> I'm using "unu save -f text" here as a way of getting out a textual representation, but that's only a 32-bit float in ASCII; you could also save it (the 1-element 1-D array) to a .nrrd file to record the value exactly. Or you could pipe to "unu minmax" which does an exact ASCII representation of a 64-bit double (via printf with %.17g). >>>>> >>>>> Gordon >>>>> >>>>> On Oct 1, 2013, at 2:25 PM, Chourasia, Amit wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Is there a way to find the sum of all values in a volume? >>>>>> I thought this method may be there in unu 1op, but its not. >>>>>> >>>>>> Say I have a binary floating point 3D scalar data as "blob" . >>>>>> I could use project and sum along axes to get a 1d data, but is there a way to sum 1D data using teem. >>>>>> >>>>>> unu make -t float -s 64 64 64 -i blob | \ >>>>>> unu project -a 0 -m sum -i - | \ >>>>>> unu project -a 0 -m sum -i - >>>>>> ??? >>>>>> >>>>>> I would appreciate any pointers. >>>>>> >>>>>> Thanks >>>>>> -Amit >>>>>> >>>>>> PS: I am writing a very short documentation for quickly inspecting binary data using teem. >>>>>> ------------------------------------------------------------------------------ >>>>>> October Webinars: Code for Performance >>>>>> Free Intel webinars can help you accelerate application performance. >>>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>>>>> the latest Intel processors and coprocessors. See abstracts and register > >>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>>>> _______________________________________________ >>>>>> teem-users mailing list >>>>>> teem-users@... >>>>>> https://lists.sourceforge.net/lists/listinfo/teem-users >>>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> October Webinars: Code for Performance >>>> Free Intel webinars can help you accelerate application performance. >>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>>> the latest Intel processors and coprocessors. See abstracts and register > >>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> teem-users mailing list >>>> teem-users@... >>>> https://lists.sourceforge.net/lists/listinfo/teem-users >>> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >> _______________________________________________ >> teem-users mailing list >> teem-users@... >> https://lists.sourceforge.net/lists/listinfo/teem-users > ```
 Re: [Teem-users] Sum of all values in a volume From: Gordon L. Kindlmann - 2013-10-03 18:26:19 ```On Oct 3, 2013, at 10:51 AM, Chourasia, Amit wrote: > Hi Gordon, > > A fresh checkout from new repo address worked https://svn.code.sf.net/p/teem/code/teem/trunk Great. There has been a lot of work recently. > While I was updating my earlier checkout version with older address, some stuff may not be updating, hence the issue. Exactly - you can do all the svn updates you want, but it still serves the same old stuff, i.e. no updates. I have no control over what gets served at the old URL. I do have control over what URL is on this page http://teem.sourceforge.net/build.html but the number of steps involved in updating that is just high enough that I can't seem to finish it without getting pulled away by something else. Any suggestions for a super-lo-overhead way of putting Teem docs on the web? Gordon > None the less thanks for helping out. > > Cheers > -A > > > > On Oct 3, 2013, at 2:26 AM, Gordon L. Kindlmann wrote: > >> Hi Amit, >> >> You've run into the problem that sourceforge continues to serve some version, an old and un-update-able version, from https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem >> but you really should only be using, as SF said, >> https://svn.code.sf.net/p/teem/code/teem/trunk >> >> Try checking that code out and building it. With that, when I do your command, I get: >> >> min: 0 >> max: 4.0885190722395799e-11 >> >> Or with this: >> unu make -h -t double -s 393 892 23 -i dump.bin \ >> | unu axmerge -a 0 1 \ >> | unu project -a 0 -m sum \ >> | unu save -f text >> >> 6.1351656e-08 >> >> Let me know if you get something different. >> >> Gordon >> >> On Oct 2, 2013, at 4:07 PM, Chourasia, Amit wrote: >> >>> David: Nice, that works. >>> >>> Gordon: unu minmax is not reporting correct result for a binary data with doubles >>> Here is an example >>> >>> unu make -h -t double -s 393 892 23 -i dump.bin \ >>> | unu minmax - >>> min: 0 >>> max: 0.000000 >>> >>> Whereas the correct result should be >>>> Min = 0 >>>> Max = 4.08852e-11 >>> >>> >>> The data dump.bin is available here >>> http://users.sdsc.edu/~amit/forums/dump.bin >>> >>> Could this be a bug or my teem compilation is borked (In cmake configuration I see that its linking to 64 bit libraries.) >>> >>> -A >>> >>> >>> >>> >>> >>> On Oct 2, 2013, at 1:45 PM, David Weinstein wrote: >>> >>>> Hi Amit, >>>> >>>> Another solution, which will work with older version of Teems, is to insert a last stub axis before projecting: >>>> >>>> unu make -t float -s 1000000 -i vol.bin \ >>>> | unu axinsert -a 1 \ >>>> | unu project -a 0 -m sum \ >>>> | unu save -f text >>>> >>>> Cheers, >>>> Dave >>>> >>>> >>>> On Oct 2, 2013, at 10:56 AM, "Chourasia, Amit" wrote: >>>> >>>>> Gordon, >>>>> >>>>> I checked out revision 6124, via >>>>> %svn co https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem >>>>> >>>>> I still get the error with unu project that it cannot sum 1-D array >>>>> % unu make -t float -s 1000000 -i vol.bin \ >>>>> | unu project -a 0 -m sum -i - >>>>> (_nrrdFormatNRRD_read: reading raw data ... done) >>>>> unu project: error projecting nrrd: >>>>> [nrrd] nrrdProject: sorry, currently need at least 2-D array to project >>>>> >>>>> Could you tell me which version has this capability and how to fetch it? >>>>> >>>>> House keeping note: I get the following warning with SVN perhaps make this change on the webpage >>>>> svn: Repository moved permanently to 'https://svn.code.sf.net/p/teem/code/teem/trunk';; please relocate >>>>> >>>>> I have the following work around, but a full unu solution like you mentioned will be perfect >>>>> unu make -t float -s 10000 100 -i vol.bin \ >>>>> | unu project -a 0 -m sum -i - \ >>>>> | unu save -f text \ >>>>> | paste -sd + - \ >>>>> | bc >>>>> >>>>> BTW, thanks for reminding the -h option, one less pipe can save a lot of time for large data. >>>>> >>>>> Cheers >>>>> --Amit >>>>> >>>>> >>>>> >>>>> On Oct 2, 2013, at 10:19 AM, Gordon L. Kindlmann wrote: >>>>> >>>>>> Hi Amit, >>>>>> >>>>>> As of some recent revision on the SVN trunk, you can unu project 1D arrays, and get out a singleton 1-element 1-D array. >>>>>> >>>>>> Also, you can use unu axmerge to lose the raster structure, so for your data, you could: >>>>>> >>>>>> unu make -h -t float -s 64 64 64 -i blob \ >>>>>> | unu axmerge -a 0 1 \ >>>>>> | unu project -a 0 -m sum \ >>>>>> | unu save -f text >>>>>> >>>>>> Note the -h on "unu make"; it delays the actual read of blob and saves you one piping of data. Probably a minor difference but might help with larger data. >>>>>> >>>>>> But if all you care about is the sum, and you're creating the nrrd as needed (with unu make), you could also just: >>>>>> >>>>>> unu make -h -t float -s 262144 -i blob | unu project -a 0 -m sum | unu save -f text >>>>>> >>>>>> I'm using "unu save -f text" here as a way of getting out a textual representation, but that's only a 32-bit float in ASCII; you could also save it (the 1-element 1-D array) to a .nrrd file to record the value exactly. Or you could pipe to "unu minmax" which does an exact ASCII representation of a 64-bit double (via printf with %.17g). >>>>>> >>>>>> Gordon >>>>>> >>>>>> On Oct 1, 2013, at 2:25 PM, Chourasia, Amit wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> Is there a way to find the sum of all values in a volume? >>>>>>> I thought this method may be there in unu 1op, but its not. >>>>>>> >>>>>>> Say I have a binary floating point 3D scalar data as "blob" . >>>>>>> I could use project and sum along axes to get a 1d data, but is there a way to sum 1D data using teem. >>>>>>> >>>>>>> unu make -t float -s 64 64 64 -i blob | \ >>>>>>> unu project -a 0 -m sum -i - | \ >>>>>>> unu project -a 0 -m sum -i - >>>>>>> ??? >>>>>>> >>>>>>> I would appreciate any pointers. >>>>>>> >>>>>>> Thanks >>>>>>> -Amit >>>>>>> >>>>>>> PS: I am writing a very short documentation for quickly inspecting binary data using teem. >>>>>>> ------------------------------------------------------------------------------ >>>>>>> October Webinars: Code for Performance >>>>>>> Free Intel webinars can help you accelerate application performance. >>>>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>>>>>> the latest Intel processors and coprocessors. See abstracts and register > >>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>>>>> _______________________________________________ >>>>>>> teem-users mailing list >>>>>>> teem-users@... >>>>>>> https://lists.sourceforge.net/lists/listinfo/teem-users >>>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> October Webinars: Code for Performance >>>>> Free Intel webinars can help you accelerate application performance. >>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>>>> the latest Intel processors and coprocessors. See abstracts and register > >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>>> _______________________________________________ >>>>> teem-users mailing list >>>>> teem-users@... >>>>> https://lists.sourceforge.net/lists/listinfo/teem-users >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> October Webinars: Code for Performance >>> Free Intel webinars can help you accelerate application performance. >>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>> the latest Intel processors and coprocessors. See abstracts and register > >>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> teem-users mailing list >>> teem-users@... >>> https://lists.sourceforge.net/lists/listinfo/teem-users >> > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk > _______________________________________________ > teem-users mailing list > teem-users@... > https://lists.sourceforge.net/lists/listinfo/teem-users ```
 Re: [Teem-users] Sum of all values in a volume From: Chourasia, Amit - 2013-10-03 18:48:09 ```> Any suggestions for a super-lo-overhead way of putting Teem docs on the web? I can't think of anything that is minimal labor, but a motivated undergraduate student could be handy here. One way may be to too keep just the source on sourceforge and all other documents go on your own server ( Wordpress, Tumblr ??). I realize none of this is as simple as it sounds. -A On Oct 3, 2013, at 1:25 PM, Gordon L. Kindlmann wrote: > On Oct 3, 2013, at 10:51 AM, Chourasia, Amit wrote: > >> Hi Gordon, >> >> A fresh checkout from new repo address worked https://svn.code.sf.net/p/teem/code/teem/trunk > > Great. There has been a lot of work recently. > >> While I was updating my earlier checkout version with older address, some stuff may not be updating, hence the issue. > > Exactly - you can do all the svn updates you want, but it still serves the same old stuff, i.e. no updates. I have no control over what gets served at the old URL. > > I do have control over what URL is on this page http://teem.sourceforge.net/build.html but the number of steps involved in updating that is just high enough that I can't seem to finish it without getting pulled away by something else. > > Any suggestions for a super-lo-overhead way of putting Teem docs on the web? > > Gordon > > >> None the less thanks for helping out. >> >> Cheers >> -A >> >> >> >> On Oct 3, 2013, at 2:26 AM, Gordon L. Kindlmann wrote: >> >>> Hi Amit, >>> >>> You've run into the problem that sourceforge continues to serve some version, an old and un-update-able version, from https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem >>> but you really should only be using, as SF said, >>> https://svn.code.sf.net/p/teem/code/teem/trunk >>> >>> Try checking that code out and building it. With that, when I do your command, I get: >>> >>> min: 0 >>> max: 4.0885190722395799e-11 >>> >>> Or with this: >>> unu make -h -t double -s 393 892 23 -i dump.bin \ >>> | unu axmerge -a 0 1 \ >>> | unu project -a 0 -m sum \ >>> | unu save -f text >>> >>> 6.1351656e-08 >>> >>> Let me know if you get something different. >>> >>> Gordon >>> >>> On Oct 2, 2013, at 4:07 PM, Chourasia, Amit wrote: >>> >>>> David: Nice, that works. >>>> >>>> Gordon: unu minmax is not reporting correct result for a binary data with doubles >>>> Here is an example >>>> >>>> unu make -h -t double -s 393 892 23 -i dump.bin \ >>>> | unu minmax - >>>> min: 0 >>>> max: 0.000000 >>>> >>>> Whereas the correct result should be >>>>> Min = 0 >>>>> Max = 4.08852e-11 >>>> >>>> >>>> The data dump.bin is available here >>>> http://users.sdsc.edu/~amit/forums/dump.bin >>>> >>>> Could this be a bug or my teem compilation is borked (In cmake configuration I see that its linking to 64 bit libraries.) >>>> >>>> -A >>>> >>>> >>>> >>>> >>>> >>>> On Oct 2, 2013, at 1:45 PM, David Weinstein wrote: >>>> >>>>> Hi Amit, >>>>> >>>>> Another solution, which will work with older version of Teems, is to insert a last stub axis before projecting: >>>>> >>>>> unu make -t float -s 1000000 -i vol.bin \ >>>>> | unu axinsert -a 1 \ >>>>> | unu project -a 0 -m sum \ >>>>> | unu save -f text >>>>> >>>>> Cheers, >>>>> Dave >>>>> >>>>> >>>>> On Oct 2, 2013, at 10:56 AM, "Chourasia, Amit" wrote: >>>>> >>>>>> Gordon, >>>>>> >>>>>> I checked out revision 6124, via >>>>>> %svn co https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem >>>>>> >>>>>> I still get the error with unu project that it cannot sum 1-D array >>>>>> % unu make -t float -s 1000000 -i vol.bin \ >>>>>> | unu project -a 0 -m sum -i - >>>>>> (_nrrdFormatNRRD_read: reading raw data ... done) >>>>>> unu project: error projecting nrrd: >>>>>> [nrrd] nrrdProject: sorry, currently need at least 2-D array to project >>>>>> >>>>>> Could you tell me which version has this capability and how to fetch it? >>>>>> >>>>>> House keeping note: I get the following warning with SVN perhaps make this change on the webpage >>>>>> svn: Repository moved permanently to 'https://svn.code.sf.net/p/teem/code/teem/trunk';; please relocate >>>>>> >>>>>> I have the following work around, but a full unu solution like you mentioned will be perfect >>>>>> unu make -t float -s 10000 100 -i vol.bin \ >>>>>> | unu project -a 0 -m sum -i - \ >>>>>> | unu save -f text \ >>>>>> | paste -sd + - \ >>>>>> | bc >>>>>> >>>>>> BTW, thanks for reminding the -h option, one less pipe can save a lot of time for large data. >>>>>> >>>>>> Cheers >>>>>> --Amit >>>>>> >>>>>> >>>>>> >>>>>> On Oct 2, 2013, at 10:19 AM, Gordon L. Kindlmann wrote: >>>>>> >>>>>>> Hi Amit, >>>>>>> >>>>>>> As of some recent revision on the SVN trunk, you can unu project 1D arrays, and get out a singleton 1-element 1-D array. >>>>>>> >>>>>>> Also, you can use unu axmerge to lose the raster structure, so for your data, you could: >>>>>>> >>>>>>> unu make -h -t float -s 64 64 64 -i blob \ >>>>>>> | unu axmerge -a 0 1 \ >>>>>>> | unu project -a 0 -m sum \ >>>>>>> | unu save -f text >>>>>>> >>>>>>> Note the -h on "unu make"; it delays the actual read of blob and saves you one piping of data. Probably a minor difference but might help with larger data. >>>>>>> >>>>>>> But if all you care about is the sum, and you're creating the nrrd as needed (with unu make), you could also just: >>>>>>> >>>>>>> unu make -h -t float -s 262144 -i blob | unu project -a 0 -m sum | unu save -f text >>>>>>> >>>>>>> I'm using "unu save -f text" here as a way of getting out a textual representation, but that's only a 32-bit float in ASCII; you could also save it (the 1-element 1-D array) to a .nrrd file to record the value exactly. Or you could pipe to "unu minmax" which does an exact ASCII representation of a 64-bit double (via printf with %.17g). >>>>>>> >>>>>>> Gordon >>>>>>> >>>>>>> On Oct 1, 2013, at 2:25 PM, Chourasia, Amit wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> Is there a way to find the sum of all values in a volume? >>>>>>>> I thought this method may be there in unu 1op, but its not. >>>>>>>> >>>>>>>> Say I have a binary floating point 3D scalar data as "blob" . >>>>>>>> I could use project and sum along axes to get a 1d data, but is there a way to sum 1D data using teem. >>>>>>>> >>>>>>>> unu make -t float -s 64 64 64 -i blob | \ >>>>>>>> unu project -a 0 -m sum -i - | \ >>>>>>>> unu project -a 0 -m sum -i - >>>>>>>> ??? >>>>>>>> >>>>>>>> I would appreciate any pointers. >>>>>>>> >>>>>>>> Thanks >>>>>>>> -Amit >>>>>>>> >>>>>>>> PS: I am writing a very short documentation for quickly inspecting binary data using teem. >>>>>>>> ------------------------------------------------------------------------------ >>>>>>>> October Webinars: Code for Performance >>>>>>>> Free Intel webinars can help you accelerate application performance. >>>>>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>>>>>>> the latest Intel processors and coprocessors. See abstracts and register > >>>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>>>>>> _______________________________________________ >>>>>>>> teem-users mailing list >>>>>>>> teem-users@... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/teem-users >>>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> October Webinars: Code for Performance >>>>>> Free Intel webinars can help you accelerate application performance. >>>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>>>>> the latest Intel processors and coprocessors. See abstracts and register > >>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>>>> _______________________________________________ >>>>>> teem-users mailing list >>>>>> teem-users@... >>>>>> https://lists.sourceforge.net/lists/listinfo/teem-users >>>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> October Webinars: Code for Performance >>>> Free Intel webinars can help you accelerate application performance. >>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >>>> the latest Intel processors and coprocessors. See abstracts and register > >>>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> teem-users mailing list >>>> teem-users@... >>>> https://lists.sourceforge.net/lists/listinfo/teem-users >>> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >> _______________________________________________ >> teem-users mailing list >> teem-users@... >> https://lists.sourceforge.net/lists/listinfo/teem-users > ```