（如有大神指导ITK编写，感激不尽）

1 C++编写的3D图像配准程序，用于CT和PET图像
2 itk中的registration组件中的优化算法是否可以用powell等，如果是，该怎么用
3 matlab中的imregister函数互信息测度，移植到C++程序的方法也行

1个回答

qq_28643595 谢谢帮助，但是前两个链接都是没有后缀的错误文件，第三个是基于matlab的程序。。

rset.next()查不到第一条记录，后面的都是正常取出数据
if (rset.next()) { while (rset.next()) { Pet petes = new Pet(); petes.setPetId(rset.getInt("petId")); petes.setPetName(rset.getString("petName")); } } 在if那里好像使用过了第一条记录，next的指针指向第二条记录，while里面就开始取第二条后面的记录，请问怎么将指针指向第一条？

Tensroflow 数据集 Oxford -pet处理问题

Problem Description FreeOpen is an organization which arranges blind data for girls and boys. The moral of that name is “Open your free mind to find your other half”. FreeOpen use a pet to make a match to a girl and a boy. FreeOpen believe that if a girl and a boy like each other and they like the same pet, they will be happy when they are living together with that pet. There are n boys, m girls and k pets. FreeOpen want know the maximum matches. Each match consists of one girl, one boy and one pet, and each girl, boy or pet can only be in one single match. Input The first line consists of an integer T, indicating the number of test cases. The first line of each case consists of three integers G, B, P, indicating the number of girls, the number of boys and the number of pets. The next G * B matrix indicates whether a girl and a boy like each other. The i-th girl and j-th boy like each other if and only if Matrix (i, j) = 1; the next G * P matrix indicates whether a girl likes a pet and the next B * P matrix indicates whether a boy likes a pet. Output Output the maximum matches on a single line for each test case. Constrains 0 < T <= 10 0 < G, B, P <= 20 0 < G + B + P <= 60 Sample Input 2 2 1 3 1 1 1 1 1 1 1 1 0 0 0 15 15 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Sample Output 0 13
C语言解决FreeOpen，请认真回答，严禁灌水，否则举报
Problem Description FreeOpen is an organization which arranges blind data for girls and boys. The moral of that name is “Open your free mind to find your other half”. FreeOpen use a pet to make a match to a girl and a boy. FreeOpen believe that if a girl and a boy like each other and they like the same pet, they will be happy when they are living together with that pet. There are n boys, m girls and k pets. FreeOpen want know the maximum matches. Each match consists of one girl, one boy and one pet, and each girl, boy or pet can only be in one single match. Input The first line consists of an integer T, indicating the number of test cases. The first line of each case consists of three integers G, B, P, indicating the number of girls, the number of boys and the number of pets. The next G * B matrix indicates whether a girl and a boy like each other. The i-th girl and j-th boy like each other if and only if Matrix (i, j) = 1; the next G * P matrix indicates whether a girl likes a pet and the next B * P matrix indicates whether a boy likes a pet. Output Output the maximum matches on a single line for each test case. Constrains 0 < T <= 10 0 < G, B, P <= 20 0 < G + B + P <= 60 Sample Input 2 2 1 3 1 1 1 1 1 1 1 1 0 0 0 15 15 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Sample Output 0 13
The Peanuts 用C语言实现

Problem Description One day, Lin Ji wake up in the morning and found that his pethamster escaped. He searched in the room but didn’t find the hamster. He tried to use some cheese to trap the hamster. He put the cheese trap in his room and waited for three days. Nothing but cockroaches was caught. He got the map of the school and foundthat there is no cyclic path and every location in the school can be reached from his room. The trap’s manual mention that the pet will always come back if it still in somewhere nearer than distance D. Your task is to help Lin Ji to find out how many possible locations the hamster may found given the map of the school. Assume that the hamster is still hiding in somewhere in the school and distance between each adjacent locations is always one distance unit. Input The input contains multiple test cases. Thefirst line is a positive integer T (0<T<=10), the number of test cases. For each test cases, the first line has two positive integer N (0<N<=100000) and D(0<D<N), separated by a single space. N is the number of locations in the school and D is the affective distance of the trap. The following N-1lines descripts the map, each has two integer x and y(0<=x,y<N), separated by a single space, meaning that x and y is adjacent in the map. Lin Ji’s room is always at location 0. Output For each test case, outputin a single line the number of possible locations in the school the hamster may be found. Sample Input 1 10 2 0 1 0 2 0 3 1 4 1 5 2 6 3 7 4 8 6 9 Sample Output 2
The Peanuts 的代码编写
MATLAB中的initmesh函数得到的pet网格数据之间的关系是什么呢？

