import PyCA.Common as common
import PyCA.Display as display

# vector momentum modules
from Libraries import CAvmCommon

# others
import matplotlib.pyplot as plt
import os
import sys
import numpy as np
import mpi4py

StudySpec = {
    'numSubjects':
    Config.Param(default=4, required=True,
                 comment="Total number of subjects."),
    'subjectIds':
    Config.Param(
        default=['sid1', 'sid2', 'sid3', 'sid4'],
        required=True,
        comment=
        "List of subject ids. This should be unique names for each individuals"
    ),
    'subjectImages':
    Config.Param(default=[
        'subject1_I.mhd', 'subject2_I.mhd', 'subject3_I.mhd', 'subject4_I.mhd'
    ],
                 required=True,
                 comment="List of subject image files"),
    'subjectWeights':
    Config.Param(default=[1.0, 1.0, 1.0, 1.0],
Ejemplo n.º 2
0
from Libraries import CAvmCommon

# others
import numpy as np
import matplotlib.pyplot as plt
import os, errno

import logging
import copy
import math
import time

StudySpec = {
    'I0':
    Config.Param(default='subject1.mhd',
                 required=True,
                 comment="Initial (moving) image file"),
    'I1':
    Config.Param(default='subject2.mhd',
                 required=True,
                 comment="Target (fixed) image file")
}

MatchingConfigSpec = {
    'compute': Compute.ComputeConfigSpec,
    'vectormomentum': VMConfig.VMConfigSpec,
    'study': StudySpec,
    'optim': Optim.OptimConfigSpec,
    'io': {
        'plotEvery':
        Config.Param(default=10, comment="Update plots every N iterations"),
from Libraries import CAvmHGMCommon

# HGM application module
from Applications import CAvmHGM

# others
import matplotlib.pyplot as plt
import os
import sys
import numpy as np
#import mpi4py

StudySpec = {
    'I':
    Config.Param(default='I.mhd',
                 required=True,
                 comment="Initial (moving) image file, I to be matched to J"),
    'm':
    Config.Param(default='m.mhd',
                 required=True,
                 comment="Initial momenta, m at I to be matched to n"),
    'J':
    Config.Param(default='J.mhd',
                 required=True,
                 comment="Target (fixed) image file, J"),
    'n':
    Config.Param(default='n.mhd',
                 required=True,
                 comment="Initial momenta, n at the target J")
}
# HGM application module
from Applications import CAvmHGM

# others
import matplotlib.pyplot as plt
import os
import sys
import numpy as np
import csv
#import mpi4py

StudySpec = {
    'I':
    Config.Param(default='I.mhd',
                 required=True,
                 comment="Initial (moving) image file, I to be matched to J"),
    'm':
    Config.Param(default='m.mhd',
                 required=True,
                 comment="Initial momenta, m at I to be matched to n"),
    'J':
    Config.Param(default='J.mhd',
                 required=True,
                 comment="Target (fixed) image file, J"),
    'n':
    Config.Param(default='n.mhd',
                 required=True,
                 comment="Initial momenta, n at the target J")
}
# others
import numpy as np
import matplotlib.pyplot as plt
import os, errno

import logging
import sys
import copy
import math
import time

StudySpec = {
    'I0':
    Config.Param(default='I0.mhd',
                 required=True,
                 comment="Initial (moving) image file"),
    'm0':
    Config.Param(default='m0.mhd',
                 required=True,
                 comment="Initial momenta direction to shoot towards"),
    'scaleMomenta':
    Config.Param(default=1.0,
                 required=True,
                 comment="Scale initial momenta before shooting.")
}

GeodesicShootingConfigSpec = {
    'study':
    StudySpec,
    'diffOpParams':
Ejemplo n.º 6
0
# HGM modules
from Libraries import CAvmHGMCommon

# others
import matplotlib.pyplot as plt
import os
import sys
import numpy as np
import mpi4py
import csv
import socket
import datetime
StudySpec = {
    'numSubjects':
    Config.Param(default=4, required=True,
                 comment="Total number of subjects."),
    'subjectIds':
    Config.Param(
        default=['sid1', 'sid2', 'sid3', 'sid4'],
        required=True,
        comment=
        "List of subject ids. This should be unique names for each individuals"
    ),
    'subjectIntercepts':
    Config.Param(
        default=[
            'subject1_I.mhd', 'subject2_I.mhd', 'subject3_I.mhd',
            'subject4_I.mhd'
        ],
        required=True,
        comment=
Ejemplo n.º 7
0
from Libraries import CAvmCommon

# HGM modules
# from Libraries import CAvmHGMCommon

# others
import matplotlib.pyplot as plt
import os
import sys
import numpy as np
import mpi4py
import itertools
import csv
StudySpec = {
    'numSubjects':
    Config.Param(default=4, required=True,
                 comment="Total number of subjects."),
    'subjectFile':
    Config.Param(
        default="FilePath.csv",
        comment=
        "Path to the file that lists details of all subjects every timepoint, as pair of rows of images and times.  Each row should be comma separated."
    ),
    'initializationsFile':
    Config.Param(
        default=None,
        comment=
        "Path to the file that lists details of all initializations of initial image and momenta."
    ),
    'setUnitSpacing':
    Config.Param(default=True,
                 comment="Ignore the spacing in images and set it to (1,1,1)"),