ROI_ISOLATE-ReturntheindexvalueswithinanROIofofanisolatedcubethatencompassesROI[ISOLATE_INDEXES,ISOLATE_INDEXES_IN_ROI]=ROI_ISOLATE(IMSIZE,INDEXESND)GivenanROIinanimageofsizeIMSIZEwithindexesINDEXESND,returntheindexvaluesinanisolatedN-Dcubethatcorrespondtoindexvaluesintheoriginalimage.Inputs:IMSIZEshouldbethesizeoftheimage[SZ1SZ2... SZN]INDEXESNDaretheindexvaluesoftheROIintheimageOutputs:ISOLATE_INDEXESareamappingbetweentheminimumN-DcubethatcancontaintheROIandtheROI'sindexesintheimage.ORIG_IM(ISOLATE_INDEXES)=MINCUBE.ISOLATE_INDEXEShavetheshapeoftheminimumcube.ISOLATE_INDEXES_IN_ROIisa0-1vectorthesamesizeasISOLATE_INDEXES.Entriesare1ifthevoxeliscontainedintheROIspecifiedbyINDEXESNDExample:imsize=[333];indexesnd=[14151718232426];% this is an ROI in the bottom right corner of a 3x3x3 cube except the edge point% to see where this is, use reshape(1:27,3,3,3)[isolate_indexes,isolate_indexes_in_roi]=ROI_isolate(imsize,indexesnd)