Skip to content

Commit

Permalink
fix #13
Browse files Browse the repository at this point in the history
  • Loading branch information
kn65op committed Aug 2, 2013
1 parent 9d80f7b commit 4228573
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ScaleSpace/ScaleSpaceImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ void * ScaleSpaceImage::getDataForScale(unsigned int scale, unsigned int image_n
{
throw ScaleSpaceImageException("Data is not continuous");
}
if (image_number > nr_images)
{
throw ScaleSpaceImageException("Wrong image number parameter: " + std::to_string(image_number) + ". Can be 0 -" + std::to_string(nr_images - 1));
}
if (scale >= nr_scales)
{
throw ScaleSpaceImageException("Wrong scale parameter: " + std::to_string(scale) + ". Can be 0 -" + std::to_string(nr_scales - 1));
throw ScaleSpaceImageException("Wrong scale parameter: " + std::to_string(scale) + ". Can be 0 -" + std::to_string(nr_scales - 1));
}
int tmp = scale * (image[image_number].elemSize() * width * height);
return image[image_number].data + scale * (image[image_number].elemSize() * width * height);
Expand Down

0 comments on commit 4228573

Please sign in to comment.