COMP: Minor speedup via improved logic
COMP: Minor speedup via improved logic

Change-Id: Icb4e1306fb5d98930459d67744e89c066daa2abe

LucasGandel/TubeTK,cdeepakroy/TubeTK,thewtex/TubeTK,KitwareMedical/TubeTK,KitwareMedical/ITKTubeTK,aylward/ITKTubeTK,cdeepakroy/TubeTK,matthieuheitz/TubeTK,KitwareMedical/ITKTubeTK,LucasGandel/TubeTK,sumedhasingla/TubeTK,KitwareMedical/ITKTubeTK,KitwareMedical/TubeTK,sumedhasingla/TubeTK,LucasGandel/TubeTK,sumedhasingla/TubeTK,thewtex/TubeTK,matthieuheitz/TubeTK,LucasGandel/TubeTK,matthieuheitz/TubeTK,aylward/ITKTubeTK,thewtex/TubeTK,sumedhasingla/TubeTK,cdeepakroy/TubeTK,aylward/ITKTubeTK,KitwareMedical/TubeTK,aylward/ITKTubeTK,cdeepakroy/TubeTK,thewtex/TubeTK,matthieuheitz/TubeTK,KitwareMedical/ITKTubeTK,KitwareMedical/TubeTK