Commit 8f726c5c authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixed bug in boundary conditions setter.

parent 07c0214b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -57,10 +57,12 @@ struct ImagesInfo
 * DICOM serie (searches the directory of the file). Call isDicomSeriesLoaded()
 * function to check if the load was successful.
 */
class DicomSeries : public tnlImage< int >
class DicomSeries : public Image< int >
{
   public:
      
      typedef int IndexType;
 
      inline DicomSeries( const String& filePath );
 
      inline virtual ~DicomSeries();
+5 −5
Original line number Diff line number Diff line
@@ -239,7 +239,7 @@ inline bool DicomSeries::loadImage( const String& filePath, int number)
    {
        this->height = dicomImage->getHeight();
    }
    else if(dicomImage->getHeight() != this->height)
    else if( ( IndexType ) dicomImage->getHeight() != this->height)
    {
        std::cerr << filePath <<" image has bad height value\n";
    }
@@ -248,7 +248,7 @@ inline bool DicomSeries::loadImage( const String& filePath, int number)
    {
        this->width = dicomImage->getWidth ();
    }
    else if(dicomImage->getWidth() != this->width)
    else if( ( IndexType ) dicomImage->getWidth() != this->width)
    {
        std::cerr << filePath <<" image has bad width value\n";
    }
@@ -257,7 +257,7 @@ inline bool DicomSeries::loadImage( const String& filePath, int number)
    {
        imagesInfo.bps = dicomImage->getDepth ();
    }
    else if( dicomImage->getDepth() != imagesInfo.bps )
    else if( ( IndexType ) dicomImage->getDepth() != imagesInfo.bps )
    {
        std::cerr << filePath <<" image has bad bps value\n";
    }
@@ -287,7 +287,7 @@ inline bool DicomSeries::loadImage( const String& filePath, int number)
    }
    else
    {//check image size for compatibility
        if( imagesInfo.frameSize != size )
        if( ( unsigned long ) imagesInfo.frameSize != size )
        {
            std::cerr << filePath << " image has bad frame size value\n";
            return false;
+3 −3
Original line number Diff line number Diff line
/***************************************************************************
                          tnlImage.h  -  description
                          Image.h  -  description
                             -------------------
    begin                : Jul 20, 2015
    copyright            : (C) 2015 by Tomas Oberhuber
@@ -14,13 +14,13 @@ namespace TNL {
namespace Images {   

template< typename Index = int >
class tnlImage
class Image
{
   public:
 
      typedef Index IndexType;
 
      tnlImage() : width( 0 ), height( 0 ) {};
      Image() : width( 0 ), height( 0 ) {};
 
      IndexType getWidth() const
      {
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ namespace TNL {
namespace Images {   

template< typename Index = int >
class JPEGImage : public tnlImage< Index >
class JPEGImage : public Image< Index >
{
   public:
 
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ namespace TNL {
namespace Images {   

template< typename Index = int >
class tnlPGMImage : public tnlImage< Index >
class tnlPGMImage : public Image< Index >
{
   public:
 
Loading