Skip to content

Commit 4127340

Browse files
authored
Merge pull request pyushkevich#128 from jilei-hao/dev/mesh-wt
Dev/mesh wt
2 parents 797769e + cd95d06 commit 4127340

19 files changed

+407
-37
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ ENDIF()
8989

9090
# These four fields should be modified when versions change
9191
SET(SNAP_VERSION_MAJOR 4)
92-
SET(SNAP_VERSION_MINOR 0)
93-
SET(SNAP_VERSION_PATCH 1)
94-
SET(SNAP_VERSION_QUALIFIER "")
92+
SET(SNAP_VERSION_MINOR 1)
93+
SET(SNAP_VERSION_PATCH 0)
94+
SET(SNAP_VERSION_QUALIFIER "-dev")
9595

9696
# These fields should also be modified each time
97-
SET(SNAP_VERSION_RELEASE_DATE "20230320")
98-
SET(SNAP_VERSION_RELEASE_DATE_FORMATTED "March 20, 2023")
97+
SET(SNAP_VERSION_RELEASE_DATE "20230523")
98+
SET(SNAP_VERSION_RELEASE_DATE_FORMATTED "May 23, 2023")
9999

100100
# This field should only change when the format of the settings files changes
101101
# in a non backwards-compatible way

Common/Registry.cxx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include <cstdarg>
4242
#include <fstream>
4343
#include <iomanip>
44+
#include <regex>
4445
#include "itksys/SystemTools.hxx"
4546
#include "IRISException.h"
4647

@@ -491,6 +492,23 @@ ::FindValue(const StringType& value)
491492
return "";
492493
}
493494

495+
Registry::StringListType
496+
Registry
497+
::FindFoldersFromPattern(const StringType &_pattern) const
498+
{
499+
StringListType ret;
500+
std::regex pattern(_pattern);
501+
std::smatch match;
502+
503+
for (auto &kv : m_FolderMap)
504+
{
505+
if (std::regex_search(kv.first, match, pattern))
506+
ret.push_back(kv.first);
507+
}
508+
509+
return ret;
510+
}
511+
494512
void
495513
Registry
496514
::RemoveKeys(const char *match)

Common/Registry.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,9 @@ class Registry
460460
/** Find a value in a folder or return "" */
461461
StringType FindValue(const StringType& value);
462462

463+
/** Find a list of folders keys with string pattern */
464+
StringListType FindFoldersFromPattern(const StringType& _pattern) const;
465+
463466
/** Empty the contents of the registry */
464467
void Clear();
465468

GUI/Qt/Windows/SplashPanel.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ color:rgb(109, 109, 109);</string>
110110
<string>Copyright (C) 1998-2022
111111
Paul A. Yushkevich
112112
Guido Gerig
113-
Alison Pouch
113+
Alison M. Pouch
114114
Jilei Hao</string>
115115
</property>
116116
<property name="alignment">

Logic/Framework/GenericImageData.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,13 @@ int GenericImageData::GetNumberOfOverlays()
649649
return m_Wrappers[OVERLAY_ROLE].size();
650650
}
651651

652+
unsigned int
653+
GenericImageData
654+
::GetNumberOfTimePoints() const
655+
{
656+
return m_Parent->GetNumberOfTimePoints();
657+
}
658+
652659
ImageWrapperBase *GenericImageData::GetLastOverlay()
653660
{
654661
return m_Wrappers[OVERLAY_ROLE].back();

Logic/Framework/GenericImageData.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ class GenericImageData : public itk::Object
187187

188188
int GetNumberOfOverlays();
189189

190+
/**
191+
* Get Number of Timepoints in the workspace
192+
*/
193+
unsigned int GetNumberOfTimePoints() const;
194+
190195
ImageWrapperBase *GetLastOverlay();
191196

192197
// virtual ImageWrapperBase* GetLayer(unsigned int layer) const;

Logic/Mesh/GuidedMeshIO.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class GuidedMeshIO
7979
FileFormat GetFileFormat(Registry &folder, FileFormat dflt = FORMAT_COUNT);
8080

8181
/** Set the file format in a registry */
82-
void SetFileFormat(Registry &folder, FileFormat format);
82+
static void SetFileFormat(Registry &folder, FileFormat format);
8383

8484
/** Get enum description */
8585
std::string GetFormatDescription(FileFormat formatEnum);

Logic/Mesh/ImageMeshLayers.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ ::LoadFromRegistry(Registry &project, std::string &project_dir_orig,
226226
{
227227
auto folder_crnt_layer = folder_layers.Folder(layer_key);
228228
auto mesh_wrapper = StandaloneMeshWrapper::New();
229-
mesh_wrapper->LoadFromRegistry(folder_crnt_layer, project_dir_orig, project_dir_crnt);
229+
mesh_wrapper->LoadFromRegistry(folder_crnt_layer, project_dir_orig,
230+
project_dir_crnt, m_ImageData->GetNumberOfTimePoints());
230231
AddLayer(mesh_wrapper, true);
231232

232233
++layer_id;

Logic/Mesh/LevelSetMeshWrapper.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ ::SaveToRegistry(Registry &)
178178

179179
void
180180
LevelSetMeshWrapper
181-
::LoadFromRegistry(Registry &, std::string &, std::string &)
181+
::LoadFromRegistry(Registry &, std::string &, std::string &, unsigned int)
182182
{
183183

184184
}

Logic/Mesh/LevelSetMeshWrapper.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class LevelSetMeshWrapper : public MeshWrapperBase
6666
virtual void SaveToRegistry(Registry &folder) override;
6767

6868
/** Build the layer from registry */
69-
virtual void LoadFromRegistry(Registry &folder, std::string &orig_dir, std::string &crnt_dir) override;
69+
virtual void LoadFromRegistry(Registry &folder, std::string &orig_dir,
70+
std::string &crnt_dir, unsigned int nT) override;
7071

7172
/** Get Pipeline Modified Time */
7273
unsigned long GetAssemblyMTime(unsigned int tp);

0 commit comments

Comments
 (0)