I'm trying to integrate a macro into a program that converts a delta vision file into a composite RGB file, however i have run into two problems:
name=getTitle() if (name == "*" + ".dv"){ trying to identify a delta vision file doesnt seem to work with having a wildcard followed by .dv, is there a way to return just the file extension? am i using the wildcard incorrectly?(i have tried with *.dv aswell) n=nSlices setBatchMode(false); rename("DV1"); ;run("Make Substack...", " slices=1-nSlices-3"); rename("C1"); ;selectWindow("DV1") ;run("Make Substack...", " slices=2-n-3"); rename("C2"); ;selectWindow("DV1") ;run("Make Substack...", " slices=3-n-3"); rename("C3"); ;selectWindow("DV1") close() ;run("Merge Channels...", "c1=C1 c2=C2 c3=C3 create"); setBatchMode(true); }else this is the other big problem, i need the macro to be able to create a composite of any dv file of any number of slices, and i cant seem to find a method of inputting this number (nSlices) into the substack function either as a function or variable. Any help on either problem would be greatly appreciated |
Try:
name=getTitle(); if (endsWith(file, ".dv"){ For the substack I think you can use: run("Make Substack...", " slices=3-"+n+"-3"); or run("Make Substack...", " slices=3-"+nSlices+"-3") Hope is works Kees Dr Ir K.R. Straatman Senior Experimental Officer Centre for Core Biotechnology Services University of Leicester http://www.le.ac.uk/biochem/microscopy/home.html 20-24 August Fluorescence microscopy workshops: http://www.le.ac.uk/biochem/microscopy/workshop2012.html -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of ctsiantar Sent: 24 July 2012 10:58 To: [hidden email] Subject: Delta Vision stacker: define range problem/file recognition problem I'm trying to integrate a macro into a program that converts a delta vision file into a composite RGB file, however i have run into two problems: *name=getTitle() if (name == "*" + ".dv"){* trying to identify a delta vision file doesnt seem to work with having a wildcard followed by .dv, is there a way to return just the file extension? am i using the wildcard incorrectly?(i have tried with *.dv aswell) *n=nSlices setBatchMode(false); rename("DV1"); ;run("Make Substack...", " slices=1-nSlices-3"); rename("C1"); ;selectWindow("DV1") ;run("Make Substack...", " slices=2-n-3"); rename("C2"); ;selectWindow("DV1") ;run("Make Substack...", " slices=3-n-3"); rename("C3"); ;selectWindow("DV1") close() ;run("Merge Channels...", "c1=C1 c2=C2 c3=C3 create"); setBatchMode(true); }else* this is the other big problem, i need the macro to be able to create a composite of any dv file of any number of slices, and i cant seem to find a method of inputting this number (nSlices) into the substack function either as a function or variable. Any help on either problem would be greatly appreciated -- View this message in context: http://imagej.1557.n6.nabble.com/Delta-Vision-stacker-define-range-problem-file-recognition-problem-tp4999542.html Sent from the ImageJ mailing list archive at Nabble.com. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
works like a charm again!
This should be the last step in the cataloguing macro, unless my supervisor can come up with something new! Many thanks for your help, Christian Tsiantar |
Free forum by Nabble | Edit this page |