Skip to content

Commit

Permalink
Update ExportROIsPlugin.m
Browse files Browse the repository at this point in the history
  • Loading branch information
crubb committed Mar 13, 2013
1 parent 01e906b commit 1c35329
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ExportROIs/ExportROIsPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ - (void) endSavePanel: (NSSavePanel *) sheet returnCode: (int) retCode contextIn

float area = 0, length = 0;
NSMutableDictionary *dataString = [roi dataString];
NSMutableArray *dataValues = [roi dataValues];

if( [dataString objectForKey:@"AreaCM2"]) area = [[dataString objectForKey:@"AreaCM2"] floatValue];
if( [dataString objectForKey:@"AreaPIX2"]) area = [[dataString objectForKey:@"AreaPIX2"] floatValue];
Expand Down Expand Up @@ -158,6 +159,7 @@ - (void) endSavePanel: (NSSavePanel *) sheet returnCode: (int) retCode contextIn
// NumberOfPoints : number of points
// Point_mm : array of point (x,y,z) in mm unit
// Point_px : array of point (x,y) in pixel unit
// Point_value : array of pixel values
[ roiInfo setObject: [ NSNumber numberWithLong: j ] forKey: @"IndexInImage" ];
[ roiInfo setObject: [ NSNumber numberWithFloat: mean ] forKey: @"Mean" ];
[ roiInfo setObject: [ NSNumber numberWithFloat: min ] forKey: @"Min" ];
Expand All @@ -172,6 +174,7 @@ - (void) endSavePanel: (NSSavePanel *) sheet returnCode: (int) retCode contextIn
[ roiInfo setObject: [ NSNumber numberWithLong: [ roiPoints count ] ] forKey: @"NumberOfPoints" ];
[ roiInfo setObject: mmXYZ forKey: @"Point_mm" ];
[ roiInfo setObject: pixXY forKey: @"Point_px" ];
[ roiInfo setObject: dataValues forKey: @"Point_value" ];

[ roisInImage addObject: roiInfo ];
}
Expand Down

0 comments on commit 1c35329

Please sign in to comment.