We've made more changes. This will un-ignore and un-select the images in the tree view.
version "4.0"
# Macro to remove n layers of the outside of scans
DECLARE nb_layers 1
DECLARE nb_images 0
DECLARE i 1
DECLARE ans 1
TREEVIEW IMAGE GET_NB(nb_images)
INPUT DOUBLE(nb_layers,"Please input the number of layers to remove",\
"Please input the number of layers to remove",\
$nb_layers)
INPUT QUESTION(ans, "Do you want to continue?")
SELECT NONE
while $i <=$nb_images
if $ans == 0
break
endif
TREEVIEW SELECT NONE
TREEVIEW IMAGE SELECT ( $i, "On" )
EDIT OBJECT USE ()
SELECT OBJECT INVERT
EDIT OBJECT IGNORE ( )
TREEVIEW SELECT NONE
TREEVIEW IMAGE SELECT ( $i, "On" )
SELECT ALL
CONFIG MODIFY NB_LAYERS ( $nb_layers )
SELECT SHRINK_ALL
SELECT INVERT
EDIT DELETE
++ i
endwhile
TREEVIEW SELECT IGNORED
EDIT OBJECT USE ()
TREEVIEW SELECT NONE
version "4.0"
# Macro to remove n layers of the outside of scans
DECLARE nb_layers 1
DECLARE nb_images 0
DECLARE i 1
DECLARE ans 1
TREEVIEW IMAGE GET_NB(nb_images)
INPUT DOUBLE(nb_layers,"Please input the number of layers to remove",\
"Please input the number of layers to remove",\
$nb_layers)
INPUT QUESTION(ans, "Do you want to continue?")
SELECT NONE
while $i <=$nb_images
if $ans == 0
break
endif
TREEVIEW SELECT NONE
TREEVIEW IMAGE SELECT ( $i, "On" )
EDIT OBJECT USE ()
SELECT OBJECT INVERT
EDIT OBJECT IGNORE ( )
TREEVIEW SELECT NONE
TREEVIEW IMAGE SELECT ( $i, "On" )
SELECT ALL
CONFIG MODIFY NB_LAYERS ( $nb_layers )
SELECT SHRINK_ALL
SELECT INVERT
EDIT DELETE
++ i
endwhile
TREEVIEW SELECT IGNORED
EDIT OBJECT USE ()
TREEVIEW SELECT NONE