Skip to content

Commit

Permalink
Merge pull request #60 from spalte/osirix_cubic_merge
Browse files Browse the repository at this point in the history
Fixed Cubic interpolation build error
  • Loading branch information
rossetantoine committed Apr 3, 2015
2 parents d57590a + 2dff8c7 commit b172717
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions OsiriXClasses/CPR/CPRVolumeData.m
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,16 @@ - (BOOL)getNearestNeighborInterpolatedFloat:(float *)floatPtr atDicomVector:(N3V
return YES;
}

- (BOOL)getCubicInterpolatedFloat:(float *)floatPtr atDicomVector:(N3Vector)vector
{
CPRVolumeDataInlineBuffer inlineBuffer;

[self aquireInlineBuffer:&inlineBuffer];
*floatPtr = CPRVolumeDataCubicInterpolatedFloatAtDicomVector(&inlineBuffer, vector);
return YES;
}


- (instancetype)volumeDataByApplyingTransform:(N3AffineTransform)transform;
{
return [[[CPRVolumeData alloc] initWithData:_floatData pixelsWide:_pixelsWide pixelsHigh:_pixelsHigh pixelsDeep:_pixelsDeep
Expand Down Expand Up @@ -283,26 +293,6 @@ - (instancetype)volumeDataResampledWithVolumeTransform:(N3AffineTransform)transf
return [self volumeDataResampledWithVolumeTransform:shiftedTransform pixelsWide:width pixelsHigh:height pixelsDeep:depth interpolationMode:interpolationsMode];
}

- (BOOL)getCubicInterpolatedFloat:(float *)floatPtr atDicomVector:(N3Vector)vector
{
CPRVolumeDataInlineBuffer inlineBuffer;

if (_isValid == NO) {
return NO;
}

if ([self aquireInlineBuffer:&inlineBuffer]) {
*floatPtr = CPRVolumeDataCubicInterpolatedFloatAtDicomVector(&inlineBuffer, vector);
[self releaseInlineBuffer:&inlineBuffer];
return YES;
} else {
[self releaseInlineBuffer:&inlineBuffer];
*floatPtr = 0.0;
return NO;
}
}


- (instancetype)volumeDataResampledWithVolumeTransform:(N3AffineTransform)transform pixelsWide:(NSUInteger)pixelsWide pixelsHigh:(NSUInteger)pixelsHigh pixelsDeep:(NSUInteger)pixelsDeep
interpolationMode:(CPRInterpolationMode)interpolationsMode;
{
Expand Down

0 comments on commit b172717

Please sign in to comment.