Ignore:
Timestamp:
Jun 17, 2015 2:14:44 AM (5 years ago)
Author:
ldelgass
Message:

Downsample volume if dims exceed hardware limits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nanovis/trunk/VtkDataSetReader.cpp

    r5672 r5717  
    147147        print(dataSet);
    148148
    149         int maxDim = 64;
    150 
    151149        resampledDataSet = vtkImageData::SafeDownCast(dataSet.GetPointer());
    152150        if (resampledDataSet != NULL) {
    153151            // Have a uniform grid, check if we need to resample
    154152#ifdef DOWNSAMPLE_DATA
     153            int maxDim = 64;
     154#else
     155            // This is the hardware limit
     156            int maxDim = NanoVis::max3dTextureSize;
     157#endif
    155158            if (resampledDataSet->GetDimensions()[0] > maxDim ||
    156159                resampledDataSet->GetDimensions()[1] > maxDim ||
     
    158161                resampledDataSet = resampleVTKDataSet(dataSet, maxDim);
    159162            }
    160 #endif
    161163        } else {
     164            int maxDim = 64;
    162165            resampledDataSet = resampleVTKDataSet(dataSet, maxDim);
    163166        }
Note: See TracChangeset for help on using the changeset viewer.