“=”作为左操作数，这个报错怎么解决？
void CFill::CreateBucket()//创建桶表 { int yMin, yMax; yMin = yMax = P[0].y; for (int i = 0; i < PNum; i++)//查找多边形所覆盖的最小和最大扫描线 { if (P[i].y < yMin) { yMin = P[i].y;//扫描线的最小值 } if (P[i].y > yMax) { yMax = P[i].y;//扫描线的最大值 } } for (int y = yMin; y <= yMax; y++) { if (yMin == y)//建立桶头结点 { pHeadB = new CBucket;//pHeadB为CBucket的头结点 pCurrentB = pHeadB;//CurrentB为CBucket当前结点 **pCurrentB->ScanLine = yMin;** pCurrentB->pET = NULL;//没有链接边表 pCurrentB->next = NULL; } else//建立桶的其它结点 { pCurrentB->next = new CBucket; pCurrentB = pCurrentB->next; pCurrentB->ScanLine = y; pCurrentB->pET = NULL; pCurrentB->next = NULL; } } } 报错的是： pCurrentB->ScanLine = yMin; 和 pCurrentB->ScanLine = y; ![图片说明](https://img-ask.csdn.net/upload/201906/18/1560844010_512111.png)
RTX致命的应用程序退出

![图片说明](https://img-ask.csdn.net/upload/201904/28/1556422397_681757.png) 这个数据记录属于什么范式，会引发什么操作异常以及如何将其规范化至BCNF？ 个人认为（PET ID,VISIT DATE）为组合关键字，于是分成了两个表(PET ID, PET NAME, PET TYPE, PET AGE, PET OWNER)，(PET ID, VISIT DATE, PROCEDURE)。但分析之后觉得已经直接达到了BCNF的要求。 求指教是否有误？
sql left join 如何取右表中最后一条

oracle 报错 ora-00905
report如下,求大神来看看 在行: 99 上开始执行命令时出错 - ALTER TABLE vet ADD CONSTRAINT vetpractice_vet_fk FOREIGN KEY (vetpractice_no, pet_no, owner_no) REFERENCES vetpractice (vetpractice_no, pet_no, owner_no) ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE 错误报告 - SQL 错误: ORA-00905: 缺失关键字 00905. 00000 - "missing keyword" *Cause: *Action:

java设计一个支持信息查询的宠物商店中遇到了问题
1.程序要求实现根据用户提供的名称在寄养的宠物中查找宠物并输出该宠物的类型及创建序号。 2程序提供对宠物的信息输出功能（信息输出，如：喂养序号为1，名称为大黄的宠物狗，可以输出“1 狗 大黄”），可根据类型输出所有类型相同的宠物；并可根据寄样序号，输出该序号之前所有当前在店中寄样的宠物。 我在设计时似乎用数组不能实现对宠物信息的储存和再读取，部分代码如下： ``` class Pet{ int rank; int []number = new int[10]; String []name = new String[10]; char []species = new char[10]; PetShop st = new PetShop(); char D = 'd'; char C = 'c'; char R = 'r'; public void CreatePet() { int m = 0; System.out.println("请输入您宠物的昵称:"); for(int i = 0;i<10;i++) { if(number[i] == m) { name[i] = input01.nextLine(); number[i] = i; if(chosenFounction02 == 1) { species[i] = D; } else if (chosenFounction02 == 2) { species[i] = C; } else if (chosenFounction02 ==3) { species[i] = R; } System.out.println("您宠物的序号是："+number[i]); break; } else if(number[i] != 0) { continue; } }//这是负责创建对象的代码 ``` ``` public void SearchPet(String str){ int times = 0; for(int i = 0;i<10;i++){ if(name[i] == null) { continue; } else if(name[i].equals(str)){ times++; if(species[i] == 'd'){ System.out.println(i+" 狗 "); } else if(species[i] == 'c'){ //这里报错java.lang.NullPointerException System.out.println(i+" 猫 "); } else if(species[i] == 'r'){ System.out.println(i+" 兔子 "); } break; } else{ if(times == 0){ System.out.println("很抱歉您的宠物不在我们商店里哦~"); dialog(); st.InputFounction(); } else { continue; } }//这是负责查询对象的代码 ```
java抽象类的问题 关于继承

c#如何在对象销毁时，自动将计算的对象个数减-1
public class Dog : Pet { static int Num; static Dog() { Num = 0; } public Dog(string name) : base(name) { ++Num; } new public void PrintName() { System.Console.WriteLine("狗的名字是" + Name); } sealed public override void Speak() { System.Console.WriteLine(Name + " is speaking " + "wow"); } static public void ShowNum() { System.Console.WriteLine("狗的数量：" + Num); } } c#有垃圾回收机制，不需要析构函数，即使定义了，也不会按照你预想的进行。 那么如何知道当前的对象个数呢， 比方说我new了很多个狗狗的对象，根据c#自动回收机制那么有些狗狗会自动在不用的时候会被删除，如何知道当前的狗狗数量呢
Java编程问题 初学者 程序显示没有错误，但是不能运行
package bjl.petshop; public interface Pet { public String getName(); public String getColor(); //接口的抽象方法 } package bjl.petshop; public class Cat implements Pet{ private String name; private String color; public Cat(){ } public Cat(String name,String color){ this.setName(name); this.setColor(color); } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } } package bjl.petshop; public class PetShop { private Pet[] pets; private int foot; public int len; public PetShop(int len){ if(len>0){ this.pets = new Pet[len]; //数组名=new 数据类型[长度],分配内存给数组 } else{ this.pets = new Pet[1]; } } public boolean AddPet(Pet pet){ if(this.foot < this.pets.length){ this.pets[this.foot] = pet; this.foot++; return true; } else{ return false; } } public boolean SearchPet(String keyWord){ boolean count = false; for(int i=0;i<=this.pets.length;i++){ if(this.pets[i].getName().equals(keyWord)){ count = true; } else{ count = false; } } return count; } } package bjl.petshop; public class Test { public static void main(String args[]){ PetShop ps = new PetShop(6); ps.AddPet(new Cat("小白","白色")); ps.AddPet(new Cat("小黑","黑色")); ps.AddPet(new Cat("小花","花色")); ps.AddPet(new Cat("小红","红色")); ps.AddPet(new Cat("小黄","黄色")); System.out.println(ps.SearchPet("小白")); } }
Java学习的正确打开方式

linux系列之常用运维命令整理笔录

Vue + Spring Boot 项目实战（十四）：用户认证方案与完善的访问拦截

Python十大装B语法
Python 是一种代表简单思想的语言，其语法相对简单，很容易上手。不过，如果就此小视 Python 语法的精妙和深邃，那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点，并附上详细的实例代码。如能在实战中融会贯通、灵活使用，必将使代码更为精炼、高效，同时也会极大提升代码B格，使之看上去更老练，读起来更优雅。

2019年11月中国大陆编程语言排行榜
2019年11月2日，我统计了某招聘网站，获得有效程序员招聘数据9万条。针对招聘信息，提取编程语言关键字，并统计如下： 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...

SQL-小白最佳入门sql查询一

“狗屁不通文章生成器”登顶GitHub热榜，分分钟写出万字形式主义大作

《程序人生》系列-这个程序员只用了20行代码就拿了冠军

11月8日，由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办，科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。 　　区块链技术被认为是继蒸汽机、电力、互联网之后，下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力，电力解决了人类基本的生活需求，互联网彻底改变了信息传递的方式，区块链作为构造信任的技术有重要的价值。 　　1...

【技巧总结】位运算装逼指南

《C++ Primer》学习笔记（六）：C++模块设计——函数

8年经验面试官详解 Java 面试秘诀

1.两种思维方式在求职面试中，经常会考察这种问题：北京有多少量特斯拉汽车？某胡同口的煎饼摊一年能卖出多少个煎饼？深圳有多少个产品经理？一辆公交车里能装下多少个乒乓球？一个正常成年人有多少根头发？这类估算问题，被称为费米问题，是以科学家费米命名的。为什么面试会问这种问题呢？这类问题能把两类人清楚地区分出来。一类是具有文科思维的人，擅长赞叹和模糊想象，它主要依靠的是人的第一反应和直觉，比如小孩...
so easy！ 10行代码写个"狗屁不通"文章生成器