 Timestamp:
 06/28/10 12:20:26 (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/components/lociplugins/test/loci/plugins/in/ImporterTest.java
r6572 r6574 794 794 private void imagesInZctOrderTest(ImagePlus[] imps, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT) 795 795 { 796 // unwind ZCT loop : Z pulled outside, CT in order796 // unwind CZT loop : Z pulled outside, CT in order 797 797 for (int z = 0; z < sizeZ; z++) { 798 798 ImagePlus imp = imps[z]; … … 802 802 int slice = 0; 803 803 for (int t = 0; t < sizeT; t++) { 804 for (int c = 0; c < sizeC; c++) { // CT (Z)  CZT805 ImageProcessor proc = st.getProcessor(++slice);806 // test the values807 assertEquals(z,zIndex(proc));808 assertEquals(c,cIndex(proc));809 assertEquals(t,tIndex(proc));810 }811 }812 }813 }814 815 /** tests if images split on C are ordered correctly */816 private void imagesInCztOrderTest(ImagePlus[] imps, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT)817 {818 // unwind ZCT loop : C pulled outside, ZT in order819 for (int c = 0; c < sizeC; c++) {820 ImagePlus imp = imps[c];821 xyzctTest(imp,sizeX,sizeY,sizeZ,1,sizeT);822 stackTest(imp,sizeZ * sizeT);823 ImageStack st = imp.getStack();824 int slice = 0;825 for (int t = 0; t < sizeT; t++) {826 for (int z = 0; z < sizeZ; z++) { //ZT (C)  CZT827 ImageProcessor proc = st.getProcessor(++slice);828 // test the values829 assertEquals(z,zIndex(proc));830 assertEquals(c,cIndex(proc));831 assertEquals(t,tIndex(proc));832 }833 }834 }835 }836 837 /** tests if images split on T are ordered correctly */838 private void imagesInTczOrderTest(ImagePlus[] imps, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT)839 {840 // unwind ZTC loop : T pulled outside, ZC in order841 for (int t = 0; t < sizeT; t++) {842 ImagePlus imp = imps[t];843 xyzctTest(imp,sizeX,sizeY,sizeZ,sizeC,1);844 stackTest(imp,sizeZ * sizeC);845 ImageStack st = imp.getStack();846 int slice = 0;847 for (int z = 0; z < sizeZ; z++) { // ZC (T)  CZT848 804 for (int c = 0; c < sizeC; c++) { 849 805 ImageProcessor proc = st.getProcessor(++slice); … … 857 813 } 858 814 815 /** tests if images split on C are ordered correctly */ 816 private void imagesInCztOrderTest(ImagePlus[] imps, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT) 817 { 818 // unwind CZT loop : C pulled outside, ZT in order 819 for (int c = 0; c < sizeC; c++) { 820 ImagePlus imp = imps[c]; 821 xyzctTest(imp,sizeX,sizeY,sizeZ,1,sizeT); 822 stackTest(imp,sizeZ * sizeT); 823 ImageStack st = imp.getStack(); 824 int slice = 0; 825 for (int t = 0; t < sizeT; t++) { 826 for (int z = 0; z < sizeZ; z++) { 827 ImageProcessor proc = st.getProcessor(++slice); 828 // test the values 829 assertEquals(z,zIndex(proc)); 830 assertEquals(c,cIndex(proc)); 831 assertEquals(t,tIndex(proc)); 832 } 833 } 834 } 835 } 836 837 /** tests if images split on T are ordered correctly */ 838 private void imagesInTczOrderTest(ImagePlus[] imps, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT) 839 { 840 // unwind CZT loop : T pulled outside, CZ in order 841 for (int t = 0; t < sizeT; t++) { 842 ImagePlus imp = imps[t]; 843 xyzctTest(imp,sizeX,sizeY,sizeZ,sizeC,1); 844 stackTest(imp,sizeZ * sizeC); 845 ImageStack st = imp.getStack(); 846 int slice = 0; 847 for (int z = 0; z < sizeZ; z++) { 848 for (int c = 0; c < sizeC; c++) { 849 ImageProcessor proc = st.getProcessor(++slice); 850 // test the values 851 assertEquals(z,zIndex(proc)); 852 assertEquals(c,cIndex(proc)); 853 assertEquals(t,tIndex(proc)); 854 } 855 } 856 } 857 } 858 859 859 /** tests that a set of images is ordered via Z first  used by concatSplit tests */ 860 860 private void imageSeriesInZctOrderTest(ImagePlus[] imps, int numSeries, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT) 861 861 { 862 // from ZCT order: Z pulled out, CT in order862 // from CZT order: Z pulled out, CT in order 863 863 for (int z = 0; z < sizeZ; z++) 864 864 { … … 890 890 private void imageSeriesInCztOrderTest(ImagePlus[] imps, int numSeries, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT) 891 891 { 892 // from ZCT order: C pulled out, ZT in order892 // from CZT order: C pulled out, ZT in order 893 893 for (int c = 0; c < sizeC; c++) 894 894 { … … 919 919 private void imageSeriesInTczOrderTest(ImagePlus[] imps, int numSeries, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT) 920 920 { 921 // from ZCT order: T pulled out, ZCin order921 // from CZT order: T pulled out, CZ in order 922 922 for (int t = 0; t < sizeT; t++) 923 923 { … … 1658 1658 try { 1659 1659 ImporterOptions options = new ImporterOptions(); 1660 //options.setOpenAllSeries(true); // TODO  added to see if needed for passing1660 options.setOpenAllSeries(true); // TODO  added to see if needed for passing 1661 1661 options.setConcatenate(true); 1662 1662 options.setSplitFocalPlanes(true); … … 1693 1693 try { 1694 1694 ImporterOptions options = new ImporterOptions(); 1695 //options.setOpenAllSeries(true); // TODO  added to see if needed for passing1695 options.setOpenAllSeries(true); // TODO  added to see if needed for passing 1696 1696 options.setConcatenate(true); 1697 1697 options.setSplitChannels(true); … … 1728 1728 try { 1729 1729 ImporterOptions options = new ImporterOptions(); 1730 //options.setOpenAllSeries(true); // TODO  added to see if needed for passing1730 options.setOpenAllSeries(true); // TODO  added to see if needed for passing 1731 1731 options.setConcatenate(true); 1732 1732 options.setSplitTimepoints(true);
Note: See TracChangeset
for help on using the changeset viewer.