diff --git a/Src/libCZI/CziParse.cpp b/Src/libCZI/CziParse.cpp index 1b7fd6ff..6e1fde7b 100644 --- a/Src/libCZI/CziParse.cpp +++ b/Src/libCZI/CziParse.cpp @@ -574,16 +574,15 @@ using namespace libCZI; libCZI::DimensionIndex dim = CCZIParse::DimensionCharToDimensionIndex(subBlkDirDV->DimensionEntries[i].Dimension, 4); entry.coordinate.Set(dim, subBlkDirDV->DimensionEntries[i].Start); - // check all the dimensions here. cr mark - if(options.GetStoredDimensionOtherThanMMustHaveSizeOne()) + if(options.GetPhysicalDimensionOtherThanMMustHaveSizeOne()) { - auto storedSize = subBlkDirDV->DimensionEntries[i].StoredSize; - if(storedSize != 1) + auto physicalSize = subBlkDirDV->DimensionEntries[i].StoredSize; + if(physicalSize != 1) { stringstream string_stream; string_stream << "Size for stored dimension '" << Utils::DimensionToChar(dim) - << "' is expected to be 1, but found " << storedSize + << "' is expected to be 1, but found " << physicalSize << " (file-offset:" << subBlkDirDV->FilePosition << ")."; throw LibCZICZIParseException(string_stream.str().c_str(), LibCZICZIParseException::ErrorCode::NonConformingSubBlockDimensionEntry); } diff --git a/Src/libCZI/CziParse.h b/Src/libCZI/CziParse.h index 2e6c5786..42ddeb06 100644 --- a/Src/libCZI/CziParse.h +++ b/Src/libCZI/CziParse.h @@ -33,7 +33,7 @@ class CCZIParse { kDimensionXyMustBePresent = 0, kDimensionOtherThanMMustHaveSizeOne, - kStoredDimensionOtherThanMMustHaveSizeOne, + kPhysicalDimensionOtherThanMMustHaveSizeOne, kDimensionMMustHaveSizeOneExceptForPyramidSubblocks, kDimensionMMustHaveSizeOne, @@ -46,10 +46,10 @@ class CCZIParse /// \param enable True to enable, false to disable. void SetDimensionXyMustBePresent(bool enable) { return this->SetFlag(ParseFlags::kDimensionXyMustBePresent, enable); } - /// Require that for each subblock the physical (stored) size (for all dimensions other than X, Y and M) is "1". + /// Require that for each subblock the physical size (for all dimensions other than X, Y and M) is "1". /// /// \param enable True to enable, false to disable. - void SetStoredDimensionOtherThanMMustHaveSizeOne(bool enable) { return this->SetFlag(ParseFlags::kStoredDimensionOtherThanMMustHaveSizeOne, enable); } + void SetPhysicalDimensionOtherThanMMustHaveSizeOne(bool enable) { return this->SetFlag(ParseFlags::kPhysicalDimensionOtherThanMMustHaveSizeOne, enable); } /// Require that for each subblock the size (for all dimensions other than X, Y and M) is "1". /// @@ -76,10 +76,10 @@ class CCZIParse /// \returns True if it is to be checked that the size of all dimensions other than X, Y and M is "1" for each subblock; false otherwise. bool GetDimensionOtherThanMMustHaveSizeOne() const { return this->GetFlag(ParseFlags::kDimensionOtherThanMMustHaveSizeOne); } - /// Gets a boolean indicating whether to check that the physical (stored) size of all dimensions other than X, Y and M is "1" for each subblock. + /// Gets a boolean indicating whether to check that the physical size of all dimensions other than X, Y and M is "1" for each subblock. /// - /// \returns True if it is to be checked that the physical (stored) size of all dimensions other than X, Y and M is "1" for each subblock; false otherwise. - bool GetStoredDimensionOtherThanMMustHaveSizeOne() const { return this->GetFlag(ParseFlags::kStoredDimensionOtherThanMMustHaveSizeOne); } + /// \returns True if it is to be checked that the physical size of all dimensions other than X, Y and M is "1" for each subblock; false otherwise. + bool GetPhysicalDimensionOtherThanMMustHaveSizeOne() const { return this->GetFlag(ParseFlags::kPhysicalDimensionOtherThanMMustHaveSizeOne); } /// Gets a boolean indicating whether to check that the size is "1" for dimension M for all non-pyramid-subblocks. /// This flag is more specific than the flag "DimensionMMustHaveSizeOne". @@ -97,7 +97,7 @@ class CCZIParse { this->SetDimensionXyMustBePresent(false); this->SetDimensionOtherThanMMustHaveSizeOne(false); - this->SetStoredDimensionOtherThanMMustHaveSizeOne(false); + this->SetPhysicalDimensionOtherThanMMustHaveSizeOne(false); this->SetDimensionMMustHaveSizeOne(false); } @@ -105,7 +105,7 @@ class CCZIParse void SetStrictParsing() { this->SetDimensionXyMustBePresent(true); - this->SetStoredDimensionOtherThanMMustHaveSizeOne(true); + this->SetPhysicalDimensionOtherThanMMustHaveSizeOne(true); this->SetDimensionOtherThanMMustHaveSizeOne(true); this->SetDimensionMMustHaveSizeOne(true); }