-
-
Notifications
You must be signed in to change notification settings - Fork 726
ENH: Ingest ITKMGHIO into Modules/IO #6137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
hjmjohnson
merged 89 commits into
InsightSoftwareConsortium:main
from
hjmjohnson:ingest-MGHIO
Apr 28, 2026
Merged
Changes from all commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
81f9f39
ENH: Adding Remote Module for ITKv4
hjmjohnson 4f8451a
STYLE: Useless ITK deprecated define removed.
hjmjohnson 2dd1b9f
STYLE: Remove "ITK" from the module name.
XiaoxiaoLiu 11008b5
ENH: Remote module is OFF by default.
XiaoxiaoLiu 2c9b62a
STYLE: Clean up unnecesssary cmake script.
XiaoxiaoLiu 2331f0d
BUG: Remove ITKTransform dependency.
XiaoxiaoLiu 3abea84
Merge pull request #1 from XiaoxiaoLiu/master
hjmjohnson e7d661f
FIX: ITK warnings of deprecated EXCLUDE_FROM_ALL.
XiaoxiaoLiu b722dfa
Merge pull request #2 from XiaoxiaoLiu/master
hjmjohnson 1c9f995
BUG: missing steps converting origin back to freesurfer space
8e6f38b
COMP: Add test for origin writing fix
01889c0
Merge pull request #3 from Chaircrusher/WriteOriginBug
42a2c55
COMP: fix precision of distance between origins test
a3a39c5
BUG: refine CanReadFile in MGHImageIO
536599b
BUG: as;dlfkj
d7e184c
BUG: refine CanReadFile in MGHImageIO
907889b
Merge branch 'master' of https://github.com/Slicer/itkMGHImageIO
aa33def
COMP: Disallow '.gz' extension
de832fd
DOC: fix comment
f30929e
BUG: Valgrind memory leak.
hjmjohnson 82997ae
BUG: Fix KWStyle error for header guarder
blowekamp f76a905
Merge pull request #4 from blowekamp/master
jcfr 66abfdc
ENH: Add ITK_OVERRIDE and ITK_NULLPTR designations
hjmjohnson 93a2a01
Merge pull request #5 from Slicer/ITK_OVERRIDE_ITK_NULLPTR
hjmjohnson c801047
BUG: Fix KWStyle error for header guarderd in test
hjmjohnson 3adcf22
Merge pull request #6 from Slicer/FixAnotherHeaderGuardStyle
hjmjohnson 7616415
STYLE: Use ITK naming conventions for MGHIO.
hjmjohnson ce578aa
STYLE: Revert Use ITK naming conventions for MGHIO
hjmjohnson f69071e
COMP: Make MGHIO a shared libary
hjmjohnson 21100ef
BUG: Test case was not verifying meta-data
hjmjohnson c6517e1
BUG: Correct DirectionCosine Interpretation
hjmjohnson 3524aab
ENH: Improve TWrite for implicit type conversion
hjmjohnson 0abd64d
ENH: Improve numerical statibility
hjmjohnson 6faa792
BUG: MGH File writing bug fixed
hjmjohnson 9e9ed60
Merge pull request #8 from Slicer/FIX_MGH
hjmjohnson d65651a
STYLE: Remove ITK style warning
hjmjohnson c2002a8
BUG: Ensure factory is registered once.
jcfr cee9f09
Merge pull request #9 from jcfr/3393-transform-image-io-as-shared
jcfr 7dd9b36
STYLE: Use Macro for Function Deletion
zachary-williamson f30d9a3
Merge pull request #10 from zachary-williamson/master
hjmjohnson 42138ee
ENH: Add FACTORY_NAMES parameter to itk_module() declaration
c863a12
ENH: Module can now be build as an external remote module
1980b1c
Merge pull request #11 from fbudin69500/Add_FACTORY_NAMES
jcfr 3fae98f
ENH: Initial ITKv5 conversions.
hjmjohnson 702a91e
ENH: ITKv5 override consistency
hjmjohnson 7ddb9ff
COMP: Use C++11 override directly
hjmjohnson 0a176ce
COMP: Use C++11 nullptr directly
hjmjohnson f75ae0e
ENH: Require cmake minimum version to be 3.9.5.
dc95823
Merge pull request #13 from Slicer/ITKv5
hjmjohnson a38a2ba
Merge pull request #12 from jhlegarreta/ChangeRequiredCMakeMinimumVer…
hjmjohnson aa480fc
STYLE: Modernize to C++11 conventions
hjmjohnson 50be0bd
Merge pull request #18 from Slicer/ITKv5Style
hjmjohnson 67e11de
STYLE: Prefer C++11 type alias over typedef
hjmjohnson 9796d1b
Merge pull request #19 from Slicer/ITKv5Style
hjmjohnson 4a5d523
STYLE: Prefer constexpr for const numeric literals
hjmjohnson d32d4f7
Merge pull request #20 from Slicer/ITKv5Style
hjmjohnson 94f7003
COMP: Move ITK_DISALLOW_COPY_AND_ASSIGN calls to public section.
a749862
Merge pull request #21 from jhlegarreta/MoveDISALLOWCOPYANDASSIGNToPu…
hjmjohnson 6268b04
COMP: Set the minimum required CMake version to 3.10.2.
6fca69e
Merge pull request #22 from jhlegarreta/UpdateCMakeMinimumRequiredVer…
thewtex 3d69768
ENH: Add .gitattributes to allow running ITK clang-formatting scripts
hjmjohnson c4ab54a
ENH: Fix new enum changes from ITK and failed KWStyle test.
mseng10 2326be9
STYLE: Remove redundant void argument lists
hjmjohnson 363a4fe
STYLE: Make prototype match definition names
hjmjohnson 000000f
STYLE: Replace integer literals which are cast to bool.
hjmjohnson 652e1ba
STYLE: Prefer = default to explicitly trivial implementations
hjmjohnson 0f0ed34
STYLE: Remove redundant void argument lists
hjmjohnson f320627
PERF: readability container size empty
hjmjohnson 019ee6d
DOC: Update copyright assignment to NumFOCUS
hjmjohnson e6ece2e
ENH: Make similar to template
hjmjohnson fab9d08
Merge pull request #23 from Slicer/ITKv5_1rc2
hjmjohnson a96deb6
STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE
mseng10 e069a8a
STYLE: Prefer itk::Math::abs for consistency.
hjmjohnson ee3ff52
STYLE: Standardize parameter names to argc and *argv[], replace ac/av
dzenanz fe9374d
ENH: Bump ITK and change http to https
tbirdso 12490ee
BUG: Use the literal superclass name in itkTypeMacro
jhlegarreta 3e5d7d8
COMP: Use modern macro for name of class
hjmjohnson c37212f
STYLE: Update clang-format to match ITK 2025-11-10
hjmjohnson fd120c3
ENH: Modernize CMake to use itk_module_add_library
blowekamp 9cc6180
Merge pull request #46 from InsightSoftwareConsortium/modernize-cmake…
blowekamp c6448a2
ENH: Convert from md5 to .cid tags. (#49)
hjmjohnson 674e55d
ENH: Ingest ITKMGHIO into Modules/IO
hjmjohnson 94b0aa9
DOC: Add README.md pointing at archived upstream for MGHIO
hjmjohnson eb67aa4
COMP: Remove MGHIO.remote.cmake; now in-tree
hjmjohnson 1505878
ENH: Enable MGHIO in CI via configure-ci
hjmjohnson bae17f6
COMP: Fix normalize-ingest-commits.py merge-commit handling
hjmjohnson a180130
STYLE: Simplify Modules/IO/MGHIO/CMakeLists.txt to in-tree pattern
hjmjohnson ca6487a
STYLE: Apply pre-commit fixes to MGHIO test CMakeLists.txt
hjmjohnson 0b37537
STYLE: Apply gersemi to remaining MGHIO CMake files
hjmjohnson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| project(MGHIO) | ||
| set(MGHIO_LIBRARIES MGHIO) | ||
| itk_module_impl() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # MGHIO | ||
|
|
||
| In-tree ITK module providing an `itk::MGHImageIO` plugin for the | ||
| `.mgh` / `.mgz` (MGH) volume format used by the FreeSurfer | ||
| neuroimaging toolchain. The factory `itk::MGHImageIOFactory` | ||
| auto-registers with `itk::ImageIOFactory` so any | ||
| `itk::ImageFileReader` / `itk::ImageFileWriter` transparently picks | ||
| up `.mgh` / `.mgz` files when the module is enabled. | ||
|
|
||
| ## Origin | ||
|
|
||
| Ingested from the standalone remote module | ||
| [**InsightSoftwareConsortium/itkMGHImageIO**](https://github.com/InsightSoftwareConsortium/itkMGHImageIO) | ||
| on 2026-04-27, at upstream commit | ||
| [`af74507c`](https://github.com/InsightSoftwareConsortium/itkMGHImageIO/commit/af74507c1ddc82722637c37d1f5d169e3000553a). | ||
| The upstream repository will be archived read-only after this PR | ||
| merges; it remains reachable at the URL above. | ||
|
|
||
| ## What lives here | ||
|
|
||
| Per the v3 ingestion strategy (see | ||
| `Utilities/Maintenance/RemoteModuleIngest/INGESTION_STRATEGY.md`), only | ||
| paths matching the narrow whitelist (code, headers, tests, wrapping, | ||
| module CMake) crossed the merge boundary: | ||
|
|
||
| - `include/` — public C++ headers (`itkMGHImageIO.h`, `itkMGHImageIOFactory.h`). | ||
| - `src/` — non-template implementation. | ||
| - `test/` — CTest drivers and content-link stubs. | ||
| - `wrapping/` — Python wrapping descriptors. | ||
| - `CMakeLists.txt`, `itk-module.cmake` — build + module descriptors. | ||
|
|
||
| Every surviving commit preserves original authorship; `git blame` | ||
| walks across the merge boundary to upstream authors going back to the | ||
| module's earliest history. | ||
|
|
||
| ## What was intentionally left upstream | ||
|
|
||
| Everything outside the whitelist stays in the archived upstream repo. | ||
| If you need any of it, clone | ||
| <https://github.com/InsightSoftwareConsortium/itkMGHImageIO>. | ||
|
|
||
| | Content in upstream | Why it did not ingest | | ||
| |---|---| | ||
| | `.github/`, `azure-pipelines.yml`, `Dockerfile` | Standalone-build CI scaffolding; not useful in-tree. | | ||
| | `CTestConfig.cmake`, `pyproject.toml`, `LICENSE`, `.clang-format` | Packaging / CI / style scaffolding superseded by ITK root. | | ||
| | Historical `Old/`, `paper/`, `docs/`, demo asset trees | Stripped by the whitelist to protect ITK's git pack from bloat. | | ||
|
|
||
| ## Long-form documentation | ||
|
|
||
| - **Format reference** — see the FreeSurfer documentation: | ||
| <https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MghFormat>. | ||
| - **Standalone build + history** — see the archived upstream at | ||
| <https://github.com/InsightSoftwareConsortium/itkMGHImageIO>. | ||
|
|
||
| ## Compliance level | ||
|
|
||
| Compliance Level 2 (Alpha — niche execution environment dependence: | ||
| FreeSurfer-format I/O). Carried forward from the | ||
| `MODULE_COMPLIANCE_LEVEL 2` declaration in the previous | ||
| `Modules/Remote/MGHIO.remote.cmake`. | ||
|
|
||
| ## Content-link status | ||
|
|
||
| The 3 input content-links under `test/MD5/` are already in `.cid` | ||
| (IPFS Content Identifier) form; no `.md5` → `.cid` normalization is | ||
| required for this module. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| /*========================================================================= | ||
| * | ||
| * Copyright NumFOCUS | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * https://www.apache.org/licenses/LICENSE-2.0.txt | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| *=========================================================================*/ | ||
|
|
||
| #ifndef itkMGHImageIO_h | ||
| #define itkMGHImageIO_h | ||
|
|
||
| #include "itkMatrix.h" | ||
| #include "itkImageIOBase.h" | ||
| #include <fstream> | ||
| #include "itk_zlib.h" | ||
|
|
||
| #include "MGHIOExport.h" | ||
|
|
||
| namespace itk | ||
| { | ||
| /** \class MGHImageIO | ||
| * | ||
| * \author Hans J. Johnson | ||
| * \brief Class that defines how to read MGH file format. | ||
| * Originally developed as part of the Slicer software | ||
| * package under grants XXXX | ||
| * | ||
| * \ingroup IOFilters | ||
| * \ingroup MGHIO | ||
| */ | ||
| class MGHIO_EXPORT MGHImageIO : public ImageIOBase | ||
| { | ||
| public: | ||
| /** Standard class type alias. */ | ||
| using Self = MGHImageIO; | ||
| using Superclass = ImageIOBase; | ||
| using Pointer = SmartPointer<Self>; | ||
|
|
||
| /** Method for creation through the object factory. */ | ||
| itkNewMacro(Self); | ||
|
|
||
| /** Run-time type information (and related methods). */ | ||
| itkOverrideGetNameOfClassMacro(MGHImageIO); | ||
|
|
||
| /*-------- This part of the interfaces deals with reading data. ----- */ | ||
|
|
||
| /** Determine if the file can be read with this ImageIO implementation. | ||
| * \param FileNameToRead The name of the file to test for reading. | ||
| * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite | ||
| * \return Returns true if this ImageIO can read the file specified. | ||
| */ | ||
| bool | ||
| CanReadFile(const char * FileNameToRead) override; | ||
|
|
||
| /** Set the spacing and dimension information for the set filename. */ | ||
| void | ||
| ReadImageInformation() override; | ||
|
|
||
| /** Reads the data from disk into the memory buffer provided. */ | ||
| void | ||
| Read(void * pData) override; | ||
|
|
||
| /*-------- This part of the interfaces deals with writing data. ----- */ | ||
|
|
||
| /** Determine if the file can be written with this ImageIO implementation. | ||
| * \param FileNameToWrite The name of the file to test for writing. | ||
| * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite | ||
| * \return Returns true if this ImageIO can write the file specified. | ||
| */ | ||
| bool | ||
| CanWriteFile(const char * name) override; | ||
|
|
||
| /** Set the spacing and dimension information for the set filename. */ | ||
| void | ||
| WriteImageInformation() override; | ||
|
|
||
| /** Writes the data to disk from the memory buffer provided. Make sure | ||
| * that the IORegions has been set properly. */ | ||
| void | ||
| Write(const void * buffer) override; | ||
|
|
||
| protected: | ||
| MGHImageIO(); | ||
| ~MGHImageIO() override; | ||
| void | ||
| PrintSelf(std::ostream & os, Indent indent) const override; | ||
|
|
||
| void | ||
| ReadVolumeHeader(); | ||
|
|
||
| private: | ||
| static const int MRI_UCHAR = 0; | ||
| static const int MRI_INT = 1; | ||
| static const int MRI_FLOAT = 3; | ||
| static const int MRI_SHORT = 4; | ||
| static const int MRI_TENSOR = 6; | ||
| static const unsigned int FS_DIMENSION_HEADER_SIZE = sizeof(int) * 7; | ||
| static const unsigned int FS_RAS_HEADER_SIZE = (sizeof(float) * 15) + sizeof(short); | ||
| static const unsigned int FS_UNUSED_HEADER_SIZE = 256 - FS_RAS_HEADER_SIZE; | ||
| static const unsigned int FS_WHOLE_HEADER_SIZE = | ||
| FS_RAS_HEADER_SIZE + FS_DIMENSION_HEADER_SIZE + FS_UNUSED_HEADER_SIZE; | ||
|
|
||
| /** check if a filename is for a compressed file */ | ||
| bool | ||
| IsCompressedFilename(const std::string fname); | ||
| /// processes the actual data buffer | ||
| void | ||
| SwapBytesIfNecessary(void * const buffer, const unsigned long numberOfPixels); | ||
|
|
||
| /// examines the direction cosines and creates encapsulation data | ||
| // void MriDirCos(); | ||
|
|
||
| void | ||
| WriteHeader(); | ||
|
|
||
| void | ||
| WriteData(const void * buffer); | ||
|
|
||
| void | ||
| PermuteFrameValues(const void * buffer, char * tempmemory); | ||
|
|
||
| unsigned int | ||
| GetComponentSize() const override; | ||
|
|
||
| std::string | ||
| GetOrientation(itk::Matrix<double> directions); | ||
|
|
||
| bool m_IsCompressed; | ||
| gzFile m_GZFile; | ||
| std::ofstream m_Output; | ||
|
|
||
| // Utility function to assist with writing to disk in the | ||
| // proper format. TInType is static_cast<TDiskType> type. | ||
| template <typename TInType, typename TDiskType> | ||
| int | ||
| TWrite(const TInType inValue); | ||
| template <typename TDiskType, typename TOutType> | ||
| int | ||
| TRead(TOutType & outValue); | ||
|
|
||
| int | ||
| TWrite(const char * buf, const unsigned long count); | ||
| void | ||
| OpenFile(); | ||
| void | ||
| CloseFile(); | ||
| }; | ||
| } // end namespace itk | ||
|
|
||
| #endif // itkMGHImageIO_h | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| /*========================================================================= | ||
| * | ||
| * Copyright NumFOCUS | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * https://www.apache.org/licenses/LICENSE-2.0.txt | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| *=========================================================================*/ | ||
|
|
||
| #ifndef itkMGHImageIOFactory_h | ||
| #define itkMGHImageIOFactory_h | ||
|
|
||
| #include "itkObjectFactoryBase.h" | ||
| #include "itkImageIOBase.h" | ||
|
|
||
| #include "MGHIOExport.h" | ||
|
|
||
| namespace itk | ||
| { | ||
| /** \class MGHImageIOFactory | ||
| * \brief Create instances of MGHImageIO objects using an object factory. | ||
| * \ingroup MGHIO | ||
| */ | ||
| class MGHIO_EXPORT MGHImageIOFactory : public ObjectFactoryBase | ||
| { | ||
| public: | ||
| ITK_DISALLOW_COPY_AND_MOVE(MGHImageIOFactory); | ||
|
|
||
| /** Standard class type alias */ | ||
| using Self = MGHImageIOFactory; | ||
| using Superclass = ObjectFactoryBase; | ||
| using Pointer = SmartPointer<Self>; | ||
| using ConstPointer = SmartPointer<const Self>; | ||
|
|
||
| /** Class methods used to interface with the registered factories **/ | ||
| const char * | ||
| GetITKSourceVersion() const override; | ||
|
|
||
| const char * | ||
| GetDescription() const override; | ||
|
|
||
| /** Method for class instantiation **/ | ||
| itkFactorylessNewMacro(Self); | ||
|
|
||
| /** Run-time type information (and related methods). */ | ||
| itkOverrideGetNameOfClassMacro(MGHImageIOFactory); | ||
|
|
||
| /** Register one factory of this type */ | ||
| static void | ||
| RegisterOneFactory() | ||
| { | ||
| MGHImageIOFactory::Pointer MGHFactory = MGHImageIOFactory::New(); | ||
|
|
||
| ObjectFactoryBase::RegisterFactoryInternal(MGHFactory); | ||
| } | ||
|
|
||
| protected: | ||
| MGHImageIOFactory(); | ||
| ~MGHImageIOFactory() override; | ||
| void | ||
| PrintSelf(std::ostream & os, Indent indent) const override; | ||
| }; | ||
| } // end namespace itk | ||
|
|
||
| #endif /// itkMGHImageIOFactory_h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| set( | ||
| DOCUMENTATION | ||
| "This modules contains an ImageIO class to read or write the | ||
| MGH file format that is an integral part of FreeSurfer based tools." | ||
| ) | ||
|
|
||
| itk_module( | ||
| MGHIO | ||
| ENABLE_SHARED | ||
| DEPENDS | ||
| ITKIOImageBase | ||
| ITKZLIB | ||
| TEST_DEPENDS | ||
| ITKTestKernel | ||
| ITKTransform | ||
| EXCLUDE_FROM_DEFAULT | ||
| FACTORY_NAMES | ||
| ImageIO::MGH | ||
| DESCRIPTION "${DOCUMENTATION}" | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| set( | ||
| MGHIO_SRC | ||
| itkMGHImageIOFactory.cxx | ||
| itkMGHImageIO.cxx | ||
| ) | ||
|
|
||
| itk_module_add_library(MGHIO ${MGHIO_SRC}) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.