我有两个tiff堆栈,其延时数据对应于显微镜实验中获得的不同通道。我想将它们合并为具有两个通道的单个堆栈。两个堆栈都是16位灰度。
当我使用时:
convert stack1.tiff stack2.tiff stack_merged.tiff
我得到一个连续两个堆栈的单个但连接的文件。
答案 0 :(得分:2)
我认为你需要这样的东西:
// LIST OF PRODUCTS IN RESULT SETS
List<Product> products = new List<Product>();
products.Add(new Product() { Id = 1 });
products.Add(new Product() { Id = 2 });
// LIST OF ALL PRODUCTS AND THEIR CATEGORY TAXONOMIES
List<ProductCategory> allProductCategories = new List<ProductCategory>();
allProductCategories.Add(new ProductCategory() { ProductId = 1, CategoryUid = 101, ParentCategoryUid = 30 });
allProductCategories.Add(new ProductCategory() { ProductId = 1, CategoryUid = 30, ParentCategoryUid = 2 });
allProductCategories.Add(new ProductCategory() { ProductId = 1, CategoryUid = 2, ParentCategoryUid = 1 });
allProductCategories.Add(new ProductCategory() { ProductId = 3, CategoryUid = 101, ParentCategoryUid = 43 });
allProductCategories.Add(new ProductCategory() { ProductId = 3, CategoryUid = 43, ParentCategoryUid = 8 });
allProductCategories.Add(new ProductCategory() { ProductId = 3, CategoryUid = 8, ParentCategoryUid = 1 });
// NEED TO MERGE THE 2ND LIST INTO THE 1ST BY PRODUCTID VIA SQL EQUIV INNER JOIN
// END RESULT SHOULD BE products list has 2 objects. one object has 1 list product category with 3 child objects
// THIS IS THE CLOSEST I GOT
products.Select(x => x.Id).Intersect(allProductCategories.Select(a => a.ProductId).ToList());
}
public class Product
{
private int _id;
private List<ProductCategory> _productCategories;
public int Id
{
get { return _id; }
set { _id = value; }
}
public List<ProductCategory> ProductCategories
{
get { return _productCategories; }
set { _productCategories = value; }
}
}
public class ProductCategory
{
private int _productId;
private int _categoryUid;
private int _parentCategoryUid;
public int ProductId
{
get { return _productId; }
set { _productId = value; }
}
public int CategoryUid
{
get { return _categoryUid; }
set { _categoryUid = value; }
}
public int ParentCategoryUid
{
get { return _parentCategoryUid; }
set { _parentCategoryUid = value; }
}
}