Skip to content

Commit

Permalink
unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
rossetantoine committed Feb 25, 2014
1 parent bea2383 commit cf1bc91
Show file tree
Hide file tree
Showing 55 changed files with 201 additions and 374 deletions.
3 changes: 1 addition & 2 deletions AYDicomPrint/AYDicomPrintWindowController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ - (IBAction) setPages:(id) sender
from = [entireSeriesTo intValue]-1;
}

int i, count = 0;
for( i = from; i < to; i += [entireSeriesInterval intValue])
for( int i = from; i < to; i += [entireSeriesInterval intValue])
{
no_of_images++;
}
Expand Down
9 changes: 0 additions & 9 deletions AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2097,8 +2097,6 @@ -(void) UpdateConvolutionMenu: (NSNotification*) note
-(void) UpdateCLUTMenu: (NSNotification*) note
{
//*** Build the menu
NSMenu *mainMenu;
NSMenu *viewerMenu;
short i;
NSArray *keys;
NSArray *sortedKeys;
Expand Down Expand Up @@ -4999,8 +4997,6 @@ - (BOOL) validateMenuItem:(NSMenuItem *) item
{
DicomDatabase *db = [[BrowserController currentBrowser] database];

NSMenu *menu = [[item parentItem] submenu];

for( NSMenuItem *item in recentStudiesMenu.itemArray)
{
DicomStudy *study = [db objectWithID: item.representedObject];
Expand Down Expand Up @@ -5161,9 +5157,6 @@ - (void) tileWindows:(id)sender windows: (NSMutableArray*) viewersList display2D
if( [[[cWindows objectAtIndex: i] window] isVisible] == NO) [cWindows removeObjectAtIndex: i];
}

//Retain windows
NSArray *windows = [cWindows valueForKey: @"window"];

NSMutableArray* screens = [[[self viewerScreens] mutableCopy] autorelease];

if (viewersList.count < screens.count && [[NSUserDefaults standardUserDefaults] boolForKey: @"UseDBScreenAtLast"])
Expand Down Expand Up @@ -5521,8 +5514,6 @@ - (void) tileWindows:(id)sender windows: (NSMutableArray*) viewersList display2D
if( landscape) ratioValue = landscapeRatio;
else ratioValue = portraitRatio;

float viewerCountPerScreen = (float) viewersForThisScreen.count;

BOOL fixedRows = NO, fixedColumns = NO;

if( [sender isKindOfClass: [NSDictionary class]] && [sender objectForKey: @"rows"])
Expand Down
2 changes: 1 addition & 1 deletion Binaries/dcmtk-source/dcmqrdb/dcmqrcbm.mm
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ OFBool compressFileFormat(DcmFileFormat fileformat, const char *fname, char *out
{
#ifndef OSIRIX_LIGHT
DcmDataset *dataset = fileformat.getDataset();
DcmItem *metaInfo = fileformat.getMetaInfo();
// DcmItem *metaInfo = fileformat.getMetaInfo();

DcmRepresentationParameter *params = nil;
DJ_RPLossy lossyParams( 90);
Expand Down
1 change: 0 additions & 1 deletion Binaries/dcmtk-source/dcmqrdb/dcmqrsrv.mm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@

extern int AbortAssociationTimeOut;

static NSString *globalSync = @"globalSync";
static int numberOfActiveAssociations = 0;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
6 changes: 3 additions & 3 deletions BonjourPublisher.m
Original file line number Diff line number Diff line change
Expand Up @@ -674,10 +674,10 @@ - (void)NEWMS { // is this used ? nah
int size = [self _stackReadInt];

[self _requireDataSize:size];
NSData* da = [self readData:size];

NSDictionary* d = [NSPropertyListSerialization propertyListFromData:da mutabilityOption: NSPropertyListImmutable format: nil errorDescription: nil];
// NSData* da = [self readData:size];

// NSDictionary* d = [NSPropertyListSerialization propertyListFromData:da mutabilityOption: NSPropertyListImmutable format: nil errorDescription: nil];
//
// if (d)
// {
// NSString *message = [d objectForKey:@"message"];
Expand Down
3 changes: 0 additions & 3 deletions BrowserController+Sources.m
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ -(void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSD

if (context == DicomBrowserSourcesContext)
{
NSHost* currentHost = [DefaultsOsiriX currentHost];
NSArray* a = [[NSUserDefaults standardUserDefaults] objectForKey:@"SERVERS"];
NSMutableDictionary* aa = [NSMutableDictionary dictionary];
for (NSDictionary* ai in a)
Expand Down Expand Up @@ -907,7 +906,6 @@ -(void)netServiceBrowser:(NSNetServiceBrowser*)nsb didRemoveService:(NSNetServic

-(void)_analyzeVolumeAtPath:(NSString*)path
{
BOOL used = NO;
for (DataNodeIdentifier* ibs in _browser.sources.arrangedObjects)
if ([ibs isKindOfClass:[LocalDatabaseNodeIdentifier class]] && [ibs.location hasPrefix:path])
{
Expand Down Expand Up @@ -1133,7 +1131,6 @@ -(BOOL)tableView:(NSTableView*)tableView acceptDrop:(id<NSDraggingInfo>)info row
for (NSString* xid in xids)
[items addObject:[_browser.database objectWithID:[NSManagedObject UidForXid:xid]]];

NSString *filePath, *destPath;
NSMutableArray* dicomImages = [DicomImage dicomImagesInObjects:items];
[[NSMutableArray arrayWithArray:[dicomImages valueForKey:@"path"]] removeDuplicatedStringsInSyncWithThisArray:dicomImages]; // remove duplicated paths

Expand Down
2 changes: 1 addition & 1 deletion CLUTOpacityView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ - (void)mouseDragged:(NSEvent *)theEvent
if( (int) controlPoint.x == (int) selectedPoint.x && (float) controlPoint.y == (float) selectedPoint.y)
{
NSPoint newPointInView = [self convertPoint:[theEvent locationInWindow] fromView:nil];
NSPoint newPoint = [transformView2Coordinate transformPoint:newPointInView];
// NSPoint newPoint = [transformView2Coordinate transformPoint:newPointInView];

float shiftX = [theEvent deltaX];
float shiftY = [theEvent deltaY];
Expand Down
11 changes: 4 additions & 7 deletions CPRController.m
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ - (void) computeCrossReferenceLines:(CPRMPRDCMView*) sender
float x, y, z;
Camera *cam = sender.camera;
Point3D *position = cam.position;
Point3D *viewUp = cam.viewUp;
// Point3D *viewUp = cam.viewUp;
float halfthickness = sender.vrView.clippingRangeThickness / 2.;
float cos[ 9];
[sender.pix orientation: cos];
Expand Down Expand Up @@ -956,7 +956,7 @@ - (void) computeCrossReferenceLines:(CPRMPRDCMView*) sender

if( sender == mprView2)
{
float o[ 9], orientation[ 9], sc[ 2];
float o[ 9], orientation[ 9];
[sender.pix orientation: o];

[mprView1.pix orientation: orientation];
Expand All @@ -968,7 +968,7 @@ - (void) computeCrossReferenceLines:(CPRMPRDCMView*) sender

if( sender == mprView3)
{
float o[ 9], orientation[ 9], sc[ 2];
float o[ 9], orientation[ 9];
[sender.pix orientation: o];

[mprView1.pix orientation: orientation];
Expand Down Expand Up @@ -2379,8 +2379,6 @@ - (void)setExportSliceInterval:(CGFloat)newExportSliceInterval

- (void)setExportTransverseSliceInterval:(CGFloat)newExportSliceInterval
{
BOOL isSame;

if (exportTransverseSliceInterval != newExportSliceInterval)
{
[self willChangeValueForKey:@"exportSequenceNumberOfFrames"];
Expand Down Expand Up @@ -2513,7 +2511,6 @@ -(IBAction) endDCMExportSettings:(id) sender
CPRUnsignedInt16ImageRep *imageRep;
unsigned char *dataPtr;
DICOMExport *dicomExport;
NSMutableArray *producedFiles;
CGFloat angle;

[dcmWindow makeFirstResponder: nil]; // To force nstextfield validation.
Expand Down Expand Up @@ -4609,7 +4606,7 @@ - (float) costFunction:(NSUInteger)index
float cost;
assert(index >= 0);
assert(index < [[curvedPath nodes] count]);
NSUInteger n = [[curvedPath nodes] count];
// NSUInteger n = [[curvedPath nodes] count];
if (index == 0 || index == [[curvedPath nodes] count] - 1)
{
cost = MAXFLOAT;
Expand Down
9 changes: 0 additions & 9 deletions CPRMPRDCMView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,6 @@ - (void) detect2DPointInThisSlice

// Is this point in our plane?

int ii = -1;
float vectors[ 9], orig[ 3], locationTemp[ 3];
float distance = 999999;

Expand Down Expand Up @@ -1867,8 +1866,6 @@ - (void) mouseUp:(NSEvent *)theEvent

for( ROI *r in curRoiList)
{
int mode;

if( [r type] == t2DPoint && r.parentROI == nil)
{
float location[ 3];
Expand Down Expand Up @@ -2388,13 +2385,7 @@ - (void)drawCurvedPathInGL
N3BezierPath *flattenedNotTransformedBezierPath;
N3MutableBezierPath *outlinePath;
N3Vector vector;
N3Vector control1;
N3Vector control2;
N3Vector prevVector;
N3Vector middleVector;
N3Vector cursorVector;
CGFloat spacing;
CGFloat x;
NSInteger i;
CGLContextObj cgl_ctx = [[NSOpenGLContext currentContext] CGLContextObj];
if( cgl_ctx == nil)
Expand Down
14 changes: 0 additions & 14 deletions CPRStraightenedView.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#import "NSColor+N2.h"
#import <objc/runtime.h>

static float deg2rad = M_PI / 180.0f;

extern BOOL frameZoomed;
extern int splitPosition[ 3];

Expand Down Expand Up @@ -247,8 +245,6 @@ - (void)dealloc
- (id)valueForKey:(NSString *)key
{
NSString *planeFullName; // full plane name may include Top or Bottom before the plane name
NSArray *planeRuns;
NSArray *vertialLines;

if ([key hasSuffix:@"VerticalLines"]) {
planeFullName = [key substringToIndex:[key length] - 13];
Expand Down Expand Up @@ -397,7 +393,6 @@ - (void)subDrawRect:(NSRect)rect
N3Vector lineStart;
N3Vector lineEnd;
N3Vector cursorVector;
N3Vector planePointVector;
N3AffineTransform pixToSubDrawRectTransform;
CGFloat relativePosition;
CGFloat draggedPosition;
Expand All @@ -407,11 +402,7 @@ - (void)subDrawRect:(NSRect)rect
CGFloat pixelsPerMm;
NSColor *planeColor;
NSInteger i;
NSArray *planeRuns;
NSArray *verticalLines;
NSNumber *indexNumber;
NSString *planeName;
_CPRStraightenedViewPlaneRun *planeRun;
CGLContextObj cgl_ctx = [[NSOpenGLContext currentContext] CGLContextObj];
if( cgl_ctx == nil)
return;
Expand Down Expand Up @@ -763,7 +754,6 @@ - (void)mouseMoved:(NSEvent *)theEvent
if( view == self)
{
NSPoint viewPoint;
NSPoint planePoint;
N3Vector pixVector;
N3Line line;
NSInteger i;
Expand All @@ -772,9 +762,6 @@ - (void)mouseMoved:(NSEvent *)theEvent
CGFloat relativePosition;
CGFloat distance;
CGFloat minDistance;
BOOL didChangeHover;
NSString *planeName;
N3Vector vector;

viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];

Expand Down Expand Up @@ -1635,7 +1622,6 @@ - (CGFloat)_distanceToPoint:(NSPoint)point onVerticalLines:(NSArray *)verticalLi
N3Vector pixVector;
N3Vector lineStart;
N3Vector lineEnd;
CGFloat height;
CGFloat relativePosition;
CGFloat distance;
CGFloat minDistance;
Expand Down
9 changes: 0 additions & 9 deletions CPRStretchedView.m
Original file line number Diff line number Diff line change
Expand Up @@ -917,17 +917,11 @@ - (void)mouseMoved:(NSEvent *)theEvent
if( view == self)
{
NSPoint viewPoint;
NSPoint planePoint;
N3Vector pixVector;
N3Line line;
NSInteger i;
BOOL overNode;
NSInteger hoverNodeIndex;
CGFloat relativePosition;
CGFloat distance;
CGFloat minDistance;
BOOL didChangeHover;
NSString *planeName;
N3Vector vector;
CGFloat distanceFromCenterline;

Expand Down Expand Up @@ -1542,7 +1536,6 @@ - (N3BezierPath *)_projectedBezierPathFromStretchedGeneratorRequest:(CPRStretche
N3BezierCoreRef projectedBezierCore;
CGFloat projectedBezierLength;
CGFloat sampleSpacing;
CGFloat pixelsPerMm;
N3VectorArray vectors;
CGFloat *relativePositions;
N3MutableBezierPath *centerlinePath;
Expand Down Expand Up @@ -2404,7 +2397,6 @@ - (CGFloat)_relativePositionForIndex:(NSInteger)index

- (CGFloat)_relativePositionForPixPoint:(NSPoint)pixPoint
{
CGFloat pixelsPerMm;
N3Line pixLine;
N3Vector closestVector;

Expand Down Expand Up @@ -2456,7 +2448,6 @@ - (void)_pushBezierPath:(CGFloat)distance
N3Vector tangent;
N3Vector normal;
N3Vector newNode;
CPRCurvedPathControlToken controlToken;

[self _sendWillEditCurvedPath];
for (i = 0; i < [[_curvedPath nodes] count]; i++) {
Expand Down
2 changes: 0 additions & 2 deletions CPRTransverseView.m
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,6 @@ - (void) drawRect:(NSRect)aRect withContext:(NSOpenGLContext *)ctx

- (void)subDrawRect:(NSRect)rect
{
N3Vector lineStart;
N3Vector lineEnd;
N3Vector cursorVector;
N3AffineTransform pixToSubDrawRectTransform;
CGFloat pixelsPerMm;
Expand Down
4 changes: 2 additions & 2 deletions ComparativeCell.mm
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ - (NSRect)drawTitle:(NSAttributedString*)title withFrame:(NSRect)frame inView:(N
[self.rightTextSecondLine drawInRect:frame withAttributes:attributes];
frame.origin.y -= 1;

CGFloat w = [self.rightTextSecondLine sizeWithAttributes:attributes].width;
// CGFloat w = [self.rightTextSecondLine sizeWithAttributes:attributes].width;
}

frame.origin.x += 110;
Expand All @@ -156,7 +156,7 @@ - (NSRect)drawTitle:(NSAttributedString*)title withFrame:(NSRect)frame inView:(N
[self.rightTextFirstLine drawInRect:frame withAttributes:attributes];
frame.origin.y -= 1;

CGFloat w = [self.rightTextFirstLine sizeWithAttributes:attributes].width;
// CGFloat w = [self.rightTextFirstLine sizeWithAttributes:attributes].width;
}
}
else
Expand Down
6 changes: 3 additions & 3 deletions CurveFitter.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
enum { STRAIGHT_LINE=0,POLY2=1,POLY3=2,POLY4=3, EXPONENTIAL=4,POWER=5,LOG=6,RODBARD=7,GAMMA_VARIATE=8,T1_SAT_RELAX = 9,T2_DEPHASE = 10,DIFFUSION = 11};
static int IterFactor = 500;

static char* fitList[] = {"Straight Line","2nd Degree Polynomial", "3rd Degree Polynomial", "4th Degree Polynomial","Exponential","Power", "log","Rodbard", "Gamma Variate"};
// static char* fitList[] = {"Straight Line","2nd Degree Polynomial", "3rd Degree Polynomial", "4th Degree Polynomial","Exponential","Power", "log","Rodbard", "Gamma Variate"};

static char* fList[] = {"y = a+bx","y = a+bx+cx^2", "y = a+bx+cx^2+dx^3", "y = a+bx+cx^2+dx^3+ex^4","y = a*exp(bx)","y = ax^b", "y = a*ln(bx)","y = c*((a-x)/(x-d))^(1/b)", "y = a*(x-b)^c*exp(-(x-b)/d)", "y=a*(1-exp(-x/b))"};
// static char* fList[] = {"y = a+bx","y = a+bx+cx^2", "y = a+bx+cx^2+dx^3", "y = a+bx+cx^2+dx^3+ex^4","y = a*exp(bx)","y = ax^b", "y = a*ln(bx)","y = c*((a-x)/(x-d))^(1/b)", "y = a*(x-b)^c*exp(-(x-b)/d)", "y=a*(1-exp(-x/b))"};

static double alpha = -1.0; // reflection coefficient
static double beta = 0.5; // contraction coefficient
Expand Down Expand Up @@ -152,7 +152,7 @@ - (void) initialize
double lastx = xData[numPoints-1];
double lasty = yData[numPoints-1];
double xmean = (firstx+lastx)/2.0;
double ymean = (firsty+lasty)/2.0;
// double ymean = (firsty+lasty)/2.0;
double slope;
if ((lastx - firstx) != 0.0)
slope = (lasty - firsty)/(lastx - firstx);
Expand Down
3 changes: 0 additions & 3 deletions DCMPix.m
Original file line number Diff line number Diff line change
Expand Up @@ -11993,16 +11993,13 @@ - (void)loadCustomImageAnnotationsDBFields: (DicomImage*) imageObj
if(![key isEqualToString:@"sameAsDefault"])
{
NSArray *annotations = [annotationsForModality objectForKey: key];
NSMutableArray *annotationsOUT = [NSMutableArray array];

@try
{
for ( NSDictionary *annot in annotations)
{
NSArray *content = [annot objectForKey:@"fullContent"];
NSMutableArray *contentOUT = [NSMutableArray array];

BOOL contentForLine = NO;
for ( int f=0; f<[content count]; f++)
{
@try
Expand Down
2 changes: 0 additions & 2 deletions DCMTKQueryRetrieveSCP.mm
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@
DcmQueryRetrieveSCP *scp = nil;
DcmQueryRetrieveSCP *scptls = nil;

static int inc = 0;

OFCondition mainStoreSCP(T_ASC_Association * assoc, T_DIMSE_C_StoreRQ * request, T_ASC_PresentationContextID presId, DcmQueryRetrieveDatabaseHandle *dbHandle)
{
OFBool isTLS = assoc->params->DULparams.useSecureLayer;
Expand Down
Loading

0 comments on commit cf1bc91

Please sign in to comment.